{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.9xE4bAyM/b1/gsoap_2.8.104-3_arm64.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.9xE4bAyM/b2/gsoap_2.8.104-3_arm64.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,7 +1,7 @@\n \n 961afd9d051e2533b68a82735ac6ed43 6207180 debug optional gsoap-dbgsym_2.8.104-3_arm64.deb\n- caabd438a59305a49fbd7f046e490d73 12593248 doc optional gsoap-doc_2.8.104-3_all.deb\n+ a671e7e02d1ea2a4e007e6dcc90b7c75 12593200 doc optional gsoap-doc_2.8.104-3_all.deb\n 2dad25441fe959b61875423a2b18d369 1409252 devel optional gsoap_2.8.104-3_arm64.deb\n 5d99ba78a590eaa7e7729caa3009f7c5 1656048 debug optional libgsoap-2.8.104-dbgsym_2.8.104-3_arm64.deb\n 5c5f7c246a08e3017c982769a3b644fa 275316 libs optional libgsoap-2.8.104_2.8.104-3_arm64.deb\n 9987f06b6bf1b661c7e16f876fb7bc39 287912 libdevel optional libgsoap-dev_2.8.104-3_arm64.deb\n"}, {"source1": "gsoap-doc_2.8.104-3_all.deb", "source2": "gsoap-doc_2.8.104-3_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2021-03-08 13:06:23.000000 debian-binary\n--rw-r--r-- 0 0 0 46976 2021-03-08 13:06:23.000000 control.tar.xz\n--rw-r--r-- 0 0 0 12546080 2021-03-08 13:06:23.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 46988 2021-03-08 13:06:23.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 12546020 2021-03-08 13:06:23.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -355,15 +355,15 @@\n -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\n -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\n -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\n -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\n -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\n -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\n -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\n--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\n+-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\n -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\n -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\n -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\n -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\n -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\n -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\n -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\n"}, {"source1": "./usr/share/doc/gsoap-doc/guide/html/index.html", "source2": "./usr/share/doc/gsoap-doc/guide/html/index.html", "has_internal_linenos": true, "unified_diff": "@@ -56951,57716 +56951,57715 @@\n 000de760: 6c69 7374 3c2f 7370 616e 3e20 3c73 7061 list id="1&\n 000de7b0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;␐\n-000de7e0: 6366 3c2f 7370 616e 3e3c 2f64 6976 3e0a cf.\n+000de7d0: 6974 6572 616c 223e 4026 2378 3234 3133 iteral\">@␓\n+000de7e0: 3bb5 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;..\n 000de7f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
&#\n-000de820: 7832 3431 303b 6366 2623 7832 3430 323b x2410;cf␂\n-000de830: abaa 3c2f 7370 616e 3e3c 2f64 6976 3e0a ..
.\n-000de840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
&#\n-000de870: 7832 3431 303b 6366 2623 7832 3430 323b x2410;cf␂\n-000de880: abaa 3c2f 7370 616e 3e3c 2f64 6976 3e0a ..
.\n-000de890: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
&#\n-000de8c0: 7832 3431 303b 6366 2623 7832 3430 323b x2410;cf␂\n-000de8d0: abaa 3c2f 7370 616e 3e3c 2f64 6976 3e0a ..
.\n-000de8e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-000de910: 2020 266c 743b 6e65 7874 2068 7265 663d <next href=\n-000de920: 2671 756f 743b 3c2f 7370 616e 3e23 3126 "#1&\n-000de930: 7175 6f74 3b2f 2667 743b 203c 2f64 6976 quot;/> .
</next\n-000de980: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.&l\n-000de9a0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ns:\n-000de9c0: 6c69 7374 3c2f 7370 616e 3e26 6774 3b3c list><\n-000de9d0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

.

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

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

.

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

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

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

.

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

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

.

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

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

.

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

.

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

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

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

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

.

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

.

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

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

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

.

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

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

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

.

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

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

.

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

.

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

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

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

.

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

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

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

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

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

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

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

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

.

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

.

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

.

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

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

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

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

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

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

.

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

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

.

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

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

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

.

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

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

.

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

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

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

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

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

.

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

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

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

.

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

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

.
{
\n-000e35b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
Type *__p\n-000e35d0: 7472 3b20 203c 7370 616e 2063 6c61 7373 tr; // po\n-000e35f0: 696e 7465 7220 746f 2061 7272 6179 206f inter to array o\n-000e3600: 6620 656c 656d 656e 7473 2069 6e20 6d65 f elements in me\n-000e3610: 6d6f 7279 3c2f 7370 616e 3e3c 2f64 6976 mory.
int __s\n-000e3660: 697a 653b 2020 203c 7370 616e 2063 6c61 ize; // \n-000e3680: 6e75 6d62 6572 206f 6620 656c 656d 656e number of elemen\n-000e3690: 7473 2070 6f69 6e74 6564 2074 6f20 3c2f ts pointed to
. \n-000e36c0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-000e36e0: 2f73 7061 6e3e 205f 5f6f 6666 7365 743b /span> __offset;\n-000e36f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // option\n-000e3710: 616c 2053 4f41 5020 312e 3120 6172 7261 al SOAP 1.1 arra\n-000e3720: 7920 6f66 6673 6574 3c2f 7370 616e 3e3c y offset<\n-000e3730: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
... \n-000e3750: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-000e3770: 2f2f 2061 6e79 7468 696e 6720 7468 6174 // anything that\n-000e3780: 2066 6f6c 6c6f 7773 2068 6572 6520 7769 follows here wi\n-000e3790: 6c6c 2062 6520 6967 6e6f 7265 6420 3c2f ll be ignored
.};\n-000e37c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
where the array_name must be a non\n-000e3810: 2d71 7561 6c69 6669 6564 206e 616d 6520 -qualified name \n-000e3820: 616e 6420 3c63 6f64 653e 5479 7065 3c2f and Type is the typ\n-000e3840: 6520 666f 7220 7468 6520 656c 656d 656e e for the elemen\n-000e3850: 7473 206f 6620 7468 6520 6172 7261 792e ts of the array.\n-000e3860: 2054 6865 203c 636f 6465 3e5f 5f70 7472 The __ptr\n-000e3870: 3c2f 636f 6465 3e20 6d65 6d62 6572 2070 member p\n-000e3880: 6f69 6e74 7320 746f 2074 6865 2061 7272 oints to the arr\n-000e3890: 6179 2076 616c 7565 7320 616e 6420 3c63 ay values and __size is the array s\n-000e38c0: 697a 652e 2054 6865 203c 636f 6465 3e5f ize. The _\n-000e38d0: 5f6f 6666 7365 743c 2f63 6f64 653e 206d _offset m\n-000e38e0: 656d 6265 7220 7370 6563 6966 6965 7320 ember specifies \n-000e38f0: 616e 206f 7074 696f 6e61 6c20 6172 7261 an optional arra\n-000e3900: 7920 6f66 6673 6574 2c20 7768 656e 206e y offset, when n\n-000e3910: 6f6e 7a65 726f 2c20 7365 6520 5365 6374 onzero, see Sect\n-000e3920: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion O\n-000e3950: 6e65 2d64 696d 656e 7369 6f6e 616c 2064 ne-dimensional d\n-000e3960: 796e 616d 6963 2053 4f41 502d 656e 636f ynamic SOAP-enco\n-000e3970: 6465 6420 6172 7261 7973 2077 6974 6820 ded arrays with \n-000e3980: 6e6f 6e2d 7a65 726f 206f 6666 7365 7473 non-zero offsets\n-000e3990: 3c2f 613e 2e3c 2f70 3e0a 3c70 3e49 6620 .

.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

.

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

.

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

.

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

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

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

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

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

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

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

.

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

.

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

.

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

// Contents of \n-000e5250: 6669 6c65 2026 7175 6f74 3b6d 6174 7269 file "matri\n-000e5260: 782e 6826 7175 6f74 3b3a 203c 2f73 7061 x.h":
.
class Ma\n-000e52b0: 7472 6978 203c 2f64 6976 3e0a 3c64 6976 trix
.{ \n-000e52d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
. \n-000e5310: 2020 5665 6374 6f72 202a 5f5f 7074 723b Vector *__ptr;\n-000e5320: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int __size; .
int __o\n-000e53b0: 6666 7365 743b 203c 2f64 6976 3e0a 3c64 ffset;
.\n-000e53d0: 2020 2020 4d61 7472 6978 2829 3b20 3c2f Matrix(); .
.\n-000e54e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
Vector&\n-000e5500: 3b20 6f70 6572 6174 6f72 5b5d 283c 7370 ; operator[](int i);
. \n-000e5550: 2020 203c 7370 616e 2063 6c61 7373 3d22 struct \n-000e5570: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-000e55a0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *soap;
\n-000e5600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

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

.

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

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

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

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

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

.

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

.

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

.

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

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

.

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

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

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

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

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

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

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

.

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

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

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

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

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

.

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

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

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

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

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

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

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

. \n-000e89b0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<complexTyp\n-000e8a00: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e n\n-000e8a20: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="myC\n-000e8a50: 6c61 7373 2671 756f 743b 3c2f 7370 616e lass">
. \n-000e8a80: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <s\n-000e8aa0: 6571 7565 6e63 653c 2f73 7061 6e3e 2667 equence&g\n-000e8ab0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
\n-000e8ad0: 266c 743b 3c73 7061 6e20 636c 6173 733d <el\n-000e8af0: 656d 656e 743c 2f73 7061 6e3e 203c 7370 ement name=<\n-000e8b20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000e8b30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000e8b40: 3b6e 756d 6265 7226 7175 6f74 3b3c 2f73 ;number" type<\n-000e8b70: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:int\n-000e8ba0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " minOccurs="1" maxO\n-000e8c20: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="1\n-000e8c50: 3026 7175 6f74 3b3c 2f73 7061 6e3e 2f26 0"/&\n-000e8c60: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n-000e8c80: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e\n-000e8ca0: 6c65 6d65 6e74 3c2f 7370 616e 3e20 3c73 lement name=\n-000e8cd0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000e8cf0: 743b 6e61 6d65 2671 756f 743b 3c2f 7370 t;name" type="xsd:stri\n-000e8d50: 6e67 2671 756f 743b 3c2f 7370 616e 3e20 ng" \n-000e8d60: 3c73 7061 6e20 636c 6173 733d 226b 6579 minOccurs<\n-000e8d80: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="2"\n-000e8db0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ma\n-000e8dd0: 784f 6363 7572 733c 2f73 7061 6e3e 3d3c xOccurs=<\n-000e8de0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000e8df0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000e8e00: 3b75 6e62 6f75 6e64 6564 2671 756f 743b ;unbounded"\n-000e8e10: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
</sequence<\n-000e8e60: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
</complexType>
.\n-000e8ec0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
You can also im\n-000e8ef0: 706c 656d 656e 7420 796f 7572 206f 776e plement your own\n-000e8f00: 2063 6f6e 7461 696e 6572 732e 2054 6865 containers. The\n-000e8f10: 2063 6f6e 7461 696e 6572 7320 6d75 7374 containers must\n-000e8f20: 2062 6520 636c 6173 7320 7465 6d70 6c61 be class templa\n-000e8f30: 7465 7320 616e 6420 7368 6f75 6c64 2064 tes and should d\n-000e8f40: 6566 696e 6520 6120 666f 7277 6172 6420 efine a forward \n-000e8f50: 6974 6572 6174 6f72 2074 7970 652c 2061 iterator type, a\n-000e8f60: 6e64 2070 726f 7669 6465 2074 6865 2066 nd provide the f\n-000e8f70: 6f6c 6c6f 7769 6e67 206d 6574 686f 6473 ollowing methods\n-000e8f80: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c :

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

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

.

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

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

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

.

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

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

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

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

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

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

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

.Multiple arrays\n+000e79b0: 2063 616e 2062 6520 7061 7274 206f 6620 can be part of \n+000e79c0: 6120 7374 7275 6374 206f 7220 636c 6173 a struct or clas\n+000e79d0: 732e 2046 6f72 2065 7861 6d70 6c65 3a3c s. For example:<\n+000e79e0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
struct \n+000e7a30: 6e73 5f5f 436f 6e74 6163 7420 3c2f 6469 ns__Contact .
{
. \n+000e7a70: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n+000e7a90: 723c 2f73 7061 6e3e 202a 6669 7273 744e r *firstN\n+000e7aa0: 616d 653b 203c 2f64 6976 3e0a 3c64 6976 ame;
. \n+000e7ac0: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+000e7ae0: 3c2f 7370 616e 3e20 2a6c 6173 744e 616d *lastNam\n+000e7af0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
.
$ \n+000e7b10: 3c73 7061 6e20 636c 6173 733d 226b 6579 int nPhones; \n+000e7b40: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n+000e7b60: 6e75 6d62 6572 206f 6620 5068 6f6e 6573 number of Phones\n+000e7b70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000e7b90: 2020 2020 3c61 2063 6c61 7373 3d22 636f ULONG64 *phoneNumber; \n+000e7c00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // array o\n+000e7c20: 6620 7068 6f6e 6520 6e75 6d62 6572 7320 f phone numbers \n+000e7c30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000e7c50: 2020 2420 3c73 7061 6e20 636c 6173 733d $ in\n+000e7c70: 743c 2f73 7061 6e3e 206e 456d 6169 6c73 t nEmails\n+000e7c80: 3b20 2020 2020 2020 2020 203c 7370 616e ; // number of em\n+000e7cb0: 6169 6c73 203c 2f73 7061 6e3e 3c2f 6469 ails .
char *\n+000e7d00: 2a65 6d61 696c 4164 6472 6573 733b 2020 *emailAddress; \n+000e7d10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // array o\n+000e7d30: 6620 656d 6169 6c20 6164 6472 6573 7365 f email addresse\n+000e7d40: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
.\n+000e7d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

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

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

.

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

.

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

.

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

.

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

.

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

.

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

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

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

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

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

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

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

.

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

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

.

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

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

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

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

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

.

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

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

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

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

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

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

.

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

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

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

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

.

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

.

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

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

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

.

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

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

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

.

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

.

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

.

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

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

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

.

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

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

.

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

.

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

.

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

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

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

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

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

.

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

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

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

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

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

class <\n+000ed380: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000ed390: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n+000ed3a0: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary.\n+000ed3b0: 6874 6d6c 223e 7873 645f 5f62 6173 6536 html\">xsd__base6\n+000ed3c0: 3442 696e 6172 793c 2f61 3e3c 2f64 6976 4Binary.
{ publ\n+000ed400: 6963 3c2f 7370 616e 3e3a 203c 2f64 6976 ic: .
unsigned char\n+000ed470: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *__ptr; .
int <\n+000ed520: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000ed530: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n+000ed540: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary.\n+000ed550: 6874 6d6c 2361 6132 6466 6434 6439 3966 html#aa2dfd4d99f\n+000ed560: 3832 3830 6334 3133 6239 6666 3235 6136 8280c413b9ff25a6\n+000ed570: 3961 3837 3239 223e 5f5f 7369 7a65 3c2f 9a8729\">__size;
.
}; \n+000ed5a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.

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

.

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

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

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

.

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

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

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

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

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

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

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

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

    .

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

    .

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

    .

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

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

    .

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

    .

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

    .

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

    .

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

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

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

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

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

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

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

    .

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

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

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

    .

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

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

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

    .

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

    .

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

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

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

    .

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

    .

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

    .

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

    .

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

    .
    struc\n-000f04d0: 7420 3c2f 7370 616e 3e6e 735f 5f4d 7952 t ns__MyR\n-000f04e0: 6563 6f72 6420 3c2f 6469 763e 0a3c 6469 ecord
    .{\n-000f0500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

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

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

    .

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

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

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

    .

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

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

    .

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

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

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

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

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

    .

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

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

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

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

    For example.

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

    .

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

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

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

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

    .

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

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

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

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

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

    .

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

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

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

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

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

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

    .

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

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

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

    .

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

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

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

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

    .

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

    .

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

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

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

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

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

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

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

    .

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

    .

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

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

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

    .

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

    .

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

    .

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

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

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

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

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

    .

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

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

    .

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

    .

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

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

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

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

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

    .

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

    .

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

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

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

    .

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

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

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

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

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

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

    .
    typedef\n-000f42b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c float t\n-000f42e0: 696d 655f 5f72 6174 696f 203c 7370 616e ime__ratio "%5.\n-000f4310: 3266 2671 756f 743b 3c2f 7370 616e 3e3b 2f";\n-000f4320: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The format stri\n-000f4350: 6e67 2069 7320 7573 6564 2074 6f20 666f ng is used to fo\n-000f4360: 726d 6174 2074 6865 206f 7574 7075 7420 rmat the output \n-000f4370: 7468 6520 666c 6f61 7469 6e67 2070 6f69 the floating poi\n-000f4380: 6e74 2076 616c 7565 2069 6e20 584d 4c2e nt value in XML.\n-000f4390: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

    .

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

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

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

    .

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

    .

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

    .

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

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

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

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

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

    .

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

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

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

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

    .

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

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

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

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

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

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

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

    produces:

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

    .
    struct\n-000f52e0: 203c 2f73 7061 6e3e 785f 5f72 6563 6f72 x__recor\n-000f52f0: 6420 3c2f 6469 763e 0a3c 6469 7620 636c d
    .
    {.
    @ char *\n-000f5350: 206e 616d 653b 203c 2f64 6976 3e0a 3c64 name;
    .\n-000f5370: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-000f5390: 6172 3c2f 7370 616e 3e20 2a20 783a 6e61 ar * x:na\n-000f53a0: 6d65 5f3b 203c 2f64 6976 3e0a 3c64 6976 me_;
    .};\n-000f53c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Not that the na\n-000f53f0: 6d65 7370 6163 6520 7072 6566 6978 2063 mespace prefix c\n-000f5400: 6f6e 7665 6e74 696f 6e20 6361 6e20 6265 onvention can be\n-000f5410: 2075 7365 6420 696e 7374 6561 643a 3c2f used instead:.
    struct x\n-000f5470: 5f5f 7265 636f 7264 203c 2f64 6976 3e0a __record
    .\n+000f4d20: 226c 696e 6522 3e20 2040 203c 7370 616e \"line\"> @ char\n+000f4d50: 202a 206e 733a 7479 7065 3b20 3c2f 6469 * ns:type; .
    char *\n+000f4da0: 203a 6e61 6d65 3b20 3c2f 6469 763e 0a3c :name;
    .<\n+000f4db0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f4dc0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    \n+000f4dd0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

    .The colon notat\n+000f5080: 696f 6e20 646f 6573 206e 6f74 2061 766f ion does not avo\n+000f5090: 6964 206e 616d 6520 636c 6173 6865 7320 id name clashes \n+000f50a0: 6265 7477 6565 6e20 6d65 6d62 6572 732e between members.\n+000f50b0: 2046 6f72 2065 7861 6d70 6c65 3a3c 2f70 For example:.
    \n+000f5100: 7374 7275 6374 203c 2f73 7061 6e3e 785f struct x_\n+000f5110: 5f72 6563 6f72 6420 3c2f 6469 763e 0a3c _record
    .<\n+000f5120: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f5130: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    @ <\n+000f5150: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f5160: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char * name; .
    char \n+000f51c0: 2a20 783a 6e61 6d65 3b20 3c2f 6469 763e * x:name;
    \n+000f51d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

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

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

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

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

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

    .

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

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

    .
    struc\n-000f79d0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t Namespace<\n-000f7a10: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> names\n-000f7a70: 7061 6365 733c 2f61 3e5b 5d20 3d20 3c2f paces[] = // {\n+000f6920: 2026 7175 6f74 3b70 7265 6669 7826 7175 "prefix&qu\n+000f6930: 6f74 3b2c 2026 7175 6f74 3b55 5249 2671 ot;, "URI&q\n+000f6940: 756f 743b 2c20 2671 756f 743b 5552 492d uot;, "URI-\n+000f6950: 7061 7474 6572 6e26 7175 6f74 3b20 286f pattern" (o\n+000f6960: 7074 696f 6e61 6c29 207d 203c 2f73 7061 ptional) }
    .
    { <\n+000f6990: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f69a0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f69b0: 3b53 4f41 502d 454e 5626 7175 6f74 3b3c ;SOAP-ENV"<\n+000f69c0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/\n+000f69f0: 2f73 6368 656d 6173 2e78 6d6c 736f 6170 /schemas.xmlsoap\n+000f6a00: 2e6f 7267 2f73 6f61 702f 656e 7665 6c6f .org/soap/envelo\n+000f6a10: 7065 2f26 7175 6f74 3b3c 2f73 7061 6e3e pe/"\n+000f6a20: 207d 2c20 3c73 7061 6e20 636c 6173 733d }, // mus\n+000f6a40: 7420 6265 2066 6972 7374 203c 2f73 7061 t be first
    .
    { <\n+000f6a70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f6a80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f6a90: 3b53 4f41 502d 454e 4326 7175 6f74 3b3c ;SOAP-ENC"<\n+000f6aa0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/\n+000f6ad0: 2f73 6368 656d 6173 2e78 6d6c 736f 6170 /schemas.xmlsoap\n+000f6ae0: 2e6f 7267 2f73 6f61 702f 656e 636f 6469 .org/soap/encodi\n+000f6af0: 6e67 2f26 7175 6f74 3b3c 2f73 7061 6e3e ng/"\n+000f6b00: 207d 2c20 3c73 7061 6e20 636c 6173 733d }, // mus\n+000f6b20: 7420 6265 2073 6563 6f6e 6420 3c2f 7370 t be second
    .
    { \n+000f6b50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f6b70: 743b 7873 6926 7175 6f74 3b3c 2f73 7061 t;xsi", "http:\n+000f6bb0: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200\n+000f6bc0: 312f 584d 4c53 6368 656d 612d 696e 7374 1/XMLSchema-inst\n+000f6bd0: 616e 6365 2671 756f 743b 3c2f 7370 616e ance" }, // mu\n+000f6c00: 7374 2062 6520 7468 6972 6420 3c2f 7370 st be third
    .
    { \n+000f6c30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f6c50: 743b 7873 6426 7175 6f74 3b3c 2f73 7061 t;xsd", "http:\n+000f6c90: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200\n+000f6ca0: 312f 584d 4c53 6368 656d 6126 7175 6f74 1/XMLSchema"\n+000f6cb0: 3b3c 2f73 7061 6e3e 207d 2c20 2020 2020 ; }, \n+000f6cc0: 2020 2020 203c 7370 616e 2063 6c61 7373 // mu\n+000f6ce0: 7374 2062 6520 666f 7572 7468 3c2f 7370 st be fourth
    .
    { \n+000f6d10: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f6d30: 743b 6e73 2671 756f 743b 3c2f 7370 616e t;ns", "urn:m\n+000f6d70: 792d 7365 7276 6963 652d 5552 4926 7175 y-service-URI&qu\n+000f6d80: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c73 ot; }, // binds &qu\n+000f6db0: 6f74 3b6e 7326 7175 6f74 3b20 6e61 6d65 ot;ns" name\n+000f6dc0: 7370 6163 6520 7072 6566 6978 2074 6f20 space prefix to \n+000f6dd0: 7363 6865 6d61 2055 5249 3c2f 7370 616e schema URI
    .
    { NU\n+000f6e00: 4c4c 2c20 4e55 4c4c 207d 203c 7370 616e LL, NULL } // end of table\n+000f6e30: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000f6e40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f6e50: 3e7d 3b20 3c2f 6469 763e 0a3c 2f64 6976 >};
    .Or alternativel\n+000f7930: 792c 2061 7374 6572 6973 6b73 2063 616e y, asterisks can\n+000f7940: 2062 6520 7573 6564 2061 7320 7769 6c64 be used as wild\n+000f7950: 6361 7264 7320 666f 7220 6d75 6c74 6970 cards for multip\n+000f7960: 6c65 2063 6861 7261 6374 6572 733a 3c2f le characters:.
    struct <\n+000f79c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000f79d0: 7265 663d 2273 7472 7563 745f 6e61 6d65 ref=\"struct_name\n+000f79e0: 7370 6163 652e 6874 6d6c 223e 4e61 6d65 space.html\">Name\n+000f79f0: 7370 6163 653c 2f61 3e20 3c61 2063 6c61 space namespaces[\n+000f7a60: 5d20 3d20 3c2f 6469 763e 0a3c 6469 7620 ] =
    .
    {.
    {
    .<\n-000f7aa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f7ab0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // { &q\n-000f7ad0: 756f 743b 7072 6566 6978 2671 756f 743b uot;prefix"\n-000f7ae0: 2c20 2671 756f 743b 5552 4926 7175 6f74 , "URI"\n-000f7af0: 3b2c 2026 7175 6f74 3b55 5249 2d70 6174 ;, "URI-pat\n-000f7b00: 7465 726e 2671 756f 743b 2028 6f70 7469 tern" (opti\n-000f7b10: 6f6e 616c 2920 7d20 3c2f 7370 616e 3e3c onal) } <\n-000f7b20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "SO\n-000f7b60: 4150 2d45 4e56 2671 756f 743b 3c2f 7370 AP-ENV", "http://sc\n-000f7ba0: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n-000f7bb0: 672f 736f 6170 2f65 6e76 656c 6f70 652f g/soap/envelope/\n-000f7bc0: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n-000f7bd0: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b\n-000f7bf0: 6520 6669 7273 7420 3c2f 7370 616e 3e3c e first <\n-000f7c00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "SO\n-000f7c40: 4150 2d45 4e43 2671 756f 743b 3c2f 7370 AP-ENC", "http://sc\n-000f7c80: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n-000f7c90: 672f 736f 6170 2f65 6e63 6f64 696e 672f g/soap/encoding/\n-000f7ca0: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n-000f7cb0: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b\n-000f7cd0: 6520 7365 636f 6e64 203c 2f73 7061 6e3e e second \n-000f7ce0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "x\n-000f7d20: 7369 2671 756f 743b 3c2f 7370 616e 3e2c si",\n-000f7d30: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w\n-000f7d60: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X\n-000f7d70: 4d4c 5363 6865 6d61 2d69 6e73 7461 6e63 MLSchema-instanc\n-000f7d80: 6526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 e", \n-000f7d90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f7db0: 743b 6874 7470 3a2f 2f77 7777 2e77 332e t;http://www.w3.\n-000f7dc0: 6f72 672f 2a2f 584d 4c53 6368 656d 612d org/*/XMLSchema-\n-000f7dd0: 696e 7374 616e 6365 2671 756f 743b 3c2f instance" },
    .\n-000f7df0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "xsd"\n-000f7e30: 3b3c 2f73 7061 6e3e 2c20 2020 2020 203c ;, <\n-000f7e40: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f7e50: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f7e60: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o\n-000f7e70: 7267 2f32 3030 312f 584d 4c53 6368 656d rg/2001/XMLSchem\n-000f7e80: 6126 7175 6f74 3b3c 2f73 7061 6e3e 2c20 a", \n-000f7e90: 2020 2020 2020 2020 203c 7370 616e 2063 "http:\n-000f7ec0: 2f2f 7777 772e 7733 2e6f 7267 2f2a 2f58 //www.w3.org/*/X\n-000f7ed0: 4d4c 5363 6865 6d61 2671 756f 743b 3c2f MLSchema" },
    .\n-000f7ef0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-000f7f20: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-000f7f40: 2020 7b20 4e55 4c4c 2c20 4e55 4c4c 7d20 { NULL, NULL} \n-000f7f50: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // end of \n-000f7f70: 7461 626c 6520 3c2f 7370 616e 3e3c 2f64 table .
    };
    .<\n-000f7fa0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

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

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

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

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

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

    .

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

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

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

    .
    \n+000f8d00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <\n+000f8d30: 783a 656c 743c 2f73 7061 6e3e 203c 7370 x:elt xmlns:x=&q\n+000f8d80: 756f 743b 6874 7470 3a2f 2f74 656d 7075 uot;http://tempu\n+000f8d90: 7269 2e6f 7267 2f61 2e78 7364 2671 756f ri.org/a.xsd&quo\n+000f8da0: 743b 3c2f 7370 616e 3e26 6774 3b2e 2e2e t;>...\n+000f8db0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </x\n+000f8dd0: 3a65 6c74 3c2f 7370 616e 3e26 6774 3b3c :elt><\n+000f8de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <elt\n+000f8e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 xmlns=\n+000f8e60: 2671 756f 743b 6874 7470 3a2f 2f74 656d "http://tem\n+000f8e70: 7075 7269 2e6f 7267 2f62 2e78 7364 2671 puri.org/b.xsd&q\n+000f8e80: 756f 743b 3c2f 7370 616e 3e26 6774 3b2e uot;>.\n+000f8e90: 2e2e 266c 743b 2f3c 7370 616e 2063 6c61 ..</elt><\n+000f8ec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <zzz:elt xmlns\n+000f8f20: 3a7a 7a7a 3c2f 7370 616e 3e3d 3c73 7061 :zzz=http://\n+000f8f50: 3c73 7061 6e20 636c 6173 733d 226b 6579 tempuri.or\n+000f8f70: 673c 2f73 7061 6e3e 2f3c 7370 616e 2063 g/c\n+000f8f90: 2e78 7364 3c2f 7370 616e 3e26 7175 6f74 .xsd"\n+000f8fa0: 3b26 6774 3b2e 2e2e 266c 743b 2f3c 7370 ;>...</zzz:elt>
    .\n+000f8fe0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    Instead of one \n+000f9010: 6269 6720 6e61 6d65 7370 6163 6520 7461 big namespace ta\n+000f9020: 626c 6520 7468 6174 2063 6f6e 7461 696e ble that contain\n+000f9030: 7320 616c 6c20 584d 4c20 6e61 6d65 7370 s all XML namesp\n+000f9040: 6163 6520 7072 6566 6978 6573 2077 6974 ace prefixes wit\n+000f9050: 6820 7468 6569 7220 5552 4973 2c20 7468 h their URIs, th\n+000f9060: 6572 6520 6172 6520 6361 7365 7320 7768 ere are cases wh\n+000f9070: 656e 2069 7420 6973 2064 6573 6972 6162 en it is desirab\n+000f9080: 6c65 2074 6f20 7573 6520 6d75 6c74 6970 le to use multip\n+000f9090: 6c65 206e 616d 6573 7061 6365 2074 6162 le namespace tab\n+000f90a0: 6c65 732c 206f 6e65 2066 6f72 2065 6163 les, one for eac\n+000f90b0: 6820 7365 7276 6963 652e 2054 6869 7320 h service. This \n+000f90c0: 6176 6f69 6473 206c 6561 6b69 6e67 206e avoids leaking n\n+000f90d0: 616d 6573 7061 6365 2070 7265 6669 7865 amespace prefixe\n+000f90e0: 7320 696e 2058 4d4c 206d 6573 7361 6765 s in XML message\n+000f90f0: 7320 7468 6174 2068 6176 6520 6e6f 7468 s that have noth\n+000f9100: 696e 6720 746f 2064 6f20 7769 7468 2074 ing to do with t\n+000f9110: 6865 2073 6572 7669 6365 2069 6e76 6f6b he service invok\n+000f9120: 6564 2e20 496e 2070 7269 6e63 6970 6c65 ed. In principle\n+000f9130: 2074 6865 7265 2069 7320 6e6f 2068 6172 there is no har\n+000f9140: 6d20 746f 206c 6561 6b20 7468 6573 6520 m to leak these \n+000f9150: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+000f9160: 6573 2c20 6275 7420 7468 6520 6d65 7373 es, but the mess\n+000f9170: 6167 6573 2061 7265 206c 6573 7320 636f ages are less co\n+000f9180: 6d70 6163 7420 616e 6420 6e6f 7420 6173 mpact and not as\n+000f9190: 2063 6c65 616e 2e20 546f 2075 7365 206d clean. To use m\n+000f91a0: 756c 7469 706c 6520 6e61 6d65 7370 6163 ultiple namespac\n+000f91b0: 6520 7461 626c 6573 2061 7420 7468 6520 e tables at the \n+000f91c0: 636c 6965 6e74 2073 6964 6520 6973 2064 client side is d\n+000f91d0: 6f6e 6520 6173 2066 6f6c 6c6f 7773 3a3c one as follows:<\n+000f91e0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    struct \n+000f9230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 Nam\n+000f9260: 6573 7061 6365 3c2f 613e 206e 616d 6573 espace names\n+000f9270: 7061 6365 7354 6162 6c65 315b 5d20 3d20 pacesTable1[] = \n+000f9280: 7b20 2e2e 2e20 7d3b 203c 2f64 6976 3e0a { ... };
    .\n+000f9290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000f92c0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>Namespace\n+000f9300: 206e 616d 6573 7061 6365 7354 6162 6c65 namespacesTable\n+000f9310: 325b 5d20 3d20 7b20 2e2e 2e20 7d3b 203c 2[] = { ... }; <\n+000f9320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+000f9350: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct Namespa\n+000f9390: 6365 3c2f 613e 206e 616d 6573 7061 6365 ce namespace\n+000f93a0: 7354 6162 6c65 335b 5d20 3d20 7b20 2e2e sTable3[] = { ..\n+000f93b0: 2e20 7d3b 203c 2f64 6976 3e0a 3c64 6976 . };
    .struct N\n+000f9420: 616d 6573 7061 6365 3c2f 613e 202a 3c61 amespace *namespaces<\n+000f9490: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    ...\n+000f94b0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    \n+000f9500: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+000f9540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000f9550: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+000f9560: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+000f9570: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    .<\n+000f95f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000f9600: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+000f9610: 705f 5f6e 616d 6573 7061 6365 2e68 746d p__namespace.htm\n+000f9620: 6c23 6761 3565 6339 3133 6163 6363 3730 l#ga5ec913accc70\n+000f9630: 3563 6361 3332 3936 6162 3735 6261 6539 5cca3296ab75bae9\n+000f9640: 3535 6135 223e 736f 6170 5f73 6574 5f6e 55a5\">soap_set_n\n+000f9650: 616d 6573 7061 6365 733c 2f61 3e28 3c61 amespaces(soap, n\n+000f9690: 616d 6573 7061 6365 5461 626c 6531 293b amespaceTable1);\n+000f96a0: 203c 7370 616e 2063 6c61 7373 3d22 636f // use th\n+000f96c0: 6520 6669 7273 7420 6e61 6d65 7370 6163 e first namespac\n+000f96d0: 6520 7461 626c 653c 2f73 7061 6e3e 3c2f e table.
    if (soap\n+000f9720: 5f63 616c 6c5f 7265 6d6f 7465 5f6d 6574 _call_remote_met\n+000f9730: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap<\n+000f9760: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, en\n+000f97b0: 6470 6f69 6e74 3c2f 613e 2c20 4163 7469 dpoint, Acti\n+000f97c0: 6f6e 2c20 2e2e 2e29 293c 2f64 6976 3e0a on, ...))
    .\n+000f97d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n+000f9800: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.

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

    .

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

    .

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

    .

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

    .

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

    .

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

    .
    <\n-00103b90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00103ba0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct SOAP_ENV__Detai\n-00103c00: 6c3c 2f61 3e20 3c2f 6469 763e 0a3c 6469 l
    .{\n-00103c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    const \n-00103c60: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *f__invali\n-00103c90: 643b 3c2f 6469 763e 0a3c 6469 7620 636c d;
    .
    <\n-00103cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00103cc0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00103cf0: 3c2f 7370 616e 3e20 2a66 5f5f 756e 6176 *f__unav\n-00103d00: 6169 6c61 626c 653b 3c2f 6469 763e 0a3c ailable;
    .<\n-00103d10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00103d20: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-00103d40: 6e74 3c2f 7370 616e 3e20 3c61 2063 6c61 nt __type\n-00103db0: 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 6976 ;
    . \n-00103dd0: 2020 3c73 7061 6e20 636c 6173 733d 226b void\n-00103df0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *fault;

    ..}\n-00103f60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    //gsoap ns serv\n-00103fa0: 6963 6520 6d65 7468 6f64 2d66 6175 6c74 ice method-fault\n-00103fb0: 3a20 6c6f 6769 6e20 665f 5f69 6e76 616c : login f__inval\n-00103fc0: 6964 203c 2f73 7061 6e3e 3c2f 6469 763e id
    \n-00103fd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-00104000: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n-00104010: 6f64 2d66 6175 6c74 3a20 6c6f 6769 6e20 od-fault: login \n-00104020: 665f 5f75 6e61 7661 696c 6162 6c65 203c f__unavailable <\n-00104030: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-00104050: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00104060: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__login(..\n-00104080: 2e29 3b3c 2f64 6976 3e0a 3c2f 6469 763e .);
    .
    \n-00104090: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

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

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

    .

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

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

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

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

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

    .

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

    .

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

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

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

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

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

    .

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

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

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

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

    .

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

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

      .
      <\n+00105d10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00105d20: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct claim__form f\n+00105d40: 6f72 6d31 2c20 666f 726d 323b 203c 2f64 orm1, form2; .
      form1.href\n+00105d70: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+00105d90: 7175 6f74 3b63 6964 3a63 6c61 696d 3036 quot;cid:claim06\n+00105da0: 3134 3030 612e 7469 6666 4063 6c61 696d 1400a.tiff@claim\n+00105db0: 696e 672d 6974 2e63 6f6d 2671 756f 743b ing-it.com"\n+00105dc0: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
      .\n+00105dd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      form2.href = <\n+00105df0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00105e00: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00105e10: 3b63 6964 3a63 6c61 696d 3036 3134 3030 ;cid:claim061400\n+00105e20: 612e 6a70 6567 4063 6c61 696d 696e 672d a.jpeg@claiming-\n+00105e30: 6974 2e63 6f6d 2671 756f 743b 3c2f 7370 it.com";
      ./* initializ\n+00105e80: 6520 616e 6420 656e 6162 6c65 204d 494d e and enable MIM\n+00105e90: 4520 2a2f 3c2f 7370 616e 3e20 3c2f 6469 E */ .
      soap_set_\n+00105f10: 6d69 6d65 3c2f 613e 283c 6120 636c 6173 mime(\n+00105f40: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n+00105f50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00105f70: 743b 266c 743b 636c 6169 6d30 3631 3430 t;<claim06140\n+00105f80: 3061 2e78 6d6c 4063 6c61 696d 696e 672d 0a.xml@claiming-\n+00105f90: 6974 2e63 6f6d 2667 743b 2671 756f 743b it.com>"\n+00105fa0: 3c2f 7370 616e 3e29 3b20 3c2f 6469 763e );
      \n+00105fb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      /* add \n+00105fe0: 6120 6261 7365 3634 2065 6e63 6f64 6564 a base64 encoded\n+00105ff0: 2074 6966 6620 696d 6167 6520 2874 6966 tiff image (tif\n+00106000: 6649 6d61 6765 2070 6f69 6e74 7320 746f fImage points to\n+00106010: 2062 6173 6536 3420 6461 7461 2920 2a2f base64 data) */\n+00106020: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
      .<\n+00106030: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00106040: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_mime\n+001060a0: 5f61 7474 6163 686d 656e 743c 2f61 3e28 _attachment(\n+001060b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001060e0: 2074 6966 6649 6d61 6765 2c20 7469 6666 tiffImage, tiff\n+001060f0: 4c65 6e2c 203c 6120 636c 6173 733d 2263 Len, SOAP_MI\n+00106170: 4d45 5f42 4153 4536 343c 2f61 3e2c 203c ME_BASE64, <\n+00106180: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00106190: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001061a0: 3b69 6d61 6765 2f74 6966 6626 7175 6f74 ;image/tiff"\n+001061b0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "<\n+001061e0: 636c 6169 6d30 3631 3430 3061 2e74 6966 claim061400a.tif\n+001061f0: 6640 636c 6169 6d69 6e67 2d69 742e 636f f@claiming-it.co\n+00106200: 6d26 6774 3b26 7175 6f74 3b3c 2f73 7061 m>", NULL, NULL);\n+00106220: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+00106250: 2f2a 2061 6464 2061 2072 6177 2062 696e /* add a raw bin\n+00106260: 6172 7920 6a70 6567 2069 6d61 6765 2028 ary jpeg image (\n+00106270: 6a70 6567 496d 6167 6520 706f 696e 7473 jpegImage points\n+00106280: 2074 6f20 7261 7720 6461 7461 2920 2a2f to raw data) */\n+00106290: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
      .<\n+001062a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001062b0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_mime\n+00106310: 5f61 7474 6163 686d 656e 743c 2f61 3e28 _attachment(\n+00106320: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00106350: 206a 7065 6749 6d61 6765 2c20 6a70 6567 jpegImage, jpeg\n+00106360: 4c65 6e2c 203c 6120 636c 6173 733d 2263 Len, SOAP_MI\n+001063e0: 4d45 5f42 494e 4152 593c 2f61 3e2c 203c ME_BINARY, <\n+001063f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00106400: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00106410: 3b69 6d61 6765 2f6a 7065 6726 7175 6f74 ;image/jpeg"\n+00106420: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "<\n+00106450: 636c 6169 6d30 3631 3430 3061 2e6a 7065 claim061400a.jpe\n+00106460: 6740 636c 6169 6d69 6e67 2d69 742e 636f g@claiming-it.co\n+00106470: 6d26 6774 3b26 7175 6f74 3b3c 2f73 7061 m>", NULL, NULL);\n+00106490: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61

    .
    \n+001064c0: 2f2a 2073 656e 6420 7468 6520 666f 726d /* send the form\n+001064d0: 7320 6173 204d 494d 4520 6174 7461 6368 s as MIME attach\n+001064e0: 6d65 6e74 7320 7769 7468 2074 6869 7320 ments with this \n+001064f0: 696e 766f 6361 7469 6f6e 202a 2f3c 2f73 invocation */
    .if (soap_call_cla\n+00106550: 696d 5f5f 696e 7375 7261 6e63 655f 636c im__insurance_cl\n+00106560: 6169 6d5f 6175 746f 283c 6120 636c 6173 aim_auto(\n+00106590: 736f 6170 3c2f 613e 2c20 666f 726d 312c soap, form1,\n+001065a0: 2066 6f72 6d32 2c20 2e2e 2e29 2920 3c2f form2, ...)) .
    ... // an error o\n+001065f0: 6363 7572 7265 6420 3c2f 7370 616e 3e3c ccurred <\n+00106600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else .
    ... // process th\n+00106680: 6520 7265 7370 6f6e 7365 3c2f 7370 616e e response
    .
    soap\n+00106700: 5f63 6c72 5f6d 696d 653c 2f61 3e28 3c61 _clr_mime(soap);<\n+00106740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_mime_a\n+00106800: 7474 6163 686d 656e 743c 2f61 3e3c 2f64 ttachment
    int soap_\n+00106830: 7365 745f 6d69 6d65 5f61 7474 6163 686d set_mime_attachm\n+00106840: 656e 7428 7374 7275 6374 2073 6f61 7020 ent(struct soap \n+00106850: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+00106860: 7220 2a70 7472 2c20 7369 7a65 5f74 2073 r *ptr, size_t s\n+00106870: 697a 652c 2065 6e75 6d20 736f 6170 5f6d ize, enum soap_m\n+00106880: 696d 655f 656e 636f 6469 6e67 2065 6e63 ime_encoding enc\n+00106890: 6f64 696e 672c 2063 6f6e 7374 2063 6861 oding, const cha\n+001068a0: 7220 2a74 7970 652c 2063 6f6e 7374 2063 r *type, const c\n+001068b0: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c\n+001068c0: 6861 7220 2a6c 6f63 6174 696f 6e2c 2063 har *location, c\n+001068d0: 6f6e 7374 2063 6861 7220 2a64 6573 6372 onst char *descr\n+001068e0: 6970 7469 6f6e 293c 2f64 6976 3e3c 6469 iption)
    \n+00106900: 4164 6420 6120 4d49 4d45 2061 7474 6163 Add a MIME attac\n+00106910: 686d 656e 7420 746f 2074 6865 2053 4f41 hment to the SOA\n+00106920: 502f 584d 4c20 6d65 7373 6167 652e 3c2f P/XML message.
    .void soap_clr_m\n+00106a20: 696d 6528 7374 7275 6374 2073 6f61 7020 ime(struct soap \n+00106a30: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    D\n+00106a50: 6973 6162 6c65 204d 494d 4520 6174 7461 isable MIME atta\n+00106a60: 6368 6d65 6e74 732e 3c2f 6469 763e 3c2f chments.
    .<\n+00106bd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00106ce0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00106cf0: 6922 3e40 2053 4f41 505f 4d49 4d45 5f42 i\">@ SOAP_MIME_B\n+00106d00: 4153 4536 343c 2f64 6976 3e3c 6469 7620 ASE64
    da\n+00106d20: 7461 2069 7320 666f 726d 6174 7465 6420 ta is formatted \n+00106d30: 696e 2062 6173 6536 343c 2f64 6976 3e3c in base64
    <\n+00106d40: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00106d50: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00106d60: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00106d70: 3130 3232 393c 2f64 6976 3e3c 2f64 6976 10229
    .
    @\n+00106ea0: 2053 4f41 505f 4d49 4d45 5f42 494e 4152 SOAP_MIME_BINAR\n+00106eb0: 593c 2f64 6976 3e3c 6469 7620 636c 6173 Y
    binary\n+00106ed0: 2072 6177 2064 6174 6120 636f 6e74 656e raw data conten\n+00106ee0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    Def\n+00106f00: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00106f10: 736f 6170 322e 683a 3130 3232 373c 2f64 soap2.h:10227
    .
    \n+00106f30: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

    .

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

    .

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

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

    .

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

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

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

    int \n-001080c0: 6e20 3d20 303b 3c2f 6469 763e 0a3c 6469 n = 0;
    .<\n-001080e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001080f0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap_multip\n-00108140: 6172 743c 2f61 3e20 2a61 7474 6163 686d art *attachm\n-00108150: 656e 743b 3c2f 6469 763e 0a3c 6469 7620 ent;
    .
    for (attachment = \n-001081a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001081d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >mim\n-00108220: 653c 2f61 3e2e 3c61 2063 6c61 7373 3d22 e.list; a\n-00108280: 7474 6163 686d 656e 743b 2061 7474 6163 ttachment; attac\n-00108290: 686d 656e 7420 3d20 6174 7461 6368 6d65 hment = attachme\n-001082a0: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->next<\n-00108300: 2f61 3e29 3c2f 6469 763e 0a3c 6469 7620 /a>)
    .
    {.
    ++n;.
    printf(<\n-00108360: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00108370: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00108380: 3b50 6172 7420 2564 3a5c 6e26 7175 6f74 ;Part %d:\\n"\n-00108390: 3b3c 2f73 7061 6e3e 2c20 6e29 3b3c 2f64 ;, n);.
    printf(<\n-001083c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001083d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-001083e0: 3b70 7472 2020 2020 2020 2020 3d25 705c ;ptr =%p\\\n-001083f0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-00108400: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment-><\n-00108410: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00108420: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n-00108430: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n-00108440: 6136 3430 6634 3662 3630 3530 3432 6633 a640f46b605042f3\n-00108450: 3761 6531 3539 3266 3737 6533 3163 3532 7ae1592f77e31c52\n-00108460: 6422 3e70 7472 3c2f 613e 293b 3c2f 6469 d\">ptr);.
    printf("\n-001084b0: 7369 7a65 2020 2020 2020 203d 2575 6c5c size =%ul\\\n-001084c0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-001084d0: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment-><\n-001084e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001084f0: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n-00108500: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n-00108510: 6166 6334 6236 3966 3565 3961 6465 3635 afc4b69f5e9ade65\n-00108520: 3236 6232 3336 3831 6331 3035 6435 6361 26b23681c105d5ca\n-00108530: 3522 3e73 697a 653c 2f61 3e29 3b3c 2f64 5\">size);.
    printf(<\n-00108560: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00108570: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00108580: 3b69 6420 2020 2020 2020 2020 3d25 735c ;id =%s\\\n-00108590: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-001085a0: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment-><\n-001085b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001085c0: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n-001085d0: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n-001085e0: 6164 3062 6364 3739 6234 3061 3162 6331 ad0bcd79b40a1bc1\n-001085f0: 6463 3133 6663 3334 3334 3737 6635 3536 dc13fc343477f556\n-00108600: 3422 3e69 643c 2f61 3e20 3f20 6174 7461 4\">id ? atta\n-00108610: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->i\n-00108670: 643c 2f61 3e20 3a20 3c73 7061 6e20 636c d : ""\n-001086a0: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    .\n-001086b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("typ\n-001086f0: 6520 2020 2020 2020 3d25 735c 6e26 7175 e =%s\\n&qu\n-00108700: 6f74 3b3c 2f73 7061 6e3e 2c20 6174 7461 ot;, atta\n-00108710: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->t\n-00108770: 7970 653c 2f61 3e20 3f20 6174 7461 6368 ype ? attach\n-00108780: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->typ\n-001087e0: 653c 2f61 3e20 3a20 3c73 7061 6e20 636c e : ""\n-00108810: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    .\n-00108820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("loc\n-00108860: 6174 696f 6e20 2020 3d25 735c 6e26 7175 ation =%s\\n&qu\n-00108870: 6f74 3b3c 2f73 7061 6e3e 2c20 6174 7461 ot;, atta\n-00108880: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->l\n-001088e0: 6f63 6174 696f 6e3c 2f61 3e20 3f20 6174 ocation ? at\n-001088f0: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->location : \n-00108960: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00108980: 743b 2671 756f 743b 3c2f 7370 616e 3e29 t;")\n-00108990: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    prin\n-001089b0: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n-001089d0: 7175 6f74 3b64 6573 6372 6970 7469 6f6e quot;description\n-001089e0: 3d25 735c 6e26 7175 6f74 3b3c 2f73 7061 =%s\\n", attachment-&\n-00108a00: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;descripti\n-00108a60: 6f6e 3c2f 613e 203f 2061 7474 6163 686d on ? attachm\n-00108a70: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->desc\n-00108ad0: 7269 7074 696f 6e3c 2f61 3e20 3a20 3c73 ription : "\n-00108b00: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");<\n+00107020: 6e65 223e 2020 4020 3c73 7061 6e20 636c ne\"> @ char *h\n+00107050: 7265 663b 203c 2f64 6976 3e0a 3c64 6976 ref;
    .};\n+00107070: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The claim forms\n+001070a0: 2069 6e20 7468 6520 6d65 7373 6167 6520 in the message \n+001070b0: 636f 6e73 6973 7420 6f66 203c 656d 3e3c consist of <\n+001070c0: 636f 6465 3e68 7265 663c 2f63 6f64 653e code>href\n+001070d0: 3c2f 656d 3e73 2074 6f20 7468 6520 636c s to the cl\n+001070e0: 6169 6d20 666f 726d 7320 6174 7461 6368 aim forms attach\n+001070f0: 6564 2e20 5468 6520 7573 6520 6f66 203c ed. The use of <\n+00107100: 656d 3e3c 636f 6465 3e68 7265 663c 2f63 em>href
    or oth\n+00107120: 6572 2061 7474 7269 6275 7465 7320 666f er attributes fo\n+00107130: 7220 7265 6665 7272 696e 6720 746f 2074 r referring to t\n+00107140: 6865 204d 494d 4520 6174 7461 6368 6d65 he MIME attachme\n+00107150: 6e74 7320 6973 206f 7074 696f 6e61 6c20 nts is optional \n+00107160: 6163 636f 7264 696e 6720 746f 2074 6865 according to the\n+00107170: 2053 7741 2073 7461 6e64 6172 642e 204d SwA standard. M\n+00107180: 544f 4d20 6f6e 2074 6865 206f 7468 6572 TOM on the other\n+00107190: 2068 616e 6420 6d61 6e64 6174 6573 2074 hand mandates t\n+001071a0: 6865 2075 7365 206f 6620 3c65 6d3e 3c63 he use of href<\n+001071c0: 2f65 6d3e 2077 6974 6820 584f 5020 656c /em> with XOP el\n+001071d0: 656d 656e 7473 2e3c 2f70 3e0a 3c70 3e54 ements.

    .

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

    .

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

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

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

    .

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

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

    .

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

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

    MIME Content-Lo\n-00109640: 6361 7469 6f6e 2028 6f70 7469 6f6e 616c cation (optional\n-00109650: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Def\n-00109670: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-00109680: 736f 6170 322e 683a 3130 3433 383c 2f64 soap2.h:10438
    .s\n-001097a0: 697a 6520 6f66 2064 6174 6120 636f 6e74 ize of data cont\n-001097b0: 656e 743c 2f64 6976 3e3c 6469 7620 636c ent
    .
    .

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

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

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

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

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

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

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

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

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

    .

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

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

    .

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

    .

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

    .

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

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

    .

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

    .

    .
    soap\n+0010cb30: 5f6d 756c 7469 7061 7274 3a3a 6974 6572 _multipart::iter\n+0010cb40: 6174 6f72 2062 6567 696e 2829 3c2f 6469 ator begin()
    C++ only: a\n+0010cb70: 6e20 6974 6572 6174 6f72 206f 7665 7220 n iterator over \n+0010cb80: 736f 6170 5f6d 756c 7469 7061 7274 2061 soap_multipart a\n+0010cb90: 7474 6163 686d 656e 7473 2e3c 2f64 6976 ttachments.
    .
    soa\n+0010cc50: 705f 6469 6d65 3a3a 656e 643c 2f61 3e3c p_dime::end<\n+0010cc60: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_mu\n+0010cc80: 6c74 6970 6172 743a 3a69 7465 7261 746f ltipart::iterato\n+0010cc90: 7220 656e 6428 293c 2f64 6976 3e3c 6469 r end()
    \n+0010ccb0: 432b 2b20 6f6e 6c79 3a20 616e 2069 7465 C++ only: an ite\n+0010ccc0: 7261 746f 7220 6f76 6572 2073 6f61 705f rator over soap_\n+0010ccd0: 6d75 6c74 6970 6172 7420 6174 7461 6368 multipart attach\n+0010cce0: 6d65 6e74 732e 3c2f 6469 763e 3c2f 6469 ments.
    .

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

    .

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

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

    .

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

    .

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

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

    ..
    xsd__base64Bin\n-0010df40: 6172 793a 3a6f 7074 696f 6e73 3c2f 613e ary::options\n-0010df50: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    char *\n-0010df70: 206f 7074 696f 6e73 3c2f 6469 763e 3c64 options
    extra member: D\n-0010dfa0: 494d 4520 6f70 7469 6f6e 7320 6f72 2061 IME options or a\n-0010dfb0: 2064 6573 6372 6970 7469 6f6e 206f 6620 description of \n-0010dfc0: 7468 6520 4d49 4d45 2061 7474 6163 686d the MIME attachm\n-0010dfd0: 656e 7420 6f72 204e 554c 4c3c 2f64 6976 ent or NULL
    Definitio\n-0010e000: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-0010e010: 683a 3938 3432 3c2f 6469 763e 3c2f 6469 h:9842
    .
    c\n-0010e110: 6861 7220 2a20 6964 3c2f 6469 763e 3c64 har * id
    extra member: N\n-0010e140: 554c 4c20 746f 2067 656e 6572 6174 6520 ULL to generate \n-0010e150: 616e 2069 6420 6f72 2061 7373 6967 6e20 an id or assign \n-0010e160: 7468 6973 206d 656d 6265 7220 7661 7269 this member vari\n-0010e170: 6162 6c65 2061 2075 6e69 7175 6520 5555 able a unique UU\n-0010e180: 4944 3c2f 6469 763e 3c64 6976 2063 6c61 ID
    De\n-0010e1a0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0010e1b0: 6473 6f61 7032 2e68 3a39 3834 303c 2f64 dsoap2.h:9840
    .
    xsd__base64Bi\n-0010e290: 6e61 7279 3a3a 7479 7065 3c2f 613e 3c2f nary::type
    char * t\n-0010e2c0: 7970 653c 2f64 6976 3e3c 6469 7620 636c ype
    extr\n-0010e2e0: 6120 6d65 6d62 6572 3a20 4d49 4d45 2074 a member: MIME t\n-0010e2f0: 7970 6520 6f66 2074 6865 2064 6174 613c ype of the data<\n-0010e300: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0010e320: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0010e330: 6170 322e 683a 3938 3431 3c2f 6469 763e ap2.h:9841
    \n-0010e340: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The id member is f\n-0010e380: 6f72 2061 7474 6163 686d 656e 7420 7265 or attachment re\n-0010e390: 6665 7265 6e63 696e 672c 2074 7970 6963 ferencing, typic\n-0010e3a0: 616c 6c79 2061 2063 6f6e 7465 6e74 2069 ally a content i\n-0010e3b0: 6420 2843 4944 2920 6f72 2061 2055 5549 d (CID) or a UUI\n-0010e3c0: 4420 7768 6963 6820 6361 6e20 6265 206f D which can be o\n-0010e3d0: 6274 6169 6e65 6420 7769 7468 203c 636f btained with soap_rand_uu\n-0010e470: 6964 3c2f 613e 3c2f 636f 6465 3e2c 2061 id, a\n-0010e480: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type member is use\n-0010e4a0: 6420 746f 2073 7065 6369 6679 2074 6865 d to specify the\n-0010e4b0: 204d 494d 4520 7479 7065 206f 6620 7468 MIME type of th\n-0010e4c0: 6520 6461 7461 2c20 7468 6520 3c63 6f64 e data, the options\n-0010e4e0: 206d 656d 6265 7220 6973 2075 7365 6420 member is used \n-0010e4f0: 746f 2070 6967 6779 2d62 6163 6b20 6164 to piggy-back ad\n-0010e500: 6469 7469 6f6e 616c 2069 6e66 6f72 6d61 ditional informa\n-0010e510: 7469 6f6e 2077 6974 6820 6120 4449 4d45 tion with a DIME\n-0010e520: 2061 7474 6163 686d 656e 742e 2054 6865 attachment. The\n-0010e530: 206f 7264 6572 206f 6620 7468 6520 6465 order of the de\n-0010e540: 636c 6172 6174 696f 6e20 6f66 2074 6865 claration of the\n-0010e550: 206d 656d 6265 7273 2069 7320 7369 676e members is sign\n-0010e560: 6966 6963 616e 742e 2049 6e20 6164 6469 ificant. In addi\n-0010e570: 7469 6f6e 2c20 6e6f 206f 7468 6572 206d tion, no other m\n-0010e580: 656d 6265 7273 206f 7220 6d65 7468 6f64 embers or method\n-0010e590: 7320 6d61 7920 6265 2064 6563 6c61 7265 s may be declare\n-0010e5a0: 6420 6265 666f 7265 2061 6e79 206f 6620 d before any of \n-0010e5b0: 7468 6573 6520 6d65 6d62 6572 7320 696e these members in\n-0010e5c0: 2074 6865 2073 7472 7563 742f 636c 6173 the struct/clas\n-0010e5d0: 732c 2062 7574 2061 6464 6974 696f 6e61 s, but additiona\n-0010e5e0: 6c20 6d65 6d62 6572 7320 616e 6420 6d65 l members and me\n-0010e5f0: 7468 6f64 7320 6d61 7920 6170 7065 6172 thods may appear\n-0010e600: 2061 6674 6572 2074 6865 206d 656d 6265 after the membe\n-0010e610: 7220 6465 636c 6172 6174 696f 6e73 2e20 r declarations. \n-0010e620: 5468 6520 6578 7465 6e64 6564 203c 636f The extended xsd__\n-0010e6a0: 6865 7842 696e 6172 793c 2f61 3e3c 2f63 hexBinary type is sim\n-0010e6c0: 696c 6172 2e3c 2f70 3e0a 3c70 3e54 6865 ilar.

    .

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

    .

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

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

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

    .

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

    .

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

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

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

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

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

    .

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

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

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

    .

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

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

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

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

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

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

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

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

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

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

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

    .

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

    .

    S\n-00110750: 7472 6561 6d69 6e67 2044 494d 4520 6973 treaming DIME is\n-00110760: 2061 6368 6965 7665 6420 7769 7468 2063 achieved with c\n-00110770: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function\n-00110780: 7320 746f 2066 6574 6368 2061 6e64 2073 s to fetch and s\n-00110790: 746f 7265 2064 6174 6120 6475 7269 6e67 tore data during\n-001107a0: 2074 7261 6e73 6d69 7373 696f 6e2e 2054 transmission. T\n-001107b0: 6872 6565 2066 756e 6374 696f 6e20 6361 hree function ca\n-001107c0: 6c6c 6261 636b 7320 666f 7220 7374 7265 llbacks for stre\n-001107d0: 616d 696e 6720 4449 4d45 206f 7574 7075 aming DIME outpu\n-001107e0: 7420 616e 6420 7468 7265 6520 6361 6c6c t and three call\n-001107f0: 6261 636b 7320 666f 7220 7374 7265 616d backs for stream\n-00110800: 696e 6720 4449 4d45 2069 6e70 7574 2061 ing DIME input a\n-00110810: 7265 2061 7661 696c 6162 6c65 2e3c 2f70 re available..

      .
    • void *(*soap.fd\n-00110840: 696d 6572 6561 646f 7065 6e29 2873 7472 imereadopen)(str\n-00110850: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-00110860: 766f 6964 202a 6861 6e64 6c65 2c20 636f void *handle, co\n-00110870: 6e73 7420 6368 6172 202a 6964 2c20 636f nst char *id, co\n-00110880: 6e73 7420 6368 6172 202a 7479 7065 2c20 nst char *type, \n-00110890: 636f 6e73 7420 6368 6172 202a 6f70 7469 const char *opti\n-001108a0: 6f6e 7329 3c2f 636f 6465 3e20 5468 6973 ons) This\n-001108b0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-001108c0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin\n-001108d0: 6520 746f 2073 7461 7274 2073 656e 6469 e to start sendi\n-001108e0: 6e67 2061 2073 7472 6561 6d69 6e67 2044 ng a streaming D\n-001108f0: 494d 4520 6174 7461 6368 6d65 6e74 2e20 IME attachment. \n-00110900: 5468 6973 2063 616c 6c62 6163 6b20 6f70 This callback op\n-00110910: 656e 7320 6120 7374 7265 616d 2074 6f20 ens a stream to \n-00110920: 7374 6172 7420 7265 6164 696e 6720 7468 start reading th\n-00110930: 6520 6174 7461 6368 6d65 6e74 2064 6174 e attachment dat\n-00110940: 6120 746f 2073 656e 642e 2054 6865 2061 a to send. The a\n-00110950: 6374 7561 6c20 6461 7461 2073 7472 6561 ctual data strea\n-00110960: 6d20 7769 6c6c 2062 6520 7265 6164 2069 m will be read i\n-00110970: 6e20 6368 756e 6b73 2075 7369 6e67 2074 n chunks using t\n-00110980: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::f\n-00110a20: 6469 6d65 7265 6164 3c2f 613e 3c2f 636f dimeread callback unt\n-00110a40: 696c 206e 6f20 6d6f 7265 2064 6174 6120 il no more data \n-00110a50: 6973 2061 7661 696c 6162 6c65 2061 6e64 is available and\n-00110a60: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::fdimerea\n-00110b10: 6463 6c6f 7365 3c2f 613e 3c2f 636f 6465 dclose callback is ca\n-00110b30: 6c6c 6564 2074 6f20 636c 6f73 6520 7468 lled to close th\n-00110b40: 6520 7374 7265 616d 2e20 5468 6520 3c63 e stream. The handle parameter cont\n-00110b70: 6169 6e73 2074 6865 2076 616c 7565 206f ains the value o\n-00110b80: 6620 7468 6520 3c63 6f64 653e 5f5f 7074 f the __pt\n-00110b90: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member \n-00110ba0: 7661 7269 6162 6c65 206f 6620 7468 6520 variable of the \n-00110bb0: 6174 7461 6368 6d65 6e74 2073 7472 7563 attachment struc\n-00110bc0: 742f 636c 6173 7320 7769 7468 2064 6174 t/class with dat\n-00110bd0: 6120 2865 2e67 2e20 3c63 6f64 653e 3c61 a (e.g. xsd_\n-00110c50: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary or _xop__In\n-00110ce0: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude\n-00110cf0: 2077 6974 6820 3c63 6f64 653e 5f5f 7074 with __pt\n-00110d00: 723c 2f63 6f64 653e 2c20 3c63 6f64 653e r, \n-00110d10: 5f5f 7369 7a65 3c2f 636f 6465 3e2c 203c __size, <\n-00110d20: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, \n-00110d30: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti\n-00110d50: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe\n-00110d60: 7273 292c 2077 6869 6368 2073 686f 756c rs), which shoul\n-00110d70: 6420 6265 2061 2070 6f69 6e74 6572 2074 d be a pointer t\n-00110d80: 6f20 7370 6563 6966 6963 2069 6e66 6f72 o specific infor\n-00110d90: 6d61 7469 6f6e 2073 7563 6820 6173 2061 mation such as a\n-00110da0: 2066 696c 6520 6465 7363 7269 7074 6f72 file descriptor\n-00110db0: 206f 7220 6120 706f 696e 7465 7220 746f or a pointer to\n-00110dc0: 2061 2073 6f6d 6520 6170 706c 6963 6174 a some applicat\n-00110dd0: 696f 6e2d 7370 6563 6966 6963 2064 6174 ion-specific dat\n-00110de0: 6120 746f 2062 6520 7061 7373 6564 2074 a to be passed t\n-00110df0: 6f20 7468 6973 2063 616c 6c62 6163 6b2e o this callback.\n-00110e00: 2042 6f74 6820 7468 6520 3c63 6f64 653e Both the \n-00110e10: 5f5f 7074 723c 2f63 6f64 653e 2061 6e64 __ptr and\n-00110e20: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size members of \n-00110e40: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s\n-00110e50: 7472 7563 742f 636c 6173 7320 7368 6f75 truct/class shou\n-00110e60: 6c64 2068 6176 6520 6265 656e 2073 6574 ld have been set\n-00110e70: 2062 7920 7468 6520 6170 706c 6963 6174 by the applicat\n-00110e80: 696f 6e20 7072 696f 7220 746f 2074 6865 ion prior to the\n-00110e90: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n-00110ea0: 6620 7468 6520 6d65 7373 6167 6520 7769 f the message wi\n-00110eb0: 7468 2061 7474 6163 686d 656e 7473 2e20 th attachments. \n-00110ec0: 4966 2074 6865 203c 636f 6465 3e5f 5f73 If the __s\n-00110ed0: 697a 653c 2f63 6f64 653e 2069 7320 7a65 ize is ze\n-00110ee0: 726f 2061 6e64 2048 5454 5020 6368 756e ro and HTTP chun\n-00110ef0: 6b69 6e67 2069 7320 656e 6162 6c65 6420 king is enabled \n-00110f00: 2877 6974 6820 3c63 6f64 653e 2353 4f41 (with #SOA\n-00110f10: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK), then chunked\n-00110f30: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-00110f40: 7320 6172 6520 7365 6e74 2c20 7365 6520 s are sent, see \n-00110f50: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fdim\n-00110ff0: 6572 6561 643c 2f61 3e3c 2f63 6f64 653e eread\n-00111000: 2e20 5468 6520 3c63 6f64 653e 6964 3c2f . The id, typ\n-00111020: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and options parameters are\n-00111050: 2074 6865 203c 636f 6465 3e69 643c 2f63 the id (optional I\n-00111070: 4429 2c20 3c63 6f64 653e 7479 7065 3c2f D), type (a MIME ty\n-00111090: 7065 2920 616e 6420 3c63 6f64 653e 6f70 pe) and op\n-001110a0: 7469 6f6e 733c 2f63 6f64 653e 2028 4449 tions (DI\n-001110b0: 4d45 206f 7074 696f 6e73 2061 7265 2073 ME options are s\n-001110c0: 6574 2077 6974 6820 3c63 6f64 653e 3c61 et with soa\n-00111140: 705f 6469 6d65 5f6f 7074 696f 6e3c 2f61 p_dime_option) of the\n-00111160: 2061 7474 6163 686d 656e 7420 7374 7275 attachment stru\n-00111170: 6374 2f63 6c61 7373 2c20 7265 7370 6563 ct/class, respec\n-00111180: 7469 7665 6c79 2c20 6f66 2077 6869 6368 tively, of which\n-00111190: 2061 7420 6c65 6173 7420 6f6e 6520 6d65 at least one me\n-001111a0: 6d62 6572 2073 686f 756c 6420 6265 206e mber should be n\n-001111b0: 6f6e 2d4e 554c 4c2e 2054 6865 2063 616c on-NULL. The cal\n-001111c0: 6c62 6163 6b20 7368 6f75 6c64 2072 6574 lback should ret\n-001111d0: 7572 6e20 7468 6520 3c63 6f64 653e 6861 urn the ha\n-001111e0: 6e64 6c65 3c2f 636f 6465 3e20 7061 7261 ndle para\n-001111f0: 6d65 7465 7220 7661 6c75 6520 6f72 2061 meter value or a\n-00111200: 6e6f 7468 6572 2070 6f69 6e74 6572 2076 nother pointer v\n-00111210: 616c 7565 2c20 7768 6963 6820 6973 2070 alue, which is p\n-00111220: 6173 7365 6420 6173 2074 6865 206e 6577 assed as the new\n-00111230: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter t\n-00111250: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fd\n-001112f0: 696d 6572 6561 643c 2f61 3e3c 2f63 6f64 imeread and soap::fdimer\n-001113b0: 6561 6463 6c6f 7365 3c2f 613e 3c2f 636f eadclose callbacks. W\n-001113d0: 6865 6e20 616e 2065 7272 6f72 206f 6363 hen an error occ\n-001113e0: 7572 7265 6420 696e 2074 6869 7320 6361 urred in this ca\n-001113f0: 6c6c 6261 636b 2c20 7468 6520 6361 6c6c llback, the call\n-00111400: 6261 636b 2073 686f 756c 6420 7265 7475 back should retu\n-00111410: 726e 204e 554c 4c20 616e 6420 7365 7420 rn NULL and set \n-00111420: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n-001114d0: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error to an error c\n-001114f0: 6f64 652c 2065 2e67 2e20 7573 696e 6720 ode, e.g. using \n-00111500: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_recei\n-001115b0: 7665 725f 6661 756c 743c 2f61 3e3c 2f63 ver_fault. The callba\n-001115d0: 636b 206d 6179 2072 6574 7572 6e20 4e55 ck may return NU\n-001115e0: 4c4c 2061 6e64 2073 6574 203c 636f 6465 LL and set soap::err\n-001116a0: 6f72 3c2f 613e 3c2f 636f 6465 3e20 746f or to\n-001116b0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n-001116c0: 2f63 6f64 653e 2077 6865 6e20 7468 6973 /code> when this\n-001116d0: 2073 7065 6369 6669 6320 4449 4d45 2061 specific DIME a\n-001116e0: 7474 6163 686d 656e 7420 7368 6f75 6c64 ttachment should\n-001116f0: 206e 6f74 2074 6f20 6265 2073 7472 6561 not to be strea\n-00111700: 6d65 6420 616e 6420 7468 6520 656e 6769 med and the engi\n-00111710: 6e65 2077 696c 6c20 7369 6d70 6c79 2073 ne will simply s\n-00111720: 6b69 7020 6974 2e3c 2f6c 693e 0a3c 6c69 kip it.
    • .size_t (*\n-00111740: 736f 6170 2e66 6469 6d65 7265 6164 2928 soap.fdimeread)(\n-00111750: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00111760: 702c 2076 6f69 6420 2a68 616e 646c 652c p, void *handle,\n-00111770: 2063 6861 7220 2a62 7566 2c20 7369 7a65 char *buf, size\n-00111780: 5f74 206c 656e 293c 2f63 6f64 653e 2054 _t len) T\n-00111790: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-001117a0: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en\n-001117b0: 6769 6e65 2074 6f20 7265 6164 2061 2063 gine to read a c\n-001117c0: 6875 6e6b 206f 6620 6174 7461 6368 6d65 hunk of attachme\n-001117d0: 6e74 2064 6174 6120 746f 2074 7261 6e73 nt data to trans\n-001117e0: 6d69 742e 2054 6865 203c 636f 6465 3e68 mit. The h\n-001117f0: 616e 646c 653c 2f63 6f64 653e 2070 6172 andle par\n-00111800: 616d 6574 6572 2063 6f6e 7461 696e 7320 ameter contains \n-00111810: 7468 6520 6861 6e64 6c65 2072 6574 7572 the handle retur\n-00111820: 6e65 6420 6279 2074 6865 203c 636f 6465 ned by the soap::fd\n-001118d0: 696d 6572 6561 646f 7065 6e3c 2f61 3e3c imereadopen<\n-001118e0: 2f63 6f64 653e 2063 616c 6c62 6163 6b2e /code> callback.\n-001118f0: 2054 6865 203c 636f 6465 3e62 7566 3c2f The buf parameter \n-00111910: 6973 2074 6865 2062 7566 6665 7220 6f66 is the buffer of\n-00111920: 206c 656e 6774 6820 3c63 6f64 653e 6c65 length le\n-00111930: 6e3c 2f63 6f64 653e 2069 6e74 6f20 7768 n into wh\n-00111940: 6963 6820 6120 6368 756e 6b20 6f66 2064 ich a chunk of d\n-00111950: 6174 6120 7368 6f75 6c64 2062 6520 7772 ata should be wr\n-00111960: 6974 7465 6e20 6279 2074 6865 2063 616c itten by the cal\n-00111970: 6c62 6163 6b2e 2054 6865 2061 6374 7561 lback. The actua\n-00111980: 6c20 616d 6f75 6e74 206f 6620 6461 7461 l amount of data\n-00111990: 2077 7269 7474 656e 2069 6e74 6f20 7468 written into th\n-001119a0: 6520 6275 6666 6572 206d 6179 2062 6520 e buffer may be \n-001119b0: 6c65 7373 2074 6861 6e20 3c63 6f64 653e less than \n-001119c0: 6c65 6e3c 2f63 6f64 653e 2061 6e64 2074 len and t\n-001119d0: 6869 7320 6163 7475 616c 2061 6d6f 756e his actual amoun\n-001119e0: 7420 7368 6f75 6c64 2062 6520 7265 7475 t should be retu\n-001119f0: 726e 6564 2062 7920 7468 6520 6361 6c6c rned by the call\n-00111a00: 6261 636b 2e20 4120 7265 7475 726e 2076 back. A return v\n-00111a10: 616c 7565 206f 6620 7a65 726f 2069 6e64 alue of zero ind\n-00111a20: 6963 6174 6573 2061 6e20 6572 726f 7220 icates an error \n-00111a30: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and \n-00111ae0: 736f 6170 3a3a 6572 726f 723c 2f61 3e3c soap::error<\n-00111af0: 2f63 6f64 653e 2073 686f 756c 6420 6265 /code> should be\n-00111b00: 2073 6574 2e20 5468 6520 3c63 6f64 653e set. The \n-00111b10: 5f5f 7369 7a65 3c2f 636f 6465 3e20 6d65 __size me\n-00111b20: 6d62 6572 2076 6172 6961 626c 6520 6f66 mber variable of\n-00111b30: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n-00111b40: 7374 7275 6374 2f63 6c61 7373 2077 6974 struct/class wit\n-00111b50: 6820 6461 7461 2028 652e 672e 203c 636f h data (e.g. xsd__base64Bina\n-00111be0: 7279 3c2f 613e 3c2f 636f 6465 3e20 6f72 ry or\n-00111bf0: 203c 636f 6465 3e3c 6120 636c 6173 733d _xo\n-00111c60: 705f 5f49 6e63 6c75 6465 3c2f 613e 3c2f p__Include with __ptr, <\n-00111c90: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size, id, type<\n-00111cc0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and options \n-00111ce0: 6d65 6d62 6572 7329 2073 686f 756c 6420 members) should \n-00111cf0: 6265 2073 6574 2062 7920 7468 6520 6170 be set by the ap\n-00111d00: 706c 6963 6174 696f 6e20 7072 696f 7220 plication prior \n-00111d10: 746f 2074 6865 2073 6572 6961 6c69 7a61 to the serializa\n-00111d20: 7469 6f6e 206f 6620 7468 6520 6d65 7373 tion of the mess\n-00111d30: 6167 6520 7769 7468 2061 7474 6163 686d age with attachm\n-00111d40: 656e 7473 2e20 5468 6520 7661 6c75 6520 ents. The value \n-00111d50: 6f66 203c 636f 6465 3e5f 5f73 697a 653c of __size<\n-00111d60: 2f63 6f64 653e 2069 6e64 6963 6174 6573 /code> indicates\n-00111d70: 2074 6865 2074 6f74 616c 2073 697a 6520 the total size \n-00111d80: 6f66 2074 6865 2061 7474 6163 686d 656e of the attachmen\n-00111d90: 7420 6461 7461 2074 6f20 6265 2074 7261 t data to be tra\n-00111da0: 6e73 6d69 7474 6564 2e20 4966 2074 6865 nsmitted. If the\n-00111db0: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member vari\n-00111dd0: 6162 6c65 2069 7320 7a65 726f 2061 6e64 able is zero and\n-00111de0: 2048 5454 5020 6368 756e 6b69 6e67 2069 HTTP chunking i\n-00111df0: 7320 656e 6162 6c65 6420 2877 6974 6820 s enabled (with \n-00111e00: 3c63 6f64 653e 2353 4f41 505f 494f 5f43 #SOAP_IO_C\n-00111e10: 4855 4e4b 3c2f 636f 6465 3e29 2c20 7468 HUNK), th\n-00111e20: 656e 2044 494d 4520 6368 756e 6b65 6420 en DIME chunked \n-00111e30: 7472 616e 7366 6572 7320 6172 6520 6163 transfers are ac\n-00111e40: 7469 7661 7465 6420 6279 2074 6865 2065 tivated by the e\n-00111e50: 6e67 696e 652c 2077 6869 6368 2069 7320 ngine, which is \n-00111e60: 6d6f 7265 2066 6c65 7869 626c 6520 7369 more flexible si\n-00111e70: 6e63 6520 7468 6520 6174 7461 6368 6d65 nce the attachme\n-00111e80: 6e74 2064 6174 6120 7369 7a65 2064 6f65 nt data size doe\n-00111e90: 7320 6e6f 7420 6e65 6564 2074 6f20 6265 s not need to be\n-00111ea0: 2064 6574 6572 6d69 6e65 6420 696e 2061 determined in a\n-00111eb0: 6476 616e 6365 2e20 546f 2075 7365 2044 dvance. To use D\n-00111ec0: 494d 4520 6368 756e 6b65 6420 7472 616e IME chunked tran\n-00111ed0: 7366 6572 732c 2065 6e61 626c 6520 4854 sfers, enable HT\n-00111ee0: 5450 2063 6875 6e6b 696e 6720 7769 7468 TP chunking with\n-00111ef0: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_\n-00111f00: 4348 554e 4b3c 2f63 6f64 653e 2028 616c CHUNK (al\n-00111f10: 736f 203c 636f 6465 3e23 534f 4150 5f49 so #SOAP_I\n-00111f20: 4f5f 5354 4f52 453c 2f63 6f64 653e 2063 O_STORE c\n-00111f30: 616e 2062 6520 7573 6564 2c20 6275 7420 an be used, but \n-00111f40: 7468 6973 2062 7566 6665 7273 2074 6865 this buffers the\n-00111f50: 2065 6e74 6972 6520 6d65 7373 6167 6520 entire message \n-00111f60: 696e 206d 656d 6f72 7920 6265 666f 7265 in memory before\n-00111f70: 2074 7261 6e73 6d69 7373 696f 6e29 2061 transmission) a\n-00111f80: 6e64 2073 6574 2074 6865 203c 636f 6465 nd set the __size m\n-00111fa0: 656d 6265 7220 7661 7269 6162 6c65 206f ember variable o\n-00111fb0: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment\n-00111fc0: 2073 7472 7563 742f 636c 6173 7320 746f struct/class to\n-00111fd0: 207a 6572 6f2e 2057 6865 6e20 4449 4d45 zero. When DIME\n-00111fe0: 2061 7474 6163 686d 656e 7420 6368 756e attachment chun\n-00111ff0: 6b69 6e67 2069 7320 656e 6162 6c65 642c king is enabled,\n-00112000: 2074 6869 7320 6361 6c6c 6261 636b 2073 this callback s\n-00112010: 686f 756c 6420 636f 6d70 6c65 7465 6c79 hould completely\n-00112020: 2066 696c 6c20 7468 6520 3c63 6f64 653e fill the \n-00112030: 6275 663c 2f63 6f64 653e 2062 7566 6665 buf buffe\n-00112040: 7220 7769 7468 203c 636f 6465 3e6c 656e r with len\n-00112050: 3c2f 636f 6465 3e20 6279 7465 7320 756e bytes un\n-00112060: 6c65 7373 2074 6865 206c 6173 7420 6461 less the last da\n-00112070: 7461 2063 6875 6e6b 2069 7320 7265 6163 ta chunk is reac\n-00112080: 6865 6420 616e 6420 6665 7765 7220 6279 hed and fewer by\n-00112090: 7465 7320 6172 6520 7265 7475 726e 6564 tes are returned\n-001120a0: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 ..
    • void (*soap.fdi\n-001120c0: 6d65 7265 6164 636c 6f73 6529 2873 7472 mereadclose)(str\n-001120d0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-001120e0: 766f 6964 202a 6861 6e64 6c65 293c 2f63 void *handle) This callba\n-00112100: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-00112110: 7468 6520 656e 6769 6e65 2074 6f20 636c the engine to cl\n-00112120: 6f73 6520 7468 6520 4449 4d45 2061 7474 ose the DIME att\n-00112130: 6163 686d 656e 7420 7374 7265 616d 2061 achment stream a\n-00112140: 6674 6572 2072 6561 6469 6e67 2e20 5468 fter reading. Th\n-00112150: 6520 3c63 6f64 653e 6861 6e64 6c65 3c2f e handle parameter \n-00112170: 636f 6e74 6169 6e73 2074 6865 2068 616e contains the han\n-00112180: 646c 6520 7265 7475 726e 6564 2062 7920 dle returned by \n-00112190: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::fdimeread\n-00112240: 6f70 656e 3c2f 613e 3c2f 636f 6465 3e20 open \n-00112250: 6361 6c6c 6261 636b 2e3c 2f6c 693e 0a3c callback.
    • .<\n-00112260: 6c69 3e3c 636f 6465 3e76 6f69 6420 2a28 li>void *(\n-00112270: 2a73 6f61 702e 6664 696d 6577 7269 7465 *soap.fdimewrite\n-00112280: 6f70 656e 2928 7374 7275 6374 2073 6f61 open)(struct soa\n-00112290: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-001122a0: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c\n-001122b0: 6861 7220 2a74 7970 652c 2063 6f6e 7374 har *type, const\n-001122c0: 2063 6861 7220 2a6f 7074 696f 6e73 293c char *options)<\n-001122d0: 2f63 6f64 653e 2043 616c 6c65 6420 6279 /code> Called by\n-001122e0: 2074 6865 2074 6f20 7374 6172 7420 7265 the to start re\n-001122f0: 6365 6976 696e 6720 6120 7374 7265 616d ceiving a stream\n-00112300: 696e 6720 4449 4d45 2061 7474 6163 686d ing DIME attachm\n-00112310: 656e 742e 2054 6869 7320 6361 6c6c 6261 ent. This callba\n-00112320: 636b 206f 7065 6e73 2061 2073 7472 6561 ck opens a strea\n-00112330: 6d20 746f 2073 7461 7274 2077 7269 7469 m to start writi\n-00112340: 6e67 2074 6865 2061 7474 6163 686d 656e ng the attachmen\n-00112350: 7420 6461 7461 2072 6563 6569 7665 642e t data received.\n-00112360: 2054 6865 2061 6374 7561 6c20 6461 7461 The actual data\n-00112370: 2073 7472 6561 6d20 7769 6c6c 2062 6520 stream will be \n-00112380: 7772 6974 7465 6e20 696e 2063 6875 6e6b written in chunk\n-00112390: 7320 7573 696e 6720 7468 6520 3c63 6f64 s using the soap::fdimewr\n-00112440: 6974 653c 2f61 3e3c 2f63 6f64 653e 2063 ite c\n-00112450: 616c 6c62 6163 6b20 756e 7469 6c20 6e6f allback until no\n-00112460: 206d 6f72 6520 6461 7461 2069 7320 6176 more data is av\n-00112470: 6169 6c61 626c 6520 616e 6420 7468 6520 ailable and the \n-00112480: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n-00112520: 703a 3a66 6469 6d65 7772 6974 6563 6c6f p::fdimewriteclo\n-00112530: 7365 3c2f 613e 3c2f 636f 6465 3e20 6361 se ca\n-00112540: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n-00112550: 2074 6f20 636c 6f73 6520 7468 6520 7374 to close the st\n-00112560: 7265 616d 2e20 5468 6520 3c63 6f64 653e ream. The \n-00112570: 6964 3c2f 636f 6465 3e2c 203c 636f 6465 id, type and\n-00112590: 203c 636f 6465 3e6f 7074 696f 6e73 3c2f options parameters\n-001125b0: 2061 7265 2074 6865 203c 636f 6465 3e69 are the i\n-001125c0: 643c 2f63 6f64 653e 2c20 3c63 6f64 653e d, \n-001125d0: 7479 7065 3c2f 636f 6465 3e20 616e 6420 type and \n-001125e0: 3c63 6f64 653e 6f70 7469 6f6e 733c 2f63 options of the atta\n-00112600: 6368 6d65 6e74 2073 7472 7563 742f 636c chment struct/cl\n-00112610: 6173 7320 2865 2e67 2e20 3c63 6f64 653e ass (e.g. \n-00112620: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xs\n-00112690: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary<\n-001126a0: 2f61 3e3c 2f63 6f64 653e 206f 7220 3c63 /a> or _xop__\n-00112720: 496e 636c 7564 653c 2f61 3e3c 2f63 6f64 Include with __\n-00112740: 7074 723c 2f63 6f64 653e 2c20 3c63 6f64 ptr, __size,\n-00112760: 203c 636f 6465 3e69 643c 2f63 6f64 653e id\n-00112770: 2c20 3c63 6f64 653e 7479 7065 3c2f 636f , type and op\n-00112790: 7469 6f6e 733c 2f63 6f64 653e 206d 656d tions mem\n-001127a0: 6265 7273 292c 2072 6573 7065 6374 6976 bers), respectiv\n-001127b0: 656c 792e 2054 6865 2063 616c 6c62 6163 ely. The callbac\n-001127c0: 6b20 7368 6f75 6c64 2072 6574 7572 6e20 k should return \n-001127d0: 6120 6861 6e64 6c65 2c20 7768 6963 6820 a handle, which \n-001127e0: 6973 2070 6173 7365 6420 746f 2074 6865 is passed to the\n-001127f0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fd\n-00112890: 696d 6577 7269 7465 3c2f 613e 3c2f 636f imewrite and soap::fdime\n-00112950: 7772 6974 6563 6c6f 7365 3c2f 613e 3c2f writeclose callbacks.\n-00112970: 2054 6865 203c 636f 6465 3e5f 5f70 7472 The __ptr\n-00112980: 3c2f 636f 6465 3e20 6d65 6d62 6572 2076 member v\n-00112990: 6172 6961 626c 6520 6f66 2074 6865 2061 ariable of the a\n-001129a0: 7474 6163 686d 656e 7420 7374 7275 6374 ttachment struct\n-001129b0: 2f63 6c61 7373 2069 7320 7365 7420 6279 /class is set by\n-001129c0: 2074 6865 2065 6e67 696e 6520 746f 2074 the engine to t\n-001129d0: 6865 2076 616c 7565 206f 6620 7468 6973 he value of this\n-001129e0: 2068 616e 646c 652e 2054 6865 203c 636f handle. The __size\n-00112a00: 206d 656d 6265 7220 7661 7269 6162 6c65 member variable\n-00112a10: 2069 7320 7365 7420 746f 2074 6865 2073 is set to the s\n-00112a20: 697a 6520 6f66 2074 6865 2061 7474 6163 ize of the attac\n-00112a30: 686d 656e 7420 7265 6365 6976 6564 2e20 hment received. \n-00112a40: 5468 6520 6d61 7869 6d75 6d20 4449 4d45 The maximum DIME\n-00112a50: 2061 7474 6163 686d 656e 7420 7369 7a65 attachment size\n-00112a60: 2072 6563 6569 7665 6420 6973 206c 696d received is lim\n-00112a70: 6974 6564 2062 7920 3c63 6f64 653e 2353 ited by #S\n-00112a80: 4f41 505f 4d41 5844 494d 4553 495a 453c OAP_MAXDIMESIZE<\n-00112a90: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>..int (*soa\n-00112ab0: 702e 6664 696d 6577 7269 7465 2928 7374 p.fdimewrite)(st\n-00112ac0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-00112ad0: 2076 6f69 6420 2a68 616e 646c 652c 2063 void *handle, c\n-00112ae0: 6f6e 7374 2063 6861 7220 2a62 7566 2c20 onst char *buf, \n-00112af0: 7369 7a65 5f74 206c 656e 293c 2f63 6f64 size_t len) This callback\n-00112b10: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n-00112b20: 6520 656e 6769 6e65 2074 6f20 7772 6974 e engine to writ\n-00112b30: 6520 6120 6368 756e 6b20 6f66 2061 7474 e a chunk of att\n-00112b40: 6163 686d 656e 7420 6461 7461 2072 6563 achment data rec\n-00112b50: 6569 7665 642e 2054 6865 203c 636f 6465 eived. The handle p\n-00112b70: 6172 616d 6574 6572 2063 6f6e 7461 696e arameter contain\n-00112b80: 7320 7468 6520 6861 6e64 6c65 2072 6574 s the handle ret\n-00112b90: 7572 6e65 6420 6279 2074 6865 203c 636f urned by the soap::\n-00112c40: 6664 696d 6577 7269 7465 6f70 656e 3c2f fdimewriteopen callba\n-00112c60: 636b 2e20 5468 6520 3c63 6f64 653e 6275 ck. The bu\n-00112c70: 663c 2f63 6f64 653e 2070 6172 616d 6574 f paramet\n-00112c80: 6572 2063 6f6e 7461 696e 7320 7468 6520 er contains the \n-00112c90: 6461 7461 206f 6620 6c65 6e67 7468 203c data of length <\n-00112ca0: 636f 6465 3e6c 656e 3c2f 636f 6465 3e2e code>len.\n-00112cb0: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n-00112cc0: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n-00112cd0: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n-00112d90: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n-00112db0: 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f de..
    • void (*soap.f\n-00112dd0: 6469 6d65 7772 6974 6563 6c6f 7365 2928 dimewriteclose)(\n-00112de0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00112df0: 702c 2076 6f69 6420 2a68 616e 646c 6529 p, void *handle)\n-00112e00: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal\n-00112e10: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00112e20: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n-00112e30: 2063 6c6f 7365 2074 6865 2044 494d 4520 close the DIME \n-00112e40: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n-00112e50: 6d20 6166 7465 7220 7772 6974 696e 672e m after writing.\n-00112e60: 2054 6865 203c 636f 6465 3e68 616e 646c The handl\n-00112e70: 653c 2f63 6f64 653e 2070 6172 616d 6574 e paramet\n-00112e80: 6572 2063 6f6e 7461 696e 7320 7468 6520 er contains the \n-00112e90: 6861 6e64 6c65 2072 6574 7572 6e65 6420 handle returned \n-00112ea0: 6279 2074 6865 203c 636f 6465 3e3c 6120 by the soap::fdimew\n-00112f50: 7269 7465 6f70 656e 3c2f 613e 3c2f 636f riteopen callback..
    .

    In a\n-00112f80: 6464 6974 696f 6e2c 2061 203c 636f 6465 ddition, a void* s\n-00113050: 6f61 703a 3a75 7365 723c 2f61 3e3c 2f63 oap::user member is a\n-00113070: 7661 696c 6162 6c65 2074 6f20 7061 7373 vailable to pass\n-00113080: 2075 7365 722d 6465 6669 6e65 6420 6461 user-defined da\n-00113090: 7461 2074 6f20 7468 6520 6361 6c6c 6261 ta to the callba\n-001130a0: 636b 732e 2054 6869 7320 7761 792c 2079 cks. This way, y\n-001130b0: 6f75 2063 616e 2073 6574 203c 636f 6465 ou can set void* s\n-00113180: 6f61 703a 3a75 7365 723c 2f61 3e3c 2f63 oap::user to point to\n-001131a0: 2061 7070 6c69 6361 7469 6f6e 2064 6174 application dat\n-001131b0: 6120 7468 6174 2074 6865 2063 616c 6c62 a that the callb\n-001131c0: 6163 6b73 206e 6565 6420 7375 6368 2061 acks need such a\n-001131d0: 7320 6120 6669 6c65 206e 616d 6520 666f s a file name fo\n-001131e0: 7220 6578 616d 706c 652e 3c2f 703e 0a3c r example.

    .<\n-001131f0: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following \n-00113200: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra\n-00113210: 7465 7320 7468 6520 636c 6965 6e74 2d73 tes the client-s\n-00113220: 6964 6520 696e 6974 6961 6c69 7a61 7469 ide initializati\n-00113230: 6f6e 206f 6620 616e 2069 6d61 6765 2061 on of an image a\n-00113240: 7474 6163 686d 656e 7420 7374 7275 6374 ttachment struct\n-00113250: 2074 6f20 7374 7265 616d 2061 2066 696c to stream a fil\n-00113260: 6520 696e 746f 2061 2044 494d 4520 6174 e into a DIME at\n-00113270: 7461 6368 6d65 6e74 3a3c 2f70 3e0a 3c64 tachment:

    .
    \n-001132c0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-001132d0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str\n-00113320: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    str\n-001133c0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct xsd__base64Bin\n-00113410: 6172 793c 2f61 3e20 696d 6167 653b 203c ary image; <\n-00113420: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    FILE *\n-00113440: 6664 3b20 3c2f 6469 763e 0a3c 6469 7620 fd;
    .
    <\n-00113460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00113470: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct stat sb; .
    soap\n-00113500: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n-00113510: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00113520: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00113530: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-00113540: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n-00113580: 2821 6673 7461 7428 6669 6c65 6e6f 2866 (!fstat(fileno(f\n-00113590: 6429 2c20 2661 6d70 3b73 6229 2026 616d d), &sb) &am\n-001135a0: 703b 2661 6d70 3b20 7362 2e73 745f 7369 p;& sb.st_si\n-001135b0: 7a65 2026 6774 3b20 3029 203c 2f64 6976 ze > 0) .
    {
    .\n-001135f0: 2020 2020 3c73 7061 6e20 636c 6173 733d // bec\n-00113610: 6175 7365 2077 6520 6361 6e20 6765 7420 ause we can get \n-00113620: 7468 6520 6c65 6e67 7468 206f 6620 7468 the length of th\n-00113630: 6520 6669 6c65 2c20 7765 2063 616e 2073 e file, we can s\n-00113640: 7472 6561 6d20 6974 203c 2f73 7061 6e3e tream it \n-00113650: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.fdimereadope\n-00113700: 6e3c 2f61 3e20 3d20 6469 6d65 5f72 6561 n = dime_rea\n-00113710: 645f 6f70 656e 3b20 3c2f 6469 763e 0a3c d_open;
    .<\n-00113720: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00113730: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n-00113760: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fdim\n-001137c0: 6572 6561 6463 6c6f 7365 3c2f 613e 203d ereadclose =\n-001137d0: 2064 696d 655f 7265 6164 5f63 6c6f 7365 dime_read_close\n-001137e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-00113800: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00113810: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00113820: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-00113830: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00113840: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00113850: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-00113860: 6c23 6761 3438 3237 3061 6439 3839 3631 l#ga48270ad98961\n-00113870: 6333 6666 3438 6337 6235 3634 3834 6562 c3ff48c7b56484eb\n-00113880: 6233 6661 223e 6664 696d 6572 6561 643c b3fa\">fdimeread<\n-00113890: 2f61 3e20 3d20 6469 6d65 5f72 6561 643b /a> = dime_read;\n-001138a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    im\n-001138c0: 6167 652e 5f5f 7074 7220 3d20 283c 7370 age.__ptr = (unsigned<\n-001138f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char*)fd\n-00113920: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // must \n-00113940: 7365 7420 746f 206e 6f6e 2d4e 554c 4c20 set to non-NULL \n-00113950: 2874 6869 7320 6973 206f 7572 2066 6420 (this is our fd \n-00113960: 6861 6e64 6c65 2077 6869 6368 2077 6520 handle which we \n-00113970: 6e65 6564 2069 6e20 7468 6520 6361 6c6c need in the call\n-00113980: 6261 636b 7329 203c 2f73 7061 6e3e 3c2f backs) .
    image\n-001139b0: 2e5f 5f73 697a 6520 3d20 7362 2e73 745f .__size = sb.st_\n-001139c0: 7369 7a65 3b20 3c73 7061 6e20 636c 6173 size; // m\n-001139e0: 7573 7420 7365 7420 7369 7a65 203c 2f73 ust set size
    .
    }\n-00113a10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    else
    .
    {.
    // don't kn\n-00113ab0: 6f77 2074 6865 2073 697a 652c 2073 6f20 ow the size, so \n-00113ac0: 6275 6666 6572 2069 7420 3c2f 7370 616e buffer it
    .
    size_t i;
    .\n-00113b20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00113b50: 696e 743c 2f73 7061 6e3e 2063 3b20 3c2f int c; .
    image\n-00113b80: 2e5f 5f70 7472 203d 2028 3c73 7061 6e20 .__ptr = (unsigned ch\n-00113bd0: 6172 3c2f 7370 616e 3e2a 293c 6120 636c ar*)\n-00113c30: 736f 6170 5f6d 616c 6c6f 633c 2f61 3e28 soap_malloc(\n-00113c40: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00113c70: 3c2f 613e 2c20 4d41 585f 4649 4c45 5f53 , MAX_FILE_S\n-00113c80: 495a 4529 3b20 3c2f 6469 763e 0a3c 6469 IZE);
    . \n-00113ca0: 2020 203c 7370 616e 2063 6c61 7373 3d22 for\n-00113cc0: 3c2f 7370 616e 3e20 2869 203d 2030 3b20 (i = 0; \n-00113cd0: 6920 266c 743b 204d 4158 5f46 494c 455f i < MAX_FILE_\n-00113ce0: 5349 5a45 3b20 692b 2b29 203c 2f64 6976 SIZE; i++) .
    {
    .\n-00113d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if ((c \n-00113d50: 3d20 6667 6574 6328 6664 2929 203d 3d20 = fgetc(fd)) == \n-00113d60: 454f 4629 203c 2f64 6976 3e0a 3c64 6976 EOF)
    . \n-00113d80: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-00113da0: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c2f break; .
    ima\n-00113dd0: 6765 2e5f 5f70 7472 5b69 5d20 3d20 633b ge.__ptr[i] = c;\n-00113de0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } \n-00113e00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    fcl\n-00113e20: 6f73 6528 6664 293b 203c 2f64 6976 3e0a ose(fd);
    .\n-00113e30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    image.__si\n-00113e50: 7a65 203d 2069 3b20 3c2f 6469 763e 0a3c ze = i;
    .<\n-00113e60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00113e70: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00113e90: 696d 6167 652e 7479 7065 203d 203c 7370 image.type = "i\n-00113ec0: 6d61 6765 2f6a 7065 6726 7175 6f74 3b3c mage/jpeg"<\n-00113ed0: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-00113ee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00113ef0: 3e20 2069 6d61 6765 2e6f 7074 696f 6e73 > image.options\n-00113f00: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_dime_o\n-00113f60: 7074 696f 6e3c 2f61 3e28 2661 6d70 3b3c ption(&<\n-00113f70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00113f80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00113f90: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00113fa0: 302c 203c 7370 616e 2063 6c61 7373 3d22 0, &\n-00113fc0: 7175 6f74 3b4d 7920 7069 6374 7572 6526 quot;My picture&\n-00113fd0: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); <\n-00113fe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (s\n-00114020: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n-00114030: 6d65 7468 6f64 2826 616d 703b 3c61 2063 method(&soap, ...\n-00114070: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
    .
    .\n-00114090: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro\n-001140b0: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n-001140c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001140d0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els\n-001140f0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n-00114100: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114110: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n-00114130: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success\n-00114140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } unsigned char\n+0010f980: 3c2f 7370 616e 3e20 2a5f 5f70 7472 3b20 *__ptr; \n+0010f990: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int __size;
    \n+0010f9e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char *id\n+0010fa20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+0010fa40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010fa50: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *type; .
    char *\n+0010fab0: 6f70 7469 6f6e 733b 203c 2f64 6976 3e0a options;
    .\n+0010fac0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    @ \n+0010faf0: 6368 6172 3c2f 7370 616e 3e20 2a57 5372 char *WSr\n+0010fb00: 6566 5f5f 6c6f 6361 7469 6f6e 3b20 3c2f ef__location; .
    };
    .\n+0010fb30: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ex\n+0010fb50: 616d 706c 6520 6162 6f76 6520 7573 6573 ample above uses\n+0010fb60: 2074 6865 203c 656d 3e3c 636f 6465 3e6c the l\n+0010fb70: 6f63 6174 696f 6e3c 2f63 6f64 653e 3c2f ocation attribute de\n+0010fb90: 6669 6e65 6420 696e 2074 6865 2063 6f6e fined in the con\n+0010fba0: 7465 6e74 2072 6566 6572 656e 6365 2073 tent reference s\n+0010fbb0: 6368 656d 612c 2061 7320 6465 6669 6e65 chema, as define\n+0010fbc0: 6420 696e 206f 6e65 206f 6620 7468 6520 d in one of the \n+0010fbd0: 7665 6e64 6f72 2773 2073 7065 6369 6669 vendor's specifi\n+0010fbe0: 6320 5753 444c 2065 7874 656e 7369 6f6e c WSDL extension\n+0010fbf0: 7320 666f 7220 4449 4d45 203c 6120 6872 s for DIME \n+0010fc50: 6874 7470 3a2f 2f77 7777 2e67 6f74 646f http://www.gotdo\n+0010fc60: 746e 6574 2e63 6f6d 2f74 6561 6d2f 786d tnet.com/team/xm\n+0010fc70: 6c5f 7773 7370 6563 732f 6469 6d65 2f57 l_wsspecs/dime/W\n+0010fc80: 5344 4c2d 4578 7465 6e73 696f 6e2d 666f SDL-Extension-fo\n+0010fc90: 722d 4449 4d45 2e68 746d 3c2f 613e 2e3c r-DIME.htm.<\n+0010fca0: 2f70 3e0a 3c70 3e57 6865 6e20 7265 6365 /p>.

    When rece\n+0010fcb0: 6976 696e 6720 4449 4d45 2061 7474 6163 iving DIME attac\n+0010fcc0: 686d 656e 7473 2c20 7468 6520 4449 4d45 hments, the DIME\n+0010fcd0: 206d 6574 6120 6461 7461 2061 6e64 2062 meta data and b\n+0010fce0: 696e 6172 7920 636f 6e74 656e 7420 6172 inary content ar\n+0010fcf0: 6520 7374 6f72 6564 2069 6e20 7468 6520 e stored in the \n+0010fd00: 7370 6563 6966 6965 6420 3c63 6f64 653e specified \n+0010fd10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xs\n+0010fd80: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary<\n+0010fd90: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+0010fda0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>xsd\n+0010fe10: 5f5f 6865 7842 696e 6172 793c 2f61 3e3c __hexBinary<\n+0010fe20: 2f63 6f64 653e 2062 696e 6172 7920 6461 /code> binary da\n+0010fe30: 7461 2074 7970 6573 206f 6e6c 7920 7768 ta types only wh\n+0010fe40: 656e 2074 6865 2058 4d4c 2070 6172 7473 en the XML parts\n+0010fe50: 206f 6620 7468 6520 6d65 7373 6167 6520 of the message \n+0010fe60: 7573 6573 203c 656d 3e3c 636f 6465 3e68 uses h\n+0010fe70: 7265 663c 2f63 6f64 653e 3c2f 656d 3e20 ref \n+0010fe80: 6174 7472 6962 7574 6573 2074 6f20 7265 attributes to re\n+0010fe90: 6665 7220 746f 2074 6865 7365 2061 7474 fer to these att\n+0010fea0: 6163 686d 656e 7473 2e20 4966 2073 6f2c achments. If so,\n+0010feb0: 2074 6865 2062 696e 6172 7920 6461 7461 the binary data\n+0010fec0: 2074 7970 6520 3c63 6f64 653e 5f5f 7074 type __pt\n+0010fed0: 723c 2f63 6f64 653e 2061 6e64 203c 636f r and __size\n+0010fef0: 206d 656d 6265 7273 2061 7265 2073 6574 members are set\n+0010ff00: 2074 6f20 7468 6520 6c6f 6361 7469 6f6e to the location\n+0010ff10: 2069 6e20 6d65 6d6f 7279 206f 6620 7468 in memory of th\n+0010ff20: 6520 6174 7461 6368 6d65 6e74 2064 6174 e attachment dat\n+0010ff30: 6120 616e 6420 6c65 6e67 7468 2c20 7265 a and length, re\n+0010ff40: 7370 6563 7469 7665 6c79 2e3c 2f70 3e0a spectively.

    .\n+0010ff50: 3c70 3e4d 6573 7361 6765 7320 6d61 7920

    Messages may \n+0010ff60: 636f 6e74 6169 6e20 6269 6e61 7279 2064 contain binary d\n+0010ff70: 6174 6120 7468 6174 2072 6566 6572 656e ata that referen\n+0010ff80: 6365 7320 6578 7465 726e 616c 2072 6573 ces external res\n+0010ff90: 6f75 7263 6573 206e 6f74 2070 726f 7669 ources not provi\n+0010ffa0: 6465 6420 6173 2061 7474 6163 686d 656e ded as attachmen\n+0010ffb0: 7473 2e20 496e 2074 6861 7420 6361 7365 ts. In that case\n+0010ffc0: 2c20 7468 6520 3c63 6f64 653e 5f5f 7074 , the __pt\n+0010ffd0: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member \n+0010ffe0: 6973 204e 554c 4c20 616e 6420 7468 6520 is NULL and the \n+0010fff0: 3c63 6f64 653e 6964 3c2f 636f 6465 3e20 id \n+00110000: 6d65 6d62 6572 2072 6566 6572 7320 746f member refers to\n+00110010: 2074 6865 2065 7874 6572 6e61 6c20 6461 the external da\n+00110020: 7461 2073 6f75 7263 652e 3c2f 703e 0a3c ta source.

    .<\n+00110030: 703e 5468 6520 3c63 6f64 653e 6469 6d65 p>The dime\n+00110040: 5f69 645f 666f 726d 6174 3c2f 636f 6465 _id_format attribute of t\n+00110060: 6865 2063 7572 7265 6e74 2063 6f6e 7465 he current conte\n+00110070: 7874 2063 616e 2062 6520 7365 7420 746f xt can be set to\n+00110080: 2074 6865 2064 6566 6175 6c74 2066 6f72 the default for\n+00110090: 6d61 7420 6f66 2044 494d 4520 6964 206d mat of DIME id m\n+001100a0: 656d 6265 7273 2e20 5468 6520 666f 726d embers. The form\n+001100b0: 6174 2073 7472 696e 6720 6d75 7374 2063 at string must c\n+001100c0: 6f6e 7461 696e 2061 203c 636f 6465 3e64 ontain a d\n+001100d0: 3c2f 636f 6465 3e20 666f 726d 6174 2073 format s\n+001100e0: 7065 6369 6669 6572 2028 6f72 2061 6e79 pecifier (or any\n+001100f0: 206f 7468 6572 203c 636f 6465 3e69 6e74 other int\n+00110100: 3c2f 636f 6465 3e2d 6261 7365 6420 666f -based fo\n+00110110: 726d 6174 2073 7065 6369 6669 6572 292e rmat specifier).\n+00110120: 2054 6865 2076 616c 7565 206f 6620 7468 The value of th\n+00110130: 6973 2073 7065 6369 6669 6572 2069 7320 is specifier is \n+00110140: 6120 6e6f 6e2d 6e65 6761 7469 7665 2069 a non-negative i\n+00110150: 6e74 6567 6572 2c20 7769 7468 207a 6572 nteger, with zer\n+00110160: 6f20 6265 696e 6720 7468 6520 7661 6c75 o being the valu\n+00110170: 6520 6f66 2074 6865 2044 494d 4520 6174 e of the DIME at\n+00110180: 7461 6368 6d65 6e74 2069 6420 666f 7220 tachment id for \n+00110190: 7468 6520 534f 4150 206d 6573 7361 6765 the SOAP message\n+001101a0: 2e20 466f 7220 6578 616d 706c 652c 3c2f . For example,.
    struct <\n+00110200: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00110210: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00110220: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00110230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00110260: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+001102c0: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    .<\n+001102e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001102f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00110300: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00110310: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;dime\n+00110360: 5f69 645f 666f 726d 6174 3c2f 613e 203d _id_format =\n+00110370: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00110390: 6f74 3b69 642d 2578 2671 756f 743b 3c2f ot;id-%x";
    .
    soap::dim\n+00110450: 655f 6964 5f66 6f72 6d61 743c 2f61 3e3c e_id_format<\n+00110460: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c\n+00110480: 6861 7220 2a20 6469 6d65 5f69 645f 666f har * dime_id_fo\n+00110490: 726d 6174 3c2f 6469 763e 3c64 6976 2063 rmat
    Use\n+001104b0: 722d 6465 6669 6e61 626c 6520 666f 726d r-definable form\n+001104c0: 6174 2073 7472 696e 6720 746f 2067 656e at string to gen\n+001104d0: 6572 6174 6520 4449 4d45 2063 6f6e 7465 erate DIME conte\n+001104e0: 6e74 2049 4473 2e3c 2f64 6976 3e3c 6469 nt IDs.
    \n+00110500: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:41\n+00110520: 3732 3c2f 6469 763e 3c2f 6469 763e 0a3c 72
    .<\n+00110530: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    As a re\n+00110550: 7375 6c74 2c20 616c 6c20 6174 7461 6368 sult, all attach\n+00110560: 6d65 6e74 7320 7769 7468 2061 204e 554c ments with a NUL\n+00110570: 4c20 3c63 6f64 653e 6964 3c2f 636f 6465 L id member will us\n+00110590: 6520 6120 6175 746f 2d67 656e 6572 6174 e a auto-generat\n+001105a0: 6564 2069 6420 7661 6c75 6520 6261 7365 ed id value base\n+001105b0: 6420 6f6e 2074 6865 2066 6f72 6d61 7420 d on the format \n+001105c0: 7374 7269 6e67 2e3c 2f70 3e0a 3c64 6c20 string.

    .
    Warn\n+001105f0: 696e 673c 2f64 743e 3c64 643e 4361 7265 ing
    Care\n+00110600: 206d 7573 7420 6265 2074 616b 656e 206e must be taken n\n+00110610: 6f74 2074 6f20 696e 7472 6f64 7563 6520 ot to introduce \n+00110620: 6475 706c 6963 6174 6520 636f 6e74 656e duplicate conten\n+00110630: 7420 6964 2076 616c 7565 732c 2077 6865 t id values, whe\n+00110640: 6e20 6173 7369 676e 696e 6720 636f 6e74 n assigning cont\n+00110650: 656e 7420 6964 2076 616c 7565 7320 746f ent id values to\n+00110660: 2074 6865 2069 6420 6d65 6d62 6572 7320 the id members \n+00110670: 6f66 2044 494d 4520 6578 7465 6e64 6564 of DIME extended\n+00110680: 2062 696e 6172 7920 6461 7461 2074 7970 binary data typ\n+00110690: 6573 2e20 436f 6e74 656e 7420 6964 7320 es. Content ids \n+001106a0: 6d75 7374 2062 6520 756e 6971 7565 2e3c must be unique.<\n+001106b0: 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 9f94 /dd>
    .

    ...\n+001106c0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n+001106d0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n+001106e0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n+001106f0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .St\n+00110720: 7265 616d 696e 6720 4449 4d45 3c2f 6832 reaming DIME.

    Streaming D\n+00110740: 494d 4520 6973 2061 6368 6965 7665 6420 IME is achieved \n+00110750: 7769 7468 2063 616c 6c62 6163 6b20 6675 with callback fu\n+00110760: 6e63 7469 6f6e 7320 746f 2066 6574 6368 nctions to fetch\n+00110770: 2061 6e64 2073 746f 7265 2064 6174 6120 and store data \n+00110780: 6475 7269 6e67 2074 7261 6e73 6d69 7373 during transmiss\n+00110790: 696f 6e2e 2054 6872 6565 2066 756e 6374 ion. Three funct\n+001107a0: 696f 6e20 6361 6c6c 6261 636b 7320 666f ion callbacks fo\n+001107b0: 7220 7374 7265 616d 696e 6720 4449 4d45 r streaming DIME\n+001107c0: 206f 7574 7075 7420 616e 6420 7468 7265 output and thre\n+001107d0: 6520 6361 6c6c 6261 636b 7320 666f 7220 e callbacks for \n+001107e0: 7374 7265 616d 696e 6720 4449 4d45 2069 streaming DIME i\n+001107f0: 6e70 7574 2061 7265 2061 7661 696c 6162 nput are availab\n+00110800: 6c65 2e3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 le.

    .
      .void *(*s\n+00110820: 6f61 702e 6664 696d 6572 6561 646f 7065 oap.fdimereadope\n+00110830: 6e29 2873 7472 7563 7420 736f 6170 202a n)(struct soap *\n+00110840: 736f 6170 2c20 766f 6964 202a 6861 6e64 soap, void *hand\n+00110850: 6c65 2c20 636f 6e73 7420 6368 6172 202a le, const char *\n+00110860: 6964 2c20 636f 6e73 7420 6368 6172 202a id, const char *\n+00110870: 7479 7065 2c20 636f 6e73 7420 6368 6172 type, const char\n+00110880: 202a 6f70 7469 6f6e 7329 3c2f 636f 6465 *options) This callback \n+001108a0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n+001108b0: 2065 6e67 696e 6520 746f 2073 7461 7274 engine to start\n+001108c0: 2073 656e 6469 6e67 2061 2073 7472 6561 sending a strea\n+001108d0: 6d69 6e67 2044 494d 4520 6174 7461 6368 ming DIME attach\n+001108e0: 6d65 6e74 2e20 5468 6973 2063 616c 6c62 ment. This callb\n+001108f0: 6163 6b20 6f70 656e 7320 6120 7374 7265 ack opens a stre\n+00110900: 616d 2074 6f20 7374 6172 7420 7265 6164 am to start read\n+00110910: 696e 6720 7468 6520 6174 7461 6368 6d65 ing the attachme\n+00110920: 6e74 2064 6174 6120 746f 2073 656e 642e nt data to send.\n+00110930: 2054 6865 2061 6374 7561 6c20 6461 7461 The actual data\n+00110940: 2073 7472 6561 6d20 7769 6c6c 2062 6520 stream will be \n+00110950: 7265 6164 2069 6e20 6368 756e 6b73 2075 read in chunks u\n+00110960: 7369 6e67 2074 6865 203c 636f 6465 3e3c sing the <\n+00110970: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00110980: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00110990: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+001109a0: 6761 3438 3237 3061 6439 3839 3631 6333 ga48270ad98961c3\n+001109b0: 6666 3438 6337 6235 3634 3834 6562 6233 ff48c7b56484ebb3\n+001109c0: 6661 2220 7469 746c 653d 2243 616c 6c62 fa\" title=\"Callb\n+001109d0: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data\n+001109e0: 2069 6e20 6120 4449 4d45 2061 7474 6163 in a DIME attac\n+001109f0: 686d 656e 7420 7374 7265 616d 2e22 3e73 hment stream.\">s\n+00110a00: 6f61 703a 3a66 6469 6d65 7265 6164 3c2f oap::fdimeread callba\n+00110a20: 636b 2075 6e74 696c 206e 6f20 6d6f 7265 ck until no more\n+00110a30: 2064 6174 6120 6973 2061 7661 696c 6162 data is availab\n+00110a40: 6c65 2061 6e64 2074 6865 203c 636f 6465 le and the soap::fd\n+00110af0: 696d 6572 6561 6463 6c6f 7365 3c2f 613e imereadclose\n+00110b00: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+00110b10: 2069 7320 6361 6c6c 6564 2074 6f20 636c is called to cl\n+00110b20: 6f73 6520 7468 6520 7374 7265 616d 2e20 ose the stream. \n+00110b30: 5468 6520 3c63 6f64 653e 6861 6e64 6c65 The handle\n+00110b40: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n+00110b50: 7220 636f 6e74 6169 6e73 2074 6865 2076 r contains the v\n+00110b60: 616c 7565 206f 6620 7468 6520 3c63 6f64 alue of the __ptr m\n+00110b80: 656d 6265 7220 7661 7269 6162 6c65 206f ember variable o\n+00110b90: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment\n+00110ba0: 2073 7472 7563 742f 636c 6173 7320 7769 struct/class wi\n+00110bb0: 7468 2064 6174 6120 2865 2e67 2e20 3c63 th data (e.g. xsd__base64Bin\n+00110c40: 6172 793c 2f61 3e3c 2f63 6f64 653e 206f ary o\n+00110c50: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r _x\n+00110cc0: 6f70 5f5f 496e 636c 7564 653c 2f61 3e3c op__Include<\n+00110cd0: 2f63 6f64 653e 2077 6974 6820 3c63 6f64 /code> with __ptr, \n+00110cf0: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size, id, type\n+00110d20: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and options\n+00110d40: 206d 656d 6265 7273 292c 2077 6869 6368 members), which\n+00110d50: 2073 686f 756c 6420 6265 2061 2070 6f69 should be a poi\n+00110d60: 6e74 6572 2074 6f20 7370 6563 6966 6963 nter to specific\n+00110d70: 2069 6e66 6f72 6d61 7469 6f6e 2073 7563 information suc\n+00110d80: 6820 6173 2061 2066 696c 6520 6465 7363 h as a file desc\n+00110d90: 7269 7074 6f72 206f 7220 6120 706f 696e riptor or a poin\n+00110da0: 7465 7220 746f 2061 2073 6f6d 6520 6170 ter to a some ap\n+00110db0: 706c 6963 6174 696f 6e2d 7370 6563 6966 plication-specif\n+00110dc0: 6963 2064 6174 6120 746f 2062 6520 7061 ic data to be pa\n+00110dd0: 7373 6564 2074 6f20 7468 6973 2063 616c ssed to this cal\n+00110de0: 6c62 6163 6b2e 2042 6f74 6820 7468 6520 lback. Both the \n+00110df0: 3c63 6f64 653e 5f5f 7074 723c 2f63 6f64 __ptr and __s\n+00110e10: 697a 653c 2f63 6f64 653e 206d 656d 6265 ize membe\n+00110e20: 7273 206f 6620 7468 6520 6174 7461 6368 rs of the attach\n+00110e30: 6d65 6e74 2073 7472 7563 742f 636c 6173 ment struct/clas\n+00110e40: 7320 7368 6f75 6c64 2068 6176 6520 6265 s should have be\n+00110e50: 656e 2073 6574 2062 7920 7468 6520 6170 en set by the ap\n+00110e60: 706c 6963 6174 696f 6e20 7072 696f 7220 plication prior \n+00110e70: 746f 2074 6865 2073 6572 6961 6c69 7a61 to the serializa\n+00110e80: 7469 6f6e 206f 6620 7468 6520 6d65 7373 tion of the mess\n+00110e90: 6167 6520 7769 7468 2061 7474 6163 686d age with attachm\n+00110ea0: 656e 7473 2e20 4966 2074 6865 203c 636f ents. If the __size\n+00110ec0: 2069 7320 7a65 726f 2061 6e64 2048 5454 is zero and HTT\n+00110ed0: 5020 6368 756e 6b69 6e67 2069 7320 656e P chunking is en\n+00110ee0: 6162 6c65 6420 2877 6974 6820 3c63 6f64 abled (with #SOAP_IO_CHUNK\n+00110f00: 3c2f 636f 6465 3e29 2c20 7468 656e 2063 ), then c\n+00110f10: 6875 6e6b 6564 2044 494d 4520 6174 7461 hunked DIME atta\n+00110f20: 6368 6d65 6e74 7320 6172 6520 7365 6e74 chments are sent\n+00110f30: 2c20 7365 6520 3c63 6f64 653e 3c61 2063 , see soap\n+00110fd0: 3a3a 6664 696d 6572 6561 643c 2f61 3e3c ::fdimeread<\n+00110fe0: 2f63 6f64 653e 2e20 5468 6520 3c63 6f64 /code>. The id, type a\n+00111010: 6e64 203c 636f 6465 3e6f 7074 696f 6e73 nd options\n+00111020: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n+00111030: 7273 2061 7265 2074 6865 203c 636f 6465 rs are the id (opti\n+00111050: 6f6e 616c 2049 4429 2c20 3c63 6f64 653e onal ID), \n+00111060: 7479 7065 3c2f 636f 6465 3e20 2861 204d type (a M\n+00111070: 494d 4520 7479 7065 2920 616e 6420 3c63 IME type) and options (DIME options\n+001110a0: 2061 7265 2073 6574 2077 6974 6820 3c63 are set with soap_dime_opt\n+00111130: 696f 6e3c 2f61 3e3c 2f63 6f64 653e 2920 ion) \n+00111140: 6f66 2074 6865 2061 7474 6163 686d 656e of the attachmen\n+00111150: 7420 7374 7275 6374 2f63 6c61 7373 2c20 t struct/class, \n+00111160: 7265 7370 6563 7469 7665 6c79 2c20 6f66 respectively, of\n+00111170: 2077 6869 6368 2061 7420 6c65 6173 7420 which at least \n+00111180: 6f6e 6520 6d65 6d62 6572 2073 686f 756c one member shoul\n+00111190: 6420 6265 206e 6f6e 2d4e 554c 4c2e 2054 d be non-NULL. T\n+001111a0: 6865 2063 616c 6c62 6163 6b20 7368 6f75 he callback shou\n+001111b0: 6c64 2072 6574 7572 6e20 7468 6520 3c63 ld return the handle parameter valu\n+001111e0: 6520 6f72 2061 6e6f 7468 6572 2070 6f69 e or another poi\n+001111f0: 6e74 6572 2076 616c 7565 2c20 7768 6963 nter value, whic\n+00111200: 6820 6973 2070 6173 7365 6420 6173 2074 h is passed as t\n+00111210: 6865 206e 6577 203c 636f 6465 3e68 616e he new han\n+00111220: 646c 653c 2f63 6f64 653e 2070 6172 616d dle param\n+00111230: 6574 6572 2074 6f20 3c63 6f64 653e 3c61 eter to so\n+001112d0: 6170 3a3a 6664 696d 6572 6561 643c 2f61 ap::fdimeread and soap::\n+00111390: 6664 696d 6572 6561 6463 6c6f 7365 3c2f fdimereadclose callba\n+001113b0: 636b 732e 2057 6865 6e20 616e 2065 7272 cks. When an err\n+001113c0: 6f72 206f 6363 7572 7265 6420 696e 2074 or occurred in t\n+001113d0: 6869 7320 6361 6c6c 6261 636b 2c20 7468 his callback, th\n+001113e0: 6520 6361 6c6c 6261 636b 2073 686f 756c e callback shoul\n+001113f0: 6420 7265 7475 726e 204e 554c 4c20 616e d return NULL an\n+00111400: 6420 7365 7420 3c63 6f64 653e 3c61 2063 d set soap::error to an e\n+001114d0: 7272 6f72 2063 6f64 652c 2065 2e67 2e20 rror code, e.g. \n+001114e0: 7573 696e 6720 3c63 6f64 653e 3c61 2063 using soap\n+00111590: 5f72 6563 6569 7665 725f 6661 756c 743c _receiver_fault<\n+001115a0: 2f61 3e3c 2f63 6f64 653e 2e20 5468 6520 /a>. The \n+001115b0: 6361 6c6c 6261 636b 206d 6179 2072 6574 callback may ret\n+001115c0: 7572 6e20 4e55 4c4c 2061 6e64 2073 6574 urn NULL and set\n+001115d0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n+00111680: 703a 3a65 7272 6f72 3c2f 613e 3c2f 636f p::error to #SO\n+001116a0: 4150 5f4f 4b3c 2f63 6f64 653e 2077 6865 AP_OK whe\n+001116b0: 6e20 7468 6973 2073 7065 6369 6669 6320 n this specific \n+001116c0: 4449 4d45 2061 7474 6163 686d 656e 7420 DIME attachment \n+001116d0: 7368 6f75 6c64 206e 6f74 2074 6f20 6265 should not to be\n+001116e0: 2073 7472 6561 6d65 6420 616e 6420 7468 streamed and th\n+001116f0: 6520 656e 6769 6e65 2077 696c 6c20 7369 e engine will si\n+00111700: 6d70 6c79 2073 6b69 7020 6974 2e3c 2f6c mply skip it..
    • siz\n+00111720: 655f 7420 282a 736f 6170 2e66 6469 6d65 e_t (*soap.fdime\n+00111730: 7265 6164 2928 7374 7275 6374 2073 6f61 read)(struct soa\n+00111740: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h\n+00111750: 616e 646c 652c 2063 6861 7220 2a62 7566 andle, char *buf\n+00111760: 2c20 7369 7a65 5f74 206c 656e 293c 2f63 , size_t len) This callba\n+00111780: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n+00111790: 7468 6520 656e 6769 6e65 2074 6f20 7265 the engine to re\n+001117a0: 6164 2061 2063 6875 6e6b 206f 6620 6174 ad a chunk of at\n+001117b0: 7461 6368 6d65 6e74 2064 6174 6120 746f tachment data to\n+001117c0: 2074 7261 6e73 6d69 742e 2054 6865 203c transmit. The <\n+001117d0: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter con\n+001117f0: 7461 696e 7320 7468 6520 6861 6e64 6c65 tains the handle\n+00111800: 2072 6574 7572 6e65 6420 6279 2074 6865 returned by the\n+00111810: 203c 636f 6465 3e3c 6120 636c 6173 733d so\n+001118b0: 6170 3a3a 6664 696d 6572 6561 646f 7065 ap::fdimereadope\n+001118c0: 6e3c 2f61 3e3c 2f63 6f64 653e 2063 616c n cal\n+001118d0: 6c62 6163 6b2e 2054 6865 203c 636f 6465 lback. The buf para\n+001118f0: 6d65 7465 7220 6973 2074 6865 2062 7566 meter is the buf\n+00111900: 6665 7220 6f66 206c 656e 6774 6820 3c63 fer of length len i\n+00111920: 6e74 6f20 7768 6963 6820 6120 6368 756e nto which a chun\n+00111930: 6b20 6f66 2064 6174 6120 7368 6f75 6c64 k of data should\n+00111940: 2062 6520 7772 6974 7465 6e20 6279 2074 be written by t\n+00111950: 6865 2063 616c 6c62 6163 6b2e 2054 6865 he callback. The\n+00111960: 2061 6374 7561 6c20 616d 6f75 6e74 206f actual amount o\n+00111970: 6620 6461 7461 2077 7269 7474 656e 2069 f data written i\n+00111980: 6e74 6f20 7468 6520 6275 6666 6572 206d nto the buffer m\n+00111990: 6179 2062 6520 6c65 7373 2074 6861 6e20 ay be less than \n+001119a0: 3c63 6f64 653e 6c65 6e3c 2f63 6f64 653e len\n+001119b0: 2061 6e64 2074 6869 7320 6163 7475 616c and this actual\n+001119c0: 2061 6d6f 756e 7420 7368 6f75 6c64 2062 amount should b\n+001119d0: 6520 7265 7475 726e 6564 2062 7920 7468 e returned by th\n+001119e0: 6520 6361 6c6c 6261 636b 2e20 4120 7265 e callback. A re\n+001119f0: 7475 726e 2076 616c 7565 206f 6620 7a65 turn value of ze\n+00111a00: 726f 2069 6e64 6963 6174 6573 2061 6e20 ro indicates an \n+00111a10: 6572 726f 7220 616e 6420 3c63 6f64 653e error and \n+00111a20: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::erro\n+00111ad0: 723c 2f61 3e3c 2f63 6f64 653e 2073 686f r sho\n+00111ae0: 756c 6420 6265 2073 6574 2e20 5468 6520 uld be set. The \n+00111af0: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size member varia\n+00111b10: 626c 6520 6f66 2074 6865 2061 7474 6163 ble of the attac\n+00111b20: 686d 656e 7420 7374 7275 6374 2f63 6c61 hment struct/cla\n+00111b30: 7373 2077 6974 6820 6461 7461 2028 652e ss with data (e.\n+00111b40: 672e 203c 636f 6465 3e3c 6120 636c 6173 g. xsd__base\n+00111bc0: 3634 4269 6e61 7279 3c2f 613e 3c2f 636f 64Binary or _xop__Include\n+00111c50: 3c2f 613e 3c2f 636f 6465 3e20 7769 7468 with\n+00111c60: 203c 636f 6465 3e5f 5f70 7472 3c2f 636f __ptr, __siz\n+00111c80: 653c 2f63 6f64 653e 2c20 3c63 6f64 653e e, \n+00111c90: 6964 3c2f 636f 6465 3e2c 203c 636f 6465 id, type and\n+00111cb0: 203c 636f 6465 3e6f 7074 696f 6e73 3c2f options members) s\n+00111cd0: 686f 756c 6420 6265 2073 6574 2062 7920 hould be set by \n+00111ce0: 7468 6520 6170 706c 6963 6174 696f 6e20 the application \n+00111cf0: 7072 696f 7220 746f 2074 6865 2073 6572 prior to the ser\n+00111d00: 6961 6c69 7a61 7469 6f6e 206f 6620 7468 ialization of th\n+00111d10: 6520 6d65 7373 6167 6520 7769 7468 2061 e message with a\n+00111d20: 7474 6163 686d 656e 7473 2e20 5468 6520 ttachments. The \n+00111d30: 7661 6c75 6520 6f66 203c 636f 6465 3e5f value of _\n+00111d40: 5f73 697a 653c 2f63 6f64 653e 2069 6e64 _size ind\n+00111d50: 6963 6174 6573 2074 6865 2074 6f74 616c icates the total\n+00111d60: 2073 697a 6520 6f66 2074 6865 2061 7474 size of the att\n+00111d70: 6163 686d 656e 7420 6461 7461 2074 6f20 achment data to \n+00111d80: 6265 2074 7261 6e73 6d69 7474 6564 2e20 be transmitted. \n+00111d90: 4966 2074 6865 203c 636f 6465 3e5f 5f73 If the __s\n+00111da0: 697a 653c 2f63 6f64 653e 206d 656d 6265 ize membe\n+00111db0: 7220 7661 7269 6162 6c65 2069 7320 7a65 r variable is ze\n+00111dc0: 726f 2061 6e64 2048 5454 5020 6368 756e ro and HTTP chun\n+00111dd0: 6b69 6e67 2069 7320 656e 6162 6c65 6420 king is enabled \n+00111de0: 2877 6974 6820 3c63 6f64 653e 2353 4f41 (with #SOA\n+00111df0: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK), then DIME ch\n+00111e10: 756e 6b65 6420 7472 616e 7366 6572 7320 unked transfers \n+00111e20: 6172 6520 6163 7469 7661 7465 6420 6279 are activated by\n+00111e30: 2074 6865 2065 6e67 696e 652c 2077 6869 the engine, whi\n+00111e40: 6368 2069 7320 6d6f 7265 2066 6c65 7869 ch is more flexi\n+00111e50: 626c 6520 7369 6e63 6520 7468 6520 6174 ble since the at\n+00111e60: 7461 6368 6d65 6e74 2064 6174 6120 7369 tachment data si\n+00111e70: 7a65 2064 6f65 7320 6e6f 7420 6e65 6564 ze does not need\n+00111e80: 2074 6f20 6265 2064 6574 6572 6d69 6e65 to be determine\n+00111e90: 6420 696e 2061 6476 616e 6365 2e20 546f d in advance. To\n+00111ea0: 2075 7365 2044 494d 4520 6368 756e 6b65 use DIME chunke\n+00111eb0: 6420 7472 616e 7366 6572 732c 2065 6e61 d transfers, ena\n+00111ec0: 626c 6520 4854 5450 2063 6875 6e6b 696e ble HTTP chunkin\n+00111ed0: 6720 7769 7468 203c 636f 6465 3e23 534f g with #SO\n+00111ee0: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK (also #\n+00111f00: 534f 4150 5f49 4f5f 5354 4f52 453c 2f63 SOAP_IO_STORE can be used\n+00111f20: 2c20 6275 7420 7468 6973 2062 7566 6665 , but this buffe\n+00111f30: 7273 2074 6865 2065 6e74 6972 6520 6d65 rs the entire me\n+00111f40: 7373 6167 6520 696e 206d 656d 6f72 7920 ssage in memory \n+00111f50: 6265 666f 7265 2074 7261 6e73 6d69 7373 before transmiss\n+00111f60: 696f 6e29 2061 6e64 2073 6574 2074 6865 ion) and set the\n+00111f70: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member vari\n+00111f90: 6162 6c65 206f 6620 7468 6520 6174 7461 able of the atta\n+00111fa0: 6368 6d65 6e74 2073 7472 7563 742f 636c chment struct/cl\n+00111fb0: 6173 7320 746f 207a 6572 6f2e 2057 6865 ass to zero. Whe\n+00111fc0: 6e20 4449 4d45 2061 7474 6163 686d 656e n DIME attachmen\n+00111fd0: 7420 6368 756e 6b69 6e67 2069 7320 656e t chunking is en\n+00111fe0: 6162 6c65 642c 2074 6869 7320 6361 6c6c abled, this call\n+00111ff0: 6261 636b 2073 686f 756c 6420 636f 6d70 back should comp\n+00112000: 6c65 7465 6c79 2066 696c 6c20 7468 6520 letely fill the \n+00112010: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf\n+00112020: 2062 7566 6665 7220 7769 7468 203c 636f buffer with len by\n+00112040: 7465 7320 756e 6c65 7373 2074 6865 206c tes unless the l\n+00112050: 6173 7420 6461 7461 2063 6875 6e6b 2069 ast data chunk i\n+00112060: 7320 7265 6163 6865 6420 616e 6420 6665 s reached and fe\n+00112070: 7765 7220 6279 7465 7320 6172 6520 7265 wer bytes are re\n+00112080: 7475 726e 6564 2e3c 2f6c 693e 0a3c 6c69 turned.
    • .void (*so\n+001120a0: 6170 2e66 6469 6d65 7265 6164 636c 6f73 ap.fdimereadclos\n+001120b0: 6529 2873 7472 7563 7420 736f 6170 202a e)(struct soap *\n+001120c0: 736f 6170 2c20 766f 6964 202a 6861 6e64 soap, void *hand\n+001120d0: 6c65 293c 2f63 6f64 653e 2054 6869 7320 le) This \n+001120e0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+001120f0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n+00112100: 2074 6f20 636c 6f73 6520 7468 6520 4449 to close the DI\n+00112110: 4d45 2061 7474 6163 686d 656e 7420 7374 ME attachment st\n+00112120: 7265 616d 2061 6674 6572 2072 6561 6469 ream after readi\n+00112130: 6e67 2e20 5468 6520 3c63 6f64 653e 6861 ng. The ha\n+00112140: 6e64 6c65 3c2f 636f 6465 3e20 7061 7261 ndle para\n+00112150: 6d65 7465 7220 636f 6e74 6169 6e73 2074 meter contains t\n+00112160: 6865 2068 616e 646c 6520 7265 7475 726e he handle return\n+00112170: 6564 2062 7920 7468 6520 3c63 6f64 653e ed by the \n+00112180: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fdi\n+00112220: 6d65 7265 6164 6f70 656e 3c2f 613e 3c2f mereadopen callback.<\n+00112240: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e76 /li>.
    • v\n+00112250: 6f69 6420 2a28 2a73 6f61 702e 6664 696d oid *(*soap.fdim\n+00112260: 6577 7269 7465 6f70 656e 2928 7374 7275 ewriteopen)(stru\n+00112270: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+00112280: 6f6e 7374 2063 6861 7220 2a69 642c 2063 onst char *id, c\n+00112290: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+001122a0: 2063 6f6e 7374 2063 6861 7220 2a6f 7074 const char *opt\n+001122b0: 696f 6e73 293c 2f63 6f64 653e 2043 616c ions) Cal\n+001122c0: 6c65 6420 6279 2074 6865 2074 6f20 7374 led by the to st\n+001122d0: 6172 7420 7265 6365 6976 696e 6720 6120 art receiving a \n+001122e0: 7374 7265 616d 696e 6720 4449 4d45 2061 streaming DIME a\n+001122f0: 7474 6163 686d 656e 742e 2054 6869 7320 ttachment. This \n+00112300: 6361 6c6c 6261 636b 206f 7065 6e73 2061 callback opens a\n+00112310: 2073 7472 6561 6d20 746f 2073 7461 7274 stream to start\n+00112320: 2077 7269 7469 6e67 2074 6865 2061 7474 writing the att\n+00112330: 6163 686d 656e 7420 6461 7461 2072 6563 achment data rec\n+00112340: 6569 7665 642e 2054 6865 2061 6374 7561 eived. The actua\n+00112350: 6c20 6461 7461 2073 7472 6561 6d20 7769 l data stream wi\n+00112360: 6c6c 2062 6520 7772 6974 7465 6e20 696e ll be written in\n+00112370: 2063 6875 6e6b 7320 7573 696e 6720 7468 chunks using th\n+00112380: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::f\n+00112420: 6469 6d65 7772 6974 653c 2f61 3e3c 2f63 dimewrite callback un\n+00112440: 7469 6c20 6e6f 206d 6f72 6520 6461 7461 til no more data\n+00112450: 2069 7320 6176 6169 6c61 626c 6520 616e is available an\n+00112460: 6420 7468 6520 3c63 6f64 653e 3c61 2063 d the soap::fdimewr\n+00112510: 6974 6563 6c6f 7365 3c2f 613e 3c2f 636f iteclose callback is \n+00112530: 6361 6c6c 6564 2074 6f20 636c 6f73 6520 called to close \n+00112540: 7468 6520 7374 7265 616d 2e20 5468 6520 the stream. The \n+00112550: 3c63 6f64 653e 6964 3c2f 636f 6465 3e2c id,\n+00112560: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type and opt\n+00112580: 696f 6e73 3c2f 636f 6465 3e20 7061 7261 ions para\n+00112590: 6d65 7465 7273 2061 7265 2074 6865 203c meters are the <\n+001125a0: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, \n+001125b0: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti\n+001125d0: 6f6e 733c 2f63 6f64 653e 206f 6620 7468 ons of th\n+001125e0: 6520 6174 7461 6368 6d65 6e74 2073 7472 e attachment str\n+001125f0: 7563 742f 636c 6173 7320 2865 2e67 2e20 uct/class (e.g. \n+00112600: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 xsd__base64B\n+00112680: 696e 6172 793c 2f61 3e3c 2f63 6f64 653e inary\n+00112690: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or \n+00112700: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include with __ptr\n+00112730: 2c20 3c63 6f64 653e 5f5f 7369 7a65 3c2f , __size, id<\n+00112750: 2f63 6f64 653e 2c20 3c63 6f64 653e 7479 /code>, ty\n+00112760: 7065 3c2f 636f 6465 3e20 616e 6420 3c63 pe and options members), res\n+00112790: 7065 6374 6976 656c 792e 2054 6865 2063 pectively. The c\n+001127a0: 616c 6c62 6163 6b20 7368 6f75 6c64 2072 allback should r\n+001127b0: 6574 7572 6e20 6120 6861 6e64 6c65 2c20 eturn a handle, \n+001127c0: 7768 6963 6820 6973 2070 6173 7365 6420 which is passed \n+001127d0: 746f 2074 6865 203c 636f 6465 3e3c 6120 to the so\n+00112870: 6170 3a3a 6664 696d 6577 7269 7465 3c2f ap::fdimewrite and soap:\n+00112930: 3a66 6469 6d65 7772 6974 6563 6c6f 7365 :fdimewriteclose\n+00112940: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+00112950: 6261 636b 732e 2054 6865 203c 636f 6465 backs. The __ptr me\n+00112970: 6d62 6572 2076 6172 6961 626c 6520 6f66 mber variable of\n+00112980: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n+00112990: 7374 7275 6374 2f63 6c61 7373 2069 7320 struct/class is \n+001129a0: 7365 7420 6279 2074 6865 2065 6e67 696e set by the engin\n+001129b0: 6520 746f 2074 6865 2076 616c 7565 206f e to the value o\n+001129c0: 6620 7468 6973 2068 616e 646c 652e 2054 f this handle. T\n+001129d0: 6865 203c 636f 6465 3e5f 5f73 697a 653c he __size<\n+001129e0: 2f63 6f64 653e 206d 656d 6265 7220 7661 /code> member va\n+001129f0: 7269 6162 6c65 2069 7320 7365 7420 746f riable is set to\n+00112a00: 2074 6865 2073 697a 6520 6f66 2074 6865 the size of the\n+00112a10: 2061 7474 6163 686d 656e 7420 7265 6365 attachment rece\n+00112a20: 6976 6564 2e20 5468 6520 6d61 7869 6d75 ived. The maximu\n+00112a30: 6d20 4449 4d45 2061 7474 6163 686d 656e m DIME attachmen\n+00112a40: 7420 7369 7a65 2072 6563 6569 7665 6420 t size received \n+00112a50: 6973 206c 696d 6974 6564 2062 7920 3c63 is limited by #SOAP_MAXDIM\n+00112a70: 4553 495a 453c 2f63 6f64 653e 2e3c 2f6c ESIZE..
    • int\n+00112a90: 2028 2a73 6f61 702e 6664 696d 6577 7269 (*soap.fdimewri\n+00112aa0: 7465 2928 7374 7275 6374 2073 6f61 7020 te)(struct soap \n+00112ab0: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han\n+00112ac0: 646c 652c 2063 6f6e 7374 2063 6861 7220 dle, const char \n+00112ad0: 2a62 7566 2c20 7369 7a65 5f74 206c 656e *buf, size_t len\n+00112ae0: 293c 2f63 6f64 653e 2054 6869 7320 6361 ) This ca\n+00112af0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+00112b00: 2062 7920 7468 6520 656e 6769 6e65 2074 by the engine t\n+00112b10: 6f20 7772 6974 6520 6120 6368 756e 6b20 o write a chunk \n+00112b20: 6f66 2061 7474 6163 686d 656e 7420 6461 of attachment da\n+00112b30: 7461 2072 6563 6569 7665 642e 2054 6865 ta received. The\n+00112b40: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter c\n+00112b60: 6f6e 7461 696e 7320 7468 6520 6861 6e64 ontains the hand\n+00112b70: 6c65 2072 6574 7572 6e65 6420 6279 2074 le returned by t\n+00112b80: 6865 203c 636f 6465 3e3c 6120 636c 6173 he \n+00112c20: 736f 6170 3a3a 6664 696d 6577 7269 7465 soap::fdimewrite\n+00112c30: 6f70 656e 3c2f 613e 3c2f 636f 6465 3e20 open \n+00112c40: 6361 6c6c 6261 636b 2e20 5468 6520 3c63 callback. The buf p\n+00112c60: 6172 616d 6574 6572 2063 6f6e 7461 696e arameter contain\n+00112c70: 7320 7468 6520 6461 7461 206f 6620 6c65 s the data of le\n+00112c80: 6e67 7468 203c 636f 6465 3e6c 656e 3c2f ngth len. Returns <\n+00112ca0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+00112cc0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+00112d80: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n+00112d90: 726f 7220 636f 6465 2e3c 2f6c 693e 0a3c ror code.
    • .<\n+00112da0: 6c69 3e3c 636f 6465 3e76 6f69 6420 282a li>void (*\n+00112db0: 736f 6170 2e66 6469 6d65 7772 6974 6563 soap.fdimewritec\n+00112dc0: 6c6f 7365 2928 7374 7275 6374 2073 6f61 lose)(struct soa\n+00112dd0: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h\n+00112de0: 616e 646c 6529 3c2f 636f 6465 3e20 5468 andle) Th\n+00112df0: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+00112e00: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n+00112e10: 696e 6520 746f 2063 6c6f 7365 2074 6865 ine to close the\n+00112e20: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+00112e30: 2073 7472 6561 6d20 6166 7465 7220 7772 stream after wr\n+00112e40: 6974 696e 672e 2054 6865 203c 636f 6465 iting. The handle p\n+00112e60: 6172 616d 6574 6572 2063 6f6e 7461 696e arameter contain\n+00112e70: 7320 7468 6520 6861 6e64 6c65 2072 6574 s the handle ret\n+00112e80: 7572 6e65 6420 6279 2074 6865 203c 636f urned by the soap::\n+00112f30: 6664 696d 6577 7269 7465 6f70 656e 3c2f fdimewriteopen callba\n+00112f50: 636b 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c ck..
    .<\n+00112f60: 703e 496e 2061 6464 6974 696f 6e2c 2061 p>In addition, a\n+00112f70: 203c 636f 6465 3e76 6f69 642a 203c 6120 void* soap::user<\n+00113040: 2f61 3e3c 2f63 6f64 653e 206d 656d 6265 /a> membe\n+00113050: 7220 6973 2061 7661 696c 6162 6c65 2074 r is available t\n+00113060: 6f20 7061 7373 2075 7365 722d 6465 6669 o pass user-defi\n+00113070: 6e65 6420 6461 7461 2074 6f20 7468 6520 ned data to the \n+00113080: 6361 6c6c 6261 636b 732e 2054 6869 7320 callbacks. This \n+00113090: 7761 792c 2079 6f75 2063 616e 2073 6574 way, you can set\n+001130a0: 203c 636f 6465 3e76 6f69 642a 203c 6120 void* soap::user<\n+00113170: 2f61 3e3c 2f63 6f64 653e 2074 6f20 706f /a> to po\n+00113180: 696e 7420 746f 2061 7070 6c69 6361 7469 int to applicati\n+00113190: 6f6e 2064 6174 6120 7468 6174 2074 6865 on data that the\n+001131a0: 2063 616c 6c62 6163 6b73 206e 6565 6420 callbacks need \n+001131b0: 7375 6368 2061 7320 6120 6669 6c65 206e such as a file n\n+001131c0: 616d 6520 666f 7220 6578 616d 706c 652e ame for example.\n+001131d0: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

    .

    The foll\n+001131e0: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il\n+001131f0: 6c75 7374 7261 7465 7320 7468 6520 636c lustrates the cl\n+00113200: 6965 6e74 2d73 6964 6520 696e 6974 6961 ient-side initia\n+00113210: 6c69 7a61 7469 6f6e 206f 6620 616e 2069 lization of an i\n+00113220: 6d61 6765 2061 7474 6163 686d 656e 7420 mage attachment \n+00113230: 7374 7275 6374 2074 6f20 7374 7265 616d struct to stream\n+00113240: 2061 2066 696c 6520 696e 746f 2061 2044 a file into a D\n+00113250: 494d 4520 6174 7461 6368 6d65 6e74 3a3c IME attachment:<\n+00113260: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n+001132b0: 206d 6169 6e28 2920 3c2f 6469 763e 0a3c main()
    .<\n+001132c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001132d0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap\n+00113340: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00113370: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    struct xsd__bas\n+001133f0: 6536 3442 696e 6172 793c 2f61 3e20 696d e64Binary im\n+00113400: 6167 653b 203c 2f64 6976 3e0a 3c64 6976 age;
    . \n+00113420: 4649 4c45 202a 6664 3b20 3c2f 6469 763e FILE *fd;

    \n+00113430: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n+00113460: 7420 3c2f 7370 616e 3e73 7461 7420 7362 t stat sb\n+00113470: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init(\n+001134f0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+00113520: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+00113540: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!fstat(fi\n+00113570: 6c65 6e6f 2866 6429 2c20 2661 6d70 3b73 leno(fd), &s\n+00113580: 6229 2026 616d 703b 2661 6d70 3b20 7362 b) && sb\n+00113590: 2e73 745f 7369 7a65 2026 6774 3b20 3029 .st_size > 0)\n+001135a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+001135f0: 2f2f 2062 6563 6175 7365 2077 6520 6361 // because we ca\n+00113600: 6e20 6765 7420 7468 6520 6c65 6e67 7468 n get the length\n+00113610: 206f 6620 7468 6520 6669 6c65 2c20 7765 of the file, we\n+00113620: 2063 616e 2073 7472 6561 6d20 6974 203c can stream it <\n+00113630: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00113650: 2020 203c 6120 636c 6173 733d 2263 6f64 soap.fdimer\n+001136e0: 6561 646f 7065 6e3c 2f61 3e20 3d20 6469 eadopen = di\n+001136f0: 6d65 5f72 6561 645f 6f70 656e 3b20 3c2f me_read_open; .
    soap.fdimereadclose\n+001137b0: 3c2f 613e 203d 2064 696d 655f 7265 6164 = dime_read\n+001137c0: 5f63 6c6f 7365 3b20 3c2f 6469 763e 0a3c _close;
    .<\n+001137d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001137e0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n+00113810: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fdim\n+00113870: 6572 6561 643c 2f61 3e20 3d20 6469 6d65 eread = dime\n+00113880: 5f72 6561 643b 203c 2f64 6976 3e0a 3c64 _read;
    .\n+001138a0: 2020 2020 696d 6167 652e 5f5f 7074 7220 image.__ptr \n+001138b0: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (uns\n+001138d0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned char*)fd; //\n+00113920: 206d 7573 7420 7365 7420 746f 206e 6f6e must set to non\n+00113930: 2d4e 554c 4c20 2874 6869 7320 6973 206f -NULL (this is o\n+00113940: 7572 2066 6420 6861 6e64 6c65 2077 6869 ur fd handle whi\n+00113950: 6368 2077 6520 6e65 6564 2069 6e20 7468 ch we need in th\n+00113960: 6520 6361 6c6c 6261 636b 7329 203c 2f73 e callbacks)
    .
    \n+00113990: 2069 6d61 6765 2e5f 5f73 697a 6520 3d20 image.__size = \n+001139a0: 7362 2e73 745f 7369 7a65 3b20 3c73 7061 sb.st_size; // must set si\n+001139d0: 7a65 203c 2f73 7061 6e3e 3c2f 6469 763e ze
    \n+001139e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+00113a10: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+00113a30: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+00113a40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00113a50: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n+00113a70: 203c 7370 616e 2063 6c61 7373 3d22 636f // don\n+00113a90: 393b 7420 6b6e 6f77 2074 6865 2073 697a 9;t know the siz\n+00113aa0: 652c 2073 6f20 6275 6666 6572 2069 7420 e, so buffer it \n+00113ab0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00113ad0: 2020 2020 3c73 7061 6e20 636c 6173 733d si\n+00113af0: 7a65 5f74 3c2f 7370 616e 3e20 693b 203c ze_t i; <\n+00113b00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n+00113b40: 2063 3b20 3c2f 6469 763e 0a3c 6469 7620 c;
    .
    \n+00113b60: 2069 6d61 6765 2e5f 5f70 7472 203d 2028 image.__ptr = (\n+00113b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n+00113b90: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char*\n+00113bc0: 293c 6120 636c 6173 733d 2263 6f64 6522 )soap_mallo\n+00113c20: 633c 2f61 3e28 2661 6d70 3b3c 6120 636c c(&soap, MAX_\n+00113c60: 4649 4c45 5f53 495a 4529 3b20 3c2f 6469 FILE_SIZE); .
    for (i\n+00113cb0: 203d 2030 3b20 6920 266c 743b 204d 4158 = 0; i < MAX\n+00113cc0: 5f46 494c 455f 5349 5a45 3b20 692b 2b29 _FILE_SIZE; i++)\n+00113cd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {<\n+00113cf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if ((c = fgetc(fd\n+00113d40: 2929 203d 3d20 454f 4629 203c 2f64 6976 )) == EOF) .
    break;
    .
    \n+00113db0: 2020 2069 6d61 6765 2e5f 5f70 7472 5b69 image.__ptr[i\n+00113dc0: 5d20 3d20 633b 203c 2f64 6976 3e0a 3c64 ] = c;
    .\n+00113de0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . \n+00113e00: 2020 2066 636c 6f73 6528 6664 293b 203c fclose(fd); <\n+00113e10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    imag\n+00113e30: 652e 5f5f 7369 7a65 203d 2069 3b20 3c2f e.__size = i; .
    } .
    image.type\n+00113e80: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+00113ea0: 7175 6f74 3b69 6d61 6765 2f6a 7065 6726 quot;image/jpeg&\n+00113eb0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    image.o\n+00113ee0: 7074 696f 6e73 203d 203c 6120 636c 6173 ptions = soap_\n+00113f40: 6469 6d65 5f6f 7074 696f 6e3c 2f61 3e28 dime_option(\n+00113f50: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+00113f80: 3c2f 613e 2c20 302c 203c 7370 616e 2063 , 0, "My pi\n+00113fb0: 6374 7572 6526 7175 6f74 3b3c 2f73 7061 cture");
    . \n+00113fe0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n+00114010: 735f 5f77 6562 6d65 7468 6f64 2826 616d s__webmethod(&am\n+00114020: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, ...))
    .<\n+00114060: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00114070: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n+00114090: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else.
    ... <\n+00114100: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00114110: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n+00114120: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+00114140: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .void *dime_read_o\n-001141c0: 7065 6e28 3c73 7061 6e20 636c 6173 733d pen(struct\n-001141e0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373
    s\n-00114210: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-00114240: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, void \n-00114270: 2a68 616e 646c 652c 203c 7370 616e 2063 *handle, c\n-00114290: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *id<\n-001142e0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, co\n-00114300: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-00114330: 202a 7479 7065 2c20 3c73 7061 6e20 636c *type, co\n-00114350: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-00114380: 202a 6f70 7469 6f6e 7329 203c 2f64 6976 *options) vo\n+00114190: 6964 3c2f 7370 616e 3e20 2a64 696d 655f id *dime_\n+001141a0: 7265 6164 5f6f 7065 6e28 3c73 7061 6e20 read_open(\n+001141c0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00114200: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00114210: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00114220: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00114230: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle, <\n+00114260: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00114270: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001142a0: 3c2f 7370 616e 3e20 2a3c 7370 616e 2063 *id, const\n+001142f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+00114310: 2f73 7061 6e3e 202a 7479 7065 2c20 3c73 /span> *type, const\n+00114340: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+00114360: 2f73 7061 6e3e 202a 6f70 7469 6f6e 7329 /span> *options)\n+00114370: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    {
    . \n-001143c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001143e0: 3c2f 7370 616e 3e20 6861 6e64 6c65 3b20 handle; \n-001143f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } \n+001143c0: 7265 7475 726e 3c2f 7370 616e 3e20 6861 return ha\n+001143d0: 6e64 6c65 3b20 3c2f 6469 763e 0a3c 6469 ndle;
    .}\n+001143f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .void dime_read_cl\n-00114470: 6f73 6528 3c73 7061 6e20 636c 6173 733d ose(struct\n-00114490: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-001144c0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-001144f0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, void \n-00114520: 2a68 616e 646c 6529 203c 2f64 6976 3e0a *handle)
    .\n+00114420: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne\">vo\n+00114440: 6964 3c2f 7370 616e 3e20 6469 6d65 5f72 id dime_r\n+00114450: 6561 645f 636c 6f73 6528 3c73 7061 6e20 ead_close(\n+00114470: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+001144b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001144c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001144d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001144e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle) <\n+00114510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n 00114530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    fc\n-00114560: 6c6f 7365 2828 4649 4c45 2a29 6861 6e64 lose((FILE*)hand\n-00114570: 6c65 293b 203c 2f64 6976 3e0a 3c64 6976 le);
    .} \n+00114540: 223e 2020 6663 6c6f 7365 2828 4649 4c45 \"> fclose((FILE\n+00114550: 2a29 6861 6e64 6c65 293b 203c 2f64 6976 *)handle); .
    }
    . \n 00114590: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001145b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    siz\n-001145e0: 655f 743c 2f73 7061 6e3e 2064 696d 655f e_t dime_\n-001145f0: 7265 6164 283c 7370 616e 2063 6c61 7373 read(struc\n-00114610: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-00114640: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, void\n-001146a0: 202a 6861 6e64 6c65 2c20 3c73 7061 6e20 *handle, char \n-001146d0: 2a62 7566 2c20 3c73 7061 6e20 636c 6173 *buf, \n-001146f0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le\n-00114700: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {.
    return \n-00114760: 6672 6561 6428 6275 662c 2031 2c20 6c65 fread(buf, 1, le\n-00114770: 6e2c 2028 4649 4c45 2a29 6861 6e64 6c65 n, (FILE*)handle\n-00114780: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    }.
    <\n-00114810: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-00114820: 726f 7570 5f5f 6361 6c6c 6261 636b 732e roup__callbacks.\n-00114830: 6874 6d6c 2367 6130 3638 3435 3563 6534 html#ga068455ce4\n-00114840: 3137 6264 6462 3136 3336 6434 6435 3635 17bddb1636d4d565\n-00114850: 6530 6562 6635 3622 3e73 6f61 703a 3a66 e0ebf56\">soap::f\n-00114860: 6469 6d65 7265 6164 6f70 656e 3c2f 613e dimereadopen\n-00114870: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void *\n-00114890: 282a 2066 6469 6d65 7265 6164 6f70 656e (* fdimereadopen\n-001148a0: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-001148b0: 6f61 702c 2076 6f69 6420 2a68 616e 646c oap, void *handl\n-001148c0: 652c 2063 6f6e 7374 2063 6861 7220 2a69 e, const char *i\n-001148d0: 642c 2063 6f6e 7374 2063 6861 7220 2a74 d, const char *t\n-001148e0: 7970 652c 2063 6f6e 7374 2063 6861 7220 ype, const char \n-001148f0: 2a6f 7074 696f 6e73 293c 2f64 6976 3e3c *options)
    <\n-00114900: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00114910: 223e 4361 6c6c 6261 636b 2074 6f20 6f70 \">Callback to op\n-00114920: 656e 2061 2073 7472 6561 6d69 6e67 2044 en a streaming D\n-00114930: 494d 4520 6174 7461 6368 6d65 6e74 2066 IME attachment f\n-00114940: 6f72 2072 6561 6469 6e67 2e3c 2f64 6976 or reading.
    Definitio\n-00114970: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-00114980: 683a 3436 3934 3c2f 6469 763e 3c2f 6469 h:4694
    .
    soap::fd\n-00114a50: 696d 6572 6561 6463 6c6f 7365 3c2f 613e imereadclose\n-00114a60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void(*\n-00114a80: 2066 6469 6d65 7265 6164 636c 6f73 6529 fdimereadclose)\n-00114a90: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-00114aa0: 6170 2c20 766f 6964 202a 6861 6e64 6c65 ap, void *handle\n-00114ab0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n-00114ad0: 636b 2074 6f20 636c 6f73 6520 6120 4449 ck to close a DI\n-00114ae0: 4d45 2061 7474 6163 686d 656e 7420 7374 ME attachment st\n-00114af0: 7265 616d 2061 6674 6572 2072 6561 6469 ream after readi\n-00114b00: 6e67 2e3c 2f64 6976 3e3c 6469 7620 636c ng.
    D\n-00114b20: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-00114b30: 7464 736f 6170 322e 683a 3437 3339 3c2f tdsoap2.h:4739
    ..
    \n-00114d60: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    soap\n-00114dc0: 5f6d 616c 6c6f 633c 2f61 3e3c 2f64 6976 _malloc
    void * soap\n-00114df0: 5f6d 616c 6c6f 6328 7374 7275 6374 2073 _malloc(struct s\n-00114e00: 6f61 7020 2a73 6f61 702c 2073 697a 655f oap *soap, size_\n-00114e10: 7420 6c65 6e29 3c2f 6469 763e 3c64 6976 t len)
    A\n-00114e30: 6c6c 6f63 6174 6520 6120 626c 6f63 6b20 llocate a block \n-00114e40: 6f66 2068 6561 7020 6d65 6d6f 7279 206d of heap memory m\n-00114e50: 616e 6167 6564 2062 7920 7468 6520 7370 anaged by the sp\n-00114e60: 6563 6966 6965 6420 736f 6170 2063 6f6e ecified soap con\n-00114e70: 7465 7874 2e3c 2f64 6976 3e3c 2f64 6976 text.
    .

    The \n-00114ea0: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl\n-00114eb0: 6520 696c 6c75 7374 7261 7465 7320 7468 e illustrates th\n-00114ec0: 6520 7374 7265 616d 696e 6720 6f66 2061 e streaming of a\n-00114ed0: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-00114ee0: 2069 6e74 6f20 6120 6669 6c65 2062 7920 into a file by \n-00114ef0: 6120 636c 6965 6e74 3a3c 2f70 3e0a 3c64 a client:

    .
    \n-00114f40: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-00114f50: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str\n-00114fa0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    soap\n-00115080: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n-00115090: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001150a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001150b0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-001150c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap.fdimewriteope\n-00115170: 6e3c 2f61 3e20 3d20 6469 6d65 5f77 7269 n = dime_wri\n-00115180: 7465 5f6f 7065 6e3b 203c 2f64 6976 3e0a te_open;
    .\n-00115190: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n-001151d0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.fdime\n-00115230: 7772 6974 6563 6c6f 7365 3c2f 613e 203d writeclose =\n-00115240: 2064 696d 655f 7772 6974 655f 636c 6f73 dime_write_clos\n-00115250: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    soap.fdimewrite<\n-00115300: 2f61 3e20 3d20 6469 6d65 5f77 7269 7465 /a> = dime_write\n-00115310: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n-00115350: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n-00115360: 7765 626d 6574 686f 6428 2661 6d70 3b3c webmethod(&<\n-00115370: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115380: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115390: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001153a0: 2e2e 2e29 293c 2f64 6976 3e0a 3c64 6976 ...))
    . \n-001153c0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-001153e0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    \n-00115420: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... // success
    .
    } size_t\n+001145d0: 2064 696d 655f 7265 6164 283c 7370 616e dime_read(struct <\n+00114600: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00114610: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00114620: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00114630: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00114660: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+00114680: 2f73 7061 6e3e 202a 6861 6e64 6c65 2c20 /span> *handle, \n+00114690: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *buf, size_t len)
    .\n+001146f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    return fread(buf,\n+00114750: 2031 2c20 6c65 6e2c 2028 4649 4c45 2a29 1, len, (FILE*)\n+00114760: 6861 6e64 6c65 293b 203c 2f64 6976 3e0a handle);
    .\n+00114770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    \n+00114870: 766f 6964 202a 282a 2066 6469 6d65 7265 void *(* fdimere\n+00114880: 6164 6f70 656e 2928 7374 7275 6374 2073 adopen)(struct s\n+00114890: 6f61 7020 2a73 6f61 702c 2076 6f69 6420 oap *soap, void \n+001148a0: 2a68 616e 646c 652c 2063 6f6e 7374 2063 *handle, const c\n+001148b0: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c\n+001148c0: 6861 7220 2a74 7970 652c 2063 6f6e 7374 har *type, const\n+001148d0: 2063 6861 7220 2a6f 7074 696f 6e73 293c char *options)<\n+001148e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n+00114900: 2074 6f20 6f70 656e 2061 2073 7472 6561 to open a strea\n+00114910: 6d69 6e67 2044 494d 4520 6174 7461 6368 ming DIME attach\n+00114920: 6d65 6e74 2066 6f72 2072 6561 6469 6e67 ment for reading\n+00114930: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+00114950: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00114960: 736f 6170 322e 683a 3436 3934 3c2f 6469 soap2.h:4694
    .
    \n+001149d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+00114a60: 766f 6964 282a 2066 6469 6d65 7265 6164 void(* fdimeread\n+00114a70: 636c 6f73 6529 2873 7472 7563 7420 736f close)(struct so\n+00114a80: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void *\n+00114a90: 6861 6e64 6c65 293c 2f64 6976 3e3c 6469 handle)
    \n+00114ab0: 4361 6c6c 6261 636b 2074 6f20 636c 6f73 Callback to clos\n+00114ac0: 6520 6120 4449 4d45 2061 7474 6163 686d e a DIME attachm\n+00114ad0: 656e 7420 7374 7265 616d 2061 6674 6572 ent stream after\n+00114ae0: 2072 6561 6469 6e67 2e3c 2f64 6976 3e3c reading.
    <\n+00114af0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00114b00: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00114b10: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00114b20: 3437 3339 3c2f 6469 763e 3c2f 6469 763e 4739
    \n+00114b30: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    <\n+00114c00: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00114c10: 6922 3e73 697a 655f 7428 2a20 6664 696d i\">size_t(* fdim\n+00114c20: 6572 6561 6429 2873 7472 7563 7420 736f eread)(struct so\n+00114c30: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void *\n+00114c40: 6861 6e64 6c65 2c20 6368 6172 202a 6275 handle, char *bu\n+00114c50: 662c 2073 697a 655f 7420 6c65 6e29 3c2f f, size_t len)
    Callback \n+00114c80: 746f 2072 6561 6420 6461 7461 2069 6e20 to read data in \n+00114c90: 6120 4449 4d45 2061 7474 6163 686d 656e a DIME attachmen\n+00114ca0: 7420 7374 7265 616d 2e3c 2f64 6976 3e3c t stream.
    <\n+00114cb0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00114cc0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00114cd0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00114ce0: 3437 3234 3c2f 6469 763e 3c2f 6469 763e 4724
    \n+00114cf0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    <\n+00114e80: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following \n+00114e90: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra\n+00114ea0: 7465 7320 7468 6520 7374 7265 616d 696e tes the streamin\n+00114eb0: 6720 6f66 2061 2044 494d 4520 6174 7461 g of a DIME atta\n+00114ec0: 6368 6d65 6e74 2069 6e74 6f20 6120 6669 chment into a fi\n+00114ed0: 6c65 2062 7920 6120 636c 6965 6e74 3a3c le by a client:<\n+00114ee0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    int\n+00114f30: 206d 6169 6e28 2920 3c2f 6469 763e 0a3c main()
    .<\n+00114f40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00114f50: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap\n+00114fc0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00114ff0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init(\n+00115070: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+001150a0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+001150c0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.fdimewr\n+00115150: 6974 656f 7065 6e3c 2f61 3e20 3d20 6469 iteopen = di\n+00115160: 6d65 5f77 7269 7465 5f6f 7065 6e3b 203c me_write_open; <\n+00115170: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fdimewriteclose\n+00115220: 3c2f 613e 203d 2064 696d 655f 7772 6974 = dime_writ\n+00115230: 655f 636c 6f73 653b 203c 2f64 6976 3e0a e_close;
    .\n+00115240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n+00115300: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00115310: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00115330: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n+00115340: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n+00115350: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+00115380: 3c2f 613e 2c20 2e2e 2e29 293c 2f64 6976 , ...)).
    ... // error
    .
    else
    .
    ..\n+00115430: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe\n+00115450: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
    .\n+00115460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .<\n-001154b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001154c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-001154e0: 2f73 7061 6e3e 202a 6469 6d65 5f77 7269 /span> *dime_wri\n-001154f0: 7465 5f6f 7065 6e28 3c73 7061 6e20 636c te_open(st\n-00115510: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n-001155a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001155c0: 2f73 7061 6e3e 202a 3c73 7061 6e20 636c /span> *id, const \n-00115610: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *type, const \n-00115660: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *options) \n+001154a0: 226c 696e 6522 3e3c 7370 616e 2063 6c61 \"line\">void *di\n+001154d0: 6d65 5f77 7269 7465 5f6f 7065 6e28 3c73 me_write_open(struct soap *soap, const<\n+00115580: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *id, const \n+00115610: 6368 6172 3c2f 7370 616e 3e20 2a74 7970 char *typ\n+00115620: 652c 203c 7370 616e 2063 6c61 7373 3d22 e, const \n+00115660: 6368 6172 3c2f 7370 616e 3e20 2a6f 7074 char *opt\n+00115670: 696f 6e73 2920 3c2f 6469 763e 0a3c 6469 ions)
    .{\n 00115690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001156b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    FILE *handl\n-001156d0: 6520 3d20 3c61 2063 6c61 7373 3d22 636f e = fopen\n-00115730: 3c2f 613e 283c 7370 616e 2063 6c61 7373 ("somefile&\n-00115760: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n-00115790: 7762 2671 756f 743b 3c2f 7370 616e 3e29 wb")\n-001157a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n-001157e0: 2028 2168 616e 646c 6529 203c 2f64 6976 (!handle) .
    {
    .\n-00115820: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap<\n-00115850: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error = SOAP_EOF; <\n-00115910: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..<\n-001159f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00115a00: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00115a20: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00115a40: 3c2f 7370 616e 3e20 283c 7370 616e 2063 (void*)\n-00115a70: 6861 6e64 6c65 3b20 3c2f 6469 763e 0a3c handle;
    .<\n-00115a80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00115a90: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    ..
    {.
    fc\n-00115c40: 6c6f 7365 3c2f 613e 2828 4649 4c45 2a29 lose((FILE*)\n-00115c50: 6861 6e64 6c65 293b 203c 2f64 6976 3e0a handle);
    .\n-00115c60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int dime\n-00115cd0: 5f77 7269 7465 283c 7370 616e 2063 6c61 _write(str\n-00115cf0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle, const <\n-00115db0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00115dc0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *b\n-00115e20: 7566 3c2f 613e 2c20 3c73 7061 6e20 636c uf, size_t \n-00115e50: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
    .{<\n-00115e70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t nwritten; .
    while (l\n-00115f00: 656e 2920 3c2f 6469 763e 0a3c 6469 7620 en)
    .
    {\n-00115f20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    nwr\n-00115f40: 6974 7465 6e20 3d20 6677 7269 7465 283c itten = fwrite(<\n-00115f50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115f60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115f70: 6874 6d6c 2361 6364 6131 3733 3666 6261 html#acda1736fba\n-00115f80: 6163 3037 3236 3132 3236 6265 6665 3136 ac07261226befe16\n-00115f90: 3561 3536 3831 223e 6275 663c 2f61 3e2c 5a5681\">buf,\n-00115fa0: 2031 2c20 6c65 6e2c 2028 4649 4c45 2a29 1, len, (FILE*)\n-00115fb0: 6861 6e64 6c65 293b 203c 2f64 6976 3e0a handle);
    .\n-00115fc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00115ff0: 6966 3c2f 7370 616e 3e20 2821 6e77 7269 if (!nwri\n-00116000: 7474 656e 2920 3c2f 6469 763e 0a3c 6469 tten)
    . \n-00116020: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n-00116040: 2020 203c 6120 636c 6173 733d 2263 6f64 soap->\n-001160c0: 6572 726e 756d 3c2f 613e 203d 2065 7272 errnum = err\n-001160d0: 6e6f 3b20 3c73 7061 6e20 636c 6173 733d no; // get\n-001160f0: 2072 6561 736f 6e20 3c2f 7370 616e 3e3c reason <\n-00116100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..<\n-001161b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001161c0: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    .\n-001161e0: 2020 2020 6c65 6e20 2d3d 206e 7772 6974 len -= nwrit\n-001161f0: 7465 6e3b 203c 2f64 6976 3e0a 3c64 6976 ten;
    . \n-00116210: 2020 3c61 2063 6c61 7373 3d22 636f 6465 buf += nwritten; \n-00116270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    return \n-001162d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n-00116330: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }.
    soap::fdi\n-00116410: 6d65 7772 6974 653c 2f61 3e3c 2f64 6976 mewrite
    int(* fdime\n-00116440: 7772 6974 6529 2873 7472 7563 7420 736f write)(struct so\n-00116450: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void *\n-00116460: 2c20 636f 6e73 7420 6368 6172 202a 2c20 , const char *, \n-00116470: 7369 7a65 5f74 293c 2f64 6976 3e3c 6469 size_t)
    \n-00116490: 4361 6c6c 6261 636b 2074 6f20 7772 6974 Callback to writ\n-001164a0: 6520 6461 7461 2069 6e20 6120 4449 4d45 e data in a DIME\n-001164b0: 2061 7474 6163 686d 656e 7420 7374 7265 attachment stre\n-001164c0: 616d 2e3c 2f64 6976 3e3c 6469 7620 636c am.
    D\n-001164e0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-001164f0: 7464 736f 6170 322e 683a 3438 3232 3c2f tdsoap2.h:4822
    .
    <\n-001165e0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-001165f0: 6922 3e76 6f69 6428 2a20 6664 696d 6577 i\">void(* fdimew\n-00116600: 7269 7465 636c 6f73 6529 2873 7472 7563 riteclose)(struc\n-00116610: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n-00116620: 6964 202a 6861 6e64 6c65 293c 2f64 6976 id *handle)
    Callback to \n-00116650: 636c 6f73 6520 6120 4449 4d45 2061 7474 close a DIME att\n-00116660: 6163 686d 656e 7420 7374 7265 616d 2061 achment stream a\n-00116670: 6674 6572 2077 7269 7469 6e67 2e3c 2f64 fter writing.
    Definit\n-001166a0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-001166b0: 322e 683a 3438 3333 3c2f 6469 763e 3c2f 2.h:4833
    .
    \n-00116730: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n-00116780: 6664 696d 6577 7269 7465 6f70 656e 3c2f fdimewriteopen
    void\n-001167b0: 202a 282a 2066 6469 6d65 7772 6974 656f *(* fdimewriteo\n-001167c0: 7065 6e29 2873 7472 7563 7420 736f 6170 pen)(struct soap\n-001167d0: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-001167e0: 6172 202a 6964 2c20 636f 6e73 7420 6368 ar *id, const ch\n-001167f0: 6172 202a 7479 7065 2c20 636f 6e73 7420 ar *type, const \n-00116800: 6368 6172 202a 6f70 7469 6f6e 7329 3c2f char *options)
    Callback \n-00116830: 746f 206f 7065 6e20 6120 7374 7265 616d to open a stream\n-00116840: 696e 6720 4449 4d45 2061 7474 6163 686d ing DIME attachm\n-00116850: 656e 7420 666f 7220 7772 6974 696e 672e ent for writing.\n-00116860: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-00116880: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-00116890: 6f61 7032 2e68 3a34 3831 303c 2f64 6976 oap2.h:4810
    .
    <\n-00116900: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00116910: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n-00116960: 703a 3a66 6f70 656e 3c2f 613e 3c2f 6469 p::fopen
    SOAP_SOCKE\n-00116990: 5428 2a20 666f 7065 6e29 2873 7472 7563 T(* fopen)(struc\n-001169a0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n-001169b0: 6e73 7420 6368 6172 202a 656e 6470 6f69 nst char *endpoi\n-001169c0: 6e74 2c20 636f 6e73 7420 6368 6172 202a nt, const char *\n-001169d0: 686f 7374 2c20 696e 7420 706f 7274 293c host, int port)<\n-001169e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n-00116a00: 2074 6861 7420 6f70 656e 7320 6120 736f that opens a so\n-00116a10: 636b 6574 2063 6f6e 6e65 6374 696f 6e20 cket connection \n-00116a20: 746f 2061 2073 6572 7665 7220 656e 6470 to a server endp\n-00116a30: 6f69 6e74 2e3c 2f64 6976 3e3c 6469 7620 oint.
    Definition:\n-00116a60: 2073 7464 736f 6170 322e 683a 3434 3935 stdsoap2.h:4495\n-00116a70: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    .\n-00116c10: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    S\n-00116cc0: 4f41 505f 454f 463c 2f61 3e3c 2f64 6976 OAP_EOF
    #define SOA\n-00116cf0: 505f 454f 463c 2f64 6976 3e3c 6469 7620 P_EOF
    A \n-00116d10: 736f 6170 5f73 7461 7475 7320 6572 726f soap_status erro\n-00116d20: 7220 636f 6465 3a20 756e 6578 7065 6374 r code: unexpect\n-00116d30: 6564 2065 6e64 206f 6620 6669 6c65 2c20 ed end of file, \n-00116d40: 6e6f 2069 6e70 7574 2c20 7472 616e 736d no input, transm\n-00116d50: 6973 7369 6f6e 2069 6e74 6572 7275 7074 ission interrupt\n-00116d60: 6564 206f 7220 7469 6d65 6420 6f75 7420 ed or timed out \n-00116d70: 2873 612e 2e2e 3c2f 6469 763e 3c64 6976 (sa...
    <\n-00116d90: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:236\n-00116db0: 353c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 5
    .

    Message \n-00116de0: 636f 6d70 7265 7373 696f 6e20 7769 7468 compression with\n-00116df0: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n-00116e00: 5f5a 4c49 423c 2f63 6f64 653e 2063 616e _ZLIB can\n-00116e10: 2062 6520 7573 6564 2077 6974 6820 4449 be used with DI\n-00116e20: 4d45 2074 6f20 636f 6d70 7265 7373 2074 ME to compress t\n-00116e30: 6865 2065 6e74 6972 6520 6d65 7373 6167 he entire messag\n-00116e40: 652e 2048 6f77 6576 6572 2c20 636f 6d70 e. However, comp\n-00116e50: 7265 7373 696f 6e20 7265 7175 6972 6573 ression requires\n-00116e60: 2062 7566 6665 7269 6e67 2074 6f20 6465 buffering to de\n-00116e70: 7465 726d 696e 6520 7468 6520 4854 5450 termine the HTTP\n-00116e80: 2063 6f6e 7465 6e74 206c 656e 6774 6820 content length \n-00116e90: 6865 6164 6572 2c20 7768 6963 6820 6361 header, which ca\n-00116ea0: 6e63 656c 7320 7468 6520 6265 6e65 6669 ncels the benefi\n-00116eb0: 7473 206f 6620 7374 7265 616d 696e 6720 ts of streaming \n-00116ec0: 4449 4d45 2e20 546f 2061 766f 6964 2074 DIME. To avoid t\n-00116ed0: 6869 732c 2079 6f75 2073 686f 756c 6420 his, you should \n-00116ee0: 7573 6520 6368 756e 6b65 6420 4854 5450 use chunked HTTP\n-00116ef0: 2028 7769 7468 2074 6865 206f 7574 7075 (with the outpu\n-00116f00: 742d 6d6f 6465 203c 636f 6465 3e23 534f t-mode #SO\n-00116f10: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK flag) with co\n-00116f30: 6d70 7265 7373 696f 6e20 616e 6420 7374 mpression and st\n-00116f40: 7265 616d 696e 6720 4449 4d45 2e20 4174 reaming DIME. At\n-00116f50: 2074 6865 2073 6572 7665 7220 7369 6465 the server side\n-00116f60: 2c20 7768 656e 2079 6f75 2073 6574 203c , when you set <\n-00116f70: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n-00116f80: 554e 4b3c 2f63 6f64 653e 2062 6566 6f72 UNK befor\n-00116f90: 6520 6361 6c6c 696e 6720 3c63 6f64 653e e calling \n-00116fa0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n-00117010: 6f61 705f 7365 7276 653c 2f61 3e3c 2f63 oap_serve, the engine\n-00117030: 2077 696c 6c20 6175 746f 6d61 7469 6361 will automatica\n-00117040: 6c6c 7920 7265 7665 7274 2074 6f20 6275 lly revert to bu\n-00117050: 6666 6572 696e 6720 283c 636f 6465 3e23 ffering (#\n-00117060: 534f 4150 5f49 4f5f 5354 4f52 453c 2f63 SOAP_IO_STORE flag is set\n-00117080: 292e 2059 6f75 2063 616e 2063 6865 636b ). You can check\n-00117090: 2074 6869 7320 666c 6167 2077 6974 6820 this flag with \n-001170a0: 3c63 6f64 653e 2873 6f61 702d 2667 743b (soap->\n-001170b0: 6f6d 6f64 6520 2661 6d70 3b20 534f 4150 omode & SOAP\n-001170c0: 5f49 4f29 203d 3d20 534f 4150 5f49 4f5f _IO) == SOAP_IO_\n-001170d0: 4348 554e 4b3c 2f63 6f64 653e 2074 6f20 CHUNK to \n-001170e0: 7365 6520 6966 2074 6865 2063 6c69 656e see if the clien\n-001170f0: 7420 6163 6365 7074 7320 6368 756e 6b69 t accepts chunki\n-00117100: 6e67 2e20 4d6f 7265 2069 6e66 6f72 6d61 ng. More informa\n-00117110: 7469 6f6e 2061 626f 7574 2073 7472 6561 tion about strea\n-00117120: 6d69 6e67 2063 6875 6e6b 6564 2044 494d ming chunked DIM\n-00117130: 4520 6361 6e20 6265 2066 6f75 6e64 2069 E can be found i\n-00117140: 6e20 5365 6374 696f 6e20 3c61 2063 6c61 n Section Streaming\n-00117180: 2063 6875 6e6b 6564 2044 494d 453c 2f61 chunked DIME .

    .
    Warning<\n-001171c0: 2f64 743e 3c64 643e 5468 6520 3c63 6f64 /dt>
    The options\n-001171e0: 206d 656d 6265 7220 6973 2061 2044 494d member is a DIM\n-001171f0: 452d 7370 6563 6966 6963 2064 6174 6120 E-specific data \n-00117200: 7374 7275 6374 7572 652c 2063 6f6e 7369 structure, consi\n-00117210: 7374 696e 6720 6f66 2061 2034 2062 7974 sting of a 4 byt\n-00117220: 6520 6865 6164 6572 2063 6f6e 7461 696e e header contain\n-00117230: 696e 6720 7468 6520 6f70 7469 6f6e 2074 ing the option t\n-00117240: 7970 6520 696e 666f 2028 6869 2062 7974 ype info (hi byt\n-00117250: 652c 206c 6f20 6279 7465 292c 206f 7074 e, lo byte), opt\n-00117260: 696f 6e20 7374 7269 6e67 206c 656e 6774 ion string lengt\n-00117270: 6820 2868 6920 6279 7465 2c20 6c6f 2062 h (hi byte, lo b\n-00117280: 7974 6529 2c20 666f 6c6c 6f77 6564 2062 yte), followed b\n-00117290: 7920 6120 6e6f 6e2d 275c 3027 2074 6572 y a non-'\\0' ter\n-001172a0: 6d69 6e61 7465 6420 7374 7269 6e67 2e20 minated string. \n-001172b0: 5468 6520 4449 4d45 2068 616e 646c 6572 The DIME handler\n-001172c0: 2072 6563 6f67 6e69 7a65 7320 6f6e 6520 recognizes one \n-001172d0: 6f70 7469 6f6e 2061 7420 6d6f 7374 2e3c option at most.<\n-001172e0: 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 9f94 /dd>
    .

    ...\n-001172f0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n-00117300: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n-00117310: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n-00117320: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Str\n-00117350: 6561 6d69 6e67 2063 6875 6e6b 6564 2044 eaming chunked D\n-00117360: 494d 453c 2f68 323e 0a3c 703e 546f 2073 IME

    .

    To s\n-00117370: 656e 6420 4449 4d45 2061 7474 6163 686d end DIME attachm\n-00117380: 656e 7473 2c20 7468 6520 6174 7461 6368 ents, the attach\n-00117390: 6d65 6e74 2073 697a 6573 206d 7573 7420 ment sizes must \n-001173a0: 6265 2064 6574 6572 6d69 6e65 6420 696e be determined in\n-001173b0: 2061 6476 616e 6365 2074 6f20 6361 6c63 advance to calc\n-001173c0: 756c 6174 6520 4854 5450 206d 6573 7361 ulate HTTP messa\n-001173d0: 6765 206c 656e 6774 6820 7265 7175 6972 ge length requir\n-001173e0: 6564 2074 6f20 7374 7265 616d 2044 494d ed to stream DIM\n-001173f0: 4520 6f76 6572 2048 5454 502e 2048 6f77 E over HTTP. How\n-00117400: 6576 6572 2c20 6368 756e 6b65 6420 4449 ever, chunked DI\n-00117410: 4d45 2074 6f67 6574 6865 7220 7769 7468 ME together with\n-00117420: 2063 6875 6e6b 6564 2048 5454 5020 6361 chunked HTTP ca\n-00117430: 6e20 6265 2075 7365 6420 746f 206f 6d69 n be used to omi\n-00117440: 7420 7468 6973 2073 7465 702e 2046 6972 t this step. Fir\n-00117450: 7374 2073 6574 2074 6865 203c 636f 6465 st set the #SOAP_IO_CHUNK<\n-00117470: 2f63 6f64 653e 2066 6c61 672e 2054 6865 /code> flag. The\n-00117480: 6e2c 2074 6f20 7374 7265 616d 2063 6875 n, to stream chu\n-00117490: 6e6b 6564 2044 494d 452c 2073 6574 2074 nked DIME, set t\n-001174a0: 6865 203c 636f 6465 3e5f 5f73 697a 653c he __size<\n-001174b0: 2f63 6f64 653e 206d 656d 6265 7220 6f66 /code> member of\n-001174c0: 2061 6e20 6174 7461 6368 6d65 6e74 2074 an attachment t\n-001174d0: 6f20 7a65 726f 2061 6e64 2065 6e61 626c o zero and enabl\n-001174e0: 6520 4449 4d45 2063 6875 6e6b 696e 672e e DIME chunking.\n-001174f0: 2054 6865 2044 494d 4520 3c63 6f64 653e The DIME \n-00117500: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n-00117590: 736f 6170 3a3a 6664 696d 6572 6561 643c soap::fdimeread<\n-001175a0: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a> callb\n-001175b0: 6163 6b20 7468 656e 2066 6574 6368 6573 ack then fetches\n-001175c0: 2064 6174 6120 696e 2063 6875 6e6b 7320 data in chunks \n-001175d0: 616e 6420 6974 2069 7320 696d 706f 7274 and it is import\n-001175e0: 616e 7420 746f 2066 696c 6c20 7468 6520 ant to fill the \n-001175f0: 656e 7469 7265 2062 7566 6665 7220 756e entire buffer un\n-00117600: 6c65 7373 2074 6865 2065 6e64 206f 6620 less the end of \n-00117610: 7468 6520 6461 7461 2068 6173 2062 6565 the data has bee\n-00117620: 6e20 7265 6163 6865 6420 616e 6420 7468 n reached and th\n-00117630: 6520 6c61 7374 2063 6875 6e6b 2069 7320 e last chunk is \n-00117640: 746f 2062 6520 7365 6e64 2e20 5468 6174 to be send. That\n-00117650: 2069 732c 203c 636f 6465 3e3c 6120 636c is, soap:\n-001176f0: 3a66 6469 6d65 7265 6164 3c2f 613e 3c2f :fdimeread should ret\n-00117710: 7572 6e20 7468 6520 7661 6c75 6520 6f66 urn the value of\n-00117720: 2074 6865 206c 6173 7420 3c63 6f64 653e the last \n-00117730: 6c65 6e3c 2f63 6f64 653e 2070 6172 616d len param\n-00117740: 6574 6572 2061 6e64 2066 696c 6c20 7468 eter and fill th\n-00117750: 6520 656e 7469 7265 2062 7566 6665 7220 e entire buffer \n-00117760: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf\n-00117770: 2066 6f72 2061 6c6c 2063 6875 6e6b 7320 for all chunks \n-00117780: 6578 6365 7074 2074 6865 206c 6173 742e except the last.\n-00117790: 2046 6f72 2074 6865 206c 6173 7420 6974 For the last it\n-001177a0: 2072 6574 7572 6e73 2030 2e3c 2f70 3e0a returns 0.

    .\n-001177b0: 3c70 3e59 6f75 2063 616e 2061 6c73 6f20

    You can also \n-001177c0: 7573 6520 7468 6520 3c63 6f64 653e 2353 use the #S\n-001177d0: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE flag, but th\n-001177f0: 6174 2063 616e 6365 6c73 2074 6865 2062 at cancels the b\n-00117800: 656e 6566 6974 7320 6f66 2073 7472 6561 enefits of strea\n-00117810: 6d69 6e67 2044 494d 452e 3c2f 703e 0a3c ming DIME.

    .<\n-00117820: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-00117840: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-00117850: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .WS\n-00117880: 444c 2062 696e 6469 6e67 7320 666f 7220 DL bindings for \n-00117890: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments\n-001178a0: 3c2f 6832 3e0a 3c70 3e54 6865 2077 7364

    .

    The wsd\n-001178b0: 6c32 6820 746f 6f6c 2072 6563 6f67 6e69 l2h tool recogni\n-001178c0: 7a65 7320 4449 4d45 2061 7474 6163 686d zes DIME attachm\n-001178d0: 656e 7473 2061 6e64 2070 726f 6475 6365 ents and produce\n-001178e0: 7320 616e 2061 6e6e 6f74 6174 6564 2068 s an annotated h\n-001178f0: 6561 6465 7220 6669 6c65 2e20 426f 7468 eader file. Both\n-00117900: 206f 7065 6e20 616e 6420 636c 6f73 6564 open and closed\n-00117910: 206c 6179 6f75 7473 2061 7265 2073 7570 layouts are sup\n-00117920: 706f 7274 6564 2066 6f72 2074 7261 6e73 ported for trans\n-00117930: 6d69 7474 696e 6720 4449 4d45 2061 7474 mitting DIME att\n-00117940: 6163 686d 656e 7473 2e20 466f 7220 636c achments. For cl\n-00117950: 6f73 6564 2066 6f72 6d61 7473 2c20 616c osed formats, al\n-00117960: 6c20 4449 4d45 2061 7474 6163 686d 656e l DIME attachmen\n-00117970: 7473 206d 7573 7420 6265 2072 6566 6572 ts must be refer\n-00117980: 656e 6365 6420 6672 6f6d 2074 6865 2053 enced from the S\n-00117990: 4f41 5020 6d65 7373 6167 652c 2065 2e67 OAP message, e.g\n-001179a0: 2e20 7573 696e 6720 6872 6566 7320 7769 . using hrefs wi\n-001179b0: 7468 2053 4f41 5020 656e 636f 6469 6e67 th SOAP encoding\n-001179c0: 2061 6e64 2075 7369 6e67 2074 6865 2061 and using the a\n-001179d0: 7070 6c69 6361 7469 6f6e 2d73 7065 6369 pplication-speci\n-001179e0: 6669 6320 7265 6665 7265 6e63 6520 6174 fic reference at\n-001179f0: 7472 6962 7574 6520 696e 636c 7564 6564 tribute included\n-00117a00: 2069 6e20 7468 6520 3c63 6f64 653e 3c61 in the xsd_\n-00117a80: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary struct \n-00117aa0: 6f72 2063 6c61 7373 2066 6f72 2064 6f63 or class for doc\n-00117ab0: 756d 656e 742f 6c69 7465 7261 6c20 6d65 ument/literal me\n-00117ac0: 7373 6167 696e 672e 3c2f 703e 0a3c 703e ssaging.

    .

    \n-00117ad0: 5468 6520 736f 6170 6370 7032 2074 6f6f The soapcpp2 too\n-00117ae0: 6c20 646f 6573 206e 6f74 2070 726f 6475 l does not produ\n-00117af0: 6365 2061 2057 5344 4c20 7769 7468 2044 ce a WSDL with D\n-00117b00: 494d 4520 6578 7465 6e73 696f 6e73 2e20 IME extensions. \n-00117b10: 4449 4d45 2069 7320 616e 206f 6c64 6572 DIME is an older\n-00117b20: 2062 696e 6172 7920 666f 726d 6174 2074 binary format t\n-00117b30: 6861 7420 6861 7320 6e6f 2057 5344 4c20 hat has no WSDL \n-00117b40: 7072 6f74 6f63 6f6c 2073 7570 706f 7274 protocol support\n-00117b50: 2c20 756e 6c69 6b65 204d 494d 4520 616e , unlike MIME an\n-00117b60: 6420 4d54 4f4d 2e3c 2f70 3e0a 3c70 3ef0 d MTOM.

    .

    .\n-00117b70: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-00117b80: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-00117b90: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .MTOM atta\n-00117bd0: 6368 6d65 6e74 733c 2f68 313e 0a3c 703e chments

    .

    \n-00117be0: 4d54 4f4d 2028 4d65 7373 6167 6520 5472 MTOM (Message Tr\n-00117bf0: 616e 736d 6973 7369 6f6e 204f 7074 696d ansmission Optim\n-00117c00: 697a 6174 696f 6e20 4d65 6368 616e 6973 ization Mechanis\n-00117c10: 6d29 2069 7320 6120 7265 6c61 7469 7665 m) is a relative\n-00117c20: 6c79 206e 6577 2066 6f72 6d61 7420 666f ly new format fo\n-00117c30: 7220 7472 616e 736d 6974 7469 6e67 2061 r transmitting a\n-00117c40: 7474 6163 686d 656e 7473 2077 6974 6820 ttachments with \n-00117c50: 534f 4150 206d 6573 7361 6765 7320 2873 SOAP messages (s\n-00117c60: 6565 203c 6120 6872 6566 3d22 6874 7470 ee ht\n-00117c90: 7470 3a2f 2f77 7777 2e77 332e 6f72 672f tp://www.w3.org/\n-00117ca0: 5452 2f73 6f61 7031 322d 6d74 6f6d 3c2f TR/soap12-mtom). MTOM attach\n-00117cc0: 6d65 6e74 7320 6172 6520 6573 7365 6e74 ments are essent\n-00117cd0: 6961 6c6c 7920 4d49 4d45 2061 7474 6163 ially MIME attac\n-00117ce0: 686d 656e 7473 2077 6974 6820 7374 616e hments with stan\n-00117cf0: 6461 7264 697a 6564 206d 6563 6861 6e69 dardized mechani\n-00117d00: 736d 7320 666f 7220 6372 6f73 7320 7265 sms for cross re\n-00117d10: 6665 7265 6e63 696e 6720 6174 7461 6368 ferencing attach\n-00117d20: 6d65 6e74 7320 6672 6f6d 2074 6865 2053 ments from the S\n-00117d30: 4f41 5020 626f 6479 2c20 7768 6963 6820 OAP body, which \n-00117d40: 6973 2061 6273 656e 7420 696e 2028 706c is absent in (pl\n-00117d50: 6169 6e29 204d 494d 4520 6174 7461 6368 ain) MIME attach\n-00117d60: 6d65 6e74 7320 616e 6420 6f70 7469 6f6e ments and option\n-00117d70: 616c 2077 6974 6820 4449 4d45 2061 7474 al with DIME att\n-00117d80: 6163 686d 656e 7473 2e3c 2f70 3e0a 3c70 achments.

    .Unlike the name\n-00117da0: 2073 7567 6765 7374 732c 2074 6865 2073 suggests, the s\n-00117db0: 7065 6564 2062 7920 7768 6963 6820 6174 peed by which at\n-00117dc0: 7461 6368 6564 2064 6174 6120 6973 2074 tached data is t\n-00117dd0: 7261 6e73 6d69 7474 6564 2069 7320 6e6f ransmitted is no\n-00117de0: 7420 696e 6372 6561 7365 6420 636f 6d70 t increased comp\n-00117df0: 6172 6564 2074 6f20 4d49 4d45 2c20 4449 ared to MIME, DI\n-00117e00: 4d45 2c20 6f72 2065 7665 6e20 584d 4c20 ME, or even XML \n-00117e10: 656e 636f 6465 6420 6261 7365 3634 2064 encoded base64 d\n-00117e20: 6174 612c 2062 6563 6175 7365 2074 6865 ata, because the\n-00117e30: 2070 6572 666f 726d 616e 6365 2064 6966 performance dif\n-00117e40: 6665 7265 6e63 6573 2077 6865 6e20 7573 ferences when us\n-00117e50: 696e 6720 6753 4f41 5020 7769 6c6c 2062 ing gSOAP will b\n-00117e60: 6520 736d 616c 6c2e 2054 6865 2061 6476 e small. The adv\n-00117e70: 616e 7461 6765 206f 6620 7468 6520 666f antage of the fo\n-00117e80: 726d 6174 2069 7320 7468 6520 7374 616e rmat is the stan\n-00117e90: 6461 7264 697a 6564 2061 7474 6163 686d dardized attachm\n-00117ea0: 656e 7420 7265 6665 7265 6e63 6520 6d65 ent reference me\n-00117eb0: 6368 616e 6973 6d2c 2077 6869 6368 2073 chanism, which s\n-00117ec0: 686f 756c 6420 696d 7072 6f76 6520 696e hould improve in\n-00117ed0: 7465 726f 7065 7261 6269 6c69 7479 2e3c teroperability.<\n-00117ee0: 2f70 3e0a 3c70 3e54 6865 204d 544f 4d20 /p>.

    The MTOM \n-00117ef0: 7370 6563 6966 6963 6174 696f 6e20 6d61 specification ma\n-00117f00: 6e64 6174 6573 2053 4f41 5020 312e 3220 ndates SOAP 1.2 \n-00117f10: 616e 6420 7468 6520 7573 6520 6f66 2074 and the use of t\n-00117f20: 6865 2058 4f50 206e 616d 6573 7061 6365 he XOP namespace\n-00117f30: 2e20 5468 6520 584f 5020 496e 636c 7564 . The XOP Includ\n-00117f40: 6520 656c 656d 656e 7420 3c65 6d3e 3c63 e element xop:Include<\n-00117f60: 2f63 6f64 653e 3c2f 656d 3e20 6973 2064 /code> is d\n-00117f70: 6566 696e 6564 2069 6e20 7468 6520 696e efined in the in\n-00117f80: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-00117f90: 696c 6520 6173 2061 203c 636f 6465 3e3c ile as a <\n-00117fa0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00117fb0: 663d 2273 7472 7563 745f 5f78 6f70 5f5f f=\"struct__xop__\n-00117fc0: 5f5f 5f69 6e63 6c75 6465 2e68 746d 6c22 ___include.html\"\n-00117fd0: 2074 6974 6c65 3d22 584f 5020 696e 636c title=\"XOP incl\n-00117fe0: 7564 6520 7374 7275 6374 7572 6520 7769 ude structure wi\n-00117ff0: 7468 2061 7474 6163 686d 656e 7420 6461 th attachment da\n-00118000: 7461 2e22 3e5f 786f 705f 5f49 6e63 6c75 ta.\">_xop__Inclu\n-00118010: 6465 3c2f 613e 3c2f 636f 6465 3e20 7374 de st\n-00118020: 7275 6374 206f 7220 636c 6173 732c 2074 ruct or class, t\n-00118030: 6861 7420 6973 2075 7365 6420 746f 2072 hat is used to r\n-00118040: 6566 6572 656e 6365 2061 7474 6163 686d eference attachm\n-00118050: 656e 7428 7329 2066 726f 6d20 7468 6520 ent(s) from the \n-00118060: 534f 4150 206d 6573 7361 6765 2062 6f64 SOAP message bod\n-00118070: 792e 3c2f 703e 0a3c 703e 4265 6361 7573 y.

    .

    Becaus\n-00118080: 6520 7265 6665 7265 6e63 6573 2066 726f e references fro\n-00118090: 6d20 7769 7468 696e 2074 6865 2053 4f41 m within the SOA\n-001180a0: 5020 6d65 7373 6167 6520 626f 6479 2074 P message body t\n-001180b0: 6f20 6174 7461 6368 6d65 6e74 7320 6172 o attachments ar\n-001180c0: 6520 6d61 6e64 6174 6f72 7920 7769 7468 e mandatory with\n-001180d0: 204d 544f 4d2c 2074 6865 2069 6d70 6c65 MTOM, the imple\n-001180e0: 6d65 6e74 6174 696f 6e20 6f66 2074 6865 mentation of the\n-001180f0: 2073 6572 6961 6c69 7a61 7469 6f6e 2061 serialization a\n-00118100: 6e64 2064 6573 6572 6961 6c69 7a61 7469 nd deserializati\n-00118110: 6f6e 206f 6620 4d54 4f4d 204d 494d 4520 on of MTOM MIME \n-00118120: 6174 7461 6368 6d65 6e74 7320 7573 6573 attachments uses\n-00118130: 2074 6865 2065 7874 656e 6465 6420 6269 the extended bi\n-00118140: 6e61 7279 2074 7970 6520 636f 6d70 6172 nary type compar\n-00118150: 6162 6c65 2074 6f20 4449 4d45 2073 7570 able to DIME sup\n-00118160: 706f 7274 2e20 5468 6973 2062 696e 6172 port. This binar\n-00118170: 7920 7479 7065 2069 7320 7072 6564 6566 y type is predef\n-00118180: 696e 6564 2069 6e20 7468 6520 3c65 6d3e ined in the \n-00118190: 3c63 6f64 653e 696d 706f 7274 2f78 6f70 import/xop\n-001181a0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .h f\n-001181b0: 696c 653a 3c2f 703e 0a3c 6469 7620 636c ile:

    .
    <\n-001181d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001181e0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap x\n-00118200: 6f70 2073 6368 656d 6120 696d 706f 7274 op schema import\n-00118210: 3a20 6874 7470 3a2f 2f77 7777 2e77 332e : http://www.w3.\n-00118220: 6f72 672f 3230 3034 2f30 382f 786f 702f org/2004/08/xop/\n-00118230: 696e 636c 7564 6520 3c2f 7370 616e 3e3c include <\n-00118240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-00118270: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct \n-001182b0: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include
    .
    {.
    unsigned cha\n-00118340: 723c 2f73 7061 6e3e 202a 3c61 2063 6c61 r *\n-001183a0: 5f5f 7074 723c 2f61 3e3b 203c 2f64 6976 __ptr; .
    int __size; <\n-00118450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *id;\n-001184f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .. \n-001185b0: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n-001185d0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *o\n-00118630: 7074 696f 6e73 3c2f 613e 3b20 3c2f 6469 ptions; .
    };
    .<\n-00118660: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00118670: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef stru\n-001186b0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct _x\n-001186f0: 6f70 5f5f 496e 636c 7564 653c 2f61 3e20 op__Include \n-00118700: 3c61 2063 6c61 7373 3d22 636f 6465 2220 _xop__Includ\n-00118740: 653c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 e;
    .
    _xop\n-001187c0: 5f5f 496e 636c 7564 653c 2f61 3e3c 2f64 __Include
    XOP includ\n-001187f0: 6520 7374 7275 6374 7572 6520 7769 7468 e structure with\n-00118800: 2061 7474 6163 686d 656e 7420 6461 7461 attachment data\n-00118810: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-00118830: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-00118840: 736f 6170 322e 683a 3938 3833 3c2f 6469 soap2.h:9883
    .
    <\n-001188b0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-001188c0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">_xop\n-00118910: 5f5f 496e 636c 7564 653a 3a74 7970 653c __Include::type<\n-00118920: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    MIME type of th\n-00118970: 6520 6461 7461 2e3c 2f64 6976 3e3c 6469 e data.
    \n-00118990: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:98\n-001189b0: 3837 3c2f 6469 763e 3c2f 6469 763e 0a3c 87
    .<\n-001189c0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-001189d0: 6964 3d22 6173 7472 7563 745f 5f78 6f70 id=\"astruct__xop\n-001189e0: 5f5f 5f5f 5f69 6e63 6c75 6465 5f68 746d _____include_htm\n-001189f0: 6c5f 6133 3738 6535 3535 6133 3564 6630 l_a378e555a35df0\n-00118a00: 3431 6331 3464 3066 3736 3764 6431 3238 41c14d0f767dd128\n-00118a10: 6332 3022 3e3c 6469 7620 636c 6173 733d c20\">char * id
    \n-00118ab0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    NULL to gener\n-00118ad0: 6174 6520 616e 2069 6420 6f72 2061 7373 ate an id or ass\n-00118ae0: 6967 6e20 7468 6973 206d 656d 6265 7220 ign this member \n-00118af0: 7661 7269 6162 6c65 2061 2075 6e69 7175 variable a uniqu\n-00118b00: 6520 5555 4944 2e3c 2f64 6976 3e3c 6469 e UUID.
    \n-00118b20: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:98\n-00118b40: 3836 3c2f 6469 763e 3c2f 6469 763e 0a3c 86
    .<\n-00118b50: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00118b60: 6964 3d22 6173 7472 7563 745f 5f78 6f70 id=\"astruct__xop\n-00118b70: 5f5f 5f5f 5f69 6e63 6c75 6465 5f68 746d _____include_htm\n-00118b80: 6c5f 6138 3934 6135 3464 6632 6430 3532 l_a894a54df2d052\n-00118b90: 3938 3966 6632 6332 3064 3334 3466 3536 989ff2c20d344f56\n-00118ba0: 6339 3122 3e3c 6469 7620 636c 6173 733d c91\">
    _xop__Include:\n-00118c10: 3a6f 7074 696f 6e73 3c2f 613e 3c2f 6469 :options
    char * opt\n-00118c40: 696f 6e73 3c2f 6469 763e 3c64 6976 2063 ions
    des\n-00118c60: 6372 6970 7469 6f6e 206f 6620 7468 6520 cription of the \n-00118c70: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n-00118c80: 6d65 6e74 206f 7220 4e55 4c4c 3c2f 6469 ment or NULL
    Definiti\n-00118cb0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-00118cc0: 2e68 3a39 3838 383c 2f64 6976 3e3c 2f64 .h:9888
    .
    _xop__Inc\n-00118d90: 6c75 6465 3a3a 5f5f 7369 7a65 3c2f 613e lude::__size\n-00118da0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int __\n-00118dc0: 7369 7a65 3c2f 6469 763e 3c64 6976 2063 size
    siz\n-00118de0: 6520 6f66 2074 6865 2062 696e 6172 7920 e of the binary \n-00118df0: 6461 7461 3c2f 6469 763e 3c64 6976 2063 data
    \n-00118e10: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00118e20: 7374 6473 6f61 7032 2e68 3a39 3838 353c stdsoap2.h:9885<\n-00118e30: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .unsigned char *\n-00118f30: 205f 5f70 7472 3c2f 6469 763e 3c64 6976 __ptr
    p\n-00118f50: 6f69 6e74 6572 2074 6f20 6269 6e61 7279 ointer to binary\n-00118f60: 2064 6174 613c 2f64 6976 3e3c 6469 7620 data
    Definition:\n-00118f90: 2073 7464 736f 6170 322e 683a 3938 3834 stdsoap2.h:9884\n-00118fa0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The addit\n-00118fd0: 696f 6e61 6c20 3c63 6f64 653e 6964 3c2f ional id, typ\n-00118ff0: 653c 2f63 6f64 653e 2c20 616e 6420 3c63 e, and option members enable\n-00119020: 204d 544f 4d20 6174 7461 6368 6d65 6e74 MTOM attachment\n-00119030: 7320 666f 7220 7468 6520 6461 7461 2070 s for the data p\n-00119040: 6f69 6e74 6564 2074 6f20 6279 203c 636f ointed to by __ptr \n-00119060: 6f66 2073 697a 6520 3c63 6f64 653e 5f5f of size __\n-00119070: 7369 7a65 3c2f 636f 6465 3e2e 2054 6865 size. The\n-00119080: 2070 726f 6365 7373 2066 6f72 2073 656e process for sen\n-00119090: 6469 6e67 2061 6e64 2072 6563 6569 7669 ding and receivi\n-001190a0: 6e67 204d 544f 4d20 584f 5020 6174 7461 ng MTOM XOP atta\n-001190b0: 6368 6d65 6e74 7320 6973 2066 756c 6c79 chments is fully\n-001190c0: 2061 7574 6f6d 6174 6564 2e20 5468 6520 automated. The \n-001190d0: 3c63 6f64 653e 6964 3c2f 636f 6465 3e20 id \n-001190e0: 6d65 6d62 6572 2072 6566 6572 656e 6365 member reference\n-001190f0: 7320 7468 6520 6174 7461 6368 6d65 6e74 s the attachment\n-00119100: 2c20 7479 7069 6361 6c6c 7920 6120 636f , typically a co\n-00119110: 6e74 656e 7420 6964 2043 4944 206f 7220 ntent id CID or \n-00119120: 5555 4944 2077 6869 6368 2063 616e 2062 UUID which can b\n-00119130: 6520 6f62 7461 696e 6564 2077 6974 6820 e obtained with \n-00119140: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_rand\n-001191d0: 5f75 7569 643c 2f61 3e3c 2f63 6f64 653e _uuid\n-001191e0: 2e20 5768 656e 2073 6574 2074 6f20 4e55 . When set to NU\n-001191f0: 4c4c 2c20 6120 756e 6971 7565 2043 4944 LL, a unique CID\n-00119200: 2069 7320 6175 746f 6d61 7469 6361 6c6c is automaticall\n-00119210: 7920 7573 6564 2e20 5468 6520 3c63 6f64 y used. The type fi\n-00119230: 656c 6420 7370 6563 6966 6965 7320 7468 eld specifies th\n-00119240: 6520 7265 7175 6972 6564 204d 494d 4520 e required MIME \n-00119250: 7479 7065 206f 6620 7468 6520 6269 6e61 type of the bina\n-00119260: 7279 2064 6174 612c 2061 6e64 2074 6865 ry data, and the\n-00119270: 206f 7074 696f 6e61 6c20 3c63 6f64 653e optional \n-00119280: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m\n-00119290: 656d 6265 7220 6361 6e20 6265 2075 7365 ember can be use\n-001192a0: 6420 746f 2070 6967 6779 2d62 6163 6b20 d to piggy-back \n-001192b0: 6465 7363 7269 7074 6976 6520 7465 7874 descriptive text\n-001192c0: 2077 6974 6820 616e 2061 7474 6163 686d with an attachm\n-001192d0: 656e 742e 2054 6865 206f 7264 6572 206f ent. The order o\n-001192e0: 6620 7468 6520 6465 636c 6172 6174 696f f the declaratio\n-001192f0: 6e20 6f66 2074 6865 206d 656d 6265 7273 n of the members\n-00119300: 2069 7320 7369 676e 6966 6963 616e 742e is significant.\n-00119310: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    You can \n-00119320: 696d 706f 7274 203c 656d 3e3c 636f 6465 import xop.h in your inter\n-00119350: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-00119360: 2074 6f20 7573 6520 7468 6520 4d54 4f4d to use the MTOM\n-00119370: 2061 7474 6163 686d 656e 7473 2c20 666f attachments, fo\n-00119380: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

    .<\n-00119390: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-001193a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #import "\n-001193e0: 696d 706f 7274 2f78 6f70 2e68 2671 756f import/xop.h&quo\n-001193f0: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    \n-00119400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n-00119430: 6d70 6f72 7420 2671 756f 743b 696d 706f mport "impo\n-00119440: 7274 2f78 6d69 6d65 352e 6826 7175 6f74 rt/xmime5.h"\n-00119450: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    .\n-00119460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #im\n-00119490: 706f 7274 2026 7175 6f74 3b69 6d70 6f72 port "impor\n-001194a0: 742f 736f 6170 3132 2e68 2671 756f 743b t/soap12.h"\n-001194b0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-001194c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001194d0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* altern\n-001194f0: 6174 6976 656c 792c 2077 6974 686f 7574 atively, without\n-00119500: 2074 6865 2069 6d70 6f72 7420 6162 6f76 the import abov\n-00119510: 652c 2075 7365 3a20 3c2f 7370 616e 3e3c e, use: <\n-00119520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-00119550: 6773 6f61 7020 534f 4150 2d45 4e56 2073 gsoap SOAP-ENV s\n-00119560: 6368 656d 6120 6e61 6d65 7370 6163 653a chema namespace:\n-00119570: 2068 7474 703a 2f2f 7777 772e 7733 2e6f http://www.w3.o\n-00119580: 7267 2f32 3030 332f 3035 2f73 6f61 702d rg/2003/05/soap-\n-00119590: 656e 7665 6c6f 7065 203c 2f73 7061 6e3e envelope \n-001195a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-001195d0: 2f67 736f 6170 2053 4f41 502d 454e 4320 /gsoap SOAP-ENC \n-001195e0: 7363 6865 6d61 206e 616d 6573 7061 6365 schema namespace\n-001195f0: 3a20 6874 7470 3a2f 2f77 7777 2e77 332e : http://www.w3.\n-00119600: 6f72 672f 3230 3033 2f30 352f 736f 6170 org/2003/05/soap\n-00119610: 2d65 6e63 6f64 696e 6720 3c2f 7370 616e -encoding
    .
    \n-00119650: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n+001156a0: 733d 226c 696e 6522 3e20 2046 494c 4520 s=\"line\"> FILE \n+001156b0: 2a68 616e 646c 6520 3d20 3c61 2063 6c61 *handle = fopen("som\n+00115740: 6566 696c 6526 7175 6f74 3b3c 2f73 7061 efile", \n+00115770: 2671 756f 743b 7762 2671 756f 743b 3c2f "wb");
    .<\n+00115790: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001157a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+001157c0: 2f73 7061 6e3e 2028 2168 616e 646c 6529 /span> (!handle)\n+001157d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap->error\n+00115890: 203d 203c 6120 636c 6173 733d 2263 6f64 = SOAP_EOF<\n+001158f0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n+00115910: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e\n+00115990: 7272 6e75 6d3c 2f61 3e20 3d20 6572 726e rrnum = errn\n+001159a0: 6f3b 203c 7370 616e 2063 6c61 7373 3d22 o; // get \n+001159c0: 7265 6173 6f6e 203c 2f73 7061 6e3e 3c2f reason .
    } .
    \n+00115a20: 7265 7475 726e 3c2f 7370 616e 3e20 283c return (<\n+00115a30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00115a40: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void*)handle; .
    }
    .\n+00115a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    void dime_write_clo\n+00115ae0: 7365 283c 7370 616e 2063 6c61 7373 3d22 se(struct<\n+00115b00: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+00115b30: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+00115b60: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, void *\n+00115b90: 6861 6e64 6c65 2920 3c2f 6469 763e 0a3c handle)
    .<\n+00115ba0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00115bb0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    fclose((\n+00115c30: 4649 4c45 2a29 6861 6e64 6c65 293b 203c FILE*)handle); <\n+00115c40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00115c60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int dime_write(struct\n+00115ce0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00115d10: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, voi\n+00115d60: 643c 2f73 7061 6e3e 202a 6861 6e64 6c65 d *handle\n+00115d70: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n+00115db0: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *buf, size_t len) .
    {
    . \n+00115e70: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+00115e90: 3c2f 7370 616e 3e20 6e77 7269 7474 656e nwritten\n+00115ea0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    while (len)
    \n+00115ef0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+00115f20: 2020 206e 7772 6974 7465 6e20 3d20 6677 nwritten = fw\n+00115f30: 7269 7465 283c 6120 636c 6173 733d 2263 rite(bu\n+00115f80: 663c 2f61 3e2c 2031 2c20 6c65 6e2c 2028 f, 1, len, (\n+00115f90: 4649 4c45 2a29 6861 6e64 6c65 293b 203c FILE*)handle); <\n+00115fa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if \n+00115fe0: 2821 6e77 7269 7474 656e 2920 3c2f 6469 (!nwritten) .
    {
    \n+00116010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    \n+00116050: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->errnum\n+001160b0: 203d 2065 7272 6e6f 3b20 3c73 7061 6e20 = errno; \n+001160d0: 2f2f 2067 6574 2072 6561 736f 6e20 3c2f // get reason
    . \n+00116100: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n+00116120: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+00116180: 534f 4150 5f45 4f46 3c2f 613e 3b20 3c2f SOAP_EOF; .
    } .
    len -=\n+001161d0: 206e 7772 6974 7465 6e3b 203c 2f64 6976 nwritten; .
    buf += nwri\n+00116250: 7474 656e 3b20 3c2f 6469 763e 0a3c 6469 tten;
    . \n+00116270: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    ..\n+00116330: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    <\n+00116390: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+001163a0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n+001163f0: 703a 3a66 6469 6d65 7772 6974 653c 2f61 p::fdimewrite
    \n+001164f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::fdim\n+001165b0: 6577 7269 7465 636c 6f73 653c 2f61 3e3c ewriteclose<\n+001165c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void(* \n+001165e0: 6664 696d 6577 7269 7465 636c 6f73 6529 fdimewriteclose)\n+001165f0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00116600: 6170 2c20 766f 6964 202a 6861 6e64 6c65 ap, void *handle\n+00116610: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n+00116630: 636b 2074 6f20 636c 6f73 6520 6120 4449 ck to close a DI\n+00116640: 4d45 2061 7474 6163 686d 656e 7420 7374 ME attachment st\n+00116650: 7265 616d 2061 6674 6572 2077 7269 7469 ream after writi\n+00116660: 6e67 2e3c 2f64 6976 3e3c 6469 7620 636c ng.
    D\n+00116680: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00116690: 7464 736f 6170 322e 683a 3438 3333 3c2f tdsoap2.h:4833
    .
    void *(* fdime\n+001167a0: 7772 6974 656f 7065 6e29 2873 7472 7563 writeopen)(struc\n+001167b0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n+001167c0: 6e73 7420 6368 6172 202a 6964 2c20 636f nst char *id, co\n+001167d0: 6e73 7420 6368 6172 202a 7479 7065 2c20 nst char *type, \n+001167e0: 636f 6e73 7420 6368 6172 202a 6f70 7469 const char *opti\n+001167f0: 6f6e 7329 3c2f 6469 763e 3c64 6976 2063 ons)
    Cal\n+00116810: 6c62 6163 6b20 746f 206f 7065 6e20 6120 lback to open a \n+00116820: 7374 7265 616d 696e 6720 4449 4d45 2061 streaming DIME a\n+00116830: 7474 6163 686d 656e 7420 666f 7220 7772 ttachment for wr\n+00116840: 6974 696e 672e 3c2f 6469 763e 3c64 6976 iting.
    <\n+00116860: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:481\n+00116880: 303c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 0
    .
    Ca\n+001169e0: 6c6c 6261 636b 2074 6861 7420 6f70 656e llback that open\n+001169f0: 7320 6120 736f 636b 6574 2063 6f6e 6e65 s a socket conne\n+00116a00: 6374 696f 6e20 746f 2061 2073 6572 7665 ction to a serve\n+00116a10: 7220 656e 6470 6f69 6e74 2e3c 2f64 6976 r endpoint.
    Definitio\n+00116a40: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00116a50: 683a 3434 3935 3c2f 6469 763e 3c2f 6469 h:4495
    .
    int(* fclose)(\n+00116b50: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00116b60: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
    Callb\n+00116b80: 6163 6b20 7468 6174 2063 6c6f 7365 7320 ack that closes \n+00116b90: 7468 6520 6375 7272 656e 7420 736f 636b the current sock\n+00116ba0: 6574 2063 6f6e 6e65 6374 696f 6e2e 3c2f et connection.
    Defini\n+00116bd0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00116be0: 7032 2e68 3a34 3532 303c 2f64 6976 3e3c p2.h:4520
    <\n+00116bf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP_EOF
    #defi\n+00116cd0: 6e65 2053 4f41 505f 454f 463c 2f64 6976 ne SOAP_EOF
    A soap_statu\n+00116d00: 7320 6572 726f 7220 636f 6465 3a20 756e s error code: un\n+00116d10: 6578 7065 6374 6564 2065 6e64 206f 6620 expected end of \n+00116d20: 6669 6c65 2c20 6e6f 2069 6e70 7574 2c20 file, no input, \n+00116d30: 7472 616e 736d 6973 7369 6f6e 2069 6e74 transmission int\n+00116d40: 6572 7275 7074 6564 206f 7220 7469 6d65 errupted or time\n+00116d50: 6420 6f75 7420 2873 612e 2e2e 3c2f 6469 d out (sa...
    Definiti\n+00116d80: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00116d90: 2e68 3a32 3336 353c 2f64 6976 3e3c 2f64 .h:2365
    .

    Me\n+00116dc0: 7373 6167 6520 636f 6d70 7265 7373 696f ssage compressio\n+00116dd0: 6e20 7769 7468 203c 636f 6465 3e23 534f n with #SO\n+00116de0: 4150 5f45 4e43 5f5a 4c49 423c 2f63 6f64 AP_ENC_ZLIB can be used w\n+00116e00: 6974 6820 4449 4d45 2074 6f20 636f 6d70 ith DIME to comp\n+00116e10: 7265 7373 2074 6865 2065 6e74 6972 6520 ress the entire \n+00116e20: 6d65 7373 6167 652e 2048 6f77 6576 6572 message. However\n+00116e30: 2c20 636f 6d70 7265 7373 696f 6e20 7265 , compression re\n+00116e40: 7175 6972 6573 2062 7566 6665 7269 6e67 quires buffering\n+00116e50: 2074 6f20 6465 7465 726d 696e 6520 7468 to determine th\n+00116e60: 6520 4854 5450 2063 6f6e 7465 6e74 206c e HTTP content l\n+00116e70: 656e 6774 6820 6865 6164 6572 2c20 7768 ength header, wh\n+00116e80: 6963 6820 6361 6e63 656c 7320 7468 6520 ich cancels the \n+00116e90: 6265 6e65 6669 7473 206f 6620 7374 7265 benefits of stre\n+00116ea0: 616d 696e 6720 4449 4d45 2e20 546f 2061 aming DIME. To a\n+00116eb0: 766f 6964 2074 6869 732c 2079 6f75 2073 void this, you s\n+00116ec0: 686f 756c 6420 7573 6520 6368 756e 6b65 hould use chunke\n+00116ed0: 6420 4854 5450 2028 7769 7468 2074 6865 d HTTP (with the\n+00116ee0: 206f 7574 7075 742d 6d6f 6465 203c 636f output-mode #SOAP_IO_CHUN\n+00116f00: 4b3c 2f63 6f64 653e 2066 6c61 6729 2077 K flag) w\n+00116f10: 6974 6820 636f 6d70 7265 7373 696f 6e20 ith compression \n+00116f20: 616e 6420 7374 7265 616d 696e 6720 4449 and streaming DI\n+00116f30: 4d45 2e20 4174 2074 6865 2073 6572 7665 ME. At the serve\n+00116f40: 7220 7369 6465 2c20 7768 656e 2079 6f75 r side, when you\n+00116f50: 2073 6574 203c 636f 6465 3e23 534f 4150 set #SOAP\n+00116f60: 5f49 4f5f 4348 554e 4b3c 2f63 6f64 653e _IO_CHUNK\n+00116f70: 2062 6566 6f72 6520 6361 6c6c 696e 6720 before calling \n+00116f80: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_serve<\n+00117000: 2f61 3e3c 2f63 6f64 653e 2c20 7468 6520 /a>, the \n+00117010: 656e 6769 6e65 2077 696c 6c20 6175 746f engine will auto\n+00117020: 6d61 7469 6361 6c6c 7920 7265 7665 7274 matically revert\n+00117030: 2074 6f20 6275 6666 6572 696e 6720 283c to buffering (<\n+00117040: 636f 6465 3e23 534f 4150 5f49 4f5f 5354 code>#SOAP_IO_ST\n+00117050: 4f52 453c 2f63 6f64 653e 2066 6c61 6720 ORE flag \n+00117060: 6973 2073 6574 292e 2059 6f75 2063 616e is set). You can\n+00117070: 2063 6865 636b 2074 6869 7320 666c 6167 check this flag\n+00117080: 2077 6974 6820 3c63 6f64 653e 2873 6f61 with (soa\n+00117090: 702d 2667 743b 6f6d 6f64 6520 2661 6d70 p->omode &\n+001170a0: 3b20 534f 4150 5f49 4f29 203d 3d20 534f ; SOAP_IO) == SO\n+001170b0: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK to see if the\n+001170d0: 2063 6c69 656e 7420 6163 6365 7074 7320 client accepts \n+001170e0: 6368 756e 6b69 6e67 2e20 4d6f 7265 2069 chunking. More i\n+001170f0: 6e66 6f72 6d61 7469 6f6e 2061 626f 7574 nformation about\n+00117100: 2073 7472 6561 6d69 6e67 2063 6875 6e6b streaming chunk\n+00117110: 6564 2044 494d 4520 6361 6e20 6265 2066 ed DIME can be f\n+00117120: 6f75 6e64 2069 6e20 5365 6374 696f 6e20 ound in Section \n+00117130: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Str\n+00117160: 6561 6d69 6e67 2063 6875 6e6b 6564 2044 eaming chunked D\n+00117170: 494d 453c 2f61 3e20 2e3c 2f70 3e0a 3c64 IME .

    .
    Wa\n+001171a0: 726e 696e 673c 2f64 743e 3c64 643e 5468 rning
    Th\n+001171b0: 6520 3c63 6f64 653e 6f70 7469 6f6e 733c e options<\n+001171c0: 2f63 6f64 653e 206d 656d 6265 7220 6973 /code> member is\n+001171d0: 2061 2044 494d 452d 7370 6563 6966 6963 a DIME-specific\n+001171e0: 2064 6174 6120 7374 7275 6374 7572 652c data structure,\n+001171f0: 2063 6f6e 7369 7374 696e 6720 6f66 2061 consisting of a\n+00117200: 2034 2062 7974 6520 6865 6164 6572 2063 4 byte header c\n+00117210: 6f6e 7461 696e 696e 6720 7468 6520 6f70 ontaining the op\n+00117220: 7469 6f6e 2074 7970 6520 696e 666f 2028 tion type info (\n+00117230: 6869 2062 7974 652c 206c 6f20 6279 7465 hi byte, lo byte\n+00117240: 292c 206f 7074 696f 6e20 7374 7269 6e67 ), option string\n+00117250: 206c 656e 6774 6820 2868 6920 6279 7465 length (hi byte\n+00117260: 2c20 6c6f 2062 7974 6529 2c20 666f 6c6c , lo byte), foll\n+00117270: 6f77 6564 2062 7920 6120 6e6f 6e2d 275c owed by a non-'\\\n+00117280: 3027 2074 6572 6d69 6e61 7465 6420 7374 0' terminated st\n+00117290: 7269 6e67 2e20 5468 6520 4449 4d45 2068 ring. The DIME h\n+001172a0: 616e 646c 6572 2072 6563 6f67 6e69 7a65 andler recognize\n+001172b0: 7320 6f6e 6520 6f70 7469 6f6e 2061 7420 s one option at \n+001172c0: 6d6f 7374 2e3c 2f64 643e 3c2f 646c 3e0a most.
    .\n+001172d0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n+001172f0: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .Streaming chu\n+00117340: 6e6b 6564 2044 494d 453c 2f68 323e 0a3c nked DIME

    .<\n+00117350: 703e 546f 2073 656e 6420 4449 4d45 2061 p>To send DIME a\n+00117360: 7474 6163 686d 656e 7473 2c20 7468 6520 ttachments, the \n+00117370: 6174 7461 6368 6d65 6e74 2073 697a 6573 attachment sizes\n+00117380: 206d 7573 7420 6265 2064 6574 6572 6d69 must be determi\n+00117390: 6e65 6420 696e 2061 6476 616e 6365 2074 ned in advance t\n+001173a0: 6f20 6361 6c63 756c 6174 6520 4854 5450 o calculate HTTP\n+001173b0: 206d 6573 7361 6765 206c 656e 6774 6820 message length \n+001173c0: 7265 7175 6972 6564 2074 6f20 7374 7265 required to stre\n+001173d0: 616d 2044 494d 4520 6f76 6572 2048 5454 am DIME over HTT\n+001173e0: 502e 2048 6f77 6576 6572 2c20 6368 756e P. However, chun\n+001173f0: 6b65 6420 4449 4d45 2074 6f67 6574 6865 ked DIME togethe\n+00117400: 7220 7769 7468 2063 6875 6e6b 6564 2048 r with chunked H\n+00117410: 5454 5020 6361 6e20 6265 2075 7365 6420 TTP can be used \n+00117420: 746f 206f 6d69 7420 7468 6973 2073 7465 to omit this ste\n+00117430: 702e 2046 6972 7374 2073 6574 2074 6865 p. First set the\n+00117440: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_\n+00117450: 4348 554e 4b3c 2f63 6f64 653e 2066 6c61 CHUNK fla\n+00117460: 672e 2054 6865 6e2c 2074 6f20 7374 7265 g. Then, to stre\n+00117470: 616d 2063 6875 6e6b 6564 2044 494d 452c am chunked DIME,\n+00117480: 2073 6574 2074 6865 203c 636f 6465 3e5f set the _\n+00117490: 5f73 697a 653c 2f63 6f64 653e 206d 656d _size mem\n+001174a0: 6265 7220 6f66 2061 6e20 6174 7461 6368 ber of an attach\n+001174b0: 6d65 6e74 2074 6f20 7a65 726f 2061 6e64 ment to zero and\n+001174c0: 2065 6e61 626c 6520 4449 4d45 2063 6875 enable DIME chu\n+001174d0: 6e6b 696e 672e 2054 6865 2044 494d 4520 nking. The DIME \n+001174e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fdim\n+00117580: 6572 6561 643c 2f61 3e3c 2f63 6f64 653e eread\n+00117590: 2063 616c 6c62 6163 6b20 7468 656e 2066 callback then f\n+001175a0: 6574 6368 6573 2064 6174 6120 696e 2063 etches data in c\n+001175b0: 6875 6e6b 7320 616e 6420 6974 2069 7320 hunks and it is \n+001175c0: 696d 706f 7274 616e 7420 746f 2066 696c important to fil\n+001175d0: 6c20 7468 6520 656e 7469 7265 2062 7566 l the entire buf\n+001175e0: 6665 7220 756e 6c65 7373 2074 6865 2065 fer unless the e\n+001175f0: 6e64 206f 6620 7468 6520 6461 7461 2068 nd of the data h\n+00117600: 6173 2062 6565 6e20 7265 6163 6865 6420 as been reached \n+00117610: 616e 6420 7468 6520 6c61 7374 2063 6875 and the last chu\n+00117620: 6e6b 2069 7320 746f 2062 6520 7365 6e64 nk is to be send\n+00117630: 2e20 5468 6174 2069 732c 203c 636f 6465 . That is, soap::fdimeread\n+001176e0: 3c2f 613e 3c2f 636f 6465 3e20 7368 6f75
    shou\n+001176f0: 6c64 2072 6574 7572 6e20 7468 6520 7661 ld return the va\n+00117700: 6c75 6520 6f66 2074 6865 206c 6173 7420 lue of the last \n+00117710: 3c63 6f64 653e 6c65 6e3c 2f63 6f64 653e len\n+00117720: 2070 6172 616d 6574 6572 2061 6e64 2066 parameter and f\n+00117730: 696c 6c20 7468 6520 656e 7469 7265 2062 ill the entire b\n+00117740: 7566 6665 7220 3c63 6f64 653e 6275 663c uffer buf<\n+00117750: 2f63 6f64 653e 2066 6f72 2061 6c6c 2063 /code> for all c\n+00117760: 6875 6e6b 7320 6578 6365 7074 2074 6865 hunks except the\n+00117770: 206c 6173 742e 2046 6f72 2074 6865 206c last. For the l\n+00117780: 6173 7420 6974 2072 6574 7572 6e73 2030 ast it returns 0\n+00117790: 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 616e .

    .

    You can\n+001177a0: 2061 6c73 6f20 7573 6520 7468 6520 3c63 also use the #SOAP_IO_STO\n+001177c0: 5245 3c2f 636f 6465 3e20 666c 6167 2c20 RE flag, \n+001177d0: 6275 7420 7468 6174 2063 616e 6365 6c73 but that cancels\n+001177e0: 2074 6865 2062 656e 6566 6974 7320 6f66 the benefits of\n+001177f0: 2073 7472 6561 6d69 6e67 2044 494d 452e streaming DIME.\n+00117800: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+00117820: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+00117830: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    <\n+00117840: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00117850: 2069 643d 2244 494d 4557 5344 4c22 3e3c id=\"DIMEWSDL\"><\n+00117860: 2f61 3e0a 5753 444c 2062 696e 6469 6e67 /a>.WSDL binding\n+00117870: 7320 666f 7220 4449 4d45 2061 7474 6163 s for DIME attac\n+00117880: 686d 656e 7473 3c2f 6832 3e0a 3c70 3e54 hments

    .

    T\n+00117890: 6865 2077 7364 6c32 6820 746f 6f6c 2072 he wsdl2h tool r\n+001178a0: 6563 6f67 6e69 7a65 7320 4449 4d45 2061 ecognizes DIME a\n+001178b0: 7474 6163 686d 656e 7473 2061 6e64 2070 ttachments and p\n+001178c0: 726f 6475 6365 7320 616e 2061 6e6e 6f74 roduces an annot\n+001178d0: 6174 6564 2068 6561 6465 7220 6669 6c65 ated header file\n+001178e0: 2e20 426f 7468 206f 7065 6e20 616e 6420 . Both open and \n+001178f0: 636c 6f73 6564 206c 6179 6f75 7473 2061 closed layouts a\n+00117900: 7265 2073 7570 706f 7274 6564 2066 6f72 re supported for\n+00117910: 2074 7261 6e73 6d69 7474 696e 6720 4449 transmitting DI\n+00117920: 4d45 2061 7474 6163 686d 656e 7473 2e20 ME attachments. \n+00117930: 466f 7220 636c 6f73 6564 2066 6f72 6d61 For closed forma\n+00117940: 7473 2c20 616c 6c20 4449 4d45 2061 7474 ts, all DIME att\n+00117950: 6163 686d 656e 7473 206d 7573 7420 6265 achments must be\n+00117960: 2072 6566 6572 656e 6365 6420 6672 6f6d referenced from\n+00117970: 2074 6865 2053 4f41 5020 6d65 7373 6167 the SOAP messag\n+00117980: 652c 2065 2e67 2e20 7573 696e 6720 6872 e, e.g. using hr\n+00117990: 6566 7320 7769 7468 2053 4f41 5020 656e efs with SOAP en\n+001179a0: 636f 6469 6e67 2061 6e64 2075 7369 6e67 coding and using\n+001179b0: 2074 6865 2061 7070 6c69 6361 7469 6f6e the application\n+001179c0: 2d73 7065 6369 6669 6320 7265 6665 7265 -specific refere\n+001179d0: 6e63 6520 6174 7472 6962 7574 6520 696e nce attribute in\n+001179e0: 636c 7564 6564 2069 6e20 7468 6520 3c63 cluded in the xsd__base64Bin\n+00117a70: 6172 793c 2f61 3e3c 2f63 6f64 653e 2073 ary s\n+00117a80: 7472 7563 7420 6f72 2063 6c61 7373 2066 truct or class f\n+00117a90: 6f72 2064 6f63 756d 656e 742f 6c69 7465 or document/lite\n+00117aa0: 7261 6c20 6d65 7373 6167 696e 672e 3c2f ral messaging..

    The soapcp\n+00117ac0: 7032 2074 6f6f 6c20 646f 6573 206e 6f74 p2 tool does not\n+00117ad0: 2070 726f 6475 6365 2061 2057 5344 4c20 produce a WSDL \n+00117ae0: 7769 7468 2044 494d 4520 6578 7465 6e73 with DIME extens\n+00117af0: 696f 6e73 2e20 4449 4d45 2069 7320 616e ions. DIME is an\n+00117b00: 206f 6c64 6572 2062 696e 6172 7920 666f older binary fo\n+00117b10: 726d 6174 2074 6861 7420 6861 7320 6e6f rmat that has no\n+00117b20: 2057 5344 4c20 7072 6f74 6f63 6f6c 2073 WSDL protocol s\n+00117b30: 7570 706f 7274 2c20 756e 6c69 6b65 204d upport, unlike M\n+00117b40: 494d 4520 616e 6420 4d54 4f4d 2e3c 2f70 IME and MTOM..

    .... Back to ta\n+00117b70: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n+00117b80: 2f61 3e3c 2f70 3e0a 3c68 313e 3c61 2063 /a>

    .

    .MTO\n+00117bb0: 4d20 6174 7461 6368 6d65 6e74 733c 2f68 M attachments.

    MTOM (Mess\n+00117bd0: 6167 6520 5472 616e 736d 6973 7369 6f6e age Transmission\n+00117be0: 204f 7074 696d 697a 6174 696f 6e20 4d65 Optimization Me\n+00117bf0: 6368 616e 6973 6d29 2069 7320 6120 7265 chanism) is a re\n+00117c00: 6c61 7469 7665 6c79 206e 6577 2066 6f72 latively new for\n+00117c10: 6d61 7420 666f 7220 7472 616e 736d 6974 mat for transmit\n+00117c20: 7469 6e67 2061 7474 6163 686d 656e 7473 ting attachments\n+00117c30: 2077 6974 6820 534f 4150 206d 6573 7361 with SOAP messa\n+00117c40: 6765 7320 2873 6565 203c 6120 6872 6566 ges (see http://www.w\n+00117c80: 332e 6f72 672f 5452 2f73 6f61 7031 322d 3.org/TR/soap12-\n+00117c90: 6d74 6f6d 3c2f 613e 292e 204d 544f 4d20 mtom). MTOM \n+00117ca0: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are \n+00117cb0: 6573 7365 6e74 6961 6c6c 7920 4d49 4d45 essentially MIME\n+00117cc0: 2061 7474 6163 686d 656e 7473 2077 6974 attachments wit\n+00117cd0: 6820 7374 616e 6461 7264 697a 6564 206d h standardized m\n+00117ce0: 6563 6861 6e69 736d 7320 666f 7220 6372 echanisms for cr\n+00117cf0: 6f73 7320 7265 6665 7265 6e63 696e 6720 oss referencing \n+00117d00: 6174 7461 6368 6d65 6e74 7320 6672 6f6d attachments from\n+00117d10: 2074 6865 2053 4f41 5020 626f 6479 2c20 the SOAP body, \n+00117d20: 7768 6963 6820 6973 2061 6273 656e 7420 which is absent \n+00117d30: 696e 2028 706c 6169 6e29 204d 494d 4520 in (plain) MIME \n+00117d40: 6174 7461 6368 6d65 6e74 7320 616e 6420 attachments and \n+00117d50: 6f70 7469 6f6e 616c 2077 6974 6820 4449 optional with DI\n+00117d60: 4d45 2061 7474 6163 686d 656e 7473 2e3c ME attachments.<\n+00117d70: 2f70 3e0a 3c70 3e55 6e6c 696b 6520 7468 /p>.

    Unlike th\n+00117d80: 6520 6e61 6d65 2073 7567 6765 7374 732c e name suggests,\n+00117d90: 2074 6865 2073 7065 6564 2062 7920 7768 the speed by wh\n+00117da0: 6963 6820 6174 7461 6368 6564 2064 6174 ich attached dat\n+00117db0: 6120 6973 2074 7261 6e73 6d69 7474 6564 a is transmitted\n+00117dc0: 2069 7320 6e6f 7420 696e 6372 6561 7365 is not increase\n+00117dd0: 6420 636f 6d70 6172 6564 2074 6f20 4d49 d compared to MI\n+00117de0: 4d45 2c20 4449 4d45 2c20 6f72 2065 7665 ME, DIME, or eve\n+00117df0: 6e20 584d 4c20 656e 636f 6465 6420 6261 n XML encoded ba\n+00117e00: 7365 3634 2064 6174 612c 2062 6563 6175 se64 data, becau\n+00117e10: 7365 2074 6865 2070 6572 666f 726d 616e se the performan\n+00117e20: 6365 2064 6966 6665 7265 6e63 6573 2077 ce differences w\n+00117e30: 6865 6e20 7573 696e 6720 6753 4f41 5020 hen using gSOAP \n+00117e40: 7769 6c6c 2062 6520 736d 616c 6c2e 2054 will be small. T\n+00117e50: 6865 2061 6476 616e 7461 6765 206f 6620 he advantage of \n+00117e60: 7468 6520 666f 726d 6174 2069 7320 7468 the format is th\n+00117e70: 6520 7374 616e 6461 7264 697a 6564 2061 e standardized a\n+00117e80: 7474 6163 686d 656e 7420 7265 6665 7265 ttachment refere\n+00117e90: 6e63 6520 6d65 6368 616e 6973 6d2c 2077 nce mechanism, w\n+00117ea0: 6869 6368 2073 686f 756c 6420 696d 7072 hich should impr\n+00117eb0: 6f76 6520 696e 7465 726f 7065 7261 6269 ove interoperabi\n+00117ec0: 6c69 7479 2e3c 2f70 3e0a 3c70 3e54 6865 lity.

    .

    The\n+00117ed0: 204d 544f 4d20 7370 6563 6966 6963 6174 MTOM specificat\n+00117ee0: 696f 6e20 6d61 6e64 6174 6573 2053 4f41 ion mandates SOA\n+00117ef0: 5020 312e 3220 616e 6420 7468 6520 7573 P 1.2 and the us\n+00117f00: 6520 6f66 2074 6865 2058 4f50 206e 616d e of the XOP nam\n+00117f10: 6573 7061 6365 2e20 5468 6520 584f 5020 espace. The XOP \n+00117f20: 496e 636c 7564 6520 656c 656d 656e 7420 Include element \n+00117f30: 3c65 6d3e 3c63 6f64 653e 786f 703a 496e xop:In\n+00117f40: 636c 7564 653c 2f63 6f64 653e 3c2f 656d clude is defined in \n+00117f60: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n+00117f70: 6164 6572 2066 696c 6520 6173 2061 203c ader file as a <\n+00117f80: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>_xop_\n+00117ff0: 5f49 6e63 6c75 6465 3c2f 613e 3c2f 636f _Include struct or cl\n+00118010: 6173 732c 2074 6861 7420 6973 2075 7365 ass, that is use\n+00118020: 6420 746f 2072 6566 6572 656e 6365 2061 d to reference a\n+00118030: 7474 6163 686d 656e 7428 7329 2066 726f ttachment(s) fro\n+00118040: 6d20 7468 6520 534f 4150 206d 6573 7361 m the SOAP messa\n+00118050: 6765 2062 6f64 792e 3c2f 703e 0a3c 703e ge body.

    .

    \n+00118060: 4265 6361 7573 6520 7265 6665 7265 6e63 Because referenc\n+00118070: 6573 2066 726f 6d20 7769 7468 696e 2074 es from within t\n+00118080: 6865 2053 4f41 5020 6d65 7373 6167 6520 he SOAP message \n+00118090: 626f 6479 2074 6f20 6174 7461 6368 6d65 body to attachme\n+001180a0: 6e74 7320 6172 6520 6d61 6e64 6174 6f72 nts are mandator\n+001180b0: 7920 7769 7468 204d 544f 4d2c 2074 6865 y with MTOM, the\n+001180c0: 2069 6d70 6c65 6d65 6e74 6174 696f 6e20 implementation \n+001180d0: 6f66 2074 6865 2073 6572 6961 6c69 7a61 of the serializa\n+001180e0: 7469 6f6e 2061 6e64 2064 6573 6572 6961 tion and deseria\n+001180f0: 6c69 7a61 7469 6f6e 206f 6620 4d54 4f4d lization of MTOM\n+00118100: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n+00118110: 7320 7573 6573 2074 6865 2065 7874 656e s uses the exten\n+00118120: 6465 6420 6269 6e61 7279 2074 7970 6520 ded binary type \n+00118130: 636f 6d70 6172 6162 6c65 2074 6f20 4449 comparable to DI\n+00118140: 4d45 2073 7570 706f 7274 2e20 5468 6973 ME support. This\n+00118150: 2062 696e 6172 7920 7479 7065 2069 7320 binary type is \n+00118160: 7072 6564 6566 696e 6564 2069 6e20 7468 predefined in th\n+00118170: 6520 3c65 6d3e 3c63 6f64 653e 696d 706f e impo\n+00118180: 7274 2f78 6f70 2e68 3c2f 636f 6465 3e3c rt/xop.h<\n+00118190: 2f65 6d3e 2066 696c 653a 3c2f 703e 0a3c /em> file:

    .<\n+001181a0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001181b0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    //g\n+001181e0: 736f 6170 2078 6f70 2073 6368 656d 6120 soap xop schema \n+001181f0: 696d 706f 7274 3a20 6874 7470 3a2f 2f77 import: http://w\n+00118200: 7777 2e77 332e 6f72 672f 3230 3034 2f30 ww.w3.org/2004/0\n+00118210: 382f 786f 702f 696e 636c 7564 6520 3c2f 8/xop/include
    .struct _xop__Incl\n+001182a0: 7564 653c 2f61 3e20 3c2f 6469 763e 0a3c ude

    .<\n+001182b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001182c0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n+001182e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001182f0: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype\">unsigne\n+00118300: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d char *\n+00118330: 3c61 2063 6c61 7373 3d22 636f 6465 2220 __ptr;\n+00118390: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .. \n+00118450: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+00118470: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *i\n+001184d0: 643c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 d;
    .\n+001184f0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+00118510: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *type; .
    char *<\n+001185c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001185d0: 7265 663d 2273 7472 7563 745f 5f78 6f70 ref=\"struct__xop\n+001185e0: 5f5f 5f5f 5f69 6e63 6c75 6465 2e68 746d _____include.htm\n+001185f0: 6c23 6138 3934 6135 3464 6632 6430 3532 l#a894a54df2d052\n+00118600: 3938 3966 6632 6332 3064 3334 3466 3536 989ff2c20d344f56\n+00118610: 6339 3122 3e6f 7074 696f 6e73 3c2f 613e c91\">options\n+00118620: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }; ..<\n+00118840: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00118850: 6964 3d22 6173 7472 7563 745f 5f78 6f70 id=\"astruct__xop\n+00118860: 5f5f 5f5f 5f69 6e63 6c75 6465 5f68 746d _____include_htm\n+00118870: 6c5f 6130 6437 3061 6630 6432 6331 3233 l_a0d70af0d2c123\n+00118880: 3736 3663 6531 3838 6366 3264 6431 3538 766ce188cf2dd158\n+00118890: 3333 6122 3e3c 6469 7620 636c 6173 733d 33a\"><\n+00118910: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00118920: 6922 3e63 6861 7220 2a20 7479 7065 3c2f i\">char * type
    MIME type\n+00118950: 206f 6620 7468 6520 6461 7461 2e3c 2f64 of the data.
    Definit\n+00118980: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00118990: 322e 683a 3938 3837 3c2f 6469 763e 3c2f 2.h:9887
    .
    <\n+00118a10: 6120 6872 6566 3d22 7374 7275 6374 5f5f a href=\"struct__\n+00118a20: 786f 705f 5f5f 5f5f 696e 636c 7564 652e xop_____include.\n+00118a30: 6874 6d6c 2361 3337 3865 3535 3561 3335 html#a378e555a35\n+00118a40: 6466 3034 3163 3134 6430 6637 3637 6464 df041c14d0f767dd\n+00118a50: 3132 3863 3230 223e 5f78 6f70 5f5f 496e 128c20\">_xop__In\n+00118a60: 636c 7564 653a 3a69 643c 2f61 3e3c 2f64 clude::id
    char * id\n+00118a90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    NULL to\n+00118ab0: 2067 656e 6572 6174 6520 616e 2069 6420 generate an id \n+00118ac0: 6f72 2061 7373 6967 6e20 7468 6973 206d or assign this m\n+00118ad0: 656d 6265 7220 7661 7269 6162 6c65 2061 ember variable a\n+00118ae0: 2075 6e69 7175 6520 5555 4944 2e3c 2f64 unique UUID.
    Definit\n+00118b10: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00118b20: 322e 683a 3938 3836 3c2f 6469 763e 3c2f 2.h:9886
    .
    <\n+00118ba0: 6120 6872 6566 3d22 7374 7275 6374 5f5f a href=\"struct__\n+00118bb0: 786f 705f 5f5f 5f5f 696e 636c 7564 652e xop_____include.\n+00118bc0: 6874 6d6c 2361 3839 3461 3534 6466 3264 html#a894a54df2d\n+00118bd0: 3035 3239 3839 6666 3263 3230 6433 3434 052989ff2c20d344\n+00118be0: 6635 3663 3931 223e 5f78 6f70 5f5f 496e f56c91\">_xop__In\n+00118bf0: 636c 7564 653a 3a6f 7074 696f 6e73 3c2f clude::options
    char\n+00118c20: 202a 206f 7074 696f 6e73 3c2f 6469 763e * options
    \n+00118c30: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    description o\n+00118c50: 6620 7468 6520 4d49 4d45 2f4d 544f 4d20 f the MIME/MTOM \n+00118c60: 6174 7461 6368 6d65 6e74 206f 7220 4e55 attachment or NU\n+00118c70: 4c4c 3c2f 6469 763e 3c64 6976 2063 6c61 LL
    De\n+00118c90: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00118ca0: 6473 6f61 7032 2e68 3a39 3838 383c 2f64 dsoap2.h:9888
    .
    \n+00118d10: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+00118da0: 696e 7420 5f5f 7369 7a65 3c2f 6469 763e int __size
    \n+00118db0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    size of the b\n+00118dd0: 696e 6172 7920 6461 7461 3c2f 6469 763e inary data
    \n+00118de0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00118e00: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00118e10: 3a39 3838 353c 2f64 6976 3e3c 2f64 6976 :9885
    .
    _xop__Inclu\n+00118ee0: 6465 3a3a 5f5f 7074 723c 2f61 3e3c 2f64 de::__ptr
    unsigned \n+00118f10: 6368 6172 202a 205f 5f70 7472 3c2f 6469 char * __ptr
    pointer to \n+00118f40: 6269 6e61 7279 2064 6174 613c 2f64 6976 binary data
    Definitio\n+00118f70: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00118f80: 683a 3938 3834 3c2f 6469 763e 3c2f 6469 h:9884
    .

    The\n+00118fb0: 2061 6464 6974 696f 6e61 6c20 3c63 6f64 additional id, type, \n+00118fe0: 616e 6420 3c63 6f64 653e 6f70 7469 6f6e and option\n+00118ff0: 3c2f 636f 6465 3e20 6d65 6d62 6572 7320 members \n+00119000: 656e 6162 6c65 204d 544f 4d20 6174 7461 enable MTOM atta\n+00119010: 6368 6d65 6e74 7320 666f 7220 7468 6520 chments for the \n+00119020: 6461 7461 2070 6f69 6e74 6564 2074 6f20 data pointed to \n+00119030: 6279 203c 636f 6465 3e5f 5f70 7472 3c2f by __ptr of size __size. The process f\n+00119070: 6f72 2073 656e 6469 6e67 2061 6e64 2072 or sending and r\n+00119080: 6563 6569 7669 6e67 204d 544f 4d20 584f eceiving MTOM XO\n+00119090: 5020 6174 7461 6368 6d65 6e74 7320 6973 P attachments is\n+001190a0: 2066 756c 6c79 2061 7574 6f6d 6174 6564 fully automated\n+001190b0: 2e20 5468 6520 3c63 6f64 653e 6964 3c2f . The id member ref\n+001190d0: 6572 656e 6365 7320 7468 6520 6174 7461 erences the atta\n+001190e0: 6368 6d65 6e74 2c20 7479 7069 6361 6c6c chment, typicall\n+001190f0: 7920 6120 636f 6e74 656e 7420 6964 2043 y a content id C\n+00119100: 4944 206f 7220 5555 4944 2077 6869 6368 ID or UUID which\n+00119110: 2063 616e 2062 6520 6f62 7461 696e 6564 can be obtained\n+00119120: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soa\n+001191b0: 705f 7261 6e64 5f75 7569 643c 2f61 3e3c p_rand_uuid<\n+001191c0: 2f63 6f64 653e 2e20 5768 656e 2073 6574 /code>. When set\n+001191d0: 2074 6f20 4e55 4c4c 2c20 6120 756e 6971 to NULL, a uniq\n+001191e0: 7565 2043 4944 2069 7320 6175 746f 6d61 ue CID is automa\n+001191f0: 7469 6361 6c6c 7920 7573 6564 2e20 5468 tically used. Th\n+00119200: 6520 3c63 6f64 653e 7479 7065 3c2f 636f e type field specif\n+00119220: 6965 7320 7468 6520 7265 7175 6972 6564 ies the required\n+00119230: 204d 494d 4520 7479 7065 206f 6620 7468 MIME type of th\n+00119240: 6520 6269 6e61 7279 2064 6174 612c 2061 e binary data, a\n+00119250: 6e64 2074 6865 206f 7074 696f 6e61 6c20 nd the optional \n+00119260: 3c63 6f64 653e 6f70 7469 6f6e 733c 2f63 options member can \n+00119280: 6265 2075 7365 6420 746f 2070 6967 6779 be used to piggy\n+00119290: 2d62 6163 6b20 6465 7363 7269 7074 6976 -back descriptiv\n+001192a0: 6520 7465 7874 2077 6974 6820 616e 2061 e text with an a\n+001192b0: 7474 6163 686d 656e 742e 2054 6865 206f ttachment. The o\n+001192c0: 7264 6572 206f 6620 7468 6520 6465 636c rder of the decl\n+001192d0: 6172 6174 696f 6e20 6f66 2074 6865 206d aration of the m\n+001192e0: 656d 6265 7273 2069 7320 7369 676e 6966 embers is signif\n+001192f0: 6963 616e 742e 3c2f 703e 0a3c 703e 596f icant.

    .

    Yo\n+00119300: 7520 6361 6e20 696d 706f 7274 203c 656d u can import xop.h in your\n+00119330: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+00119340: 7220 6669 6c65 2074 6f20 7573 6520 7468 r file to use th\n+00119350: 6520 4d54 4f4d 2061 7474 6163 686d 656e e MTOM attachmen\n+00119360: 7473 2c20 666f 7220 6578 616d 706c 653a ts, for example:\n+00119370: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #import \n+001193c0: 2671 756f 743b 696d 706f 7274 2f78 6f70 "import/xop\n+001193d0: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n+001193e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #import &quo\n+00119420: 743b 696d 706f 7274 2f78 6d69 6d65 352e t;import/xmime5.\n+00119430: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n+00119440: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #import "\n+00119480: 3b69 6d70 6f72 742f 736f 6170 3132 2e68 ;import/soap12.h\n+00119490: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    /* \n+001194d0: 616c 7465 726e 6174 6976 656c 792c 2077 alternatively, w\n+001194e0: 6974 686f 7574 2074 6865 2069 6d70 6f72 ithout the impor\n+001194f0: 7420 6162 6f76 652c 2075 7365 3a20 3c2f t above, use:
    .//gsoap SOAP\n+00119540: 2d45 4e56 2073 6368 656d 6120 6e61 6d65 -ENV schema name\n+00119550: 7370 6163 653a 2068 7474 703a 2f2f 7777 space: http://ww\n+00119560: 772e 7733 2e6f 7267 2f32 3030 332f 3035 w.w3.org/2003/05\n+00119570: 2f73 6f61 702d 656e 7665 6c6f 7065 203c /soap-envelope <\n+00119580: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001195a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001195b0: 656e 7422 3e2f 2f67 736f 6170 2053 4f41 ent\">//gsoap SOA\n+001195c0: 502d 454e 4320 7363 6865 6d61 206e 616d P-ENC schema nam\n+001195d0: 6573 7061 6365 3a20 6874 7470 3a2f 2f77 espace: http://w\n+001195e0: 7777 2e77 332e 6f72 672f 3230 3033 2f30 ww.w3.org/2003/0\n+001195f0: 352f 736f 6170 2d65 6e63 6f64 696e 6720 5/soap-encoding \n+00119600: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00119620: 3c73 7061 6e20 636c 6173 733d 2263 6f6d */ \n+00119640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n 00119660: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    //gsoap x sch\n-001196b0: 656d 6120 6e61 6d65 7370 6163 653a 2068 ema namespace: h\n-001196c0: 7474 703a 2f2f 6d79 2e66 6972 7374 2e6d ttp://my.first.m\n-001196d0: 746f 6d2e 6e65 7420 3c2f 7370 616e 3e3c tom.net <\n-001196e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-00119710: 7275 6374 203c 2f73 7061 6e3e 785f 5f6d ruct x__m\n-00119720: 7944 6174 6120 3c2f 6469 763e 0a3c 6469 yData
    .{\n-00119740: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    _xop__Include xop__Include;\n-001197b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // attach\n-001197d0: 6d65 6e74 203c 2f73 7061 6e3e 3c2f 6469 ment .
    @ char *\n-00119820: 786d 696d 6535 5f5f 636f 6e74 656e 7454 xmime5__contentT\n-00119830: 7970 653b 2020 3c73 7061 6e20 636c 6173 ype; // a\n-00119850: 6e64 2069 7473 2063 6f6e 7465 6e74 5479 nd its contentTy\n-00119860: 7065 203c 2f73 7061 6e3e 3c2f 6469 763e pe
    \n-00119870: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .<\n-001198a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001198b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int x__myMTOMtes\n-001198d0: 7428 3c73 7061 6e20 636c 6173 733d 226b t(struct x__myData \n-00119900: 2a69 6e2c 203c 7370 616e 2063 6c61 7373 *in, struc\n-00119920: 743c 2f73 7061 6e3e 2078 5f5f 6d79 4461 t x__myDa\n-00119930: 7461 202a 6f75 7429 3b3c 2f64 6976 3e0a ta *out);
    .\n-00119940: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    When a\n-00119960: 6e20 696e 7374 616e 6365 206f 6620 3c63 n instance of x__myDataTyp\n-00119980: 653c 2f63 6f64 653e 2069 7320 7365 7269 e is seri\n-00119990: 616c 697a 6564 2061 6e64 2065 6974 6865 alized and eithe\n-001199a0: 7220 6f72 2062 6f74 6820 7468 6520 3c63 r or both the id an\n-001199c0: 6420 3c63 6f64 653e 7479 7065 3c2f 636f d type members are \n-001199e0: 6e6f 6e2d 4e55 4c4c 2c20 7468 6520 6461 non-NULL, the da\n-001199f0: 7461 2069 7320 7472 616e 736d 6974 7465 ta is transmitte\n-00119a00: 6420 6173 204d 544f 4d20 4d49 4d45 2061 d as MTOM MIME a\n-00119a10: 7474 6163 686d 656e 7420 6966 2074 6865 ttachment if the\n-00119a20: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n-00119a30: 5f4d 544f 4d3c 2f63 6f64 653e 2066 6c61 _MTOM fla\n-00119a40: 6720 6973 2073 6574 2069 6e20 7468 6520 g is set in the \n-00119a50: 6753 4f41 5027 7320 736f 6170 2073 7472 gSOAP's soap str\n-00119a60: 7563 7420 636f 6e74 6578 743a 3c2f 703e uct context:

    \n-00119a70: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    .\n-00119bf0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    SOA\n-00119ca0: 505f 454e 435f 4d54 4f4d 3c2f 613e 3c2f P_ENC_MTOM
    #define \n-00119cd0: 534f 4150 5f45 4e43 5f4d 544f 4d3c 2f64 SOAP_ENC_MTOM
    soap_mode \n-00119d00: 454e 4320 6f75 7470 7574 2066 6c61 6720 ENC output flag \n-00119d10: 7661 6c75 6520 746f 2065 6e61 626c 6520 value to enable \n-00119d20: 4d54 4f4d 2058 4f50 2061 7474 6163 686d MTOM XOP attachm\n-00119d30: 656e 7473 2069 6e20 6d65 7373 6167 6573 ents in messages\n-00119d40: 2074 6f20 6265 2073 656e 742c 2e2e 2e3c to be sent,...<\n-00119d50: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-00119d70: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-00119d80: 6170 322e 683a 3137 3736 3c2f 6469 763e ap2.h:1776
    \n-00119d90: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Without this fl\n-00119dc0: 6167 2c20 7468 6520 6174 7461 6368 6d65 ag, the attachme\n-00119dd0: 6e74 7320 7769 6c6c 2062 6520 7472 616e nts will be tran\n-00119de0: 736d 6974 7465 6420 696e 2044 494d 4520 smitted in DIME \n-00119df0: 666f 726d 6174 2c20 7768 6963 6820 6973 format, which is\n-00119e00: 206e 6f74 2077 6861 7420 7765 2077 616e not what we wan\n-00119e10: 742e 2049 6620 796f 7572 2063 7572 7265 t. If your curre\n-00119e20: 6e74 2063 6c69 656e 7473 2061 6e64 2073 nt clients and s\n-00119e30: 6572 7669 6365 7320 6172 6520 6261 7365 ervices are base\n-00119e40: 6420 6f6e 206e 6f6e 2d73 7472 6561 6d69 d on non-streami\n-00119e50: 6e67 2044 494d 4520 6174 7461 6368 6d65 ng DIME attachme\n-00119e60: 6e74 7320 7573 696e 6720 7468 6520 534f nts using the SO\n-00119e70: 4150 2062 6f64 7920 7265 6665 7265 6e63 AP body referenc\n-00119e80: 6520 6d65 6368 616e 6973 6d20 2874 6875 e mechanism (thu\n-00119e90: 732c 2077 6974 686f 7574 2075 7369 6e67 s, without using\n-00119ea0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap_set_dime_\n-00119f40: 6174 7461 6368 6d65 6e74 3c2f 613e 3c2f attachment function) \n-00119f60: 6f72 2070 6c61 696e 2062 6173 6536 3420 or plain base64 \n-00119f70: 6269 6e61 7279 2058 4d4c 2064 6174 6120 binary XML data \n-00119f80: 656c 656d 656e 7473 2c20 6974 2069 7320 elements, it is \n-00119f90: 7665 7279 2065 6173 7920 746f 2061 646f very easy to ado\n-00119fa0: 7074 204d 544f 4d20 6279 2072 656e 616d pt MTOM by renam\n-00119fb0: 696e 6720 7468 6520 6269 6e61 7279 2074 ing the binary t\n-00119fc0: 7970 6573 2074 6f20 3c63 6f64 653e 786f ypes to xo\n-00119fd0: 705f 5f49 6e63 6c75 6465 3c2f 636f 6465 p__Include and using the \n-00119ff0: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n-0011a000: 4d54 4f4d 3c2f 636f 6465 3e20 666c 6167 MTOM flag\n-0011a010: 2077 6974 6820 7468 6520 534f 4150 2031 with the SOAP 1\n-0011a020: 2e32 206e 616d 6573 7061 6365 2e3c 2f70 .2 namespace..

    See also AP\n-0011a040: 4920 646f 6375 6d65 6e74 6174 696f 6e20 I documentation \n-0011a050: 4d6f 6475 6c65 203c 6120 636c 6173 733d Module MIME attachm\n-0011a090: 656e 7420 6675 6e63 7469 6f6e 733c 2f61 ent functions.

    .

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

    ..Generating\n-0011a110: 204d 756c 7469 7061 7274 5265 6c61 7465 MultipartRelate\n-0011a120: 6420 4d49 4d45 2061 7474 6163 686d 656e d MIME attachmen\n-0011a130: 7420 6269 6e64 696e 6773 2069 6e20 5753 t bindings in WS\n-0011a140: 444c 3c2f 6832 3e0a 3c70 3e54 6f20 6765 DL.

    To ge\n-0011a150: 6e65 7261 7465 206d 756c 7469 7061 7274 nerate multipart\n-0011a160: 5265 6c61 7465 6420 6269 6e64 696e 6773 Related bindings\n-0011a170: 2069 6e20 7468 6520 5753 444c 2066 696c in the WSDL fil\n-0011a180: 6520 696e 6469 6361 7469 6e67 2074 6865 e indicating the\n-0011a190: 2075 7365 206f 6620 4d49 4d45 2061 7474 use of MIME att\n-0011a1a0: 6163 686d 656e 7473 2c20 7573 653a 3c2f achments, use:.

    //gsoap <pre\n-0011a200: 6669 7826 6774 3b20 7365 7276 6963 6520 fix> service \n-0011a210: 6d65 7468 6f64 2d6d 696d 652d 7479 7065 method-mime-type\n-0011a220: 3a20 2e2e 2e3c 2f73 7061 6e3e 3c2f 6469 : ....

    Thi\n-0011a250: 7320 6469 7265 6374 6976 6520 6469 7265 s directive dire\n-0011a260: 6374 6976 6520 6361 6e20 6265 2072 6570 ctive can be rep\n-0011a270: 6561 7465 6420 666f 7220 6561 6368 2061 eated for each a\n-0011a280: 7474 6163 686d 656e 7420 796f 7520 7761 ttachment you wa\n-0011a290: 6e74 2074 6f20 6173 736f 6369 6174 6520 nt to associate \n-0011a2a0: 7769 7468 2061 206d 6574 686f 6427 7320 with a method's \n-0011a2b0: 7265 7175 6573 7420 616e 6420 7265 7370 request and resp\n-0011a2c0: 6f6e 7365 206d 6573 7361 6765 2e20 7365 onse message. se\n-0011a2d0: 6520 616c 736f 2053 6563 7469 6f6e 203c e also Section <\n-0011a2e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0011a2f0: 663d 2269 6e64 6578 2e68 746d 6c23 6469 f=\"index.html#di\n-0011a300: 7265 6374 6976 6573 223e 4469 7265 6374 rectives\">Direct\n-0011a310: 6976 6573 3c2f 613e 202e 3c2f 703e 0a3c ives .

    .<\n-0011a320: 703e 466f 7220 6578 616d 706c 653a 3c2f p>For example:.
    #import &q\n-0011a380: 756f 743b 696d 706f 7274 2f78 6f70 2e68 uot;import/xop.h\n-0011a390: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    #import "\n-0011a3e0: 696d 706f 7274 2f78 6d69 6d65 352e 6826 import/xmime5.h&\n-0011a3f0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "i\n-0011a440: 6d70 6f72 742f 736f 6170 3132 2e68 2671 mport/soap12.h&q\n-0011a450: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; //gsoap\n+00119690: 2078 2073 6368 656d 6120 6e61 6d65 7370 x schema namesp\n+001196a0: 6163 653a 2068 7474 703a 2f2f 6d79 2e66 ace: http://my.f\n+001196b0: 6972 7374 2e6d 746f 6d2e 6e65 7420 3c2f irst.mtom.net
    .struct x__myData .
    {
    . \n+00119740: 2020 203c 6120 636c 6173 733d 2263 6f64 _xop__Inc\n+00119780: 6c75 6465 3c2f 613e 2078 6f70 5f5f 496e lude xop__In\n+00119790: 636c 7564 653b 203c 7370 616e 2063 6c61 clude; // \n+001197b0: 6174 7461 6368 6d65 6e74 203c 2f73 7061 attachment
    .
    @ <\n+001197e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001197f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *xmime5__co\n+00119810: 6e74 656e 7454 7970 653b 2020 3c73 7061 ntentType; // and its con\n+00119840: 7465 6e74 5479 7065 203c 2f73 7061 6e3e tentType \n+00119850: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .
    i\n+001198a0: 6e74 3c2f 7370 616e 3e20 785f 5f6d 794d nt x__myM\n+001198b0: 544f 4d74 6573 7428 3c73 7061 6e20 636c TOMtest(st\n+001198d0: 7275 6374 3c2f 7370 616e 3e20 785f 5f6d ruct x__m\n+001198e0: 7944 6174 6120 2a69 6e2c 203c 7370 616e yData *in, struct x\n+00119910: 5f5f 6d79 4461 7461 202a 6f75 7429 3b3c __myData *out);<\n+00119920: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00119940: 5768 656e 2061 6e20 696e 7374 616e 6365 When an instance\n+00119950: 206f 6620 3c63 6f64 653e 785f 5f6d 7944 of x__myD\n+00119960: 6174 6154 7970 653c 2f63 6f64 653e 2069 ataType i\n+00119970: 7320 7365 7269 616c 697a 6564 2061 6e64 s serialized and\n+00119980: 2065 6974 6865 7220 6f72 2062 6f74 6820 either or both \n+00119990: 7468 6520 3c63 6f64 653e 6964 3c2f 636f the id and ty\n+001199b0: 7065 3c2f 636f 6465 3e20 6d65 6d62 6572 pe member\n+001199c0: 7320 6172 6520 6e6f 6e2d 4e55 4c4c 2c20 s are non-NULL, \n+001199d0: 7468 6520 6461 7461 2069 7320 7472 616e the data is tran\n+001199e0: 736d 6974 7465 6420 6173 204d 544f 4d20 smitted as MTOM \n+001199f0: 4d49 4d45 2061 7474 6163 686d 656e 7420 MIME attachment \n+00119a00: 6966 2074 6865 203c 636f 6465 3e23 534f if the #SO\n+00119a10: 4150 5f45 4e43 5f4d 544f 4d3c 2f63 6f64 AP_ENC_MTOM flag is set i\n+00119a30: 6e20 7468 6520 6753 4f41 5027 7320 736f n the gSOAP's so\n+00119a40: 6170 2073 7472 7563 7420 636f 6e74 6578 ap struct contex\n+00119a50: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

    .
    <\n+00119a80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00119a90: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+00119b00: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+00119b60: 6e65 7731 3c2f 613e 283c 6120 636c 6173 new1(SOAP\n+00119bc0: 5f45 4e43 5f4d 544f 4d3c 2f61 3e29 3b3c _ENC_MTOM);<\n+00119bd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #d\n+00119cb0: 6566 696e 6520 534f 4150 5f45 4e43 5f4d efine SOAP_ENC_M\n+00119cc0: 544f 4d3c 2f64 6976 3e3c 6469 7620 636c TOM
    soap\n+00119ce0: 5f6d 6f64 6520 454e 4320 6f75 7470 7574 _mode ENC output\n+00119cf0: 2066 6c61 6720 7661 6c75 6520 746f 2065 flag value to e\n+00119d00: 6e61 626c 6520 4d54 4f4d 2058 4f50 2061 nable MTOM XOP a\n+00119d10: 7474 6163 686d 656e 7473 2069 6e20 6d65 ttachments in me\n+00119d20: 7373 6167 6573 2074 6f20 6265 2073 656e ssages to be sen\n+00119d30: 742c 2e2e 2e3c 2f64 6976 3e3c 6469 7620 t,...
    Definition:\n+00119d60: 2073 7464 736f 6170 322e 683a 3137 3736 stdsoap2.h:1776\n+00119d70: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    Without t\n+00119da0: 6869 7320 666c 6167 2c20 7468 6520 6174 his flag, the at\n+00119db0: 7461 6368 6d65 6e74 7320 7769 6c6c 2062 tachments will b\n+00119dc0: 6520 7472 616e 736d 6974 7465 6420 696e e transmitted in\n+00119dd0: 2044 494d 4520 666f 726d 6174 2c20 7768 DIME format, wh\n+00119de0: 6963 6820 6973 206e 6f74 2077 6861 7420 ich is not what \n+00119df0: 7765 2077 616e 742e 2049 6620 796f 7572 we want. If your\n+00119e00: 2063 7572 7265 6e74 2063 6c69 656e 7473 current clients\n+00119e10: 2061 6e64 2073 6572 7669 6365 7320 6172 and services ar\n+00119e20: 6520 6261 7365 6420 6f6e 206e 6f6e 2d73 e based on non-s\n+00119e30: 7472 6561 6d69 6e67 2044 494d 4520 6174 treaming DIME at\n+00119e40: 7461 6368 6d65 6e74 7320 7573 696e 6720 tachments using \n+00119e50: 7468 6520 534f 4150 2062 6f64 7920 7265 the SOAP body re\n+00119e60: 6665 7265 6e63 6520 6d65 6368 616e 6973 ference mechanis\n+00119e70: 6d20 2874 6875 732c 2077 6974 686f 7574 m (thus, without\n+00119e80: 2075 7369 6e67 2074 6865 203c 636f 6465 using the soap_set\n+00119f20: 5f64 696d 655f 6174 7461 6368 6d65 6e74 _dime_attachment\n+00119f30: 3c2f 613e 3c2f 636f 6465 3e20 6675 6e63 func\n+00119f40: 7469 6f6e 2920 6f72 2070 6c61 696e 2062 tion) or plain b\n+00119f50: 6173 6536 3420 6269 6e61 7279 2058 4d4c ase64 binary XML\n+00119f60: 2064 6174 6120 656c 656d 656e 7473 2c20 data elements, \n+00119f70: 6974 2069 7320 7665 7279 2065 6173 7920 it is very easy \n+00119f80: 746f 2061 646f 7074 204d 544f 4d20 6279 to adopt MTOM by\n+00119f90: 2072 656e 616d 696e 6720 7468 6520 6269 renaming the bi\n+00119fa0: 6e61 7279 2074 7970 6573 2074 6f20 3c63 nary types to xop__Include\n+00119fc0: 3c2f 636f 6465 3e20 616e 6420 7573 696e and usin\n+00119fd0: 6720 7468 6520 3c63 6f64 653e 2353 4f41 g the #SOA\n+00119fe0: 505f 454e 435f 4d54 4f4d 3c2f 636f 6465 P_ENC_MTOM flag with the \n+0011a000: 534f 4150 2031 2e32 206e 616d 6573 7061 SOAP 1.2 namespa\n+0011a010: 6365 2e3c 2f70 3e0a 3c70 3e53 6565 2061 ce.

    .

    See a\n+0011a020: 6c73 6f20 4150 4920 646f 6375 6d65 6e74 lso API document\n+0011a030: 6174 696f 6e20 4d6f 6475 6c65 203c 6120 ation Module MIME a\n+0011a070: 7474 6163 686d 656e 7420 6675 6e63 7469 ttachment functi\n+0011a080: 6f6e 733c 2f61 3e2e 3c2f 703e 0a3c 703e ons.

    .

    \n+0011a090: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+0011a0b0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Gene\n+0011a0f0: 7261 7469 6e67 204d 756c 7469 7061 7274 rating Multipart\n+0011a100: 5265 6c61 7465 6420 4d49 4d45 2061 7474 Related MIME att\n+0011a110: 6163 686d 656e 7420 6269 6e64 696e 6773 achment bindings\n+0011a120: 2069 6e20 5753 444c 3c2f 6832 3e0a 3c70 in WSDL

    .To generate mul\n+0011a140: 7469 7061 7274 5265 6c61 7465 6420 6269 tipartRelated bi\n+0011a150: 6e64 696e 6773 2069 6e20 7468 6520 5753 ndings in the WS\n+0011a160: 444c 2066 696c 6520 696e 6469 6361 7469 DL file indicati\n+0011a170: 6e67 2074 6865 2075 7365 206f 6620 4d49 ng the use of MI\n+0011a180: 4d45 2061 7474 6163 686d 656e 7473 2c20 ME attachments, \n+0011a190: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n+0011a1b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011a1c0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap &\n+0011a1e0: 6c74 3b70 7265 6669 7826 6774 3b20 7365 lt;prefix> se\n+0011a1f0: 7276 6963 6520 6d65 7468 6f64 2d6d 696d rvice method-mim\n+0011a200: 652d 7479 7065 3a20 2e2e 2e3c 2f73 7061 e-type: ...
    .
    <\n+0011a220: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0011a230: 3c70 3e54 6869 7320 6469 7265 6374 6976

    This directiv\n+0011a240: 6520 6469 7265 6374 6976 6520 6361 6e20 e directive can \n+0011a250: 6265 2072 6570 6561 7465 6420 666f 7220 be repeated for \n+0011a260: 6561 6368 2061 7474 6163 686d 656e 7420 each attachment \n+0011a270: 796f 7520 7761 6e74 2074 6f20 6173 736f you want to asso\n+0011a280: 6369 6174 6520 7769 7468 2061 206d 6574 ciate with a met\n+0011a290: 686f 6427 7320 7265 7175 6573 7420 616e hod's request an\n+0011a2a0: 6420 7265 7370 6f6e 7365 206d 6573 7361 d response messa\n+0011a2b0: 6765 2e20 7365 6520 616c 736f 2053 6563 ge. see also Sec\n+0011a2c0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion \n+0011a2f0: 4469 7265 6374 6976 6573 3c2f 613e 202e Directives .\n+0011a300: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

    .

    For exam\n+0011a310: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    <\n+0011a330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011a340: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp\n+0011a360: 6f72 7420 2671 756f 743b 696d 706f 7274 ort "import\n+0011a370: 2f78 6f70 2e68 2671 756f 743b 3c2f 7370 /xop.h"
    .
    #import \n+0011a3c0: 2671 756f 743b 696d 706f 7274 2f78 6d69 "import/xmi\n+0011a3d0: 6d65 352e 6826 7175 6f74 3b3c 2f73 7061 me5.h"
    .
    #import &\n+0011a420: 7175 6f74 3b69 6d70 6f72 742f 736f 6170 quot;import/soap\n+0011a430: 3132 2e68 2671 756f 743b 3c2f 7370 616e 12.h"
    .
    .
    .<\n-0011a490: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0011a4a0: 656e 7422 3e2f 2f67 736f 6170 2078 2073 ent\">//gsoap x s\n-0011a4b0: 6368 656d 6120 6e61 6d65 7370 6163 653a chema namespace:\n-0011a4c0: 2068 7474 703a 2f2f 6d79 2e66 6972 7374 http://my.first\n-0011a4d0: 2e6d 746f 6d2e 6e65 7420 3c2f 7370 616e .mtom.net
    .
    \n-0011a510: 7374 7275 6374 203c 2f73 7061 6e3e 785f struct x_\n-0011a520: 5f6d 7944 6174 6120 3c2f 6469 763e 0a3c _myData
    .<\n+0011a470: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine\">//gso\n+0011a490: 6170 2078 2073 6368 656d 6120 6e61 6d65 ap x schema name\n+0011a4a0: 7370 6163 653a 2068 7474 703a 2f2f 6d79 space: http://my\n+0011a4b0: 2e66 6972 7374 2e6d 746f 6d2e 6e65 7420 .first.mtom.net \n+0011a4c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0011a4e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct x__myData .
    {
    .<\n 0011a530: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0011a540: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n-0011a560: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0011a570: 7265 663d 2273 7472 7563 745f 5f78 6f70 ref=\"struct__xop\n-0011a580: 5f5f 5f5f 5f69 6e63 6c75 6465 2e68 746d _____include.htm\n-0011a590: 6c22 3e5f 786f 705f 5f49 6e63 6c75 6465 l\">_xop__Include\n-0011a5a0: 3c2f 613e 2078 6f70 5f5f 496e 636c 7564 xop__Includ\n-0011a5b0: 653b 203c 7370 616e 2063 6c61 7373 3d22 e; // atta\n-0011a5d0: 6368 6d65 6e74 203c 2f73 7061 6e3e 3c2f chment .
    @ char\n-0011a620: 202a 786d 696d 6535 5f5f 636f 6e74 656e *xmime5__conten\n-0011a630: 7454 7970 653b 2020 3c73 7061 6e20 636c tType; //\n-0011a650: 2061 6e64 2069 7473 2063 6f6e 7465 6e74 and its content\n-0011a660: 5479 7065 203c 2f73 7061 6e3e 3c2f 6469 Type .
    };
    .<\n-0011a690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0011a6a0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap x\n-0011a6c0: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n-0011a6d0: 6d69 6d65 2d74 7970 653a 206d 794d 544f mime-type: myMTO\n-0011a6e0: 4d74 6573 7420 7465 7874 2f78 6d6c 203c Mtest text/xml <\n-0011a6f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0011a710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0011a720: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int x__myMTOMtes\n-0011a740: 7428 3c73 7061 6e20 636c 6173 733d 226b t(struct x__myData \n-0011a770: 2a69 6e2c 203c 7370 616e 2063 6c61 7373 *in, struc\n-0011a790: 743c 2f73 7061 6e3e 2078 5f5f 6d79 4461 t x__myDa\n-0011a7a0: 7461 202a 6f75 7429 3b3c 2f64 6976 3e0a ta *out);
    .\n-0011a7b0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The //gsoap x se\n-0011a7e0: 7276 6963 6520 6d65 7468 6f64 2d6d 696d rvice method-mim\n-0011a7f0: 652d 7479 7065 3a3c 2f63 6f64 653e 2064 e-type: d\n-0011a800: 6972 6563 7469 7665 2069 6e64 6963 6174 irective indicat\n-0011a810: 6573 2074 6861 7420 7468 6973 206f 7065 es that this ope\n-0011a820: 7261 7469 6f6e 2061 6363 6570 7473 203c ration accepts <\n-0011a830: 656d 3e3c 636f 6465 3e74 6578 742f 786d em>text/xm\n-0011a840: 6c3c 2f63 6f64 653e 3c2f 656d 3e20 4d49 l MI\n-0011a850: 4d45 2061 7474 6163 686d 656e 7473 2e20 ME attachments. \n-0011a860: 5365 6520 7468 6520 534f 4150 2d77 6974 See the SOAP-wit\n-0011a870: 682d 4174 7461 6368 6d65 6e74 2073 7065 h-Attachment spe\n-0011a880: 6369 6669 6361 7469 6f6e 2066 6f72 2074 cification for t\n-0011a890: 6865 204d 494d 4520 7479 7065 7320 746f he MIME types to\n-0011a8a0: 2075 7365 2028 666f 7220 6578 616d 706c use (for exampl\n-0011a8b0: 652c 203c 636f 6465 3e2a 2f2a 3c2f 636f e, */* is a wildcar\n-0011a8d0: 6429 2e20 4966 2074 6865 206f 7065 7261 d). If the opera\n-0011a8e0: 7469 6f6e 2068 6173 206d 6f72 6520 7468 tion has more th\n-0011a8f0: 616e 206f 6e65 2061 7474 6163 686d 656e an one attachmen\n-0011a900: 742c 206a 7573 7420 7265 7065 6174 2074 t, just repeat t\n-0011a910: 6869 7320 6469 7265 6374 6976 6520 666f his directive fo\n-0011a920: 7220 6561 6368 2061 7474 6163 686d 656e r each attachmen\n-0011a930: 7420 796f 7520 7761 6e74 2074 6f20 6269 t you want to bi\n-0011a940: 6e64 2074 6f20 7468 6520 6f70 6572 6174 nd to the operat\n-0011a950: 696f 6e2e 3c2f 703e 0a3c 703e 546f 2062 ion.

    .

    To b\n-0011a960: 696e 6420 6174 7461 6368 6d65 6e74 7320 ind attachments \n-0011a970: 6f6e 6c79 2074 6f20 7468 6520 7265 7175 only to the requ\n-0011a980: 6573 7420 6d65 7373 6167 6520 6f66 2061 est message of a\n-0011a990: 6e20 6f70 6572 6174 696f 6e2c 2075 7365 n operation, use\n-0011a9a0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap <p\n-0011a9f0: 7265 6669 7826 6774 3b20 7365 7276 6963 refix> servic\n-0011aa00: 6520 6d65 7468 6f64 2d69 6e70 7574 2d6d e method-input-m\n-0011aa10: 696d 652d 7479 7065 3a20 2e2e 2e3c 2f73 ime-type: ...
    .

    The \n-0011ab40: 7773 646c 3268 2074 6f6f 6c20 7265 636f wsdl2h tool reco\n-0011ab50: 676e 697a 6573 204d 494d 4520 6174 7461 gnizes MIME atta\n-0011ab60: 6368 6d65 6e74 7320 616e 6420 7072 6f64 chments and prod\n-0011ab70: 7563 6573 2061 6e20 616e 6e6f 7461 7465 uces an annotate\n-0011ab80: 6420 6865 6164 6572 2066 696c 652e 3c2f d header file..

    You can re\n-0011aba0: 7065 6174 2074 6865 7365 2064 6972 6563 peat these direc\n-0011abb0: 7469 7665 7320 666f 7220 616c 6c20 6d75 tives for all mu\n-0011abc0: 6c74 6970 6172 7452 656c 6174 6564 204d ltipartRelated M\n-0011abd0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n-0011abe0: 796f 7520 7761 6e74 2074 6f20 6173 736f you want to asso\n-0011abf0: 6369 6174 6520 7769 7468 2074 6865 2073 ciate with the s\n-0011ac00: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n-0011ac10: 2069 6e70 7574 2061 6e64 206f 7574 7075 input and outpu\n-0011ac20: 742e 3c2f 703e 0a3c 703e f09f 949d 203c t.

    .

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

    ..Sending and re\n-0011aca0: 6365 6976 696e 6720 4d54 4f4d 2061 7474 ceiving MTOM att\n-0011acb0: 6163 686d 656e 7473 3c2f 6832 3e0a 3c70 achments.A receiver must\n-0011acd0: 2062 6520 696e 666f 726d 6564 2074 6f20 be informed to \n-0011ace0: 7265 636f 676e 697a 6520 4d54 4f4d 2061 recognize MTOM a\n-0011acf0: 7474 6163 686d 656e 7473 2062 7920 7365 ttachments by se\n-0011ad00: 7474 696e 6720 7468 6520 3c63 6f64 653e tting the \n-0011ad10: 2353 4f41 505f 454e 435f 4d54 4f4d 3c2f #SOAP_ENC_MTOM flag of th\n-0011ad30: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context. Oth\n-0011ada0: 6572 7769 7365 2c20 7468 6520 7265 6775 erwise, the regu\n-0011adb0: 6c61 7220 4d49 4d45 2061 7474 6163 686d lar MIME attachm\n-0011adc0: 656e 7420 6d65 6368 616e 6973 6d20 2853 ent mechanism (S\n-0011add0: 7741 2920 7769 6c6c 2062 6520 7573 6564 wA) will be used\n-0011ade0: 2074 6f20 7374 6f72 6520 6174 7461 6368 to store attach\n-0011adf0: 6d65 6e74 732e 3c2f 703e 0a3c 703e 5768 ments.

    .

    Wh\n-0011ae00: 656e 2075 7369 6e67 2077 7364 6c32 6820 en using wsdl2h \n-0011ae10: 746f 2062 7569 6c64 2063 6c69 656e 7473 to build clients\n-0011ae20: 2061 6e64 2f6f 7220 7365 7276 6963 6573 and/or services\n-0011ae30: 2c20 796f 7520 7368 6f75 6c64 2075 7365 , you should use\n-0011ae40: 2074 6865 203c 656d 3e3c 636f 6465 3e74 the t\n-0011ae50: 7970 656d 6170 2e64 6174 3c2f 636f 6465 ypemap.dat file incl\n-0011ae70: 7564 6564 2069 6e20 7468 6520 6753 4f41 uded in the gSOA\n-0011ae80: 5020 736f 7572 6365 2063 6f64 6520 7061 P source code pa\n-0011ae90: 636b 6167 652e 2054 6865 203c 656d 3e3c ckage. The <\n-0011aea0: 636f 6465 3e74 7970 656d 6170 2e64 6174 code>typemap.dat\n-0011aeb0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n-0011aec0: 6520 6465 6669 6e65 7320 7468 6520 584f e defines the XO\n-0011aed0: 5020 6e61 6d65 7370 6163 6520 616e 6420 P namespace and \n-0011aee0: 584d 4c20 4d49 4d45 206e 616d 6573 7061 XML MIME namespa\n-0011aef0: 6365 7320 6173 2069 6d70 6f72 7465 6420 ces as imported \n-0011af00: 6e61 6d65 7370 6163 6573 3a20 3c2f 703e namespaces:

    \n-0011af10: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    xop    = &\n-0011af30: 6c74 3b68 7474 703a 2f2f 7777 772e 7733  lt;http://www.w3\n-0011af40: 2e6f 7267 2f32 3030 342f 3038 2f78 6f70  .org/2004/08/xop\n-0011af50: 2f69 6e63 6c75 6465 2667 743b 200a 786d  /include> .xm\n-0011af60: 696d 6535 203d 2026 6c74 3b68 7474 703a  ime5 = <http:\n-0011af70: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030  //www.w3.org/200\n-0011af80: 352f 3035 2f78 6d6c 6d69 6d65 2667 743b  5/05/xmlmime>\n-0011af90: 200a 786d 696d 6534 203d 2026 6c74 3b68   .xmime4 = <h\n-0011afa0: 7474 703a 2f2f 7777 772e 7733 2e6f 7267  ttp://www.w3.org\n-0011afb0: 2f32 3030 342f 3131 2f78 6d6c 6d69 6d65  /2004/11/xmlmime\n-0011afc0: 2667 743b 0a3c 2f70 7265 3e3c 703e 2054  >.

    T\n-0011afd0: 6865 2077 7364 6c32 6820 746f 6f6c 2075 he wsdl2h tool u\n-0011afe0: 7365 7320 7468 6520 3c65 6d3e 3c63 6f64 ses the typemap.dat file t\n-0011b010: 6f20 636f 6e76 6572 7420 5753 444c 2069 o convert WSDL i\n-0011b020: 6e74 6f20 616e 2069 6e74 6572 6661 6365 nto an interface\n-0011b030: 2068 6561 6465 7220 6669 6c65 2e20 496e header file. In\n-0011b040: 2074 6869 7320 6361 7365 2077 6520 646f this case we do\n-0011b050: 6e27 7420 7761 6e74 2074 6865 2077 7364 n't want the wsd\n-0011b060: 6c32 6820 746f 6f6c 2074 6f20 7265 6164 l2h tool to read\n-0011b070: 2074 6865 2058 4f50 2073 6368 656d 6120 the XOP schema \n-0011b080: 616e 6420 7472 616e 736c 6174 6520 6974 and translate it\n-0011b090: 2c20 7369 6e63 6520 7765 2068 6176 6520 , since we have \n-0011b0a0: 6120 7072 652d 6465 6669 6e65 6420 3c63 a pre-defined _xop__\n-0011b120: 496e 636c 7564 653c 2f61 3e3c 2f63 6f64 Include element to ha\n-0011b140: 6e64 6c65 2058 4f50 2066 6f72 204d 544f ndle XOP for MTO\n-0011b150: 4d2e 2054 6869 7320 3c63 6f64 653e 3c61 M. This _xop__Includ\n-0011b1d0: 653c 2f61 3e3c 2f63 6f64 653e 2065 6c65 e ele\n-0011b1e0: 6d65 6e74 2069 7320 6465 6669 6e65 6420 ment is defined \n-0011b1f0: 696e 203c 656d 3e3c 636f 6465 3e78 6f70 in xop\n-0011b200: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 .h. \n-0011b210: 5468 6572 6566 6f72 652c 2074 6865 2062 Therefore, the b\n-0011b220: 696e 6469 6e67 7320 7368 6f77 6e20 6162 indings shown ab\n-0011b230: 6f76 6520 7769 6c6c 206e 6f74 2074 7261 ove will not tra\n-0011b240: 6e73 6c61 7465 2074 6865 2058 4f50 2061 nslate the XOP a\n-0011b250: 6e64 2058 4d4c 204d 494d 4520 7363 6865 nd XML MIME sche\n-0011b260: 6d61 7320 746f 2063 6f64 652c 2062 7574 mas to code, but\n-0011b270: 2067 656e 6572 6174 6573 203c 636f 6465 generates #import \n-0011b290: 7374 6174 656d 656e 7473 2069 6e73 7465 statements inste\n-0011b2a0: 6164 2069 6e20 7468 6520 6765 6e65 7261 ad in the genera\n-0011b2b0: 7465 6420 696e 7465 7266 6163 6520 6865 ted interface he\n-0011b2c0: 6164 6572 2066 696c 653a 3c2f 703e 0a3c ader file:

    .<\n-0011b2d0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-0011b2e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #import "\n-0011b320: 786f 702e 6826 7175 6f74 3b3c 2f73 7061 xop.h"
    .
    #import &\n-0011b370: 7175 6f74 3b78 6d69 6d65 352e 6826 7175 quot;xmime5.h&qu\n-0011b380: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n-0011b390: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The <\n-0011b3b0: 636f 6465 3e23 696d 706f 7274 3c2f 636f code>#import statements a\n-0011b3d0: 7265 206f 6e6c 7920 6164 6465 6420 666f re only added fo\n-0011b3e0: 7220 7468 6f73 6520 6e61 6d65 7370 6163 r those namespac\n-0011b3f0: 6573 2074 6861 7420 6172 6520 6163 7475 es that are actu\n-0011b400: 616c 6c79 2075 7365 642e 3c2f 703e 0a3c ally used.

    .<\n-0011b410: 703e 4c65 7427 7320 7461 6b65 2061 206c p>Let's take a l\n-0011b420: 6f6f 6b20 6174 2061 6e20 6578 616d 706c ook at an exampl\n-0011b430: 652e 2054 6865 2077 7364 6c32 6820 696d e. The wsdl2h im\n-0011b440: 706f 7274 6572 2067 656e 6572 6174 6573 porter generates\n-0011b450: 2061 2068 6561 6465 7220 6669 6c65 2077 a header file w\n-0011b460: 6974 6820 3c63 6f64 653e 2369 6d70 6f72 ith #impor\n-0011b470: 7420 2278 6f70 2e68 223c 2f63 6f64 653e t \"xop.h\"\n-0011b480: 2066 726f 6d20 6120 5753 444c 2074 6861 from a WSDL tha\n-0011b490: 7420 7265 6665 7265 6e63 6573 2058 4f50 t references XOP\n-0011b4a0: 2c20 666f 7220 6578 616d 706c 653a 3c2f , for example:.
    #import &q\n-0011b500: 756f 743b 786f 702e 6826 7175 6f74 3b3c uot;xop.h"<\n-0011b510: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-0011b530: 3c73 7061 6e20 636c 6173 733d 2270 7265 #impo\n-0011b550: 7274 2026 7175 6f74 3b78 6d69 6d65 352e rt "xmime5.\n-0011b560: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n-0011b570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-0011b5a0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n-0011b5b0: 4461 7461 203c 2f64 6976 3e0a 3c64 6976 Data
    .{<\n-0011b5d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    @ char *xmime5__cont\n-0011b690: 656e 7454 7970 653b 2020 3c2f 6469 763e entType;
    \n-0011b6a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    Suppose th\n-0011b6e0: 6520 5753 444c 2064 6566 696e 6573 2061 e WSDL defines a\n-0011b6f0: 6e20 6f70 6572 6174 696f 6e3a 3c2f 703e n operation:

    \n-0011b700: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ns\n-0011b750: 5f5f 6563 686f 4461 7461 283c 7370 616e __echoData(struct n\n-0011b780: 735f 5f44 6174 6120 2a69 6e2c 203c 7370 s__Data *in, struct\n-0011b7b0: 206e 735f 5f44 6174 6120 2a6f 7574 293b ns__Data *out);\n-0011b7c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    After generatin\n-0011b7f0: 6720 7468 6520 7374 7562 2066 756e 6374 g the stub funct\n-0011b800: 696f 6e73 2077 6974 6820 7468 6520 736f ions with the so\n-0011b810: 6170 6370 7032 2074 6f6f 6c2c 2077 6520 apcpp2 tool, we \n-0011b820: 6361 6e20 696e 766f 6b65 2074 6865 2073 can invoke the s\n-0011b830: 7475 6220 6174 2074 6865 2063 6c69 656e tub at the clien\n-0011b840: 7420 7369 6465 2077 6974 683a 3c2f 703e t side with:

    \n-0011b850: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    \n-0011b9d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struct \n-0011ba00: 3c2f 7370 616e 3e6e 735f 5f44 6174 6120 ns__Data \n-0011ba10: 6461 7461 3b20 3c2f 6469 763e 0a3c 6469 data;
    .d\n-0011ba30: 6174 612e 786f 705f 5f49 6e63 6c75 6465 ata.xop__Include\n-0011ba40: 2e5f 5f70 7472 203d 2028 3c73 7061 6e20 .__ptr = (unsigned ch\n-0011ba90: 6172 3c2f 7370 616e 3e2a 293c 7370 616e ar*)"<\n-0011bac0: 3b62 2667 743b 4865 6c6c 6f20 776f 726c ;b>Hello worl\n-0011bad0: 6421 266c 743b 2f62 2667 743b 2671 756f d!</b>&quo\n-0011bae0: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    data.xop__In\n-0011bb10: 636c 7564 652e 5f5f 7369 7a65 203d 2032 clude.__size = 2\n-0011bb20: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
    .
    data\n-0011bb40: 2e78 6f70 5f5f 496e 636c 7564 652e 6964 .xop__Include.id\n-0011bb50: 203d 204e 554c 4c3b 2020 2020 2020 2020 = NULL; \n-0011bb60: 2020 2020 3c73 7061 6e20 636c 6173 733d // CID\n-0011bb80: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g\n-0011bb90: 656e 6572 6174 6564 2062 7920 656e 6769 enerated by engi\n-0011bba0: 6e65 203c 2f73 7061 6e3e 3c2f 6469 763e ne
    \n-0011bbb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    data.xop__Inc\n-0011bbd0: 6c75 6465 2e74 7970 6520 3d20 3c73 7061 lude.type = "te\n-0011bc00: 7874 2f68 746d 6c26 7175 6f74 3b3c 2f73 xt/html"; //\n-0011bc30: 204d 494d 4520 7479 7065 203c 2f73 7061 MIME type
    .
    data.\n-0011bc60: 786f 705f 5f49 6e63 6c75 6465 2e6f 7074 xop__Include.opt\n-0011bc70: 696f 6e73 203d 204e 554c 4c3b 2020 2020 ions = NULL; \n-0011bc80: 2020 203c 7370 616e 2063 6c61 7373 3d22 // no d\n-0011bca0: 6573 6372 6970 7469 7665 2069 6e66 6f20 escriptive info \n-0011bcb0: 6164 6465 6420 3c2f 7370 616e 3e3c 2f64 added .
    data.xmime\n-0011bce0: 355f 5f63 6f6e 7465 6e74 5479 7065 203d 5__contentType =\n-0011bcf0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0011bd10: 6f74 3b74 6578 742f 6874 6d6c 2671 756f ot;text/html&quo\n-0011bd20: 743b 3c2f 7370 616e 3e3b 203c 7370 616e t;; // MIME type
    .if (soap_call_ns_\n-0011bda0: 5f65 6368 6f44 6174 6128 3c61 2063 6c61 _echoData(soap, endpo\n-0011bde0: 696e 742c 2061 6374 696f 6e2c 2026 616d int, action, &am\n-0011bdf0: 703b 6461 7461 2c20 2661 6d70 3b64 6174 p;data, &dat\n-0011be00: 6129 293c 2f64 6976 3e0a 3c64 6976 2063 a))
    .
    soap_print_faul\n-0011be80: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-0011beb0: 703c 2f61 3e2c 2073 7464 6572 7229 3b3c p, stderr);<\n-0011bec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else .
    printf(\n-0011bf20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0011bf40: 743b 476f 7420 6461 7461 5c6e 2671 756f t;Got data\\n&quo\n-0011bf50: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); ..

    Note that \n-0011c190: 7468 6520 3c63 6f64 653e 786f 705f 5f49 the xop__I\n-0011c1a0: 6e63 6c75 6465 2e74 7970 653c 2f63 6f64 nclude.type member must b\n-0011c1c0: 6520 7365 7420 746f 2074 7261 6e73 6d69 e set to transmi\n-0011c1d0: 7420 4d54 4f4d 2061 7474 6163 686d 656e t MTOM attachmen\n-0011c1e0: 7473 2c20 6f74 6865 7277 6973 6520 696e ts, otherwise in\n-0011c1f0: 6c69 6e65 2062 6173 6536 3420 584d 4c20 line base64 XML \n-0011c200: 7769 6c6c 2062 6520 7365 6e74 2e3c 2f70 will be sent..

    At the serv\n-0011c220: 6572 2073 6964 652c 2077 6520 7368 6f77 er side, we show\n-0011c230: 2061 6e20 6578 616d 706c 6520 6f66 2061 an example of a\n-0011c240: 6e20 6f70 6572 6174 696f 6e20 6861 6e64 n operation hand\n-0011c250: 6c65 7220 7468 6174 206a 7573 7420 636f ler that just co\n-0011c260: 7069 6573 2074 6865 2069 6e70 7574 2064 pies the input d\n-0011c270: 6174 6120 746f 206f 7574 7075 743a 3c2f ata to output:.

    .
    @\n+0011a5e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+0011a600: 2f73 7061 6e3e 202a 786d 696d 6535 5f5f /span> *xmime5__\n+0011a610: 636f 6e74 656e 7454 7970 653b 2020 3c73 contentType; // and its c\n+0011a640: 6f6e 7465 6e74 5479 7065 203c 2f73 7061 ontentType
    .
    }; .
    //g\n+0011a6a0: 736f 6170 2078 2073 6572 7669 6365 206d soap x service m\n+0011a6b0: 6574 686f 642d 6d69 6d65 2d74 7970 653a ethod-mime-type:\n+0011a6c0: 206d 794d 544f 4d74 6573 7420 7465 7874 myMTOMtest text\n+0011a6d0: 2f78 6d6c 203c 2f73 7061 6e3e 3c2f 6469 /xml .
    i\n+0011a710: 6e74 3c2f 7370 616e 3e20 785f 5f6d 794d nt x__myM\n+0011a720: 544f 4d74 6573 7428 3c73 7061 6e20 636c TOMtest(st\n+0011a740: 7275 6374 3c2f 7370 616e 3e20 785f 5f6d ruct x__m\n+0011a750: 7944 6174 6120 2a69 6e2c 203c 7370 616e yData *in, struct x\n+0011a780: 5f5f 6d79 4461 7461 202a 6f75 7429 3b3c __myData *out);<\n+0011a790: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+0011a7b0: 5468 6520 3c63 6f64 653e 2f2f 6773 6f61 The //gsoa\n+0011a7c0: 7020 7820 7365 7276 6963 6520 6d65 7468 p x service meth\n+0011a7d0: 6f64 2d6d 696d 652d 7479 7065 3a3c 2f63 od-mime-type: directive i\n+0011a7f0: 6e64 6963 6174 6573 2074 6861 7420 7468 ndicates that th\n+0011a800: 6973 206f 7065 7261 7469 6f6e 2061 6363 is operation acc\n+0011a810: 6570 7473 203c 656d 3e3c 636f 6465 3e74 epts t\n+0011a820: 6578 742f 786d 6c3c 2f63 6f64 653e 3c2f ext/xml MIME attachm\n+0011a840: 656e 7473 2e20 5365 6520 7468 6520 534f ents. See the SO\n+0011a850: 4150 2d77 6974 682d 4174 7461 6368 6d65 AP-with-Attachme\n+0011a860: 6e74 2073 7065 6369 6669 6361 7469 6f6e nt specification\n+0011a870: 2066 6f72 2074 6865 204d 494d 4520 7479 for the MIME ty\n+0011a880: 7065 7320 746f 2075 7365 2028 666f 7220 pes to use (for \n+0011a890: 6578 616d 706c 652c 203c 636f 6465 3e2a example, *\n+0011a8a0: 2f2a 3c2f 636f 6465 3e20 6973 2061 2077 /* is a w\n+0011a8b0: 696c 6463 6172 6429 2e20 4966 2074 6865 ildcard). If the\n+0011a8c0: 206f 7065 7261 7469 6f6e 2068 6173 206d operation has m\n+0011a8d0: 6f72 6520 7468 616e 206f 6e65 2061 7474 ore than one att\n+0011a8e0: 6163 686d 656e 742c 206a 7573 7420 7265 achment, just re\n+0011a8f0: 7065 6174 2074 6869 7320 6469 7265 6374 peat this direct\n+0011a900: 6976 6520 666f 7220 6561 6368 2061 7474 ive for each att\n+0011a910: 6163 686d 656e 7420 796f 7520 7761 6e74 achment you want\n+0011a920: 2074 6f20 6269 6e64 2074 6f20 7468 6520 to bind to the \n+0011a930: 6f70 6572 6174 696f 6e2e 3c2f 703e 0a3c operation.

    .<\n+0011a940: 703e 546f 2062 696e 6420 6174 7461 6368 p>To bind attach\n+0011a950: 6d65 6e74 7320 6f6e 6c79 2074 6f20 7468 ments only to th\n+0011a960: 6520 7265 7175 6573 7420 6d65 7373 6167 e request messag\n+0011a970: 6520 6f66 2061 6e20 6f70 6572 6174 696f e of an operatio\n+0011a980: 6e2c 2075 7365 3c2f 703e 0a3c 6469 7620 n, use

    .
    //gsoap\n+0011a9d0: 2026 6c74 3b70 7265 6669 7826 6774 3b20 <prefix> \n+0011a9e0: 7365 7276 6963 6520 6d65 7468 6f64 2d69 service method-i\n+0011a9f0: 6e70 7574 2d6d 696d 652d 7479 7065 3a20 nput-mime-type: \n+0011aa00: 2e2e 2e3c 2f73 7061 6e3e 3c2f 6469 763e ...
    \n+0011aa10: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Simil\n+0011aa30: 6172 6c79 2c20 746f 2062 696e 6420 6174 arly, to bind at\n+0011aa40: 7461 6368 6d65 6e74 7320 6f6e 6c79 2074 tachments only t\n+0011aa50: 6f20 7468 6520 7265 7370 6f6e 7365 206d o the response m\n+0011aa60: 6573 7361 6765 206f 6620 616e 206f 7065 essage of an ope\n+0011aa70: 7261 7469 6f6e 2c20 7573 653a 3c2f 703e ration, use:

    \n+0011aa80: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    /\n+0011aac0: 2f67 736f 6170 2026 6c74 3b70 7265 6669 /gsoap <prefi\n+0011aad0: 7826 6774 3b20 7365 7276 6963 6520 6d65 x> service me\n+0011aae0: 7468 6f64 2d6f 7574 7075 742d 6d69 6d65 thod-output-mime\n+0011aaf0: 2d74 7970 653a 202e 2e2e 3c2f 7370 616e -type: ...
    .
    <\n+0011ab20: 703e 5468 6520 7773 646c 3268 2074 6f6f p>The wsdl2h too\n+0011ab30: 6c20 7265 636f 676e 697a 6573 204d 494d l recognizes MIM\n+0011ab40: 4520 6174 7461 6368 6d65 6e74 7320 616e E attachments an\n+0011ab50: 6420 7072 6f64 7563 6573 2061 6e20 616e d produces an an\n+0011ab60: 6e6f 7461 7465 6420 6865 6164 6572 2066 notated header f\n+0011ab70: 696c 652e 3c2f 703e 0a3c 703e 596f 7520 ile.

    .

    You \n+0011ab80: 6361 6e20 7265 7065 6174 2074 6865 7365 can repeat these\n+0011ab90: 2064 6972 6563 7469 7665 7320 666f 7220 directives for \n+0011aba0: 616c 6c20 6d75 6c74 6970 6172 7452 656c all multipartRel\n+0011abb0: 6174 6564 204d 494d 4520 6174 7461 6368 ated MIME attach\n+0011abc0: 6d65 6e74 7320 796f 7520 7761 6e74 2074 ments you want t\n+0011abd0: 6f20 6173 736f 6369 6174 6520 7769 7468 o associate with\n+0011abe0: 2074 6865 2073 6572 7669 6365 206f 7065 the service ope\n+0011abf0: 7261 7469 6f6e 2069 6e70 7574 2061 6e64 ration input and\n+0011ac00: 206f 7574 7075 742e 3c2f 703e 0a3c 703e output.

    .

    \n+0011ac10: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+0011ac30: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Sending \n+0011ac80: 616e 6420 7265 6365 6976 696e 6720 4d54 and receiving MT\n+0011ac90: 4f4d 2061 7474 6163 686d 656e 7473 3c2f OM attachments.

    A receive\n+0011acb0: 7220 6d75 7374 2062 6520 696e 666f 726d r must be inform\n+0011acc0: 6564 2074 6f20 7265 636f 676e 697a 6520 ed to recognize \n+0011acd0: 4d54 4f4d 2061 7474 6163 686d 656e 7473 MTOM attachments\n+0011ace0: 2062 7920 7365 7474 696e 6720 7468 6520 by setting the \n+0011acf0: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n+0011ad00: 4d54 4f4d 3c2f 636f 6465 3e20 666c 6167 MTOM flag\n+0011ad10: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex\n+0011ad80: 742e 204f 7468 6572 7769 7365 2c20 7468 t. Otherwise, th\n+0011ad90: 6520 7265 6775 6c61 7220 4d49 4d45 2061 e regular MIME a\n+0011ada0: 7474 6163 686d 656e 7420 6d65 6368 616e ttachment mechan\n+0011adb0: 6973 6d20 2853 7741 2920 7769 6c6c 2062 ism (SwA) will b\n+0011adc0: 6520 7573 6564 2074 6f20 7374 6f72 6520 e used to store \n+0011add0: 6174 7461 6368 6d65 6e74 732e 3c2f 703e attachments.

    \n+0011ade0: 0a3c 703e 5768 656e 2075 7369 6e67 2077 .

    When using w\n+0011adf0: 7364 6c32 6820 746f 2062 7569 6c64 2063 sdl2h to build c\n+0011ae00: 6c69 656e 7473 2061 6e64 2f6f 7220 7365 lients and/or se\n+0011ae10: 7276 6963 6573 2c20 796f 7520 7368 6f75 rvices, you shou\n+0011ae20: 6c64 2075 7365 2074 6865 203c 656d 3e3c ld use the <\n+0011ae30: 636f 6465 3e74 7970 656d 6170 2e64 6174 code>typemap.dat\n+0011ae40: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+0011ae50: 6520 696e 636c 7564 6564 2069 6e20 7468 e included in th\n+0011ae60: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c\n+0011ae70: 6f64 6520 7061 636b 6167 652e 2054 6865 ode package. The\n+0011ae80: 203c 656d 3e3c 636f 6465 3e74 7970 656d typem\n+0011ae90: 6170 2e64 6174 3c2f 636f 6465 3e3c 2f65 ap.dat file defines \n+0011aeb0: 7468 6520 584f 5020 6e61 6d65 7370 6163 the XOP namespac\n+0011aec0: 6520 616e 6420 584d 4c20 4d49 4d45 206e e and XML MIME n\n+0011aed0: 616d 6573 7061 6365 7320 6173 2069 6d70 amespaces as imp\n+0011aee0: 6f72 7465 6420 6e61 6d65 7370 6163 6573 orted namespaces\n+0011aef0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    xop \n+0011af10: 2020 203d 2026 6c74 3b68 7474 703a 2f2f     = <http://\n+0011af20: 7777 772e 7733 2e6f 7267 2f32 3030 342f  www.w3.org/2004/\n+0011af30: 3038 2f78 6f70 2f69 6e63 6c75 6465 2667  08/xop/include&g\n+0011af40: 743b 200a 786d 696d 6535 203d 2026 6c74  t; .xmime5 = <\n+0011af50: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f  ;http://www.w3.o\n+0011af60: 7267 2f32 3030 352f 3035 2f78 6d6c 6d69  rg/2005/05/xmlmi\n+0011af70: 6d65 2667 743b 200a 786d 696d 6534 203d  me> .xmime4 =\n+0011af80: 2026 6c74 3b68 7474 703a 2f2f 7777 772e   <http://www.\n+0011af90: 7733 2e6f 7267 2f32 3030 342f 3131 2f78  w3.org/2004/11/x\n+0011afa0: 6d6c 6d69 6d65 2667 743b 0a3c 2f70 7265  mlmime>.

    The wsdl2h \n+0011afc0: 746f 6f6c 2075 7365 7320 7468 6520 3c65 tool uses the typemap.\n+0011afe0: 6461 743c 2f63 6f64 653e 3c2f 656d 3e20 dat \n+0011aff0: 6669 6c65 2074 6f20 636f 6e76 6572 7420 file to convert \n+0011b000: 5753 444c 2069 6e74 6f20 616e 2069 6e74 WSDL into an int\n+0011b010: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+0011b020: 6c65 2e20 496e 2074 6869 7320 6361 7365 le. In this case\n+0011b030: 2077 6520 646f 6e27 7420 7761 6e74 2074 we don't want t\n+0011b040: 6865 2077 7364 6c32 6820 746f 6f6c 2074 he wsdl2h tool t\n+0011b050: 6f20 7265 6164 2074 6865 2058 4f50 2073 o read the XOP s\n+0011b060: 6368 656d 6120 616e 6420 7472 616e 736c chema and transl\n+0011b070: 6174 6520 6974 2c20 7369 6e63 6520 7765 ate it, since we\n+0011b080: 2068 6176 6520 6120 7072 652d 6465 6669 have a pre-defi\n+0011b090: 6e65 6420 3c63 6f64 653e 3c61 2063 6c61 ned \n+0011b100: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include element\n+0011b120: 2074 6f20 6861 6e64 6c65 2058 4f50 2066 to handle XOP f\n+0011b130: 6f72 204d 544f 4d2e 2054 6869 7320 3c63 or MTOM. This _xop__\n+0011b1b0: 496e 636c 7564 653c 2f61 3e3c 2f63 6f64 Include element is de\n+0011b1d0: 6669 6e65 6420 696e 203c 656d 3e3c 636f fined in xop.h<\n+0011b1f0: 2f65 6d3e 2e20 5468 6572 6566 6f72 652c /em>. Therefore,\n+0011b200: 2074 6865 2062 696e 6469 6e67 7320 7368 the bindings sh\n+0011b210: 6f77 6e20 6162 6f76 6520 7769 6c6c 206e own above will n\n+0011b220: 6f74 2074 7261 6e73 6c61 7465 2074 6865 ot translate the\n+0011b230: 2058 4f50 2061 6e64 2058 4d4c 204d 494d XOP and XML MIM\n+0011b240: 4520 7363 6865 6d61 7320 746f 2063 6f64 E schemas to cod\n+0011b250: 652c 2062 7574 2067 656e 6572 6174 6573 e, but generates\n+0011b260: 203c 636f 6465 3e23 696d 706f 7274 3c2f #import statements\n+0011b280: 2069 6e73 7465 6164 2069 6e20 7468 6520 instead in the \n+0011b290: 6765 6e65 7261 7465 6420 696e 7465 7266 generated interf\n+0011b2a0: 6163 6520 6865 6164 6572 2066 696c 653a ace header file:\n+0011b2b0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #import \n+0011b300: 2671 756f 743b 786f 702e 6826 7175 6f74 "xop.h"\n+0011b310: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    .\n+0011b320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #im\n+0011b350: 706f 7274 2026 7175 6f74 3b78 6d69 6d65 port "xmime\n+0011b360: 352e 6826 7175 6f74 3b3c 2f73 7061 6e3e 5.h"\n+0011b370: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The #impo\n+0011b3a0: 7274 3c2f 636f 6465 3e20 7374 6174 656d rt statem\n+0011b3b0: 656e 7473 2061 7265 206f 6e6c 7920 6164 ents are only ad\n+0011b3c0: 6465 6420 666f 7220 7468 6f73 6520 6e61 ded for those na\n+0011b3d0: 6d65 7370 6163 6573 2074 6861 7420 6172 mespaces that ar\n+0011b3e0: 6520 6163 7475 616c 6c79 2075 7365 642e e actually used.\n+0011b3f0: 3c2f 703e 0a3c 703e 4c65 7427 7320 7461

    .

    Let's ta\n+0011b400: 6b65 2061 206c 6f6f 6b20 6174 2061 6e20 ke a look at an \n+0011b410: 6578 616d 706c 652e 2054 6865 2077 7364 example. The wsd\n+0011b420: 6c32 6820 696d 706f 7274 6572 2067 656e l2h importer gen\n+0011b430: 6572 6174 6573 2061 2068 6561 6465 7220 erates a header \n+0011b440: 6669 6c65 2077 6974 6820 3c63 6f64 653e file with \n+0011b450: 2369 6d70 6f72 7420 2278 6f70 2e68 223c #import \"xop.h\"<\n+0011b460: 2f63 6f64 653e 2066 726f 6d20 6120 5753 /code> from a WS\n+0011b470: 444c 2074 6861 7420 7265 6665 7265 6e63 DL that referenc\n+0011b480: 6573 2058 4f50 2c20 666f 7220 6578 616d es XOP, for exam\n+0011b490: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    <\n+0011b4b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011b4c0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp\n+0011b4e0: 6f72 7420 2671 756f 743b 786f 702e 6826 ort "xop.h&\n+0011b4f0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "x\n+0011b540: 6d69 6d65 352e 6826 7175 6f74 3b3c 2f73 mime5.h"
    .struct ns__Data .
    {
    . \n+0011b5d0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 _xop__Incl\n+0011b610: 7564 653c 2f61 3e20 786f 705f 5f49 6e63 ude xop__Inc\n+0011b620: 6c75 6465 3b20 3c2f 6469 763e 0a3c 6469 lude;
    . \n+0011b640: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n+0011b660: 723c 2f73 7061 6e3e 202a 786d 696d 6535 r *xmime5\n+0011b670: 5f5f 636f 6e74 656e 7454 7970 653b 2020 __contentType; \n+0011b680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

    .
    };.

    Supp\n+0011b6c0: 6f73 6520 7468 6520 5753 444c 2064 6566 ose the WSDL def\n+0011b6d0: 696e 6573 2061 6e20 6f70 6572 6174 696f ines an operatio\n+0011b6e0: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n+0011b710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0011b720: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__echoData\n+0011b740: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct ns__Data *i\n+0011b770: 6e2c 203c 7370 616e 2063 6c61 7373 3d22 n, struct<\n+0011b790: 2f73 7061 6e3e 206e 735f 5f44 6174 6120 /span> ns__Data \n+0011b7a0: 2a6f 7574 293b 3c2f 6469 763e 0a3c 2f64 *out);
    .

    After gen\n+0011b7d0: 6572 6174 696e 6720 7468 6520 7374 7562 erating the stub\n+0011b7e0: 2066 756e 6374 696f 6e73 2077 6974 6820 functions with \n+0011b7f0: 7468 6520 736f 6170 6370 7032 2074 6f6f the soapcpp2 too\n+0011b800: 6c2c 2077 6520 6361 6e20 696e 766f 6b65 l, we can invoke\n+0011b810: 2074 6865 2073 7475 6220 6174 2074 6865 the stub at the\n+0011b820: 2063 6c69 656e 7420 7369 6465 2077 6974 client side wit\n+0011b830: 683a 3c2f 703e 0a3c 6469 7620 636c 6173 h:

    .
    <\n+0011b860: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0011b870: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+0011b8e0: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+0011b940: 6e65 7731 3c2f 613e 283c 6120 636c 6173 new1(SOAP\n+0011b9a0: 5f45 4e43 5f4d 544f 4d3c 2f61 3e29 3b20 _ENC_MTOM); \n+0011b9b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+0011b9e0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n+0011b9f0: 5f44 6174 6120 6461 7461 3b20 3c2f 6469 _Data data; .
    data.xop__I\n+0011ba20: 6e63 6c75 6465 2e5f 5f70 7472 203d 2028 nclude.__ptr = (\n+0011ba30: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n+0011ba50: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char*\n+0011ba80: 293c 7370 616e 2063 6c61 7373 3d22 7374 )&qu\n+0011baa0: 6f74 3b26 6c74 3b62 2667 743b 4865 6c6c ot;<b>Hell\n+0011bab0: 6f20 776f 726c 6421 266c 743b 2f62 2667 o world!</b&g\n+0011bac0: 743b 2671 756f 743b 3c2f 7370 616e 3e3b t;";\n+0011bad0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    data.x\n+0011baf0: 6f70 5f5f 496e 636c 7564 652e 5f5f 7369 op__Include.__si\n+0011bb00: 7a65 203d 2032 303b 203c 2f64 6976 3e0a ze = 20;
    .\n+0011bb10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    data.xop__Incl\n+0011bb30: 7564 652e 6964 203d 204e 554c 4c3b 2020 ude.id = NULL; \n+0011bb40: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n+0011bb60: 2f2f 2043 4944 2061 7574 6f6d 6174 6963 // CID automatic\n+0011bb70: 616c 6c79 2067 656e 6572 6174 6564 2062 ally generated b\n+0011bb80: 7920 656e 6769 6e65 203c 2f73 7061 6e3e y engine \n+0011bb90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    data.xo\n+0011bbb0: 705f 5f49 6e63 6c75 6465 2e74 7970 6520 p__Include.type \n+0011bbc0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0011bbe0: 756f 743b 7465 7874 2f68 746d 6c26 7175 uot;text/html&qu\n+0011bbf0: 6f74 3b3c 2f73 7061 6e3e 3b20 2020 3c73 ot;; // MIME type\n+0011bc20: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0011bc30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011bc40: 3e64 6174 612e 786f 705f 5f49 6e63 6c75 >data.xop__Inclu\n+0011bc50: 6465 2e6f 7074 696f 6e73 203d 204e 554c de.options = NUL\n+0011bc60: 4c3b 2020 2020 2020 203c 7370 616e 2063 L; /\n+0011bc80: 2f20 6e6f 2064 6573 6372 6970 7469 7665 / no descriptive\n+0011bc90: 2069 6e66 6f20 6164 6465 6420 3c2f 7370 info added
    .
    data\n+0011bcc0: 2e78 6d69 6d65 355f 5f63 6f6e 7465 6e74 .xmime5__content\n+0011bcd0: 5479 7065 203d 203c 7370 616e 2063 6c61 Type = "text/ht\n+0011bd00: 6d6c 2671 756f 743b 3c2f 7370 616e 3e3b ml";\n+0011bd10: 203c 7370 616e 2063 6c61 7373 3d22 636f // MIME t\n+0011bd30: 7970 6520 3c2f 7370 616e 3e3c 2f64 6976 ype .
    if\n+0011bd70: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n+0011bd80: 6c6c 5f6e 735f 5f65 6368 6f44 6174 6128 ll_ns__echoData(\n+0011bd90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0011bdc0: 2065 6e64 706f 696e 742c 2061 6374 696f endpoint, actio\n+0011bdd0: 6e2c 2026 616d 703b 6461 7461 2c20 2661 n, &data, &a\n+0011bde0: 6d70 3b64 6174 6129 293c 2f64 6976 3e0a mp;data))
    .\n+0011bdf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_prin\n+0011be60: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std\n+0011bea0: 6572 7229 3b3c 2f64 6976 3e0a 3c64 6976 err);
    .else
    .
    p\n+0011bf00: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("Got data\n+0011bf30: 5c6e 2671 756f 743b 3c2f 7370 616e 3e29 \\n")\n+0011bf40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+0011bfb0: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy\n+0011bfc0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0011bff0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n+0011c060: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap);.

    Note\n+0011c170: 2074 6861 7420 7468 6520 3c63 6f64 653e that the \n+0011c180: 786f 705f 5f49 6e63 6c75 6465 2e74 7970 xop__Include.typ\n+0011c190: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member \n+0011c1a0: 6d75 7374 2062 6520 7365 7420 746f 2074 must be set to t\n+0011c1b0: 7261 6e73 6d69 7420 4d54 4f4d 2061 7474 ransmit MTOM att\n+0011c1c0: 6163 686d 656e 7473 2c20 6f74 6865 7277 achments, otherw\n+0011c1d0: 6973 6520 696e 6c69 6e65 2062 6173 6536 ise inline base6\n+0011c1e0: 3420 584d 4c20 7769 6c6c 2062 6520 7365 4 XML will be se\n+0011c1f0: 6e74 2e3c 2f70 3e0a 3c70 3e41 7420 7468 nt.

    .

    At th\n+0011c200: 6520 7365 7276 6572 2073 6964 652c 2077 e server side, w\n+0011c210: 6520 7368 6f77 2061 6e20 6578 616d 706c e show an exampl\n+0011c220: 6520 6f66 2061 6e20 6f70 6572 6174 696f e of an operatio\n+0011c230: 6e20 6861 6e64 6c65 7220 7468 6174 206a n handler that j\n+0011c240: 7573 7420 636f 7069 6573 2074 6865 2069 ust copies the i\n+0011c250: 6e70 7574 2064 6174 6120 746f 206f 7574 nput data to out\n+0011c260: 7075 743a 3c2f 703e 0a3c 6469 7620 636c put:

    .
    <\n+0011c280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011c290: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__echoDa\n+0011c2c0: 7461 283c 7370 616e 2063 6c61 7373 3d22 ta(struct<\n+0011c2e0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+0011c310: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+0011c340: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, s\n+0011c360: 7472 7563 743c 2f73 7061 6e3e 206e 735f truct ns_\n+0011c370: 5f44 6174 6120 2a69 6e2c 203c 7370 616e _Data *in, struct n\n+0011c3a0: 735f 5f64 6174 6120 2a6f 7574 2920 3c2f s__data *out) .
    {
    .<\n 0011c3d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0011c3e0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    *ou\n-0011c400: 7420 3d20 2a69 6e3b 203c 2f64 6976 3e0a t = *in;
    .\n-0011c410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-0011c440: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-0011c4a0: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .

    The serv\n-0011c4f0: 6572 206d 7573 7420 7573 6520 7468 6520 er must use the \n-0011c500: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n-0011c510: 4d54 4f4d 3c2f 636f 6465 3e20 666c 6167 MTOM flag\n-0011c520: 2074 6f20 696e 6974 6961 6c69 7a65 2074 to initialize t\n-0011c530: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context to \n-0011c5a0: 7265 6365 6976 6520 616e 6420 7365 6e64 receive and send\n-0011c5b0: 204d 544f 4d20 6174 7461 6368 6d65 6e74 MTOM attachment\n-0011c5c0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

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

    ..Strea\n-0011c630: 6d69 6e67 204d 494d 452f 4d54 4f4d 3c2f ming MIME/MTOM.

    Streaming\n-0011c650: 204d 494d 452f 4d54 4f4d 2069 7320 6163 MIME/MTOM is ac\n-0011c660: 6869 6576 6564 2077 6974 6820 6361 6c6c hieved with call\n-0011c670: 6261 636b 2066 756e 6374 696f 6e73 2074 back functions t\n-0011c680: 6f20 6665 7463 6820 616e 6420 7374 6f72 o fetch and stor\n-0011c690: 6520 6461 7461 2064 7572 696e 6720 7472 e data during tr\n-0011c6a0: 616e 736d 6973 7369 6f6e 2e20 5468 7265 ansmission. Thre\n-0011c6b0: 6520 6675 6e63 7469 6f6e 2063 616c 6c62 e function callb\n-0011c6c0: 6163 6b73 2066 6f72 2073 7472 6561 6d69 acks for streami\n-0011c6d0: 6e67 204d 494d 452f 4d54 4f4d 206f 7574 ng MIME/MTOM out\n-0011c6e0: 7075 7420 616e 6420 7468 7265 6520 6361 put and three ca\n-0011c6f0: 6c6c 6261 636b 7320 666f 7220 7374 7265 llbacks for stre\n-0011c700: 616d 696e 6720 4d49 4d45 2f4d 544f 4d20 aming MIME/MTOM \n-0011c710: 696e 7075 7420 6172 6520 6176 6169 6c61 input are availa\n-0011c720: 626c 652e 3c2f 703e 0a3c 756c 3e0a 3c6c ble.

    .\n-0011ee30: 0a3c 703e 496e 2061 6464 6974 696f 6e2c .

    In addition,\n-0011ee40: 2061 203c 636f 6465 3e76 6f69 642a 203c a void* <\n-0011ee50: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0011ee60: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0011ee70: 6d6c 2361 3865 6233 3563 3034 3335 3961 ml#a8eb35c04359a\n-0011ee80: 3536 3763 3062 3565 3236 3634 6633 6639 567c0b5e2664f3f9\n-0011ee90: 3464 3562 2220 7469 746c 653d 2255 7365 4d5b\" title=\"Use\n-0011eea0: 722d 6465 6669 6e61 626c 6520 7661 7269 r-definable vari\n-0011eeb0: 6162 6c65 2074 6861 7420 6d61 7920 706f able that may po\n-0011eec0: 696e 7420 746f 2075 7365 722d 7370 6563 int to user-spec\n-0011eed0: 6966 6965 6420 6461 7461 206f 6620 616e ified data of an\n-0011eee0: 7920 7479 7065 2074 6f20 7061 7373 2074 y type to pass t\n-0011eef0: 6865 2064 6174 6120 7468 726f 7567 6820 he data through \n-0011ef00: 746f 2e2e 2e22 3e73 6f61 703a 3a75 7365 to...\">soap::use\n-0011ef10: 723c 2f61 3e3c 2f63 6f64 653e 206d 656d r mem\n-0011ef20: 6265 7220 6973 2061 7661 696c 6162 6c65 ber is available\n-0011ef30: 2074 6f20 7061 7373 2075 7365 722d 6465 to pass user-de\n-0011ef40: 6669 6e65 6420 6461 7461 2074 6f20 7468 fined data to th\n-0011ef50: 6520 6361 6c6c 6261 636b 732e 2054 6869 e callbacks. Thi\n-0011ef60: 7320 7761 792c 2079 6f75 2063 616e 2073 s way, you can s\n-0011ef70: 6574 203c 636f 6465 3e76 6f69 642a 203c et void* <\n-0011ef80: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0011ef90: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0011efa0: 6d6c 2361 3865 6233 3563 3034 3335 3961 ml#a8eb35c04359a\n-0011efb0: 3536 3763 3062 3565 3236 3634 6633 6639 567c0b5e2664f3f9\n-0011efc0: 3464 3562 2220 7469 746c 653d 2255 7365 4d5b\" title=\"Use\n-0011efd0: 722d 6465 6669 6e61 626c 6520 7661 7269 r-definable vari\n-0011efe0: 6162 6c65 2074 6861 7420 6d61 7920 706f able that may po\n-0011eff0: 696e 7420 746f 2075 7365 722d 7370 6563 int to user-spec\n-0011f000: 6966 6965 6420 6461 7461 206f 6620 616e ified data of an\n-0011f010: 7920 7479 7065 2074 6f20 7061 7373 2074 y type to pass t\n-0011f020: 6865 2064 6174 6120 7468 726f 7567 6820 he data through \n-0011f030: 746f 2e2e 2e22 3e73 6f61 703a 3a75 7365 to...\">soap::use\n-0011f040: 723c 2f61 3e3c 2f63 6f64 653e 2074 6f20 r to \n-0011f050: 706f 696e 7420 746f 2061 7070 6c69 6361 point to applica\n-0011f060: 7469 6f6e 2064 6174 6120 7468 6174 2074 tion data that t\n-0011f070: 6865 2063 616c 6c62 6163 6b73 206e 6565 he callbacks nee\n-0011f080: 6420 7375 6368 2061 7320 6120 6669 6c65 d such as a file\n-0011f090: 206e 616d 6520 666f 7220 6578 616d 706c name for exampl\n-0011f0a0: 652e 3c2f 703e 0a3c 703e 5468 6520 666f e.

    .

    The fo\n-0011f0b0: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example \n-0011f0c0: 696c 6c75 7374 7261 7465 7320 7468 6520 illustrates the \n-0011f0d0: 636c 6965 6e74 2d73 6964 6520 696e 6974 client-side init\n-0011f0e0: 6961 6c69 7a61 7469 6f6e 206f 6620 616e ialization of an\n-0011f0f0: 2069 6d61 6765 2061 7474 6163 686d 656e image attachmen\n-0011f100: 7420 7374 7275 6374 2074 6f20 7374 7265 t struct to stre\n-0011f110: 616d 2061 2066 696c 6520 696e 746f 2061 am a file into a\n-0011f120: 204d 544f 4d20 6174 7461 6368 6d65 6e74 MTOM attachment\n-0011f130: 2077 6974 686f 7574 2048 5454 5020 6368 without HTTP ch\n-0011f140: 756e 6b69 6e67 2028 4854 5450 2073 7472 unking (HTTP str\n-0011f150: 6561 6d69 6e67 2063 6875 6e6b 6564 204d eaming chunked M\n-0011f160: 544f 4d20 7472 616e 7366 6572 2069 7320 TOM transfer is \n-0011f170: 7072 6573 656e 7465 6420 696e 2053 6563 presented in Sec\n-0011f180: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Streaming chun\n-0011f1c0: 6b65 6420 4d49 4d45 2f4d 544f 4d3c 2f61 ked MIME/MTOM ):

    .
    <\n-0011f1f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0011f200: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main() *out = *in; <\n+0011c3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    }.

    Th\n+0011c4d0: 6520 7365 7276 6572 206d 7573 7420 7573 e server must us\n+0011c4e0: 6520 7468 6520 3c63 6f64 653e 2353 4f41 e the #SOA\n+0011c4f0: 505f 454e 435f 4d54 4f4d 3c2f 636f 6465 P_ENC_MTOM flag to initia\n+0011c510: 6c69 7a65 2074 6865 203c 636f 6465 3e3c lize the <\n+0011c520: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0011c530: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0011c540: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n+0011c550: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n+0011c560: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n+0011c570: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n+0011c580: 7874 2074 6f20 7265 6365 6976 6520 616e xt to receive an\n+0011c590: 6420 7365 6e64 204d 544f 4d20 6174 7461 d send MTOM atta\n+0011c5a0: 6368 6d65 6e74 732e 3c2f 703e 0a3c 703e chments.

    .

    \n+0011c5b0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+0011c5d0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    \n+0011c610: 0a53 7472 6561 6d69 6e67 204d 494d 452f .Streaming MIME/\n+0011c620: 4d54 4f4d 3c2f 6832 3e0a 3c70 3e53 7472 MTOM

    .

    Str\n+0011c630: 6561 6d69 6e67 204d 494d 452f 4d54 4f4d eaming MIME/MTOM\n+0011c640: 2069 7320 6163 6869 6576 6564 2077 6974 is achieved wit\n+0011c650: 6820 6361 6c6c 6261 636b 2066 756e 6374 h callback funct\n+0011c660: 696f 6e73 2074 6f20 6665 7463 6820 616e ions to fetch an\n+0011c670: 6420 7374 6f72 6520 6461 7461 2064 7572 d store data dur\n+0011c680: 696e 6720 7472 616e 736d 6973 7369 6f6e ing transmission\n+0011c690: 2e20 5468 7265 6520 6675 6e63 7469 6f6e . Three function\n+0011c6a0: 2063 616c 6c62 6163 6b73 2066 6f72 2073 callbacks for s\n+0011c6b0: 7472 6561 6d69 6e67 204d 494d 452f 4d54 treaming MIME/MT\n+0011c6c0: 4f4d 206f 7574 7075 7420 616e 6420 7468 OM output and th\n+0011c6d0: 7265 6520 6361 6c6c 6261 636b 7320 666f ree callbacks fo\n+0011c6e0: 7220 7374 7265 616d 696e 6720 4d49 4d45 r streaming MIME\n+0011c6f0: 2f4d 544f 4d20 696e 7075 7420 6172 6520 /MTOM input are \n+0011c700: 6176 6169 6c61 626c 652e 3c2f 703e 0a3c available.

    .<\n+0011c710: 756c 3e0a 3c6c 693e 3c63 6f64 653e 766f ul>.
  • vo\n+0011c720: 6964 202a 282a 736f 6170 2e66 6d69 6d65 id *(*soap.fmime\n+0011c730: 7265 6164 6f70 656e 2928 7374 7275 6374 readopen)(struct\n+0011c740: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n+0011c750: 6420 2a68 616e 646c 652c 2063 6f6e 7374 d *handle, const\n+0011c760: 2063 6861 7220 2a69 642c 2063 6f6e 7374 char *id, const\n+0011c770: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con\n+0011c780: 7374 2063 6861 7220 2a64 6573 6372 6970 st char *descrip\n+0011c790: 7469 6f6e 293c 2f63 6f64 653e 2054 6869 tion) Thi\n+0011c7a0: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+0011c7b0: 6c6c 6564 2062 7920 7468 6520 656e 6769 lled by the engi\n+0011c7c0: 6e65 2074 6f20 7374 6172 7420 7365 6e64 ne to start send\n+0011c7d0: 696e 6720 6120 7374 7265 616d 696e 6720 ing a streaming \n+0011c7e0: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n+0011c7f0: 6d65 6e74 2e20 5468 6973 2063 616c 6c62 ment. This callb\n+0011c800: 6163 6b20 6f70 656e 7320 6120 7374 7265 ack opens a stre\n+0011c810: 616d 2074 6f20 7374 6172 7420 7265 6164 am to start read\n+0011c820: 696e 6720 7468 6520 6174 7461 6368 6d65 ing the attachme\n+0011c830: 6e74 2064 6174 6120 746f 2073 656e 642e nt data to send.\n+0011c840: 2054 6865 2061 6374 7561 6c20 6461 7461 The actual data\n+0011c850: 2073 7472 6561 6d20 7769 6c6c 2062 6520 stream will be \n+0011c860: 7265 6164 2069 6e20 6368 756e 6b73 2075 read in chunks u\n+0011c870: 7369 6e67 2074 6865 203c 636f 6465 3e3c sing the <\n+0011c880: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0011c890: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0011c8a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0011c8b0: 6761 6666 3430 6131 6361 3666 6266 3037 gaff40a1ca6fbf07\n+0011c8c0: 3562 3534 6363 6266 3437 3930 3039 6365 5b54ccbf479009ce\n+0011c8d0: 3734 2220 7469 746c 653d 2243 616c 6c62 74\" title=\"Callb\n+0011c8e0: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data\n+0011c8f0: 2069 6e20 6120 4d49 4d45 2f4d 544f 4d20 in a MIME/MTOM \n+0011c900: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n+0011c910: 6d2e 223e 736f 6170 3a3a 666d 696d 6572 m.\">soap::fmimer\n+0011c920: 6561 643c 2f61 3e3c 2f63 6f64 653e 2063 ead c\n+0011c930: 616c 6c62 6163 6b20 756e 7469 6c20 6e6f allback until no\n+0011c940: 206d 6f72 6520 6461 7461 2069 7320 6176 more data is av\n+0011c950: 6169 6c61 626c 6520 616e 6420 7468 6520 ailable and the \n+0011c960: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmimerea\n+0011ca10: 6463 6c6f 7365 3c2f 613e 3c2f 636f 6465 dclose callback is ca\n+0011ca30: 6c6c 6564 2074 6f20 636c 6f73 6520 7468 lled to close th\n+0011ca40: 6520 7374 7265 616d 2e20 5468 6520 3c63 e stream. The handle parameter cont\n+0011ca70: 6169 6e73 2074 6865 2076 616c 7565 206f ains the value o\n+0011ca80: 6620 7468 6520 3c63 6f64 653e 5f5f 7074 f the __pt\n+0011ca90: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member \n+0011caa0: 7661 7269 6162 6c65 206f 6620 7468 6520 variable of the \n+0011cab0: 6174 7461 6368 6d65 6e74 2073 7472 7563 attachment struc\n+0011cac0: 742f 636c 6173 7320 7769 7468 2064 6174 t/class with dat\n+0011cad0: 6120 2865 2e67 2e20 3c63 6f64 653e 3c61 a (e.g. xsd_\n+0011cb50: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary or _xop__In\n+0011cbe0: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude\n+0011cbf0: 2077 6974 6820 3c63 6f64 653e 5f5f 7074 with __pt\n+0011cc00: 723c 2f63 6f64 653e 2c20 3c63 6f64 653e r, \n+0011cc10: 5f5f 7369 7a65 3c2f 636f 6465 3e2c 203c __size, <\n+0011cc20: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, \n+0011cc30: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti\n+0011cc50: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe\n+0011cc60: 7273 292c 2077 6869 6368 2073 686f 756c rs), which shoul\n+0011cc70: 6420 6265 2061 2070 6f69 6e74 6572 2074 d be a pointer t\n+0011cc80: 6f20 7370 6563 6966 6963 2069 6e66 6f72 o specific infor\n+0011cc90: 6d61 7469 6f6e 2073 7563 6820 6173 2061 mation such as a\n+0011cca0: 2066 696c 6520 6465 7363 7269 7074 6f72 file descriptor\n+0011ccb0: 206f 7220 6120 706f 696e 7465 7220 746f or a pointer to\n+0011ccc0: 2061 2073 6f6d 6520 6170 706c 6963 6174 a some applicat\n+0011ccd0: 696f 6e2d 7370 6563 6966 6963 2064 6174 ion-specific dat\n+0011cce0: 6120 746f 2062 6520 7061 7373 6564 2074 a to be passed t\n+0011ccf0: 6f20 7468 6973 2063 616c 6c62 6163 6b2e o this callback.\n+0011cd00: 2042 6f74 6820 7468 6520 3c63 6f64 653e Both the \n+0011cd10: 5f5f 7074 723c 2f63 6f64 653e 2061 6e64 __ptr and\n+0011cd20: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size members of \n+0011cd40: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s\n+0011cd50: 7472 7563 742f 636c 6173 7320 7368 6f75 truct/class shou\n+0011cd60: 6c64 2068 6176 6520 6265 656e 2073 6574 ld have been set\n+0011cd70: 2062 7920 7468 6520 6170 706c 6963 6174 by the applicat\n+0011cd80: 696f 6e20 7072 696f 7220 746f 2074 6865 ion prior to the\n+0011cd90: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n+0011cda0: 6620 7468 6520 6d65 7373 6167 6520 7769 f the message wi\n+0011cdb0: 7468 2061 7474 6163 686d 656e 7473 2e20 th attachments. \n+0011cdc0: 4966 2074 6865 203c 636f 6465 3e5f 5f73 If the __s\n+0011cdd0: 697a 653c 2f63 6f64 653e 2069 7320 7a65 ize is ze\n+0011cde0: 726f 2061 6e64 2048 5454 5020 6368 756e ro and HTTP chun\n+0011cdf0: 6b69 6e67 2069 7320 656e 6162 6c65 6420 king is enabled \n+0011ce00: 2877 6974 6820 3c63 6f64 653e 2353 4f41 (with #SOA\n+0011ce10: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK), then chunked\n+0011ce30: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n+0011ce40: 686d 656e 7473 2061 7265 2073 656e 742c hments are sent,\n+0011ce50: 2073 6565 203c 636f 6465 3e3c 6120 636c see \n+0011cef0: 736f 6170 3a3a 666d 696d 6572 6561 643c soap::fmimeread<\n+0011cf00: 2f61 3e3c 2f63 6f64 653e 2e20 5468 6520 /a>. The \n+0011cf10: 3c63 6f64 653e 6964 3c2f 636f 6465 3e2c id,\n+0011cf20: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type and opt\n+0011cf40: 696f 6e73 3c2f 636f 6465 3e20 7061 7261 ions para\n+0011cf50: 6d65 7465 7273 2061 7265 2074 6865 203c meters are the <\n+0011cf60: 636f 6465 3e69 643c 2f63 6f64 653e 2028 code>id (\n+0011cf70: 616e 206f 7074 696f 6e61 6c20 4944 292c an optional ID),\n+0011cf80: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type (a MIME type)\n+0011cfa0: 2061 6e64 203c 636f 6465 3e6f 7074 696f and optio\n+0011cfb0: 6e73 3c2f 636f 6465 3e20 2861 2064 6573 ns (a des\n+0011cfc0: 6372 6970 7469 7665 2073 7472 696e 6729 criptive string)\n+0011cfd0: 206f 6620 7468 6520 6174 7461 6368 6d65 of the attachme\n+0011cfe0: 6e74 2073 7472 7563 742f 636c 6173 732c nt struct/class,\n+0011cff0: 2072 6573 7065 6374 6976 656c 792c 206f respectively, o\n+0011d000: 6620 7768 6963 6820 6174 206c 6561 7374 f which at least\n+0011d010: 206f 6e65 206d 656d 6265 7220 7368 6f75 one member shou\n+0011d020: 6c64 2062 6520 6e6f 6e2d 4e55 4c4c 2e20 ld be non-NULL. \n+0011d030: 5468 6520 6361 6c6c 6261 636b 2073 686f The callback sho\n+0011d040: 756c 6420 7265 7475 726e 2074 6865 203c uld return the <\n+0011d050: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter val\n+0011d070: 7565 206f 7220 616e 6f74 6865 7220 706f ue or another po\n+0011d080: 696e 7465 7220 7661 6c75 652c 2077 6869 inter value, whi\n+0011d090: 6368 2069 7320 7061 7373 6564 2061 7320 ch is passed as \n+0011d0a0: 7468 6520 6e65 7720 3c63 6f64 653e 6861 the new ha\n+0011d0b0: 6e64 6c65 3c2f 636f 6465 3e20 7061 7261 ndle para\n+0011d0c0: 6d65 7465 7220 746f 203c 636f 6465 3e3c meter to <\n+0011d0d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0011d0e0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0011d0f0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0011d100: 6761 6666 3430 6131 6361 3666 6266 3037 gaff40a1ca6fbf07\n+0011d110: 3562 3534 6363 6266 3437 3930 3039 6365 5b54ccbf479009ce\n+0011d120: 3734 2220 7469 746c 653d 2243 616c 6c62 74\" title=\"Callb\n+0011d130: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data\n+0011d140: 2069 6e20 6120 4d49 4d45 2f4d 544f 4d20 in a MIME/MTOM \n+0011d150: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n+0011d160: 6d2e 223e 736f 6170 3a3a 666d 696d 6572 m.\">soap::fmimer\n+0011d170: 6561 643c 2f61 3e3c 2f63 6f64 653e 2061 ead a\n+0011d180: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::fmime\n+0011d230: 7265 6164 636c 6f73 653c 2f61 3e3c 2f63 readclose callbacks. \n+0011d250: 5768 656e 2061 6e20 6572 726f 7220 6f63 When an error oc\n+0011d260: 6375 7272 6564 2069 6e20 7468 6973 2063 curred in this c\n+0011d270: 616c 6c62 6163 6b2c 2074 6865 2063 616c allback, the cal\n+0011d280: 6c62 6163 6b20 7368 6f75 6c64 2072 6574 lback should ret\n+0011d290: 7572 6e20 4e55 4c4c 2061 6e64 2073 6574 urn NULL and set\n+0011d2a0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n+0011d350: 703a 3a65 7272 6f72 3c2f 613e 3c2f 636f p::error to an error \n+0011d370: 636f 6465 2c20 652e 672e 2075 7369 6e67 code, e.g. using\n+0011d380: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_rece\n+0011d430: 6976 6572 5f66 6175 6c74 3c2f 613e 3c2f iver_fault. The callb\n+0011d450: 6163 6b20 6d61 7920 7265 7475 726e 204e ack may return N\n+0011d460: 554c 4c20 616e 6420 7365 7420 3c63 6f64 ULL and set soap::er\n+0011d520: 726f 723c 2f61 3e3c 2f63 6f64 653e 2074 ror t\n+0011d530: 6f20 3c63 6f64 653e 2353 4f41 505f 4f4b o #SOAP_OK\n+0011d540: 3c2f 636f 6465 3e20 7768 656e 2074 6869 when thi\n+0011d550: 7320 7370 6563 6966 6963 204d 494d 452f s specific MIME/\n+0011d560: 4d54 4f4d 2061 7474 6163 686d 656e 7420 MTOM attachment \n+0011d570: 7368 6f75 6c64 206e 6f74 2074 6f20 6265 should not to be\n+0011d580: 2073 7472 6561 6d65 6420 616e 6420 7468 streamed and th\n+0011d590: 6520 656e 6769 6e65 2077 696c 6c20 7369 e engine will si\n+0011d5a0: 6d70 6c79 2073 6b69 7020 6974 2e3c 2f6c mply skip it..
  • siz\n+0011d5c0: 655f 7420 282a 736f 6170 2e66 6d69 6d65 e_t (*soap.fmime\n+0011d5d0: 7265 6164 2928 7374 7275 6374 2073 6f61 read)(struct soa\n+0011d5e0: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h\n+0011d5f0: 616e 646c 652c 2063 6861 7220 2a62 7566 andle, char *buf\n+0011d600: 2c20 7369 7a65 5f74 206c 656e 293c 2f63 , size_t len) This callba\n+0011d620: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n+0011d630: 7468 6520 656e 6769 6e65 2074 6f20 7265 the engine to re\n+0011d640: 6164 2061 2063 6875 6e6b 206f 6620 6174 ad a chunk of at\n+0011d650: 7461 6368 6d65 6e74 2064 6174 6120 746f tachment data to\n+0011d660: 2074 7261 6e73 6d69 742e 2054 6865 203c transmit. The <\n+0011d670: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter con\n+0011d690: 7461 696e 7320 7468 6520 6861 6e64 6c65 tains the handle\n+0011d6a0: 2072 6574 7572 6e65 6420 6279 2074 6865 returned by the\n+0011d6b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fmimere\n+0011d760: 6164 6f70 656e 3c2f 613e 3c2f 636f 6465 adopen callback. The \n+0011d780: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf\n+0011d790: 2070 6172 616d 6574 6572 2069 7320 7468 parameter is th\n+0011d7a0: 6520 6275 6666 6572 206f 6620 6c65 6e67 e buffer of leng\n+0011d7b0: 7468 203c 636f 6465 3e6c 656e 3c2f 636f th len into which a\n+0011d7d0: 2063 6875 6e6b 206f 6620 6461 7461 2073 chunk of data s\n+0011d7e0: 686f 756c 6420 6265 2077 7269 7474 656e hould be written\n+0011d7f0: 2062 7920 7468 6520 6361 6c6c 6261 636b by the callback\n+0011d800: 2e20 5468 6520 6163 7475 616c 2061 6d6f . The actual amo\n+0011d810: 756e 7420 6f66 2064 6174 6120 7772 6974 unt of data writ\n+0011d820: 7465 6e20 696e 746f 2074 6865 2062 7566 ten into the buf\n+0011d830: 6665 7220 6d61 7920 6265 206c 6573 7320 fer may be less \n+0011d840: 7468 616e 203c 636f 6465 3e6c 656e 3c2f than len and this a\n+0011d860: 6374 7561 6c20 616d 6f75 6e74 2073 686f ctual amount sho\n+0011d870: 756c 6420 6265 2072 6574 7572 6e65 6420 uld be returned \n+0011d880: 6279 2074 6865 2063 616c 6c62 6163 6b2e by the callback.\n+0011d890: 2041 2072 6574 7572 6e20 7661 6c75 6520 A return value \n+0011d8a0: 6f66 207a 6572 6f20 696e 6469 6361 7465 of zero indicate\n+0011d8b0: 7320 616e 2065 7272 6f72 2061 6e64 203c s an error and <\n+0011d8c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n+0011d970: 3a65 7272 6f72 3c2f 613e 3c2f 636f 6465 :error should be set.\n+0011d990: 2054 6865 203c 636f 6465 3e5f 5f73 697a The __siz\n+0011d9a0: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member \n+0011d9b0: 7661 7269 6162 6c65 206f 6620 7468 6520 variable of the \n+0011d9c0: 6174 7461 6368 6d65 6e74 2073 7472 7563 attachment struc\n+0011d9d0: 742f 636c 6173 7320 7769 7468 2064 6174 t/class with dat\n+0011d9e0: 6120 2865 2e67 2e20 3c63 6f64 653e 3c61 a (e.g. xsd_\n+0011da60: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary or _xop__In\n+0011daf0: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude\n+0011db00: 2077 6974 6820 3c63 6f64 653e 5f5f 7074 with __pt\n+0011db10: 723c 2f63 6f64 653e 2c20 3c63 6f64 653e r, \n+0011db20: 5f5f 7369 7a65 3c2f 636f 6465 3e2c 203c __size, <\n+0011db30: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, \n+0011db40: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti\n+0011db60: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe\n+0011db70: 7273 2920 7368 6f75 6c64 2062 6520 7365 rs) should be se\n+0011db80: 7420 6279 2074 6865 2061 7070 6c69 6361 t by the applica\n+0011db90: 7469 6f6e 2070 7269 6f72 2074 6f20 7468 tion prior to th\n+0011dba0: 6520 7365 7269 616c 697a 6174 696f 6e20 e serialization \n+0011dbb0: 6f66 2074 6865 206d 6573 7361 6765 2077 of the message w\n+0011dbc0: 6974 6820 6174 7461 6368 6d65 6e74 732e ith attachments.\n+0011dbd0: 2054 6865 2076 616c 7565 206f 6620 3c63 The value of __size indicates the \n+0011dc00: 746f 7461 6c20 7369 7a65 206f 6620 7468 total size of th\n+0011dc10: 6520 6174 7461 6368 6d65 6e74 2064 6174 e attachment dat\n+0011dc20: 6120 746f 2062 6520 7472 616e 736d 6974 a to be transmit\n+0011dc30: 7465 642e 2049 6620 7468 6520 3c63 6f64 ted. If the __size \n+0011dc50: 6d65 6d62 6572 2076 6172 6961 626c 6520 member variable \n+0011dc60: 6973 207a 6572 6f20 616e 6420 4854 5450 is zero and HTTP\n+0011dc70: 2063 6875 6e6b 696e 6720 6973 2065 6e61 chunking is ena\n+0011dc80: 626c 6564 2028 7769 7468 203c 636f 6465 bled (with #SOAP_IO_CHUNK<\n+0011dca0: 2f63 6f64 653e 292c 2074 6865 6e20 4d49 /code>), then MI\n+0011dcb0: 4d45 2f4d 544f 4d20 6368 756e 6b65 6420 ME/MTOM chunked \n+0011dcc0: 7472 616e 7366 6572 7320 6172 6520 6163 transfers are ac\n+0011dcd0: 7469 7661 7465 6420 6279 2074 6865 2065 tivated by the e\n+0011dce0: 6e67 696e 652c 2077 6869 6368 2069 7320 ngine, which is \n+0011dcf0: 6d6f 7265 2066 6c65 7869 626c 6520 7369 more flexible si\n+0011dd00: 6e63 6520 7468 6520 6174 7461 6368 6d65 nce the attachme\n+0011dd10: 6e74 2064 6174 6120 7369 7a65 2064 6f65 nt data size doe\n+0011dd20: 7320 6e6f 7420 6e65 6564 2074 6f20 6265 s not need to be\n+0011dd30: 2064 6574 6572 6d69 6e65 6420 696e 2061 determined in a\n+0011dd40: 6476 616e 6365 2e20 546f 2075 7365 204d dvance. To use M\n+0011dd50: 494d 452f 4d54 4f4d 2063 6875 6e6b 6564 IME/MTOM chunked\n+0011dd60: 2074 7261 6e73 6665 7273 2c20 656e 6162 transfers, enab\n+0011dd70: 6c65 2048 5454 5020 6368 756e 6b69 6e67 le HTTP chunking\n+0011dd80: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA\n+0011dd90: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK (also #S\n+0011ddb0: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE can be used,\n+0011ddd0: 2062 7574 2074 6869 7320 6275 6666 6572 but this buffer\n+0011dde0: 7320 7468 6520 656e 7469 7265 206d 6573 s the entire mes\n+0011ddf0: 7361 6765 2069 6e20 6d65 6d6f 7279 2062 sage in memory b\n+0011de00: 6566 6f72 6520 7472 616e 736d 6973 7369 efore transmissi\n+0011de10: 6f6e 2920 616e 6420 7365 7420 7468 6520 on) and set the \n+0011de20: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size member varia\n+0011de40: 626c 6520 6f66 2074 6865 2061 7474 6163 ble of the attac\n+0011de50: 686d 656e 7420 7374 7275 6374 2f63 6c61 hment struct/cla\n+0011de60: 7373 2074 6f20 7a65 726f 2e20 5768 656e ss to zero. When\n+0011de70: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n+0011de80: 686d 656e 7420 6368 756e 6b69 6e67 2069 hment chunking i\n+0011de90: 7320 656e 6162 6c65 642c 2074 6869 7320 s enabled, this \n+0011dea0: 6361 6c6c 6261 636b 2073 686f 756c 6420 callback should \n+0011deb0: 636f 6d70 6c65 7465 6c79 2066 696c 6c20 completely fill \n+0011dec0: 7468 6520 3c63 6f64 653e 6275 663c 2f63 the buf buffer with\n+0011dee0: 203c 636f 6465 3e6c 656e 3c2f 636f 6465 len bytes unless t\n+0011df00: 6865 206c 6173 7420 6461 7461 2063 6875 he last data chu\n+0011df10: 6e6b 2069 7320 7265 6163 6865 6420 616e nk is reached an\n+0011df20: 6420 6665 7765 7220 6279 7465 7320 6172 d fewer bytes ar\n+0011df30: 6520 7265 7475 726e 6564 2e3c 2f6c 693e e returned.
  • \n+0011df40: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
  • void \n+0011df50: 282a 736f 6170 2e66 6d69 6d65 7265 6164 (*soap.fmimeread\n+0011df60: 636c 6f73 6529 2873 7472 7563 7420 736f close)(struct so\n+0011df70: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void *\n+0011df80: 6861 6e64 6c65 293c 2f63 6f64 653e 2054 handle) T\n+0011df90: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n+0011dfa0: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en\n+0011dfb0: 6769 6e65 2074 6f20 636c 6f73 6520 7468 gine to close th\n+0011dfc0: 6520 4d49 4d45 2f4d 544f 4d20 6174 7461 e MIME/MTOM atta\n+0011dfd0: 6368 6d65 6e74 2073 7472 6561 6d20 6166 chment stream af\n+0011dfe0: 7465 7220 7265 6164 696e 672e 2054 6865 ter reading. The\n+0011dff0: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter c\n+0011e010: 6f6e 7461 696e 7320 7468 6520 6861 6e64 ontains the hand\n+0011e020: 6c65 2072 6574 7572 6e65 6420 6279 2074 le returned by t\n+0011e030: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::fmime\n+0011e0e0: 7265 6164 6f70 656e 3c2f 613e 3c2f 636f readopen callback..
  • voi\n+0011e110: 6420 2a28 2a73 6f61 702e 666d 696d 6577 d *(*soap.fmimew\n+0011e120: 7269 7465 6f70 656e 2928 7374 7275 6374 riteopen)(struct\n+0011e130: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n+0011e140: 6420 2a68 616e 646c 652c 2063 6f6e 7374 d *handle, const\n+0011e150: 2063 6861 7220 2a69 642c 2063 6f6e 7374 char *id, const\n+0011e160: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con\n+0011e170: 7374 2063 6861 7220 2a64 6573 6372 6970 st char *descrip\n+0011e180: 7469 6f6e 2c20 656e 756d 2073 6f61 705f tion, enum soap_\n+0011e190: 6d69 6d65 5f65 6e63 6f64 696e 6720 656e mime_encoding en\n+0011e1a0: 636f 6469 6e67 293c 2f63 6f64 653e 2043 coding) C\n+0011e1b0: 616c 6c65 6420 6279 2074 6865 2074 6f20 alled by the to \n+0011e1c0: 7374 6172 7420 7265 6365 6976 696e 6720 start receiving \n+0011e1d0: 6120 7374 7265 616d 696e 6720 4d49 4d45 a streaming MIME\n+0011e1e0: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment\n+0011e1f0: 2e20 5468 6973 2063 616c 6c62 6163 6b20 . This callback \n+0011e200: 6f70 656e 7320 6120 7374 7265 616d 2074 opens a stream t\n+0011e210: 6f20 7374 6172 7420 7772 6974 696e 6720 o start writing \n+0011e220: 7468 6520 6174 7461 6368 6d65 6e74 2064 the attachment d\n+0011e230: 6174 6120 7265 6365 6976 6564 2e20 5468 ata received. Th\n+0011e240: 6520 6163 7475 616c 2064 6174 6120 7374 e actual data st\n+0011e250: 7265 616d 2077 696c 6c20 6265 2077 7269 ream will be wri\n+0011e260: 7474 656e 2069 6e20 6368 756e 6b73 2075 tten in chunks u\n+0011e270: 7369 6e67 2074 6865 203c 636f 6465 3e3c sing the <\n+0011e280: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0011e290: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0011e2a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0011e2b0: 6761 3930 3834 6630 3339 3265 3461 3534 ga9084f0392e4a54\n+0011e2c0: 3238 3733 3636 3132 3164 3330 6263 3438 287366121d30bc48\n+0011e2d0: 3330 2220 7469 746c 653d 2243 616c 6c62 30\" title=\"Callb\n+0011e2e0: 6163 6b20 746f 2077 7269 7465 2064 6174 ack to write dat\n+0011e2f0: 6120 696e 2061 204d 494d 4520 6174 7461 a in a MIME atta\n+0011e300: 6368 6d65 6e74 2073 7472 6561 6d2e 223e chment stream.\">\n+0011e310: 736f 6170 3a3a 666d 696d 6577 7269 7465 soap::fmimewrite\n+0011e320: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+0011e330: 6261 636b 2075 6e74 696c 206e 6f20 6d6f back until no mo\n+0011e340: 7265 2064 6174 6120 6973 2061 7661 696c re data is avail\n+0011e350: 6162 6c65 2061 6e64 2074 6865 203c 636f able and the s\n+0011e400: 6f61 703a 3a66 6d69 6d65 7772 6974 6563 oap::fmimewritec\n+0011e410: 6c6f 7365 3c2f 613e 3c2f 636f 6465 3e20 lose \n+0011e420: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+0011e430: 6564 2074 6f20 636c 6f73 6520 7468 6520 ed to close the \n+0011e440: 7374 7265 616d 2e20 5468 6520 3c63 6f64 stream. The id, type a\n+0011e470: 6e64 203c 636f 6465 3e6f 7074 696f 6e73 nd options\n+0011e480: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n+0011e490: 7273 2061 7265 2074 6865 203c 636f 6465 rs are the id, type an\n+0011e4c0: 6420 3c63 6f64 653e 6f70 7469 6f6e 733c d options<\n+0011e4d0: 2f63 6f64 653e 206f 6620 7468 6520 6174 /code> of the at\n+0011e4e0: 7461 6368 6d65 6e74 2073 7472 7563 742f tachment struct/\n+0011e4f0: 636c 6173 7320 2865 2e67 2e20 3c63 6f64 class (e.g. \n+0011e570: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n+0011e580: 793c 2f61 3e3c 2f63 6f64 653e 206f 7220 y or \n+0011e590: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 _xop\n+0011e600: 5f5f 496e 636c 7564 653c 2f61 3e3c 2f63 __Include with \n+0011e620: 5f5f 7074 723c 2f63 6f64 653e 2c20 3c63 __ptr, __size, id, type and \n+0011e670: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m\n+0011e680: 656d 6265 7273 292c 2072 6573 7065 6374 embers), respect\n+0011e690: 6976 656c 792e 2054 6865 2063 616c 6c62 ively. The callb\n+0011e6a0: 6163 6b20 7368 6f75 6c64 2072 6574 7572 ack should retur\n+0011e6b0: 6e20 6120 6861 6e64 6c65 2c20 7768 6963 n a handle, whic\n+0011e6c0: 6820 6973 2070 6173 7365 6420 746f 2074 h is passed to t\n+0011e6d0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::\n+0011e770: 666d 696d 6577 7269 7465 3c2f 613e 3c2f fmimewrite and \n+0011e790: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+0011e830: 3a3a 666d 696d 6577 7269 7465 636c 6f73 ::fmimewriteclos\n+0011e840: 653c 2f61 3e3c 2f63 6f64 653e 2063 616c e cal\n+0011e850: 6c62 6163 6b73 2e20 5468 6520 3c63 6f64 lbacks. The __ptr m\n+0011e870: 656d 6265 7220 7661 7269 6162 6c65 206f ember variable o\n+0011e880: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment\n+0011e890: 2073 7472 7563 742f 636c 6173 7320 6973 struct/class is\n+0011e8a0: 2073 6574 2062 7920 7468 6520 656e 6769 set by the engi\n+0011e8b0: 6e65 2074 6f20 7468 6520 7661 6c75 6520 ne to the value \n+0011e8c0: 6f66 2074 6869 7320 6861 6e64 6c65 2e20 of this handle. \n+0011e8d0: 5468 6520 3c63 6f64 653e 5f5f 7369 7a65 The __size\n+0011e8e0: 3c2f 636f 6465 3e20 6d65 6d62 6572 2076 member v\n+0011e8f0: 6172 6961 626c 6520 6973 2073 6574 2074 ariable is set t\n+0011e900: 6f20 7468 6520 7369 7a65 206f 6620 7468 o the size of th\n+0011e910: 6520 6174 7461 6368 6d65 6e74 2072 6563 e attachment rec\n+0011e920: 6569 7665 642e 3c2f 6c69 3e0a 3c6c 693e eived.
  • .
  • \n+0011e930: 3c63 6f64 653e 696e 7420 282a 736f 6170 int (*soap\n+0011e940: 2e66 6d69 6d65 7772 6974 6529 2873 7472 .fmimewrite)(str\n+0011e950: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+0011e960: 766f 6964 202a 6861 6e64 6c65 2c20 636f void *handle, co\n+0011e970: 6e73 7420 6368 6172 202a 6275 662c 2073 nst char *buf, s\n+0011e980: 697a 655f 7420 6c65 6e29 3c2f 636f 6465 ize_t len) This callback \n+0011e9a0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n+0011e9b0: 2065 6e67 696e 6520 746f 2077 7269 7465 engine to write\n+0011e9c0: 2061 2063 6875 6e6b 206f 6620 6174 7461 a chunk of atta\n+0011e9d0: 6368 6d65 6e74 2064 6174 6120 7265 6365 chment data rece\n+0011e9e0: 6976 6564 2e20 5468 6520 3c63 6f64 653e ived. The \n+0011e9f0: 6861 6e64 6c65 3c2f 636f 6465 3e20 7061 handle pa\n+0011ea00: 7261 6d65 7465 7220 636f 6e74 6169 6e73 rameter contains\n+0011ea10: 2074 6865 2068 616e 646c 6520 7265 7475 the handle retu\n+0011ea20: 726e 6564 2062 7920 7468 6520 3c63 6f64 rned by the so\n+0011ead0: 6170 3a3a 666d 696d 6577 7269 7465 6f70 ap::fmimewriteop\n+0011eae0: 656e 3c2f 613e 3c2f 636f 6465 3e20 6361 en ca\n+0011eaf0: 6c6c 6261 636b 2e20 5468 6520 3c63 6f64 llback. The buf par\n+0011eb10: 616d 6574 6572 2063 6f6e 7461 696e 7320 ameter contains \n+0011eb20: 7468 6520 6461 7461 206f 6620 6c65 6e67 the data of leng\n+0011eb30: 7468 203c 636f 6465 3e6c 656e 3c2f 636f th len. Returns #SOAP_OK or a s\n+0011ec20: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n+0011ec40: 7220 636f 6465 2e3c 2f6c 693e 0a3c 6c69 r code.
  • .void (*so\n+0011ec60: 6170 2e66 6d69 6d65 7772 6974 6563 6c6f ap.fmimewriteclo\n+0011ec70: 7365 2928 7374 7275 6374 2073 6f61 7020 se)(struct soap \n+0011ec80: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han\n+0011ec90: 646c 6529 3c2f 636f 6465 3e20 5468 6973 dle) This\n+0011eca0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0011ecb0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin\n+0011ecc0: 6520 746f 2063 6c6f 7365 2074 6865 204d e to close the M\n+0011ecd0: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n+0011ece0: 656e 7420 7374 7265 616d 2061 6674 6572 ent stream after\n+0011ecf0: 2077 7269 7469 6e67 2e20 5468 6520 3c63 writing. The handle parameter cont\n+0011ed20: 6169 6e73 2074 6865 2068 616e 646c 6520 ains the handle \n+0011ed30: 7265 7475 726e 6564 2062 7920 7468 6520 returned by the \n+0011ed40: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmimewri\n+0011edf0: 7465 6f70 656e 3c2f 613e 3c2f 636f 6465 teopen callback.\n+0011ee10: 0a3c 2f75 6c3e 0a3c 703e 496e 2061 6464 ..

    In add\n+0011ee20: 6974 696f 6e2c 2061 203c 636f 6465 3e76 ition, a v\n+0011ee30: 6f69 642a 203c 6120 636c 6173 733d 2265 oid* soa\n+0011eef0: 703a 3a75 7365 723c 2f61 3e3c 2f63 6f64 p::user member is ava\n+0011ef10: 696c 6162 6c65 2074 6f20 7061 7373 2075 ilable to pass u\n+0011ef20: 7365 722d 6465 6669 6e65 6420 6461 7461 ser-defined data\n+0011ef30: 2074 6f20 7468 6520 6361 6c6c 6261 636b to the callback\n+0011ef40: 732e 2054 6869 7320 7761 792c 2079 6f75 s. This way, you\n+0011ef50: 2063 616e 2073 6574 203c 636f 6465 3e76 can set v\n+0011ef60: 6f69 642a 203c 6120 636c 6173 733d 2265 oid* soa\n+0011f020: 703a 3a75 7365 723c 2f61 3e3c 2f63 6f64 p::user to point to a\n+0011f040: 7070 6c69 6361 7469 6f6e 2064 6174 6120 pplication data \n+0011f050: 7468 6174 2074 6865 2063 616c 6c62 6163 that the callbac\n+0011f060: 6b73 206e 6565 6420 7375 6368 2061 7320 ks need such as \n+0011f070: 6120 6669 6c65 206e 616d 6520 666f 7220 a file name for \n+0011f080: 6578 616d 706c 652e 3c2f 703e 0a3c 703e example.

    .

    \n+0011f090: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex\n+0011f0a0: 616d 706c 6520 696c 6c75 7374 7261 7465 ample illustrate\n+0011f0b0: 7320 7468 6520 636c 6965 6e74 2d73 6964 s the client-sid\n+0011f0c0: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization\n+0011f0d0: 206f 6620 616e 2069 6d61 6765 2061 7474 of an image att\n+0011f0e0: 6163 686d 656e 7420 7374 7275 6374 2074 achment struct t\n+0011f0f0: 6f20 7374 7265 616d 2061 2066 696c 6520 o stream a file \n+0011f100: 696e 746f 2061 204d 544f 4d20 6174 7461 into a MTOM atta\n+0011f110: 6368 6d65 6e74 2077 6974 686f 7574 2048 chment without H\n+0011f120: 5454 5020 6368 756e 6b69 6e67 2028 4854 TTP chunking (HT\n+0011f130: 5450 2073 7472 6561 6d69 6e67 2063 6875 TP streaming chu\n+0011f140: 6e6b 6564 204d 544f 4d20 7472 616e 7366 nked MTOM transf\n+0011f150: 6572 2069 7320 7072 6573 656e 7465 6420 er is presented \n+0011f160: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Streamin\n+0011f1a0: 6720 6368 756e 6b65 6420 4d49 4d45 2f4d g chunked MIME/M\n+0011f1b0: 544f 4d3c 2f61 3e20 293a 3c2f 703e 0a3c TOM ):

    .<\n+0011f1c0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0011f1d0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int main\n+0011f210: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
    .
    {.
    {
    .\n-0011f260: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-0011f280: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-0011f2b0: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa\n-0011f2e0: 703c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 p;
    .\n-0011f300: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-0011f320: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>xsd\n-0011f360: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary image;
    \n-0011f380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    FILE *fd; <\n-0011f3a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-0011f3d0: 7374 7275 6374 203c 2f73 7061 6e3e 7374 struct st\n-0011f3e0: 6174 2073 623b 203c 2f64 6976 3e0a 3c64 at sb;
    .\n-0011f400: 2020 3c61 2063 6c61 7373 3d22 636f 6465
    soap_init\n-0011f460: 313c 2f61 3e28 2661 6d70 3b3c 6120 636c 1(&soap, S\n-0011f4f0: 4f41 505f 454e 435f 4d54 4f4d 3c2f 613e OAP_ENC_MTOM\n-0011f500: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // mand\n-0011f520: 6174 6f72 7920 746f 2065 6e61 626c 6520 atory to enable \n-0011f530: 4d54 4f4d 203c 2f73 7061 6e3e 3c2f 6469 MTOM .
    if (!fst\n-0011f580: 6174 2866 696c 656e 6f28 6664 292c 2026 at(fileno(fd), &\n-0011f590: 616d 703b 7362 2920 2661 6d70 3b26 616d amp;sb) &&am\n-0011f5a0: 703b 2073 622e 7374 5f73 697a 6520 2667 p; sb.st_size &g\n-0011f5b0: 743b 2030 2920 3c2f 6469 763e 0a3c 6469 t; 0)
    . \n-0011f5d0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n-0011f5f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0011f600: 656e 7422 3e2f 2f20 6265 6361 7573 6520 ent\">// because \n-0011f610: 7765 2063 616e 2067 6574 2074 6865 206c we can get the l\n-0011f620: 656e 6774 6820 6f66 2074 6865 2066 696c ength of the fil\n-0011f630: 652c 2077 6520 6361 6e20 7374 7265 616d e, we can stream\n-0011f640: 2069 7420 7769 7468 6f75 7420 6368 756e it without chun\n-0011f650: 6b69 6e67 203c 2f73 7061 6e3e 3c2f 6469 king ..
    \n-0011f740: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-0011f770: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fmimerea\n-0011f7d0: 6463 6c6f 7365 3c2f 613e 203d 206d 696d dclose = mim\n-0011f7e0: 655f 7265 6164 5f63 6c6f 7365 3b20 3c2f e_read_close; .
    soap.fmimeread \n-0011f8a0: 3d20 6d69 6d65 5f72 6561 643b 203c 2f64 = mime_read; .
    image.\n-0011f8d0: 5f5f 7074 7220 3d20 283c 7370 616e 2063 __ptr = (unsigned cha\n-0011f920: 723c 2f73 7061 6e3e 2a29 6664 3b20 3c73 r*)fd; // must set \n-0011f950: 746f 206e 6f6e 2d4e 554c 4c20 2874 6869 to non-NULL (thi\n-0011f960: 7320 6973 206f 7572 2066 6420 6861 6e64 s is our fd hand\n-0011f970: 6c65 2077 6869 6368 2077 6520 6e65 6564 le which we need\n-0011f980: 2069 6e20 7468 6520 6361 6c6c 6261 636b in the callback\n-0011f990: 7329 203c 2f73 7061 6e3e 3c2f 6469 763e s)
    \n-0011f9a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.__s\n-0011f9c0: 697a 6520 3d20 7362 2e73 745f 7369 7a65 ize = sb.st_size\n-0011f9d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // must \n-0011f9f0: 7365 7420 7369 7a65 203c 2f73 7061 6e3e set size \n-0011fa00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    else .
    {
    \n-0011fa80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n-0011fab0: 646f 6e26 2333 393b 7420 6b6e 6f77 2074 don't know t\n-0011fac0: 6865 2073 697a 652c 2073 6f20 6275 6666 he size, so buff\n-0011fad0: 6572 2069 7420 3c2f 7370 616e 3e3c 2f64 er it .
    size_t i;
    . \n-0011fb40: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-0011fb60: 2f73 7061 6e3e 2063 3b20 3c2f 6469 763e /span> c;
    \n-0011fb70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.__p\n-0011fb90: 7472 203d 2028 3c73 7061 6e20 636c 6173 tr = (\n-0011fbb0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n-0011fbc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*)soap\n-0011fc40: 5f6d 616c 6c6f 633c 2f61 3e28 2661 6d70 _malloc(&\n-0011fc50: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0011fc80: 2c20 4d41 585f 4649 4c45 5f53 495a 4529 , MAX_FILE_SIZE)\n-0011fc90: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-0011fcb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0011fcc0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow\">for (i = 0; i &l\n-0011fce0: 743b 204d 4158 5f46 494c 455f 5349 5a45 t; MAX_FILE_SIZE\n-0011fcf0: 3b20 692b 2b29 203c 2f64 6976 3e0a 3c64 ; i++)
    .\n-0011fd10: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n-0011fd30: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-0011fd50: 3c2f 7370 616e 3e20 2828 6320 3d20 6667 ((c = fg\n-0011fd60: 6574 6328 6664 2929 203d 3d20 454f 4629 etc(fd)) == EOF)\n-0011fd70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-0011fd90: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n-0011fdb0: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    \n-0011fdc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image._\n-0011fde0: 5f70 7472 5b69 5d20 3d20 633b 203c 2f64 _ptr[i] = c; .
    } .
    fclose(\n-0011fe30: 6664 293b 203c 2f64 6976 3e0a 3c64 6976 fd);
    . \n-0011fe50: 2020 696d 6167 652e 5f5f 7369 7a65 203d image.__size =\n-0011fe60: 2069 3b20 3c2f 6469 763e 0a3c 6469 7620 i;
    .
    }\n-0011fe80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    imag\n-0011fea0: 652e 7479 7065 203d 203c 7370 616e 2063 e.type = "image\n-0011fed0: 2f6a 7065 6726 7175 6f74 3b3c 2f73 7061 /jpeg"; // MIM\n-0011ff00: 4520 7479 7065 203c 2f73 7061 6e3e 3c2f E type .
    image.o\n-0011ff30: 7074 696f 6e73 203d 203c 7370 616e 2063 ptions = "This \n-0011ff60: 6973 206d 7920 7069 6374 7572 6526 7175 is my picture&qu\n-0011ff70: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // description\n-0011ffa0: 206f 6620 6f62 6a65 6374 203c 2f73 7061 of object
    .
    if\n-0011fff0: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n-00120000: 7765 626d 6574 686f 6428 2661 6d70 3b3c webmethod(&<\n-00120010: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00120020: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00120030: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00120040: 2e2e 2e29 293c 2f64 6976 3e0a 3c64 6976 ...))
    . \n-00120060: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-00120080: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    \n-001200c0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... // success
    .
    } st\n+0011f260: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
    st\n+0011f300: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct xsd__base64Bi\n+0011f350: 6e61 7279 3c2f 613e 2069 6d61 6765 3b20 nary image; \n+0011f360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    FILE \n+0011f380: 2a66 643b 203c 2f64 6976 3e0a 3c64 6976 *fd;
    . \n+0011f3a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct stat sb; .
    soa\n+0011f440: 705f 696e 6974 313c 2f61 3e28 2661 6d70 p_init1(&\n+0011f450: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+0011f480: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_ENC_MT\n+0011f4e0: 4f4d 3c2f 613e 293b 203c 7370 616e 2063 OM); /\n+0011f500: 2f20 6d61 6e64 6174 6f72 7920 746f 2065 / mandatory to e\n+0011f510: 6e61 626c 6520 4d54 4f4d 203c 2f73 7061 nable MTOM
    .
    if\n+0011f560: 2028 2166 7374 6174 2866 696c 656e 6f28 (!fstat(fileno(\n+0011f570: 6664 292c 2026 616d 703b 7362 2920 2661 fd), &sb) &a\n+0011f580: 6d70 3b26 616d 703b 2073 622e 7374 5f73 mp;& sb.st_s\n+0011f590: 697a 6520 2667 743b 2030 2920 3c2f 6469 ize > 0) .
    {
    .<\n+0011f5c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011f5d0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // be\n+0011f5f0: 6361 7573 6520 7765 2063 616e 2067 6574 cause we can get\n+0011f600: 2074 6865 206c 656e 6774 6820 6f66 2074 the length of t\n+0011f610: 6865 2066 696c 652c 2077 6520 6361 6e20 he file, we can \n+0011f620: 7374 7265 616d 2069 7420 7769 7468 6f75 stream it withou\n+0011f630: 7420 6368 756e 6b69 6e67 203c 2f73 7061 t chunking
    .
    <\n+0011f660: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011f670: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0011f680: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0011f690: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011f6a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0011f6b0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+0011f6c0: 6c23 6761 3631 3066 3261 3661 3536 6435 l#ga610f2a6a56d5\n+0011f6d0: 6164 3034 6362 3531 3234 3434 3061 3564 ad04cb5124440a5d\n+0011f6e0: 6531 6463 223e 666d 696d 6572 6561 646f e1dc\">fmimereado\n+0011f6f0: 7065 6e3c 2f61 3e20 3d20 6d69 6d65 5f72 pen = mime_r\n+0011f700: 6561 645f 6f70 656e 3b20 3c2f 6469 763e ead_open;
    \n+0011f710: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n+0011f750: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fm\n+0011f7b0: 696d 6572 6561 6463 6c6f 7365 3c2f 613e imereadclose\n+0011f7c0: 203d 206d 696d 655f 7265 6164 5f63 6c6f = mime_read_clo\n+0011f7d0: 7365 3b20 3c2f 6469 763e 0a3c 6469 7620 se;
    .
    \n+0011f7f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0011f820: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fmimerea\n+0011f880: 643c 2f61 3e20 3d20 6d69 6d65 5f72 6561 d = mime_rea\n+0011f890: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
    .
    \n+0011f8b0: 696d 6167 652e 5f5f 7074 7220 3d20 283c image.__ptr = (<\n+0011f8c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0011f8d0: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype\">unsigne\n+0011f8e0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d char*)\n+0011f910: 6664 3b20 3c73 7061 6e20 636c 6173 733d fd; // mus\n+0011f930: 7420 7365 7420 746f 206e 6f6e 2d4e 554c t set to non-NUL\n+0011f940: 4c20 2874 6869 7320 6973 206f 7572 2066 L (this is our f\n+0011f950: 6420 6861 6e64 6c65 2077 6869 6368 2077 d handle which w\n+0011f960: 6520 6e65 6564 2069 6e20 7468 6520 6361 e need in the ca\n+0011f970: 6c6c 6261 636b 7329 203c 2f73 7061 6e3e llbacks) \n+0011f980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ima\n+0011f9a0: 6765 2e5f 5f73 697a 6520 3d20 7362 2e73 ge.__size = sb.s\n+0011f9b0: 745f 7369 7a65 3b20 3c73 7061 6e20 636c t_size; //\n+0011f9d0: 206d 7573 7420 7365 7420 7369 7a65 203c must set size <\n+0011f9e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0011fa00: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    else
    .
    {\n+0011fa60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    // don't \n+0011faa0: 6b6e 6f77 2074 6865 2073 697a 652c 2073 know the size, s\n+0011fab0: 6f20 6275 6666 6572 2069 7420 3c2f 7370 o buffer it
    .
    \n+0011fae0: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+0011fb00: 3c2f 7370 616e 3e20 693b 203c 2f64 6976 i; .
    int c; \n+0011fb50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ima\n+0011fb70: 6765 2e5f 5f70 7472 203d 2028 3c73 7061 ge.__ptr = (unsigned \n+0011fbc0: 6368 6172 3c2f 7370 616e 3e2a 293c 6120 char*)soap_malloc(&so\n+0011fc60: 6170 3c2f 613e 2c20 4d41 585f 4649 4c45 ap, MAX_FILE\n+0011fc70: 5f53 495a 4529 3b20 3c2f 6469 763e 0a3c _SIZE);
    .<\n+0011fc80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011fc90: 3e20 2020 203c 7370 616e 2063 6c61 7373 > f\n+0011fcb0: 6f72 3c2f 7370 616e 3e20 2869 203d 2030 or (i = 0\n+0011fcc0: 3b20 6920 266c 743b 204d 4158 5f46 494c ; i < MAX_FIL\n+0011fcd0: 455f 5349 5a45 3b20 692b 2b29 203c 2f64 E_SIZE; i++) .
    {.
    if ((\n+0011fd40: 6320 3d20 6667 6574 6328 6664 2929 203d c = fgetc(fd)) =\n+0011fd50: 3d20 454f 4629 203c 2f64 6976 3e0a 3c64 = EOF)
    .\n+0011fd70: 2020 2020 2020 2020 3c73 7061 6e20 636c break; \n+0011fda0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    i\n+0011fdc0: 6d61 6765 2e5f 5f70 7472 5b69 5d20 3d20 mage.__ptr[i] = \n+0011fdd0: 633b 203c 2f64 6976 3e0a 3c64 6976 2063 c;
    .
    \n+0011fdf0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    f\n+0011fe10: 636c 6f73 6528 6664 293b 203c 2f64 6976 close(fd); .
    image.__\n+0011fe40: 7369 7a65 203d 2069 3b20 3c2f 6469 763e size = i;
    \n+0011fe50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+0011fe80: 2020 696d 6167 652e 7479 7065 203d 203c image.type = <\n+0011fe90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0011fea0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0011feb0: 3b69 6d61 6765 2f6a 7065 6726 7175 6f74 ;image/jpeg"\n+0011fec0: 3b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 ;; \n+0011fee0: 2f2f 204d 494d 4520 7479 7065 203c 2f73 // MIME type
    .
    i\n+0011ff10: 6d61 6765 2e6f 7074 696f 6e73 203d 203c mage.options = <\n+0011ff20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0011ff30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0011ff40: 3b54 6869 7320 6973 206d 7920 7069 6374 ;This is my pict\n+0011ff50: 7572 6526 7175 6f74 3b3c 2f73 7061 6e3e ure"\n+0011ff60: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // descr\n+0011ff80: 6970 7469 6f6e 206f 6620 6f62 6a65 6374 iption of object\n+0011ff90: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0011ffa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011ffb0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+0011ffd0: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n+0011ffe0: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n+0011fff0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+00120020: 3c2f 613e 2c20 2e2e 2e29 293c 2f64 6976 , ...)).
    ... // error
    .
    else
    .
    ..\n+001200d0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe\n+001200f0: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
    .\n+00120100: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .<\n-00120150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00120160: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00120180: 2f73 7061 6e3e 202a 6d69 6d65 5f72 6561 /span> *mime_rea\n-00120190: 645f 6f70 656e 283c 7370 616e 2063 6c61 d_open(str\n-001201b0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle, const <\n-00120270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00120280: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *\n-001202b0: 6964 3c2f 7370 616e 3e2c 203c 7370 616e id, const char *type, const char *description\n-00120360: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    return h\n-001203c0: 616e 646c 653b 203c 2f64 6976 3e0a 3c64 andle;
    .\n-001203e0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    v\n-00120430: 6f69 643c 2f73 7061 6e3e 206d 696d 655f oid mime_\n-00120440: 7265 6164 5f63 6c6f 7365 283c 7370 616e read_close(struct <\n-00120470: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00120480: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00120490: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001204a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001204d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n-001204f0: 2f73 7061 6e3e 202a 6861 6e64 6c65 2920 /span> *handle) \n+00120140: 226c 696e 6522 3e3c 7370 616e 2063 6c61 \"line\">void *mi\n+00120170: 6d65 5f72 6561 645f 6f70 656e 283c 7370 me_read_open(struct\n+001201a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001201d0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, voi\n+00120220: 643c 2f73 7061 6e3e 202a 6861 6e64 6c65 d *handle\n+00120230: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n+00120270: 6861 723c 2f73 7061 6e3e 202a 3c73 7061 har *id,\n+001202a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n+001202e0: 6172 3c2f 7370 616e 3e20 2a74 7970 652c ar *type,\n+001202f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n+00120330: 6172 3c2f 7370 616e 3e20 2a64 6573 6372 ar *descr\n+00120340: 6970 7469 6f6e 2920 3c2f 6469 763e 0a3c iption)
    .<\n+00120350: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120360: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    return handle; .
    }
    .<\n+001203d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001203e0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    .{\n 00120500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00120520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fclose((FIL\n-00120540: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    }
    . fclos\n+00120520: 6528 2846 494c 452a 2968 616e 646c 6529 e((FILE*)handle)\n+00120530: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .\n-00120580: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    size_t mime_read(struct \n-001205f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00120620: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00120650: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void\n-00120670: 3c2f 7370 616e 3e20 2a68 616e 646c 652c *handle,\n-00120680: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001206a0: 2f73 7061 6e3e 202a 6275 662c 203c 7370 /span> *buf, size_t len)
    \n+00120580: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+001205a0: 3c2f 7370 616e 3e20 6d69 6d65 5f72 6561 mime_rea\n+001205b0: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa\n+00120600: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00120630: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, void *h\n+00120660: 616e 646c 652c 203c 7370 616e 2063 6c61 andle, char *bu\n+00120690: 662c 203c 7370 616e 2063 6c61 7373 3d22 f, siz\n+001206b0: 655f 743c 2f73 7061 6e3e 206c 656e 2920 e_t len) \n+001206c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n 001206e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00120710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00120720: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-00120730: 2f73 7061 6e3e 2066 7265 6164 2862 7566 /span> fread(buf\n-00120740: 2c20 312c 206c 656e 2c20 2846 494c 452a , 1, len, (FILE*\n-00120750: 2968 616e 646c 6529 3b20 3c2f 6469 763e )handle);
    \n-00120760: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    void *(* fmimer\n-00120870: 6561 646f 7065 6e29 2873 7472 7563 7420 eadopen)(struct \n-00120880: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n-00120890: 202a 2c20 636f 6e73 7420 6368 6172 202a *, const char *\n-001208a0: 2c20 636f 6e73 7420 6368 6172 202a 2c20 , const char *, \n-001208b0: 636f 6e73 7420 6368 6172 202a 293c 2f64 const char *)
    Callback t\n-001208e0: 6f20 6f70 656e 2061 2073 7472 6561 6d69 o open a streami\n-001208f0: 6e67 204d 494d 452f 4d54 4f4d 2061 7474 ng MIME/MTOM att\n-00120900: 6163 686d 656e 7420 666f 7220 7265 6164 achment for read\n-00120910: 696e 672e 3c2f 6469 763e 3c64 6976 2063 ing.
    \n-00120930: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00120940: 7374 6473 6f61 7032 2e68 3a34 3839 363c stdsoap2.h:4896<\n-00120950: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .<\n-00120a30: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00120a40: 6922 3e76 6f69 6428 2a20 666d 696d 6572 i\">void(* fmimer\n-00120a50: 6561 6463 6c6f 7365 2928 7374 7275 6374 eadclose)(struct\n-00120a60: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n-00120a70: 6420 2a68 616e 646c 6529 3c2f 6469 763e d *handle)
    \n-00120a80: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback to c\n-00120aa0: 6c6f 7365 2061 204d 494d 452f 4d54 4f4d lose a MIME/MTOM\n-00120ab0: 2061 7474 6163 686d 656e 7420 7374 7265 attachment stre\n-00120ac0: 616d 2061 6674 6572 2072 6561 6469 6e67 am after reading\n-00120ad0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-00120af0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-00120b00: 736f 6170 322e 683a 3439 3239 3c2f 6469 soap2.h:4929
    .<\n-00120cb0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:491\n-00120cd0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 4
    .

    The foll\n-00120d00: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il\n-00120d10: 6c75 7374 7261 7465 7320 7468 6520 7374 lustrates the st\n-00120d20: 7265 616d 696e 6720 6f66 2061 204d 494d reaming of a MIM\n-00120d30: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n-00120d40: 7420 696e 746f 2061 2066 696c 6520 6279 t into a file by\n-00120d50: 2061 2063 6c69 656e 743a 3c2f 703e 0a3c a client:

    .<\n-00120d60: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00120d70: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int main\n-00120db0: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
    .
    {.
    st\n-00120e00: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
    soa\n-00120ee0: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(&\n-00120ef0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00120f20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap.fmimewriteop\n-00120fd0: 656e 3c2f 613e 203d 206d 696d 655f 7772 en = mime_wr\n-00120fe0: 6974 655f 6f70 656e 3b20 3c2f 6469 763e ite_open;
    \n-00120ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n-00121030: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fmim\n-00121090: 6577 7269 7465 636c 6f73 653c 2f61 3e20 ewriteclose \n-001210a0: 3d20 6d69 6d65 5f77 7269 7465 5f63 6c6f = mime_write_clo\n-001210b0: 7365 3b20 3c2f 6469 763e 0a3c 6469 7620 se;
    .
    <\n-001210d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001210e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001210f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-00121100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00121110: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00121120: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-00121130: 6c23 6761 3930 3834 6630 3339 3265 3461 l#ga9084f0392e4a\n-00121140: 3534 3238 3733 3636 3132 3164 3330 6263 54287366121d30bc\n-00121150: 3438 3330 223e 666d 696d 6577 7269 7465 4830\">fmimewrite\n-00121160: 3c2f 613e 203d 206d 696d 655f 7772 6974 = mime_writ\n-00121170: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    if (soap_call_ns_\n-001211c0: 5f77 6562 6d65 7468 6f64 2826 616d 703b _webmethod(&\n-001211d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00121200: 202e 2e2e 2929 3c2f 6469 763e 0a3c 6469 ...))
    . \n-00121220: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n-00121240: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    else.
    ... // success
    .
    } <\n+001206f0: 6522 3e20 203c 7370 616e 2063 6c61 7373 e\"> r\n+00120710: 6574 7572 6e3c 2f73 7061 6e3e 2066 7265 eturn fre\n+00120720: 6164 2862 7566 2c20 312c 206c 656e 2c20 ad(buf, 1, len, \n+00120730: 2846 494c 452a 2968 616e 646c 6529 3b20 (FILE*)handle); \n+00120740: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n+00120760: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::fmim\n+00120820: 6572 6561 646f 7065 6e3c 2f61 3e3c 2f64 ereadopen
    void *(* \n+00120850: 666d 696d 6572 6561 646f 7065 6e29 2873 fmimereadopen)(s\n+00120860: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00120870: 2c20 766f 6964 202a 2c20 636f 6e73 7420 , void *, const \n+00120880: 6368 6172 202a 2c20 636f 6e73 7420 6368 char *, const ch\n+00120890: 6172 202a 2c20 636f 6e73 7420 6368 6172 ar *, const char\n+001208a0: 202a 293c 2f64 6976 3e3c 6469 7620 636c *)
    Call\n+001208c0: 6261 636b 2074 6f20 6f70 656e 2061 2073 back to open a s\n+001208d0: 7472 6561 6d69 6e67 204d 494d 452f 4d54 treaming MIME/MT\n+001208e0: 4f4d 2061 7474 6163 686d 656e 7420 666f OM attachment fo\n+001208f0: 7220 7265 6164 696e 672e 3c2f 6469 763e r reading.
    \n+00120900: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00120920: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00120930: 3a34 3839 363c 2f64 6976 3e3c 2f64 6976 :4896
    .
    soap::fmi\n+00120a00: 6d65 7265 6164 636c 6f73 653c 2f61 3e3c mereadclose<\n+00120a10: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void(* \n+00120a30: 666d 696d 6572 6561 6463 6c6f 7365 2928 fmimereadclose)(\n+00120a40: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00120a50: 702c 2076 6f69 6420 2a68 616e 646c 6529 p, void *handle)\n+00120a60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac\n+00120a80: 6b20 746f 2063 6c6f 7365 2061 204d 494d k to close a MIM\n+00120a90: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n+00120aa0: 7420 7374 7265 616d 2061 6674 6572 2072 t stream after r\n+00120ab0: 6561 6469 6e67 2e3c 2f64 6976 3e3c 6469 eading.
    \n+00120ad0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:49\n+00120af0: 3239 3c2f 6469 763e 3c2f 6469 763e 0a3c 29
    .<\n+00120b00: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00120b10: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+00120b20: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n+00120b30: 6c5f 6761 6666 3430 6131 6361 3666 6266 l_gaff40a1ca6fbf\n+00120b40: 3037 3562 3534 6363 6266 3437 3930 3039 075b54ccbf479009\n+00120b50: 6365 3734 223e 3c64 6976 2063 6c61 7373 ce74\">size_t(* fmimer\n+00120bf0: 6561 6429 2873 7472 7563 7420 736f 6170 ead)(struct soap\n+00120c00: 202a 736f 6170 2c20 766f 6964 202a 6861 *soap, void *ha\n+00120c10: 6e64 6c65 2c20 6368 6172 202a 6275 662c ndle, char *buf,\n+00120c20: 2073 697a 655f 7420 6c65 6e29 3c2f 6469 size_t len)
    Callback to\n+00120c50: 2072 6561 6420 6461 7461 2069 6e20 6120 read data in a \n+00120c60: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n+00120c70: 6d65 6e74 2073 7472 6561 6d2e 3c2f 6469 ment stream.
    Definiti\n+00120ca0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00120cb0: 2e68 3a34 3931 343c 2f64 6976 3e3c 2f64 .h:4914
    .

    Th\n+00120ce0: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam\n+00120cf0: 706c 6520 696c 6c75 7374 7261 7465 7320 ple illustrates \n+00120d00: 7468 6520 7374 7265 616d 696e 6720 6f66 the streaming of\n+00120d10: 2061 204d 494d 452f 4d54 4f4d 2061 7474 a MIME/MTOM att\n+00120d20: 6163 686d 656e 7420 696e 746f 2061 2066 achment into a f\n+00120d30: 696c 6520 6279 2061 2063 6c69 656e 743a ile by a client:\n+00120d40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main()
    .\n+00120da0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct soap soap;
    .
    soap_init\n+00120ed0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00120f00: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n+00120f10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120f20: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap.fmimew\n+00120fb0: 7269 7465 6f70 656e 3c2f 613e 203d 206d riteopen = m\n+00120fc0: 696d 655f 7772 6974 655f 6f70 656e 3b20 ime_write_open; \n+00120fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.fmimewriteclos\n+00121080: 653c 2f61 3e20 3d20 6d69 6d65 5f77 7269 e = mime_wri\n+00121090: 7465 5f63 6c6f 7365 3b20 3c2f 6469 763e te_close;
    \n+001210a0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+00121160: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n+00121190: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n+001211a0: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n+001211b0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001211e0: 703c 2f61 3e2c 202e 2e2e 2929 3c2f 6469 p, ...)).
    ... // error
    .
    else
    .
    .\n+00121290: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n+001212b0: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
    \n+001212c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n 001212f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-00121310: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-00121340: 3c2f 7370 616e 3e20 2a6d 696d 655f 7772 *mime_wr\n-00121350: 6974 655f 6f70 656e 283c 7370 616e 2063 ite_open(s\n-00121370: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001213e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001213f0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00121420: 3c2f 7370 616e 3e20 2a3c 7370 616e 2063 *id, const\n-00121470: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00121490: 2f73 7061 6e3e 202a 7479 7065 2c20 3c73 /span> *type, const\n-001214c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001214e0: 2f73 7061 6e3e 202a 6465 7363 7269 7074 /span> *descript\n-001214f0: 696f 6e2c 203c 7370 616e 2063 6c61 7373 ion, enum<\n-00121510: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_mi\n-00121570: 6d65 5f65 6e63 6f64 696e 673c 2f61 3e20 me_encoding \n-00121580: 656e 636f 6469 6e67 2920 3c2f 6469 763e encoding)
    \n+00121300: 3d22 6c69 6e65 223e 3c73 7061 6e20 636c =\"line\">void *m\n+00121330: 696d 655f 7772 6974 655f 6f70 656e 283c ime_write_open(<\n+00121340: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00121350: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001213c0: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, const\n+001213e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *<\n+00121410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00121420: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype\">id, const<\n+00121450: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty\n+00121480: 7065 2c20 3c73 7061 6e20 636c 6173 733d pe, const<\n+001214a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *de\n+001214d0: 7363 7269 7074 696f 6e2c 203c 7370 616e scription, enum s\n+00121550: 6f61 705f 6d69 6d65 5f65 6e63 6f64 696e oap_mime_encodin\n+00121560: 673c 2f61 3e20 656e 636f 6469 6e67 2920 g encoding) \n+00121570: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n 00121590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    F\n-001215c0: 494c 4520 2a68 616e 646c 6520 3d20 3c61 ILE *handle = fopen(<\n-00121630: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00121640: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00121650: 3b73 6f6d 6566 696c 6526 7175 6f74 3b3c ;somefile"<\n-00121660: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "wb&quo\n-00121690: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); .
    // \n-001216d0: 5765 2069 676e 6f72 6520 7468 6520 4d49 We ignore the MI\n-001216e0: 4d45 2063 6f6e 7465 6e74 2074 7261 6e73 ME content trans\n-001216f0: 6665 7220 656e 636f 6469 6e67 2068 6572 fer encoding her\n-00121700: 652c 2062 7574 2073 686f 756c 6420 6368 e, but should ch\n-00121710: 6563 6b20 3c2f 7370 616e 3e3c 2f64 6976 eck .
    \n-00121750: 6966 3c2f 7370 616e 3e20 2821 6861 6e64 if (!hand\n-00121760: 6c65 2920 3c2f 6469 763e 0a3c 6469 7620 le)
    .
    {\n-00121780: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..<\n-00121890: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001218a0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n-001218d0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->errnum = e\n-00121930: 7272 6e6f 3b20 3c73 7061 6e20 636c 6173 rrno; // g\n-00121950: 6574 2072 6561 736f 6e20 3c2f 7370 616e et reason
    .
    } .
    return\n-001219c0: 2028 3c73 7061 6e20 636c 6173 733d 226b (void\n-001219e0: 3c2f 7370 616e 3e2a 2968 616e 646c 653b *)handle;\n-001219f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } FILE *handl\n+001215b0: 6520 3d20 3c61 2063 6c61 7373 3d22 636f e = fopen\n+00121610: 3c2f 613e 283c 7370 616e 2063 6c61 7373 ("somefile&\n+00121640: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+00121670: 7762 2671 756f 743b 3c2f 7370 616e 3e29 wb")\n+00121680: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    // We ignore \n+001216c0: 7468 6520 4d49 4d45 2063 6f6e 7465 6e74 the MIME content\n+001216d0: 2074 7261 6e73 6665 7220 656e 636f 6469 transfer encodi\n+001216e0: 6e67 2068 6572 652c 2062 7574 2073 686f ng here, but sho\n+001216f0: 756c 6420 6368 6563 6b20 3c2f 7370 616e uld check
    .
    if \n+00121740: 2821 6861 6e64 6c65 2920 3c2f 6469 763e (!handle)
    \n+00121750: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+00121780: 2020 203c 6120 636c 6173 733d 2263 6f64 soap->\n+00121800: 6572 726f 723c 2f61 3e20 3d20 3c61 2063 error = \n+00121860: 534f 4150 5f45 4f46 3c2f 613e 3b20 3c2f SOAP_EOF; .
    soap-><\n+001218c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001218d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001218e0: 6874 6d6c 2361 3130 6236 3664 3664 3438 html#a10b66d6d48\n+001218f0: 3936 3930 6237 6430 6635 3931 6165 3236 9690b7d0f591ae26\n+00121900: 3333 6464 3133 223e 6572 726e 756d 3c2f 33dd13\">errnum = errno; // get reason \n+00121940: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00121960: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n+00121980: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00121990: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001219a0: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (void*)h\n+001219d0: 616e 646c 653b 203c 2f64 6976 3e0a 3c64 andle;
    .\n+001219f0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    .<\n-00121a40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00121a50: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void mime_write_\n-00121a70: 636c 6f73 6528 3c73 7061 6e20 636c 6173 close(stru\n-00121a90: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, void *handle) v\n+00121a40: 6f69 643c 2f73 7061 6e3e 206d 696d 655f oid mime_\n+00121a50: 7772 6974 655f 636c 6f73 6528 3c73 7061 write_close(struct \n+00121a80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00121ab0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00121ae0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void\n+00121b00: 3c2f 7370 616e 3e20 2a68 616e 646c 6529 *handle)\n+00121b10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    {
    . \n-00121b60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fclose((FILE*)handle)\n-00121bd0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } fcl\n+00121ba0: 6f73 653c 2f61 3e28 2846 494c 452a 2968 ose((FILE*)h\n+00121bb0: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n+00121bc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00121bd0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    .\n-00121c20: 3c73 7061 6e20 636c 6173 733d 226b 6579 int mime_write(\n-00121c50: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00121ca0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-00121cd0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n-00121cf0: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han\n-00121d00: 646c 652c 203c 7370 616e 2063 6c61 7373 dle, const\n-00121d20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *<\n-00121d50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00121d60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00121d70: 6874 6d6c 2361 6364 6131 3733 3666 6261 html#acda1736fba\n-00121d80: 6163 3037 3236 3132 3236 6265 6665 3136 ac07261226befe16\n-00121d90: 3561 3536 3831 223e 6275 663c 2f61 3e2c 5a5681\">buf,\n-00121da0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n-00121dc0: 743c 2f73 7061 6e3e 206c 656e 2920 3c2f t len) \n+00121c20: 696e 743c 2f73 7061 6e3e 206d 696d 655f int mime_\n+00121c30: 7772 6974 6528 3c73 7061 6e20 636c 6173 write(stru\n+00121c50: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, void *handle, const char *bu\n+00121d80: 663c 2f61 3e2c 203c 7370 616e 2063 6c61 f, size_t l\n+00121db0: 656e 2920 3c2f 6469 763e 0a3c 6469 7620 en)
    .
    {.
    {
    .<\n-00121df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00121e00: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz\n-00121e20: 655f 743c 2f73 7061 6e3e 206e 7772 6974 e_t nwrit\n-00121e30: 7465 6e3b 203c 2f64 6976 3e0a 3c64 6976 ten;
    . \n-00121e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 while<\n-00121e70: 2f73 7061 6e3e 2028 6c65 6e29 203c 2f64 /span> (len) .
    {
    .\n-00121ea0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    nwritten =\n-00121ec0: 2066 7772 6974 6528 3c61 2063 6c61 7373 fwrite(buf, 1, len\n-00121f20: 2c20 2846 494c 452a 2968 616e 646c 6529 , (FILE*)handle)\n-00121f30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-00121f50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00121f60: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!nwritten) <\n-00121f80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {..<\n-00122080: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00122090: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return <\n-001220c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001220d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001220e0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-001220f0: 6132 3234 6232 6332 6238 3330 3133 3566 a224b2c2b830135f\n-00122100: 3132 6235 3335 3336 6631 3839 6234 6562 12b53536f189b4eb\n-00122110: 6422 3e53 4f41 505f 454f 463c 2f61 3e3b d\">SOAP_EOF;\n-00122120: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } \n-00122140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    len\n-00122160: 202d 3d20 6e77 7269 7474 656e 3b20 3c2f -= nwritten; .
    buf += n\n-001221e0: 7772 6974 7465 6e3b 203c 2f64 6976 3e0a written;
    .\n-001221f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n-00122220: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00122240: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001222a0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n-001222b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    <\n-001223a0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-001223b0: 6922 3e76 6f69 6428 2a20 666d 696d 6577 i\">void(* fmimew\n-001223c0: 7269 7465 636c 6f73 6529 2873 7472 7563 riteclose)(struc\n-001223d0: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n-001223e0: 6964 202a 6861 6e64 6c65 293c 2f64 6976 id *handle)
    Callback to \n-00122410: 636c 6f73 6520 6120 4d49 4d45 2f4d 544f close a MIME/MTO\n-00122420: 4d20 6174 7461 6368 6d65 6e74 2073 7472 M attachment str\n-00122430: 6561 6d20 6166 7465 7220 7772 6974 696e eam after writin\n-00122440: 672e 3c2f 6469 763e 3c64 6976 2063 6c61 g.
    De\n-00122460: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00122470: 6473 6f61 7032 2e68 3a35 3032 303c 2f64 dsoap2.h:5020
    ..\n-00122650: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::fmime\n-00122710: 7772 6974 656f 7065 6e3c 2f61 3e3c 2f64 writeopen
    void *(* \n-00122740: 666d 696d 6577 7269 7465 6f70 656e 2928 fmimewriteopen)(\n-00122750: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00122760: 702c 2076 6f69 6420 2a68 616e 646c 652c p, void *handle,\n-00122770: 2063 6f6e 7374 2063 6861 7220 2a69 642c const char *id,\n-00122780: 2063 6f6e 7374 2063 6861 7220 2a74 7970 const char *typ\n-00122790: 652c 2063 6f6e 7374 2063 6861 7220 2a64 e, const char *d\n-001227a0: 6573 6372 6970 7469 6f6e 2c20 656e 756d escription, enum\n-001227b0: 2073 6f61 705f 6d69 6d65 5f65 6e63 6f64 soap_mime_encod\n-001227c0: 696e 6720 656e 636f 6469 6e67 293c 2f64 ing encoding)
    Callback t\n-001227f0: 6f20 6f70 656e 2061 2073 7472 6561 6d69 o open a streami\n-00122800: 6e67 204d 494d 452f 4d54 4f4d 2061 7474 ng MIME/MTOM att\n-00122810: 6163 686d 656e 7420 666f 7220 7772 6974 achment for writ\n-00122820: 696e 672e 3c2f 6469 763e 3c64 6976 2063 ing.
    \n-00122840: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00122850: 7374 6473 6f61 7032 2e68 3a34 3939 383c stdsoap2.h:4998<\n-00122860: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .soap_mime\n-00122920: 5f65 6e63 6f64 696e 673c 2f61 3e3c 2f64 _encoding
    soap_mime\n-00122950: 5f65 6e63 6f64 696e 673c 2f64 6976 3e3c _encoding
    <\n-00122960: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00122970: 223e 5246 4332 3034 3520 4d49 4d45 2063 \">RFC2045 MIME c\n-00122980: 6f6e 7465 6e74 2074 7261 6e73 6665 7220 ontent transfer \n-00122990: 656e 636f 6469 6e67 732e 3c2f 6469 763e encodings.
    \n-001229a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-001229c0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-001229d0: 3a31 3032 3233 3c2f 6469 763e 3c2f 6469 :10223
    .

    Mes\n-00122a00: 7361 6765 2063 6f6d 7072 6573 7369 6f6e sage compression\n-00122a10: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA\n-00122a20: 505f 454e 435f 5a4c 4942 3c2f 636f 6465 P_ENC_ZLIB can be used wi\n-00122a40: 7468 204d 494d 4520 746f 2063 6f6d 7072 th MIME to compr\n-00122a50: 6573 7320 7468 6520 656e 7469 7265 206d ess the entire m\n-00122a60: 6573 7361 6765 2e20 486f 7765 7665 722c essage. However,\n-00122a70: 2063 6f6d 7072 6573 7369 6f6e 2072 6571 compression req\n-00122a80: 7569 7265 7320 6275 6666 6572 696e 6720 uires buffering \n-00122a90: 746f 2064 6574 6572 6d69 6e65 2074 6865 to determine the\n-00122aa0: 2048 5454 5020 636f 6e74 656e 7420 6c65 HTTP content le\n-00122ab0: 6e67 7468 2068 6561 6465 722c 2077 6869 ngth header, whi\n-00122ac0: 6368 2063 616e 6365 6c73 2074 6865 2062 ch cancels the b\n-00122ad0: 656e 6566 6974 7320 6f66 2073 7472 6561 enefits of strea\n-00122ae0: 6d69 6e67 204d 494d 452e 2054 6f20 6176 ming MIME. To av\n-00122af0: 6f69 6420 7468 6973 2c20 796f 7520 7368 oid this, you sh\n-00122b00: 6f75 6c64 2075 7365 2063 6875 6e6b 6564 ould use chunked\n-00122b10: 2048 5454 5020 2877 6974 6820 7468 6520 HTTP (with the \n-00122b20: 6f75 7470 7574 2d6d 6f64 6520 3c63 6f64 output-mode #SOAP_IO_CHUNK\n-00122b40: 3c2f 636f 6465 3e20 666c 6167 2920 7769 flag) wi\n-00122b50: 7468 2063 6f6d 7072 6573 7369 6f6e 2061 th compression a\n-00122b60: 6e64 2073 7472 6561 6d69 6e67 204d 494d nd streaming MIM\n-00122b70: 452e 2041 7420 7468 6520 7365 7276 6572 E. At the server\n-00122b80: 2073 6964 652c 2077 6865 6e20 796f 7520 side, when you \n-00122b90: 7365 7420 3c63 6f64 653e 2353 4f41 505f set #SOAP_\n-00122ba0: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e20 IO_CHUNK \n-00122bb0: 6265 666f 7265 2063 616c 6c69 6e67 203c before calling <\n-00122bc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_serve, the e\n-00122c50: 6e67 696e 6520 7769 6c6c 2061 7574 6f6d ngine will autom\n-00122c60: 6174 6963 616c 6c79 2072 6576 6572 7420 atically revert \n-00122c70: 746f 2062 7566 6665 7269 6e67 2028 3c63 to buffering (#SOAP_IO_STO\n-00122c90: 5245 3c2f 636f 6465 3e20 666c 6167 2069 RE flag i\n-00122ca0: 7320 7365 7429 2e20 596f 7520 6361 6e20 s set). You can \n-00122cb0: 6368 6563 6b20 7468 6973 2066 6c61 6720 check this flag \n-00122cc0: 7769 7468 203c 636f 6465 3e28 736f 6170 with (soap\n-00122cd0: 2d26 6774 3b6f 6d6f 6465 2026 616d 703b ->omode &\n-00122ce0: 2053 4f41 505f 494f 2920 3d3d 2053 4f41 SOAP_IO) == SOA\n-00122cf0: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK to see if the \n-00122d10: 636c 6965 6e74 2061 6363 6570 7473 2063 client accepts c\n-00122d20: 6875 6e6b 696e 672e 204d 6f72 6520 696e hunking. More in\n-00122d30: 666f 726d 6174 696f 6e20 6162 6f75 7420 formation about \n-00122d40: 7374 7265 616d 696e 6720 6368 756e 6b65 streaming chunke\n-00122d50: 6420 4d49 4d45 2063 616e 2062 6520 666f d MIME can be fo\n-00122d60: 756e 6420 696e 2053 6563 7469 6f6e 203c und in Section <\n-00122d70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00122d80: 663d 2269 6e64 6578 2e68 746d 6c23 6d69 f=\"index.html#mi\n-00122d90: 6d65 6368 756e 6b69 6e67 223e 5374 7265 mechunking\">Stre\n-00122da0: 616d 696e 6720 6368 756e 6b65 6420 4d49 aming chunked MI\n-00122db0: 4d45 2f4d 544f 4d3c 2f61 3e20 2e2e 3c2f ME/MTOM ...

    Note that \n-00122dd0: 7468 6520 6578 616d 706c 6520 6162 6f76 the example abov\n-00122de0: 6520 666f 7220 3c63 6f64 653e 6d69 6d65 e for mime\n-00122df0: 5f72 6561 643c 2f63 6f64 653e 2075 7365 _read use\n-00122e00: 7320 6120 6861 6e64 6c65 2074 6861 7420 s a handle that \n-00122e10: 706f 696e 7473 2074 6f20 7468 6520 6f70 points to the op\n-00122e20: 656e 2066 696c 6520 3c63 6f64 653e 4649 en file FI\n-00122e30: 4c45 2a3c 2f63 6f64 653e 2e20 5468 6520 LE*. The \n-00122e40: 7369 6d70 6c65 2065 7861 6d70 6c65 2061 simple example a\n-00122e50: 626f 7665 2069 7320 6e6f 7420 7265 636f bove is not reco\n-00122e60: 6d6d 656e 6465 6420 7768 656e 2074 6865 mmended when the\n-00122e70: 2070 6c61 7466 6f72 6d20 696d 706f 7365 platform impose\n-00122e80: 7320 6120 6c69 6d69 7420 6f6e 2074 6865 s a limit on the\n-00122e90: 206e 756d 6265 7220 6f66 206f 7065 6e20 number of open \n-00122ea0: 6669 6c65 2064 6573 6372 6970 746f 7273 file descriptors\n-00122eb0: 2e20 596f 7520 6361 6e20 7573 6520 7468 . You can use th\n-00122ec0: 6520 6861 6e64 6c65 2074 6f20 7061 7373 e handle to pass\n-00122ed0: 2061 6c6f 6e67 206d 6f72 6520 696e 666f along more info\n-00122ee0: 726d 6174 696f 6e20 7468 616e 206a 7573 rmation than jus\n-00122ef0: 7420 7468 6520 6669 6c65 2064 6573 6372 t the file descr\n-00122f00: 6970 746f 722e 2053 6f20 666f 7220 6578 iptor. So for ex\n-00122f10: 616d 706c 652c 2077 6865 6e20 7468 6520 ample, when the \n-00122f20: 6e75 6d62 6572 206f 6620 6f70 656e 2066 number of open f\n-00122f30: 696c 6520 6465 7363 7269 7074 6f72 7320 ile descriptors \n-00122f40: 6973 206c 696d 6974 6564 206f 6e20 796f is limited on yo\n-00122f50: 7572 2070 6c61 7466 6f72 6d2c 2079 6f75 ur platform, you\n-00122f60: 2073 686f 756c 6420 6c65 7420 7468 6520 should let the \n-00122f70: 6861 6e64 6c65 2070 6f69 6e74 2074 6f20 handle point to \n-00122f80: 6120 7374 7275 6374 7572 6520 7769 7468 a structure with\n-00122f90: 2066 696c 652d 7265 6c61 7465 6420 696e file-related in\n-00122fa0: 666f 726d 6174 696f 6e2e 2054 6865 2043 formation. The C\n-00122fb0: 2b2b 2065 7861 6d70 6c65 2062 656c 6f77 ++ example below\n-00122fc0: 2069 6c6c 7573 7472 6174 6573 2074 6869 illustrates thi\n-00122fd0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    f\n-00123000: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include\n-00123010: 203d 2073 6f61 705f 6e65 775f 5f78 6f70 = soap_new__xop\n-00123020: 5f5f 496e 636c 7564 6528 3c61 2063 6c61 __Include(soap); .
    file.xop__I\n-00123080: 6e63 6c75 6465 2d26 6774 3b69 6420 3d20 nclude->id = \n-00123090: 4e55 4c4c 3b20 3c2f 6469 763e 0a3c 6469 NULL;
    .f\n-001230b0: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include\n-001230c0: 2d26 6774 3b74 7970 6520 3d20 7479 7065 ->type = type\n-001230d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    file.\n-001230f0: 786f 705f 5f49 6e63 6c75 6465 2d26 6774 xop__Include->\n-00123100: 3b6f 7074 696f 6e73 203d 204e 554c 4c3b ;options = NULL;\n+00121de0: 226c 696e 6522 3e20 203c 7370 616e 2063 \"line\"> size_t\n+00121e10: 206e 7772 6974 7465 6e3b 203c 2f64 6976 nwritten; .
    \n+00121e50: 7768 696c 653c 2f73 7061 6e3e 2028 6c65 while (le\n+00121e60: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {<\n+00121e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    nwri\n+00121ea0: 7474 656e 203d 2066 7772 6974 6528 3c61 tten = fwrite(buf, \n+00121f00: 312c 206c 656e 2c20 2846 494c 452a 2968 1, len, (FILE*)h\n+00121f10: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n+00121f20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00121f30: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+00121f50: 663c 2f73 7061 6e3e 2028 216e 7772 6974 f (!nwrit\n+00121f60: 7465 6e29 203c 2f64 6976 3e0a 3c64 6976 ten)
    . \n+00121f80: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00121fa0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e\n+00122020: 7272 6e75 6d3c 2f61 3e20 3d20 6572 726e rrnum = errn\n+00122030: 6f3b 203c 7370 616e 2063 6c61 7373 3d22 o; // get \n+00122050: 7265 6173 6f6e 203c 2f73 7061 6e3e 3c2f reason ..\n+00122120: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . \n+00122140: 2020 206c 656e 202d 3d20 6e77 7269 7474 len -= nwritt\n+00122150: 656e 3b20 3c2f 6469 763e 0a3c 6469 7620 en;
    .
    \n+00122170: 203c 6120 636c 6173 733d 2263 6f64 6522 buf += nwritten; <\n+001221d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } ..
    }
    \n+001222b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::fmim\n+00122370: 6577 7269 7465 636c 6f73 653c 2f61 3e3c ewriteclose<\n+00122380: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void(* \n+001223a0: 666d 696d 6577 7269 7465 636c 6f73 6529 fmimewriteclose)\n+001223b0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+001223c0: 6170 2c20 766f 6964 202a 6861 6e64 6c65 ap, void *handle\n+001223d0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n+001223f0: 636b 2074 6f20 636c 6f73 6520 6120 4d49 ck to close a MI\n+00122400: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n+00122410: 6e74 2073 7472 6561 6d20 6166 7465 7220 nt stream after \n+00122420: 7772 6974 696e 672e 3c2f 6469 763e 3c64 writing.
    Definition:<\n+00122450: 2f62 3e20 7374 6473 6f61 7032 2e68 3a35 /b> stdsoap2.h:5\n+00122460: 3032 303c 2f64 6976 3e3c 2f64 6976 3e0a 020
    .\n+00122470: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    <\n+00122540: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00122550: 6922 3e69 6e74 282a 2066 6d69 6d65 7772 i\">int(* fmimewr\n+00122560: 6974 6529 2873 7472 7563 7420 736f 6170 ite)(struct soap\n+00122570: 202a 736f 6170 2c20 766f 6964 202a 6861 *soap, void *ha\n+00122580: 6e64 6c65 2c20 636f 6e73 7420 6368 6172 ndle, const char\n+00122590: 202a 6275 662c 2073 697a 655f 7420 6c65 *buf, size_t le\n+001225a0: 6e29 3c2f 6469 763e 3c64 6976 2063 6c61 n)
    Callb\n+001225c0: 6163 6b20 746f 2077 7269 7465 2064 6174 ack to write dat\n+001225d0: 6120 696e 2061 204d 494d 4520 6174 7461 a in a MIME atta\n+001225e0: 6368 6d65 6e74 2073 7472 6561 6d2e 3c2f chment stream.
    Defini\n+00122610: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00122620: 7032 2e68 3a35 3030 393c 2f64 6976 3e3c p2.h:5009
    <\n+00122630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+00122810: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00122830: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00122840: 3a34 3939 383c 2f64 6976 3e3c 2f64 6976 :4998
    .
    <\n+001229d0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001229e0: 3c70 3e4d 6573 7361 6765 2063 6f6d 7072

    Message compr\n+001229f0: 6573 7369 6f6e 2077 6974 6820 3c63 6f64 ession with #SOAP_ENC_ZLIB\n+00122a10: 3c2f 636f 6465 3e20 6361 6e20 6265 2075 can be u\n+00122a20: 7365 6420 7769 7468 204d 494d 4520 746f sed with MIME to\n+00122a30: 2063 6f6d 7072 6573 7320 7468 6520 656e compress the en\n+00122a40: 7469 7265 206d 6573 7361 6765 2e20 486f tire message. Ho\n+00122a50: 7765 7665 722c 2063 6f6d 7072 6573 7369 wever, compressi\n+00122a60: 6f6e 2072 6571 7569 7265 7320 6275 6666 on requires buff\n+00122a70: 6572 696e 6720 746f 2064 6574 6572 6d69 ering to determi\n+00122a80: 6e65 2074 6865 2048 5454 5020 636f 6e74 ne the HTTP cont\n+00122a90: 656e 7420 6c65 6e67 7468 2068 6561 6465 ent length heade\n+00122aa0: 722c 2077 6869 6368 2063 616e 6365 6c73 r, which cancels\n+00122ab0: 2074 6865 2062 656e 6566 6974 7320 6f66 the benefits of\n+00122ac0: 2073 7472 6561 6d69 6e67 204d 494d 452e streaming MIME.\n+00122ad0: 2054 6f20 6176 6f69 6420 7468 6973 2c20 To avoid this, \n+00122ae0: 796f 7520 7368 6f75 6c64 2075 7365 2063 you should use c\n+00122af0: 6875 6e6b 6564 2048 5454 5020 2877 6974 hunked HTTP (wit\n+00122b00: 6820 7468 6520 6f75 7470 7574 2d6d 6f64 h the output-mod\n+00122b10: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO\n+00122b20: 5f43 4855 4e4b 3c2f 636f 6465 3e20 666c _CHUNK fl\n+00122b30: 6167 2920 7769 7468 2063 6f6d 7072 6573 ag) with compres\n+00122b40: 7369 6f6e 2061 6e64 2073 7472 6561 6d69 sion and streami\n+00122b50: 6e67 204d 494d 452e 2041 7420 7468 6520 ng MIME. At the \n+00122b60: 7365 7276 6572 2073 6964 652c 2077 6865 server side, whe\n+00122b70: 6e20 796f 7520 7365 7420 3c63 6f64 653e n you set \n+00122b80: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK before cal\n+00122ba0: 6c69 6e67 203c 636f 6465 3e3c 6120 636c ling soap_s\n+00122c20: 6572 7665 3c2f 613e 3c2f 636f 6465 3e2c erve,\n+00122c30: 2074 6865 2065 6e67 696e 6520 7769 6c6c the engine will\n+00122c40: 2061 7574 6f6d 6174 6963 616c 6c79 2072 automatically r\n+00122c50: 6576 6572 7420 746f 2062 7566 6665 7269 evert to bufferi\n+00122c60: 6e67 2028 3c63 6f64 653e 2353 4f41 505f ng (#SOAP_\n+00122c70: 494f 5f53 544f 5245 3c2f 636f 6465 3e20 IO_STORE \n+00122c80: 666c 6167 2069 7320 7365 7429 2e20 596f flag is set). Yo\n+00122c90: 7520 6361 6e20 6368 6563 6b20 7468 6973 u can check this\n+00122ca0: 2066 6c61 6720 7769 7468 203c 636f 6465 flag with (soap->omode\n+00122cc0: 2026 616d 703b 2053 4f41 505f 494f 2920 & SOAP_IO) \n+00122cd0: 3d3d 2053 4f41 505f 494f 5f43 4855 4e4b == SOAP_IO_CHUNK\n+00122ce0: 3c2f 636f 6465 3e20 746f 2073 6565 2069 to see i\n+00122cf0: 6620 7468 6520 636c 6965 6e74 2061 6363 f the client acc\n+00122d00: 6570 7473 2063 6875 6e6b 696e 672e 204d epts chunking. M\n+00122d10: 6f72 6520 696e 666f 726d 6174 696f 6e20 ore information \n+00122d20: 6162 6f75 7420 7374 7265 616d 696e 6720 about streaming \n+00122d30: 6368 756e 6b65 6420 4d49 4d45 2063 616e chunked MIME can\n+00122d40: 2062 6520 666f 756e 6420 696e 2053 6563 be found in Sec\n+00122d50: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Streaming chun\n+00122d90: 6b65 6420 4d49 4d45 2f4d 544f 4d3c 2f61 ked MIME/MTOM ..

    .

    Note\n+00122db0: 2074 6861 7420 7468 6520 6578 616d 706c that the exampl\n+00122dc0: 6520 6162 6f76 6520 666f 7220 3c63 6f64 e above for mime_read uses a handle\n+00122df0: 2074 6861 7420 706f 696e 7473 2074 6f20 that points to \n+00122e00: 7468 6520 6f70 656e 2066 696c 6520 3c63 the open file FILE*\n+00122e20: 2e20 5468 6520 7369 6d70 6c65 2065 7861 . The simple exa\n+00122e30: 6d70 6c65 2061 626f 7665 2069 7320 6e6f mple above is no\n+00122e40: 7420 7265 636f 6d6d 656e 6465 6420 7768 t recommended wh\n+00122e50: 656e 2074 6865 2070 6c61 7466 6f72 6d20 en the platform \n+00122e60: 696d 706f 7365 7320 6120 6c69 6d69 7420 imposes a limit \n+00122e70: 6f6e 2074 6865 206e 756d 6265 7220 6f66 on the number of\n+00122e80: 206f 7065 6e20 6669 6c65 2064 6573 6372 open file descr\n+00122e90: 6970 746f 7273 2e20 596f 7520 6361 6e20 iptors. You can \n+00122ea0: 7573 6520 7468 6520 6861 6e64 6c65 2074 use the handle t\n+00122eb0: 6f20 7061 7373 2061 6c6f 6e67 206d 6f72 o pass along mor\n+00122ec0: 6520 696e 666f 726d 6174 696f 6e20 7468 e information th\n+00122ed0: 616e 206a 7573 7420 7468 6520 6669 6c65 an just the file\n+00122ee0: 2064 6573 6372 6970 746f 722e 2053 6f20 descriptor. So \n+00122ef0: 666f 7220 6578 616d 706c 652c 2077 6865 for example, whe\n+00122f00: 6e20 7468 6520 6e75 6d62 6572 206f 6620 n the number of \n+00122f10: 6f70 656e 2066 696c 6520 6465 7363 7269 open file descri\n+00122f20: 7074 6f72 7320 6973 206c 696d 6974 6564 ptors is limited\n+00122f30: 206f 6e20 796f 7572 2070 6c61 7466 6f72 on your platfor\n+00122f40: 6d2c 2079 6f75 2073 686f 756c 6420 6c65 m, you should le\n+00122f50: 7420 7468 6520 6861 6e64 6c65 2070 6f69 t the handle poi\n+00122f60: 6e74 2074 6f20 6120 7374 7275 6374 7572 nt to a structur\n+00122f70: 6520 7769 7468 2066 696c 652d 7265 6c61 e with file-rela\n+00122f80: 7465 6420 696e 666f 726d 6174 696f 6e2e ted information.\n+00122f90: 2054 6865 2043 2b2b 2065 7861 6d70 6c65 The C++ example\n+00122fa0: 2062 656c 6f77 2069 6c6c 7573 7472 6174 below illustrat\n+00122fb0: 6573 2074 6869 733a 3c2f 703e 0a3c 6469 es this:

    .
    .
    file.\n+00123060: 786f 705f 5f49 6e63 6c75 6465 2d26 6774 xop__Include->\n+00123070: 3b69 6420 3d20 4e55 4c4c 3b20 3c2f 6469 ;id = NULL; .
    file.xop__I\n+001230a0: 6e63 6c75 6465 2d26 6774 3b74 7970 6520 nclude->type \n+001230b0: 3d20 7479 7065 3b20 3c2f 6469 763e 0a3c = type;
    .<\n+001230c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001230d0: 3e66 696c 652e 786f 705f 5f49 6e63 6c75 >file.xop__Inclu\n+001230e0: 6465 2d26 6774 3b6f 7074 696f 6e73 203d de->options =\n+001230f0: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
    .\n 00123110: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    file.xmime5_\n-00123150: 5f63 6f6e 7465 6e74 5479 7065 203d 2074 _contentType = t\n-00123160: 7970 653b 203c 2f64 6976 3e0a 3c64 6976 ype;
    .fi\n-00123180: 6c65 2e66 696c 656e 616d 6520 3d20 6669 le.filename = fi\n-00123190: 6c65 6e61 6d65 3b20 3c2f 6469 763e 0a3c lename;
    .<\n+00123120: 7373 3d22 6c69 6e65 223e 6669 6c65 2e78 ss=\"line\">file.x\n+00123130: 6d69 6d65 355f 5f63 6f6e 7465 6e74 5479 mime5__contentTy\n+00123140: 7065 203d 2074 7970 653b 203c 2f64 6976 pe = type; .
    file.filenam\n+00123170: 6520 3d20 6669 6c65 6e61 6d65 3b20 3c2f e = filename; .
    .<\n 001231a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001231b0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    // The object h\n-001231f0: 6f6c 6469 6e67 2061 6c6c 2069 6e66 6f72 olding all infor\n-00123200: 6d61 7469 6f6e 2074 6f20 7265 6164 2064 mation to read d\n-00123210: 6174 6120 3c2f 7370 616e 3e3c 2f64 6976 ata .
    FileStreamIn\n-00123240: 202a 696e 7320 3d20 3c73 7061 6e20 636c *ins = ne\n-00123260: 773c 2f73 7061 6e3e 2046 696c 6553 7472 w FileStr\n-00123270: 6561 6d49 6e28 6572 726f 7268 616e 646c eamIn(errorhandl\n-00123280: 6572 293b 203c 2f64 6976 3e0a 3c64 6976 er);
    .in\n-001232a0: 732d 2667 743b 7365 7446 696c 6550 6174 s->setFilePat\n-001232b0: 6828 3c61 2063 6c61 7373 3d22 636f 6465 h(path<\n-00123300: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    .i\n-00123320: 6e73 2d26 6774 3b73 6574 4669 6c65 4e61 ns->setFileNa\n-00123330: 6d65 2866 696c 656e 616d 6529 3b20 3c2f me(filename); // The ob\n+001231d0: 6a65 6374 2068 6f6c 6469 6e67 2061 6c6c ject holding all\n+001231e0: 2069 6e66 6f72 6d61 7469 6f6e 2074 6f20 information to \n+001231f0: 7265 6164 2064 6174 6120 3c2f 7370 616e read data
    .
    FileSt\n+00123220: 7265 616d 496e 202a 696e 7320 3d20 3c73 reamIn *ins = new F\n+00123250: 696c 6553 7472 6561 6d49 6e28 6572 726f ileStreamIn(erro\n+00123260: 7268 616e 646c 6572 293b 203c 2f64 6976 rhandler); .
    ins->setF\n+00123290: 696c 6550 6174 6828 3c61 2063 6c61 7373 ilePath(path); .
    ins->set\n+00123310: 4669 6c65 4e61 6d65 2866 696c 656e 616d FileName(filenam\n+00123320: 6529 3b20 3c2f 6469 763e 0a3c 6469 7620 e);
    .
    .
    .<\n-00123360: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00123370: 3e66 696c 652e 786f 705f 5f49 6e63 6c75 >file.xop__Inclu\n-00123380: 6465 2d26 6774 3b5f 5f73 697a 6520 3d20 de->__size = \n-00123390: 7369 7a65 3b20 3c2f 6469 763e 0a3c 6469 size;
    .f\n-001233b0: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include\n-001233c0: 2d26 6774 3b5f 5f70 7472 203d 2028 3c73 ->__ptr = (unsigned\n-001233f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char*)i\n-00123420: 6e73 3b3c 2f64 6976 3e0a 3c64 6976 2063 ns;
    .<\n-001235a0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001235b0: 3c70 3e54 6f20 7265 6164 2074 6865 204d

    To read the M\n-001235c0: 544f 4d20 6461 7461 2066 6f72 2074 7261 TOM data for tra\n-001235d0: 6e73 6d69 7373 696f 6e3a 3c2f 703e 0a3c nsmission:

    .<\n-001235e0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-001235f0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    .<\n+00123350: 226c 696e 6522 3e66 696c 652e 786f 705f \"line\">file.xop_\n+00123360: 5f49 6e63 6c75 6465 2d26 6774 3b5f 5f73 _Include->__s\n+00123370: 697a 6520 3d20 7369 7a65 3b20 3c2f 6469 ize = size; .
    file.xop__I\n+001233a0: 6e63 6c75 6465 2d26 6774 3b5f 5f70 7472 nclude->__ptr\n+001233b0: 203d 2028 3c73 7061 6e20 636c 6173 733d = (un\n+001233d0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char*)ins;
    .\n+00123410: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    char path[SOAP_\n+001234e0: 5441 474c 454e 5d3c 2f64 6976 3e3c 6469 TAGLEN]
    \n+00123500: 5468 6520 636c 6965 6e74 2072 6571 7565 The client reque\n+00123510: 7374 2070 6174 6820 6173 2072 6563 6569 st path as recei\n+00123520: 7665 6420 6f6e 2074 6865 2073 6572 7665 ved on the serve\n+00123530: 7220 7369 6465 2e3c 2f64 6976 3e3c 6469 r side.
    \n+00123550: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:40\n+00123570: 3332 3c2f 6469 763e 3c2f 6469 763e 0a3c 32
    .<\n+00123580: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    To read\n+001235a0: 2074 6865 204d 544f 4d20 6461 7461 2066 the MTOM data f\n+001235b0: 6f72 2074 7261 6e73 6d69 7373 696f 6e3a or transmission:\n+001235c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    void *mime_read_op\n+00123620: 656e 283c 7370 616e 2063 6c61 7373 3d22 en(struct<\n+00123640: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+00123670: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001236a0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, void *\n+001236d0: 6861 6e64 6c65 2c20 3c73 7061 6e20 636c handle, co\n+001236f0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+00123720: 202a 3c73 7061 6e20 636c 6173 733d 226b *id, con\n+00123760: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00123790: 2a74 7970 652c 203c 7370 616e 2063 6c61 *type, con\n+001237b0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001237e0: 2a64 6573 6372 6970 7469 6f6e 2920 3c2f *description) .
    {
    .<\n 00123810: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00123820: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if\n-00123860: 2028 2168 616e 646c 6529 203c 2f64 6976 (!handle) .
    return \n-001238b0: 4e55 4c4c 3b20 3c2f 6469 763e 0a3c 6469 NULL;
    . \n-001238d0: 2046 696c 6553 7472 6561 6d49 6e20 2a69 FileStreamIn *i\n-001238e0: 6e73 203d 2028 4669 6c65 5374 7265 616d ns = (FileStream\n-001238f0: 496e 2a29 6861 6e64 6c65 3b20 3c2f 6469 In*)handle; .
    if (!ins\n-00123940: 2d26 6774 3b6f 7065 6e28 2929 203c 2f64 ->open()) .
    {
    .\n-00123970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa\n-001239b0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error = <\n-00123a10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00123a20: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00123a30: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-00123a40: 6131 3237 3337 3536 3834 3161 3732 3866 a1273756841a728f\n-00123a50: 3033 3765 6535 3332 3865 3231 3765 6236 037ee5328e217eb6\n-00123a60: 6522 3e53 4f41 505f 4552 523c 2f61 3e3b e\">SOAP_ERR;\n-00123a70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return NULL; .
    }
    .\n-00123ae0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-00123b10: 7475 726e 3c2f 7370 616e 3e20 6861 6e64 turn hand\n-00123b20: 6c65 3b20 3c2f 6469 763e 0a3c 6469 7620 le;
    .
    } <\n-00123b40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    {.
    if (!ha\n-00123ca0: 6e64 6c65 2920 3c2f 6469 763e 0a3c 6469 ndle)
    . \n-00123cc0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n-00123ce0: 7572 6e3c 2f73 7061 6e3e 3b20 3c2f 6469 urn; .
    FileStrea\n-00123d10: 6d49 6e20 2a69 6e73 203d 2028 4669 6c65 mIn *ins = (File\n-00123d20: 5374 7265 616d 496e 2a29 6861 6e64 6c65 StreamIn*)handle\n-00123d30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    delete\n-00123d70: 2069 6e73 3b20 3c2f 6469 763e 0a3c 6469 ins;
    .}\n-00123d90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    size_t mime_read(struct \n-00123e00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00123e30: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00123e60: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void\n-00123e80: 3c2f 7370 616e 3e20 2a68 616e 646c 652c *handle,\n-00123e90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00123eb0: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *buf, size_t len)
    . if<\n+00123840: 2f73 7061 6e3e 2028 2168 616e 646c 6529 /span> (!handle)\n+00123850: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return NULL; .
    FileStrea\n+001238c0: 6d49 6e20 2a69 6e73 203d 2028 4669 6c65 mIn *ins = (File\n+001238d0: 5374 7265 616d 496e 2a29 6861 6e64 6c65 StreamIn*)handle\n+001238e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n+00123920: 2028 2169 6e73 2d26 6774 3b6f 7065 6e28 (!ins->open(\n+00123930: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {<\n+00123950: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->\n+001239a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error = SOAP_ER\n+00123a50: 523c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 R;
    .\n+00123a70: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n+00123a90: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL\n+00123aa0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } <\n+00123ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return handle;
    \n+00123b10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .void mime_read_cl\n+00123b70: 6f73 6528 3c73 7061 6e20 636c 6173 733d ose(struct\n+00123b90: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+00123bc0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00123bf0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, void \n+00123c20: 2a68 616e 646c 6529 203c 2f64 6976 3e0a *handle)
    .\n+00123c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (!handle) .
    return\n+00123cd0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    Fil\n+00123cf0: 6553 7472 6561 6d49 6e20 2a69 6e73 203d eStreamIn *ins =\n+00123d00: 2028 4669 6c65 5374 7265 616d 496e 2a29 (FileStreamIn*)\n+00123d10: 6861 6e64 6c65 3b20 3c2f 6469 763e 0a3c handle;
    .<\n+00123d20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123d30: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > delete<\n+00123d50: 2f73 7061 6e3e 2069 6e73 3b20 3c2f 6469 /span> ins; .
    }
    .\n+00123d90: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+00123db0: 3c2f 7370 616e 3e20 6d69 6d65 5f72 6561 mime_rea\n+00123dc0: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa\n+00123e10: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00123e40: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, void *h\n+00123e70: 616e 646c 652c 203c 7370 616e 2063 6c61 andle, char *buf, \n+00123ef0: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+00123f10: 3c2f 7370 616e 3e20 6c65 6e29 203c 2f64 len) .
    {
    .\n-00123f50: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n-00123f90: 2821 6861 6e64 6c65 2920 3c2f 6469 763e (!handle)
    \n-00123fa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return 0\n-00123fe0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    Fil\n-00124000: 6553 7472 6561 6d49 6e20 2a69 6e73 203d eStreamIn *ins =\n-00124010: 2028 4669 6c65 5374 7265 616d 496e 2a29 (FileStreamIn*)\n-00124020: 6861 6e64 6c65 3b20 3c2f 6469 763e 0a3c handle;
    .<\n-00124030: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00124040: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz\n-00124060: 655f 743c 2f73 7061 6e3e 206e 7265 6164 e_t nread\n-00124070: 203d 2069 6e73 2d26 6774 3b72 6561 6428 = ins->read(\n-00124080: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf\n-001240d0: 2c20 6c65 6e29 3b20 3c2f 6469 763e 0a3c , len);
    .<\n-001240e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001240f0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-00124110: 2f73 7061 6e3e 2028 696e 732d 2667 743b /span> (ins->\n-00124120: 7374 7265 616d 4572 726f 7228 2929 203c streamError()) <\n-00124130: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    s\n-00124190: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error =\n-001241f0: 2069 6e73 2d26 6774 3b73 7472 6561 6d45 ins->streamE\n-00124200: 7272 6f72 2829 3b20 3c2f 6469 763e 0a3c rror();
    .<\n-00124210: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00124220: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-00124240: 6574 7572 6e3c 2f73 7061 6e3e 2030 3b20 eturn 0; \n-00124250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    return \n-001242b0: 6e72 6561 643b 203c 2f64 6976 3e0a 3c64 nread;
    .\n-001242d0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    \n-00124340: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_ERR<\n-00124390: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    #de\n-001243b0: 6669 6e65 2053 4f41 505f 4552 523c 2f64 fine SOAP_ERR
    A soap_sta\n-001243e0: 7475 7320 6572 726f 7220 636f 6465 3a20 tus error code: \n-001243f0: 616e 2075 6e73 7065 6369 6669 6564 2065 an unspecified e\n-00124400: 7272 6f72 206f 6363 7572 7265 642e 3c2f rror occurred.
    Defini\n-00124430: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-00124440: 7032 2e68 3a32 3337 343c 2f64 6976 3e3c p2.h:2374
    <\n-00124450: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-00124470: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n-00124490: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    \n-001244d0: 3c2f 613e 0a52 6564 6972 6563 7469 6e67 .Redirecting\n-001244e0: 2069 6e62 6f75 6e64 204d 494d 452f 4d54 inbound MIME/MT\n-001244f0: 4f4d 2073 7472 6561 6d73 2062 6173 6564 OM streams based\n-00124500: 206f 6e20 534f 4150 2062 6f64 7920 636f on SOAP body co\n-00124510: 6e74 656e 743c 2f68 323e 0a3c 703e 5768 ntent

    .

    Wh\n-00124520: 656e 2069 7420 6973 2070 7265 6665 7261 en it is prefera\n-00124530: 626c 6520 6f72 2072 6571 7569 7265 6420 ble or required \n-00124540: 746f 2072 6564 6972 6563 7420 696e 626f to redirect inbo\n-00124550: 756e 6420 4d49 4d45 2f4d 544f 4d20 6174 und MIME/MTOM at\n-00124560: 7461 6368 6d65 6e74 2073 7472 6561 6d73 tachment streams\n-00124570: 2062 6173 6564 206f 6e20 534f 4150 206d based on SOAP m\n-00124580: 6573 7361 6765 2062 6f64 7920 636f 6e74 essage body cont\n-00124590: 656e 742c 2077 6865 7265 2066 6f72 2065 ent, where for e\n-001245a0: 7861 6d70 6c65 2074 6865 206e 616d 6573 xample the names\n-001245b0: 206f 6620 7468 6520 7265 736f 7572 6365 of the resource\n-001245c0: 7320 6172 6520 6c69 7374 6564 2069 6e20 s are listed in \n-001245d0: 7468 6520 534f 4150 206d 6573 7361 6765 the SOAP message\n-001245e0: 2062 6f64 792c 2061 6e20 616c 7465 726e body, an altern\n-001245f0: 6174 6976 6520 6d65 6368 616e 6973 6d20 ative mechanism \n-00124600: 6d75 7374 2062 6520 7573 6564 2074 6f20 must be used to \n-00124610: 6861 6e64 6c65 2074 6865 2061 7474 6163 handle the attac\n-00124620: 686d 656e 7473 2e20 5468 6973 206d 6563 hments. This mec\n-00124630: 6861 6e69 736d 2063 616e 2062 6520 7573 hanism can be us\n-00124640: 6564 2061 7420 7468 6520 636c 6965 6e74 ed at the client\n-00124650: 2061 6e64 2073 6572 7665 7220 7369 6465 and server side\n-00124660: 2e3c 2f70 3e0a 3c70 3e42 6563 6175 7365 .

    .

    Because\n-00124670: 2074 6865 2072 6f75 7469 6e67 206f 6620 the routing of \n-00124680: 7468 6520 7374 7265 616d 7320 6973 2061 the streams is a\n-00124690: 6363 6f6d 706c 6973 6865 6420 7769 7468 ccomplished with\n-001246a0: 2065 7870 6c69 6369 7420 6675 6e63 7469 explicit functi\n-001246b0: 6f6e 2063 616c 6c73 2c20 7468 6973 206d on calls, this m\n-001246c0: 6574 686f 6420 7368 6f75 6c64 206f 6e6c ethod should onl\n-001246d0: 7920 6265 2075 7365 6420 7768 656e 2072 y be used when r\n-001246e0: 6571 7569 7265 6420 616e 6420 7368 6f75 equired and shou\n-001246f0: 6c64 206e 6f74 2062 6520 636f 6e73 6964 ld not be consid\n-00124700: 6572 6564 206f 7074 696f 6e61 6c2e 2054 ered optional. T\n-00124710: 6861 7420 6973 2c20 7768 656e 2079 6f75 hat is, when you\n-00124720: 2065 6e61 626c 6520 7468 6973 206d 6574 enable this met\n-00124730: 686f 642c 2079 6f75 206d 7573 7420 6368 hod, you must ch\n-00124740: 6563 6b20 666f 7220 7065 6e64 696e 6720 eck for pending \n-00124750: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n-00124760: 6d65 6e74 7320 616e 6420 6861 6e64 6c65 ments and handle\n-00124770: 2074 6865 6d20 6170 7072 6f70 7269 6174 them appropriat\n-00124780: 656c 792e 2054 6869 7320 6973 2074 7275 ely. This is tru\n-00124790: 6520 6576 656e 2077 6865 6e20 796f 7520 e even when you \n-001247a0: 646f 6e27 7420 6578 7065 6374 204d 494d don't expect MIM\n-001247b0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n-001247c0: 7473 2069 6e20 7468 6520 7061 796c 6f61 ts in the payloa\n-001247d0: 642c 2062 6563 6175 7365 2074 6865 2070 d, because the p\n-001247e0: 6565 7220 6d61 7920 7472 6963 6b20 796f eer may trick yo\n-001247f0: 7520 6279 2073 656e 6469 6e67 2061 7474 u by sending att\n-00124800: 6163 686d 656e 7473 2061 6e79 7761 7920 achments anyway \n-00124810: 616e 6420 796f 7520 7368 6f75 6c64 2062 and you should b\n-00124820: 6520 7072 6570 6172 6564 2074 6f20 6163 e prepared to ac\n-00124830: 6365 7074 206f 7220 7265 6a65 6374 2074 cept or reject t\n-00124840: 6865 6d2e 3c2f 703e 0a3c 703e 5468 6520 hem.

    .

    The \n-00124850: 6578 706c 6963 6974 204d 494d 452f 4d54 explicit MIME/MT\n-00124860: 4f4d 2073 7472 6561 6d69 6e67 206d 6563 OM streaming mec\n-00124870: 6861 6e69 736d 2063 6f6e 7369 7374 7320 hanism consists \n-00124880: 6f66 2074 6872 6565 2041 5049 2066 756e of three API fun\n-00124890: 6374 696f 6e73 3a3c 2f70 3e0a 3c75 6c3e ctions:

    .
      \n-001248a0: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
    • void \n-001248b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_po\n-00124940: 7374 5f63 6865 636b 5f6d 696d 655f 6174 st_check_mime_at\n-00124950: 7461 6368 6d65 6e74 7328 7374 7275 6374 tachments(struct\n-00124960: 2073 6f61 7020 2a73 6f61 7029 3c2f 613e soap *soap)\n-00124970: 3c2f 636f 6465 3e20 5468 6973 2066 756e This fun\n-00124980: 6374 696f 6e20 656e 6162 6c65 7320 706f ction enables po\n-00124990: 7374 2d70 726f 6365 7373 696e 6720 6f66 st-processing of\n-001249a0: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n-001249b0: 686d 656e 7473 2072 6563 6569 7665 642e hments received.\n-001249c0: 2054 6869 7320 6d65 616e 7320 7468 6174 This means that\n-001249d0: 2074 6865 2070 7265 7365 6e63 6520 6f66 the presence of\n-001249e0: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n-001249f0: 686d 656e 7473 206d 7573 7420 6265 2065 hments must be e\n-00124a00: 7870 6c69 6369 746c 7920 6368 6563 6b65 xplicitly checke\n-00124a10: 6420 6279 2063 616c 6c69 6e67 203c 636f d by calling soa\n-00124aa0: 705f 6368 6563 6b5f 6d69 6d65 5f61 7474 p_check_mime_att\n-00124ab0: 6163 686d 656e 7473 3c2f 613e 3c2f 636f achments after the me\n-00124ad0: 7373 6167 6520 7761 7320 7265 6365 6976 ssage was receiv\n-00124ae0: 6564 2e20 5768 656e 2074 6869 7320 6675 ed. When this fu\n-00124af0: 6e63 7469 6f6e 2072 6574 7572 6e73 206e nction returns n\n-00124b00: 6f6e 7a65 726f 2028 7472 7565 292c 2074 onzero (true), t\n-00124b10: 6865 6e20 7468 6520 6174 7461 6368 6d65 hen the attachme\n-00124b20: 6e74 7320 6361 6e20 6265 2072 6574 7269 nts can be retri\n-00124b30: 6576 6564 2062 7920 6361 6c6c 696e 6720 eved by calling \n-00124b40: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_r\n-00124bc0: 6563 765f 6d69 6d65 5f61 7474 6163 686d ecv_mime_attachm\n-00124bd0: 656e 743c 2f61 3e3c 2f63 6f64 653e 2072 ent r\n-00124be0: 6570 6561 7465 646c 7920 746f 2072 6574 epeatedly to ret\n-00124bf0: 7269 6576 6520 6561 6368 2061 7474 6163 rieve each attac\n-00124c00: 686d 656e 7420 756e 7469 6c20 7468 6973 hment until this\n-00124c10: 2066 756e 6374 696f 6e20 7265 7475 726e function return\n-00124c20: 7320 4e55 4c4c 2e20 5468 6973 2066 756e s NULL. This fun\n-00124c30: 6374 696f 6e20 7265 7475 726e 7320 6120 ction returns a \n-00124c40: 706f 696e 7465 7220 746f 2061 203c 636f pointer to a struct soap_mu\n-00124cd0: 6c74 6970 6172 743c 2f61 3e3c 2f63 6f64 ltipart attachment..
    • in\n-00124d00: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t soap\n-00124d80: 5f63 6865 636b 5f6d 696d 655f 6174 7461 _check_mime_atta\n-00124d90: 6368 6d65 6e74 7328 7374 7275 6374 2073 chments(struct s\n-00124da0: 6f61 7020 2a73 6f61 7029 3c2f 613e 3c2f oap *soap) This funct\n-00124dc0: 696f 6e20 6368 6563 6b73 2074 6865 2070 ion checks the p\n-00124dd0: 7265 7365 6e63 6520 6f66 2061 204d 494d resence of a MIM\n-00124de0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n-00124df0: 7420 6166 7465 7220 6361 6c6c 696e 6720 t after calling \n-00124e00: 6120 7365 7276 6963 6520 6f70 6572 6174 a service operat\n-00124e10: 696f 6e20 6279 2072 6574 7572 6e69 6e67 ion by returning\n-00124e20: 206e 6f6e 7a65 726f 2077 6865 6e20 6174 nonzero when at\n-00124e30: 7461 6368 6d65 6e74 7320 6172 6520 7072 tachments are pr\n-00124e40: 6573 656e 742e 2052 6574 7572 6e73 206e esent. Returns n\n-00124e50: 6f6e 7a65 726f 2069 6620 6174 7461 6368 onzero if attach\n-00124e60: 6d65 6e74 7320 6172 6520 7072 6573 656e ments are presen\n-00124e70: 742e 2052 6571 7569 7265 7320 3c63 6f64 t. Requires soap_\n-00124f10: 706f 7374 5f63 6865 636b 5f6d 696d 655f post_check_mime_\n-00124f20: 6174 7461 6368 6d65 6e74 733c 2f61 3e3c attachments<\n-00124f30: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>.
    • .struct soa\n-00124fc0: 705f 6d75 6c74 6970 6172 743c 2f61 3e20 p_multipart \n-00124fd0: 2a73 6f61 705f 7265 6376 5f6d 696d 655f *soap_recv_mime_\n-00124fe0: 6174 7461 6368 6d65 6e74 2873 7472 7563 attachment(struc\n-00124ff0: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n-00125000: 6964 202a 6861 6e64 6c65 293c 2f63 6f64 id *handle) This function\n-00125020: 2070 6172 7365 7320 616e 2061 7474 6163 parses an attac\n-00125030: 686d 656e 7420 616e 6420 696e 766f 6b65 hment and invoke\n-00125040: 7320 7468 6520 4d49 4d45 2063 616c 6c62 s the MIME callb\n-00125050: 6163 6b73 2077 6865 6e20 7365 742e 2054 acks when set. T\n-00125060: 6865 203c 636f 6465 3e68 616e 646c 653c he handle<\n-00125070: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n-00125080: 2069 7320 7061 7373 6564 2074 6f20 3c63 is passed to fmimewriteop\n-001250a0: 656e 3c2f 636f 6465 3e2e 2054 6865 2068 en. The h\n-001250b0: 616e 646c 6520 6d61 7920 636f 6e74 6169 andle may contai\n-001250c0: 6e20 616e 7920 6461 7461 2074 6861 7420 n any data that \n-001250d0: 6973 2065 7874 7261 6374 6564 2066 726f is extracted fro\n-001250e0: 6d20 7468 6520 534f 4150 206d 6573 7361 m the SOAP messa\n-001250f0: 6765 2062 6f64 7920 746f 2067 7569 6465 ge body to guide\n-00125100: 2074 6865 2072 6564 6972 6563 7469 6f6e the redirection\n-00125110: 206f 6620 7468 6520 7374 7265 616d 2069 of the stream i\n-00125120: 6e20 7468 6520 6361 6c6c 6261 636b 732e n the callbacks.\n-00125130: 2052 6574 7572 6e73 2061 2073 7472 7563 Returns a struc\n-00125140: 7420 7769 7468 2061 203c 636f 6465 3e63 t with a c\n-00125150: 6861 7220 2a70 7472 3c2f 636f 6465 3e20 har *ptr \n-00125160: 6d65 6d62 6572 2074 6861 7420 636f 6e74 member that cont\n-00125170: 6169 6e73 2074 6865 2068 616e 646c 6520 ains the handle \n-00125180: 7661 6c75 6520 7265 7475 726e 6564 2062 value returned b\n-00125190: 7920 7468 6520 3c63 6f64 653e 666d 696d y the fmim\n-001251a0: 6577 7269 7465 6f70 656e 3c2f 636f 6465 ewriteopen callback, and \n-001251c0: 3c63 6f64 653e 6368 6172 202a 6964 3c2f char *id, cha\n-001251e0: 7220 2a74 7970 653c 2f63 6f64 653e 2c20 r *type, \n-001251f0: 616e 6420 3c63 6f64 653e 6368 6172 202a and char *\n-00125200: 6465 7363 7269 7074 696f 6e3c 2f63 6f64 description member variab\n-00125220: 6c65 7320 7769 7468 2074 6865 204d 494d les with the MIM\n-00125230: 4520 6964 2c20 7479 7065 2c20 616e 6420 E id, type, and \n-00125240: 6465 7363 7269 7074 696f 6e20 696e 666f description info\n-00125250: 2077 6865 6e20 7072 6573 656e 7420 696e when present in\n-00125260: 2074 6865 2061 7474 6163 686d 656e 742e the attachment.\n-00125270: 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 3e45 .
    .

    E\n-00125280: 7861 6d70 6c65 2063 6c69 656e 7420 696e xample client in\n-00125290: 2043 3a3c 2f70 3e0a 3c64 6976 2063 6c61 C:

    ..
    soap\n-00125480: 5f70 6f73 745f 6368 6563 6b5f 6d69 6d65 _post_check_mime\n-00125490: 5f61 7474 6163 686d 656e 7473 3c2f 613e _attachments\n-001254a0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001254d0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if \n-00125510: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f6d (soap_call_ns__m\n-00125520: 794d 6574 686f 6428 3c61 2063 6c61 7373 yMethod(s\n-00125550: 6f61 703c 2f61 3e2c 202e 2e2e 2929 203c oap, ...)) <\n+00123f50: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!handle) \n+00123f80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return 0;
    .<\n+00123fd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123fe0: 3e20 2046 696c 6553 7472 6561 6d49 6e20 > FileStreamIn \n+00123ff0: 2a69 6e73 203d 2028 4669 6c65 5374 7265 *ins = (FileStre\n+00124000: 616d 496e 2a29 6861 6e64 6c65 3b20 3c2f amIn*)handle; .
    size_t\n+00124050: 206e 7265 6164 203d 2069 6e73 2d26 6774 nread = ins->\n+00124060: 3b72 6561 6428 3c61 2063 6c61 7373 3d22 ;read(b\n+001240b0: 7566 3c2f 613e 2c20 6c65 6e29 3b20 3c2f uf, len); .
    if (in\n+00124100: 732d 2667 743b 7374 7265 616d 4572 726f s->streamErro\n+00124110: 7228 2929 203c 2f64 6976 3e0a 3c64 6976 r())
    . \n+00124130: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap-&g\n+00124180: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error\n+001241d0: 3c2f 613e 203d 2069 6e73 2d26 6774 3b73 = ins->s\n+001241e0: 7472 6561 6d45 7272 6f72 2829 3b20 3c2f treamError(); .
    return 0;
    . \n+00124250: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    return nread; .
    }
    .<\n+00124380: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00124390: 6922 3e23 6465 6669 6e65 2053 4f41 505f i\">#define SOAP_\n+001243a0: 4552 523c 2f64 6976 3e3c 6469 7620 636c ERR
    A so\n+001243c0: 6170 5f73 7461 7475 7320 6572 726f 7220 ap_status error \n+001243d0: 636f 6465 3a20 616e 2075 6e73 7065 6369 code: an unspeci\n+001243e0: 6669 6564 2065 7272 6f72 206f 6363 7572 fied error occur\n+001243f0: 7265 642e 3c2f 6469 763e 3c64 6976 2063 red.
    \n+00124410: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00124420: 7374 6473 6f61 7032 2e68 3a32 3337 343c stdsoap2.h:2374<\n+00124430: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    .... Back to t\n+00124470: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n+00124480: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .Redir\n+001244c0: 6563 7469 6e67 2069 6e62 6f75 6e64 204d ecting inbound M\n+001244d0: 494d 452f 4d54 4f4d 2073 7472 6561 6d73 IME/MTOM streams\n+001244e0: 2062 6173 6564 206f 6e20 534f 4150 2062 based on SOAP b\n+001244f0: 6f64 7920 636f 6e74 656e 743c 2f68 323e ody content

    \n+00124500: 0a3c 703e 5768 656e 2069 7420 6973 2070 .

    When it is p\n+00124510: 7265 6665 7261 626c 6520 6f72 2072 6571 referable or req\n+00124520: 7569 7265 6420 746f 2072 6564 6972 6563 uired to redirec\n+00124530: 7420 696e 626f 756e 6420 4d49 4d45 2f4d t inbound MIME/M\n+00124540: 544f 4d20 6174 7461 6368 6d65 6e74 2073 TOM attachment s\n+00124550: 7472 6561 6d73 2062 6173 6564 206f 6e20 treams based on \n+00124560: 534f 4150 206d 6573 7361 6765 2062 6f64 SOAP message bod\n+00124570: 7920 636f 6e74 656e 742c 2077 6865 7265 y content, where\n+00124580: 2066 6f72 2065 7861 6d70 6c65 2074 6865 for example the\n+00124590: 206e 616d 6573 206f 6620 7468 6520 7265 names of the re\n+001245a0: 736f 7572 6365 7320 6172 6520 6c69 7374 sources are list\n+001245b0: 6564 2069 6e20 7468 6520 534f 4150 206d ed in the SOAP m\n+001245c0: 6573 7361 6765 2062 6f64 792c 2061 6e20 essage body, an \n+001245d0: 616c 7465 726e 6174 6976 6520 6d65 6368 alternative mech\n+001245e0: 616e 6973 6d20 6d75 7374 2062 6520 7573 anism must be us\n+001245f0: 6564 2074 6f20 6861 6e64 6c65 2074 6865 ed to handle the\n+00124600: 2061 7474 6163 686d 656e 7473 2e20 5468 attachments. Th\n+00124610: 6973 206d 6563 6861 6e69 736d 2063 616e is mechanism can\n+00124620: 2062 6520 7573 6564 2061 7420 7468 6520 be used at the \n+00124630: 636c 6965 6e74 2061 6e64 2073 6572 7665 client and serve\n+00124640: 7220 7369 6465 2e3c 2f70 3e0a 3c70 3e42 r side.

    .

    B\n+00124650: 6563 6175 7365 2074 6865 2072 6f75 7469 ecause the routi\n+00124660: 6e67 206f 6620 7468 6520 7374 7265 616d ng of the stream\n+00124670: 7320 6973 2061 6363 6f6d 706c 6973 6865 s is accomplishe\n+00124680: 6420 7769 7468 2065 7870 6c69 6369 7420 d with explicit \n+00124690: 6675 6e63 7469 6f6e 2063 616c 6c73 2c20 function calls, \n+001246a0: 7468 6973 206d 6574 686f 6420 7368 6f75 this method shou\n+001246b0: 6c64 206f 6e6c 7920 6265 2075 7365 6420 ld only be used \n+001246c0: 7768 656e 2072 6571 7569 7265 6420 616e when required an\n+001246d0: 6420 7368 6f75 6c64 206e 6f74 2062 6520 d should not be \n+001246e0: 636f 6e73 6964 6572 6564 206f 7074 696f considered optio\n+001246f0: 6e61 6c2e 2054 6861 7420 6973 2c20 7768 nal. That is, wh\n+00124700: 656e 2079 6f75 2065 6e61 626c 6520 7468 en you enable th\n+00124710: 6973 206d 6574 686f 642c 2079 6f75 206d is method, you m\n+00124720: 7573 7420 6368 6563 6b20 666f 7220 7065 ust check for pe\n+00124730: 6e64 696e 6720 4d49 4d45 2f4d 544f 4d20 nding MIME/MTOM \n+00124740: 6174 7461 6368 6d65 6e74 7320 616e 6420 attachments and \n+00124750: 6861 6e64 6c65 2074 6865 6d20 6170 7072 handle them appr\n+00124760: 6f70 7269 6174 656c 792e 2054 6869 7320 opriately. This \n+00124770: 6973 2074 7275 6520 6576 656e 2077 6865 is true even whe\n+00124780: 6e20 796f 7520 646f 6e27 7420 6578 7065 n you don't expe\n+00124790: 6374 204d 494d 452f 4d54 4f4d 2061 7474 ct MIME/MTOM att\n+001247a0: 6163 686d 656e 7473 2069 6e20 7468 6520 achments in the \n+001247b0: 7061 796c 6f61 642c 2062 6563 6175 7365 payload, because\n+001247c0: 2074 6865 2070 6565 7220 6d61 7920 7472 the peer may tr\n+001247d0: 6963 6b20 796f 7520 6279 2073 656e 6469 ick you by sendi\n+001247e0: 6e67 2061 7474 6163 686d 656e 7473 2061 ng attachments a\n+001247f0: 6e79 7761 7920 616e 6420 796f 7520 7368 nyway and you sh\n+00124800: 6f75 6c64 2062 6520 7072 6570 6172 6564 ould be prepared\n+00124810: 2074 6f20 6163 6365 7074 206f 7220 7265 to accept or re\n+00124820: 6a65 6374 2074 6865 6d2e 3c2f 703e 0a3c ject them.

    .<\n+00124830: 703e 5468 6520 6578 706c 6963 6974 204d p>The explicit M\n+00124840: 494d 452f 4d54 4f4d 2073 7472 6561 6d69 IME/MTOM streami\n+00124850: 6e67 206d 6563 6861 6e69 736d 2063 6f6e ng mechanism con\n+00124860: 7369 7374 7320 6f66 2074 6872 6565 2041 sists of three A\n+00124870: 5049 2066 756e 6374 696f 6e73 3a3c 2f70 PI functions:.
    .\n+001254c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (soap_call\n+00125500: 5f6e 735f 5f6d 794d 6574 686f 6428 3c61 _ns__myMethod(soap, .\n+00125540: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    .{<\n 00125560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-00125580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_prin\n-001255f0: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std\n-00125630: 6572 7229 3b20 3c73 7061 6e20 636c 6173 err); // a\n-00125650: 6e20 6572 726f 7220 6f63 6375 7272 6564 n error occurred\n-00125660: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00125570: 3d22 6c69 6e65 223e 2020 3c61 2063 6c61 =\"line\"> soa\n+001255d0: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(soap, stderr); // an error oc\n+00125640: 6375 7272 6564 203c 2f73 7061 6e3e 3c2f curred
    .
    }
    .<\n 00125670: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00125680: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    else\n-001256c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n-00125710: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soa\n-00125770: 705f 6368 6563 6b5f 6d69 6d65 5f61 7474 p_check_mime_att\n-00125780: 6163 686d 656e 7473 3c2f 613e 283c 6120 achments(soap)).
    {
    \n-001257e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n-00125810: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are \n-00125820: 7072 6573 656e 742c 2063 6861 6e6e 656c present, channel\n-00125830: 2069 7320 7374 696c 6c20 6f70 656e 203c is still open <\n-00125840: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00125860: 2020 203c 7370 616e 2063 6c61 7373 3d22 do<\n-00125880: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001258a0: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n-001258c0: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n-001258e0: 6765 7420 6461 7461 2026 2333 393b 6861 get data 'ha\n-001258f0: 6e64 6c65 2623 3339 3b20 6672 6f6d 2053 ndle' from S\n-00125900: 4f41 5020 7265 7370 6f6e 7365 2061 6e64 OAP response and\n-00125910: 2070 6173 7320 746f 2063 616c 6c62 6163 pass to callbac\n-00125920: 6b73 203c 2f73 7061 6e3e 3c2f 6469 763e ks
    \n-00125930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // set the fm\n-00125970: 696d 6520 6361 6c6c 6261 636b 732c 2069 ime callbacks, i\n-00125980: 6620 6e65 6564 6564 203c 2f73 7061 6e3e f needed \n-00125990: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001259b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001259c0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap_multip\n-00125a10: 6172 743c 2f61 3e20 2a63 6f6e 7465 6e74 art *content\n-00125a20: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_recv_m\n-00125a80: 696d 655f 6174 7461 6368 6d65 6e74 3c2f ime_attachment(soap, (v\n-00125ae0: 6f69 643c 2f73 7061 6e3e 2a29 6861 6e64 oid*)hand\n-00125af0: 6c65 293b 203c 2f64 6976 3e0a 3c64 6976 le);
    . \n-00125b10: 2020 2020 7072 696e 7466 283c 7370 616e printf("Rec\n-00125b40: 6569 7665 6420 6174 7461 6368 6d65 6e74 eived attachment\n-00125b50: 2077 6974 6820 6964 3d25 7320 616e 6420 with id=%s and \n-00125b60: 7479 7065 3d25 735c 6e26 7175 6f74 3b3c type=%s\\n"<\n-00125b70: 2f73 7061 6e3e 2c20 636f 6e74 656e 742d /span>, content-\n-00125b80: 2667 743b 3c61 2063 6c61 7373 3d22 636f >id?c\n-00125be0: 6f6e 7465 6e74 2d26 6774 3b3c 6120 636c ontent->i\n-00125c40: 643c 2f61 3e3a 3c73 7061 6e20 636c 6173 d:"", content-&\n-00125c80: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;type?\n-00125ce0: 636f 6e74 656e 742d 2667 743b 3c61 2063 content->\n-00125d40: 7479 7065 3c2f 613e 3a3c 7370 616e 2063 type:""\n-00125d70: 3b3c 2f73 7061 6e3e 293b 203c 2f64 6976 ;); .
    } while\n-00125dc0: 2028 636f 6e74 656e 7429 3b20 3c2f 6469 (content); .
    if (soap-&g\n-00125e40: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error\n-00125e90: 3c2f 613e 2920 3c2f 6469 763e 0a3c 6469 )
    . \n-00125eb0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri\n-00125f10: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st\n-00125f50: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
    .\n-00125f70: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    } .
    soap\n-00126000: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap); <\n-00126040: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n-001260b0: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); ..\n-001261a0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    struct soap_mu\n-00126290: 6c74 6970 6172 7420 2a20 736f 6170 5f72 ltipart * soap_r\n-001262a0: 6563 765f 6d69 6d65 5f61 7474 6163 686d ecv_mime_attachm\n-001262b0: 656e 7428 7374 7275 6374 2073 6f61 7020 ent(struct soap \n-001262c0: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han\n-001262d0: 646c 6529 3c2f 6469 763e 3c64 6976 2063 dle)
    Get\n-001262f0: 2061 204d 494d 452f 4d54 4f4d 2061 7474 a MIME/MTOM att\n-00126300: 6163 686d 656e 742e 3c2f 6469 763e 3c2f achment.
    .
    in\n-00126400: 7420 736f 6170 5f70 6f73 745f 6368 6563 t soap_post_chec\n-00126410: 6b5f 6d69 6d65 5f61 7474 6163 686d 656e k_mime_attachmen\n-00126420: 7473 2873 7472 7563 7420 736f 6170 202a ts(struct soap *\n-00126430: 736f 6170 293c 2f64 6976 3e3c 6469 7620 soap)
    En\n-00126450: 6162 6c65 2070 6f73 742d 7072 6f63 6573 able post-proces\n-00126460: 7369 6e67 206f 6620 4d49 4d45 2f4d 544f sing of MIME/MTO\n-00126470: 4d20 6174 7461 6368 6d65 6e74 732e 3c2f M attachments.
    .
    i\n-00126570: 6e74 2073 6f61 705f 6368 6563 6b5f 6d69 nt soap_check_mi\n-00126580: 6d65 5f61 7474 6163 686d 656e 7473 2873 me_attachments(s\n-00126590: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001265a0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Check \n-001265c0: 666f 7220 6120 4d49 4d45 2f4d 544f 4d20 for a MIME/MTOM \n-001265d0: 6174 7461 6368 6d65 6e74 2e3c 2f64 6976 attachment.
    .
    <\n-00126600: 703e 5468 6520 7365 7276 6572 2d73 6964 p>The server-sid\n-00126610: 6520 7365 7276 6963 6520 6f70 6572 6174 e service operat\n-00126620: 696f 6e73 2061 7265 2069 6d70 6c65 6d65 ions are impleme\n-00126630: 6e74 6564 2061 7320 7573 7561 6c2c 2062 nted as usual, b\n-00126640: 7574 2077 6974 6820 6164 6469 7469 6f6e ut with addition\n-00126650: 616c 2063 6865 636b 7320 666f 7220 4d49 al checks for MI\n-00126660: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n-00126670: 6e74 733a 3c2f 703e 0a3c 6469 7620 636c nts:

    .
    <\n-00126690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001266a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main()else<\n+001256a0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n+001256c0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n+00125700: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_check_mi\n+00125760: 6d65 5f61 7474 6163 686d 656e 7473 3c2f me_attachments(soap))
    .
    {\n+001257c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    // attachment\n+00125800: 7320 6172 6520 7072 6573 656e 742c 2063 s are present, c\n+00125810: 6861 6e6e 656c 2069 7320 7374 696c 6c20 hannel is still \n+00125820: 6f70 656e 203c 2f73 7061 6e3e 3c2f 6469 open .
    do.
    {
    \n+00125890: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // get data &\n+001258d0: 2333 393b 6861 6e64 6c65 2623 3339 3b20 #39;handle' \n+001258e0: 6672 6f6d 2053 4f41 5020 7265 7370 6f6e from SOAP respon\n+001258f0: 7365 2061 6e64 2070 6173 7320 746f 2063 se and pass to c\n+00125900: 616c 6c62 6163 6b73 203c 2f73 7061 6e3e allbacks \n+00125910: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .\n+00125930: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // set \n+00125950: 7468 6520 666d 696d 6520 6361 6c6c 6261 the fmime callba\n+00125960: 636b 732c 2069 6620 6e65 6564 6564 203c cks, if needed <\n+00125970: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00125990: 2020 2020 203c 7370 616e 2063 6c61 7373 struc\n+001259b0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t
    soap_\n+001259f0: 6d75 6c74 6970 6172 743c 2f61 3e20 2a63 multipart *c\n+00125a00: 6f6e 7465 6e74 203d 203c 6120 636c 6173 ontent = soap_\n+00125a60: 7265 6376 5f6d 696d 655f 6174 7461 6368 recv_mime_attach\n+00125a70: 6d65 6e74 3c2f 613e 283c 6120 636c 6173 ment(\n+00125aa0: 736f 6170 3c2f 613e 2c20 283c 7370 616e soap, (void\n+00125ad0: 2a29 6861 6e64 6c65 293b 203c 2f64 6976 *)handle); .
    printf\n+00125b00: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n+00125b20: 6f74 3b52 6563 6569 7665 6420 6174 7461 ot;Received atta\n+00125b30: 6368 6d65 6e74 2077 6974 6820 6964 3d25 chment with id=%\n+00125b40: 7320 616e 6420 7479 7065 3d25 735c 6e26 s and type=%s\\n&\n+00125b50: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 636f quot;, co\n+00125b60: 6e74 656e 742d 2667 743b 3c61 2063 6c61 ntent->id\n+00125bc0: 3c2f 613e 3f63 6f6e 7465 6e74 2d26 6774 ?content->\n+00125bd0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;id:"&q\n+00125c50: 756f 743b 3c2f 7370 616e 3e2c 2063 6f6e uot;, con\n+00125c60: 7465 6e74 2d26 6774 3b3c 6120 636c 6173 tent->typ\n+00125cc0: 653c 2f61 3e3f 636f 6e74 656e 742d 2667 e?content-&g\n+00125cd0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;type:<\n+00125d30: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00125d40: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00125d50: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 293b ;");\n+00125d60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } \n+00125d80: 3c73 7061 6e20 636c 6173 733d 226b 6579 while<\n+00125da0: 2f73 7061 6e3e 2028 636f 6e74 656e 7429 /span> (content)\n+00125db0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+00125dd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00125de0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n+00125e20: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error) ..
    \n+00126140: 736f 6170 5f66 7265 653c 2f61 3e28 3c61 soap_free(soap);<\n+00126180: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_recv_mime_\n+00126240: 6174 7461 6368 6d65 6e74 3c2f 613e 3c2f attachment
    struct s\n+00126270: 6f61 705f 6d75 6c74 6970 6172 7420 2a20 oap_multipart * \n+00126280: 736f 6170 5f72 6563 765f 6d69 6d65 5f61 soap_recv_mime_a\n+00126290: 7474 6163 686d 656e 7428 7374 7275 6374 ttachment(struct\n+001262a0: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n+001262b0: 6420 2a68 616e 646c 6529 3c2f 6469 763e d *handle)
    \n+001262c0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Get a MIME/MT\n+001262e0: 4f4d 2061 7474 6163 686d 656e 742e 3c2f OM attachment.
    .\n+001263d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_pos\n+001263f0: 745f 6368 6563 6b5f 6d69 6d65 5f61 7474 t_check_mime_att\n+00126400: 6163 686d 656e 7473 2873 7472 7563 7420 achments(struct \n+00126410: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
    Enable post-\n+00126440: 7072 6f63 6573 7369 6e67 206f 6620 4d49 processing of MI\n+00126450: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n+00126460: 6e74 732e 3c2f 6469 763e 3c2f 6469 763e nts.
    \n+00126470: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap\n+00126520: 5f63 6865 636b 5f6d 696d 655f 6174 7461 _check_mime_atta\n+00126530: 6368 6d65 6e74 733c 2f61 3e3c 2f64 6976 chments
    int soap_ch\n+00126560: 6563 6b5f 6d69 6d65 5f61 7474 6163 686d eck_mime_attachm\n+00126570: 656e 7473 2873 7472 7563 7420 736f 6170 ents(struct soap\n+00126580: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    \n+001265a0: 4368 6563 6b20 666f 7220 6120 4d49 4d45 Check for a MIME\n+001265b0: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment\n+001265c0: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
    .

    The serv\n+001265f0: 6572 2d73 6964 6520 7365 7276 6963 6520 er-side service \n+00126600: 6f70 6572 6174 696f 6e73 2061 7265 2069 operations are i\n+00126610: 6d70 6c65 6d65 6e74 6564 2061 7320 7573 mplemented as us\n+00126620: 7561 6c2c 2062 7574 2077 6974 6820 6164 ual, but with ad\n+00126630: 6469 7469 6f6e 616c 2063 6865 636b 7320 ditional checks \n+00126640: 666f 7220 4d49 4d45 2f4d 544f 4d20 6174 for MIME/MTOM at\n+00126650: 7461 6368 6d65 6e74 733a 3c2f 703e 0a3c tachments:

    .<\n+00126660: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00126670: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int main\n+001266b0: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
    ... \n-00126930: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_serve(\n-00126990: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-001269c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } str\n+00126700: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new1\n+001267d0: 283c 6120 636c 6173 733d 2263 6f64 6522 (SOAP_ENC_MTO\n+00126830: 4d3c 2f61 3e29 3b20 3c2f 6469 763e 0a3c M);
    .<\n+00126840: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00126850: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_post_c\n+001268b0: 6865 636b 5f6d 696d 655f 6174 7461 6368 heck_mime_attach\n+001268c0: 6d65 6e74 733c 2f61 3e28 3c61 2063 6c61 ments(soap); ..<\n+001269b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001269c0: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    .
    .<\n-00126a10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00126a20: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__myMethod\n-00126a40: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n-00126a90: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-00126ac0: 703c 2f61 3e2c 202e 2e2e 2920 3c2f 6469 p, ...) i\n+00126a10: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6d79 nt ns__my\n+00126a20: 4d65 7468 6f64 283c 7370 616e 2063 6c61 Method(str\n+00126a40: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, ...\n+00126ab0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    {
    . \n-00126b00: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // se\n-00126b20: 7276 6572 2d73 6964 6520 7072 6f63 6573 rver-side proces\n-00126b30: 7369 6e67 206c 6f67 6963 203c 2f73 7061 sing logic
    .. \n-00126c40: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    // attachmen\n-00126c80: 7473 2061 7265 2070 7265 7365 6e74 2c20 ts are present, \n-00126c90: 6368 616e 6e65 6c20 6973 2073 7469 6c6c channel is still\n-00126ca0: 206f 7065 6e20 3c2f 7370 616e 3e3c 2f64 open .
    do .
    {.
    ... <\n-00126d30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00126d40: 656e 7422 3e2f 2f20 6765 7420 6461 7461 ent\">// get data\n-00126d50: 2026 2333 393b 6861 6e64 6c65 2623 3339 'handle'\n-00126d60: 3b20 6672 6f6d 2053 4f41 5020 7265 7175 ; from SOAP requ\n-00126d70: 6573 7420 616e 6420 7061 7373 2074 6f20 est and pass to \n-00126d80: 6361 6c6c 6261 636b 7320 3c2f 7370 616e callbacks
    .
    \n-00126db0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // set\n-00126dd0: 2074 6865 2066 6d69 6d65 2063 616c 6c62 the fmime callb\n-00126de0: 6163 6b73 2c20 6966 206e 6565 6465 6420 acks, if needed \n-00126df0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00126e10: 2020 2020 2020 3c73 7061 6e20 636c 6173 stru\n-00126e30: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct
    soap\n-00126e70: 5f6d 756c 7469 7061 7274 3c2f 613e 202a _multipart *\n-00126e80: 636f 6e74 656e 7420 3d20 3c61 2063 6c61 content = soap\n-00126ee0: 5f72 6563 765f 6d69 6d65 5f61 7474 6163 _recv_mime_attac\n-00126ef0: 686d 656e 743c 2f61 3e28 3c61 2063 6c61 hment(soap, (void*)handle); .
    print\n-00126f80: 6628 3c73 7061 6e20 636c 6173 733d 2273 f(&q\n-00126fa0: 756f 743b 5265 6365 6976 6564 2061 7474 uot;Received att\n-00126fb0: 6163 686d 656e 7420 7769 7468 2069 643d achment with id=\n-00126fc0: 2573 2061 6e64 2074 7970 653d 2573 5c6e %s and type=%s\\n\n-00126fd0: 2671 756f 743b 3c2f 7370 616e 3e2c 2063 ", c\n-00126fe0: 6f6e 7465 6e74 2d26 6774 3b3c 6120 636c ontent->i\n-00127040: 643c 2f61 3e3f 636f 6e74 656e 742d 2667 d?content-&g\n-00127050: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;id:"&\n-001270d0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 636f quot;, co\n-001270e0: 6e74 656e 742d 2667 743b 3c61 2063 6c61 ntent->ty\n-00127140: 7065 3c2f 613e 3f63 6f6e 7465 6e74 2d26 pe?content-&\n-00127150: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;type:\n-001271b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001271d0: 743b 2671 756f 743b 3c2f 7370 616e 3e29 t;")\n-001271e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }\n-00127200: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while\n-00127220: 3c2f 7370 616e 3e20 2863 6f6e 7465 6e74 (content\n-00127230: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-00127250: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap\n-001272a0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error) .
    return soap<\n-00127370: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error; .
    }
    .\n-001273f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-00127420: 2073 6572 7665 722d 7369 6465 2070 726f server-side pro\n-00127430: 6365 7373 696e 6720 6c6f 6769 6320 3c2f cessing logic
    . \n-00127460: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00127480: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-001274e0: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    .\n-001274f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    \n-00127510: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    We al\n-00128a40: 736f 2069 6e63 6c75 6465 6420 6120 3c63 so included a //gsoap wsa \n-00128a60: 7363 6865 6d61 2069 6d70 6f72 743a 3c2f schema import: directive \n-00128a80: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the wsa.h file to enabl\n-00128ab0: 6520 7468 6520 6765 6e65 7261 7469 6f6e e the generation\n-00128ac0: 206f 6620 5753 444c 2073 7065 6369 6669 of WSDL specifi\n-00128ad0: 6361 7469 6f6e 7320 7468 6174 2069 6d70 cations that imp\n-00128ae0: 6f72 7420 2869 6e73 7465 6164 206f 6620 ort (instead of \n-00128af0: 696e 636c 7564 6573 2920 7468 6520 5753 includes) the WS\n-00128b00: 2d41 6464 7265 7373 696e 6720 656c 656d -Addressing elem\n-00128b10: 656e 7473 2e20 4e6f 7465 2074 6861 7420 ents. Note that \n-00128b20: 7468 6520 3c63 6f64 653e 2f2f 6773 6f61 the //gsoa\n-00128b30: 706f 7074 2077 3c2f 636f 6465 3e20 6469 popt w di\n-00128b40: 7265 6374 6976 6520 2877 6869 6368 2061 rective (which a\n-00128b50: 6464 7320 6f70 7469 6f6e 203c 623e 3c63 dds option -w to run soapcpp2 -w) must n\n-00128ba0: 6f74 2062 6520 7072 6573 656e 7420 696e ot be present in\n-00128bb0: 2079 6f75 7220 6865 6164 6572 2066 696c your header fil\n-00128bc0: 6520 746f 2065 6e61 626c 6520 5753 444c e to enable WSDL\n-00128bd0: 2067 656e 6572 6174 696f 6e2e 3c2f 703e generation.

    \n-00128be0: 0a3c 703e 4f6e 652d 7761 7920 534f 4150 .

    One-way SOAP\n-00128bf0: 2d6f 7665 722d 5544 5020 6d65 7373 6167 -over-UDP messag\n-00128c00: 6573 2028 7365 6520 5365 6374 696f 6e20 es (see Section \n-00128c10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Asynchro\n-00128c40: 6e6f 7573 206f 6e65 2d77 6179 206d 6573 nous one-way mes\n-00128c50: 7361 6765 2070 6173 7369 6e67 3c2f 613e sage passing\n-00128c60: 2029 2073 686f 756c 6420 6265 2064 6563 ) should be dec\n-00128c70: 6c61 7265 6420 746f 2069 6e63 6c75 6465 lared to include\n-00128c80: 2074 6865 203c 656d 3e3c 636f 6465 3e77 the w\n-00128c90: 7361 3a4d 6573 7361 6765 4944 3c2f 636f sa:MessageID, wsa:To, and \n-00128cd0: 3c63 6f64 653e 7773 613a 4163 7469 6f6e wsa:Action\n-00128ce0: 3c2f 636f 6465 3e3c 2f65 6d3e 2065 6c65 ele\n-00128cf0: 6d65 6e74 7320 696e 2074 6865 2053 4f41 ments in the SOA\n-00128d00: 5020 4865 6164 6572 206f 6620 7468 6520 P Header of the \n-00128d10: 7265 7175 6573 7420 6d65 7373 6167 6520 request message \n-00128d20: 6173 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a as follows:

    .\n-00128d30: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n-00128d70: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-00128d80: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n-00128d90: 6172 743a 2020 2020 2020 2020 2020 7365 art: se\n-00128da0: 6e64 5374 7269 6e67 2077 7361 5f5f 4d65 ndString wsa__Me\n-00128db0: 7373 6167 6549 4420 3c2f 7370 616e 3e3c ssageID <\n-00128dc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-00128df0: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-00128e00: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n-00128e10: 6172 743a 2020 2020 2020 2020 2020 7365 art: se\n-00128e20: 6e64 5374 7269 6e67 2077 7361 5f5f 546f ndString wsa__To\n-00128e30: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00128e40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00128e50: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-00128e70: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n-00128e80: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: \n-00128e90: 2020 2020 2020 2073 656e 6453 7472 696e sendStrin\n-00128ea0: 6720 7773 615f 5f41 6374 696f 6e20 3c2f g wsa__Action
    .int ns__sendStrin\n-00128f00: 6728 3c73 7061 6e20 636c 6173 733d 226b g(char\n-00128f20: 3c2f 7370 616e 3e20 2a73 7472 2c20 3c73 *str, void);
    .

    Request-re\n-00128f80: 7370 6f6e 7365 2053 4f41 502d 6f76 6572 sponse SOAP-over\n-00128f90: 2d55 4450 206d 6573 7361 6765 7320 7368 -UDP messages sh\n-00128fa0: 6f75 6c64 2062 6520 6465 636c 6172 6564 ould be declared\n-00128fb0: 2074 6f20 696e 636c 7564 6520 7468 6520 to include the \n-00128fc0: 3c65 6d3e 3c63 6f64 653e 7773 613a 4d65 wsa:Me\n-00128fd0: 7373 6167 6549 443c 2f63 6f64 653e 3c2f ssageID, w\n-00128ff0: 7361 3a54 6f3c 2f63 6f64 653e 3c2f 656d sa:To, wsa\n-00129010: 3a41 6374 696f 6e3c 2f63 6f64 653e 3c2f :Action, and wsa:ReplyTo eleme\n-00129050: 6e74 7320 696e 2074 6865 2053 4f41 5020 nts in the SOAP \n-00129060: 4865 6164 6572 206f 6620 7468 6520 7265 Header of the re\n-00129070: 7175 6573 7420 6d65 7373 6167 652c 2061 quest message, a\n-00129080: 6e64 2074 6865 2074 6865 203c 656d 3e3c nd the the <\n-00129090: 636f 6465 3e77 7361 3a4d 6573 7361 6765 code>wsa:Message\n-001290a0: 4944 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 ID, \n-001290b0: 3c65 6d3e 3c63 6f64 653e 7773 613a 546f wsa:To\n-001290c0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , wsa:Acti\n-001290e0: 6f6e 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 on, \n-001290f0: 616e 6420 3c65 6d3e 3c63 6f64 653e 7773 and ws\n-00129100: 613a 5265 6c61 7465 7354 6f3c 2f63 6f64 a:RelatesTo elements\n-00129120: 2069 6e20 7468 6520 534f 4150 2048 6561 in the SOAP Hea\n-00129130: 6465 7220 6f66 2074 6865 2072 6573 706f der of the respo\n-00129140: 6e73 6520 6d65 7373 6167 653a 3c2f 703e nse message:

    \n-00129150: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    /\n-00129190: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-001291a0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n-001291b0: 7061 7274 3a20 2020 2020 2020 2020 2065 part: e\n-001291c0: 6368 6f53 7472 696e 6720 7773 615f 5f4d choString wsa__M\n-001291d0: 6573 7361 6765 4944 203c 2f73 7061 6e3e essageID \n-001291e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-00129210: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-00129220: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n-00129230: 7061 7274 3a20 2020 2020 2020 2020 2065 part: e\n-00129240: 6368 6f53 7472 696e 6720 7773 615f 5f54 choString wsa__T\n-00129250: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
    .\n-00129260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-00129290: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n-001292a0: 642d 6865 6164 6572 2d70 6172 743a 2020 d-header-part: \n-001292b0: 2020 2020 2020 2020 6563 686f 5374 7269 echoStri\n-001292c0: 6e67 2077 7361 5f5f 4163 7469 6f6e 203c ng wsa__Action <\n-001292d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001292f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00129300: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-00129310: 7365 7276 6963 6520 6d65 7468 6f64 2d69 service method-i\n-00129320: 6e70 7574 2d68 6561 6465 722d 7061 7274 nput-header-part\n-00129330: 3a20 2020 2065 6368 6f53 7472 696e 6720 : echoString \n-00129340: 7773 615f 5f52 6570 6c79 546f 203c 2f73 wsa__ReplyTo
    .
    //gsoap ns se\n-00129390: 7276 6963 6520 6d65 7468 6f64 2d6f 7574 rvice method-out\n-001293a0: 7075 742d 6865 6164 6572 2d70 6172 743a put-header-part:\n-001293b0: 2020 2065 6368 6f53 7472 696e 6720 7773 echoString ws\n-001293c0: 615f 5f52 656c 6174 6573 546f 203c 2f73 a__RelatesTo
    .
    int ns__echoString\n-00129420: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n-00129440: 2f73 7061 6e3e 202a 7374 722c 203c 7370 /span> *str, char **res);
    \n-00129480: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    For t\n-001294a0: 6865 2063 6f6e 7465 6e74 2072 6571 7569 he content requi\n-001294b0: 7265 6d65 6e74 7320 6f66 2074 6865 7365 rements of these\n-001294c0: 2065 6c65 6d65 6e74 732c 2070 6c65 6173 elements, pleas\n-001294d0: 6520 636f 6e73 756c 7420 7468 6520 534f e consult the SO\n-001294e0: 4150 2d6f 7665 722d 5544 5020 7370 6563 AP-over-UDP spec\n-001294f0: 6966 6963 6174 696f 6e20 616e 642f 6f72 ification and/or\n-00129500: 2072 6561 6420 7468 6520 6e65 7874 2073 read the next s\n-00129510: 6563 7469 6f6e 7320 6578 706c 6169 6e69 ections explaini\n-00129520: 6e67 2053 4f41 502d 6f76 6572 2d55 4450 ng SOAP-over-UDP\n-00129530: 2075 6e69 6361 7374 2c20 6d75 6c74 6963 unicast, multic\n-00129540: 6173 742c 206f 6e65 2d77 6179 2c20 616e ast, one-way, an\n-00129550: 6420 7265 7175 6573 742d 7265 7370 6f6e d request-respon\n-00129560: 7365 2063 6c69 656e 7420 616e 6420 7365 se client and se\n-00129570: 7276 6572 2061 7070 6c69 6361 7469 6f6e rver application\n-00129580: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

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

    .\n-001295e0: 3c2f 613e 0a43 6c69 656e 742d 7369 6465 .Client-side\n-001295f0: 206f 6e65 2d77 6179 2055 4450 2075 6e69 one-way UDP uni\n-00129600: 6361 7374 3c2f 6833 3e0a 3c70 3e54 6869 cast.

    Thi\n-00129610: 7320 6578 616d 706c 6520 6173 7375 6d65 s example assume\n-00129620: 7320 7468 6174 2074 6865 2069 6e74 6572 s that the inter\n-00129630: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-00129640: 2069 6e63 6c75 6465 7320 7468 6520 534f includes the SO\n-00129650: 4150 2048 6561 6465 7220 7769 7468 2057 AP Header with W\n-00129660: 532d 4164 6472 6573 7369 6e67 2065 6c65 S-Addressing ele\n-00129670: 6d65 6e74 732c 2073 6565 203c 6120 636c ments, see The WS-Addr\n-001296b0: 6573 7369 6e67 2070 6c75 6769 6e3c 2f61 essing plugin, and the ns__sendString<\n-001296e0: 2f63 6f64 653e 2066 756e 6374 696f 6e20 /code> function \n-001296f0: 6469 7363 7573 7365 6420 696e 2053 6563 discussed in Sec\n-00129700: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Usin\n-00129730: 6720 5753 2d41 6464 7265 7373 696e 6720 g WS-Addressing \n-00129740: 7769 7468 2053 4f41 502d 6f76 6572 2d55 with SOAP-over-U\n-00129750: 4450 3c2f 613e 2e3c 2f70 3e0a 3c64 6976 DP.

    .
    #\n-001297a0: 696e 636c 7564 6520 2671 756f 743b 706c include "pl\n-001297b0: 7567 696e 2f77 7361 6170 692e 6826 7175 ugin/wsaapi.h&qu\n-001297c0: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n+00126ae0: 696e 6522 3e20 202e 2e2e 203c 7370 616e ine\"> ... // server-side \n+00126b10: 7072 6f63 6573 7369 6e67 206c 6f67 6963 processing logic\n+00126b20: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00126b30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00126b40: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00126b60: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_c\n+00126bc0: 6865 636b 5f6d 696d 655f 6174 7461 6368 heck_mime_attach\n+00126bd0: 6d65 6e74 733c 2f61 3e28 3c61 2063 6c61 ments(soap)).
    {
    .\n+00126c40: 2020 2020 3c73 7061 6e20 636c 6173 733d // att\n+00126c60: 6163 686d 656e 7473 2061 7265 2070 7265 achments are pre\n+00126c70: 7365 6e74 2c20 6368 616e 6e65 6c20 6973 sent, channel is\n+00126c80: 2073 7469 6c6c 206f 7065 6e20 3c2f 7370 still open
    .
    \n+00126cb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 do
    .
    \n+00126cf0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n+00126d10: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // ge\n+00126d30: 7420 6461 7461 2026 2333 393b 6861 6e64 t data 'hand\n+00126d40: 6c65 2623 3339 3b20 6672 6f6d 2053 4f41 le' from SOA\n+00126d50: 5020 7265 7175 6573 7420 616e 6420 7061 P request and pa\n+00126d60: 7373 2074 6f20 6361 6c6c 6261 636b 7320 ss to callbacks \n+00126d70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00126d90: 2020 2020 2020 2e2e 2e20 3c73 7061 6e20 ... \n+00126db0: 2f2f 2073 6574 2074 6865 2066 6d69 6d65 // set the fmime\n+00126dc0: 2063 616c 6c62 6163 6b73 2c20 6966 206e callbacks, if n\n+00126dd0: 6565 6465 6420 3c2f 7370 616e 3e3c 2f64 eeded .
    struct \n+00126e20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_multipart\n+00126e60: 3c2f 613e 202a 636f 6e74 656e 7420 3d20 *content = \n+00126e70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_recv_mime\n+00126ed0: 5f61 7474 6163 686d 656e 743c 2f61 3e28 _attachment(\n+00126ee0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00126f10: 2028 3c73 7061 6e20 636c 6173 733d 226b (void\n+00126f30: 3c2f 7370 616e 3e2a 2968 616e 646c 6529 *)handle)\n+00126f40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+00126f60: 2070 7269 6e74 6628 3c73 7061 6e20 636c printf("Receiv\n+00126f90: 6564 2061 7474 6163 686d 656e 7420 7769 ed attachment wi\n+00126fa0: 7468 2069 643d 2573 2061 6e64 2074 7970 th id=%s and typ\n+00126fb0: 653d 2573 5c6e 2671 756f 743b 3c2f 7370 e=%s\\n", content->\n+00126fd0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;id?cont\n+00127030: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->id:&\n+001270b0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;", content->\n+001270d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 type?con\n+00127130: 7465 6e74 2d26 6774 3b3c 6120 636c 6173 tent->typ\n+00127190: 653c 2f61 3e3a 3c73 7061 6e20 636c 6173 e:"");
    .<\n+001271d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001271e0: 3e20 2020 207d 203c 7370 616e 2063 6c61 > } while (c\n+00127210: 6f6e 7465 6e74 293b 203c 2f64 6976 3e0a ontent);
    .\n+00127220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00127250: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap-><\n+00127290: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001272a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001272b0: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n+001272c0: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n+001272d0: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error)
    .
    \n+00127300: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00127320: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap->error\n+001273b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } <\n+001273d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // server-si\n+00127410: 6465 2070 726f 6365 7373 696e 6720 6c6f de processing lo\n+00127420: 6769 6320 3c2f 7370 616e 3e3c 2f64 6976 gic .
    \n+00127460: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; <\n+001274d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+001274f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

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

    ..Stream\n+00127570: 696e 6720 6368 756e 6b65 6420 4d49 4d45 ing chunked MIME\n+00127580: 2f4d 544f 4d3c 2f68 323e 0a3c 703e 546f /MTOM.

    To\n+00127590: 2073 656e 6420 4d49 4d45 2f4d 544f 4d20 send MIME/MTOM \n+001275a0: 6174 7461 6368 6d65 6e74 732c 2074 6865 attachments, the\n+001275b0: 2061 7474 6163 686d 656e 7420 7369 7a65 attachment size\n+001275c0: 7320 6d75 7374 2062 6520 6465 7465 726d s must be determ\n+001275d0: 696e 6564 2069 6e20 6164 7661 6e63 6520 ined in advance \n+001275e0: 746f 2063 616c 6375 6c61 7465 2048 5454 to calculate HTT\n+001275f0: 5020 6d65 7373 6167 6520 6c65 6e67 7468 P message length\n+00127600: 2072 6571 7569 7265 6420 746f 2073 7472 required to str\n+00127610: 6561 6d20 4d49 4d45 2f4d 544f 4d20 6f76 eam MIME/MTOM ov\n+00127620: 6572 2048 5454 502e 2048 6f77 6576 6572 er HTTP. However\n+00127630: 2c20 6368 756e 6b65 6420 4d49 4d45 2f4d , chunked MIME/M\n+00127640: 544f 4d20 746f 6765 7468 6572 2077 6974 TOM together wit\n+00127650: 6820 6368 756e 6b65 6420 4854 5450 2063 h chunked HTTP c\n+00127660: 616e 2062 6520 7573 6564 2074 6f20 6f6d an be used to om\n+00127670: 6974 2074 6869 7320 7374 6570 2e20 4669 it this step. Fi\n+00127680: 7273 7420 7365 7420 7468 6520 3c63 6f64 rst set the #SOAP_IO_CHUNK\n+001276a0: 3c2f 636f 6465 3e20 666c 6167 2e20 5468 flag. Th\n+001276b0: 656e 2c20 746f 2073 7472 6561 6d20 6368 en, to stream ch\n+001276c0: 756e 6b65 6420 4d49 4d45 2f4d 544f 4d2c unked MIME/MTOM,\n+001276d0: 2073 6574 2074 6865 203c 636f 6465 3e5f set the _\n+001276e0: 5f73 697a 653c 2f63 6f64 653e 206d 656d _size mem\n+001276f0: 6265 7220 6f66 2061 6e20 6174 7461 6368 ber of an attach\n+00127700: 6d65 6e74 2074 6f20 7a65 726f 2061 6e64 ment to zero and\n+00127710: 2065 6e61 626c 6520 4d49 4d45 2f4d 544f enable MIME/MTO\n+00127720: 4d20 6368 756e 6b69 6e67 2e20 5468 6520 M chunking. The \n+00127730: 4d49 4d45 2f4d 544f 4d20 3c63 6f64 653e MIME/MTOM \n+00127740: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fmime\n+001277e0: 7265 6164 3c2f 613e 3c2f 636f 6465 3e20 read \n+001277f0: 6361 6c6c 6261 636b 2074 6865 6e20 6665 callback then fe\n+00127800: 7463 6865 7320 6461 7461 2069 6e20 6368 tches data in ch\n+00127810: 756e 6b73 2061 6e64 2069 7420 6973 2069 unks and it is i\n+00127820: 6d70 6f72 7461 6e74 2074 6f20 6669 6c6c mportant to fill\n+00127830: 2074 6865 2065 6e74 6972 6520 6275 6666 the entire buff\n+00127840: 6572 2075 6e6c 6573 7320 7468 6520 656e er unless the en\n+00127850: 6420 6f66 2074 6865 2064 6174 6120 6861 d of the data ha\n+00127860: 7320 6265 656e 2072 6561 6368 6564 2061 s been reached a\n+00127870: 6e64 2074 6865 206c 6173 7420 6368 756e nd the last chun\n+00127880: 6b20 6973 2074 6f20 6265 2073 656e 642e k is to be send.\n+00127890: 2054 6861 7420 6973 2c20 3c63 6f64 653e That is, \n+001278a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fmime\n+00127940: 7265 6164 3c2f 613e 3c2f 636f 6465 3e20 read \n+00127950: 7368 6f75 6c64 2072 6574 7572 6e20 7468 should return th\n+00127960: 6520 7661 6c75 6520 6f66 2074 6865 206c e value of the l\n+00127970: 6173 7420 3c63 6f64 653e 6c65 6e3c 2f63 ast len parameter a\n+00127990: 6e64 2066 696c 6c20 7468 6520 656e 7469 nd fill the enti\n+001279a0: 7265 2062 7566 6665 7220 3c63 6f64 653e re buffer \n+001279b0: 6275 663c 2f63 6f64 653e 2066 6f72 2061 buf for a\n+001279c0: 6c6c 2063 6875 6e6b 7320 6578 6365 7074 ll chunks except\n+001279d0: 2074 6865 206c 6173 742e 2046 6f72 2074 the last. For t\n+001279e0: 6865 206c 6173 7420 6974 2072 6574 7572 he last it retur\n+001279f0: 6e73 2030 2e3c 2f70 3e0a 3c70 3ef0 9f94 ns 0.

    .

    ...\n+00127a00: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n+00127a10: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n+00127a20: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n+00127a30: 3c68 313e 3c61 2063 6c61 7373 3d22 616e

    <\n+00127a50: 2f61 3e0a 534f 4150 2f58 4d4c 206f 7665 /a>.SOAP/XML ove\n+00127a60: 7220 5544 503c 2f68 313e 0a3c 703e 5544 r UDP

    .

    UD\n+00127a70: 5020 6973 2061 2073 696d 706c 652c 2075 P is a simple, u\n+00127a80: 6e72 656c 6961 626c 6520 6461 7461 6772 nreliable datagr\n+00127a90: 616d 2070 726f 746f 636f 6c3a 2055 4450 am protocol: UDP\n+00127aa0: 2073 6f63 6b65 7473 2061 7265 2063 6f6e sockets are con\n+00127ab0: 6e65 6374 696f 6e6c 6573 732e 2055 4450 nectionless. UDP\n+00127ac0: 2061 6464 7265 7373 2066 6f72 6d61 7473 address formats\n+00127ad0: 2061 7265 2069 6465 6e74 6963 616c 2074 are identical t\n+00127ae0: 6f20 7468 6f73 6520 7573 6564 2062 7920 o those used by \n+00127af0: 5443 502e 2049 6e20 7061 7274 6963 756c TCP. In particul\n+00127b00: 6172 2055 4450 2070 726f 7669 6465 7320 ar UDP provides \n+00127b10: 6120 706f 7274 2069 6465 6e74 6966 6965 a port identifie\n+00127b20: 7220 696e 2061 6464 6974 696f 6e20 746f r in addition to\n+00127b30: 2074 6865 206e 6f72 6d61 6c20 496e 7465 the normal Inte\n+00127b40: 726e 6574 2061 6464 7265 7373 2066 6f72 rnet address for\n+00127b50: 6d61 742e 2054 6865 2055 4450 2070 6f72 mat. The UDP por\n+00127b60: 7420 7370 6163 6520 6973 2073 6570 6172 t space is separ\n+00127b70: 6174 6520 6672 6f6d 2074 6865 2054 4350 ate from the TCP\n+00127b80: 2070 6f72 7420 7370 6163 6520 2869 2e65 port space (i.e\n+00127b90: 2e20 6120 5544 5020 706f 7274 206d 6179 . a UDP port may\n+00127ba0: 206e 6f74 2062 6520 2263 6f6e 6e65 6374 not be \"connect\n+00127bb0: 6564 2220 746f 2061 2054 4350 2070 6f72 ed\" to a TCP por\n+00127bc0: 7429 2e20 496e 2061 6464 6974 696f 6e20 t). In addition \n+00127bd0: 6272 6f61 6463 6173 7420 7061 636b 6574 broadcast packet\n+00127be0: 7320 6d61 7920 6265 2073 656e 7420 2861 s may be sent (a\n+00127bf0: 7373 756d 696e 6720 7468 6520 756e 6465 ssuming the unde\n+00127c00: 726c 7969 6e67 206e 6574 776f 726b 2073 rlying network s\n+00127c10: 7570 706f 7274 7320 7468 6973 2920 6279 upports this) by\n+00127c20: 2075 7369 6e67 2061 2072 6573 6572 7665 using a reserve\n+00127c30: 6420 2262 726f 6164 6361 7374 0a61 6464 d \"broadcast.add\n+00127c40: 7265 7373 223b 2074 6869 7320 6164 6472 ress\"; this addr\n+00127c50: 6573 7320 6973 206e 6574 776f 726b 2069 ess is network i\n+00127c60: 6e74 6572 6661 6365 2064 6570 656e 6465 nterface depende\n+00127c70: 6e74 2e3c 2f70 3e0a 3c70 3e43 6c69 656e nt.

    .

    Clien\n+00127c80: 742d 7369 6465 206d 6573 7361 6765 7320 t-side messages \n+00127c90: 7769 7468 2053 4f41 502d 6f76 6572 2d55 with SOAP-over-U\n+00127ca0: 4450 2065 6e64 706f 696e 7420 5552 4c73 DP endpoint URLs\n+00127cb0: 2028 3c63 6f64 653e 736f 6170 2e75 6470 (soap.udp\n+00127cc0: 3a2f 2f2e 2e2e 3c2f 636f 6465 3e29 2061 ://...) a\n+00127cd0: 7265 2061 7574 6f6d 6174 6963 616c 6c79 re automatically\n+00127ce0: 2074 7261 6e73 6d69 7474 6564 2061 7320 transmitted as \n+00127cf0: 6461 7461 6772 616d 732e 2053 6572 7665 datagrams. Serve\n+00127d00: 722d 7369 6465 2061 7070 6c69 6361 7469 r-side applicati\n+00127d10: 6f6e 7320 7368 6f75 6c64 2073 6574 2074 ons should set t\n+00127d20: 6865 203c 636f 6465 3e23 534f 4150 5f49 he #SOAP_I\n+00127d30: 4f5f 5544 503c 2f63 6f64 653e 206d 6f64 O_UDP mod\n+00127d40: 6520 666c 6167 2074 6f20 6163 6365 7074 e flag to accept\n+00127d50: 2055 4450 2072 6571 7565 7374 732c 2065 UDP requests, e\n+00127d60: 2e67 2e20 7573 696e 6720 3c63 6f64 653e .g. using \n+00127d70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa\n+00127e20: 705f 6e65 7731 3c2f 613e 3c2f 636f 6465 p_new1, soap_init1<\n+00127ef0: 2f61 3e3c 2f63 6f64 653e 2c20 6f72 203c /a>, or <\n+00127f00: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+00127fa0: 736f 6170 5f73 6574 5f6d 6f64 653c 2f61 soap_set_mode.

    .The maximum mes\n+00127fd0: 7361 6765 206c 656e 6774 6820 666f 7220 sage length for \n+00127fe0: 6461 7461 6772 616d 2070 6163 6b65 7473 datagram packets\n+00127ff0: 2069 7320 7265 7374 7269 6374 6564 2062 is restricted b\n+00128000: 7920 7468 6520 6275 6666 6572 2073 697a y the buffer siz\n+00128010: 6520 3c63 6f64 653e 2353 4f41 505f 4255 e #SOAP_BU\n+00128020: 464c 454e 3c2f 636f 6465 3e2c 2077 6869 FLEN, whi\n+00128030: 6368 2069 7320 3635 3533 3620 6279 2064 ch is 65536 by d\n+00128040: 6566 6175 6c74 2c20 756e 6c65 7373 2063 efault, unless c\n+00128050: 6f6d 7069 6c65 6420 7769 7468 203c 636f ompiled with #WITH_LEAN to support \n+00128080: 736d 616c 6c2d 7363 616c 6520 656d 6265 small-scale embe\n+00128090: 6464 6564 2073 7973 7465 6d73 2e20 466f dded systems. Fo\n+001280a0: 7220 5544 5020 7472 616e 7370 6f72 7420 r UDP transport \n+001280b0: 3c63 6f64 653e 2353 4f41 505f 4255 464c #SOAP_BUFL\n+001280c0: 454e 3c2f 636f 6465 3e20 6d75 7374 206e EN must n\n+001280d0: 6f74 2065 7863 6565 6420 7468 6520 6d61 ot exceed the ma\n+001280e0: 7869 6d75 6d20 5544 5020 7061 636b 6574 ximum UDP packet\n+001280f0: 2073 697a 6520 3635 3533 3620 2874 6865 size 65536 (the\n+00128100: 2073 697a 6520 6f66 2064 6174 6167 7261 size of datagra\n+00128110: 6d20 6d65 7373 6167 6573 2069 7320 636f m messages is co\n+00128120: 6e73 7472 6169 6e65 6420 6279 2074 6865 nstrained by the\n+00128130: 2055 4450 2070 6163 6b65 7420 7369 7a65 UDP packet size\n+00128140: 2032 5e31 363d 3635 3533 3620 6173 2070 2^16=65536 as p\n+00128150: 6572 2055 4450 2073 7461 6e64 6172 6429 er UDP standard)\n+00128160: 2e20 596f 7520 6361 6e20 7573 6520 636f . You can use co\n+00128170: 6d70 7265 7373 696f 6e20 7769 7468 203c mpression with <\n+00128180: 636f 6465 3e23 534f 4150 5f45 4e43 5f5a code>#SOAP_ENC_Z\n+00128190: 4c49 423c 2f63 6f64 653e 2074 6f20 7265 LIB
    to re\n+001281a0: 6475 6365 2074 6865 206d 6573 7361 6765 duce the message\n+001281b0: 2073 697a 652c 2062 7574 206e 6f74 6520 size, but note \n+001281c0: 7468 6174 2063 6f6d 7072 6573 7365 6420 that compressed \n+001281d0: 534f 4150 2d6f 7665 722d 5544 5020 6973 SOAP-over-UDP is\n+001281e0: 2061 2067 534f 4150 2d73 7065 6369 6669 a gSOAP-specifi\n+001281f0: 6320 6665 6174 7572 6520 6265 6361 7573 c feature becaus\n+00128200: 6520 6974 2069 7320 6e6f 7420 7061 7274 e it is not part\n+00128210: 206f 6620 7468 6520 534f 4150 2d6f 7665 of the SOAP-ove\n+00128220: 722d 5544 5020 7370 6563 6966 6963 6174 r-UDP specificat\n+00128230: 696f 6e2e 3c2f 703e 0a3c 703e 5468 6520 ion.

    .

    The \n+00128240: 534f 4150 2d6f 7665 722d 5544 5020 7370 SOAP-over-UDP sp\n+00128250: 6563 6966 6963 6174 696f 6e20 7265 6c69 ecification reli\n+00128260: 6573 206f 6e20 5753 2d41 6464 7265 7373 es on WS-Address\n+00128270: 696e 672e 2054 6865 203c 656d 3e3c 636f ing. The wsa.h<\n+00128290: 2f65 6d3e 2066 696c 6520 696e 2074 6865 /em> file in the\n+001282a0: 203c 636f 6465 3e69 6d70 6f72 743c 2f63 import directory d\n+001282c0: 6566 696e 6573 2074 6865 2057 532d 4164 efines the WS-Ad\n+001282d0: 6472 6573 7369 6e67 2065 6c65 6d65 6e74 dressing element\n+001282e0: 7320 666f 7220 636c 6965 6e74 2061 6e64 s for client and\n+001282f0: 2073 6572 7665 7220 6170 706c 6963 6174 server applicat\n+00128300: 696f 6e73 2e3c 2f70 3e0a 3c70 3e54 6865 ions.

    .

    The\n+00128310: 2067 534f 4150 2069 6d70 6c65 6d65 6e74 gSOAP implement\n+00128320: 6174 696f 6e20 636f 6e66 6f72 6d73 2074 ation conforms t\n+00128330: 6f20 7468 6520 534f 4150 2d6f 7665 722d o the SOAP-over-\n+00128340: 5544 5020 7265 7175 6972 656d 656e 7473 UDP requirements\n+00128350: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e53 :

    .
    We also include\n+00128a30: 6420 6120 3c63 6f64 653e 2f2f 6773 6f61 d a //gsoa\n+00128a40: 7020 7773 6120 7363 6865 6d61 2069 6d70 p wsa schema imp\n+00128a50: 6f72 743a 3c2f 636f 6465 3e20 6469 7265 ort: dire\n+00128a60: 6374 6976 6520 696e 2074 6865 203c 656d ctive in the wsa.h
    file to\n+00128a90: 2065 6e61 626c 6520 7468 6520 6765 6e65 enable the gene\n+00128aa0: 7261 7469 6f6e 206f 6620 5753 444c 2073 ration of WSDL s\n+00128ab0: 7065 6369 6669 6361 7469 6f6e 7320 7468 pecifications th\n+00128ac0: 6174 2069 6d70 6f72 7420 2869 6e73 7465 at import (inste\n+00128ad0: 6164 206f 6620 696e 636c 7564 6573 2920 ad of includes) \n+00128ae0: 7468 6520 5753 2d41 6464 7265 7373 696e the WS-Addressin\n+00128af0: 6720 656c 656d 656e 7473 2e20 4e6f 7465 g elements. Note\n+00128b00: 2074 6861 7420 7468 6520 3c63 6f64 653e that the \n+00128b10: 2f2f 6773 6f61 706f 7074 2077 3c2f 636f //gsoapopt w directive (w\n+00128b30: 6869 6368 2061 6464 7320 6f70 7469 6f6e hich adds option\n+00128b40: 203c 623e 3c63 6f64 653e 2d77 3c2f 636f -w to run <\n+00128b60: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2\n+00128b70: 202d 773c 2f63 6f64 653e 3c2f 623e 2920 -w
    ) \n+00128b80: 6d75 7374 206e 6f74 2062 6520 7072 6573 must not be pres\n+00128b90: 656e 7420 696e 2079 6f75 7220 6865 6164 ent in your head\n+00128ba0: 6572 2066 696c 6520 746f 2065 6e61 626c er file to enabl\n+00128bb0: 6520 5753 444c 2067 656e 6572 6174 696f e WSDL generatio\n+00128bc0: 6e2e 3c2f 703e 0a3c 703e 4f6e 652d 7761 n.

    .

    One-wa\n+00128bd0: 7920 534f 4150 2d6f 7665 722d 5544 5020 y SOAP-over-UDP \n+00128be0: 6d65 7373 6167 6573 2028 7365 6520 5365 messages (see Se\n+00128bf0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction As\n+00128c20: 796e 6368 726f 6e6f 7573 206f 6e65 2d77 ynchronous one-w\n+00128c30: 6179 206d 6573 7361 6765 2070 6173 7369 ay message passi\n+00128c40: 6e67 3c2f 613e 2029 2073 686f 756c 6420 ng ) should \n+00128c50: 6265 2064 6563 6c61 7265 6420 746f 2069 be declared to i\n+00128c60: 6e63 6c75 6465 2074 6865 203c 656d 3e3c nclude the <\n+00128c70: 636f 6465 3e77 7361 3a4d 6573 7361 6765 code>wsa:Message\n+00128c80: 4944 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 ID, \n+00128c90: 3c65 6d3e 3c63 6f64 653e 7773 613a 546f wsa:To\n+00128ca0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 616e , an\n+00128cb0: 6420 3c65 6d3e 3c63 6f64 653e 7773 613a d wsa:\n+00128cc0: 4163 7469 6f6e 3c2f 636f 6465 3e3c 2f65 Action elements in t\n+00128ce0: 6865 2053 4f41 5020 4865 6164 6572 206f he SOAP Header o\n+00128cf0: 6620 7468 6520 7265 7175 6573 7420 6d65 f the request me\n+00128d00: 7373 6167 6520 6173 2066 6f6c 6c6f 7773 ssage as follows\n+00128d10: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    //gsoap ns s\n+00128d60: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he\n+00128d70: 6164 6572 2d70 6172 743a 2020 2020 2020 ader-part: \n+00128d80: 2020 2020 7365 6e64 5374 7269 6e67 2077 sendString w\n+00128d90: 7361 5f5f 4d65 7373 6167 6549 4420 3c2f sa__MessageID
    .//gsoap ns s\n+00128de0: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he\n+00128df0: 6164 6572 2d70 6172 743a 2020 2020 2020 ader-part: \n+00128e00: 2020 2020 7365 6e64 5374 7269 6e67 2077 sendString w\n+00128e10: 7361 5f5f 546f 203c 2f73 7061 6e3e 3c2f sa__To .
    //g\n+00128e50: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+00128e60: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa\n+00128e70: 7274 3a20 2020 2020 2020 2020 2073 656e rt: sen\n+00128e80: 6453 7472 696e 6720 7773 615f 5f41 6374 dString wsa__Act\n+00128e90: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion .
    in\n+00128ed0: 743c 2f73 7061 6e3e 206e 735f 5f73 656e t ns__sen\n+00128ee0: 6453 7472 696e 6728 3c73 7061 6e20 636c dString(char *s\n+00128f10: 7472 2c20 3c73 7061 6e20 636c 6173 733d tr, vo\n+00128f30: 6964 3c2f 7370 616e 3e29 3b3c 2f64 6976 id);.

    Requ\n+00128f60: 6573 742d 7265 7370 6f6e 7365 2053 4f41 est-response SOA\n+00128f70: 502d 6f76 6572 2d55 4450 206d 6573 7361 P-over-UDP messa\n+00128f80: 6765 7320 7368 6f75 6c64 2062 6520 6465 ges should be de\n+00128f90: 636c 6172 6564 2074 6f20 696e 636c 7564 clared to includ\n+00128fa0: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the \n+00128fb0: 7773 613a 4d65 7373 6167 6549 443c 2f63 wsa:MessageID, <\n+00128fd0: 636f 6465 3e77 7361 3a54 6f3c 2f63 6f64 code>wsa:To, wsa:Action, and <\n+00129010: 656d 3e3c 636f 6465 3e77 7361 3a52 6570 em>wsa:Rep\n+00129020: 6c79 546f 3c2f 636f 6465 3e3c 2f65 6d3e lyTo\n+00129030: 2065 6c65 6d65 6e74 7320 696e 2074 6865 elements in the\n+00129040: 2053 4f41 5020 4865 6164 6572 206f 6620 SOAP Header of \n+00129050: 7468 6520 7265 7175 6573 7420 6d65 7373 the request mess\n+00129060: 6167 652c 2061 6e64 2074 6865 2074 6865 age, and the the\n+00129070: 203c 656d 3e3c 636f 6465 3e77 7361 3a4d wsa:M\n+00129080: 6573 7361 6765 4944 3c2f 636f 6465 3e3c essageID<\n+00129090: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n+001290a0: 7773 613a 546f 3c2f 636f 6465 3e3c 2f65 wsa:To, ws\n+001290c0: 613a 4163 7469 6f6e 3c2f 636f 6465 3e3c a:Action<\n+001290d0: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and wsa:RelatesT\n+001290f0: 6f3c 2f63 6f64 653e 3c2f 656d 3e20 656c o el\n+00129100: 656d 656e 7473 2069 6e20 7468 6520 534f ements in the SO\n+00129110: 4150 2048 6561 6465 7220 6f66 2074 6865 AP Header of the\n+00129120: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag\n+00129130: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+00129160: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00129170: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+00129180: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n+00129190: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: \n+001291a0: 2020 2020 2065 6368 6f53 7472 696e 6720 echoString \n+001291b0: 7773 615f 5f4d 6573 7361 6765 4944 203c wsa__MessageID <\n+001291c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001291e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001291f0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+00129200: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n+00129210: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: \n+00129220: 2020 2020 2065 6368 6f53 7472 696e 6720 echoString \n+00129230: 7773 615f 5f54 6f20 3c2f 7370 616e 3e3c wsa__To <\n+00129240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+00129270: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+00129280: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n+00129290: 6172 743a 2020 2020 2020 2020 2020 6563 art: ec\n+001292a0: 686f 5374 7269 6e67 2077 7361 5f5f 4163 hoString wsa__Ac\n+001292b0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    //gso\n+001292f0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+00129300: 7468 6f64 2d69 6e70 7574 2d68 6561 6465 thod-input-heade\n+00129310: 722d 7061 7274 3a20 2020 2065 6368 6f53 r-part: echoS\n+00129320: 7472 696e 6720 7773 615f 5f52 6570 6c79 tring wsa__Reply\n+00129330: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
    \n+00129340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+00129370: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+00129380: 6f64 2d6f 7574 7075 742d 6865 6164 6572 od-output-header\n+00129390: 2d70 6172 743a 2020 2065 6368 6f53 7472 -part: echoStr\n+001293a0: 696e 6720 7773 615f 5f52 656c 6174 6573 ing wsa__Relates\n+001293b0: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
    \n+001293c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n+001293f0: 3c2f 7370 616e 3e20 6e73 5f5f 6563 686f ns__echo\n+00129400: 5374 7269 6e67 283c 7370 616e 2063 6c61 String(char *st\n+00129430: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, cha\n+00129450: 723c 2f73 7061 6e3e 202a 2a72 6573 293b r **res);\n+00129460: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    For the content\n+00129490: 2072 6571 7569 7265 6d65 6e74 7320 6f66 requirements of\n+001294a0: 2074 6865 7365 2065 6c65 6d65 6e74 732c these elements,\n+001294b0: 2070 6c65 6173 6520 636f 6e73 756c 7420 please consult \n+001294c0: 7468 6520 534f 4150 2d6f 7665 722d 5544 the SOAP-over-UD\n+001294d0: 5020 7370 6563 6966 6963 6174 696f 6e20 P specification \n+001294e0: 616e 642f 6f72 2072 6561 6420 7468 6520 and/or read the \n+001294f0: 6e65 7874 2073 6563 7469 6f6e 7320 6578 next sections ex\n+00129500: 706c 6169 6e69 6e67 2053 4f41 502d 6f76 plaining SOAP-ov\n+00129510: 6572 2d55 4450 2075 6e69 6361 7374 2c20 er-UDP unicast, \n+00129520: 6d75 6c74 6963 6173 742c 206f 6e65 2d77 multicast, one-w\n+00129530: 6179 2c20 616e 6420 7265 7175 6573 742d ay, and request-\n+00129540: 7265 7370 6f6e 7365 2063 6c69 656e 7420 response client \n+00129550: 616e 6420 7365 7276 6572 2061 7070 6c69 and server appli\n+00129560: 6361 7469 6f6e 732e 3c2f 703e 0a3c 703e cations.

    .

    \n+00129570: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+00129590: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Clien\n+001295d0: 742d 7369 6465 206f 6e65 2d77 6179 2055 t-side one-way U\n+001295e0: 4450 2075 6e69 6361 7374 3c2f 6833 3e0a DP unicast

    .\n+001295f0: 3c70 3e54 6869 7320 6578 616d 706c 6520

    This example \n+00129600: 6173 7375 6d65 7320 7468 6174 2074 6865 assumes that the\n+00129610: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+00129620: 7220 6669 6c65 2069 6e63 6c75 6465 7320 r file includes \n+00129630: 7468 6520 534f 4150 2048 6561 6465 7220 the SOAP Header \n+00129640: 7769 7468 2057 532d 4164 6472 6573 7369 with WS-Addressi\n+00129650: 6e67 2065 6c65 6d65 6e74 732c 2073 6565 ng elements, see\n+00129660: 203c 6120 636c 6173 733d 2265 6c22 2068 The W\n+00129690: 532d 4164 6472 6573 7369 6e67 2070 6c75 S-Addressing plu\n+001296a0: 6769 6e3c 2f61 3e2c 2061 6e64 2074 6865 gin, and the\n+001296b0: 203c 636f 6465 3e6e 735f 5f73 656e 6453 ns__sendS\n+001296c0: 7472 696e 673c 2f63 6f64 653e 2066 756e tring fun\n+001296d0: 6374 696f 6e20 6469 7363 7573 7365 6420 ction discussed \n+001296e0: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Using WS-Addre\n+00129720: 7373 696e 6720 7769 7468 2053 4f41 502d ssing with SOAP-\n+00129730: 6f76 6572 2d55 4450 3c2f 613e 2e3c 2f70 over-UDP..

    #include &q\n+00129790: 756f 743b 706c 7567 696e 2f77 7361 6170 uot;plugin/wsaap\n+001297a0: 692e 6826 7175 6f74 3b3c 2f73 7061 6e3e i.h"\n+001297b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n 001297d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    struct soap\n-00129850: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00129880: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-001298f0: 736f 6170 5f69 6e69 743c 2f61 3e28 2661 soap_init(&a\n-00129900: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .soap_register_\n-001299b0: 706c 7567 696e 3c2f 613e 2826 616d 703b plugin(&\n-001299c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001299f0: 2073 6f61 705f 7773 6129 3b3c 2f64 6976 soap_wsa);.
    soap<\n-00129a40: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.sen\n-00129a90: 645f 7469 6d65 6f75 743c 2f61 3e20 3d20 d_timeout = \n-00129aa0: 353b 203c 7370 616e 2063 6c61 7373 3d22 5; // 5 se\n-00129ac0: 636f 6e64 7320 6d61 7820 736f 636b 6574 conds max socket\n-00129ad0: 2064 656c 6179 203c 2f73 7061 6e3e 3c2f delay .
    // \n-00129b10: 7365 7420 7570 2057 532d 4164 6472 6573 set up WS-Addres\n-00129b20: 7369 6e67 2068 6561 6465 723c 2f73 7061 sing header
    .
    soap_\n-00129b50: 7773 615f 7265 7175 6573 7428 2661 6d70 wsa_request(&\n-00129b60: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-00129b90: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00129bb0: 756f 743b 6d65 7373 6167 6520 4944 2671 uot;message ID&q\n-00129bc0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "e\n-00129bf0: 6e64 706f 696e 7426 7175 6f74 3b3c 2f73 ndpoint", "SOAP act\n-00129c30: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion"\n-00129c40: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    // Send the mes\n-00129c80: 7361 6765 206f 7665 7220 5544 503a 203c sage over UDP: <\n-00129c90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-00129cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00129cc0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_send_ns\n-00129ce0: 5f5f 6563 686f 5374 7269 6e67 2826 616d __echoString(&am\n-00129cf0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, &\n-00129d40: 7175 6f74 3b73 6f61 702e 7564 703a 2f2f quot;soap.udp://\n-00129d50: 656e 6470 6f69 6e74 2671 756f 743b 3c2f endpoint", "SOAP ac\n-00129d90: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion", &\n-00129dc0: 7175 6f74 3b68 656c 6c6f 2077 6f72 6c64 quot;hello world\n-00129dd0: 2126 7175 6f74 3b3c 2f73 7061 6e3e 2929 !"))\n-00129de0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s\n-00129e50: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault<\n-00129e60: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-00129e90: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n-00129ea0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // erro\n-00129ec0: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    .\n-00129ed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_dest\n-00129f40: 726f 793c 2f61 3e28 2661 6d70 3b3c 6120 roy(&soap);.
    soap\n-00129ff0: 5f65 6e64 3c2f 613e 2826 616d 703b 3c61 _end(&soap);<\n-0012a030: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n-0012a0a0: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(&\n-0012a0b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0012a0e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n-0012a150: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_regi\n-0012a1a0: 7374 6572 5f70 6c75 6769 6e3c 2f61 3e3c ster_plugin<\n-0012a1b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa\n-0012a1d0: 705f 7265 6769 7374 6572 5f70 6c75 6769 p_register_plugi\n-0012a1e0: 6e28 7374 7275 6374 2073 6f61 7020 2a73 n(struct soap *s\n-0012a1f0: 6f61 702c 2069 6e74 282a 6663 7265 6174 oap, int(*fcreat\n-0012a200: 6529 2873 7472 7563 7420 736f 6170 202a e)(struct soap *\n-0012a210: 2c20 7374 7275 6374 2073 6f61 705f 706c , struct soap_pl\n-0012a220: 7567 696e 202a 2c20 766f 6964 202a 2929 ugin *, void *))\n-0012a230: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Registe\n-0012a250: 7220 6120 706c 7567 696e 2e3c 2f64 6976 r a plugin.
    .
    <\n-0012a280: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-0012a2a0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-0012a2b0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .C\n-0012a2e0: 6c69 656e 742d 7369 6465 206f 6e65 2d77 lient-side one-w\n-0012a2f0: 6179 2055 4450 206d 756c 7469 6361 7374 ay UDP multicast\n-0012a300: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6578

    .

    This ex\n-0012a310: 616d 706c 6520 6973 2073 696d 696c 6172 ample is similar\n-0012a320: 2074 6f20 7468 6520 6f6e 652d 7761 7920 to the one-way \n-0012a330: 756e 6963 6173 7420 6578 616d 706c 6520 unicast example \n-0012a340: 6469 7363 7573 7365 6420 6162 6f76 652c discussed above,\n-0012a350: 2062 7574 2075 7365 7320 6120 6272 6f61 but uses a broa\n-0012a360: 6463 6173 7420 6164 6472 6573 7320 616e dcast address an\n-0012a370: 6420 7468 6520 3c63 6f64 653e 534f 5f42 d the SO_B\n-0012a380: 524f 4144 4341 5354 3c2f 636f 6465 3e20 ROADCAST \n-0012a390: 736f 636b 6574 206f 7074 696f 6e3a 3c2f socket option:.

    #include &\n-0012a3f0: 7175 6f74 3b70 6c75 6769 6e2f 7773 6161 quot;plugin/wsaa\n-0012a400: 7069 2e68 2671 756f 743b 3c2f 7370 616e pi.h"
    .
    ..\n-0012a4d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    in_addr_t addr\n-0012a4f0: 203d 2069 6e65 745f 6164 6472 283c 7370 = inet_addr("1\n-0012a520: 2e32 2e33 2e34 2671 756f 743b 3c2f 7370 .2.3.4"); // o\n-0012a550: 7074 696f 6e61 6c20 3c2f 7370 616e 3e3c ptional <\n-0012a560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n-0012a5d0: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(&\n-0012a5e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0012a610: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..<\n-0012a6e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012a6f0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0012a720: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .send_t\n-0012a770: 696d 656f 7574 3c2f 613e 203d 2035 3b20 imeout = 5; \n-0012a780: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // 5 secon\n-0012a7a0: 6473 206d 6178 2073 6f63 6b65 7420 6465 ds max socket de\n-0012a7b0: 6c61 793c 2f73 7061 6e3e 3c2f 6469 763e lay
    \n-0012a7c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.conn\n-0012a850: 6563 745f 666c 6167 733c 2f61 3e20 3d20 ect_flags = \n-0012a860: 534f 5f42 524f 4144 4341 5354 3b20 3c73 SO_BROADCAST; // required \n-0012a890: 666f 7220 6272 6f61 6463 6173 7420 3c2f for broadcast
    .soap.ipv4_mult\n-0012a940: 6963 6173 745f 6966 3c2f 613e 203d 2026 icast_if = &\n-0012a950: 616d 703b 6164 6472 3b20 3c73 7061 6e20 amp;addr; \n-0012a970: 2f2f 206f 7074 696f 6e61 6c20 666f 7220 // optional for \n-0012a980: 4950 7634 3a20 7365 6520 7365 7473 6f63 IPv4: see setsoc\n-0012a990: 6b6f 7074 2049 5050 524f 544f 5f49 5020 kopt IPPROTO_IP \n-0012a9a0: 4950 5f4d 554c 5449 4341 5354 5f49 4620 IP_MULTICAST_IF \n-0012a9b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0012a9d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-0012aa00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 ipv6_mu\n-0012aa50: 6c74 6963 6173 745f 6966 3c2f 613e 203d lticast_if =\n-0012aa60: 2061 6464 723b 203c 7370 616e 2063 6c61 addr; // \n-0012aa80: 6f70 7469 6f6e 616c 2066 6f72 2049 5076 optional for IPv\n-0012aa90: 363a 206d 756c 7469 6361 7374 2073 696e 6: multicast sin\n-0012aaa0: 365f 7363 6f70 655f 6964 203c 2f73 7061 6_scope_id
    .
    soap.ipv4_multica\n-0012ab50: 7374 5f74 746c 3c2f 613e 203d 2031 3b20 st_ttl = 1; \n-0012ab60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona\n-0012ab80: 6c2c 2073 6565 2073 6574 736f 636b 6f70 l, see setsockop\n-0012ab90: 7420 4950 5052 4f54 4f5f 4950 2c20 4950 t IPPROTO_IP, IP\n-0012aba0: 5f4d 554c 5449 4341 5354 5f54 544c 203c _MULTICAST_TTL <\n-0012abb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0012abd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012abe0: 656e 7422 3e2f 2f20 7365 7420 7570 2057 ent\">// set up W\n-0012abf0: 532d 4164 6472 6573 7369 6e67 2068 6561 S-Addressing hea\n-0012ac00: 6465 723c 2f73 7061 6e3e 3c2f 6469 763e der
    \n-0012ac10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_wsa_requ\n-0012ac30: 6573 7428 2661 6d70 3b3c 6120 636c 6173 est(&\n-0012ac60: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "mess\n-0012ac90: 6167 6520 4944 2671 756f 743b 3c2f 7370 age ID", "endpoint&\n-0012acd0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n-0012ad00: 534f 4150 2061 6374 696f 6e26 7175 6f74 SOAP action"\n-0012ad10: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
    \n-0012ad20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // Send\n-0012ad50: 2074 6865 206d 6573 7361 6765 206f 7665 the message ove\n-0012ad60: 7220 5544 5020 746f 2061 2062 726f 6164 r UDP to a broad\n-0012ad70: 6361 7374 2061 6464 7265 7373 3a20 3c2f cast address:
    .if (soap_send_ns_\n-0012add0: 5f65 6368 6f53 7472 696e 6728 2661 6d70 _echoString(&\n-0012ade0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012ae10: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0012ae30: 756f 743b 736f 6170 2e75 6470 3a2f 2f65 uot;soap.udp://e\n-0012ae40: 6e64 706f 696e 7426 7175 6f74 3b3c 2f73 ndpoint", "SOAP act\n-0012ae80: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion"\n-0012ae90: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0012aeb0: 756f 743b 6865 6c6c 6f20 776f 726c 6421 uot;hello world!\n-0012aec0: 2671 756f 743b 3c2f 7370 616e 3e29 2920 ")) \n-0012aed0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n-0012af40: 6170 5f70 7269 6e74 5f66 6175 6c74 3c2f ap_print_fault(&s\n-0012af80: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr)\n-0012af90: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // repor\n-0012afb0: 7420 6572 726f 7220 3c2f 7370 616e 3e3c t error <\n-0012afc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n-0012b030: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a\n-0012b040: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    soap_end(&\n-0012b0f0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-0012b120: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .soap_done\n-0012b1a0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-0012b1d0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-0012b2d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n-0012b2f0: 6520 7661 6c75 6520 746f 2073 6574 2073 e value to set s\n-0012b300: 6f63 6b61 6464 725f 696e 363a 3a73 696e ockaddr_in6::sin\n-0012b310: 365f 7363 6f70 655f 6964 2077 6865 6e20 6_scope_id when \n-0012b320: 6e6f 6e7a 6572 6f2e 3c2f 6469 763e 3c64 nonzero.
    Definition:<\n-0012b350: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n-0012b360: 3539 323c 2f64 6976 3e3c 2f64 6976 3e0a 592
    .\n-0012b370: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::c\n-0012b410: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n-0012b420: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int co\n-0012b440: 6e6e 6563 745f 666c 6167 733c 2f64 6976 nnect_flags
    User-definab\n-0012b470: 6c65 2073 6574 736f 636b 6f70 7420 6c65 le setsockopt le\n-0012b480: 7665 6c20 534f 4c5f 534f 434b 4554 2066 vel SOL_SOCKET f\n-0012b490: 6c61 6773 2077 6865 6e20 636f 6e6e 6563 lags when connec\n-0012b4a0: 7469 6e67 2073 6f61 703a 3a73 6f63 6b65 ting soap::socke\n-0012b4b0: 7420 746f 2061 2073 6572 7665 7220 2874 t to a server (t\n-0012b4c0: 6865 2076 616c 7565 202e 2e2e 3c2f 6469 he value ...
    Definiti\n-0012b4f0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0012b500: 2e68 3a33 3337 373c 2f64 6976 3e3c 2f64 .h:3377
    .<\n-0012b5d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0012b5e0: 6922 3e75 6e73 6967 6e65 6420 6368 6172 i\">unsigned char\n-0012b5f0: 2069 7076 345f 6d75 6c74 6963 6173 745f ipv4_multicast_\n-0012b600: 7474 6c3c 2f64 6976 3e3c 6469 7620 636c ttl
    User\n-0012b620: 2d64 6566 696e 6162 6c65 2076 616c 7565 -definable value\n-0012b630: 2074 6f20 7365 7420 7365 7473 6f63 6b6f to set setsocko\n-0012b640: 7074 206c 6576 656c 2049 5050 524f 544f pt level IPPROTO\n-0012b650: 5f49 5020 746f 2049 505f 4d55 4c54 4943 _IP to IP_MULTIC\n-0012b660: 4153 545f 5454 4c20 7768 656e 206e 6f6e AST_TTL when non\n-0012b670: 7a65 726f 2e3c 2f64 6976 3e3c 6469 7620 zero.
    Definition:\n-0012b6a0: 2073 7464 736f 6170 322e 683a 3336 3230 stdsoap2.h:3620\n-0012b6b0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    .

    Please re\n-0012b880: 6665 7220 746f 2074 6865 2073 6f63 6b65 fer to the socke\n-0012b890: 7420 6f70 7469 6f6e 7320 666f 7220 3c63 t options for IPPROTO_IP IP_M\n-0012b8c0: 554c 5449 4341 5354 5f49 463c 2f63 6f64 ULTICAST_IF to specify th\n-0012b8e0: 6520 6465 6661 756c 7420 696e 7465 7266 e default interf\n-0012b8f0: 6163 6520 666f 7220 6d75 6c74 6963 6173 ace for multicas\n-0012b900: 7420 6461 7461 6772 616d 7320 746f 2062 t datagrams to b\n-0012b910: 6520 7365 6e74 2066 726f 6d2e 2054 6869 e sent from. Thi\n-0012b920: 7320 6973 2061 203c 636f 6465 3e73 7472 s is a str\n-0012b930: 7563 7420 696e 5f61 6464 723c 2f63 6f64 uct in_addr (in_add\n-0012b950: 725f 743c 2f63 6f64 653e 2066 6f72 203c r_t for <\n-0012b960: 636f 6465 3e73 696e 365f 7363 6f70 655f code>sin6_scope_\n-0012b970: 6964 3c2f 636f 6465 3e29 2069 6e74 6572 id) inter\n-0012b980: 6661 6365 2076 616c 7565 2e20 4f74 6865 face value. Othe\n-0012b990: 7277 6973 652c 2074 6865 2064 6566 6175 rwise, the defau\n-0012b9a0: 6c74 2069 6e74 6572 6661 6365 2073 6574 lt interface set\n-0012b9b0: 2062 7920 7468 6520 7379 7374 656d 2061 by the system a\n-0012b9c0: 646d 696e 6973 7472 6174 6f72 2077 696c dministrator wil\n-0012b9d0: 6c20 6265 2075 7365 6420 2869 6620 616e l be used (if an\n-0012b9e0: 7929 2e3c 2f70 3e0a 3c70 3e50 6c65 6173 y).

    .

    Pleas\n-0012b9f0: 6520 7265 6665 7220 746f 2074 6865 2073 e refer to the s\n-0012ba00: 6f63 6b65 7420 6f70 7469 6f6e 7320 666f ocket options fo\n-0012ba10: 7220 3c63 6f64 653e 4950 5052 4f54 4f5f r IPPROTO_\n-0012ba20: 4950 3c2f 636f 6465 3e20 3c63 6f64 653e IP \n-0012ba30: 4950 5f4d 554c 5449 4341 5354 5f54 544c IP_MULTICAST_TTL\n-0012ba40: 3c2f 636f 6465 3e20 746f 206c 696d 6974 to limit\n-0012ba50: 2074 6865 206c 6966 6574 696d 6520 6f66 the lifetime of\n-0012ba60: 2074 6865 2070 6163 6b65 742e 204d 756c the packet. Mul\n-0012ba70: 7469 6361 7374 2064 6174 6167 7261 6d73 ticast datagrams\n-0012ba80: 2061 7265 2073 656e 7420 7769 7468 2061 are sent with a\n-0012ba90: 2064 6566 6175 6c74 2076 616c 7565 206f default value o\n-0012baa0: 6620 312c 2074 6f20 7072 6576 656e 7420 f 1, to prevent \n-0012bab0: 7468 656d 2074 6f20 6265 2066 6f72 7761 them to be forwa\n-0012bac0: 7264 6564 2062 6579 6f6e 6420 7468 6520 rded beyond the \n-0012bad0: 6c6f 6361 6c20 6e65 7477 6f72 6b2e 2054 local network. T\n-0012bae0: 6869 7320 7061 7261 6d65 7465 7220 6361 his parameter ca\n-0012baf0: 6e20 6265 2073 6574 2062 6574 7765 656e n be set between\n-0012bb00: 2031 2074 6f20 3235 352e 3c2f 703e 0a3c 1 to 255.

    .<\n-0012bb10: 703e f09f 949d 203c 6120 6872 6566 3d22 p>....
    Back to table\n-0012bb30: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-0012bb40: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .Clie\n-0012bb80: 6e74 2d73 6964 6520 7265 7175 6573 742d nt-side request-\n-0012bb90: 7265 7370 6f6e 7365 2055 4450 2075 6e69 response UDP uni\n-0012bba0: 6361 7374 3c2f 6833 3e0a 3c70 3e54 6869 cast

    .

    Thi\n-0012bbb0: 7320 6578 616d 706c 6520 6173 7375 6d65 s example assume\n-0012bbc0: 7320 7468 6174 2074 6865 2069 6e74 6572 s that the inter\n-0012bbd0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-0012bbe0: 2066 6f72 2073 6f61 7063 7070 3220 696e for soapcpp2 in\n-0012bbf0: 636c 7564 6573 2074 6865 2053 4f41 5020 cludes the SOAP \n-0012bc00: 4865 6164 6572 2077 6974 6820 5753 2d41 Header with WS-A\n-0012bc10: 6464 7265 7373 696e 6720 656c 656d 656e ddressing elemen\n-0012bc20: 7473 2069 6d70 6f72 7465 6420 7769 7468 ts imported with\n-0012bc30: 203c 636f 6465 3e23 696d 706f 7274 2022 #import \"\n-0012bc40: 7773 612e 6822 3c2f 636f 6465 3e20 616e wsa.h\" an\n-0012bc50: 6420 7468 6520 3c63 6f64 653e 6e73 5f5f d the ns__\n-0012bc60: 6563 686f 5374 7269 6e67 3c2f 636f 6465 echoString function discu\n-0012bc80: 7373 6564 2069 6e20 5365 6374 696f 6e20 ssed in Section \n-0012bc90: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Using WS-\n-0012bcc0: 4164 6472 6573 7369 6e67 2077 6974 6820 Addressing with \n-0012bcd0: 534f 4150 2d6f 7665 722d 5544 503c 2f61 SOAP-over-UDP .

    .
    \n-0012bd10: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n-0012bd30: 7564 6520 2671 756f 743b 706c 7567 696e ude "plugin\n-0012bd40: 2f77 7361 6170 692e 6826 7175 6f74 3b3c /wsaapi.h"<\n-0012bd50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-0012bd70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n-0012bda0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    str\n-0012be40: 7563 7420 3c2f 7370 616e 3e77 7361 5f5f uct wsa__\n-0012be50: 456e 6470 6f69 6e74 5265 6665 7265 6e63 EndpointReferenc\n-0012be60: 6554 7970 6520 7265 706c 7954 6f3b 203c eType replyTo; <\n-0012be70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012be80: 656e 7422 3e2f 2f20 2861 6e6f 6e79 6d6f ent\">// (anonymo\n-0012be90: 7573 2920 7265 706c 7920 6164 6472 6573 us) reply addres\n-0012bea0: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
    .\n-0012beb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    char\n-0012bee0: 3c2f 7370 616e 3e20 2a72 6573 3b20 3c73 *res; // server re\n-0012bf10: 7370 6f6e 7365 203c 2f73 7061 6e3e 3c2f sponse .
    soap\n-0012bf90: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n-0012bfa0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012bfb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012bfc0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-0012bfd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..\n-0012c0b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-0012c0e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 send_ti\n-0012c130: 6d65 6f75 743c 2f61 3e20 3d20 353b 203c meout = 5; <\n-0012c140: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012c150: 656e 7422 3e2f 2f20 3520 7365 636f 6e64 ent\">// 5 second\n-0012c160: 7320 6d61 7820 736f 636b 6574 2064 656c s max socket del\n-0012c170: 6179 203c 2f73 7061 6e3e 3c2f 6469 763e ay
    \n-0012c180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.recv\n-0012c210: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5\n-0012c220: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec\n-0012c240: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket \n-0012c250: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    // s\n-0012c290: 6574 2075 7020 5753 2d41 6464 7265 7373 et up WS-Address\n-0012c2a0: 696e 6720 6865 6164 6572 3c2f 7370 616e ing header
    .
    soap_w\n-0012c2d0: 7361 5f72 6571 7565 7374 2826 616d 703b sa_request(&\n-0012c2e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012c310: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0012c330: 6f74 3b6d 6573 7361 6765 2049 4426 7175 ot;message ID&qu\n-0012c340: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "en\n-0012c370: 6470 6f69 6e74 2671 756f 743b 3c2f 7370 dpoint", "SOAP acti\n-0012c3b0: 6f6e 2671 756f 743b 3c2f 7370 616e 3e29 on")\n-0012c3c0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_w\n-0012c3e0: 7361 5f61 6464 5f52 6570 6c79 546f 2826 sa_add_ReplyTo(&\n-0012c3f0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-0012c420: 2f61 3e2c 204e 554c 4c29 3b20 3c73 7061 /a>, NULL); // anonymous R\n-0012c450: 6570 6c79 546f 2061 6464 7265 7373 3c2f eplyTo address
    .// Send and \n-0012c4a0: 7265 6365 6976 6520 6d65 7373 6167 6573 receive messages\n-0012c4b0: 206f 7665 7220 5544 503a 203c 2f73 7061 over UDP:
    .
    if (\n-0012c500: 736f 6170 5f63 616c 6c5f 6e73 5f5f 6563 soap_call_ns__ec\n-0012c510: 686f 5374 7269 6e67 2826 616d 703b 3c61 hoString(&soap, <\n-0012c550: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012c560: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0012c570: 3b73 6f61 702e 7564 703a 2f2f 656e 6470 ;soap.udp://endp\n-0012c580: 6f69 6e74 2026 7175 6f74 3b3c 2f73 7061 oint "SOAP action",\n-0012c5c0: 2026 7175 6f74 3b3c 2f73 7061 6e3e 6865 "he\n-0012c5d0: 6c6c 6f20 776f 726c 6421 3c73 7061 6e20 llo world!", &a\n-0012c600: 6d70 3b72 6573 2929 203c 2f73 7061 6e3e mp;res)) \n-0012c610: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    if (soap.err\n-0012c690: 6f72 203d 3d20 534f 4150 5f45 4f46 2026 or == SOAP_EOF &\n-0012c6a0: 616d 703b 2661 6d70 3b20 736f 6170 2e65 amp;& soap.e\n-0012c6b0: 7272 6e75 6d20 3d3d 2030 2920 3c2f 7370 rrnum == 0)
    .
    ... \n-0012c700: 2f2f 2054 696d 656f 7574 3a20 6e6f 2072 // Timeout: no r\n-0012c710: 6573 706f 6e73 6520 6672 6f6d 2073 6572 esponse from ser\n-0012c720: 7665 7220 286d 6573 7361 6765 2061 6c72 ver (message alr\n-0012c730: 6561 6479 2064 656c 6976 6572 6564 3f29 eady delivered?)\n-0012c740: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-0012c750: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012c760: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 > e\n-0012c780: 6c73 6520 3c2f 7370 616e 3e3c 2f64 6976 lse .
    \n-0012c7c0: 2020 2020 736f 6170 5f70 7269 6e74 5f66 soap_print_f\n-0012c7d0: 6175 6c74 2826 616d 703b 736f 6170 2c20 ault(&soap, \n-0012c7e0: 7374 6465 7272 293b 203c 2f73 7061 6e3e stderr); \n-0012c7f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    else <\n-0012c870: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // UDP\n-0012c8b0: 2073 6572 7665 7220 7265 7370 6f6e 7365 server response\n-0012c8c0: 2069 7320 7374 6f72 6564 2069 6e20 2623 is stored in &#\n-0012c8d0: 3339 3b72 6573 2623 3339 3b20 3c2f 7370 39;res'
    .
    // check\n-0012c920: 2053 4f41 5020 6865 6164 6572 2072 6563 SOAP header rec\n-0012c930: 6569 7665 642c 2069 6620 6170 706c 6963 eived, if applic\n-0012c940: 6162 6c65 203c 2f73 7061 6e3e 3c2f 6469 able .
    check_header(&a\n-0012c990: 6d70 3b73 6f61 702e 6865 6164 6572 293b mp;soap.header);\n-0012c9a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-0012c9b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012c9c0: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 >soa\n-0012c9e0: 705f 6465 7374 726f 7928 2661 6d70 3b73 p_destroy(&s\n-0012c9f0: 6f61 7029 3b3c 2f73 7061 6e3e 3c2f 6469 oap);.
    soap_end(&s\n-0012ca40: 6f61 7029 3b3c 2f73 7061 6e3e 3c2f 6469 oap);.
    soap_done(&\n-0012ca90: 736f 6170 293b 3c2f 7370 616e 3e3c 2f64 soap);.

    ..\n-0012cac0: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B\n-0012cad0: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of \n-0012cae0: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    \n-0012caf0: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    .Client\n-0012cb30: 2d73 6964 6520 7265 7175 6573 742d 7265 -side request-re\n-0012cb40: 7370 6f6e 7365 206d 756c 7469 6361 7374 sponse multicast\n-0012cb50: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6578

    .

    This ex\n-0012cb60: 616d 706c 6520 6973 2073 696d 696c 6172 ample is similar\n-0012cb70: 2074 6f20 7468 6520 7265 7175 6573 742d to the request-\n-0012cb80: 7265 7370 6f6e 7365 2075 6e69 6361 7374 response unicast\n-0012cb90: 2065 7861 6d70 6c65 2064 6973 6375 7373 example discuss\n-0012cba0: 6564 2061 626f 7665 2c20 6275 7420 7573 ed above, but us\n-0012cbb0: 6573 2061 2062 726f 6164 6361 7374 2061 es a broadcast a\n-0012cbc0: 6464 7265 7373 2061 6e64 2074 6865 203c ddress and the <\n-0012cbd0: 636f 6465 3e53 4f5f 4252 4f41 4443 4153 code>SO_BROADCAS\n-0012cbe0: 543c 2f63 6f64 653e 2073 6f63 6b65 7420 T socket \n-0012cbf0: 6f70 7469 6f6e 2e20 4265 6361 7573 6520 option. Because \n-0012cc00: 7765 2065 7870 6563 7420 746f 2072 6563 we expect to rec\n-0012cc10: 6569 7665 206d 756c 7469 706c 6520 7265 eive multiple re\n-0012cc20: 7370 6f6e 7365 732c 2077 6520 616c 736f sponses, we also\n-0012cc30: 206e 6565 6420 746f 2075 7365 2073 6570 need to use sep\n-0012cc40: 6172 6174 6520 7265 7175 6573 742d 7265 arate request-re\n-0012cc50: 7370 6f6e 7365 206d 6573 7361 6765 7320 sponse messages \n-0012cc60: 746f 2073 656e 6420 6f6e 6520 7265 7175 to send one requ\n-0012cc70: 6573 7420 616e 6420 636f 6e73 756d 6520 est and consume \n-0012cc80: 6d75 6c74 6970 6c65 2072 6573 706f 6e73 multiple respons\n-0012cc90: 6573 2e20 496e 2074 6869 7320 6578 616d es. In this exam\n-0012cca0: 706c 6520 7765 2064 6566 696e 6564 2061 ple we defined a\n-0012ccb0: 203c 636f 6465 3e62 6361 7374 5374 7269 bcastStri\n-0012ccc0: 6e67 3c2f 636f 6465 3e20 7265 7175 6573 ng reques\n-0012ccd0: 7420 616e 6420 6120 3c63 6f64 653e 6263 t and a bc\n-0012cce0: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons\n-0012ccf0: 653c 2f63 6f64 653e 2072 6573 706f 6e73 e respons\n-0012cd00: 6520 6d65 7373 6167 652c 2077 6869 6368 e message, which\n-0012cd10: 2061 7265 2065 7373 656e 7469 616c 6c79 are essentially\n-0012cd20: 2064 6563 6c61 7265 6420 6173 206f 6e65 declared as one\n-0012cd30: 2d77 6179 206d 6573 7361 6765 7320 696e -way messages in\n-0012cd40: 2074 6865 2068 6561 6465 7220 6669 6c65 the header file\n-0012cd50: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    //gsoap ns s\n-0012cda0: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he\n-0012cdb0: 6164 6572 2d70 6172 743a 2020 2020 2020 ader-part: \n-0012cdc0: 2020 2020 6263 6173 7453 7472 696e 6720 bcastString \n-0012cdd0: 7773 615f 5f4d 6573 7361 6765 4944 203c wsa__MessageID <\n-0012cde0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0012ce00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012ce10: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-0012ce20: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n-0012ce30: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: \n-0012ce40: 2020 2020 2062 6361 7374 5374 7269 6e67 bcastString\n-0012ce50: 2077 7361 5f5f 546f 203c 2f73 7061 6e3e wsa__To \n-0012ce60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-0012ce90: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-0012cea0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n-0012ceb0: 7061 7274 3a20 2020 2020 2020 2020 2062 part: b\n-0012cec0: 6361 7374 5374 7269 6e67 2077 7361 5f5f castString wsa__\n-0012ced0: 4163 7469 6f6e 203c 2f73 7061 6e3e 3c2f Action .
    //g\n-0012cf10: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-0012cf20: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa\n-0012cf30: 7274 3a20 2020 2020 2020 2020 2062 6361 rt: bca\n-0012cf40: 7374 5374 7269 6e67 2077 7361 5f5f 5265 stString wsa__Re\n-0012cf50: 706c 7954 6f20 3c2f 7370 616e 3e3c 2f64 plyTo .
    \n-0012cf90: 696e 743c 2f73 7061 6e3e 206e 735f 5f62 int ns__b\n-0012cfa0: 6361 7374 5374 7269 6e67 283c 7370 616e castString(char\n-0012cfd0: 202a 7374 722c 203c 7370 616e 2063 6c61 *str, void); <\n-0012d000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-0012d030: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-0012d040: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n-0012d050: 6172 743a 2020 2020 2020 2020 2020 6263 art: bc\n-0012d060: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons\n-0012d070: 6520 7773 615f 5f4d 6573 7361 6765 4944 e wsa__MessageID\n-0012d080: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-0012d090: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012d0a0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-0012d0c0: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n-0012d0d0: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: \n-0012d0e0: 2020 2020 2020 2062 6361 7374 5374 7269 bcastStri\n-0012d0f0: 6e67 5265 7370 6f6e 7365 2077 7361 5f5f ngResponse wsa__\n-0012d100: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
    \n-0012d110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-0012d140: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n-0012d150: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: \n-0012d160: 2020 2020 2020 2020 2062 6361 7374 5374 bcastSt\n-0012d170: 7269 6e67 5265 7370 6f6e 7365 2077 7361 ringResponse wsa\n-0012d180: 5f5f 4163 7469 6f6e 203c 2f73 7061 6e3e __Action \n-0012d190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-0012d1c0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-0012d1d0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n-0012d1e0: 7061 7274 3a20 2020 2020 2020 2020 2062 part: b\n-0012d1f0: 6361 7374 5374 7269 6e67 5265 7370 6f6e castStringRespon\n-0012d200: 7365 2077 7361 5f5f 5265 6c61 7465 7354 se wsa__RelatesT\n-0012d210: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
    .\n-0012d220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-0012d250: 2f73 7061 6e3e 206e 735f 5f62 6361 7374 /span> ns__bcast\n-0012d260: 5374 7269 6e67 5265 7370 6f6e 7365 283c StringResponse(<\n-0012d270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0012d280: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *res, void\n-0012d2c0: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    <\n-0012d2d0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0012d2e0: 3c70 3e54 6f20 6f62 7461 696e 2072 6573

    To obtain res\n-0012d2f0: 706f 6e73 6520 6f6e 652d 7761 7920 6f70 ponse one-way op\n-0012d300: 6572 6174 696f 6e73 2c20 7573 6520 3c61 erations, use wsdl2\n-0012d330: 6820 2d62 3c2f 636f 6465 3e3c 2f62 3e20 h -b \n-0012d340: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n-0012d350: 2d62 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 -b.

    .

    The cl\n-0012d370: 6965 6e74 2063 6f64 6520 696e 636c 7564 ient code includ\n-0012d380: 6573 2061 206c 6f6f 7020 746f 2072 6563 es a loop to rec\n-0012d390: 6569 7665 2072 6573 706f 6e73 6520 6d65 eive response me\n-0012d3a0: 7373 6167 6573 2075 6e74 696c 2061 2074 ssages until a t\n-0012d3b0: 696d 656f 7574 206f 6363 7572 733a 3c2f imeout occurs:.

    #include &\n-0012d410: 7175 6f74 3b70 6c75 6769 6e2f 7773 6161 quot;plugin/wsaa\n-0012d420: 7069 2e68 2671 756f 743b 3c2f 7370 616e pi.h"
    .
    ..\n-0012d4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-0012d520: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>SOAP_ENV__He\n-0012d570: 6164 6572 3c2f 613e 2068 6561 6465 723b ader header;\n-0012d580: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-0012d5b0: 7374 7275 6374 203c 2f73 7061 6e3e 7773 struct ws\n-0012d5c0: 615f 5f45 6e64 706f 696e 7452 6566 6572 a__EndpointRefer\n-0012d5d0: 656e 6365 5479 7065 2072 6570 6c79 546f enceType replyTo\n-0012d5e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    char\n-0012d620: 202a 7265 733b 203c 2f64 6976 3e0a 3c64 *res;
    .\n-0012d640: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_init(&s\n-0012d6d0: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n-0012d6e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_regi\n-0012d750: 7374 6572 5f70 6c75 6769 6e3c 2f61 3e28 ster_plugin(\n-0012d760: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-0012d790: 3c2f 613e 2c20 736f 6170 5f77 7361 293b , soap_wsa);\n-0012d7a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    soap.send_timeo\n-0012d8f0: 7574 3c2f 613e 203d 2035 3b20 3c73 7061 ut = 5; // 5 seconds m\n-0012d920: 6178 2073 6f63 6b65 7420 6465 6c61 7920 ax socket delay \n-0012d930: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0012d950: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-0012d980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 recv_ti\n-0012d9d0: 6d65 6f75 743c 2f61 3e20 3d20 353b 203c meout = 5; <\n-0012d9e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012d9f0: 656e 7422 3e2f 2f20 3520 7365 636f 6e64 ent\">// 5 second\n-0012da00: 7320 6d61 7820 736f 636b 6574 2064 656c s max socket del\n-0012da10: 6179 203c 2f73 7061 6e3e 3c2f 6469 763e ay
    \n-0012da20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // set \n-0012da50: 7570 2057 532d 4164 6472 6573 7369 6e67 up WS-Addressing\n-0012da60: 2068 6561 6465 723c 2f73 7061 6e3e 3c2f header.
    soap_wsa_\n-0012da90: 7265 7175 6573 7428 2661 6d70 3b3c 6120 request(&soap, "\n-0012daf0: 6d65 7373 6167 6520 4944 2671 756f 743b message ID"\n-0012db00: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "endpo\n-0012db30: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int"\n-0012db40: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0012db60: 756f 743b 534f 4150 2061 6374 696f 6e26 uot;SOAP action&\n-0012db70: 7175 6f74 3b3c 2f73 7061 6e3e 293b 3c2f quot;);.
    soap_wsa_\n-0012dba0: 6164 645f 5265 706c 7954 6f28 2661 6d70 add_ReplyTo(&\n-0012dbb0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012dbe0: 2c20 4e55 4c4c 293b 203c 7370 616e 2063 , NULL); /\n-0012dc00: 2f20 616e 6f6e 796d 6f75 7320 5265 706c / anonymous Repl\n-0012dc10: 7954 6f20 6164 6472 6573 733c 2f73 7061 yTo address
    .
    if (\n-0012dc60: 736f 6170 5f73 656e 645f 6e73 5f5f 6263 soap_send_ns__bc\n-0012dc70: 6173 7453 7472 696e 6728 2661 6d70 3b3c astString(&<\n-0012dc80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012dc90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012dca0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012dcb0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0012dcd0: 743b 736f 6170 2e75 6470 3a2f 2f65 6e64 t;soap.udp://end\n-0012dce0: 706f 696e 7426 7175 6f74 3b3c 2f73 7061 point", \n-0012dd10: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio\n-0012dd20: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-0012dd30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0012dd50: 743b 6865 6c6c 6f20 776f 726c 6421 2671 t;hello world!&q\n-0012dd60: 756f 743b 3c2f 7370 616e 3e29 2920 3c2f uot;)) struct \n+00129800: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+00129830: 6170 3c2f 613e 203c 6120 636c 6173 733d ap so\n+00129860: 6170 3c2f 613e 3b20 3c2f 6469 763e 0a3c ap;
    .<\n+00129870: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00129880: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_init<\n+001298e0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+00129910: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soap_reg\n+00129990: 6973 7465 725f 706c 7567 696e 3c2f 613e ister_plugin\n+001299a0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001299d0: 703c 2f61 3e2c 2073 6f61 705f 7773 6129 p, soap_wsa)\n+001299e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    ..
    // set up WS-\n+00129b00: 4164 6472 6573 7369 6e67 2068 6561 6465 Addressing heade\n+00129b10: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n+00129b20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00129b30: 3e73 6f61 705f 7773 615f 7265 7175 6573 >soap_wsa_reques\n+00129b40: 7428 2661 6d70 3b3c 6120 636c 6173 733d t(&
    so\n+00129b70: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "messag\n+00129ba0: 6520 4944 2671 756f 743b 3c2f 7370 616e e ID", &\n+00129bd0: 7175 6f74 3b65 6e64 706f 696e 7426 7175 quot;endpoint&qu\n+00129be0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "SO\n+00129c10: 4150 2061 6374 696f 6e26 7175 6f74 3b3c AP action"<\n+00129c20: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .<\n+00129c30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00129c40: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// Send t\n+00129c60: 6865 206d 6573 7361 6765 206f 7665 7220 he message over \n+00129c70: 5544 503a 203c 2f73 7061 6e3e 3c2f 6469 UDP: .
    i\n+00129cb0: 663c 2f73 7061 6e3e 2028 736f 6170 5f73 f (soap_s\n+00129cc0: 656e 645f 6e73 5f5f 6563 686f 5374 7269 end_ns__echoStri\n+00129cd0: 6e67 2826 616d 703b 3c61 2063 6c61 7373 ng(&s\n+00129d00: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "soap.\n+00129d30: 7564 703a 2f2f 656e 6470 6f69 6e74 2671 udp://endpoint&q\n+00129d40: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "S\n+00129d70: 4f41 5020 6163 7469 6f6e 2671 756f 743b OAP action"\n+00129d80: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "hello\n+00129db0: 2077 6f72 6c64 2126 7175 6f74 3b3c 2f73 world!"))
    .\n+00129de0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n+00129e40: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n+00129e50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00129e60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00129e70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00129e80: 7374 6465 7272 293b 203c 7370 616e 2063 stderr); /\n+00129ea0: 2f20 6572 726f 7220 3c2f 7370 616e 3e3c / error <\n+00129eb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+00129f20: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a\n+00129f30: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    soap_end(&\n+00129fe0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012a010: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .soap_done\n+0012a090: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012a0c0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .
    i\n+0012a1b0: 6e74 2073 6f61 705f 7265 6769 7374 6572 nt soap_register\n+0012a1c0: 5f70 6c75 6769 6e28 7374 7275 6374 2073 _plugin(struct s\n+0012a1d0: 6f61 7020 2a73 6f61 702c 2069 6e74 282a oap *soap, int(*\n+0012a1e0: 6663 7265 6174 6529 2873 7472 7563 7420 fcreate)(struct \n+0012a1f0: 736f 6170 202a 2c20 7374 7275 6374 2073 soap *, struct s\n+0012a200: 6f61 705f 706c 7567 696e 202a 2c20 766f oap_plugin *, vo\n+0012a210: 6964 202a 2929 3c2f 6469 763e 3c64 6976 id *))
    R\n+0012a230: 6567 6973 7465 7220 6120 706c 7567 696e egister a plugin\n+0012a240: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
    .

    .... Back to\n+0012a280: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+0012a290: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+0012a2a0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0012a2b0: 2069 643d 226d 756c 7469 6361 7374 223e id=\"multicast\">\n+0012a2c0: 3c2f 613e 0a43 6c69 656e 742d 7369 6465 .Client-side\n+0012a2d0: 206f 6e65 2d77 6179 2055 4450 206d 756c one-way UDP mul\n+0012a2e0: 7469 6361 7374 3c2f 6833 3e0a 3c70 3e54 ticast

    .

    T\n+0012a2f0: 6869 7320 6578 616d 706c 6520 6973 2073 his example is s\n+0012a300: 696d 696c 6172 2074 6f20 7468 6520 6f6e imilar to the on\n+0012a310: 652d 7761 7920 756e 6963 6173 7420 6578 e-way unicast ex\n+0012a320: 616d 706c 6520 6469 7363 7573 7365 6420 ample discussed \n+0012a330: 6162 6f76 652c 2062 7574 2075 7365 7320 above, but uses \n+0012a340: 6120 6272 6f61 6463 6173 7420 6164 6472 a broadcast addr\n+0012a350: 6573 7320 616e 6420 7468 6520 3c63 6f64 ess and the SO_BROADCAST socket opt\n+0012a380: 696f 6e3a 3c2f 703e 0a3c 6469 7620 636c ion:

    .
    <\n+0012a3a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012a3b0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+0012a3d0: 6c75 6465 2026 7175 6f74 3b70 6c75 6769 lude "plugi\n+0012a3e0: 6e2f 7773 6161 7069 2e68 2671 756f 743b n/wsaapi.h"\n+0012a3f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012a410: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+0012a440: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n+0012a4b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    in_addr_\n+0012a4d0: 7420 6164 6472 203d 2069 6e65 745f 6164 t addr = inet_ad\n+0012a4e0: 6472 283c 7370 616e 2063 6c61 7373 3d22 dr(&\n+0012a500: 7175 6f74 3b31 2e32 2e33 2e34 2671 756f quot;1.2.3.4&quo\n+0012a510: 743b 3c2f 7370 616e 3e29 3b20 3c73 7061 t;); // optional
    .soap_init\n+0012a5c0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012a5f0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n+0012a600: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012a610: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_regist\n+0012a670: 6572 5f70 6c75 6769 6e3c 2f61 3e28 2661 er_plugin(&a\n+0012a680: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, soap_wsa);.
    so\n+0012a700: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n+0012a750: 7365 6e64 5f74 696d 656f 7574 3c2f 613e send_timeout\n+0012a760: 203d 2035 3b20 3c73 7061 6e20 636c 6173 = 5; // 5\n+0012a780: 2073 6563 6f6e 6473 206d 6178 2073 6f63 seconds max soc\n+0012a790: 6b65 7420 6465 6c61 793c 2f73 7061 6e3e ket delay\n+0012a7a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0012a7e0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.connect_flags<\n+0012a840: 2f61 3e20 3d20 534f 5f42 524f 4144 4341 /a> = SO_BROADCA\n+0012a850: 5354 3b20 3c73 7061 6e20 636c 6173 733d ST; // req\n+0012a870: 7569 7265 6420 666f 7220 6272 6f61 6463 uired for broadc\n+0012a880: 6173 7420 3c2f 7370 616e 3e3c 2f64 6976 ast .
    soap<\n+0012a8d0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.ipv\n+0012a920: 345f 6d75 6c74 6963 6173 745f 6966 3c2f 4_multicast_if = &addr; \n+0012a940: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona\n+0012a960: 6c20 666f 7220 4950 7634 3a20 7365 6520 l for IPv4: see \n+0012a970: 7365 7473 6f63 6b6f 7074 2049 5050 524f setsockopt IPPRO\n+0012a980: 544f 5f49 5020 4950 5f4d 554c 5449 4341 TO_IP IP_MULTICA\n+0012a990: 5354 5f49 4620 3c2f 7370 616e 3e3c 2f64 ST_IF .
    soa\n+0012a9e0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.i\n+0012aa30: 7076 365f 6d75 6c74 6963 6173 745f 6966 pv6_multicast_if\n+0012aa40: 3c2f 613e 203d 2061 6464 723b 203c 7370 = addr; // optional f\n+0012aa70: 6f72 2049 5076 363a 206d 756c 7469 6361 or IPv6: multica\n+0012aa80: 7374 2073 696e 365f 7363 6f70 655f 6964 st sin6_scope_id\n+0012aa90: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012aaa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012aab0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+0012aae0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .ipv4_m\n+0012ab30: 756c 7469 6361 7374 5f74 746c 3c2f 613e ulticast_ttl\n+0012ab40: 203d 2031 3b20 3c73 7061 6e20 636c 6173 = 1; // o\n+0012ab60: 7074 696f 6e61 6c2c 2073 6565 2073 6574 ptional, see set\n+0012ab70: 736f 636b 6f70 7420 4950 5052 4f54 4f5f sockopt IPPROTO_\n+0012ab80: 4950 2c20 4950 5f4d 554c 5449 4341 5354 IP, IP_MULTICAST\n+0012ab90: 5f54 544c 203c 2f73 7061 6e3e 3c2f 6469 _TTL .
    // se\n+0012abd0: 7420 7570 2057 532d 4164 6472 6573 7369 t up WS-Addressi\n+0012abe0: 6e67 2068 6561 6465 723c 2f73 7061 6e3e ng header\n+0012abf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_ws\n+0012ac10: 615f 7265 7175 6573 7428 2661 6d70 3b3c a_request(&<\n+0012ac20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012ac30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012ac40: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0012ac50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0012ac70: 743b 6d65 7373 6167 6520 4944 2671 756f t;message ID&quo\n+0012ac80: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "end\n+0012acb0: 706f 696e 7426 7175 6f74 3b3c 2f73 7061 point", \n+0012ace0: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio\n+0012acf0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 293b n");\n+0012ad00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+0012ad30: 2f20 5365 6e64 2074 6865 206d 6573 7361 / Send the messa\n+0012ad40: 6765 206f 7665 7220 5544 5020 746f 2061 ge over UDP to a\n+0012ad50: 2062 726f 6164 6361 7374 2061 6464 7265 broadcast addre\n+0012ad60: 7373 3a20 3c2f 7370 616e 3e3c 2f64 6976 ss: .
    if\n+0012ada0: 3c2f 7370 616e 3e20 2873 6f61 705f 7365 (soap_se\n+0012adb0: 6e64 5f6e 735f 5f65 6368 6f53 7472 696e nd_ns__echoStrin\n+0012adc0: 6728 2661 6d70 3b3c 6120 636c 6173 733d g(&so\n+0012adf0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "soap.u\n+0012ae20: 6470 3a2f 2f65 6e64 706f 696e 7426 7175 dp://endpoint&qu\n+0012ae30: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "SO\n+0012ae60: 4150 2061 6374 696f 6e26 7175 6f74 3b3c AP action"<\n+0012ae70: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "hello \n+0012aea0: 776f 726c 6421 2671 756f 743b 3c2f 7370 world!"))
    . \n+0012aed0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+0012af30: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n+0012af70: 7464 6572 7229 3b20 3c73 7061 6e20 636c tderr); //\n+0012af90: 2072 6570 6f72 7420 6572 726f 7220 3c2f report error
    .soap_destroy<\n+0012b020: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+0012b050: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n+0012b060: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_end\n+0012b0d0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    soap_do\n+0012b180: 6e65 3c2f 613e 2826 616d 703b 3c61 2063 ne(&soap);.unsigned int i\n+0012b2a0: 7076 365f 6d75 6c74 6963 6173 745f 6966 pv6_multicast_if\n+0012b2b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    User-de\n+0012b2d0: 6669 6e61 626c 6520 7661 6c75 6520 746f finable value to\n+0012b2e0: 2073 6574 2073 6f63 6b61 6464 725f 696e set sockaddr_in\n+0012b2f0: 363a 3a73 696e 365f 7363 6f70 655f 6964 6::sin6_scope_id\n+0012b300: 2077 6865 6e20 6e6f 6e7a 6572 6f2e 3c2f when nonzero.
    Defini\n+0012b330: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+0012b340: 7032 2e68 3a33 3539 323c 2f64 6976 3e3c p2.h:3592
    <\n+0012b350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+0012b3a0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+0012b3b0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+0012b3f0: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla\n+0012b400: 6773 3c2f 613e 3c2f 6469 763e 3c64 6976 gs
    \n+0012b420: 696e 7420 636f 6e6e 6563 745f 666c 6167 int connect_flag\n+0012b430: 733c 2f64 6976 3e3c 6469 7620 636c 6173 s
    User-d\n+0012b450: 6566 696e 6162 6c65 2073 6574 736f 636b efinable setsock\n+0012b460: 6f70 7420 6c65 7665 6c20 534f 4c5f 534f opt level SOL_SO\n+0012b470: 434b 4554 2066 6c61 6773 2077 6865 6e20 CKET flags when \n+0012b480: 636f 6e6e 6563 7469 6e67 2073 6f61 703a connecting soap:\n+0012b490: 3a73 6f63 6b65 7420 746f 2061 2073 6572 :socket to a ser\n+0012b4a0: 7665 7220 2874 6865 2076 616c 7565 202e ver (the value .\n+0012b4b0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De\n+0012b4d0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+0012b4e0: 6473 6f61 7032 2e68 3a33 3337 373c 2f64 dsoap2.h:3377
    .
    soap::ipv4_mu\n+0012b5a0: 6c74 6963 6173 745f 7474 6c3c 2f61 3e3c lticast_ttl<\n+0012b5b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    unsigne\n+0012b5d0: 6420 6368 6172 2069 7076 345f 6d75 6c74 d char ipv4_mult\n+0012b5e0: 6963 6173 745f 7474 6c3c 2f64 6976 3e3c icast_ttl
    <\n+0012b5f0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0012b600: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+0012b610: 2076 616c 7565 2074 6f20 7365 7420 7365 value to set se\n+0012b620: 7473 6f63 6b6f 7074 206c 6576 656c 2049 tsockopt level I\n+0012b630: 5050 524f 544f 5f49 5020 746f 2049 505f PPROTO_IP to IP_\n+0012b640: 4d55 4c54 4943 4153 545f 5454 4c20 7768 MULTICAST_TTL wh\n+0012b650: 656e 206e 6f6e 7a65 726f 2e3c 2f64 6976 en nonzero.
    Definitio\n+0012b680: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0012b690: 683a 3336 3230 3c2f 6469 763e 3c2f 6469 h:3620
    .char * ipv4_mul\n+0012b780: 7469 6361 7374 5f69 663c 2f64 6976 3e3c ticast_if
    <\n+0012b790: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0012b7a0: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+0012b7b0: 2076 616c 7565 2074 6f20 7365 7420 7365 value to set se\n+0012b7c0: 7473 6f63 6b6f 7074 206c 6576 656c 2049 tsockopt level I\n+0012b7d0: 5050 524f 544f 5f49 5020 746f 2049 505f PPROTO_IP to IP_\n+0012b7e0: 4d55 4c54 4943 4153 545f 4946 2077 6865 MULTICAST_IF whe\n+0012b7f0: 6e20 6e6f 6e2d 4e55 4c4c 2e3c 2f64 6976 n non-NULL.
    Definitio\n+0012b820: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0012b830: 683a 3335 3939 3c2f 6469 763e 3c2f 6469 h:3599
    .

    Ple\n+0012b860: 6173 6520 7265 6665 7220 746f 2074 6865 ase refer to the\n+0012b870: 2073 6f63 6b65 7420 6f70 7469 6f6e 7320 socket options \n+0012b880: 666f 7220 3c63 6f64 653e 4950 5052 4f54 for IPPROT\n+0012b890: 4f5f 4950 3c2f 636f 6465 3e20 3c63 6f64 O_IP IP_MULTICAST_I\n+0012b8b0: 463c 2f63 6f64 653e 2074 6f20 7370 6563 F to spec\n+0012b8c0: 6966 7920 7468 6520 6465 6661 756c 7420 ify the default \n+0012b8d0: 696e 7465 7266 6163 6520 666f 7220 6d75 interface for mu\n+0012b8e0: 6c74 6963 6173 7420 6461 7461 6772 616d lticast datagram\n+0012b8f0: 7320 746f 2062 6520 7365 6e74 2066 726f s to be sent fro\n+0012b900: 6d2e 2054 6869 7320 6973 2061 203c 636f m. This is a struct in_add\n+0012b920: 723c 2f63 6f64 653e 2028 3c63 6f64 653e r (\n+0012b930: 696e 5f61 6464 725f 743c 2f63 6f64 653e in_addr_t\n+0012b940: 2066 6f72 203c 636f 6465 3e73 696e 365f for sin6_\n+0012b950: 7363 6f70 655f 6964 3c2f 636f 6465 3e29 scope_id)\n+0012b960: 2069 6e74 6572 6661 6365 2076 616c 7565 interface value\n+0012b970: 2e20 4f74 6865 7277 6973 652c 2074 6865 . Otherwise, the\n+0012b980: 2064 6566 6175 6c74 2069 6e74 6572 6661 default interfa\n+0012b990: 6365 2073 6574 2062 7920 7468 6520 7379 ce set by the sy\n+0012b9a0: 7374 656d 2061 646d 696e 6973 7472 6174 stem administrat\n+0012b9b0: 6f72 2077 696c 6c20 6265 2075 7365 6420 or will be used \n+0012b9c0: 2869 6620 616e 7929 2e3c 2f70 3e0a 3c70 (if any).

    .Please refer to\n+0012b9e0: 2074 6865 2073 6f63 6b65 7420 6f70 7469 the socket opti\n+0012b9f0: 6f6e 7320 666f 7220 3c63 6f64 653e 4950 ons for IP\n+0012ba00: 5052 4f54 4f5f 4950 3c2f 636f 6465 3e20 PROTO_IP \n+0012ba10: 3c63 6f64 653e 4950 5f4d 554c 5449 4341 IP_MULTICA\n+0012ba20: 5354 5f54 544c 3c2f 636f 6465 3e20 746f ST_TTL to\n+0012ba30: 206c 696d 6974 2074 6865 206c 6966 6574 limit the lifet\n+0012ba40: 696d 6520 6f66 2074 6865 2070 6163 6b65 ime of the packe\n+0012ba50: 742e 204d 756c 7469 6361 7374 2064 6174 t. Multicast dat\n+0012ba60: 6167 7261 6d73 2061 7265 2073 656e 7420 agrams are sent \n+0012ba70: 7769 7468 2061 2064 6566 6175 6c74 2076 with a default v\n+0012ba80: 616c 7565 206f 6620 312c 2074 6f20 7072 alue of 1, to pr\n+0012ba90: 6576 656e 7420 7468 656d 2074 6f20 6265 event them to be\n+0012baa0: 2066 6f72 7761 7264 6564 2062 6579 6f6e forwarded beyon\n+0012bab0: 6420 7468 6520 6c6f 6361 6c20 6e65 7477 d the local netw\n+0012bac0: 6f72 6b2e 2054 6869 7320 7061 7261 6d65 ork. This parame\n+0012bad0: 7465 7220 6361 6e20 6265 2073 6574 2062 ter can be set b\n+0012bae0: 6574 7765 656e 2031 2074 6f20 3235 352e etween 1 to 255.\n+0012baf0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+0012bb10: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+0012bb20: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+0012bb30: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0012bb40: 2069 643d 2272 6571 7565 7374 7265 7370 id=\"requestresp\n+0012bb50: 6f6e 7365 756e 6963 6173 7422 3e3c 2f61 onseunicast\">.Client-side re\n+0012bb70: 7175 6573 742d 7265 7370 6f6e 7365 2055 quest-response U\n+0012bb80: 4450 2075 6e69 6361 7374 3c2f 6833 3e0a DP unicast

    .\n+0012bb90: 3c70 3e54 6869 7320 6578 616d 706c 6520

    This example \n+0012bba0: 6173 7375 6d65 7320 7468 6174 2074 6865 assumes that the\n+0012bbb0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+0012bbc0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+0012bbd0: 7070 3220 696e 636c 7564 6573 2074 6865 pp2 includes the\n+0012bbe0: 2053 4f41 5020 4865 6164 6572 2077 6974 SOAP Header wit\n+0012bbf0: 6820 5753 2d41 6464 7265 7373 696e 6720 h WS-Addressing \n+0012bc00: 656c 656d 656e 7473 2069 6d70 6f72 7465 elements importe\n+0012bc10: 6420 7769 7468 203c 636f 6465 3e23 696d d with #im\n+0012bc20: 706f 7274 2022 7773 612e 6822 3c2f 636f port \"wsa.h\" and the ns__echoString\n+0012bc50: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n+0012bc60: 2064 6973 6375 7373 6564 2069 6e20 5365 discussed in Se\n+0012bc70: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Usi\n+0012bca0: 6e67 2057 532d 4164 6472 6573 7369 6e67 ng WS-Addressing\n+0012bcb0: 2077 6974 6820 534f 4150 2d6f 7665 722d with SOAP-over-\n+0012bcc0: 5544 503c 2f61 3e20 2e3c 2f70 3e0a 3c64 UDP .

    .
    #include "\n+0012bd20: 706c 7567 696e 2f77 7361 6170 692e 6826 plugin/wsaapi.h&\n+0012bd30: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    .<\n+0012bd70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0012bd80: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
    .
    struct wsa__EndpointRe\n+0012be40: 6665 7265 6e63 6554 7970 6520 7265 706c ferenceType repl\n+0012be50: 7954 6f3b 203c 7370 616e 2063 6c61 7373 yTo; // (a\n+0012be70: 6e6f 6e79 6d6f 7573 2920 7265 706c 7920 nonymous) reply \n+0012be80: 6164 6472 6573 7320 3c2f 7370 616e 3e3c address <\n+0012be90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *r\n+0012bed0: 6573 3b20 3c73 7061 6e20 636c 6173 733d es; // ser\n+0012bef0: 7665 7220 7265 7370 6f6e 7365 203c 2f73 ver response
    .
    soap_init(\n+0012bf80: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+0012bfb0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+0012bfd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_registe\n+0012c030: 725f 706c 7567 696e 3c2f 613e 2826 616d r_plugin(&am\n+0012c040: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, soap_wsa);.
    soa\n+0012c0c0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.s\n+0012c110: 656e 645f 7469 6d65 6f75 743c 2f61 3e20 end_timeout \n+0012c120: 3d20 353b 203c 7370 616e 2063 6c61 7373 = 5; // 5 \n+0012c140: 7365 636f 6e64 7320 6d61 7820 736f 636b seconds max sock\n+0012c150: 6574 2064 656c 6179 203c 2f73 7061 6e3e et delay \n+0012c160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    // set up WS-A\n+0012c280: 6464 7265 7373 696e 6720 6865 6164 6572 ddressing header\n+0012c290: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012c2b0: 736f 6170 5f77 7361 5f72 6571 7565 7374 soap_wsa_request\n+0012c2c0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&
    soa\n+0012c2f0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "message\n+0012c320: 2049 4426 7175 6f74 3b3c 2f73 7061 6e3e ID"\n+0012c330: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+0012c350: 756f 743b 656e 6470 6f69 6e74 2671 756f uot;endpoint&quo\n+0012c360: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "SOA\n+0012c390: 5020 6163 7469 6f6e 2671 756f 743b 3c2f P action");
    .\n+0012c3c0: 736f 6170 5f77 7361 5f61 6464 5f52 6570 soap_wsa_add_Rep\n+0012c3d0: 6c79 546f 2826 616d 703b 3c61 2063 6c61 lyTo(&soap, NULL)\n+0012c410: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // anony\n+0012c430: 6d6f 7573 2052 6570 6c79 546f 2061 6464 mous ReplyTo add\n+0012c440: 7265 7373 3c2f 7370 616e 3e3c 2f64 6976 ress.
    // Sen\n+0012c480: 6420 616e 6420 7265 6365 6976 6520 6d65 d and receive me\n+0012c490: 7373 6167 6573 206f 7665 7220 5544 503a ssages over UDP:\n+0012c4a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012c4b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012c4c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n+0012c4f0: 6e73 5f5f 6563 686f 5374 7269 6e67 2826 ns__echoString(&\n+0012c500: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012c530: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, "soap.udp:\n+0012c560: 2f2f 656e 6470 6f69 6e74 2026 7175 6f74 //endpoint "\n+0012c570: 3b3c 2f73 7061 6e3e 534f 4150 2061 6374 ;SOAP act\n+0012c580: 696f 6e3c 7370 616e 2063 6c61 7373 3d22 ion&\n+0012c5a0: 7175 6f74 3b2c 2026 7175 6f74 3b3c 2f73 quot;, "hello world!\n+0012c5c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0012c5e0: 743b 2c20 2661 6d70 3b72 6573 2929 203c t;, &res)) <\n+0012c5f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012c610: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0012c620: 6e67 6c69 7465 7261 6c22 3e7b 3c2f 7370 ngliteral\">{
    .
    if (so\n+0012c670: 6170 2e65 7272 6f72 203d 3d20 534f 4150 ap.error == SOAP\n+0012c680: 5f45 4f46 2026 616d 703b 2661 6d70 3b20 _EOF && \n+0012c690: 736f 6170 2e65 7272 6e75 6d20 3d3d 2030 soap.errnum == 0\n+0012c6a0: 2920 3c2f 7370 616e 3e3c 2f64 6976 3e0a )
    .\n+0012c6b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0012c6e0: 2020 2e2e 2e20 2f2f 2054 696d 656f 7574 ... // Timeout\n+0012c6f0: 3a20 6e6f 2072 6573 706f 6e73 6520 6672 : no response fr\n+0012c700: 6f6d 2073 6572 7665 7220 286d 6573 7361 om server (messa\n+0012c710: 6765 2061 6c72 6561 6479 2064 656c 6976 ge already deliv\n+0012c720: 6572 6564 3f29 203c 2f73 7061 6e3e 3c2f ered?) .
    else
    .
    soap_p\n+0012c7b0: 7269 6e74 5f66 6175 6c74 2826 616d 703b rint_fault(&\n+0012c7c0: 736f 6170 2c20 7374 6465 7272 293b 203c soap, stderr); <\n+0012c7d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012c7f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0012c800: 6e67 6c69 7465 7261 6c22 3e7d 203c 2f73 ngliteral\">}
    .
    else
    . ... \n+0012c890: 2f2f 2055 4450 2073 6572 7665 7220 7265 // UDP server re\n+0012c8a0: 7370 6f6e 7365 2069 7320 7374 6f72 6564 sponse is stored\n+0012c8b0: 2069 6e20 2623 3339 3b72 6573 2623 3339 in 'res'\n+0012c8c0: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
    .\n+0012c8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //\n+0012c900: 2063 6865 636b 2053 4f41 5020 6865 6164 check SOAP head\n+0012c910: 6572 2072 6563 6569 7665 642c 2069 6620 er received, if \n+0012c920: 6170 706c 6963 6162 6c65 203c 2f73 7061 applicable
    .
    check_hea\n+0012c970: 6465 7228 2661 6d70 3b73 6f61 702e 6865 der(&soap.he\n+0012c980: 6164 6572 293b 203c 2f73 7061 6e3e 3c2f ader); .
    soap_destroy(\n+0012c9d0: 2661 6d70 3b73 6f61 7029 3b3c 2f73 7061 &soap);
    .
    soap_end(\n+0012ca20: 2661 6d70 3b73 6f61 7029 3b3c 2f73 7061 &soap);
    .
    soap_done\n+0012ca70: 2826 616d 703b 736f 6170 293b 3c2f 7370 (&soap);
    .
    \n+0012ca90: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    To obta\n+0012d2d0: 696e 2072 6573 706f 6e73 6520 6f6e 652d in response one-\n+0012d2e0: 7761 7920 6f70 6572 6174 696f 6e73 2c20 way operations, \n+0012d2f0: 7573 6520 3c61 2068 7265 663d 2223 7773 use wsdl2h -b option \n+0012d330: 3c63 6f64 653e 2d62 3c2f 636f 6465 3e3c -b<\n+0012d340: 2f62 3e3c 2f61 3e2e 3c2f 703e 0a3c 703e /b>.

    .

    \n+0012d350: 5468 6520 636c 6965 6e74 2063 6f64 6520 The client code \n+0012d360: 696e 636c 7564 6573 2061 206c 6f6f 7020 includes a loop \n+0012d370: 746f 2072 6563 6569 7665 2072 6573 706f to receive respo\n+0012d380: 6e73 6520 6d65 7373 6167 6573 2075 6e74 nse messages unt\n+0012d390: 696c 2061 2074 696d 656f 7574 206f 6363 il a timeout occ\n+0012d3a0: 7572 733a 3c2f 703e 0a3c 6469 7620 636c urs:

    .
    <\n+0012d3c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012d3d0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+0012d3f0: 6c75 6465 2026 7175 6f74 3b70 6c75 6769 lude "plugi\n+0012d400: 6e2f 7773 6161 7069 2e68 2671 756f 743b n/wsaapi.h"\n+0012d410: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012d430: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+0012d460: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n+0012d4d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+0012d500: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_E\n+0012d550: 4e56 5f5f 4865 6164 6572 3c2f 613e 2068 NV__Header h\n+0012d560: 6561 6465 723b 203c 2f64 6976 3e0a 3c64 eader;
    .\n+0012d580: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct wsa__Endpoin\n+0012d5b0: 7452 6566 6572 656e 6365 5479 7065 2072 tReferenceType r\n+0012d5c0: 6570 6c79 546f 3b20 3c2f 6469 763e 0a3c eplyTo;
    .<\n+0012d5d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012d5e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >char<\n+0012d600: 2f73 7061 6e3e 202a 7265 733b 203c 2f64 /span> *res; .
    soap_\n+0012d680: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); \n+0012d6c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..<\n+0012d7a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012d7b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012d7c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0012d7d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012d7e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012d7f0: 6874 6d6c 2361 3532 6132 3266 6166 6333 html#a52a22fafc3\n+0012d800: 3639 6233 6135 3466 6230 6431 3666 3533 69b3a54fb0d16f53\n+0012d810: 3135 3837 3934 223e 636f 6e6e 6563 745f 158794\">connect_\n+0012d820: 666c 6167 733c 2f61 3e20 3d20 534f 5f42 flags = SO_B\n+0012d830: 524f 4144 4341 5354 3b20 3c2f 6469 763e ROADCAST;
    \n+0012d840: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.send\n+0012d8d0: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5\n+0012d8e0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec\n+0012d900: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket \n+0012d910: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    soa\n+0012d960: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.r\n+0012d9b0: 6563 765f 7469 6d65 6f75 743c 2f61 3e20 ecv_timeout \n+0012d9c0: 3d20 353b 203c 7370 616e 2063 6c61 7373 = 5; // 5 \n+0012d9e0: 7365 636f 6e64 7320 6d61 7820 736f 636b seconds max sock\n+0012d9f0: 6574 2064 656c 6179 203c 2f73 7061 6e3e et delay \n+0012da00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+0012da30: 2f20 7365 7420 7570 2057 532d 4164 6472 / set up WS-Addr\n+0012da40: 6573 7369 6e67 2068 6561 6465 723c 2f73 essing header
    ..
    soa\n+0012db80: 705f 7773 615f 6164 645f 5265 706c 7954 p_wsa_add_ReplyT\n+0012db90: 6f28 2661 6d70 3b3c 6120 636c 6173 733d o(&so\n+0012dbc0: 6170 3c2f 613e 2c20 4e55 4c4c 293b 203c ap, NULL); <\n+0012dbd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0012dbe0: 656e 7422 3e2f 2f20 616e 6f6e 796d 6f75 ent\">// anonymou\n+0012dbf0: 7320 5265 706c 7954 6f20 6164 6472 6573 s ReplyTo addres\n+0012dc00: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n+0012dc10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012dc20: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_send_\n+0012dc50: 6e73 5f5f 6263 6173 7453 7472 696e 6728 ns__bcastString(\n+0012dc60: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+0012dc90: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "soap.udp\n+0012dcc0: 3a2f 2f65 6e64 706f 696e 7426 7175 6f74 ://endpoint"\n+0012dcd0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "SOAP\n+0012dd00: 2061 6374 696f 6e26 7175 6f74 3b3c 2f73 action", "hello wo\n+0012dd40: 726c 6421 2671 756f 743b 3c2f 7370 616e rld!"))
    .
    {.
    {
    .<\n-0012dd90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012dda0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_print\n-0012de00: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(&\n-0012de10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012de40: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n+0012dd80: 226c 696e 6522 3e20 203c 6120 636c 6173 \"line\"> soap\n+0012dde0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+0012ddf0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012de20: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n+0012de30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n 0012de50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    else
    .
    {.
    while (\n-0012df00: 3129 3c2f 6469 763e 0a3c 6469 7620 636c 1)
    .
    {.
    if (\n-0012df60: 736f 6170 5f72 6563 765f 6e73 5f5f 6263 soap_recv_ns__bc\n-0012df70: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons\n-0012df80: 6528 2661 6d70 3b3c 6120 636c 6173 733d e(&so\n-0012dfb0: 6170 3c2f 613e 2c20 2661 6d70 3b72 6573 ap, &res\n-0012dfc0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n-0012dfe0: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n-0012e000: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    \n-0012e010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // Got response\n-0012e050: 2026 2333 393b 7265 7326 2333 393b 2066 'res' f\n-0012e060: 726f 6d20 6120 7365 7276 6572 203c 2f73 rom a server
    .
    }\n-0012e090: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n-0012e0d0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0012e100: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .error<\n-0012e150: 2f61 3e20 3d3d 203c 6120 636c 6173 733d /a> == SOAP_\n-0012e1b0: 454f 463c 2f61 3e20 2661 6d70 3b26 616d EOF &&am\n-0012e1c0: 703b 203c 6120 636c 6173 733d 2263 6f64 p; soap.errn\n-0012e240: 756d 3c2f 613e 203d 3d20 3029 203c 2f64 um == 0) .
    ... // Timeout: \n-0012e290: 6e6f 206d 6f72 6520 6d65 7373 6167 6573 no more messages\n-0012e2a0: 2072 6563 6569 7665 6420 3c2f 7370 616e received
    .
    else
    .
    <\n-0012e310: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012e320: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0012e330: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-0012e340: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-0012e350: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-0012e360: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-0012e370: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n-0012e3b0: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    .}\n-0012e3d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..<\n-0012e4a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012e4b0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0012e4c0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-0012e4d0: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825\n-0012e4e0: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec\n-0012e4f0: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9\">soap_end\n-0012e500: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-0012e530: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-0012e550: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s\n-0012e5e0: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n-0012e5f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Note t\n-0012e610: 6861 7420 6120 7365 7276 6572 2066 6f72 hat a server for\n-0012e620: 2074 6865 203c 636f 6465 3e62 6361 7374 the bcast\n-0012e630: 5374 7269 6e67 3c2f 636f 6465 3e20 646f String do\n-0012e640: 6573 206e 6f74 206e 6565 6420 746f 2075 es not need to u\n-0012e650: 7365 2074 776f 2d6f 6e65 2077 6179 206d se two-one way m\n-0012e660: 6573 7361 6765 732e 2054 6875 732c 206d essages. Thus, m\n-0012e670: 756c 7469 6361 7374 2072 6571 7565 7374 ulticast request\n-0012e680: 2d72 6573 706f 6e73 6520 6d65 7373 6167 -response messag\n-0012e690: 6520 7061 7474 6572 6e20 6361 6e20 6265 e pattern can be\n-0012e6a0: 2064 6563 6c61 7265 6420 616e 6420 696d declared and im\n-0012e6b0: 706c 656d 656e 7465 6420 6173 2072 6571 plemented as req\n-0012e6c0: 7565 7374 2d72 6573 706f 6e73 6520 6f70 uest-response op\n-0012e6d0: 6572 6174 696f 6e73 2061 7420 7468 6520 erations at the \n-0012e6e0: 7365 7276 6572 2073 6964 652e 3c2f 703e server side.

    \n-0012e6f0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab\n-0012e710: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .SOAP-over-UDP\n-0012e760: 2073 6572 7665 723c 2f68 323e 0a3c 703e server

    .

    \n-0012e770: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex\n-0012e780: 616d 706c 6520 636f 6465 2069 6c6c 7573 ample code illus\n-0012e790: 7472 6174 6573 2061 2053 4f41 502d 6f76 trates a SOAP-ov\n-0012e7a0: 6572 2d55 4450 2073 6572 7665 7220 666f er-UDP server fo\n-0012e7b0: 7220 6f6e 652d 7761 7920 3c63 6f64 653e r one-way \n-0012e7c0: 7365 6e64 5374 7269 6e67 3c2f 636f 6465 sendString and request-re\n-0012e7e0: 7370 6f6e 7365 203c 636f 6465 3e65 6368 sponse ech\n-0012e7f0: 6f53 7472 696e 673c 2f63 6f64 653e 206d oString m\n-0012e800: 6573 7361 6765 732e 2054 6869 7320 6578 essages. This ex\n-0012e810: 616d 706c 6520 6173 7375 6d65 7320 7468 ample assumes th\n-0012e820: 6174 2074 6865 2069 6e74 6572 6661 6365 at the interface\n-0012e830: 2068 6561 6465 7220 6669 6c65 2069 6e63 header file inc\n-0012e840: 6c75 6465 7320 7468 6520 534f 4150 2048 ludes the SOAP H\n-0012e850: 6561 6465 7220 7769 7468 2057 532d 4164 eader with WS-Ad\n-0012e860: 6472 6573 7369 6e67 2065 6c65 6d65 6e74 dressing element\n-0012e870: 7320 696d 706f 7274 6564 2077 6974 6820 s imported with \n-0012e880: 3c63 6f64 653e 2369 6d70 6f72 7420 2277 #import \"w\n-0012e890: 7361 2e68 223c 2f63 6f64 653e 2061 6e64 sa.h\" and\n-0012e8a0: 2074 6865 203c 636f 6465 3e6e 735f 5f65 the ns__e\n-0012e8b0: 6368 6f53 7472 696e 673c 2f63 6f64 653e choString\n-0012e8c0: 2066 756e 6374 696f 6e20 6469 7363 7573 function discus\n-0012e8d0: 7365 6420 696e 2053 6563 7469 6f6e 203c sed in Section <\n-0012e8e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0012e8f0: 663d 2269 6e64 6578 2e68 746d 6c23 7773 f=\"index.html#ws\n-0012e900: 6175 6470 223e 5573 696e 6720 5753 2d41 audp\">Using WS-A\n-0012e910: 6464 7265 7373 696e 6720 7769 7468 2053 ddressing with S\n-0012e920: 4f41 502d 6f76 6572 2d55 4450 3c2f 613e OAP-over-UDP\n-0012e930: 202e 3c2f 703e 0a3c 6469 7620 636c 6173 .

    .
    <\n-0012e960: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-0012e970: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-0012e980: 6465 2026 7175 6f74 3b70 6c75 6769 6e2f de "plugin/\n-0012e990: 7773 6161 7069 2e68 2671 756f 743b 3c2f wsaapi.h"
    . <\n-0012e9c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai\n-0012ea00: 6e28 2920 3c2f 6469 763e 0a3c 6469 7620 n()
    .
    {.
    s\n-0012ea50: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    so\n-0012eb30: 6170 5f69 6e69 7431 3c2f 613e 2826 616d ap_init1(&am\n-0012eb40: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, SOAP_IO_UD\n-0012ebd0: 503c 2f61 3e29 3b20 3c73 7061 6e20 636c P); //\n-0012ebf0: 206d 7573 7420 7365 7420 5544 5020 666c must set UDP fl\n-0012ec00: 6167 203c 2f73 7061 6e3e 3c2f 6469 763e ag
    \n-0012ec10: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    // bind to ho\n-0012ed10: 7374 2028 4e55 4c4c 203d 2063 7572 7265 st (NULL = curre\n-0012ed20: 6e74 2068 6f73 7429 2061 6e64 2070 6f72 nt host) and por\n-0012ed30: 743a 203c 2f73 7061 6e3e 3c2f 6469 763e t:
    \n-0012ed40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-0012ed70: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soa\n-0012edd0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(soap_bind\n-0012ee40: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-0012ee70: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, \n-0012eec0: 686f 7374 3c2f 613e 2c20 3c61 2063 6c61 host, port, BAC\n-0012ef20: 4b4c 4f47 2929 2920 3c2f 6469 763e 0a3c KLOG)))
    .<\n-0012ef30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012ef40: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n-0012ef60: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n-0012efc0: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n-0012f000: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .<\n-0012f010: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f020: 3e20 2020 2065 7869 7428 4558 4954 5f46 > exit(EXIT_F\n-0012f030: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    .\n-0012f040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n-0012f070: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while\n-0012f090: 3c2f 7370 616e 3e20 2831 293c 2f64 6976 (1).
    {
    .\n-0012f0d0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-0012f0f0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_se\n-0012f150: 7276 653c 2f61 3e28 2661 6d70 3b3c 6120 rve(&soap)) <\n-0012f190: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_print_faul\n-0012f210: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap, stde\n-0012f250: 7272 293b 203c 7370 616e 2063 6c61 7373 rr); // re\n-0012f270: 706f 7274 2074 6865 2070 726f 626c 656d port the problem\n-0012f280: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-0012f290: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f2a0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_d\n-0012f300: 6573 7472 6f79 3c2f 613e 2826 616d 703b estroy(&\n-0012f310: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0012f340: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-0012f360: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012f370: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0012f380: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-0012f390: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825\n-0012f3a0: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec\n-0012f3b0: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9\">soap_end\n-0012f3c0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-0012f3f0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n-0012f400: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f410: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-0012f430: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s\n-0012f4c0: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); \n-0012f4e0: 2f2f 2063 6c6f 7365 2063 6f6e 6e65 6374 // close connect\n-0012f4f0: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion .
    }
    . \n-0012f530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n+0012de90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    while (1)
    .<\n+0012def0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012df00: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    ..\n+0012dfb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; \n+0012dff0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n+0012e010: 203c 7370 616e 2063 6c61 7373 3d22 636f // Got re\n+0012e030: 7370 6f6e 7365 2026 2333 393b 7265 7326 sponse 'res&\n+0012e040: 2333 393b 2066 726f 6d20 6120 7365 7276 #39; from a serv\n+0012e050: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
    \n+0012e060: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+0012e090: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so\n+0012e0e0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n+0012e130: 6572 726f 723c 2f61 3e20 3d3d 203c 6120 error == SOAP_EOF &a\n+0012e1a0: 6d70 3b26 616d 703b 203c 6120 636c 6173 mp;& \n+0012e1d0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.errnum == \n+0012e230: 3029 203c 2f64 6976 3e0a 3c64 6976 2063 0)
    .
    \n+0012e250: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // Tim\n+0012e270: 656f 7574 3a20 6e6f 206d 6f72 6520 6d65 eout: no more me\n+0012e280: 7373 6167 6573 2072 6563 6569 7665 6420 ssages received \n+0012e290: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012e2b0: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+0012e2d0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+0012e2e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012e2f0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_pri\n+0012e350: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am\n+0012e360: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stderr); .
    }
    .\n+0012e3d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220
    soap_destro\n+0012e430: 793c 2f61 3e28 2661 6d70 3b3c 6120 636c y(&soap);.
    soap_e\n+0012e4e0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap);.
    soap_\n+0012e590: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap);<\n+0012e5d0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+0012e5f0: 4e6f 7465 2074 6861 7420 6120 7365 7276 Note that a serv\n+0012e600: 6572 2066 6f72 2074 6865 203c 636f 6465 er for the bcastString does not nee\n+0012e630: 6420 746f 2075 7365 2074 776f 2d6f 6e65 d to use two-one\n+0012e640: 2077 6179 206d 6573 7361 6765 732e 2054 way messages. T\n+0012e650: 6875 732c 206d 756c 7469 6361 7374 2072 hus, multicast r\n+0012e660: 6571 7565 7374 2d72 6573 706f 6e73 6520 equest-response \n+0012e670: 6d65 7373 6167 6520 7061 7474 6572 6e20 message pattern \n+0012e680: 6361 6e20 6265 2064 6563 6c61 7265 6420 can be declared \n+0012e690: 616e 6420 696d 706c 656d 656e 7465 6420 and implemented \n+0012e6a0: 6173 2072 6571 7565 7374 2d72 6573 706f as request-respo\n+0012e6b0: 6e73 6520 6f70 6572 6174 696f 6e73 2061 nse operations a\n+0012e6c0: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid\n+0012e6d0: 652e 3c2f 703e 0a3c 703e f09f 949d 203c e.

    .

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

    ..SOAP-ov\n+0012e740: 6572 2d55 4450 2073 6572 7665 723c 2f68 er-UDP server.

    The follow\n+0012e760: 696e 6720 6578 616d 706c 6520 636f 6465 ing example code\n+0012e770: 2069 6c6c 7573 7472 6174 6573 2061 2053 illustrates a S\n+0012e780: 4f41 502d 6f76 6572 2d55 4450 2073 6572 OAP-over-UDP ser\n+0012e790: 7665 7220 666f 7220 6f6e 652d 7761 7920 ver for one-way \n+0012e7a0: 3c63 6f64 653e 7365 6e64 5374 7269 6e67 sendString\n+0012e7b0: 3c2f 636f 6465 3e20 616e 6420 7265 7175 and requ\n+0012e7c0: 6573 742d 7265 7370 6f6e 7365 203c 636f est-response echoString messages. T\n+0012e7f0: 6869 7320 6578 616d 706c 6520 6173 7375 his example assu\n+0012e800: 6d65 7320 7468 6174 2074 6865 2069 6e74 mes that the int\n+0012e810: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+0012e820: 6c65 2069 6e63 6c75 6465 7320 7468 6520 le includes the \n+0012e830: 534f 4150 2048 6561 6465 7220 7769 7468 SOAP Header with\n+0012e840: 2057 532d 4164 6472 6573 7369 6e67 2065 WS-Addressing e\n+0012e850: 6c65 6d65 6e74 7320 696d 706f 7274 6564 lements imported\n+0012e860: 2077 6974 6820 3c63 6f64 653e 2369 6d70 with #imp\n+0012e870: 6f72 7420 2277 7361 2e68 223c 2f63 6f64 ort \"wsa.h\" and the ns__echoString<\n+0012e8a0: 2f63 6f64 653e 2066 756e 6374 696f 6e20 /code> function \n+0012e8b0: 6469 7363 7573 7365 6420 696e 2053 6563 discussed in Sec\n+0012e8c0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Usin\n+0012e8f0: 6720 5753 2d41 6464 7265 7373 696e 6720 g WS-Addressing \n+0012e900: 7769 7468 2053 4f41 502d 6f76 6572 2d55 with SOAP-over-U\n+0012e910: 4450 3c2f 613e 202e 3c2f 703e 0a3c 6469 DP .

    .
    \n+0012e960: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p\n+0012e970: 6c75 6769 6e2f 7773 6161 7069 2e68 2671 lugin/wsaapi.h&q\n+0012e980: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .int main()
    \n+0012e9f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+0012ea20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0012ea30: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
    ...<\n+0012ecc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012ecd0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // bind\n+0012ecf0: 2074 6f20 686f 7374 2028 4e55 4c4c 203d to host (NULL =\n+0012ed00: 2063 7572 7265 6e74 2068 6f73 7429 2061 current host) a\n+0012ed10: 6e64 2070 6f72 743a 203c 2f73 7061 6e3e nd port: \n+0012ed20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+0012ed60: 213c 6120 636c 6173 733d 2263 6f64 6522 !soap_valid_so\n+0012edc0: 636b 6574 3c2f 613e 283c 6120 636c 6173 cket(soap_bi\n+0012ee20: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap, host, \n+0012eeb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 port, BACKLOG))) .
    {
    \n+0012ef30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n+0012efa0: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(&\n+0012efb0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012efe0: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    exit(\n+0012f010: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n+0012f020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    while (1\n+0012f080: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.. \n+0012f190: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n+0012f1f0: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(&\n+0012f200: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+0012f230: 2c20 7374 6465 7272 293b 203c 7370 616e , stderr); // report the p\n+0012f260: 726f 626c 656d 203c 2f73 7061 6e3e 3c2f roblem ..<\n+0012f330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012f340: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_e\n+0012f3a0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap); .
    } .
    soap_\n+0012f470: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap); \n+0012f4b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // close c\n+0012f4d0: 6f6e 6e65 6374 696f 6e20 3c2f 7370 616e onnection
    .
    } .
    .<\n+0012f530: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0012f540: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__echoStri\n+0012f560: 6e67 283c 7370 616e 2063 6c61 7373 3d22 ng(struct<\n+0012f580: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+0012f5b0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+0012f5e0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, char *\n+0012f610: 7374 722c 203c 7370 616e 2063 6c61 7373 str, c\n+0012f630: 6861 723c 2f73 7061 6e3e 202a 2a72 6573 har **res\n+0012f640: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    {
    . \n-0012f690: 203c 7370 616e 2063 6c61 7373 3d22 636f // check \n-0012f6b0: 6966 2057 532d 4164 6472 6573 7369 6e67 if WS-Addressing\n-0012f6c0: 2068 6561 6465 7273 2061 7265 2070 7265 headers are pre\n-0012f6d0: 7365 6e74 2061 6e64 2063 6f72 7265 6374 sent and correct\n-0012f6e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0012f700: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_wsa_\n-0012f730: 6368 6563 6b28 3c61 2063 6c61 7373 3d22 check(soa\n-0012f760: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
    .\n-0012f780: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-0012f7a0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn soap->\n-0012f7e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error;
    .
    // should ch\n-0012f870: 6563 6b20 666f 7220 6475 706c 6963 6174 eck for duplicat\n-0012f880: 6520 6d65 7373 6167 6573 2028 736f 6d65 e messages (some\n-0012f890: 7468 696e 6720 7468 6174 2057 532d 5265 thing that WS-Re\n-0012f8a0: 6c69 6162 6c65 4d65 7373 6167 696e 6720 liableMessaging \n-0012f8b0: 646f 6573 2074 6f6f 293c 2f73 7061 6e3e does too)\n-0012f8c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n-0012f900: 6368 6563 6b5f 7265 6365 6976 6564 283c check_received(<\n-0012f910: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012f920: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012f930: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0012f940: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;head\n-0012f990: 6572 3c2f 613e 2d26 6774 3b77 7361 5f5f er->wsa__\n-0012f9a0: 4d65 7373 6167 6549 4429 2920 3c2f 6469 MessageID)) .
    {
    .<\n-0012f9d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f9e0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // Re\n-0012fa00: 7175 6573 7420 6d65 7373 6167 6520 616c quest message al\n-0012fa10: 7265 6164 7920 7265 6365 6976 6564 203c ready received <\n-0012fa20: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-0012fa40: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n-0012fa60: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n-0012fac0: 4f41 505f 5354 4f50 3c2f 613e 3b20 3c73 OAP_STOP; // don't\n-0012faf0: 2072 6574 7572 6e20 7265 7370 6f6e 7365 return response\n-0012fb00: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-0012fb10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012fb20: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-0012fb40: 2a72 6573 203d 2073 7472 3b20 3c2f 6469 *res = str; .
    // \n-0012fb80: 7265 7475 726e 204f 4b20 7769 7468 2057 return OK with W\n-0012fb90: 532d 4164 6472 6573 7369 6e67 2072 6570 S-Addressing rep\n-0012fba0: 6c79 2068 6561 6465 7273 2c20 6d65 7373 ly headers, mess\n-0012fbb0: 6167 6520 4944 2069 7320 6964 5f63 6f75 age ID is id_cou\n-0012fbc0: 6e74 2b31 3c2f 7370 616e 3e3c 2f64 6976 nt+1.
    \n-0012fc00: 7265 7475 726e 3c2f 7370 616e 3e20 736f return so\n-0012fc10: 6170 5f77 7361 5f72 6570 6c79 283c 6120 ap_wsa_reply(soap, s\n-0012fca0: 6f61 705f 696e 7432 733c 2f61 3e28 3c61 oap_int2s(soap, i\n-0012fce0: 645f 636f 756e 742b 2b29 2c20 3c73 7061 d_count++), "ht\n-0012fd10: 7470 3a2f 2f67 656e 6976 6961 2e63 6f6d tp://genivia.com\n-0012fd20: 2f75 6470 2f65 6368 6f53 7472 696e 6752 /udp/echoStringR\n-0012fd30: 6573 706f 6e73 6526 7175 6f74 3b3c 2f73 esponse");
    .}\n+0012f670: 696e 6522 3e20 203c 7370 616e 2063 6c61 ine\"> // \n+0012f690: 6368 6563 6b20 6966 2057 532d 4164 6472 check if WS-Addr\n+0012f6a0: 6573 7369 6e67 2068 6561 6465 7273 2061 essing headers a\n+0012f6b0: 7265 2070 7265 7365 6e74 2061 6e64 2063 re present and c\n+0012f6c0: 6f72 7265 6374 3c2f 7370 616e 3e3c 2f64 orrect.
    if (soa\n+0012f710: 705f 7773 615f 6368 6563 6b28 3c61 2063 p_wsa_check(soap))..\n+0012f820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // sho\n+0012f850: 756c 6420 6368 6563 6b20 666f 7220 6475 uld check for du\n+0012f860: 706c 6963 6174 6520 6d65 7373 6167 6573 plicate messages\n+0012f870: 2028 736f 6d65 7468 696e 6720 7468 6174 (something that\n+0012f880: 2057 532d 5265 6c69 6162 6c65 4d65 7373 WS-ReliableMess\n+0012f890: 6167 696e 6720 646f 6573 2074 6f6f 293c aging does too)<\n+0012f8a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0012f8c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (check_rece\n+0012f8f0: 6976 6564 283c 6120 636c 6173 733d 2263 ived(soap\n+0012f920: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->header->\n+0012f980: 3b77 7361 5f5f 4d65 7373 6167 6549 4429 ;wsa__MessageID)\n+0012f990: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    // Request mess\n+0012f9f0: 6167 6520 616c 7265 6164 7920 7265 6365 age already rece\n+0012fa00: 6976 6564 203c 2f73 7061 6e3e 3c2f 6469 ived .
    return\n+0012fa50: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_STOP; // don\n+0012fad0: 2623 3339 3b74 2072 6574 7572 6e20 7265 't return re\n+0012fae0: 7370 6f6e 7365 203c 2f73 7061 6e3e 3c2f sponse .
    } .
    *res = str\n+0012fb30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    // return OK \n+0012fb70: 7769 7468 2057 532d 4164 6472 6573 7369 with WS-Addressi\n+0012fb80: 6e67 2072 6570 6c79 2068 6561 6465 7273 ng reply headers\n+0012fb90: 2c20 6d65 7373 6167 6520 4944 2069 7320 , message ID is \n+0012fba0: 6964 5f63 6f75 6e74 2b31 3c2f 7370 616e id_count+1
    .
    ..
    {
    \n 0012fe80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    ..
    // should check\n-00130020: 2066 6f72 2064 7570 6c69 6361 7465 206d for duplicate m\n-00130030: 6573 7361 6765 7320 3c2f 7370 616e 3e3c essages <\n-00130040: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (c\n-00130080: 6865 636b 5f72 6563 6569 7665 6428 3c61 heck_received(soap-&g\n-001300c0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;heade\n-00130110: 723c 2f61 3e2d 2667 743b 7773 615f 5f4d r->wsa__M\n-00130120: 6573 7361 6765 4944 2929 203c 2f64 6976 essageID)) .
    {
    .\n-00130160: 2020 2020 3c73 7061 6e20 636c 6173 733d // Req\n-00130180: 7565 7374 206d 6573 7361 6765 2061 6c72 uest message alr\n-00130190: 6561 6479 2072 6563 6569 7665 6420 3c2f eady received
    . \n-001301c0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-001301e0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-00130240: 4150 5f53 544f 503c 2f61 3e3b 3c2f 6469 AP_STOP;.
    }
    .\n-00130270: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-001302a0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-00130300: 534f 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 SOAP_OK;.
    }
    . i\n+0012feb0: 663c 2f73 7061 6e3e 2028 736f 6170 5f77 f (soap_w\n+0012fec0: 7361 5f63 6865 636b 283c 6120 636c 6173 sa_check(\n+0012fef0: 736f 6170 3c2f 613e 2929 3c2f 6469 763e soap))
    \n+0012ff00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return <\n+0012ff40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012ff50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012ff60: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0012ff70: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n+0012ffc0: 723c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 r;
    . \n+0012ffe0: 203c 7370 616e 2063 6c61 7373 3d22 636f // should\n+00130000: 2063 6865 636b 2066 6f72 2064 7570 6c69 check for dupli\n+00130010: 6361 7465 206d 6573 7361 6765 7320 3c2f cate messages
    . \n+00130040: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (check_recei\n+00130070: 7665 6428 3c61 2063 6c61 7373 3d22 636f ved(soap<\n+001300a0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->header->\n+00130100: 7773 615f 5f4d 6573 7361 6765 4944 2929 wsa__MessageID))\n+00130110: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+00130160: 2f2f 2052 6571 7565 7374 206d 6573 7361 // Request messa\n+00130170: 6765 2061 6c72 6561 6479 2072 6563 6569 ge already recei\n+00130180: 7665 6420 3c2f 7370 616e 3e3c 2f64 6976 ved .
    return \n+001301d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_STOP;
    .
    } <\n+00130250: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    } .
    .\n-00130340: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .<\n+00130340: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__sendStr\n+00130370: 696e 6752 6573 706f 6e73 6528 3c73 7061 ingResponse(struct \n+001303a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001303d0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00130400: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n+00130420: 3c2f 7370 616e 3e20 2a72 6573 2920 3c2f *res) .
    {
    .<\n 00130450: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00130460: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    return SOAP_NO\n-00130500: 5f4d 4554 484f 443c 2f61 3e3b 203c 7370 _METHOD; // we don'\n-00130530: 3b74 2073 6572 7665 2074 6869 7320 6f70 ;t serve this op\n-00130540: 6572 6174 696f 6e3c 2f73 7061 6e3e 3c2f eration ret\n+00130480: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n+001304e0: 4f41 505f 4e4f 5f4d 4554 484f 443c 2f61 OAP_NO_METHOD; // we d\n+00130510: 6f6e 2623 3339 3b74 2073 6572 7665 2074 on't serve t\n+00130520: 6869 7320 6f70 6572 6174 696f 6e3c 2f73 his operation
    .
    }.
    }
    .<\n-00130570: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00130580: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-00130590: 705f 5f66 6c61 6773 5f68 746d 6c5f 6761 p__flags_html_ga\n-001305a0: 3338 3864 6165 3961 6263 3830 6364 3666 388dae9abc80cd6f\n-001305b0: 3664 3065 6366 6261 3338 3364 6130 3362 6d0ecfba383da03b\n-001305c0: 223e 3c64 6976 2063 6c61 7373 3d22 7474 \">
    SOAP\n-00130620: 5f49 4f5f 5544 503c 2f61 3e3c 2f64 6976 _IO_UDP
    #define SOA\n-00130650: 505f 494f 5f55 4450 3c2f 6469 763e 3c64 P_IO_UDP
    soap_mode IO in\n-00130680: 7075 742f 6f75 7470 7574 2066 6c61 6720 put/output flag \n-00130690: 7661 6c75 6520 746f 2075 7365 2055 4450 value to use UDP\n-001306a0: 2064 6174 6167 7261 6d73 2c20 6d65 7373 datagrams, mess\n-001306b0: 6167 6520 7369 7a65 2069 7320 6c69 6d69 age size is limi\n-001306c0: 7465 6420 746f 2055 4450 2070 6163 6b65 ted to UDP packe\n-001306d0: 7420 7369 7a65 3c2f 6469 763e 3c64 6976 t size
    <\n-001306f0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:159\n-00130710: 363c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6
    .<\n-00130770: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00130780: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_int2\n-001307d0: 733c 2f61 3e3c 2f64 6976 3e3c 6469 7620 s
    c\n-001307f0: 6f6e 7374 2063 6861 7220 2a20 736f 6170 onst char * soap\n-00130800: 5f69 6e74 3273 2873 7472 7563 7420 736f _int2s(struct so\n-00130810: 6170 202a 736f 6170 2c20 696e 7420 7661 ap *soap, int va\n-00130820: 6c75 6529 3c2f 6469 763e 3c64 6976 2063 lue)
    Con\n-00130840: 7665 7274 2061 2073 6967 6e65 6420 3332 vert a signed 32\n-00130850: 2062 6974 2069 6e74 6567 6572 2074 6f20 bit integer to \n-00130860: 6120 6465 6369 6d61 6c20 7374 7269 6e67 a decimal string\n-00130870: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
    .

    The serv\n-001308a0: 6572 2062 696e 6473 2074 6f20 6120 686f er binds to a ho\n-001308b0: 7374 2061 6e64 2070 6f72 7420 616e 6420 st and port and \n-001308c0: 6163 6365 7074 7320 6d65 7373 6167 6573 accepts messages\n-001308d0: 2069 6e20 6120 6c6f 6f70 2e20 4265 6361 in a loop. Beca\n-001308e0: 7573 6520 5544 5020 646f 6573 206e 6f74 use UDP does not\n-001308f0: 2068 6176 6520 7468 6520 6571 7569 7661 have the equiva\n-00130900: 6c65 6e74 206f 6620 616e 2061 6363 6570 lent of an accep\n-00130910: 742c 2074 6865 206d 6573 7361 6765 7320 t, the messages \n-00130920: 6361 6e6e 6f74 2062 6520 6469 7370 6174 cannot be dispat\n-00130930: 6368 6564 2074 6f20 7468 7265 6164 732e ched to threads.\n-00130940: 2049 6e73 7465 6164 2074 6865 203c 636f Instead the soap_serve\n-001309d0: 3c2f 636f 6465 3e20 7761 6974 7320 666f waits fo\n-001309e0: 7220 6120 6d65 7373 6167 6520 616e 6420 r a message and \n-001309f0: 696d 6d65 6469 6174 656c 7920 6163 6365 immediately acce\n-00130a00: 7074 7320 6974 2e20 596f 7520 6361 6e20 pts it. You can \n-00130a10: 7573 6520 6120 7265 6365 6976 6520 7469 use a receive ti\n-00130a20: 6d65 6f75 7420 7661 6c75 6520 666f 7220 meout value for \n-00130a30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::recv_time\n-00130af0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2074 out t\n-00130b00: 6f20 6d61 6b65 203c 636f 6465 3e3c 6120 o make soap\n-00130b80: 5f73 6572 7665 3c2f 613e 3c2f 636f 6465 _serve non-blocking.<\n-00130ba0: 2f70 3e0a 3c70 3e54 6f20 6f62 7461 696e /p>.

    To obtain\n-00130bb0: 2072 6573 706f 6e73 6520 6f6e 652d 7761 response one-wa\n-00130bc0: 7920 6f70 6572 6174 696f 6e73 2066 726f y operations fro\n-00130bd0: 6d20 6120 5753 444c 2c20 7573 6520 3c61 m a WSDL, use wsdl2\n-00130c00: 6820 2d62 3c2f 636f 6465 3e3c 2f62 3e20 h -b \n-00130c10: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n-00130c20: 2d62 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 -b. This produces\n-00130c40: 2061 6464 6974 696f 6e61 6c20 6f6e 652d additional one-\n-00130c50: 7761 7920 6f70 6572 6174 696f 6e73 2074 way operations t\n-00130c60: 6f20 7375 7070 6f72 7420 6173 796e 6368 o support asynch\n-00130c70: 726f 6e6f 7573 2068 616e 646c 696e 6720 ronous handling \n-00130c80: 6f66 2072 6573 706f 6e73 6520 6d65 7373 of response mess\n-00130c90: 6167 6573 2069 6e20 7468 6520 7361 6d65 ages in the same\n-00130ca0: 2077 6179 2072 6571 7565 7374 7320 6172 way requests ar\n-00130cb0: 6520 6861 6e64 6c65 642e 3c2f 703e 0a3c e handled.

    .<\n-00130cc0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-00130ce0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-00130cf0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .SOAP-o\n-00130d30: 7665 722d 5544 5020 6d75 6c74 6963 6173 ver-UDP multicas\n-00130d40: 7420 7265 6365 6976 696e 6720 7365 7276 t receiving serv\n-00130d50: 6572 3c2f 6833 3e0a 3c70 3e46 6f72 2055 er

    .

    For U\n-00130d60: 4450 206d 756c 7469 6361 7374 2073 7570 DP multicast sup\n-00130d70: 706f 7274 2c20 666f 6c6c 6f77 2074 6865 port, follow the\n-00130d80: 2073 7567 6765 7374 696f 6e73 2069 6e20 suggestions in \n-00130d90: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section SOAP-over-UD\n-00130dd0: 5020 7365 7276 6572 3c2f 613e 2061 6e64 P server and\n-00130de0: 2063 6861 6e67 6520 7468 6520 696e 6974 change the init\n-00130df0: 6961 6c69 7a61 7469 6f6e 2070 6172 7473 ialization parts\n-00130e00: 206f 6620 7468 6520 636f 6465 2074 6f20 of the code to \n-00130e10: 656e 6162 6c65 2055 4450 206d 756c 7469 enable UDP multi\n-00130e20: 6361 7374 2070 6f72 7420 6269 6e64 696e cast port bindin\n-00130e30: 6720 6279 2074 6f20 7465 6c6c 696e 6720 g by to telling \n-00130e40: 7468 6520 6b65 726e 656c 2077 6869 6368 the kernel which\n-00130e50: 206d 756c 7469 6361 7374 2067 726f 7570 multicast group\n-00130e60: 7320 796f 7520 6172 6520 696e 7465 7265 s you are intere\n-00130e70: 7374 6564 2069 6e3a 3c2f 703e 0a3c 6469 sted in:

    .
    \n-00130ec0: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p\n-00130ed0: 6c75 6769 6e2f 7773 6161 7069 2e68 2671 lugin/wsaapi.h&q\n-00130ee0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;
    #defi\n+00130630: 6e65 2053 4f41 505f 494f 5f55 4450 3c2f ne SOAP_IO_UDP
    soap_mode\n+00130660: 2049 4f20 696e 7075 742f 6f75 7470 7574 IO input/output\n+00130670: 2066 6c61 6720 7661 6c75 6520 746f 2075 flag value to u\n+00130680: 7365 2055 4450 2064 6174 6167 7261 6d73 se UDP datagrams\n+00130690: 2c20 6d65 7373 6167 6520 7369 7a65 2069 , message size i\n+001306a0: 7320 6c69 6d69 7465 6420 746f 2055 4450 s limited to UDP\n+001306b0: 2070 6163 6b65 7420 7369 7a65 3c2f 6469 packet size
    Definiti\n+001306e0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+001306f0: 2e68 3a31 3539 363c 2f64 6976 3e3c 2f64 .h:1596
    .
    soa\n+001307b0: 705f 696e 7432 733c 2f61 3e3c 2f64 6976 p_int2s
    const char \n+001307e0: 2a20 736f 6170 5f69 6e74 3273 2873 7472 * soap_int2s(str\n+001307f0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00130800: 696e 7420 7661 6c75 6529 3c2f 6469 763e int value)
    \n+00130810: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Convert a sig\n+00130830: 6e65 6420 3332 2062 6974 2069 6e74 6567 ned 32 bit integ\n+00130840: 6572 2074 6f20 6120 6465 6369 6d61 6c20 er to a decimal \n+00130850: 7374 7269 6e67 2e3c 2f64 6976 3e3c 2f64 string.
    .

    Th\n+00130880: 6520 7365 7276 6572 2062 696e 6473 2074 e server binds t\n+00130890: 6f20 6120 686f 7374 2061 6e64 2070 6f72 o a host and por\n+001308a0: 7420 616e 6420 6163 6365 7074 7320 6d65 t and accepts me\n+001308b0: 7373 6167 6573 2069 6e20 6120 6c6f 6f70 ssages in a loop\n+001308c0: 2e20 4265 6361 7573 6520 5544 5020 646f . Because UDP do\n+001308d0: 6573 206e 6f74 2068 6176 6520 7468 6520 es not have the \n+001308e0: 6571 7569 7661 6c65 6e74 206f 6620 616e equivalent of an\n+001308f0: 2061 6363 6570 742c 2074 6865 206d 6573 accept, the mes\n+00130900: 7361 6765 7320 6361 6e6e 6f74 2062 6520 sages cannot be \n+00130910: 6469 7370 6174 6368 6564 2074 6f20 7468 dispatched to th\n+00130920: 7265 6164 732e 2049 6e73 7465 6164 2074 reads. Instead t\n+00130930: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap_ser\n+001309b0: 7665 3c2f 613e 3c2f 636f 6465 3e20 7761 ve wa\n+001309c0: 6974 7320 666f 7220 6120 6d65 7373 6167 its for a messag\n+001309d0: 6520 616e 6420 696d 6d65 6469 6174 656c e and immediatel\n+001309e0: 7920 6163 6365 7074 7320 6974 2e20 596f y accepts it. Yo\n+001309f0: 7520 6361 6e20 7573 6520 6120 7265 6365 u can use a rece\n+00130a00: 6976 6520 7469 6d65 6f75 7420 7661 6c75 ive timeout valu\n+00130a10: 6520 666f 7220 3c63 6f64 653e 3c61 2063 e for soap::rec\n+00130ad0: 765f 7469 6d65 6f75 743c 2f61 3e3c 2f63 v_timeout to make soap_serve\n+00130b70: 3c2f 636f 6465 3e20 6e6f 6e2d 626c 6f63 non-bloc\n+00130b80: 6b69 6e67 2e3c 2f70 3e0a 3c70 3e54 6f20 king.

    .

    To \n+00130b90: 6f62 7461 696e 2072 6573 706f 6e73 6520 obtain response \n+00130ba0: 6f6e 652d 7761 7920 6f70 6572 6174 696f one-way operatio\n+00130bb0: 6e73 2066 726f 6d20 6120 5753 444c 2c20 ns from a WSDL, \n+00130bc0: 7573 6520 3c61 2068 7265 663d 2223 7773 use wsdl2h -b option \n+00130c00: 3c63 6f64 653e 2d62 3c2f 636f 6465 3e3c -b<\n+00130c10: 2f62 3e3c 2f61 3e2e 2054 6869 7320 7072 /b>. This pr\n+00130c20: 6f64 7563 6573 2061 6464 6974 696f 6e61 oduces additiona\n+00130c30: 6c20 6f6e 652d 7761 7920 6f70 6572 6174 l one-way operat\n+00130c40: 696f 6e73 2074 6f20 7375 7070 6f72 7420 ions to support \n+00130c50: 6173 796e 6368 726f 6e6f 7573 2068 616e asynchronous han\n+00130c60: 646c 696e 6720 6f66 2072 6573 706f 6e73 dling of respons\n+00130c70: 6520 6d65 7373 6167 6573 2069 6e20 7468 e messages in th\n+00130c80: 6520 7361 6d65 2077 6179 2072 6571 7565 e same way reque\n+00130c90: 7374 7320 6172 6520 6861 6e64 6c65 642e sts are handled.\n+00130ca0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+00130cc0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+00130cd0: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+00130ce0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00130cf0: 2069 643d 2273 6f61 706f 7665 7275 6470 id=\"soapoverudp\n+00130d00: 6d75 6c74 6963 6173 7422 3e3c 2f61 3e0a multicast\">.\n+00130d10: 534f 4150 2d6f 7665 722d 5544 5020 6d75 SOAP-over-UDP mu\n+00130d20: 6c74 6963 6173 7420 7265 6365 6976 696e lticast receivin\n+00130d30: 6720 7365 7276 6572 3c2f 6833 3e0a 3c70 g server

    .For UDP multica\n+00130d50: 7374 2073 7570 706f 7274 2c20 666f 6c6c st support, foll\n+00130d60: 6f77 2074 6865 2073 7567 6765 7374 696f ow the suggestio\n+00130d70: 6e73 2069 6e20 5365 6374 696f 6e20 3c61 ns in Section SOAP-o\n+00130db0: 7665 722d 5544 5020 7365 7276 6572 3c2f ver-UDP server and change th\n+00130dd0: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization\n+00130de0: 2070 6172 7473 206f 6620 7468 6520 636f parts of the co\n+00130df0: 6465 2074 6f20 656e 6162 6c65 2055 4450 de to enable UDP\n+00130e00: 206d 756c 7469 6361 7374 2070 6f72 7420 multicast port \n+00130e10: 6269 6e64 696e 6720 6279 2074 6f20 7465 binding by to te\n+00130e20: 6c6c 696e 6720 7468 6520 6b65 726e 656c lling the kernel\n+00130e30: 2077 6869 6368 206d 756c 7469 6361 7374 which multicast\n+00130e40: 2067 726f 7570 7320 796f 7520 6172 6520 groups you are \n+00130e50: 696e 7465 7265 7374 6564 2069 6e3a 3c2f interested in:.
    #include &\n+00130eb0: 7175 6f74 3b70 6c75 6769 6e2f 7773 6161 quot;plugin/wsaa\n+00130ec0: 7069 2e68 2671 756f 743b 3c2f 7370 616e pi.h"
    .
    .
    .int main()
    \n+00130f00: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne\">in\n+00130f20: 743c 2f73 7061 6e3e 206d 6169 6e28 2920 t main() \n+00130f30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n 00130f50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00130f80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00130f90: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
    .
    <\n-00131020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00131030: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ip_mreq mcast\n-00131050: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init1\n-001310d0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00131100: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_I\n-00131160: 4f5f 5544 503c 2f61 3e29 3b20 3c2f 6469 O_UDP); ..
    <\n-00131250: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00131260: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!soap_vali\n-001312d0: 645f 736f 636b 6574 3c2f 613e 283c 6120 d_socket(soa\n-00131330: 705f 6269 6e64 3c2f 613e 2826 616d 703b p_bind(&\n-00131340: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00131370: 2068 6f73 742c 2070 6f72 742c 2042 4143 host, port, BAC\n-00131380: 4b4c 4f47 2929 2920 3c2f 6469 763e 0a3c KLOG)))
    .<\n-00131390: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001313a0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n-001313c0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n-00131420: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n-00131460: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .<\n-00131470: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00131480: 3e20 2020 2065 7869 7428 4558 4954 5f46 > exit(EXIT_F\n-00131490: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    .\n-001314a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n-001314d0: 206d 6361 7374 2e69 6d72 5f6d 756c 7469 mcast.imr_multi\n-001314e0: 6164 6472 2e73 5f61 6464 7220 3d20 696e addr.s_addr = in\n-001314f0: 6574 5f61 6464 7228 7075 7420 4950 206d et_addr(put IP m\n-00131500: 756c 7469 6361 7374 2061 6464 7265 7373 ulticast address\n-00131510: 206f 6620 6772 6f75 7020 6865 7265 293b of group here);\n-00131520: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    mcas\n-00131540: 742e 696d 725f 696e 7465 7266 6163 652e t.imr_interface.\n-00131550: 735f 6164 6472 203d 2068 746f 6e6c 2849 s_addr = htonl(I\n-00131560: 4e41 4444 525f 414e 5929 3b20 3c2f 6469 NADDR_ANY); .
    if (sets\n-001315b0: 6f63 6b6f 7074 283c 6120 636c 6173 733d ockopt(so\n-001315e0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n-00131630: 6d61 7374 6572 3c2f 613e 2c20 4950 5052 master, IPPR\n-00131640: 4f54 4f5f 4950 2c20 4950 5f41 4444 5f4d OTO_IP, IP_ADD_M\n-00131650: 454d 4245 5253 4849 502c 2026 616d 703b EMBERSHIP, &\n-00131660: 6d63 6173 742c 203c 7370 616e 2063 6c61 mcast, siz\n-00131680: 656f 663c 2f73 7061 6e3e 286d 6361 7374 eof(mcast\n-00131690: 2929 266c 743b 3029 203c 2f64 6976 3e0a ))<0)
    .\n-001316a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... \n-001316d0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-001316e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    soa\n-00131790: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a\n-001317a0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    ..\n-001318a0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_done\n-00131900: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    }
    .
    S\n-00131a20: 4f41 505f 534f 434b 4554 206d 6173 7465 OAP_SOCKET maste\n-00131a30: 723c 2f64 6976 3e3c 6469 7620 636c 6173 r
    The so\n-00131a50: 636b 6574 2073 6574 2062 7920 736f 6170 cket set by soap\n-00131a60: 5f62 696e 6420 286f 7220 7468 6520 432b _bind (or the C+\n-00131a70: 2b20 7365 7276 6963 6520 636c 6173 7320 + service class \n-00131a80: 6269 6e64 206d 6574 686f 6429 2074 6f20 bind method) to \n-00131a90: 7365 7276 6520 6173 2074 6865 206d 6173 serve as the mas\n-00131aa0: 7465 7220 736f 636b 6574 2062 6f75 6e2e ter socket boun.\n-00131ab0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De\n-00131ad0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00131ae0: 6473 6f61 7032 2e68 3a33 3032 333c 2f64 dsoap2.h:3023
    .
    \n-00131b00: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d \n-001360c0: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n-001360d0: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n-001360e0: 2073 6f61 7063 7070 3220 7265 6665 7273 soapcpp2 refers\n-001360f0: 2074 6f20 3c63 6f64 653e 7374 643a 3a6f to std::o\n-00136100: 7374 7265 616d 3c2f 636f 6465 3e20 7769 stream wi\n-00136110: 7468 6f75 7420 736f 6170 6370 7032 2074 thout soapcpp2 t\n-00136120: 6872 6f77 696e 6720 6572 726f 7273 2c20 hrowing errors, \n-00136130: 6279 2075 7369 6e67 203c 636f 6465 3e65 by using e\n-00136140: 7874 6572 6e3c 2f63 6f64 653e 2074 6f20 xtern to \n-00136150: 6465 636c 6172 6520 3c63 6f64 653e 636c declare cl\n-00136160: 6173 7320 7374 643a 3a6f 7374 7265 616d ass std::ostream\n-00136170: 3c2f 636f 6465 3e3a 3c2f 703e 0a3c 6469 :

    .
    // st\n-001361c0: 643a 3a6f 7374 7265 616d 2063 616e 2623 d::ostream can&#\n-001361d0: 3339 3b74 2062 6520 7365 7269 616c 697a 39;t be serializ\n-001361e0: 6564 2c20 6275 7420 6e65 6564 2074 6f20 ed, but need to \n-001361f0: 6265 2064 6563 6c61 7265 6420 746f 206d be declared to m\n-00136200: 616b 6520 6974 2076 6973 6962 6c65 2074 ake it visible t\n-00136210: 6f20 6753 4f41 5020 3c2f 7370 616e 3e3c o gSOAP <\n-00136220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ex\n-00136250: 7465 726e 3c2f 7370 616e 3e20 3c73 7061 tern class s\n-00136280: 7464 3a3a 6f73 7472 6561 6d3b 3c2f 6469 td::ostream; struc\n+00130f80: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n+00130fb0: 736f 6170 3c2f 613e 203c 6120 636c 6173 soap \n+00130fe0: 736f 6170 3c2f 613e 3b20 3c2f 6469 763e soap;
    \n+00130ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n+00131020: 7420 3c2f 7370 616e 3e69 705f 6d72 6571 t ip_mreq\n+00131030: 206d 6361 7374 3b20 3c2f 6469 763e 0a3c mcast;
    .<\n+00131040: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00131050: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_ini\n+001310b0: 7431 3c2f 613e 2826 616d 703b 3c61 2063 t1(&soap, \n+00131140: 534f 4150 5f49 4f5f 5544 503c 2f61 3e29 SOAP_IO_UDP)\n+00131150: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_register_p\n+001311d0: 6c75 6769 6e3c 2f61 3e28 2661 6d70 3b3c lugin(&<\n+001311e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001311f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00131200: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00131210: 736f 6170 5f77 7361 293b 3c2f 6469 763e soap_wsa);
    \n+00131220: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+00131250: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soa\n+001312b0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(soap_bind\n+00131320: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00131350: 703c 2f61 3e2c 2068 6f73 742c 2070 6f72 p, host, por\n+00131360: 742c 2042 4143 4b4c 4f47 2929 2920 3c2f t, BACKLOG))) .
    {
    \n+00131390: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n+00131400: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(&\n+00131410: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00131440: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    exit(\n+00131470: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n+00131480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    mcast.imr\n+001314c0: 5f6d 756c 7469 6164 6472 2e73 5f61 6464 _multiaddr.s_add\n+001314d0: 7220 3d20 696e 6574 5f61 6464 7228 7075 r = inet_addr(pu\n+001314e0: 7420 4950 206d 756c 7469 6361 7374 2061 t IP multicast a\n+001314f0: 6464 7265 7373 206f 6620 6772 6f75 7020 ddress of group \n+00131500: 6865 7265 293b 203c 2f64 6976 3e0a 3c64 here);
    .\n+00131520: 2020 6d63 6173 742e 696d 725f 696e 7465 mcast.imr_inte\n+00131530: 7266 6163 652e 735f 6164 6472 203d 2068 rface.s_addr = h\n+00131540: 746f 6e6c 2849 4e41 4444 525f 414e 5929 tonl(INADDR_ANY)\n+00131550: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n+00131590: 2028 7365 7473 6f63 6b6f 7074 283c 6120 (setsockopt(soap.master\n+00131620: 2c20 4950 5052 4f54 4f5f 4950 2c20 4950 , IPPROTO_IP, IP\n+00131630: 5f41 4444 5f4d 454d 4245 5253 4849 502c _ADD_MEMBERSHIP,\n+00131640: 2026 616d 703b 6d63 6173 742c 203c 7370 &mcast, sizeof\n+00131670: 286d 6361 7374 2929 266c 743b 3029 203c (mcast))<0) <\n+00131680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n+001316a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    . \n+001316e0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    soap_destroy<\n+00131780: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+001317b0: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n+001317c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_e\n+00131830: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap);.
    soa\n+001318e0: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(&\n+001318f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+00131920: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }.
    <\n+001319a0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+001319b0: 6170 2e68 746d 6c23 6162 3634 3962 3866 ap.html#ab649b8f\n+001319c0: 3362 3731 3038 3164 3134 6563 3633 3530 3b71081d14ec6350\n+001319d0: 6162 3462 3036 3739 3422 3e73 6f61 703a ab4b06794\">soap:\n+001319e0: 3a6d 6173 7465 723c 2f61 3e3c 2f64 6976 :master
    SOAP_SOCKET\n+00131a10: 206d 6173 7465 723c 2f64 6976 3e3c 6469 master
    \n+00131a30: 5468 6520 736f 636b 6574 2073 6574 2062 The socket set b\n+00131a40: 7920 736f 6170 5f62 696e 6420 286f 7220 y soap_bind (or \n+00131a50: 7468 6520 432b 2b20 7365 7276 6963 6520 the C++ service \n+00131a60: 636c 6173 7320 6269 6e64 206d 6574 686f class bind metho\n+00131a70: 6429 2074 6f20 7365 7276 6520 6173 2074 d) to serve as t\n+00131a80: 6865 206d 6173 7465 7220 736f 636b 6574 he master socket\n+00131a90: 2062 6f75 6e2e 2e2e 3c2f 6469 763e 3c64 boun...
    Definition:<\n+00131ac0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n+00131ad0: 3032 333c 2f64 6976 3e3c 2f64 6976 3e0a 023
    .\n+00131ae0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    .... <\n+00131b00: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href=\"#\">Back \n+00131b10: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont\n+00131b20: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6831 ents

    ..Compi\n+00131b60: 6c65 2d74 696d 6520 666c 6167 733c 2f68 le-time flags.

    The follow\n+00131b80: 696e 6720 6d61 6372 6f73 2061 7265 2064 ing macros are d\n+00131b90: 6566 696e 6564 2069 6e20 7468 6520 4150 efined in the AP\n+00131ba0: 4920 646f 6375 6d65 6e74 6174 696f 6e20 I documentation \n+00131bb0: 4d6f 6475 6c65 203c 6120 636c 6173 733d Module WITH_MACRO c\n+00131bf0: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag\n+00131c00: 733c 2f61 3e2e 2054 6865 7365 206d 6163 s. These mac\n+00131c10: 726f 7320 6172 6520 7573 6564 2074 6f20 ros are used to \n+00131c20: 656e 6162 6c65 206f 7220 6469 7361 626c enable or disabl\n+00131c30: 6520 6665 6174 7572 6573 2061 7320 7370 e features as sp\n+00131c40: 6563 6966 6965 6420 6265 6c6f 772c 2062 ecified below, b\n+00131c50: 7920 636f 6d70 696c 696e 6720 736f 7572 y compiling sour\n+00131c60: 6365 2063 6f64 6520 6669 6c65 7320 7769 ce code files wi\n+00131c70: 7468 2063 6f6d 7069 6c65 7220 6f70 7469 th compiler opti\n+00131c80: 6f6e 203c 623e 3c63 6f64 653e 2d44 3c2f on -D to set\n+00131ca0: 2074 6865 206d 6163 726f 3a3c 2f70 3e0a the macro:

    .\n+00131cb0: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61 ..d\n+00131d10: 6566 696e 6520 2020 3c2f 7468 3e3c 7468 efine r\n+00131d40: 6573 756c 7420 2020 203c 2f74 683e 3c2f esult ....<\n+00131e50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00131e60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00131e70: 3e3c 636f 6465 3e23 5749 5448 5f53 4f41 >#WITH_SOA\n+00131e80: 5044 4546 535f 483c 2f63 6f64 653e 2020 PDEFS_H \n+00131e90: 203c 2f74 643e 3c74 6420 636c 6173 733d .<\n+00131f60: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00131f70: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00131f80: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00132030: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+00132190: 636f 6465 3e23 5749 5448 5f4c 4541 4e45 code>#WITH_LEANE\n+001321a0: 523c 2f63 6f64 653e 2020 203c 2f74 643e R \n+001321b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .\n+00132270: 3c74 7220 636c 6173 733d 226d 6172 6b64 .......<\n+00132600: 636f 6465 3e23 5749 5448 5f49 5056 363c code>#WITH_IPV6<\n+00132610: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+00132640: 656e 6162 6c65 7320 4950 7636 2073 7570 enables IPv6 sup\n+00132650: 706f 7274 2020 2020 3c2f 7464 3e3c 2f74 port ..e\n+001326f0: 6e61 626c 6573 2049 5076 3620 7375 7070 nables IPv6 supp\n+00132700: 6f72 7420 7769 7468 2049 5076 362d 6f6e ort with IPv6-on\n+00132710: 6c79 2073 6572 7665 7220 6f70 7469 6f6e ly server option\n+00132720: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00132730: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00132740: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00132750: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+001329d0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....<\n+00132b20: 636f 6465 3e23 5749 5448 5f5a 4c49 423c code>#WITH_ZLIB<\n+00132b30: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+00132b60: 656e 6162 6c65 7320 6465 666c 6174 6520 enables deflate \n+00132b70: 636f 6d70 7265 7373 696f 6e20 6f6e 6c79 compression only\n+00132b80: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Zlib c\n+00132bc0: 6f6d 7072 6573 7369 6f6e 3c2f 613e 2020 ompression \n+00132bd0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n+00132c20: 3c63 6f64 653e 2357 4954 485f 4e54 4c4d #WITH_NTLM\n+00132c30: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00132c40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00132c50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00132c60: 3e65 6e61 626c 6573 204e 544c 4d20 7375 >enables NTLM su\n+00132c70: 7070 6f72 7420 2020 203c 2f74 643e 3c2f pport ......\n+00132e90: 3c63 6f64 653e 2357 4954 485f 494e 434c #WITH_INCL\n+00132ea0: 5544 455f 584c 4f43 414c 455f 483c 2f63 UDE_XLOCALE_H ....\n+00133070: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+001331b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00133230: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+00133360: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+00133470: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+00133530: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+00133650: 636f 6465 3e23 5749 5448 5f4e 4f45 4d50 code>#WITH_NOEMP\n+00133660: 5459 4e41 4d45 5350 4143 4553 3c2f 636f TYNAMESPACES ...\n+001337c0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...\n+00133950: 6469 7361 626c 6573 2064 6570 656e 6465 disables depende\n+00133960: 6e63 6520 6f6e 2067 6c6f 6261 6c20 3c63 nce on global namespaces table, a t\n+00133990: 6162 6c65 206d 7573 7420 6265 2073 6574 able must be set\n+001339a0: 2065 7870 6c69 6369 746c 7920 7769 7468 explicitly with\n+001339b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set_\n+00133a80: 6e61 6d65 7370 6163 6573 3c2f 613e 3c2f namespaces see also S\n+00133aa0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection X\n+00133ad0: 4d4c 206e 616d 6573 7061 6365 7320 616e ML namespaces an\n+00133ae0: 6420 7468 6520 6e61 6d65 7370 6163 6520 d the namespace \n+00133af0: 6d61 7070 696e 6720 7461 626c 653c 2f61 mapping table .\n+00133b10: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...\n+00133c20: 3c63 6f64 653e 2357 4954 485f 5055 5245 #WITH_PURE\n+00133c30: 5f56 4952 5455 414c 3c2f 636f 6465 3e20 _VIRTUAL \n+00133c40: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 .....<\n+00133f00: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00133f10: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00133f20: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+001340f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..e\n+00134180: 6e61 626c 6573 2061 2022 7365 6c66 2070 nables a \"self p\n+00134190: 6970 6522 2074 6f20 656e 6162 6c65 2074 ipe\" to enable t\n+001341a0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he \n+00134240: 736f 6170 5f63 6c6f 7365 5f63 6f6e 6e65 soap_close_conne\n+00134250: 6374 696f 6e3c 2f61 3e3c 2f63 6f64 653e ction\n+00134260: 2066 756e 6374 696f 6e20 2867 534f 4150 function (gSOAP\n+00134270: 2032 2e38 2e37 3120 6f72 2067 7265 6174 2.8.71 or great\n+00134280: 6572 2920 2020 3c2f 7464 3e3c 2f74 723e er) \n+00134290: 0a3c 2f74 6162 6c65 3e0a 3c70 3e54 6865 .
    #SO\n+00131da0: 4150 4445 4653 5f48 3c2f 636f 6465 3e20 APDEFS_H \n+00131db0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 the hea\n+00131de0: 6465 7220 6669 6c65 2074 6f20 696e 636c der file to incl\n+00131df0: 7564 652c 2069 6620 6469 6666 6572 656e ude, if differen\n+00131e00: 7420 6672 6f6d 203c 636f 6465 3e73 6f61 t from soa\n+00131e10: 7064 6566 732e 683c 2f63 6f64 653e 2020 pdefs.h \n+00131e20: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    includes\n+00131ec0: 2074 6865 203c 636f 6465 3e73 6f61 7064 the soapd\n+00131ed0: 6566 732e 683c 2f63 6f64 653e 2066 696c efs.h fil\n+00131ee0: 6520 666f 7220 6375 7374 6f6d 2073 6574 e for custom set\n+00131ef0: 7469 6e67 732c 2073 6565 2053 6563 7469 tings, see Secti\n+00131f00: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Usin\n+00131f30: 6720 7468 6520 736f 6170 6465 6673 2e68 g the soapdefs.h\n+00131f40: 2068 6561 6465 7220 6669 6c65 3c2f 613e header file\n+00131f50: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_CO\n+00131fb0: 4d50 4154 3c2f 636f 6465 3e20 2020 3c2f MPAT removes dep\n+00131ff0: 656e 6465 6e63 7920 6f6e 2043 2b2b 2073 endency on C++ s\n+00132000: 7472 6561 6d20 6c69 6272 6172 6965 7320 tream libraries \n+00132010: 616e 6420 432b 2b20 6578 6365 7074 696f and C++ exceptio\n+00132020: 6e73 2020 2020 3c2f 7464 3e3c 2f74 723e ns
    #WITH\n+00132080: 5f4c 4541 4e3c 2f63 6f64 653e 2020 203c _LEAN <\n+00132090: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>creates a \n+001320c0: 736d 616c 6c2d 666f 6f74 7072 696e 7420 small-footprint \n+001320d0: 6578 6563 7574 6162 6c65 2c20 7365 6520 executable, see \n+001320e0: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section How\n+00132110: 2074 6f20 6d69 6e69 6d69 7a65 2061 7070 to minimize app\n+00132120: 6c69 6361 7469 6f6e 206d 656d 6f72 7920 lication memory \n+00132130: 666f 6f74 7072 696e 743c 2f61 3e20 2020 footprint \n+00132140: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    creates an eve\n+001321e0: 6e20 736d 616c 6c65 7220 666f 6f74 7072 n smaller footpr\n+001321f0: 696e 7420 6578 6563 7574 6162 6c65 2c20 int executable, \n+00132200: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section How to minimize\n+00132240: 2061 7070 6c69 6361 7469 6f6e 206d 656d application mem\n+00132250: 6f72 7920 666f 6f74 7072 696e 743c 2f61 ory footprint
    #WITH_\n+001322c0: 4641 5354 3c2f 636f 6465 3e20 2020 3c2f FAST use faster \n+00132300: 6d65 6d6f 7279 2061 6c6c 6f63 6174 696f memory allocatio\n+00132310: 6e20 7768 656e 2075 7365 6420 7769 7468 n when used with\n+00132320: 203c 636f 6465 3e23 5749 5448 5f4c 4541 #WITH_LEA\n+00132330: 4e3c 2f63 6f64 653e 206f 7220 3c63 6f64 N or #WITH_LEANER
    #WI\n+001323b0: 5448 5f43 4f4f 4b49 4553 3c2f 636f 6465 TH_COOKIES enabl\n+001323f0: 6573 2048 5454 5020 636f 6f6b 6965 732c es HTTP cookies,\n+00132400: 2073 6565 2053 6563 7469 6f6e 7320 3c61 see Sections Clien\n+00132440: 742d 7369 6465 2063 6f6f 6b69 6520 7375 t-side cookie su\n+00132450: 7070 6f72 743c 2f61 3e20 616e 6420 3c61 pport and Serve\n+00132490: 722d 7369 6465 2063 6f6f 6b69 6520 7375 r-side cookie su\n+001324a0: 7070 6f72 743c 2f61 3e20 2020 203c 2f74 pport
    #WITH_INSECURE\n+00132510: 5f43 4f4f 4b49 4553 3c2f 636f 6465 3e20 _COOKIES \n+00132520: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enables\n+00132550: 2048 5454 5020 636f 6f6b 6965 7320 616e HTTP cookies an\n+00132560: 6420 616c 6c6f 7773 2063 6f6f 6b69 6573 d allows cookies\n+00132570: 2077 6974 6820 7468 6569 7220 5365 6375 with their Secu\n+00132580: 7265 2066 6c61 6720 7365 7420 746f 2062 re flag set to b\n+00132590: 6520 7365 6e74 206f 7665 7220 696e 7365 e sent over inse\n+001325a0: 6375 7265 2063 6861 6e6e 656c 7320 2020 cure channels \n+001325b0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    #WI\n+001326b0: 5448 5f49 5056 365f 5636 4f4e 4c59 3c2f TH_IPV6_V6ONLY
    #WITH_OP\n+00132780: 454e 5353 4c3c 2f63 6f64 653e 2020 203c ENSSL <\n+00132790: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables Op\n+001327c0: 656e 5353 4c2c 2073 6565 2053 6563 7469 enSSL, see Secti\n+001327d0: 6f6e 7320 3c61 2063 6c61 7373 3d22 656c ons Secure clients\n+00132810: 2077 6974 6820 4854 5450 533c 2f61 3e20 with HTTPS \n+00132820: 616e 6420 3c61 2063 6c61 7373 3d22 656c and Secure Web ser\n+00132860: 7669 6365 7320 7769 7468 2048 5454 5053 vices with HTTPS\n+00132870: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #WI\n+001328d0: 5448 5f47 4e55 544c 533c 2f63 6f64 653e TH_GNUTLS\n+001328e0: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+00132910: 7320 474e 5554 4c53 2c20 7365 6520 5365 s GNUTLS, see Se\n+00132920: 6374 696f 6e73 203c 6120 636c 6173 733d ctions Secure clie\n+00132960: 6e74 7320 7769 7468 2048 5454 5053 3c2f nts with HTTPS and Secure Web \n+001329b0: 7365 7276 6963 6573 2077 6974 6820 4854 services with HT\n+001329c0: 5450 533c 2f61 3e20 2020 203c 2f74 643e TPS
    #\n+00132a20: 5749 5448 5f47 5a49 503c 2f63 6f64 653e WITH_GZIP\n+00132a30: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+00132a60: 7320 677a 6970 2061 6e64 2064 6566 6c61 s gzip and defla\n+00132a70: 7465 2063 6f6d 7072 6573 7369 6f6e 2c20 te compression, \n+00132a80: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Zlib com\n+00132ac0: 7072 6573 7369 6f6e 3c2f 613e 2020 2020 pression \n+00132ad0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #W\n+00132cd0: 4954 485f 435f 4c4f 4341 4c45 3c2f 636f ITH_C_LOCALE for\n+00132d10: 6365 2074 6865 2075 7365 206c 6f63 616c ce the use local\n+00132d20: 6520 6675 6e63 7469 6f6e 7320 7768 656e e functions when\n+00132d30: 2061 7661 696c 6162 6c65 2074 6f20 656e available to en\n+00132d40: 7375 7265 206c 6f63 616c 652d 696e 6465 sure locale-inde\n+00132d50: 7065 6e64 656e 7420 6e75 6d62 6572 2063 pendent number c\n+00132d60: 6f6e 7665 7273 696f 6e73 2020 2020 3c2f onversions
    #WITH_NO_C_LOC\n+00132dd0: 414c 453c 2f63 6f64 653e 2020 203c 2f74 ALE remove the u\n+00132e10: 7365 206f 6620 6c6f 6361 6c65 2066 756e se of locale fun\n+00132e20: 6374 696f 6e73 2074 6f20 696d 7072 6f76 ctions to improv\n+00132e30: 6520 706f 7274 6162 696c 6974 7920 2020 e portability \n+00132e40: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    fo\n+00132ee0: 7263 6520 7468 6520 696e 636c 7573 696f rce the inclusio\n+00132ef0: 6e20 6f66 203c 636f 6465 3e26 6c74 3b78 n of <x\n+00132f00: 6c6f 6361 6c65 2e68 2667 743b 3c2f 636f locale.h> to define locale_t and _l\n+00132f40: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n+00132f50: 732c 2074 6f20 696d 7072 6f76 6520 706f s, to improve po\n+00132f60: 7274 6162 696c 6974 7920 2020 203c 2f74 rtability
    #WITH_DOM enabl\n+00133000: 6520 444f 4d20 7061 7273 696e 6720 696e e DOM parsing in\n+00133010: 2074 6865 2065 6e67 696e 652c 2072 6571 the engine, req\n+00133020: 7569 7265 6420 6279 2074 6865 2057 532d uired by the WS-\n+00133030: 5365 6375 7269 7479 2070 6c75 6769 6e20 Security plugin \n+00133040: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #WITH_RE\n+001330a0: 504c 4143 455f 494c 4c45 4741 4c5f 5554 PLACE_ILLEGAL_UT\n+001330b0: 4638 3c2f 636f 6465 3e20 2020 3c2f 7464 F8 enable strict\n+001330f0: 2055 5446 2d38 2c20 7265 706c 6163 6573 UTF-8, replaces\n+00133100: 2055 5446 2d38 2063 6f6e 7465 6e74 2074 UTF-8 content t\n+00133110: 6861 7420 6973 206f 7574 7369 6465 2074 hat is outside t\n+00133120: 6865 2061 6c6c 6f77 6564 2072 616e 6765 he allowed range\n+00133130: 2077 6974 6820 552b 4646 4644 2020 2020 with U+FFFD \n+00133140: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #WITH_FASTCG\n+001331a0: 493c 2f63 6f64 653e 2020 203c 2f74 643e I enables FastCG\n+001331e0: 492c 2073 6565 2053 6563 7469 6f6e 203c I, see Section <\n+001331f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00133200: 663d 2269 6e64 6578 2e68 746d 6c23 6661 f=\"index.html#fa\n+00133210: 7374 6367 6922 3e46 6173 7443 4749 3c2f stcgi\">FastCGI
    #WITH\n+00133280: 5f4e 4f49 4f3c 2f63 6f64 653e 2020 203c _NOIO <\n+00133290: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>removes IO\n+001332c0: 206f 7065 7261 7469 6f6e 732c 2074 6f20 operations, to \n+001332d0: 656c 696d 696e 6174 6520 7468 6520 7573 eliminate the us\n+001332e0: 6520 6f66 2042 5344 2073 6f63 6b65 7473 e of BSD sockets\n+001332f0: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section How to remove\n+00133330: 2074 6865 2042 5344 2073 6f63 6b65 7420 the BSD socket \n+00133340: 6c69 6272 6172 7920 7265 7175 6972 656d library requirem\n+00133350: 656e 743c 2f61 3e20 2020 203c 2f74 643e ent
    #\n+001333b0: 5749 5448 5f4e 4f49 4452 4546 3c2f 636f WITH_NOIDREF rem\n+001333f0: 6f76 6573 2069 6420 616e 6420 6872 6566 oves id and href\n+00133400: 2f72 6566 206d 756c 7469 2d72 6566 6572 /ref multi-refer\n+00133410: 656e 6365 2064 6174 612c 206d 6f72 6520 ence data, more \n+00133420: 6167 6772 6573 7369 7665 2074 6861 6e20 aggressive than \n+00133430: 7573 696e 6720 7468 6520 3c63 6f64 653e using the \n+00133440: 2353 4f41 505f 584d 4c5f 5452 4545 3c2f #SOAP_XML_TREE runtime fl\n+00133460: 6167 2020 2020 3c2f 7464 3e3c 2f74 723e ag
    #WITH\n+001334c0: 5f4e 4f48 5454 503c 2f63 6f64 653e 2020 _NOHTTP \n+001334d0: 203c 2f74 643e 3c74 6420 636c 6173 733d removes \n+00133500: 7468 6520 4854 5450 2073 7461 636b 2074 the HTTP stack t\n+00133510: 6f20 7265 6475 6365 2063 6f64 6520 7369 o reduce code si\n+00133520: 7a65 2020 2020 3c2f 7464 3e3c 2f74 723e ze
    #WITH_\n+00133580: 4e4f 5a4f 4e45 3c2f 636f 6465 3e20 2020 NOZONE \n+00133590: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disables \n+001335c0: 616e 6420 6967 6e6f 7265 7320 7468 6520 and ignores the \n+001335d0: 7469 6d65 7a6f 6e65 2069 6e20 3c63 6f64 timezone in xsd:dateTime values \n+00133600: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    dis\n+001336a0: 6162 6c65 7320 786d 6c6e 733d 2222 2064 ables xmlns=\"\" d\n+001336b0: 6566 6175 6c74 2065 6d70 7479 206e 616d efault empty nam\n+001336c0: 6573 7061 6365 7320 6672 6f6d 2058 4d4c espaces from XML\n+001336d0: 206d 6573 7361 6765 7320 2020 203c 2f74 messages
    #WITH_NOEMPTYST\n+00133740: 5255 4354 3c2f 636f 6465 3e20 2020 3c2f RUCT inserts a d\n+00133780: 756d 6d79 206d 656d 6265 7220 696e 2065 ummy member in e\n+00133790: 6d70 7479 2073 7472 7563 7473 2074 6f20 mpty structs to \n+001337a0: 616c 6c6f 7720 636f 6d70 696c 6174 696f allow compilatio\n+001337b0: 6e20 2020 203c 2f74 643e 3c2f 7472 3e0a n
    #WITH_\n+00133810: 4e4f 474c 4f42 414c 3c2f 636f 6465 3e20 NOGLOBAL \n+00133820: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 omit SO\n+00133850: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa\n+00133860: 756c 7420 7365 7269 616c 697a 6174 696f ult serializatio\n+00133870: 6e20 636f 6465 2c20 7072 6576 656e 7473 n code, prevents\n+00133880: 2064 7570 6c69 6361 7465 2064 6566 696e duplicate defin\n+00133890: 6974 696f 6e73 2077 6974 6820 6765 6e65 itions with gene\n+001338a0: 7261 7465 6420 736f 6170 5859 5a4c 6962 rated soapXYZLib\n+001338b0: 2063 6f64 6520 2020 203c 2f74 643e 3c2f code
    #WI\n+00133910: 5448 5f4e 4f4e 414d 4553 5041 4345 533c TH_NONAMESPACES<\n+00133920: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #WITH_\n+00133b60: 4344 4154 413c 2f63 6f64 653e 2020 203c CDATA <\n+00133b70: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>retains th\n+00133ba0: 6520 7061 7273 6564 2043 4441 5441 2073 e parsed CDATA s\n+00133bb0: 6563 7469 6f6e 7320 696e 206c 6974 6572 ections in liter\n+00133bc0: 616c 2058 4d4c 2073 7472 696e 6773 2020 al XML strings \n+00133bd0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    enables\n+00133c70: 2043 2b2b 2061 6273 7472 6163 7420 7365 C++ abstract se\n+00133c80: 7276 6963 6520 636c 6173 7365 7320 7769 rvice classes wi\n+00133c90: 7468 2070 7572 6520 7669 7274 7561 6c20 th pure virtual \n+00133ca0: 6d65 7468 6f64 732c 2072 6571 7569 7265 methods, require\n+00133cb0: 7320 736f 6170 6370 7032 206f 7074 696f s soapcpp2 optio\n+00133cc0: 6e20 3c63 6f64 653e 2d69 3c2f 636f 6465 n -i or -j
    #WI\n+00133d40: 5448 5f44 4546 4155 4c54 5f56 4952 5455 TH_DEFAULT_VIRTU\n+00133d50: 414c 3c2f 636f 6465 3e20 2020 3c2f 7464 AL enables C++ b\n+00133d90: 6173 6520 7365 7276 6963 6520 636c 6173 ase service clas\n+00133da0: 7365 7320 7769 7468 2064 6566 6175 6c74 ses with default\n+00133db0: 2076 6972 7475 616c 206d 6574 686f 6473 virtual methods\n+00133dc0: 2072 6574 7572 6e69 6e67 2066 6175 6c74 returning fault\n+00133dd0: 203c 636f 6465 3e23 534f 4150 5f4e 4f5f #SOAP_NO_\n+00133de0: 4d45 5448 4f44 3c2f 636f 6465 3e2c 2072 METHOD, r\n+00133df0: 6571 7569 7265 7320 736f 6170 6370 7032 equires soapcpp2\n+00133e00: 206f 7074 696f 6e20 3c63 6f64 653e 2d69 option -i\n+00133e10: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or -j
    #WITH_CASEINSE\n+00133e90: 4e53 4954 4956 4554 4147 533c 2f63 6f64 NSITIVETAGS enab\n+00133ed0: 6c65 7320 6361 7365 2069 6e73 656e 7369 les case insensi\n+00133ee0: 7469 7665 2058 4d4c 2070 6172 7369 6e67 tive XML parsing\n+00133ef0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_S\n+00133f50: 4f43 4b45 545f 434c 4f53 455f 4f4e 5f45 OCKET_CLOSE_ON_E\n+00133f60: 5849 543c 2f63 6f64 653e 2020 203c 2f74 XIT prevents a s\n+00133fa0: 6572 7665 7220 706f 7274 2066 726f 6d20 erver port from \n+00133fb0: 7374 6179 696e 6720 696e 206c 6973 7465 staying in liste\n+00133fc0: 6e69 6e67 206d 6f64 6520 6166 7465 7220 ning mode after \n+00133fd0: 6578 6974 2062 7920 696e 7465 726e 616c exit by internal\n+00133fe0: 6c79 2073 6574 7469 6e67 203c 636f 6465 ly setting fcntl(sock, F_S\n+00134000: 4554 4644 2c20 4644 5f43 4c4f 4558 4543 ETFD, FD_CLOEXEC\n+00134010: 293c 2f63 6f64 653e 2020 2020 3c2f 7464 )
    \n+00134070: 2357 4954 485f 5443 5046 494e 3c2f 636f #WITH_TCPFIN ena\n+001340b0: 626c 6573 2054 4350 2046 494e 2061 6674 bles TCP FIN aft\n+001340c0: 6572 2073 656e 6473 2077 6865 6e20 736f er sends when so\n+001340d0: 636b 6574 2069 7320 7265 6164 7920 746f cket is ready to\n+001340e0: 2063 6c6f 7365 2020 2020 3c2f 7464 3e3c close
    #\n+00134140: 5749 5448 5f53 454c 465f 5049 5045 3c2f WITH_SELF_PIPE
    .

    The\n+001342a0: 2066 6f6c 6c6f 7769 6e67 2073 7562 7365 following subse\n+001342b0: 7420 6f66 206d 6163 726f 7320 6172 6520 t of macros are \n+001342c0: 6465 6669 6e65 6420 696e 2074 6865 2041 defined in the A\n+001342d0: 5049 2064 6f63 756d 656e 7461 7469 6f6e PI documentation\n+001342e0: 204d 6f64 756c 6520 3c61 2063 6c61 7373 Module SOAP_MACRO \n+00134320: 636f 6d70 696c 652d 7469 6d65 2076 616c compile-time val\n+00134330: 7565 733c 2f61 3e2e 2054 6865 7365 206d ues. These m\n+00134340: 6163 726f 7320 6172 6520 7573 6564 2074 acros are used t\n+00134350: 6f20 656e 6162 6c65 206f 7220 6469 7361 o enable or disa\n+00134360: 626c 6520 6665 6174 7572 6573 2061 7320 ble features as \n+00134370: 7370 6563 6966 6965 6420 6265 6c6f 772c specified below,\n+00134380: 2062 7920 636f 6d70 696c 696e 6720 736f by compiling so\n+00134390: 7572 6365 2063 6f64 6520 6669 6c65 7320 urce code files \n+001343a0: 7769 7468 2063 6f6d 7069 6c65 7220 6f70 with compiler op\n+001343b0: 7469 6f6e 203c 623e 3c63 6f64 653e 2d44 tion -D\n+001343c0: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2073 to s\n+001343d0: 6574 2074 6865 206d 6163 726f 3a3c 2f70 et the macro:..\n+00134400: 3c74 7220 636c 6173 733d 226d 6172 6b64 .<\n+00134420: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n+00134430: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n+00134440: 3e64 6566 696e 6520 2020 3c2f 7468 3e3c >define <\n+00134450: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n+00134460: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n+00134470: 3e72 6573 756c 7420 2020 203c 2f74 683e >result \n+00134480: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n+001345d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00134690: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....t\n+001347d0: 6865 206d 6178 696d 756d 206c 656e 6774 he maximum lengt\n+001347e0: 6820 6f66 2058 4d4c 2074 6167 7320 616e h of XML tags an\n+001347f0: 6420 5552 4c73 2020 2020 3c2f 7464 3e3c d URLs <\n+00134800: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...<\n+001348f0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00134900: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00134910: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+001349d0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+00134a40: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00134b80: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n+00134d40: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......<\n+00135070: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..m\n+00135100: 6178 696d 756d 206e 756d 6265 7220 6f66 aximum number of\n+00135110: 2061 7272 6179 206f 7220 636f 6e74 6169 array or contai\n+00135120: 6e65 7220 656c 656d 656e 7473 2066 6f72 ner elements for\n+00135130: 2063 6f6e 7461 696e 6572 7320 7468 6174 containers that\n+00135140: 2061 7265 206e 6f74 2061 6c72 6561 6479 are not already\n+00135150: 2063 6f6e 7374 7261 696e 6564 2062 7920 constrained by \n+00135160: 584d 4c20 7363 6865 6d61 2076 616c 6964 XML schema valid\n+00135170: 6174 696f 6e20 636f 6e73 7472 6169 6e74 ation constraint\n+00135180: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n+00135190: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+001351b0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .t\n+00135220: 7275 7374 6564 2064 6566 6c61 7469 6f6e rusted deflation\n+00135230: 2072 6174 696f 2061 6674 6572 203c 636f ratio after #SOAP_MAXINFL\n+00135250: 4154 4553 495a 453c 2f63 6f64 653e 2069 ATESIZE i\n+00135260: 7320 7265 6163 6865 6420 2020 203c 2f74 s reached ......<\n+00135440: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00135450: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00135460: 3e3c 636f 6465 3e23 534f 4150 5f55 4e4b >#SOAP_UNK\n+00135470: 4e4f 574e 5f43 4841 523c 2f63 6f64 653e NOWN_CHAR\n+00135480: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n+00135540: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....\n+00135660: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+001357f0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+00135880: 706f 7274 6162 6c65 2069 6e76 616c 6964 portable invalid\n+00135890: 2073 6f63 6b65 7420 7661 6c75 652c 2063 socket value, c\n+001358a0: 616e 2061 6c73 6f20 7573 6520 3c63 6f64 an also use #\n+00135960: 736f 6170 5f76 616c 6964 5f73 6f63 6b65 soap_valid_socke\n+00135970: 7428 736f 636b 293c 2f61 3e3c 2f63 6f64 t(sock) to check if <\n+00135990: 636f 6465 3e73 6f63 6b3c 2f63 6f64 653e code>sock\n+001359a0: 2069 7320 7661 6c69 6420 2020 3c2f 7464 is valid .
    #\n+001344d0: 534f 4150 5f4e 4f54 4852 4f57 3c2f 636f SOAP_NOTHROW exp\n+00134510: 616e 6473 2074 6f20 3c63 6f64 653e 2873 ands to (s\n+00134520: 7464 3a3a 6e6f 7468 726f 7729 3c2f 636f td::nothrow) to prevent m\n+00134540: 656d 6f72 7920 616c 6c6f 6361 7469 6f6e emory allocation\n+00134550: 2065 7863 6570 7469 6f6e 7320 283c 636f exceptions (#SOAP_EOM is used inst\n+00134580: 6561 6429 2c20 7468 6973 206d 6163 726f ead), this macro\n+00134590: 2063 616e 2062 6520 6368 616e 6765 6420 can be changed \n+001345a0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_BU\n+00134600: 464c 454e 3c2f 636f 6465 3e20 2020 3c2f FLEN the length \n+00134640: 6f66 2074 6865 2069 6e74 6572 6e61 6c20 of the internal \n+00134650: 6d65 7373 6167 6520 6275 6666 6572 2c20 message buffer, \n+00134660: 696d 7061 6374 7320 636f 6d6d 756e 6963 impacts communic\n+00134670: 6174 696f 6e73 2070 6572 666f 726d 616e ations performan\n+00134680: 6365 2020 2020 3c2f 7464 3e3c 2f74 723e ce
    #SOAP_\n+001346e0: 4844 524c 454e 3c2f 636f 6465 3e20 2020 HDRLEN \n+001346f0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 the maxim\n+00134720: 756d 206c 656e 6774 6820 6f66 2048 5454 um length of HTT\n+00134730: 5020 6865 6164 6572 7320 2020 203c 2f74 P headers
    #SOAP_TAGLEN
    #S\n+00134850: 4f41 505f 544d 504c 454e 3c2f 636f 6465 OAP_TMPLEN the m\n+00134890: 6178 696d 756d 206c 656e 6774 6820 6f66 aximum length of\n+001348a0: 2074 656d 706f 7261 7279 2073 7472 696e temporary strin\n+001348b0: 6720 7661 6c75 6573 2c20 7368 6f72 7420 g values, short \n+001348c0: 7374 7269 6e67 7320 616e 6420 6272 6965 strings and brie\n+001348d0: 6620 6572 726f 7220 6d65 7373 6167 6573 f error messages\n+001348e0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_M\n+00134940: 4158 414c 4c4f 4353 495a 453c 2f63 6f64 AXALLOCSIZE the \n+00134980: 6d61 7869 6d75 6d20 7369 7a65 206f 6620 maximum size of \n+00134990: 6120 626c 6f63 6b20 6f66 206d 656d 6f72 a block of memor\n+001349a0: 7920 7468 6174 203c 636f 6465 3e6d 616c y that mal\n+001349b0: 6c6f 633c 2f63 6f64 653e 2063 616e 2061 loc can a\n+001349c0: 6c6c 6f63 6174 6520 2020 203c 2f74 643e llocate
    #\n+00134a20: 534f 4150 5f4d 4158 4152 5241 5953 495a SOAP_MAXARRAYSIZ\n+00134a30: 453c 2f63 6f64 653e 2020 203c 2f74 643e E the maximum al\n+00134a70: 6c6f 6361 7469 6f6e 2074 6872 6573 686f location thresho\n+00134a80: 6c64 2074 6f20 7072 652d 616c 6c6f 6361 ld to pre-alloca\n+00134a90: 7465 2053 4f41 5020 6172 7261 7973 2069 te SOAP arrays i\n+00134aa0: 6e20 6d65 6d6f 7279 2020 2020 3c2f 7464 n memory
    #SOAP_MAXDIMESI\n+00134b10: 5a45 3c2f 636f 6465 3e20 2020 3c2f 7464 ZE the maximum D\n+00134b50: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n+00134b60: 697a 6520 616c 6c6f 7765 6420 746f 2072 ize allowed to r\n+00134b70: 6563 6569 7665 2020 2020 3c2f 7464 3e3c eceive
    #S\n+00134bd0: 4f41 505f 4d41 5845 494e 5452 3c2f 636f OAP_MAXEINTR max\n+00134c10: 696d 756d 206e 756d 6265 7220 6f66 2045 imum number of E\n+00134c20: 494e 5452 2069 6e74 6572 7275 7074 7320 INTR interrupts \n+00134c30: 746f 2069 676e 6f72 6520 7768 696c 6520 to ignore while \n+00134c40: 706f 6c6c 696e 6720 6120 736f 636b 6574 polling a socket\n+00134c50: 2066 6f72 2070 656e 6469 6e67 2061 6374 for pending act\n+00134c60: 6976 6974 7920 2020 203c 2f74 643e 3c2f ivity
    #S\n+00134cc0: 4f41 505f 4d41 5849 4e46 4c41 5445 5349 OAP_MAXINFLATESI\n+00134cd0: 5a45 3c2f 636f 6465 3e20 2020 3c2f 7464 ZE trusted infla\n+00134d10: 7465 6420 636f 6e74 656e 7420 7369 7a65 ted content size\n+00134d20: 2028 3120 4d42 2062 7920 6465 6661 756c (1 MB by defaul\n+00134d30: 7429 2020 2020 3c2f 7464 3e3c 2f74 723e t)
    #SOAP_\n+00134d90: 4d41 584b 4545 5041 4c49 5645 3c2f 636f MAXKEEPALIVE max\n+00134dd0: 696d 756d 2069 7465 7261 7469 6f6e 7320 imum iterations \n+00134de0: 696e 2074 6865 203c 636f 6465 3e3c 6120 in the soap\n+00134e60: 5f73 6572 7665 3c2f 613e 3c2f 636f 6465 _serve loop on HTTP k\n+00134e80: 6565 702d 616c 6976 6520 636f 6e6e 6563 eep-alive connec\n+00134e90: 7469 6f6e 7320 2020 203c 2f74 643e 3c2f tions
    #S\n+00134ef0: 4f41 505f 4d41 584c 454e 4754 483c 2f63 OAP_MAXLENGTH ma\n+00134f30: 7869 6d75 6d20 7374 7269 6e67 2063 6f6e ximum string con\n+00134f40: 7465 6e74 206c 656e 6774 6820 666f 7220 tent length for \n+00134f50: 7374 7269 6e67 7320 6e6f 7420 616c 7265 strings not alre\n+00134f60: 6164 7920 636f 6e73 7472 6169 6e65 6420 ady constrained \n+00134f70: 6279 2058 4d4c 2073 6368 656d 6120 7661 by XML schema va\n+00134f80: 6c69 6461 7469 6f6e 2063 6f6e 7374 7261 lidation constra\n+00134f90: 696e 7473 2020 2020 3c2f 7464 3e3c 2f74 ints
    #SOA\n+00134ff0: 505f 4d41 584c 4556 454c 3c2f 636f 6465 P_MAXLEVEL maxim\n+00135030: 756d 2058 4d4c 206e 6573 7469 6e67 2064 um XML nesting d\n+00135040: 6570 7468 206c 6576 656c 2070 6572 6d69 epth level permi\n+00135050: 7474 6564 2062 7920 7468 6520 584d 4c20 tted by the XML \n+00135060: 7061 7273 6572 2020 2020 3c2f 7464 3e3c parser
    #\n+001350c0: 534f 4150 5f4d 4158 4f43 4355 5253 3c2f SOAP_MAXOCCURS
    #SOAP_M\n+001351e0: 494e 4445 464c 4154 4552 4154 494f 3c2f INDEFLATERATIO
    #SOAP_PURE_VIR\n+001352d0: 5455 414c 3c2f 636f 6465 3e20 2020 3c2f TUAL set to = 0 whe\n+00135320: 6e20 3c63 6f64 653e 2357 4954 485f 5055 n #WITH_PU\n+00135330: 5245 5f56 4952 5455 414c 3c2f 636f 6465 RE_VIRTUAL is defined \n+00135350: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_SSL_RS\n+001353b0: 415f 4249 5453 3c2f 636f 6465 3e20 2020 A_BITS \n+001353c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 length of\n+001353f0: 2074 6865 2052 5341 206b 6579 2028 3230 the RSA key (20\n+00135400: 3438 2062 7920 6465 6661 756c 7429 2020 48 by default) \n+00135410: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    an 8 b\n+001354b0: 6974 2069 6e74 6567 6572 2074 6861 7420 it integer that \n+001354c0: 7265 7072 6573 656e 7473 2061 2063 6861 represents a cha\n+001354d0: 7261 6374 6572 2074 6861 7420 636f 756c racter that coul\n+001354e0: 6420 6e6f 7420 6265 2063 6f6e 7665 7274 d not be convert\n+001354f0: 6564 2074 6f20 616e 2041 5343 4949 2063 ed to an ASCII c\n+00135500: 6861 722c 2069 2e65 2e20 7768 656e 2063 har, i.e. when c\n+00135510: 6f6e 7665 7274 696e 6720 616e 2058 4d4c onverting an XML\n+00135520: 2055 6e69 636f 6465 2063 6861 7261 6374 Unicode charact\n+00135530: 6572 2020 2020 3c2f 7464 3e3c 2f74 723e er
    #SOAP_\n+00135590: 554e 4b4e 4f57 4e5f 554e 4943 4f44 455f UNKNOWN_UNICODE_\n+001355a0: 4348 4152 3c2f 636f 6465 3e20 2020 3c2f CHAR integer Uni\n+001355e0: 636f 6465 2076 616c 7565 2072 6570 7265 code value repre\n+001355f0: 7365 6e74 696e 6720 6120 6368 6172 6163 senting a charac\n+00135600: 7465 7220 7468 6174 2072 6570 6c61 6365 ter that replace\n+00135610: 7320 616e 2069 6e76 616c 6964 2055 6e69 s an invalid Uni\n+00135620: 636f 6465 2063 6f64 6520 706f 696e 7420 code code point \n+00135630: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_LO\n+00135690: 4e47 5f46 4f52 4d41 543c 2f63 6f64 653e NG_FORMAT\n+001356a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 macro \n+001356d0: 7468 6174 2072 6570 7265 7365 6e74 7320 that represents \n+001356e0: 7468 6520 3c63 6f64 653e 234c 4f4e 4736 the #LONG6\n+001356f0: 343c 2f63 6f64 653e 2070 7269 6e74 6620 4 printf \n+00135700: 252d 666f 726d 6174 2020 2020 3c2f 7464 %-format
    \n+00135760: 2353 4f41 505f 554c 4f4e 475f 464f 524d #SOAP_ULONG_FORM\n+00135770: 4154 3c2f 636f 6465 3e20 2020 3c2f 7464 AT macro that re\n+001357b0: 7072 6573 656e 7473 2074 6865 203c 636f presents the #ULONG64 printf %-form\n+001357e0: 6174 2020 2020 3c2f 7464 3e3c 2f74 723e at
    #SOAP\n+00135840: 5f49 4e56 414c 4944 5f53 4f43 4b45 543c _INVALID_SOCKET<\n+00135850: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    .\n+001359c0: 3c64 6c20 636c 6173 733d 2273 6563 7469

    \n+001359e0: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
    \n+001359f0: 4974 2069 7320 696d 706f 7274 616e 7420 It is important \n+00135a00: 7468 6174 2061 6e79 206f 6620 7468 6573 that any of thes\n+00135a10: 6520 6d61 6372 6f73 2077 6865 6e20 6465 e macros when de\n+00135a20: 6669 6e65 6420 7368 6f75 6c64 2062 6520 fined should be \n+00135a30: 636f 6e73 6973 7465 6e74 6c79 2064 6566 consistently def\n+00135a40: 696e 6564 2077 6865 6e20 636f 6d70 696c ined when compil\n+00135a50: 696e 6720 736f 7572 6365 2063 6f64 6520 ing source code \n+00135a60: 6669 6c65 732c 2073 7563 6820 6173 203c files, such as <\n+00135a70: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+00135a80: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp, soapC.cpp, soapClient.c\n+00135ad0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pp, \n+00135ae0: 3c65 6d3e 3c63 6f64 653e 736f 6170 5365 soapSe\n+00135af0: 7276 6572 2e63 7070 3c2f 636f 6465 3e3c rver.cpp<\n+00135b00: 2f65 6d3e 2c20 616e 6420 616c 6c20 6170 /em>, and all ap\n+00135b10: 706c 6963 6174 696f 6e20 736f 7572 6365 plication source\n+00135b20: 2063 6f64 6520 6669 6c65 7320 7468 6174 code files that\n+00135b30: 2069 6e63 6c75 6465 203c 656d 3e3c 636f include gsoap/stdsoap\n+00135b50: 322e 683c 2f63 6f64 653e 3c2f 656d 3e20 2.h \n+00135b60: 6f72 203c 656d 3e3c 636f 6465 3e73 6f61 or soa\n+00135b70: 7048 2e68 3c2f 636f 6465 3e3c 2f65 6d3e pH.h\n+00135b80: 2e20 4966 2074 6865 206d 6163 726f 7320 . If the macros \n+00135b90: 6172 6520 6e6f 7420 636f 6e73 6973 7465 are not consiste\n+00135ba0: 6e74 6c79 2064 6566 696e 6564 2061 7420 ntly defined at \n+00135bb0: 636f 6d70 696c 6520 7469 6d65 2074 6865 compile time the\n+00135bc0: 6e20 7468 6520 6170 706c 6963 6174 696f n the applicatio\n+00135bd0: 6e20 7769 6c6c 206c 696b 656c 7920 6372 n will likely cr\n+00135be0: 6173 6820 6475 6520 746f 2061 206d 6973 ash due to a mis\n+00135bf0: 6d61 7463 6865 7320 696e 2074 6865 2064 matches in the d\n+00135c00: 6563 6c61 7261 7469 6f6e 2061 6e64 2075 eclaration and u\n+00135c10: 7365 206f 6620 7468 6520 3c63 6f64 653e se of the \n+00135c20: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00135c70: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+00135c80: 6578 7420 7468 6174 2069 7320 6375 7374 ext that is cust\n+00135c90: 6f6d 697a 6564 2062 7920 7468 6573 6520 omized by these \n+00135ca0: 666c 6167 732e 3c2f 6464 3e3c 2f64 6c3e flags.
    \n+00135cb0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab\n+00135cd0: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .\n+00135d10: 5573 696e 6720 7468 6520 736f 6170 6465 Using the soapde\n+00135d20: 6673 2e68 2068 6561 6465 7220 6669 6c65 fs.h header file\n+00135d30: 3c2f 6832 3e0a 3c70 3e54 6865 203c 656d

    .

    The soapdefs.\n+00135d50: 683c 2f63 6f64 653e 3c2f 656d 3e20 6865 h he\n+00135d60: 6164 6572 2066 696c 6520 6973 2069 6e63 ader file is inc\n+00135d70: 6c75 6465 6420 696e 203c 656d 3e3c 636f luded in gsoap/stdsoap\n+00135d90: 322e 683c 2f63 6f64 653e 3c2f 656d 3e20 2.h \n+00135da0: 7768 656e 2063 6f6d 7069 6c69 6e67 2077 when compiling w\n+00135db0: 6974 6820 636f 6d70 696c 652d 7469 6d65 ith compile-time\n+00135dc0: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT\n+00135dd0: 485f 534f 4150 4445 4653 5f48 3c2f 636f H_SOAPDEFS_H:

     \n+00135e00: 632b 2b20 2d44 2057 4954 485f 534f 4150  c++ -D WITH_SOAP\n+00135e10: 4445 4653 5f48 202d 6320 7374 6473 6f61  DEFS_H -c stdsoa\n+00135e20: 7032 2e63 7070 0a3c 2f70 7265 3e3c 703e  p2.cpp.

    \n+00135e30: 2054 6865 203c 656d 3e3c 636f 6465 3e73 The s\n+00135e40: 6f61 7064 6566 732e 683c 2f63 6f64 653e oapdefs.h\n+00135e50: 3c2f 656d 3e20 6669 6c65 2061 6c6c 6f77 file allow\n+00135e60: 7320 7573 6572 7320 746f 2069 6e63 6c75 s users to inclu\n+00135e70: 6465 2064 6566 696e 6974 696f 6e73 2061 de definitions a\n+00135e80: 6e64 2061 6464 2069 6e63 6c75 6465 7320 nd add includes \n+00135e90: 7769 7468 6f75 7420 7265 7175 6972 696e without requirin\n+00135ea0: 6720 6368 616e 6765 7320 746f 203c 656d g changes to gsoap/std\n+00135ec0: 736f 6170 322e 683c 2f63 6f64 653e 3c2f soap2.h. You can als\n+00135ee0: 6f20 7370 6563 6966 7920 7468 6520 6865 o specify the he\n+00135ef0: 6164 6572 2066 696c 6520 6e61 6d65 2074 ader file name t\n+00135f00: 6f20 696e 636c 7564 6520 6173 2061 206d o include as a m\n+00135f10: 6163 726f 203c 636f 6465 3e53 4f41 5044 acro SOAPD\n+00135f20: 4546 535f 483c 2f63 6f64 653e 2074 6f20 EFS_H to \n+00135f30: 6f76 6572 7269 6465 2074 6865 206e 616d override the nam\n+00135f40: 6520 3c65 6d3e 3c63 6f64 653e 736f 6170 e soap\n+00135f50: 6465 6673 2e68 3c2f 636f 6465 3e3c 2f65 defs.h:

     c\n+00135f80: 2b2b 202d 4420 534f 4150 4445 4653 5f48  ++ -D SOAPDEFS_H\n+00135f90: 3d6d 7964 6566 732e 6820 2d63 2073 7464  =mydefs.h -c std\n+00135fa0: 736f 6170 322e 6370 700a 3c2f 7072 653e  soap2.cpp.
    \n+00135fb0: 3c70 3e20 466f 7220 6578 616d 706c 652c

    For example,\n+00135fc0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    // Contents o\n+00136010: 6620 6669 6c65 2026 7175 6f74 3b73 6f61 f file "soa\n+00136020: 7064 6566 732e 6826 7175 6f74 3b3c 2f73 pdefs.h"
    .
    #include\n+00136070: 2026 6c74 3b6f 7374 7265 616d 2667 743b <ostream>\n+00136080: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+00136090: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The fol\n+001360b0: 6c6f 7769 6e67 2068 6561 6465 7220 6669 lowing header fi\n+001360c0: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 \n+001360d0: 7265 6665 7273 2074 6f20 3c63 6f64 653e refers to \n+001360e0: 7374 643a 3a6f 7374 7265 616d 3c2f 636f std::ostream without soap\n+00136100: 6370 7032 2074 6872 6f77 696e 6720 6572 cpp2 throwing er\n+00136110: 726f 7273 2c20 6279 2075 7369 6e67 203c rors, by using <\n+00136120: 636f 6465 3e65 7874 6572 6e3c 2f63 6f64 code>extern to declare class std::o\n+00136150: 7374 7265 616d 3c2f 636f 6465 3e3a 3c2f stream:.

    // std::ostream\n+001361b0: 2063 616e 2623 3339 3b74 2062 6520 7365 can't be se\n+001361c0: 7269 616c 697a 6564 2c20 6275 7420 6e65 rialized, but ne\n+001361d0: 6564 2074 6f20 6265 2064 6563 6c61 7265 ed to be declare\n+001361e0: 6420 746f 206d 616b 6520 6974 2076 6973 d to make it vis\n+001361f0: 6962 6c65 2074 6f20 6753 4f41 5020 3c2f ible to gSOAP
    .extern class std::ostrea\n+00136270: 6d3b 3c2f 6469 763e 0a3c 6469 7620 636c m;
    .
    .
    .<\n-001362c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001362d0: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class ns__myClass .
    { p\n-00136320: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    \n-00136360: 7669 7274 7561 6c3c 2f73 7061 6e3e 203c virtual <\n-00136370: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00136380: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void print(std::\n-001363a0: 6f73 7472 6561 6d20 2661 6d70 3b73 2920 ostream &s) \n-001363b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const; // we \n-001363f0: 6e65 6564 2073 7464 3a3a 6f73 7472 6561 need std::ostrea\n-00136400: 6d20 6865 7265 203c 2f73 7061 6e3e 3c2f m here .
    ... <\n-00136430: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00136440: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    };
    .\n-00136470: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    See al\n-00136490: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section Transient d\n-001364d0: 6174 6120 7479 7065 733c 2f61 3e20 2c20 ata types , \n-001364e0: 6e6f 6e2d 7365 7269 616c 697a 6162 6c65 non-serializable\n-001364f0: 2064 6174 6120 7479 7065 732e 3c2f 703e data types.

    \n-00136500: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab\n-00136520: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Run\n-00136560: 2d74 696d 6520 666c 6167 733c 2f68 313e -time flags

    \n-00136570: 0a3c 703e 5468 6520 6753 4f41 5020 656e .

    The gSOAP en\n-00136580: 6769 6e65 2073 7461 7465 2069 7320 7374 gine state is st\n-00136590: 6f72 6564 2069 6e20 7468 6520 3c63 6f64 ored in the so\n-001365f0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n-00136600: 6e74 6578 7420 7468 6174 2069 7320 696e ntext that is in\n-00136610: 6974 6961 6c69 7a65 6420 616e 6420 636f itialized and co\n-00136620: 6e74 726f 6c6c 6564 2062 7920 7661 7269 ntrolled by vari\n-00136630: 6f75 7320 6f70 7469 6f6e 616c 2072 756e ous optional run\n-00136640: 7469 6d65 2066 6c61 6773 2e20 4d6f 7374 time flags. Most\n-00136650: 2066 6c61 6773 2061 7265 2061 7070 6c69 flags are appli\n-00136660: 6361 626c 6520 746f 2065 6974 6865 7220 cable to either \n-00136670: 7072 6f63 6573 7369 6e67 2069 6e70 7574 processing input\n-00136680: 206f 7220 746f 2070 726f 6365 7373 696e or to processin\n-00136690: 6720 6f75 7470 7574 2c20 6275 7420 736f g output, but so\n-001366a0: 6d65 2061 7265 2061 7070 6c69 6361 626c me are applicabl\n-001366b0: 6520 746f 2062 6f74 6820 696e 7075 7420 e to both input \n-001366c0: 616e 6420 6f75 7470 7574 206d 6573 7361 and output messa\n-001366d0: 6765 2061 6e64 2064 6f63 756d 656e 7420 ge and document \n-001366e0: 7072 6f63 6573 7369 6e67 2e3c 2f70 3e0a processing.

    .\n-001366f0: 3c70 3e46 7572 7468 6572 6d6f 7265 2c20

    Furthermore, \n-00136700: 7468 6573 6520 666c 6167 7320 6172 6520 these flags are \n-00136710: 6469 7669 6465 6420 696e 746f 2066 6f75 divided into fou\n-00136720: 7220 6361 7465 676f 7269 6573 3a20 7472 r categories: tr\n-00136730: 616e 7370 6f72 7420 2849 4f29 2c20 636f ansport (IO), co\n-00136740: 6e74 656e 7420 656e 636f 6469 6e67 2028 ntent encoding (\n-00136750: 454e 4329 2c20 584d 4c20 7061 7273 696e ENC), XML parsin\n-00136760: 6720 616e 6420 6765 6e65 7261 7469 6f6e g and generation\n-00136770: 2028 584d 4c29 2c20 616e 6420 432f 432b (XML), and C/C+\n-00136780: 2b20 7573 6167 6520 2843 292e 3c2f 703e + usage (C).

    \n-00136790: 0a3c 703e 5468 6520 696e 7075 742d 6d6f .

    The input-mo\n-001367a0: 6465 2061 6e64 206f 7574 7075 742d 6d6f de and output-mo\n-001367b0: 6465 2066 6c61 6773 2066 6f72 2069 6e62 de flags for inb\n-001367c0: 6f75 6e64 2028 696e 2920 616e 6420 6f75 ound (in) and ou\n-001367d0: 7462 6f75 6e64 2028 6f75 7429 206d 6573 tbound (out) mes\n-001367e0: 7361 6765 2070 726f 6365 7373 696e 6720 sage processing \n-001367f0: 6172 653a 3c2f 703e 0a3c 7461 626c 6520 are:

    ....\n-001368d0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-001368f0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n-001369f0: 3c63 6f64 653e 2353 4f41 505f 494f 5f42 #SOAP_IO_B\n-00136a00: 5546 4645 523c 2f63 6f64 653e 2020 203c UFFER <\n-00136a10: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>....<\n-00136c20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00136c30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00136c40: 3e6f 7574 2020 203c 2f74 643e 3c74 6420 >out \n-00136c90: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n-00136e20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00136e30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00136e40: 3e69 6e2b 6f75 7420 2020 3c2f 7464 3e3c >in+out <\n-00136e50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00136e60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00136e70: 3e6b 6565 7020 736f 636b 6574 2063 6f6e >keep socket con\n-00136e80: 6e65 6374 696f 6e73 2061 6c69 7665 2c20 nections alive, \n-00136e90: 7768 656e 2073 7570 706f 7274 6564 2062 when supported b\n-00136ea0: 7920 7468 6520 4854 5450 2070 6565 7220 y the HTTP peer \n-00136eb0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n-00136ee0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00136ef0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00136f00: 3e3c 636f 6465 3e23 534f 4150 5f49 4f5f >#SOAP_IO_\n-00136f10: 5544 503c 2f63 6f64 653e 2020 203c 2f74 UDP ....<\n-00137160: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>..<\n-00137200: 636f 6465 3e23 534f 4150 5f45 4e43 5f44 code>#SOAP_ENC_D\n-00137210: 494d 453c 2f63 6f64 653e 2020 203c 2f74 IME <\n-00137250: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00137260: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00137270: 3e75 7365 2044 494d 4520 656e 636f 6469 >use DIME encodi\n-00137280: 6e67 2c20 6175 746f 6d61 7469 6320 7768 ng, automatic wh\n-00137290: 656e 2044 494d 4520 6174 7461 6368 6d65 en DIME attachme\n-001372a0: 6e74 7320 6172 6520 7573 6564 2020 2020 nts are used \n-001372b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..\n-00137370: 7573 6520 4d49 4d45 2065 6e63 6f64 696e use MIME encodin\n-00137380: 6720 696e 7374 6561 6420 6f66 2044 494d g instead of DIM\n-00137390: 452c 2061 6374 6976 6174 6564 2075 7369 E, activated usi\n-001373a0: 6e67 203c 636f 6465 3e3c 6120 636c 6173 ng soap_s\n-00137420: 6574 5f6d 696d 653c 2f61 3e3c 2f63 6f64 et_mime \n-00137440: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....o\n-001375c0: 7574 2020 203c 2f74 643e 3c74 6420 636c ut ......\n-00137880: 3c74 6420 636c 6173 733d 226d 6172 6b64 o\n-001378d0: 7574 7075 7420 6361 6e6f 6e69 6361 6c20 utput canonical \n-001378e0: 584d 4c20 2020 203c 2f74 643e 3c2f 7472 XML ..o\n-00137980: 7574 2020 203c 2f74 643e 3c74 6420 636c ut ..\n-00137a20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..a\n-00137ba0: 7070 6c79 2073 7472 6963 7420 7661 6c69 pply strict vali\n-00137bb0: 6461 7469 6f6e 206f 6620 584d 4c20 696e dation of XML in\n-00137bc0: 7075 7420 2020 203c 2f74 643e 3c2f 7472 put ....\n-00137dd0: 7365 7269 616c 697a 6520 6170 706c 6963 serialize applic\n-00137de0: 6174 696f 6e20 6461 7461 2061 7320 616e ation data as an\n-00137df0: 2058 4d4c 2067 7261 7068 2077 6974 6820 XML graph with \n-00137e00: 6d75 6c74 692d 7265 6620 6964 2f72 6566 multi-ref id/ref\n-00137e10: 2061 7474 7269 6275 7465 7320 2020 203c attributes <\n-00137e20: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..\n-00137e90: 3c74 6420 636c 6173 733d 226d 6172 6b64 s\n-00137ee0: 6572 6961 6c69 7a65 204e 554c 4c20 6461 erialize NULL da\n-00137ef0: 7461 2061 7320 7873 693a 6e69 6c20 6174 ta as xsi:nil at\n-00137f00: 7472 6962 7574 6564 2065 6c65 6d65 6e74 tributed element\n-00137f10: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n-00137f20: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-00137f40: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...i\n-001380a0: 6e20 2020 3c2f 7464 3e3c 7464 2063 6c61 n ...<\n-00138220: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00138230: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-00138240: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n-00138370: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....

    All fla\n-00138480: 6773 2061 7265 2069 6e64 6570 656e 6465 gs are independe\n-00138490: 6e74 2061 6e64 2063 616e 2062 6520 636f nt and can be co\n-001384a0: 6d62 696e 6564 2075 7369 6e67 2061 2062 mbined using a b\n-001384b0: 6974 7769 7365 206f 7220 283c 636f 6465 itwise or (|), exce\n-001384d0: 7074 2066 6f72 203c 636f 6465 3e23 534f pt for #SO\n-001384e0: 4150 5f49 4f5f 464c 5553 483c 2f63 6f64 AP_IO_FLUSH, #SOAP_\n-00138500: 494f 5f42 5546 4645 523c 2f63 6f64 653e IO_BUFFER\n-00138510: 2c20 3c63 6f64 653e 2353 4f41 505f 494f , #SOAP_IO\n-00138520: 5f53 544f 5245 3c2f 636f 6465 3e2c 2061 _STORE, a\n-00138530: 6e64 203c 636f 6465 3e23 534f 4150 5f49 nd #SOAP_I\n-00138540: 4f5f 4348 554e 4b3c 2f63 6f64 653e 2077 O_CHUNK w\n-00138550: 6869 6368 2061 7265 2065 6e75 6d65 7261 hich are enumera\n-00138560: 7469 6f6e 7320 616e 6420 6f6e 6c79 206f tions and only o\n-00138570: 6e65 206f 6620 7468 6573 6520 492f 4f20 ne of these I/O \n-00138580: 666c 6167 7320 6361 6e20 6265 2075 7365 flags can be use\n-00138590: 642e 2041 6c73 6f20 7468 6520 584d 4c20 d. Also the XML \n-001385a0: 7365 7269 616c 697a 6174 696f 6e20 666c serialization fl\n-001385b0: 6167 7320 3c63 6f64 653e 2353 4f41 505f ags #SOAP_\n-001385c0: 584d 4c5f 5452 4545 3c2f 636f 6465 3e20 XML_TREE \n-001385d0: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_\n-001385e0: 584d 4c5f 4752 4150 483c 2f63 6f64 653e XML_GRAPH\n-001385f0: 2073 686f 756c 6420 6e6f 7420 6265 206d should not be m\n-00138600: 6978 6564 2e3c 2f70 3e0a 3c70 3e54 6f20 ixed.

    .

    To \n-00138610: 616c 6c6f 6361 7465 2061 6e64 2069 6e69 allocate and ini\n-00138620: 7469 616c 697a 6520 6120 3c63 6f64 653e tialize a \n-00138630: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-00138680: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-00138690: 6578 7420 7769 7468 2069 6e70 7574 2061 ext with input a\n-001386a0: 6e64 206f 7574 7075 7420 6d6f 6465 2066 nd output mode f\n-001386b0: 6c61 6773 3a3c 2f70 3e0a 3c64 6976 2063 lags:

    .
    \n-001386d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-00138700: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-00138730: 703c 2f61 3e20 2a20 3c61 2063 6c61 7373 p * soa\n-00138790: 705f 6e65 7731 3c2f 613e 283c 6120 636c p_new1(so\n-001387f0: 6170 5f6d 6f64 653c 2f61 3e20 696f 6d6f ap_mode iomo\n-00138800: 6465 293b 3c2f 6469 763e 0a3c 6469 7620 de);
    ..
    \n-00138ab0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_new\n-00138b00: 323c 2f61 3e3c 2f64 6976 3e3c 6469 7620 2
    s\n-00138b20: 7472 7563 7420 736f 6170 202a 2073 6f61 truct soap * soa\n-00138b30: 705f 6e65 7732 2873 6f61 705f 6d6f 6465 p_new2(soap_mode\n-00138b40: 2069 6e70 7574 5f6d 6f64 652c 2073 6f61 input_mode, soa\n-00138b50: 705f 6d6f 6465 206f 7574 7075 745f 6d6f p_mode output_mo\n-00138b60: 6465 293c 2f64 6976 3e3c 6469 7620 636c de)
    Allo\n-00138b80: 6361 7465 2061 6e64 2069 6e69 7469 616c cate and initial\n-00138b90: 697a 6520 6120 6e65 7720 736f 6170 2063 ize a new soap c\n-00138ba0: 6f6e 7465 7874 2077 6974 6820 7365 7061 ontext with sepa\n-00138bb0: 7261 7465 2069 6e70 7574 2061 6e64 206f rate input and o\n-00138bc0: 7574 7075 7420 736f 6170 5f6d 6f64 6520 utput soap_mode \n-00138bd0: 666c 6167 732e 3c2f 6469 763e 3c2f 6469 flags.
    .

    To \n-00138c00: 696e 6974 6961 6c69 7a65 2061 2073 7461 initialize a sta\n-00138c10: 636b 2d61 6c6c 6f63 6174 6564 203c 636f ck-allocated s\n-00138c70: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n-00138c80: 6f6e 7465 7874 2077 6974 6820 696e 7075 ontext with inpu\n-00138c90: 7420 616e 6420 6f75 7470 7574 206d 6f64 t and output mod\n-00138ca0: 6520 666c 6167 733a 3c2f 703e 0a3c 6469 e flags:

    .
    v\n-00138cf0: 6f69 643c 2f73 7061 6e3e 203c 6120 636c oid \n-00138d50: 736f 6170 5f69 6e69 7431 3c2f 613e 283c soap_init1(<\n-00138d60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00138d70: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-00138de0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap_mod\n-00138e40: 653c 2f61 3e20 696f 6d6f 6465 293b 3c2f e iomode);..void soap_init2\n-001391d0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-001391e0: 6170 2c20 736f 6170 5f6d 6f64 6520 696e ap, soap_mode in\n-001391f0: 7075 745f 6d6f 6465 2c20 736f 6170 5f6d put_mode, soap_m\n-00139200: 6f64 6520 6f75 7470 7574 5f6d 6f64 6529 ode output_mode)\n-00139210: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Initial\n-00139230: 697a 6520 6120 7374 6163 6b2d 616c 6c6f ize a stack-allo\n-00139240: 6361 7465 6420 736f 6170 2063 6f6e 7465 cated soap conte\n-00139250: 7874 2077 6974 6820 696e 7075 7420 616e xt with input an\n-00139260: 6420 6f75 7470 7574 2073 6f61 705f 6d6f d output soap_mo\n-00139270: 6465 2066 6c61 6773 2e3c 2f64 6976 3e3c de flags.
    <\n-00139280: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001392a0: 546f 2073 6574 2061 6e64 2063 6c65 6172 To set and clear\n-001392b0: 206d 6f64 6520 666c 6167 7320 7573 653a mode flags use:\n-001392c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    void soap_set\n-00139370: 5f6d 6f64 653c 2f61 3e28 3c73 7061 6e20 _mode(\n-00139390: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001393d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001393e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001393f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00139400: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_mode\n-00139460: 2069 6f6d 6f64 6529 3b20 3c73 7061 6e20 iomode); \n-00139480: 2f2f 2073 6574 2069 6e70 7574 2061 6e64 // set input and\n-00139490: 206f 7574 7075 7420 6d6f 6465 2066 6c61 output mode fla\n-001394a0: 6773 3c2f 7370 616e 3e3c 2f64 6976 3e0a gs
    .\n-001394b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-001394e0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soa\n-00139540: 705f 7365 745f 696d 6f64 653c 2f61 3e28 p_set_imode(\n-00139550: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-001395a0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-001395d0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soap_mo\n-00139630: 6465 3c2f 613e 203c 6120 636c 6173 733d de \n-00139680: 696d 6f64 653c 2f61 3e29 3b20 3c73 7061 imode); // set input m\n-001396b0: 6f64 6520 666c 6167 733c 2f73 7061 6e3e ode flags\n-001396c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void <\n-00139700: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00139710: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00139720: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-00139730: 6761 6636 6661 3665 3139 3766 3336 3038 gaf6fa6e197f3608\n-00139740: 3334 6561 6531 3234 6661 3337 6536 3863 34eae124fa37e68c\n-00139750: 6637 223e 736f 6170 5f73 6574 5f6f 6d6f f7\">soap_set_omo\n-00139760: 6465 3c2f 613e 283c 7370 616e 2063 6c61 de(str\n-00139780: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, \n-00139840: 736f 6170 5f6d 6f64 653c 2f61 3e20 3c61 soap_mode omode\n-001398a0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // set \n-001398c0: 6f75 7470 7574 206d 6f64 6520 666c 6167 output mode flag\n-001398d0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-001398e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001398f0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00139910: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap\n-00139970: 5f63 6c72 5f6d 6f64 653c 2f61 3e28 3c73 _clr_mode(struct soap *soap, soap_mode\n-00139a60: 3c2f 613e 2069 6f6d 6f64 6529 3b20 3c73 iomode); // clear inp\n-00139a90: 7574 2061 6e64 206f 7574 7075 7420 6d6f ut and output mo\n-00139aa0: 6465 2066 6c61 6773 3c2f 7370 616e 3e3c de flags<\n-00139ab0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    void soap_clr_imod\n-00139b50: 653c 2f61 3e28 3c73 7061 6e20 636c 6173 e(stru\n-00139b70: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, s\n-00139c30: 6f61 705f 6d6f 6465 3c2f 613e 203c 6120 oap_mode imode)\n-00139c90: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // clear\n-00139cb0: 2069 6e70 7574 206d 6f64 6520 666c 6167 input mode flag\n-00139cc0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-00139cd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00139ce0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00139d00: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap\n-00139d60: 5f63 6c72 5f6f 6d6f 6465 3c2f 613e 283c _clr_omode(<\n-00139d70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00139d80: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-00139df0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap_mod\n-00139e50: 653c 2f61 3e20 3c61 2063 6c61 7373 3d22 e o\n-00139ea0: 6d6f 6465 3c2f 613e 293b 203c 7370 616e mode); // clear output\n-00139ed0: 206d 6f64 6520 666c 6167 733c 2f73 7061 mode flags
    .
    soap_c\n-00139fa0: 6c72 5f6d 6f64 653c 2f61 3e3c 2f64 6976 lr_mode
    void soap_c\n-00139fd0: 6c72 5f6d 6f64 6528 7374 7275 6374 2073 lr_mode(struct s\n-00139fe0: 6f61 7020 2a73 6f61 702c 2073 6f61 705f oap *soap, soap_\n-00139ff0: 6d6f 6465 2069 6e70 7574 5f61 6e64 5f6f mode input_and_o\n-0013a000: 7574 7075 745f 6d6f 6465 293c 2f64 6976 utput_mode)
    Clear input \n-0013a030: 616e 6420 6f75 7470 7574 2073 6f61 705f and output soap_\n-0013a040: 6d6f 6465 2066 6c61 6773 206f 6620 7468 mode flags of th\n-0013a050: 6520 6769 7665 6e20 736f 6170 2063 6f6e e given soap con\n-0013a060: 7465 7874 2e3c 2f64 6976 3e3c 2f64 6976 text.
    .
    v\n-0013a150: 6f69 6420 736f 6170 5f63 6c72 5f69 6d6f oid soap_clr_imo\n-0013a160: 6465 2873 7472 7563 7420 736f 6170 202a de(struct soap *\n-0013a170: 736f 6170 2c20 736f 6170 5f6d 6f64 6520 soap, soap_mode \n-0013a180: 696e 7075 745f 6d6f 6465 293c 2f64 6976 input_mode)
    Clear input \n-0013a1b0: 736f 6170 5f6d 6f64 6520 666c 6167 7320 soap_mode flags \n-0013a1c0: 6f66 2074 6865 2067 6976 656e 2073 6f61 of the given soa\n-0013a1d0: 7020 636f 6e74 6578 742e 3c2f 6469 763e p context.
    \n-0013a1e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0013a250: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_clr\n-0013a2a0: 5f6f 6d6f 6465 3c2f 613e 3c2f 6469 763e _omode
    \n-0013a2b0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_cl\n-0013a2d0: 725f 6f6d 6f64 6528 7374 7275 6374 2073 r_omode(struct s\n-0013a2e0: 6f61 7020 2a73 6f61 702c 2073 6f61 705f oap *soap, soap_\n-0013a2f0: 6d6f 6465 206f 7574 7075 745f 6d6f 6465 mode output_mode\n-0013a300: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Clear \n-0013a320: 6f75 7470 7574 2073 6f61 705f 6d6f 6465 output soap_mode\n-0013a330: 2066 6c61 6773 206f 6620 7468 6520 6769 flags of the gi\n-0013a340: 7665 6e20 736f 6170 2063 6f6e 7465 7874 ven soap context\n-0013a350: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .\n-0013a490: 5365 7420 696e 7075 7420 736f 6170 5f6d Set input soap_m\n-0013a4a0: 6f64 6520 666c 6167 7320 6f66 2074 6865 ode flags of the\n-0013a4b0: 2067 6976 656e 2073 6f61 7020 636f 6e74 given soap cont\n-0013a4c0: 6578 742e 3c2f 6469 763e 3c2f 6469 763e ext.
    \n-0013a4d0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    vo\n-0013a5b0: 6964 2073 6f61 705f 7365 745f 6f6d 6f64 id soap_set_omod\n-0013a5c0: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n-0013a5d0: 6f61 702c 2073 6f61 705f 6d6f 6465 206f oap, soap_mode o\n-0013a5e0: 7574 7075 745f 6d6f 6465 293c 2f64 6976 utput_mode)
    Set output s\n-0013a610: 6f61 705f 6d6f 6465 2066 6c61 6773 206f oap_mode flags o\n-0013a620: 6620 7468 6520 6769 7665 6e20 736f 6170 f the given soap\n-0013a630: 2063 6f6e 7465 7874 2e3c 2f64 6976 3e3c context.
    <\n-0013a640: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.
    Note
    The #SOAP_XML_TREE<\n-0013a6a0: 2f63 6f64 653e 206d 6f64 6520 666c 6167 /code> mode flag\n-0013a6b0: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n-0013a6c0: 696d 7072 6f76 6520 696e 7465 726f 7065 improve interope\n-0013a6d0: 7261 6269 6c69 7479 2077 6974 6820 534f rability with SO\n-0013a6e0: 4150 2069 6d70 6c65 6d65 6e74 6174 696f AP implementatio\n-0013a6f0: 6e73 2074 6861 7420 6172 6520 6e6f 7420 ns that are not \n-0013a700: 6675 6c6c 7920 534f 4150 2031 2e31 2f31 fully SOAP 1.1/1\n-0013a710: 2e32 2052 5043 2065 6e63 6f64 696e 6720 .2 RPC encoding \n-0013a720: 636f 6d70 6c69 616e 7420 7769 7468 2072 compliant with r\n-0013a730: 6573 7065 6374 2074 6f20 7072 6f63 6573 espect to proces\n-0013a740: 7369 6e67 2069 642d 6872 6566 2f72 6566 sing id-href/ref\n-0013a750: 2061 7474 7269 6275 7465 732e 2048 6f77 attributes. How\n-0013a760: 6576 6572 2c20 7472 6565 2073 6572 6961 ever, tree seria\n-0013a770: 6c69 7a61 7469 6f6e 2077 696c 6c20 6475 lization will du\n-0013a780: 706c 6963 6174 6520 6461 7461 2077 6865 plicate data whe\n-0013a790: 6e20 7468 6973 2064 6174 6120 6973 2063 n this data is c\n-0013a7a0: 6f2d 7265 6665 7265 6e63 6564 2e20 4379 o-referenced. Cy\n-0013a7b0: 636c 6573 2061 7265 2064 6574 6563 7465 cles are detecte\n-0013a7c0: 6420 616e 6420 6272 6f6b 656e 2074 6f20 d and broken to \n-0013a7d0: 6176 6f69 6420 696e 6669 6e69 7465 2073 avoid infinite s\n-0013a7e0: 6572 6961 6c69 7a61 7469 6f6e 2e3c 2f64 erialization..

    In ad\n-0013a800: 6469 7469 6f6e 2074 6f20 7468 6520 636f dition to the co\n-0013a810: 6e74 6578 7420 6d6f 6465 2066 6c61 6773 ntext mode flags\n-0013a820: 2c20 7468 6520 666f 6c6c 6f77 696e 6720 , the following \n-0013a830: 636f 6e74 6578 7420 666c 6167 7320 6361 context flags ca\n-0013a840: 6e20 6265 2075 7365 6420 746f 2073 6574 n be used to set\n-0013a850: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n-0013a860: 743c 2f63 6f64 653e 206c 6576 656c 203c t level <\n-0013a870: 636f 6465 3e53 4f4c 5f53 4f43 4b45 543c code>SOL_SOCKET<\n-0013a880: 2f63 6f64 653e 206f 7074 696f 6e73 2077 /code> options w\n-0013a890: 6865 6e20 736f 636b 6574 7320 6172 6520 hen sockets are \n-0013a8a0: 6372 6561 7465 642c 2074 686f 7567 6820 created, though \n-0013a8b0: 736f 6d65 206f 7074 696f 6e73 206d 6179 some options may\n-0013a8c0: 206e 6f74 2062 6520 6170 706c 6963 6162 not be applicab\n-0013a8d0: 6c65 2074 6f20 796f 7572 206f 7065 7261 le to your opera\n-0013a8e0: 7469 6e67 2073 7973 7465 6d3a 3c2f 703e ting system:

    \n-0013a8f0: 0a3c 7461 626c 6520 636c 6173 733d 226d .
    mode fla\n-00136860: 6720 2020 3c2f 7468 3e3c 7468 2063 6c61 g in/ou\n-00136890: 7420 2020 3c2f 7468 3e3c 7468 2063 6c61 t resul\n-001368c0: 7420 2020 203c 2f74 683e 3c2f 7472 3e0a t
    #SOAP_I\n-00136920: 4f5f 464c 5553 483c 2f63 6f64 653e 2020 O_FLUSH \n-00136930: 203c 2f74 643e 3c74 6420 636c 6173 733d out flush outpu\n-00136990: 7420 696d 6d65 6469 6174 656c 7920 2020 t immediately \n-001369a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    out enable output\n-00136a70: 2062 7566 6665 7269 6e67 2c20 7468 6520 buffering, the \n-00136a80: 6465 6661 756c 7420 6d6f 6465 2066 6f72 default mode for\n-00136a90: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti\n-00136aa0: 6f6e 7320 2020 203c 2f74 643e 3c2f 7472 ons
    #SOAP\n-00136b00: 5f49 4f5f 5354 4f52 453c 2f63 6f64 653e _IO_STORE\n-00136b10: 2020 203c 2f74 643e 3c74 6420 636c 6173 out \n-00136b40: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 store the\n-00136b70: 2065 6e74 6972 6520 6f75 7462 6f75 6e64 entire outbound\n-00136b80: 206d 6573 7361 6765 2074 6f20 6361 6c63 message to calc\n-00136b90: 756c 6174 6520 4854 5450 2063 6f6e 7465 ulate HTTP conte\n-00136ba0: 6e74 206c 656e 6774 6820 2020 203c 2f74 nt length
    #SOAP_IO_CHUNK\n-00136c10: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c en\n-00136c70: 6162 6c65 2048 5454 5020 6368 756e 6b69 able HTTP chunki\n-00136c80: 6e67 2020 2020 3c2f 7464 3e3c 2f74 723e ng
    #SOAP_\n-00136ce0: 494f 5f4c 454e 4754 483c 2f63 6f64 653e IO_LENGTH\n-00136cf0: 2020 203c 2f74 643e 3c74 6420 636c 6173 out \n-00136d20: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 used with\n-00136d50: 2074 776f 2d70 6861 7365 2073 6572 6961 two-phase seria\n-00136d60: 6c69 7a61 7469 6f6e 2c20 6669 7273 7420 lization, first \n-00136d70: 7068 6173 6520 7769 7468 2074 6869 7320 phase with this \n-00136d80: 666c 6167 2074 6f20 6361 6c63 756c 6174 flag to calculat\n-00136d90: 6520 4854 5450 2063 6f6e 7465 6e74 206c e HTTP content l\n-00136da0: 656e 6774 6820 2020 203c 2f74 643e 3c2f ength
    #S\n-00136e00: 4f41 505f 494f 5f4b 4545 5041 4c49 5645 OAP_IO_KEEPALIVE\n-00136e10: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    in+out use UDP (dat\n-00136f80: 6167 7261 6d29 2074 7261 6e73 706f 7274 agram) transport\n-00136f90: 2c20 6d61 7869 6d75 6d20 6d65 7373 6167 , maximum messag\n-00136fa0: 6520 6c65 6e67 7468 2069 7320 3c63 6f64 e length is #SOAP_BUFLEN
    #S\n-00137020: 4f41 505f 454e 435f 504c 4149 4e3c 2f63 OAP_ENC_PLAIN in\n-00137060: 2b6f 7574 2020 203c 2f74 643e 3c74 6420 +out us\n-00137090: 6520 706c 6169 6e20 6d65 7373 6167 6573 e plain messages\n-001370a0: 2077 6974 686f 7574 2070 6172 7369 6e67 without parsing\n-001370b0: 206f 7220 656d 6974 7469 6e67 2048 5454 or emitting HTT\n-001370c0: 5020 6865 6164 6572 7320 2020 203c 2f74 P headers
    #SOAP_ENC_XML alias for \n-00137190: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n-001371a0: 504c 4149 4e3c 2f63 6f64 653e 2020 2020 PLAIN \n-001371b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    out
    #SOAP_ENC_MI\n-00137310: 4d45 3c2f 636f 6465 3e20 2020 3c2f 7464 ME out
    #SOAP\n-00137490: 5f45 4e43 5f4d 544f 4d3c 2f63 6f64 653e _ENC_MTOM\n-001374a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 out \n-001374d0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 use MTOM \n-00137500: 584f 5020 6174 7461 6368 6d65 6e74 7320 XOP attachments \n-00137510: 696e 7374 6561 6420 6f66 2044 494d 4520 instead of DIME \n-00137520: 616e 6420 4d49 4d45 2020 2020 3c2f 7464 and MIME
    \n-00137580: 2353 4f41 505f 454e 435f 5a4c 4942 3c2f #SOAP_ENC_ZLIB comp\n-001375f0: 7265 7373 206f 7574 7075 7420 7769 7468 ress output with\n-00137600: 205a 6c69 622c 2075 7369 6e67 2064 6566 Zlib, using def\n-00137610: 6c61 7465 206f 7220 677a 6970 2066 6f72 late or gzip for\n-00137620: 6d61 7420 2020 203c 2f74 643e 3c2f 7472 mat
    #SOA\n-00137680: 505f 454e 435f 5353 4c3c 2f63 6f64 653e P_ENC_SSL\n-00137690: 2020 203c 2f74 643e 3c74 6420 636c 6173 in+out\n-001376c0: 2020 203c 2f74 643e 3c74 6420 636c 6173 use SS\n-001376f0: 4c2f 544c 532c 2061 7574 6f6d 6174 6963 L/TLS, automatic\n-00137700: 2077 6865 6e20 636f 6e6e 6563 7469 6e67 when connecting\n-00137710: 2022 6874 7470 733a 2220 656e 6470 6f69 \"https:\" endpoi\n-00137720: 6e74 7320 2020 203c 2f74 643e 3c2f 7472 nts
    #SOAP\n-00137780: 5f58 4d4c 5f49 4e44 454e 543c 2f63 6f64 _XML_INDENT out \n-001377c0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 output \n-001377f0: 696e 6465 6e74 6564 2058 4d4c 2061 6e64 indented XML and\n-00137800: 204a 534f 4e20 2020 203c 2f74 643e 3c2f JSON
    #S\n-00137860: 4f41 505f 584d 4c5f 4341 4e4f 4e49 4341 OAP_XML_CANONICA\n-00137870: 4c3c 2f63 6f64 653e 2020 203c 2f74 643e L out
    #SOAP\n-00137940: 5f58 4d4c 5f44 4546 4155 4c54 4e53 3c2f _XML_DEFAULTNS outp\n-001379b0: 7574 2058 4d4c 2077 6974 6820 6465 6661 ut XML with defa\n-001379c0: 756c 7420 6e61 6d65 7370 6163 6520 6269 ult namespace bi\n-001379d0: 6e64 696e 6773 203c 636f 6465 3e78 6d6c ndings xml\n-001379e0: 6e73 3d22 2e2e 2e22 3c2f 636f 6465 3e20 ns=\"...\" \n-001379f0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_XM\n-00137a50: 4c5f 4947 4e4f 5245 4e53 3c2f 636f 6465 L_IGNORENS in \n-00137a90: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ignores X\n-00137ac0: 4d4c 206e 616d 6573 7061 6365 7320 696e ML namespaces in\n-00137ad0: 2058 4d4c 2069 6e70 7574 2020 2020 3c2f XML input
    #SOAP_XML_STRI\n-00137b40: 4354 3c2f 636f 6465 3e20 2020 3c2f 7464 CT in
    #SOA\n-00137c20: 505f 584d 4c5f 5452 4545 3c2f 636f 6465 P_XML_TREE in+ou\n-00137c60: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t out: \n-00137c90: 7365 7269 616c 697a 6520 6461 7461 2061 serialize data a\n-00137ca0: 7320 584d 4c20 7472 6565 7320 286e 6f20 s XML trees (no \n-00137cb0: 6d75 6c74 692d 7265 662c 2064 7570 6c69 multi-ref, dupli\n-00137cc0: 6361 7465 2064 6174 6120 7768 656e 206e cate data when n\n-00137cd0: 6563 6573 7361 7279 293b 2069 6e3a 2069 ecessary); in: i\n-00137ce0: 676e 6f72 6520 6964 2061 7474 7269 6275 gnore id attribu\n-00137cf0: 7465 7320 2864 6f20 6e6f 7420 7265 736f tes (do not reso\n-00137d00: 6c76 6520 6964 2d72 6566 2920 2020 203c lve id-ref) <\n-00137d10: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_XML_GRA\n-00137d70: 5048 3c2f 636f 6465 3e20 2020 3c2f 7464 PH out
    #SOAP_XML_NI\n-00137e80: 4c3c 2f63 6f64 653e 2020 203c 2f74 643e L out
    #SOAP_X\n-00137f70: 4d4c 5f4e 4f54 5950 453c 2f63 6f64 653e ML_NOTYPE\n-00137f80: 2020 203c 2f74 643e 3c74 6420 636c 6173 out \n-00137fb0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disable <\n-00137fe0: 656d 3e3c 636f 6465 3e78 7369 3a74 7970 em>xsi:typ\n-00137ff0: 653c 2f63 6f64 653e 3c2f 656d 3e20 6174 e at\n-00138000: 7472 6962 7574 6573 2020 2020 3c2f 7464 tributes
    #SOAP_C_NOIOB do no\n-001380d0: 7420 6661 756c 7420 7769 7468 203c 636f t fault with #SOAP_IOB
    #SOAP\n-00138150: 5f43 5f55 5446 5354 5249 4e47 3c2f 636f _C_UTFSTRING in+\n-00138190: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ser\n-001381c0: 6961 6c69 7a65 2038 2d62 6974 2063 6861 ialize 8-bit cha\n-001381d0: 7261 6374 6572 2073 7472 696e 6773 2022 racter strings \"\n-001381e0: 6173 2069 7322 2c20 6d65 616e 696e 6720 as is\", meaning \n-001381f0: 382d 6269 7420 7374 7269 6e67 7320 6861 8-bit strings ha\n-00138200: 7665 2055 5446 2d38 2063 6f6e 7465 6e74 ve UTF-8 content\n-00138210: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_C\n-00138270: 5f4d 4253 5452 494e 473c 2f63 6f64 653e _MBSTRING\n-00138280: 2020 203c 2f74 643e 3c74 6420 636c 6173 in+out\n-001382b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n-001382e0: 206d 756c 7469 6279 7465 2063 6861 7261 multibyte chara\n-001382f0: 6374 6572 2073 7570 706f 7274 2066 6f72 cter support for\n-00138300: 2038 2d62 6974 2063 6861 7261 6374 6572 8-bit character\n-00138310: 2073 7472 696e 6773 2077 6974 6820 3c63 strings with wctomb and mbto\n-00138340: 7763 3c2f 636f 6465 3e20 7573 696e 6720 wc using \n-00138350: 7468 6520 6375 7272 656e 7420 6c6f 6361 the current loca\n-00138360: 6c65 2020 2020 3c2f 7464 3e3c 2f74 723e le
    #SOAP_\n-001383c0: 435f 4e49 4c53 5452 494e 473c 2f63 6f64 C_NILSTRING out \n-00138400: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 seriali\n-00138430: 7a65 2065 6d70 7479 2073 7472 696e 6773 ze empty strings\n-00138440: 2061 7320 7873 693a 6e69 6c20 6174 7472 as xsi:nil attr\n-00138450: 6962 7574 6564 2065 6c65 6d65 6e74 7320 ibuted elements \n-00138460: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74
    .<\n-0013a910: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0013a920: 776e 5461 626c 6548 6561 6422 3e0a 3c74 wnTableHead\">.\n-0013a950: 636f 6e74 6578 7420 666c 6167 2077 6974 context flag wit\n-0013a960: 6820 7365 7473 6f63 6b6f 7074 206f 7074 h setsockopt opt\n-0013a970: 696f 6e20 2020 3c2f 7468 3e3c 7468 2063 ion ..\n-0013ab30: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n-0013acf0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n-0013b170: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-0013b230: 6170 3a3a 636f 6e6e 6563 745f 666c 6167 ap::connect_flag\n-0013b240: 733c 2f61 3e3c 2f63 6f64 653e 203d 203c s = <\n-0013b250: 636f 6465 3e53 4f5f 444f 4e54 524f 5554 code>SO_DONTROUT\n-0013b260: 453c 2f63 6f64 653e 2020 203c 2f74 643e E \n-0013b270: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-0013b2f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013b300: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013b310: 3e3c 636f 6465 3e3c 6120 636c 6173 733d >s\n-0013b3d0: 6f61 703a 3a61 6363 6570 745f 666c 6167 oap::accept_flag\n-0013b3e0: 733c 2f61 3e3c 2f63 6f64 653e 203d 203c s = <\n-0013b3f0: 636f 6465 3e53 4f5f 4e4f 5349 4750 4950 code>SO_NOSIGPIP\n-0013b400: 453c 2f63 6f64 653e 2020 203c 2f74 643e E \n-0013b410: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......<\n-0013b8f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-0013b9b0: 703a 3a61 6363 6570 745f 666c 6167 733c p::accept_flags<\n-0013b9c0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_DONTROUTE<\n-0013b9e0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-0013ba10: 656e 6162 6c65 7320 726f 7574 696e 6720 enables routing \n-0013ba20: 6279 7061 7373 2066 6f72 206f 7574 676f bypass for outgo\n-0013ba30: 696e 6720 6d65 7373 6167 6573 2020 2020 ing messages \n-0013ba40: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-0013ba90: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-0013bb50: 703a 3a62 696e 645f 666c 6167 733c 2f61 p::bind_flags = SO_REUSEADDR \n-0013bbf0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-0013bd90: 0a3c 2f74 6162 6c65 3e0a 3c70 3e46 6f72 .
    res\n-0013a9a0: 756c 7420 2020 203c 2f74 683e 3c2f 7472 ult
    soap::connect\n-0013aac0: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = SO_NOS\n-0013aae0: 4947 5049 5045 3c2f 636f 6465 3e20 2020 IGPIPE \n-0013aaf0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disables \n-0013ab20: 5349 4750 4950 4520 2020 203c 2f74 643e SIGPIPE
    \n-0013ab80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co\n-0013ac40: 6e6e 6563 745f 666c 6167 733c 2f61 3e3c nnect_flags<\n-0013ac50: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n-0013ac60: 4f5f 4445 4255 473c 2f63 6f64 653e 2020 O_DEBUG \n-0013ac70: 203c 2f74 643e 3c74 6420 636c 6173 733d turns on\n-0013aca0: 2072 6563 6f72 6469 6e67 206f 6620 6465 recording of de\n-0013acb0: 6275 6767 696e 6720 696e 666f 726d 6174 bugging informat\n-0013acc0: 696f 6e20 696e 2074 6865 2075 6e64 6572 ion in the under\n-0013acd0: 6c79 696e 6720 7072 6f74 6f63 6f6c 206d lying protocol m\n-0013ace0: 6f64 756c 6573 2020 2020 3c2f 7464 3e3c odules
    soap::conn\n-0013ae00: 6563 745f 666c 6167 733c 2f61 3e3c 2f63 ect_flags = SO_\n-0013ae20: 4252 4f41 4443 4153 543c 2f63 6f64 653e BROADCAST\n-0013ae30: 2020 203c 2f74 643e 3c74 6420 636c 6173 permit\n-0013ae60: 7320 7365 6e64 696e 6720 6f66 2062 726f s sending of bro\n-0013ae70: 6164 6361 7374 206d 6573 7361 6765 732c adcast messages,\n-0013ae80: 2066 6f72 2065 7861 6d70 6c65 2077 6974 for example wit\n-0013ae90: 6820 5544 502c 2077 6865 6e20 7065 726d h UDP, when perm\n-0013aea0: 6974 7465 6420 2020 203c 2f74 643e 3c2f itted
    soap::conn\n-0013afc0: 6563 745f 666c 6167 733c 2f61 3e3c 2f63 ect_flags = SO_\n-0013afe0: 4c49 4e47 4552 3c2f 636f 6465 3e20 2020 LINGER \n-0013aff0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 sets clie\n-0013b020: 6e74 2d73 6964 6520 6c69 6e67 6572 2074 nt-side linger t\n-0013b030: 696d 6520 746f 2074 6865 2076 616c 7565 ime to the value\n-0013b040: 206f 6620 3c63 6f64 653e 3c61 2063 6c61 of soap::linger_t\n-0013b110: 696d 653c 2f61 3e3c 2f63 6f64 653e 2020 ime \n-0013b120: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    enables routin\n-0013b2a0: 6720 6279 7061 7373 2066 6f72 206f 7574 g bypass for out\n-0013b2b0: 676f 696e 6720 6d65 7373 6167 6573 2020 going messages \n-0013b2c0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    disables SIGPI\n-0013b440: 5045 2028 6368 6563 6b20 796f 7572 204f PE (check your O\n-0013b450: 532c 2074 6869 7320 6973 206e 6f74 2070 S, this is not p\n-0013b460: 6f72 7461 626c 6529 2020 2020 3c2f 7464 ortable)
    \n-0013b4c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ac\n-0013b580: 6365 7074 5f66 6c61 6773 3c2f 613e 3c2f cept_flags = SO\n-0013b5a0: 5f44 4542 5547 3c2f 636f 6465 3e20 2020 _DEBUG \n-0013b5b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 turns on \n-0013b5e0: 7265 636f 7264 696e 6720 6f66 2064 6562 recording of deb\n-0013b5f0: 7567 6769 6e67 2069 6e66 6f72 6d61 7469 ugging informati\n-0013b600: 6f6e 2069 6e20 7468 6520 756e 6465 726c on in the underl\n-0013b610: 7969 6e67 2070 726f 746f 636f 6c20 6d6f ying protocol mo\n-0013b620: 6475 6c65 7320 2020 203c 2f74 643e 3c2f dules
    soap::acce\n-0013b740: 7074 5f66 6c61 6773 3c2f 613e 3c2f 636f pt_flags = SO_L\n-0013b760: 494e 4745 523c 2f63 6f64 653e 2020 203c INGER <\n-0013b770: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>sets serve\n-0013b7a0: 722d 7369 6465 206c 696e 6765 7220 7469 r-side linger ti\n-0013b7b0: 6d65 2074 6f20 7468 6520 7661 6c75 6520 me to the value \n-0013b7c0: 6f66 203c 636f 6465 3e3c 6120 636c 6173 of soap::linger_ti\n-0013b890: 6d65 3c2f 613e 3c2f 636f 6465 3e20 2020 me \n-0013b8a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    en\n-0013bbb0: 6162 6c65 7320 6c6f 6361 6c20 6164 6472 ables local addr\n-0013bbc0: 6573 7320 7265 7573 6520 696d 6d65 6469 ess reuse immedi\n-0013bbd0: 6174 656c 792c 2075 7365 2077 6974 6820 ately, use with \n-0013bbe0: 6361 7574 696f 6e20 2020 203c 2f74 643e caution
    <\n-0013bc40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013bc50: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013bc60: 6d6c 2361 3662 3138 6230 3137 6365 3263 ml#a6b18b017ce2c\n-0013bc70: 3737 6163 3262 3633 3331 3436 3930 3934 77ac2b6331469094\n-0013bc80: 6465 3539 2220 7469 746c 653d 2255 7365 de59\" title=\"Use\n-0013bc90: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n-0013bca0: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n-0013bcb0: 5f53 4f43 4b45 5420 666c 6167 7320 7768 _SOCKET flags wh\n-0013bcc0: 656e 2062 696e 6469 6e67 2073 6f61 703a en binding soap:\n-0013bcd0: 3a6d 6173 7465 7220 736f 636b 6574 2028 :master socket (\n-0013bce0: 7468 6520 7661 6c75 6520 6973 2030 2062 the value is 0 b\n-0013bcf0: 7920 2e2e 2e22 3e73 6f61 703a 3a62 696e y ...\">soap::bin\n-0013bd00: 645f 666c 6167 733c 2f61 3e3c 2f63 6f64 d_flags = SO_RE\n-0013bd20: 5553 4550 4f52 543c 2f63 6f64 653e 2020 USEPORT \n-0013bd30: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n-0013bd60: 6475 706c 6963 6174 6520 6164 6472 6573 duplicate addres\n-0013bd70: 7320 616e 6420 706f 7274 2062 696e 6469 s and port bindi\n-0013bd80: 6e67 7320 2020 3c2f 7464 3e3c 2f74 723e ngs
    .

    For\n-0013bda0: 2065 7861 6d70 6c65 2c20 7768 656e 203c example, when <\n-0013bdb0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-0013be70: 703a 3a61 6363 6570 745f 666c 6167 733c p::accept_flags<\n-0013be80: 2f61 3e3c 2f63 6f64 653e 2069 7320 7365 /a> is se\n-0013be90: 7420 746f 203c 636f 6465 3e28 534f 5f4e t to (SO_N\n-0013bea0: 4f53 4947 5049 5045 207c 2053 4f5f 4c49 OSIGPIPE | SO_LI\n-0013beb0: 4e47 4552 293c 2f63 6f64 653e 2074 6869 NGER) thi\n-0013bec0: 7320 6469 7361 626c 6573 2053 4947 5049 s disables SIGPI\n-0013bed0: 5045 2073 6967 6e61 6c73 2061 6e64 2073 PE signals and s\n-0013bee0: 6574 206c 696e 6765 7220 7469 6d65 2076 et linger time v\n-0013bef0: 616c 7565 2067 6976 656e 2062 7920 3c63 alue given by soap\n-0013bfc0: 3a3a 6c69 6e67 6572 5f74 696d 653c 2f61 ::linger_time, which \n-0013bfe0: 6973 207a 6572 6f20 6279 2064 6566 6175 is zero by defau\n-0013bff0: 6c74 2e3c 2f70 3e0a 3c70 3e54 6865 203c lt.

    .

    The <\n-0013c000: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-0013c0c0: 703a 3a73 6f63 6b65 745f 666c 6167 733c p::socket_flags<\n-0013c0d0: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-0013c0e0: 7874 2066 6c61 6720 6361 6e20 6265 2075 xt flag can be u\n-0013c0f0: 7365 6420 746f 2070 6173 7320 6f70 7469 sed to pass opti\n-0013c100: 6f6e 7320 746f 2074 6865 203c 636f 6465 ons to the <sys/socket.\n-0013c120: 6826 6774 3b3c 2f63 6f64 653e 203c 636f h> send, \n-0013c140: 3c63 6f64 653e 7365 6e64 746f 3c2f 636f sendto, recv<\n-0013c160: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and recvfrom calls made by \n-0013c190: 7468 6520 656e 6769 6e65 2c20 7468 6f75 the engine, thou\n-0013c1a0: 6768 2073 6f6d 6520 6f70 7469 6f6e 7320 gh some options \n-0013c1b0: 6d61 7920 6e6f 7420 6265 2061 7070 6c69 may not be appli\n-0013c1c0: 6361 626c 6520 746f 2079 6f75 7220 6f70 cable to your op\n-0013c1d0: 6572 6174 696e 6720 7379 7374 656d 3a3c erating system:<\n-0013c1e0: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>..\n-0013c220: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b ...\n-0013c420: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-0013c5c0: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c .
    context flag \n-0013c250: 7769 7468 2073 656e 742f 7265 6376 2066 with sent/recv f\n-0013c260: 6c61 6773 2020 203c 2f74 683e 3c74 6820 lags re\n-0013c290: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult
    soap::socket\n-0013c3b0: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = MSG_NO\n-0013c3d0: 5349 474e 414c 3c2f 636f 6465 3e20 2020 SIGNAL \n-0013c3e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disables \n-0013c410: 5349 4750 4950 4520 2020 203c 2f74 643e SIGPIPE
    \n-0013c470: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so\n-0013c530: 636b 6574 5f66 6c61 6773 3c2f 613e 3c2f cket_flags = MS\n-0013c550: 475f 444f 4e54 524f 5554 453c 2f63 6f64 G_DONTROUTE enab\n-0013c590: 6c65 7320 726f 7574 696e 6720 6279 7061 les routing bypa\n-0013c5a0: 7373 2066 6f72 206f 7574 676f 696e 6720 ss for outgoing \n-0013c5b0: 6d65 7373 6167 6573 2020 203c 2f74 643e messages
    .<\n-0013c5d0: 703e 4675 7274 6865 726d 6f72 652c 2074 p>Furthermore, t\n-0013c5e0: 6865 203c 636f 6465 3e73 6574 736f 636b he setsock\n-0013c5f0: 6f70 743c 2f63 6f64 653e 206c 6576 656c opt level\n-0013c600: 203c 636f 6465 3e53 4f4c 5f53 4f43 4b45 SOL_SOCKE\n-0013c610: 543c 2f63 6f64 653e 206f 7074 696f 6e73 T options\n-0013c620: 203c 636f 6465 3e53 4f5f 534e 4442 5546 SO_SNDBUF\n-0013c630: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and SO_RCVBUF are set the e\n-0013c660: 6e67 696e 6520 7768 656e 203c 636f 6465 ngine when
    soap::sn\n-0013c720: 6462 7566 3c2f 613e 3c2f 636f 6465 3e20 dbuf \n-0013c730: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::rcvbuf are set\n-0013c800: 2074 6f20 6120 6e6f 6e7a 6572 6f20 7661 to a nonzero va\n-0013c810: 6c75 652e 2054 6865 2064 6566 6175 6c74 lue. The default\n-0013c820: 2076 616c 7565 2069 7320 3c63 6f64 653e value is \n-0013c830: 2353 4f41 505f 4255 464c 454e 3c2f 636f #SOAP_BUFLEN, which is th\n-0013c850: 6520 7361 6d65 2073 697a 6520 7573 6564 e same size used\n-0013c860: 2062 7920 7468 6520 696e 7465 726e 616c by the internal\n-0013c870: 2062 7566 6665 7220 3c63 6f64 653e 3c61 buffer soap::buf<\n-0013c940: 2f61 3e3c 2f63 6f64 653e 2074 6f20 7365 /a> to se\n-0013c950: 6e64 2061 6e64 2072 6563 6569 7665 206d nd and receive m\n-0013c960: 6573 7361 6765 732e 2041 207a 6572 6f20 essages. A zero \n-0013c970: 7661 6c75 6520 6f6d 6974 7320 7468 6520 value omits the \n-0013c980: 696e 7465 726e 616c 203c 636f 6465 3e73 internal s\n-0013c990: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt\n-0013c9a0: 2063 616c 6c20 746f 2073 6574 2074 6865 call to set the\n-0013c9b0: 7365 206f 7074 696f 6e73 2e20 5365 7474 se options. Sett\n-0013c9c0: 696e 6720 7468 6573 6520 7661 6c75 6573 ing these values\n-0013c9d0: 2074 6f20 7a65 726f 2061 6374 6976 6174 to zero activat\n-0013c9e0: 6573 2061 7574 6f2d 7475 6e69 6e67 2077 es auto-tuning w\n-0013c9f0: 6974 6820 4c69 6e75 7820 322e 3420 616e ith Linux 2.4 an\n-0013ca00: 6420 6772 6561 7465 722e 3c2f 703e 0a3c d greater.

    .<\n-0013ca10: 703e 5468 6520 3c63 6f64 653e 7365 7473 p>The sets\n-0013ca20: 6f63 6b6f 7074 3c2f 636f 6465 3e20 6c65 ockopt le\n-0013ca30: 7665 6c20 3c63 6f64 653e 534f 4c5f 534f vel SOL_SO\n-0013ca40: 434b 4554 3c2f 636f 6465 3e20 6f70 7469 CKET opti\n-0013ca50: 6f6e 203c 636f 6465 3e53 4f5f 4b45 4550 on SO_KEEP\n-0013ca60: 414c 4956 453c 2f63 6f64 653e 2069 7320 ALIVE is \n-0013ca70: 7365 7420 7768 656e 206b 6565 702d 616c set when keep-al\n-0013ca80: 6976 6520 6973 2065 6e61 626c 6564 2077 ive is enabled w\n-0013ca90: 6974 6820 636f 6e74 6578 7420 666c 6167 ith context flag\n-0013caa0: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_\n-0013cab0: 4b45 4550 414c 4956 453c 2f63 6f64 653e KEEPALIVE\n-0013cac0: 206f 7220 7768 656e 203c 636f 6465 3e3c or when <\n-0013cad0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013cae0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013caf0: 6d6c 2361 6638 6638 3061 3762 6438 6330 ml#af8f80a7bd8c0\n-0013cb00: 3933 3335 6336 6662 3833 3661 3631 3232 9335c6fb836a6122\n-0013cb10: 3331 6262 2220 7469 746c 653d 2255 7365 31bb\" title=\"Use\n-0013cb20: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n-0013cb30: 6520 746f 2073 6574 2053 4f5f 4b45 4550 e to set SO_KEEP\n-0013cb40: 414c 4956 4520 7365 7473 6f63 6b6f 7074 ALIVE setsockopt\n-0013cb50: 2028 3020 6279 2064 6566 6175 6c74 2075 (0 by default u\n-0013cb60: 6e6c 6573 7320 7468 6520 2353 4f41 505f nless the #SOAP_\n-0013cb70: 494f 5f4b 4545 5041 4c49 5645 206d 6f64 IO_KEEPALIVE mod\n-0013cb80: 6520 2e2e 2e22 3e73 6f61 703a 3a74 6370 e ...\">soap::tcp\n-0013cb90: 5f6b 6565 705f 616c 6976 653c 2f61 3e3c _keep_alive<\n-0013cba0: 2f63 6f64 653e 2069 7320 6e6f 6e7a 6572 /code> is nonzer\n-0013cbb0: 6f2e 2057 6974 6820 3c63 6f64 653e 3c61 o. With soap::tcp_\n-0013cc80: 6b65 6570 5f61 6c69 7665 3c2f 613e 3c2f keep_alive additional\n-0013cca0: 206f 7074 696f 6e73 2063 616e 2062 6520 options can be \n-0013ccb0: 7370 6563 6966 6965 6420 7769 7468 203c specified with <\n-0013ccc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::tcp_ke\n-0013cd70: 6570 5f69 646c 653c 2f61 3e3c 2f63 6f64 ep_idle, soap::\n-0013ce30: 7463 705f 6b65 6570 5f69 6e74 766c 3c2f tcp_keep_intvl, and <\n-0013ce50: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::tcp_kee\n-0013cf00: 705f 636e 743c 2f61 3e3c 2f63 6f64 653e p_cnt\n-0013cf10: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.
    struct <\n-0013cf70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0013cf80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0013cf90: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-0013cfa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0013cfd0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-0013d030: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    .<\n-0013d050: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0013d060: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0013d070: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0013d080: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;tcp_\n-0013d0d0: 6b65 6570 5f61 6c69 7665 3c2f 613e 203d keep_alive =\n-0013d0e0: 2031 3b20 2020 3c73 7061 6e20 636c 6173 1; // s\n-0013d100: 6574 736f 636b 6f70 7420 534f 5f4b 4545 etsockopt SO_KEE\n-0013d110: 5041 4c49 5645 3c2f 7370 616e 3e3c 2f64 PALIVE.
    soa\n-0013d160: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->tcp_keep_idle\n-0013d1c0: 3c2f 613e 203d 2033 303b 2020 203c 7370 = 30; // time in se\n-0013d1f0: 636f 6e64 7320 7468 6520 636f 6e6e 6563 conds the connec\n-0013d200: 7469 6f6e 206e 6565 6473 2074 6f20 7265 tion needs to re\n-0013d210: 6d61 696e 2069 646c 6520 6265 666f 7265 main idle before\n-0013d220: 2054 4350 2073 7461 7274 7320 7365 6e64 TCP starts send\n-0013d230: 696e 6720 6b65 6570 616c 6976 6520 7072 ing keepalive pr\n-0013d240: 6f62 6573 3c2f 7370 616e 3e3c 2f64 6976 obes.
    soap<\n-0013d290: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->tcp_keep_intvl<\n-0013d2f0: 2f61 3e20 3d20 3132 303b 203c 7370 616e /a> = 120; // time in seco\n-0013d320: 6e64 7320 6265 7477 6565 6e20 696e 6469 nds between indi\n-0013d330: 7669 6475 616c 206b 6565 7061 6c69 7665 vidual keepalive\n-0013d340: 2070 726f 6265 733c 2f73 7061 6e3e 3c2f probes.
    so\n-0013d390: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->tcp_keep_cnt\n-0013d3f0: 3c2f 613e 203d 2035 3b20 2020 2020 3c73 = 5; // maximum n\n-0013d420: 756d 6265 7220 6f66 206b 6565 7061 6c69 umber of keepali\n-0013d430: 7665 2070 726f 6265 7320 5443 5020 7368 ve probes TCP sh\n-0013d440: 6f75 6c64 2073 656e 6420 6265 666f 7265 ould send before\n-0013d450: 2064 726f 7070 696e 6720 7468 6520 636f dropping the co\n-0013d460: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection<\n-0013d470: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-0013d4c0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0013d4d0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-0013d510: 6f61 703a 3a74 6370 5f6b 6565 705f 636e oap::tcp_keep_cn\n-0013d520: 743c 2f61 3e3c 2f64 6976 3e3c 6469 7620 t
    u\n-0013d540: 6e73 6967 6e65 6420 696e 7420 7463 705f nsigned int tcp_\n-0013d550: 6b65 6570 5f63 6e74 3c2f 6469 763e 3c64 keep_cnt
    User-definable \n-0013d580: 7661 6c75 6520 746f 2073 6574 2054 4350 value to set TCP\n-0013d590: 5f4b 4545 5043 4e54 2073 6574 736f 636b _KEEPCNT setsock\n-0013d5a0: 6f70 7420 2874 6865 2076 616c 7565 2069 opt (the value i\n-0013d5b0: 7320 3020 6279 2064 6566 6175 6c74 293c s 0 by default)<\n-0013d5c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0013d5e0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0013d5f0: 6170 322e 683a 3335 3834 3c2f 6469 763e ap2.h:3584
    \n-0013d600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0013d650: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 unsigned int t\n-0013d6e0: 6370 5f6b 6565 705f 696e 7476 6c3c 2f64 cp_keep_intvl
    User-defin\n-0013d710: 6162 6c65 2076 616c 7565 2074 6f20 7365 able value to se\n-0013d720: 7420 5443 505f 4b45 4550 494e 5456 4c20 t TCP_KEEPINTVL \n-0013d730: 7365 7473 6f63 6b6f 7074 2028 7468 6520 setsockopt (the \n-0013d740: 7661 6c75 6520 6973 2030 2062 7920 6465 value is 0 by de\n-0013d750: 6661 756c 7429 3c2f 6469 763e 3c64 6976 fault)
    <\n-0013d770: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:355\n-0013d790: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    soap::tcp\n-0013d840: 5f6b 6565 705f 6964 6c65 3c2f 613e 3c2f _keep_idle
    unsigned\n-0013d870: 2069 6e74 2074 6370 5f6b 6565 705f 6964 int tcp_keep_id\n-0013d880: 6c65 3c2f 6469 763e 3c64 6976 2063 6c61 le
    User-\n-0013d8a0: 6465 6669 6e61 626c 6520 7661 6c75 6520 definable value \n-0013d8b0: 746f 2073 6574 2054 4350 5f4b 4545 5049 to set TCP_KEEPI\n-0013d8c0: 444c 4520 7365 7473 6f63 6b6f 7074 2028 DLE setsockopt (\n-0013d8d0: 7468 6520 7661 6c75 6520 6973 2030 2062 the value is 0 b\n-0013d8e0: 7920 6465 6661 756c 7429 3c2f 6469 763e y default)
    \n-0013d8f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-0013d910: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-0013d920: 3a33 3533 343c 2f64 6976 3e3c 2f64 6976 :3534
    .
    <\n-0013d990: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-0013d9a0: 6170 2e68 746d 6c23 6166 3866 3830 6137 ap.html#af8f80a7\n-0013d9b0: 6264 3863 3039 3333 3563 3666 6238 3336 bd8c09335c6fb836\n-0013d9c0: 6136 3132 3233 3162 6222 3e73 6f61 703a a612231bb\">soap:\n-0013d9d0: 3a74 6370 5f6b 6565 705f 616c 6976 653c :tcp_keep_alive<\n-0013d9e0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int\n-0013da00: 2074 6370 5f6b 6565 705f 616c 6976 653c tcp_keep_alive<\n-0013da10: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n-0013da30: 696e 6162 6c65 2076 616c 7565 2074 6f20 inable value to \n-0013da40: 7365 7420 534f 5f4b 4545 5041 4c49 5645 set SO_KEEPALIVE\n-0013da50: 2073 6574 736f 636b 6f70 7420 2830 2062 setsockopt (0 b\n-0013da60: 7920 6465 6661 756c 7420 756e 6c65 7373 y default unless\n-0013da70: 2074 6865 2023 534f 4150 5f49 4f5f 4b45 the #SOAP_IO_KE\n-0013da80: 4550 414c 4956 4520 6d6f 6465 202e 2e2e EPALIVE mode ...\n-0013da90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0013dab0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0013dac0: 6f61 7032 2e68 3a33 3530 393c 2f64 6976 oap2.h:3509
    .
    <\n-0013daf0: 703e 466f 7220 5544 5020 6d65 7373 6167 p>For UDP messag\n-0013db00: 696e 672c 2075 7365 203c 636f 6465 3e23 ing, use #\n-0013db10: 534f 4150 5f49 4f5f 5544 503c 2f63 6f64 SOAP_IO_UDP. See also Sec\n-0013db30: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion SOAP/XM\n-0013db60: 4c20 6f76 6572 2055 4450 3c2f 613e 2e20 L over UDP. \n-0013db70: 5468 6520 636f 6e74 6578 7420 666c 6167 The context flag\n-0013db80: 7320 7468 6174 2063 616e 2062 6520 7365 s that can be se\n-0013db90: 7420 6174 2074 6865 2063 6c69 656e 7420 t at the client \n-0013dba0: 7369 6465 2066 6f72 2055 4450 206d 6573 side for UDP mes\n-0013dbb0: 7361 6769 6e67 2061 7265 203c 636f 6465 saging are soap::\n-0013dc70: 6970 7634 5f6d 756c 7469 6361 7374 5f69 ipv4_multicast_i\n-0013dc80: 663c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 f, soa\n-0013dd40: 703a 3a69 7076 345f 6d75 6c74 6963 6173 p::ipv4_multicas\n-0013dd50: 745f 7474 6c3c 2f61 3e3c 2f63 6f64 653e t_ttl
    \n-0013dd60: 2c20 616e 6420 3c63 6f64 653e 3c61 2063 , and soap::ipv6_mult\n-0013de10: 6963 6173 745f 6966 3c2f 613e 3c2f 636f icast_if:

    .....<\n-0013dff0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013e000: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013e010: 3e73 6574 203c 636f 6465 3e73 6574 736f >set setso\n-0013e020: 636b 6f70 743c 2f63 6f64 653e 206c 6576 ckopt lev\n-0013e030: 656c 203c 636f 6465 3e49 5050 524f 544f el IPPROTO\n-0013e040: 5f49 503c 2f63 6f64 653e 2074 6f20 3c63 _IP to IP_MULTICAST\n-0013e060: 5f49 463c 2f63 6f64 653e 2077 6974 6820 _IF with \n-0013e070: 7661 6c75 6520 3c63 6f64 653e 3c61 2063 value soap::ipv4_\n-0013e130: 6d75 6c74 6963 6173 745f 6966 3c2f 613e multicast_if\n-0013e140: 3c2f 636f 6465 3e20 7768 656e 206e 6f6e when non\n-0013e150: 2d4e 554c 4c20 2020 203c 2f74 643e 3c2f -NULL ....\n-0013e500: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..

    .... Back to t\n-0013e650: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-0013e660: 3c2f 613e 3c2f 703e 0a3c 6831 3e3c 6120

    .

    .Run-time error\n-0013e6a0: 2063 6f64 6573 3c2f 6831 3e0a 3c70 3e53 codes

    .

    S\n-0013e6b0: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code\n-0013e6c0: 7320 6172 6520 696e 7465 6765 7220 7661 s are integer va\n-0013e6d0: 6c75 6573 2c20 7768 6963 6820 6172 6520 lues, which are \n-0013e6e0: 7265 7475 726e 6564 2062 7920 7468 6520 returned by the \n-0013e6f0: 6753 4f41 5020 4150 4920 6675 6e63 7469 gSOAP API functi\n-0013e700: 6f6e 732e 2054 6865 2066 756c 6c20 6c69 ons. The full li\n-0013e710: 7374 206f 6620 3c63 6f64 653e 3c61 2063 st of soa\n-0013e7d0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status error codes \n-0013e7f0: 6973 206c 6973 7465 6420 6265 6c6f 773a is listed below:\n-0013e800: 3c2f 703e 0a3c 7461 626c 6520 636c 6173

    .
    context \n-0013de90: 666c 6167 2020 203c 2f74 683e 3c74 6820 flag re\n-0013dec0: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult
    soap::ipv4_\n-0013dfd0: 6d75 6c74 6963 6173 745f 6966 3c2f 613e multicast_if\n-0013dfe0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    soap::ipv\n-0013e260: 345f 6d75 6c74 6963 6173 745f 7474 6c3c 4_multicast_ttl<\n-0013e270: 2f61 3e3c 2f63 6f64 653e 2020 203c 2f74 /a> set se\n-0013e2b0: 7473 6f63 6b6f 7074 3c2f 636f 6465 3e20 tsockopt \n-0013e2c0: 6c65 7665 6c20 3c63 6f64 653e 4950 5052 level IPPR\n-0013e2d0: 4f54 4f5f 4950 3c2f 636f 6465 3e20 746f OTO_IP to\n-0013e2e0: 203c 636f 6465 3e49 505f 4d55 4c54 4943 IP_MULTIC\n-0013e2f0: 4153 545f 5454 4c3c 2f63 6f64 653e 2077 AST_TTL w\n-0013e300: 6974 6820 7661 6c75 6520 3c63 6f64 653e ith value \n-0013e310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::i\n-0013e3c0: 7076 345f 6d75 6c74 6963 6173 745f 7474 pv4_multicast_tt\n-0013e3d0: 6c3c 2f61 3e3c 2f63 6f64 653e 2077 6865 l whe\n-0013e3e0: 6e20 6e6f 6e7a 6572 6f20 2020 203c 2f74 n nonzero
    soap::ipv6\n-0013e4e0: 5f6d 756c 7469 6361 7374 5f69 663c 2f61 _multicast_if set sock\n-0013e530: 6164 6472 5f69 6e36 3a3a 7369 6e36 5f73 addr_in6::sin6_s\n-0013e540: 636f 7065 5f69 643c 2f63 6f64 653e 2074 cope_id t\n-0013e550: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soa\n-0013e5f0: 703a 3a69 7076 365f 6d75 6c74 6963 6173 p::ipv6_multicas\n-0013e600: 745f 6966 3c2f 613e 3c2f 636f 6465 3e20 t_if \n-0013e610: 7768 656e 206e 6f6e 7a65 726f 2020 203c when nonzero <\n-0013e620: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>
    ........\n-0013ea80: 3c63 6f64 653e 2353 4f41 505f 4441 5441 #SOAP_DATA\n-0013ea90: 454e 434f 4449 4e47 554e 4b4e 4f57 4e3c ENCODINGUNKNOWN<\n-0013eaa0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-0013ead0: 534f 4150 2031 2e32 2044 6174 6145 6e63 SOAP 1.2 DataEnc\n-0013eae0: 6f64 696e 6755 6e6b 6e6f 776e 2066 6175 odingUnknown fau\n-0013eaf0: 6c74 2020 2020 3c2f 7464 3e3c 2f74 723e lt \n-0013eb00: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....\n-0013ee10: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...<\n-0013ef00: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0013ef10: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-0013ef20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-0013f040: 636f 6465 3e23 534f 4150 5f44 494d 455f code>#SOAP_DIME_\n-0013f050: 4d49 534d 4154 4348 3c2f 636f 6465 3e20 MISMATCH \n-0013f060: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..................\n-0013f9f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .\n-0013fc30: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...\n-0013fde0: 3c63 6f64 653e 2353 4f41 505f 4854 5450 #SOAP_HTTP\n-0013fdf0: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n-0013fe00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..<\n-0013ff30: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..<\n-0013ffe0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n-00140260: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n-00140380: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00140390: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001403a0: 3e4d 494d 4520 6174 7461 6368 6d65 6e74 >MIME attachment\n-001403b0: 2068 6173 206e 6f20 6872 6566 2066 726f has no href fro\n-001403c0: 6d20 534f 4150 2062 6f64 7920 616e 6420 m SOAP body and \n-001403d0: 6e6f 204d 494d 4520 6361 6c6c 6261 636b no MIME callback\n-001403e0: 7320 7765 7265 2064 6566 696e 6564 2074 s were defined t\n-001403f0: 6f20 7361 7665 2074 6865 2061 7474 6163 o save the attac\n-00140400: 686d 656e 7420 2020 203c 2f74 643e 3c2f hment ..<\n-00140560: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...\n-00140650: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-00140670: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n-001407c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001407d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001407e0: 3e58 4d4c 206e 616d 6573 7061 6365 206e >XML namespace n\n-001407f0: 616d 6520 6d69 736d 6174 6368 2076 616c ame mismatch val\n-00140800: 6964 6174 696f 6e20 6572 726f 7220 2020 idation error \n-00140810: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-00140860: 636f 6465 3e23 534f 4150 5f4e 4f5f 4441 code>#SOAP_NO_DA\n-00140870: 5441 3c2f 636f 6465 3e20 2020 3c2f 7464 TA....N\n-00140a60: 6f20 584d 4c20 656c 656d 656e 7420 7461 o XML element ta\n-00140a70: 6720 7761 7320 666f 756e 6420 7768 656e g was found when\n-00140a80: 206f 6e65 2077 6173 2065 7870 6563 7465 one was expecte\n-00140a90: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d .\n-00140aa0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .....<\n-00140cd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00140ce0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00140cf0: 3e58 4d4c 2065 6c65 6d65 6e74 206d 696e >XML element min\n-00140d00: 4f63 6375 7273 206f 7220 6d61 784f 6363 Occurs or maxOcc\n-00140d10: 7572 7320 7661 6c69 6461 7469 6f6e 2065 urs validation e\n-00140d20: 7272 6f72 206f 7220 3c63 6f64 653e 2353 rror or #S\n-00140d30: 4f41 505f 4d41 584f 4343 5552 533c 2f63 OAP_MAXOCCURS exceeded \n-00140d50: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-00140da0: 636f 6465 3e23 534f 4150 5f50 4154 4348 code>#SOAP_PATCH\n-00140db0: 5f4d 4554 484f 443c 2f63 6f64 653e 2020 _METHOD \n-00140dc0: 203c 2f74 643e 3c74 6420 636c 6173 733d .\n-00140fb0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n-00141070: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-001410e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ........\n-001415a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...<\n-00141690: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-001416a0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-001416b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-00141780: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-001418a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......\n-00141af0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......\n-00141e10: 3c63 6f64 653e 2353 4f41 505f 5a4c 4942 #SOAP_ZLIB\n-00141e20: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n-00141e30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..

    A status c\n-00141e90: 6f64 6520 6f66 203c 636f 6465 3e23 534f ode of #SO\n-00141ea0: 4150 5f4f 4b3c 2f63 6f64 653e 2028 7a65 AP_OK (ze\n-00141eb0: 726f 2920 6973 2072 6574 7572 6e65 6420 ro) is returned \n-00141ec0: 6279 2061 2067 534f 4150 2041 5049 2066 by a gSOAP API f\n-00141ed0: 756e 6374 696f 6e20 7768 656e 2074 6865 unction when the\n-00141ee0: 2066 756e 6374 696f 6e20 6361 6c6c 2077 function call w\n-00141ef0: 6173 2073 7563 6365 7373 6675 6c2c 206f as successful, o\n-00141f00: 7468 6572 7769 7365 2061 206e 6f6e 2d7a therwise a non-z\n-00141f10: 6572 6f20 6572 726f 7220 636f 6465 2069 ero error code i\n-00141f20: 7320 7265 7475 726e 6564 2e20 5468 6520 s returned. The \n-00141f30: 7374 6174 7573 2065 7272 6f72 2063 6f64 status error cod\n-00141f40: 6520 6973 2061 6c73 6f20 7374 6f72 6564 e is also stored\n-00141f50: 2069 6e20 7468 6520 6375 7272 656e 7420 in the current \n-00141f60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context as soap::e\n-00142080: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e2e rror.\n-00142090: 2046 6f72 2049 4f20 616e 6420 736f 636b For IO and sock\n-001420a0: 6574 2d72 656c 6174 6564 2065 7272 6f72 et-related error\n-001420b0: 732c 2061 6c73 6f20 7468 6520 3c63 6f64 s, also the soap::errnum variab\n-00142160: 6c65 2069 7320 7365 7420 746f 2074 6865 le is set to the\n-00142170: 203c 636f 6465 3e65 7272 6e6f 3c2f 636f errno value of the\n-00142190: 2073 7973 7465 6d20 6572 726f 7220 666f system error fo\n-001421a0: 7220 6578 616d 706c 6520 7768 656e 2061 r example when a\n-001421b0: 203c 636f 6465 3e23 534f 4150 5f45 4f46 #SOAP_EOF\n-001421c0: 3c2f 636f 6465 3e20 6572 726f 7220 6f63 error oc\n-001421d0: 6375 7272 6564 2e3c 2f70 3e0a 3c70 3e54 curred.

    .

    T\n-001421e0: 6f20 6469 7370 6c61 7920 7468 6520 6572 o display the er\n-001421f0: 726f 722c 2075 7365 203c 636f 6465 3e3c ror, use <\n-00142200: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00142210: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00142220: 5f66 6175 6c74 2e68 746d 6c23 6761 3933 _fault.html#ga93\n-00142230: 3161 3461 6236 6466 3235 3533 6234 3861 1a4ab6df2553b48a\n-00142240: 3063 3237 3066 3861 3061 3838 6166 2220 0c270f8a0a88af\" \n-00142250: 7469 746c 653d 2250 7269 6e74 2065 7272 title=\"Print err\n-00142260: 6f72 206d 6573 7361 6765 206f 6e20 7468 or message on th\n-00142270: 6520 7370 6563 6966 6965 6420 6f75 7470 e specified outp\n-00142280: 7574 2e22 3e73 6f61 705f 7072 696e 745f ut.\">soap_print_\n-00142290: 6661 756c 7428 7374 7275 6374 2073 6f61 fault(struct soa\n-001422a0: 7020 2a73 6f61 702c 2046 494c 4520 2a66 p *soap, FILE *f\n-001422b0: 6429 3c2f 613e 3c2f 636f 6465 3e20 7768 d) wh\n-001422c0: 6572 6520 7468 6520 6375 7272 656e 7420 ere the current \n-001422d0: 7661 6c75 6520 6f66 203c 636f 6465 3e3c value of <\n-001422e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001422f0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00142300: 6d6c 2361 6238 3566 3564 3432 3730 3239 ml#ab85f5d427029\n-00142310: 3633 6431 3365 6135 3430 6264 3938 3736 63d13ea540bd9876\n-00142320: 6536 6432 2220 7469 746c 653d 2254 6865 e6d2\" title=\"The\n-00142330: 2073 6f61 7020 636f 6e74 6578 7420 736f soap context so\n-00142340: 6170 5f73 7461 7475 7320 2869 6e74 2920 ap_status (int) \n-00142350: 6572 726f 7220 636f 6465 206f 6620 7468 error code of th\n-00142360: 6520 6c61 7374 206f 7065 7261 7469 6f6e e last operation\n-00142370: 206f 7220 2353 4f41 505f 4f4b 2028 7a65 or #SOAP_OK (ze\n-00142380: 726f 2922 3e73 6f61 703a 3a65 7272 6f72 ro)\">soap::error\n-00142390: 3c2f 613e 3c2f 636f 6465 3e20 6973 2075 is u\n-001423a0: 7365 6420 6279 2074 6865 2066 756e 6374 sed by the funct\n-001423b0: 696f 6e20 746f 2070 7269 6e74 2074 6865 ion to print the\n-001423c0: 2065 7272 6f72 2074 6f20 7468 6520 7370 error to the sp\n-001423d0: 6563 6966 6965 6420 3c63 6f64 653e 6664 ecified fd\n-001423e0: 3c2f 636f 6465 3e20 6669 6c65 2e20 416c file. Al\n-001423f0: 7465 726e 6174 6976 656c 792c 2069 6e20 ternatively, in \n-00142400: 432b 2b20 796f 7520 6361 6e20 7573 6520 C++ you can use \n-00142410: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stream_f\n-001424b0: 6175 6c74 2873 7472 7563 7420 736f 6170 ault(struct soap\n-001424c0: 202a 736f 6170 2c20 7374 643a 3a6f 7374 *soap, std::ost\n-001424d0: 7265 616d 2661 6d70 3b20 6f73 293c 2f61 ream& os) to prin\n-001424f0: 7420 7468 6520 6572 726f 7220 6f6e 2074 t the error on t\n-00142500: 6865 2073 7065 6369 6669 6564 203c 636f he specified os out\n-00142520: 7075 7420 7374 7265 616d 2e3c 2f70 3e0a put stream.

    .\n-00142530: 3c70 3e54 6f20 6469 7370 6c61 7920 7468

    To display th\n-00142540: 6520 6c6f 6361 7469 6f6e 206f 6620 616e e location of an\n-00142550: 2058 4d4c 2070 6172 7369 6e67 2061 6e64 XML parsing and\n-00142560: 2076 616c 6964 6174 696f 6e20 6572 726f validation erro\n-00142570: 722c 2075 7365 203c 636f 6465 3e3c 6120 r, use soap_\n-00142620: 7072 696e 745f 6661 756c 745f 6c6f 6361 print_fault_loca\n-00142630: 7469 6f6e 2873 7472 7563 7420 736f 6170 tion(struct soap\n-00142640: 202a 736f 6170 2c20 4649 4c45 202a 6664 *soap, FILE *fd\n-00142650: 293c 2f61 3e3c 2f63 6f64 653e 206f 7220 ) or \n-00142660: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stream_\n-00142710: 6661 756c 745f 6c6f 6361 7469 6f6e 2873 fault_location(s\n-00142720: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-00142730: 2c20 7374 643a 3a6f 7374 7265 616d 2661 , std::ostream&a\n-00142740: 6d70 3b20 6f73 293c 2f61 3e3c 2f63 6f64 mp; os) to print part\n-00142760: 206f 6620 7468 6520 584d 4c20 7769 7468 of the XML with\n-00142770: 2074 6865 2065 7272 6f72 206c 6f63 6174 the error locat\n-00142780: 696f 6e20 6d61 726b 6564 2069 6e20 7468 ion marked in th\n-00142790: 6520 584d 4c20 6f75 7470 7574 2e3c 2f70 e XML output..

    To save the\n-001427b0: 2065 7272 6f72 2069 6e20 6120 7374 7269 error in a stri\n-001427c0: 6e67 2062 7566 6665 7220 3c63 6f64 653e ng buffer \n-001427d0: 6275 665b 302e 2e2e 6c65 6e2d 315d 3c2f buf[0...len-1], use so\n-00142880: 6170 5f73 7072 696e 745f 6661 756c 7428 ap_sprint_fault(\n-00142890: 7374 7275 6374 2073 6f61 702a 2c20 6368 struct soap*, ch\n-001428a0: 6172 202a 6275 662c 2073 697a 655f 7420 ar *buf, size_t \n-001428b0: 6c65 6e29 3c2f 613e 3c2f 636f 6465 3e2c len),\n-001428c0: 2077 6865 7265 203c 636f 6465 3e62 7566 where buf\n-001428d0: 3c2f 636f 6465 3e20 6973 2070 6f70 756c is popul\n-001428e0: 6174 6564 2077 6974 6820 7468 6520 6661 ated with the fa\n-001428f0: 756c 7420 6d65 7373 6167 6520 7465 726d ult message term\n-00142900: 696e 6174 696e 6720 7769 7468 2061 203c inating with a <\n-00142910: 636f 6465 3e5c 303c 2f63 6f64 653e 2e3c code>\\0.<\n-00142920: 2f70 3e0a 3c70 3e54 6f20 6465 7465 726d /p>.

    To determ\n-00142930: 696e 6520 7468 6520 7479 7065 206f 6620 ine the type of \n-00142940: 6572 726f 7220 7468 6174 206f 6363 7572 error that occur\n-00142950: 7265 642c 2075 7365 3a3c 2f70 3e3c 756c red, use:

    .
  • #\n-00142a30: 736f 6170 5f78 6d6c 5f65 7272 6f72 5f63 soap_xml_error_c\n-00142a40: 6865 636b 2873 6f61 705f 7374 6174 7573 heck(soap_status\n-00142a50: 2065 293c 2f61 3e3c 2f63 6f64 653e 2063 e) c\n-00142a60: 6865 636b 7320 666f 7220 584d 4c20 7061 hecks for XML pa\n-00142a70: 7273 696e 6720 616e 6420 7661 6c69 6461 rsing and valida\n-00142a80: 7469 6f6e 2065 7272 6f72 732c 2072 6574 tion errors, ret\n-00142a90: 7572 6e73 2074 7275 6520 6966 2074 6865 urns true if the\n-00142aa0: 2073 7065 6369 6669 6564 2065 7272 6f72 specified error\n-00142ab0: 2063 6f64 6520 6973 2061 6e20 584d 4c20 code is an XML \n-00142ac0: 6572 726f 722e 3c2f 6c69 3e0a 3c6c 693e error.
  • .
  • \n-00142ad0: 3c63 6f64 653e 233c 6120 636c 6173 733d #soap_s\n-00142ba0: 6f61 705f 6572 726f 725f 6368 6563 6b28 oap_error_check(\n-00142bb0: 736f 6170 5f73 7461 7475 7320 6529 3c2f soap_status e) checks\n-00142bd0: 2066 6f72 2053 4f41 5020 7072 6f74 6f63 for SOAP protoc\n-00142be0: 6f6c 2066 6175 6c74 7320 616e 6420 6572 ol faults and er\n-00142bf0: 726f 7273 2c20 7265 7475 726e 7320 7472 rors, returns tr\n-00142c00: 7565 2069 6620 7468 6520 7370 6563 6966 ue if the specif\n-00142c10: 6965 6420 6572 726f 7220 636f 6465 2069 ied error code i\n-00142c20: 7320 6120 534f 4150 2070 726f 746f 636f s a SOAP protoco\n-00142c30: 6c20 6572 726f 722e 3c2f 6c69 3e0a 3c6c l error.
  • .#soap\n-00142d10: 5f68 7474 705f 6572 726f 725f 6368 6563 _http_error_chec\n-00142d20: 6b28 736f 6170 5f73 7461 7475 7320 6529 k(soap_status e)\n-00142d30: 3c2f 613e 3c2f 636f 6465 3e20 6368 6563 chec\n-00142d40: 6b73 2066 6f72 2048 5454 5020 7072 6f74 ks for HTTP prot\n-00142d50: 6f63 6f6c 2065 7272 6f72 732c 2072 6574 ocol errors, ret\n-00142d60: 7572 6e73 2074 7275 6520 6966 2074 6865 urns true if the\n-00142d70: 2073 7065 6369 6669 6564 2065 7272 6f72 specified error\n-00142d80: 2063 6f64 6520 6973 2061 6e20 4854 5450 code is an HTTP\n-00142d90: 2070 726f 746f 636f 6c20 6572 726f 7220 protocol error \n-00142da0: 6f72 2061 2048 5454 5020 7374 6174 7573 or a HTTP status\n-00142db0: 2063 6f64 6520 6265 7477 6565 6e20 3130 code between 10\n-00142dc0: 3020 616e 6420 3539 3920 7265 7475 726e 0 and 599 return\n-00142dd0: 6564 2062 7920 616e 2048 5454 5020 7365 ed by an HTTP se\n-00142de0: 7276 6572 2e3c 2f6c 693e 0a3c 6c69 3e3c rver..
  • <\n-00142df0: 636f 6465 3e23 3c61 2063 6c61 7373 3d22 code>#soap_\n-00142eb0: 7463 705f 6572 726f 725f 6368 6563 6b28 tcp_error_check(\n-00142ec0: 736f 6170 5f73 7461 7475 7320 6529 3c2f soap_status e) checks\n-00142ee0: 2066 6f72 2054 4350 2070 726f 746f 636f for TCP protoco\n-00142ef0: 6c20 6572 726f 7273 2c20 7265 7475 726e l errors, return\n-00142f00: 7320 7472 7565 2069 6620 7468 6520 7370 s true if the sp\n-00142f10: 6563 6966 6965 6420 6572 726f 7220 636f ecified error co\n-00142f20: 6465 2069 7320 6120 5443 5020 6572 726f de is a TCP erro\n-00142f30: 722c 2077 6865 6e20 7472 7565 2075 7365 r, when true use\n-00142f40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::err\n-00142fd0: 6e75 6d3c 2f61 3e3c 2f63 6f64 653e 2074 num t\n-00142fe0: 6f20 7265 7472 6965 7665 2074 6865 203c o retrieve the <\n-00142ff0: 636f 6465 3e65 7272 6e6f 3c2f 636f 6465 code>errno value to deter\n-00143010: 6d69 6e65 2074 6865 2063 6175 7365 2e3c mine the cause.<\n-00143020: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e23 /li>.
  • #\n-00143030: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_udp_er\n-001430f0: 726f 725f 6368 6563 6b28 736f 6170 5f73 ror_check(soap_s\n-00143100: 7461 7475 7320 6529 3c2f 613e 3c2f 636f tatus e) checks for U\n-00143120: 4450 2070 726f 746f 636f 6c20 6572 726f DP protocol erro\n-00143130: 7273 2c20 7265 7475 726e 7320 7472 7565 rs, returns true\n-00143140: 2069 6620 7468 6520 7370 6563 6966 6965 if the specifie\n-00143150: 6420 6572 726f 7220 636f 6465 2069 7320 d error code is \n-00143160: 6120 5544 5020 6572 726f 722c 2077 6865 a UDP error, whe\n-00143170: 6e20 7472 7565 2075 7365 203c 636f 6465 n true use soap::errnum to retr\n-00143220: 6965 7665 2074 6865 203c 636f 6465 3e65 ieve the e\n-00143230: 7272 6e6f 3c2f 636f 6465 3e20 7661 6c75 rrno valu\n-00143240: 6520 746f 2064 6574 6572 6d69 6e65 2074 e to determine t\n-00143250: 6865 2063 6175 7365 2e3c 2f6c 693e 0a3c he cause.
  • .<\n-00143260: 6c69 3e3c 636f 6465 3e23 3c61 2063 6c61 li>#soap_ssl_\n-00143330: 6572 726f 725f 6368 6563 6b28 736f 6170 error_check(soap\n-00143340: 5f73 7461 7475 7320 6529 3c2f 613e 3c2f _status e) checks for\n-00143360: 2053 534c 2f54 4c53 2070 726f 746f 636f SSL/TLS protoco\n-00143370: 6c20 6572 726f 7273 2c20 7265 7475 726e l errors, return\n-00143380: 7320 7472 7565 2069 6620 7468 6520 7370 s true if the sp\n-00143390: 6563 6966 6965 6420 6572 726f 7220 636f ecified error co\n-001433a0: 6465 2069 7320 6120 5353 4c2f 544c 5320 de is a SSL/TLS \n-001433b0: 6572 726f 722c 2077 6865 6e20 7472 7565 error, when true\n-001433c0: 2075 7365 203c 636f 6465 3e3c 6120 636c use soap:\n-00143450: 3a65 7272 6e75 6d3c 2f61 3e3c 2f63 6f64 :errnum to retrieve t\n-00143470: 6865 203c 636f 6465 3e65 7272 6e6f 3c2f he errno value to d\n-00143490: 6574 6572 6d69 6e65 2074 6865 2063 6175 etermine the cau\n-001434a0: 7365 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f se..
  • #soap_zlib\n-00143570: 5f65 7272 6f72 5f63 6865 636b 2873 6f61 _error_check(soa\n-00143580: 705f 7374 6174 7573 2065 293c 2f61 3e3c p_status e)<\n-00143590: 2f63 6f64 653e 2063 6865 636b 7320 666f /code> checks fo\n-001435a0: 7220 7a6c 6962 206c 6962 7261 7279 2065 r zlib library e\n-001435b0: 7272 6f72 732c 2072 6574 7572 6e73 2074 rrors, returns t\n-001435c0: 7275 6520 6966 2074 6865 2073 7065 6369 rue if the speci\n-001435d0: 6669 6564 2065 7272 6f72 2063 6f64 6520 fied error code \n-001435e0: 6973 2061 207a 6c69 6220 6572 726f 722e is a zlib error.\n-001435f0: 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 3e41
  • ..

    A\n-00143600: 6e20 4854 5450 2073 7461 7475 7320 636f n HTTP status co\n-00143610: 6465 2069 7320 7265 7475 726e 6564 2077 de is returned w\n-00143620: 6865 6e20 7468 6520 636c 6965 6e74 2066 hen the client f\n-00143630: 6169 6c73 2074 6f20 636f 6e6e 6563 7420 ails to connect \n-00143640: 746f 2061 6e20 4854 5450 2073 6572 7665 to an HTTP serve\n-00143650: 7220 616e 6420 7468 6520 4854 5450 2073 r and the HTTP s\n-00143660: 6572 7665 7220 7265 7370 6f6e 7365 2077 erver response w\n-00143670: 6974 6820 616e 2065 7272 6f72 2e20 5468 ith an error. Th\n-00143680: 6520 6c69 7374 206f 6620 4854 5450 2073 e list of HTTP s\n-00143690: 7461 7475 7320 636f 6465 7320 6973 2067 tatus codes is g\n-001436a0: 6976 656e 2062 656c 6f77 3a3c 2f70 3e0a iven below:

    .\n-001436b0: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61
    Error code \n-0013e870: 203c 2f74 683e 3c74 6820 636c 6173 733d Descript\n-0013e8a0: 696f 6e20 2020 203c 2f74 683e 3c2f 7472 ion
    #SOAP\n-0013e900: 5f4f 4b3c 2f63 6f64 653e 2020 203c 2f74 _OK No error (ze\n-0013e940: 726f 2920 2020 203c 2f74 643e 3c2f 7472 ro)
    #SOA\n-0013e9a0: 505f 434c 495f 4641 554c 543c 2f63 6f64 P_CLI_FAULT The \n-0013e9e0: 7365 7276 6963 6520 7265 7475 726e 6564 service returned\n-0013e9f0: 2061 2053 4f41 5020 312e 3120 636c 6965 a SOAP 1.1 clie\n-0013ea00: 6e74 2066 6175 6c74 202f 2053 4f41 5020 nt fault / SOAP \n-0013ea10: 312e 3220 7365 6e64 6572 2066 6175 6c74 1.2 sender fault\n-0013ea20: 2074 6f20 7468 6520 636c 6965 6e74 2020 to the client \n-0013ea30: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    #SOAP\n-0013eb50: 5f44 454c 5f4d 4554 484f 443c 2f63 6f64 _DEL_METHOD An H\n-0013eb90: 5454 5020 4445 4c45 5445 2072 6571 7565 TTP DELETE reque\n-0013eba0: 7374 2077 6173 2072 6563 6569 7665 6420 st was received \n-0013ebb0: 6279 2074 6865 2073 6572 7669 6365 2062 by the service b\n-0013ebc0: 7574 2074 6865 2044 454c 4554 4520 7265 ut the DELETE re\n-0013ebd0: 7175 6573 7420 6361 6c6c 6261 636b 203c quest callback <\n-0013ebe0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n-0013ecb0: 3a66 6465 6c3c 2f61 3e3c 2f63 6f64 653e :fdel\n-0013ecc0: 2069 7320 6e6f 7420 696d 706c 656d 656e is not implemen\n-0013ecd0: 7465 642c 2073 6565 2053 6563 7469 6f6e ted, see Section\n-0013ece0: 203c 6120 636c 6173 733d 2265 6c22 2068 Functi\n-0013ed10: 6f6e 2063 616c 6c62 6163 6b73 2066 6f72 on callbacks for\n-0013ed20: 2063 7573 746f 6d69 7a65 6420 492f 4f20 customized I/O \n-0013ed30: 616e 6420 4854 5450 2068 616e 646c 696e and HTTP handlin\n-0013ed40: 673c 2f61 3e20 2020 203c 2f74 643e 3c2f g
    #SO\n-0013eda0: 4150 5f44 494d 455f 454e 443c 2f63 6f64 AP_DIME_END End \n-0013ede0: 6f66 2044 494d 4520 6174 7461 6368 6d65 of DIME attachme\n-0013edf0: 6e74 7320 7072 6f74 6f63 6f6c 2065 7272 nts protocol err\n-0013ee00: 6f72 2020 2020 3c2f 7464 3e3c 2f74 723e or
    #SOAP\n-0013ee60: 5f44 494d 455f 4552 524f 523c 2f63 6f64 _DIME_ERROR DIME\n-0013eea0: 2066 6f72 6d61 7474 696e 6720 6572 726f formatting erro\n-0013eeb0: 7220 6f72 2044 494d 4520 6174 7461 6368 r or DIME attach\n-0013eec0: 6d65 6e74 2073 697a 6520 6578 6365 6564 ment size exceed\n-0013eed0: 7320 3c63 6f64 653e 2353 4f41 505f 4d41 s #SOAP_MA\n-0013eee0: 5844 494d 4553 495a 453c 2f63 6f64 653e XDIMESIZE\n-0013eef0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_DI\n-0013ef50: 4d45 5f48 5245 463c 2f63 6f64 653e 2020 ME_HREF \n-0013ef60: 203c 2f74 643e 3c74 6420 636c 6173 733d DIME att\n-0013ef90: 6163 686d 656e 7420 6861 7320 6e6f 2068 achment has no h\n-0013efa0: 7265 6620 6672 6f6d 2053 4f41 5020 626f ref from SOAP bo\n-0013efb0: 6479 2061 6e64 206e 6f20 4449 4d45 2063 dy and no DIME c\n-0013efc0: 616c 6c62 6163 6b73 2077 6572 6520 6465 allbacks were de\n-0013efd0: 6669 6e65 6420 746f 2073 6176 6520 7468 fined to save th\n-0013efe0: 6520 6174 7461 6368 6d65 6e74 2020 2020 e attachment \n-0013eff0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    DIME ve\n-0013f090: 7273 696f 6e20 6572 726f 7220 2020 203c rsion error <\n-0013f0a0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_DUPLICA\n-0013f100: 5445 5f49 443c 2f63 6f64 653e 2020 203c TE_ID <\n-0013f110: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>XML elemen\n-0013f140: 7420 6861 7320 6475 706c 6963 6174 6520 t has duplicate \n-0013f150: 6964 2061 7474 7269 6275 7465 2076 616c id attribute val\n-0013f160: 7565 2028 6170 706c 6963 6162 6c65 2074 ue (applicable t\n-0013f170: 6f20 534f 4150 206d 756c 7469 2d72 6566 o SOAP multi-ref\n-0013f180: 2065 6e63 6f64 696e 6720 616e 6420 3c63 encoding and #SOAP_XML_GR\n-0013f1a0: 4150 483c 2f63 6f64 653e 2073 6572 6961 APH seria\n-0013f1b0: 6c69 7a61 7469 6f6e 2920 2020 203c 2f74 lization)
    #SOAP_EMPTY XM\n-0013f250: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att\n-0013f260: 7269 6275 7465 2069 7320 656d 7074 7920 ribute is empty \n-0013f270: 7768 656e 2061 2076 616c 7565 2069 7320 when a value is \n-0013f280: 7265 7175 6972 6564 2020 2020 3c2f 7464 required
    \n-0013f2e0: 2353 4f41 505f 454f 463c 2f63 6f64 653e #SOAP_EOF\n-0013f2f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Unexpe\n-0013f320: 6374 6564 2065 6e64 206f 6620 6669 6c65 cted end of file\n-0013f330: 2c20 6e6f 2069 6e70 7574 2c20 7472 616e , no input, tran\n-0013f340: 736d 6973 7369 6f6e 2069 6e74 6572 7275 smission interru\n-0013f350: 7074 6564 206f 7220 7469 6d65 6420 6f75 pted or timed ou\n-0013f360: 742c 2073 616d 6520 6173 203c 636f 6465 t, same as EOF <\n-0013f380: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_EOM Ou\n-0013f410: 7420 6f66 206d 656d 6f72 7920 2020 203c t of memory <\n-0013f420: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_ERR Sam\n-0013f4b0: 6520 6173 203c 636f 6465 3e45 4f46 3c2f e as EOF, but indic\n-0013f4d0: 6174 6573 2061 6e20 756e 7370 6563 6966 ates an unspecif\n-0013f4e0: 6965 6420 6572 726f 7220 2020 203c 2f74 ied error
    #SOAP_FAULT Th\n-0013f580: 6520 6661 756c 7420 636f 6465 2074 6f20 e fault code to \n-0013f590: 6265 2072 6574 7572 6e65 6420 6279 2061 be returned by a\n-0013f5a0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n-0013f5b0: 6f6e 2077 6865 6e20 6361 6c6c 696e 6720 on when calling \n-0013f5c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_sender_\n-0013f670: 6661 756c 743c 2f61 3e3c 2f63 6f64 653e fault\n-0013f680: 2028 636c 6965 6e74 2069 7320 6174 2066 (client is at f\n-0013f690: 6175 6c74 2920 6f72 203c 636f 6465 3e3c ault) or <\n-0013f6a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013f6b0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0013f6c0: 5f66 6175 6c74 2e68 746d 6c23 6761 3931 _fault.html#ga91\n-0013f6d0: 6463 3662 6363 3363 3566 3335 6530 3233 dc6bcc3c5f35e023\n-0013f6e0: 6237 3861 3666 3436 6137 3965 6436 2220 b78a6f46a79ed6\" \n-0013f6f0: 7469 746c 653d 2253 6574 2053 4f41 5020 title=\"Set SOAP \n-0013f700: 312e 3120 7365 7276 6572 2066 6175 6c74 1.1 server fault\n-0013f710: 202f 2053 4f41 5020 312e 3220 7265 6365 / SOAP 1.2 rece\n-0013f720: 6976 6572 2066 6175 6c74 2073 7472 696e iver fault strin\n-0013f730: 6720 616e 6420 6465 7461 696c 2e22 3e73 g and detail.\">s\n-0013f740: 6f61 705f 7265 6365 6976 6572 5f66 6175 oap_receiver_fau\n-0013f750: 6c74 3c2f 613e 3c2f 636f 6465 3e20 2873 lt (s\n-0013f760: 6572 7665 7220 6973 2061 7420 6661 756c erver is at faul\n-0013f770: 7429 2c20 636c 6965 6e74 7320 7265 6365 t), clients rece\n-0013f780: 6976 6520 7468 6520 6661 756c 7420 6173 ive the fault as\n-0013f790: 203c 636f 6465 3e23 534f 4150 5f43 4c49 #SOAP_CLI\n-0013f7a0: 5f46 4155 4c54 3c2f 636f 6465 3e20 6f72 _FAULT or\n-0013f7b0: 203c 636f 6465 3e23 534f 4150 5f53 5652 #SOAP_SVR\n-0013f7c0: 5f46 4155 4c54 3c2f 636f 6465 3e20 7265 _FAULT re\n-0013f7d0: 7370 6563 7469 7665 6c79 2020 2020 3c2f spectively
    #SOAP_FD_EXCEE\n-0013f840: 4445 443c 2f63 6f64 653e 2020 203c 2f74 DED Too many ope\n-0013f880: 6e20 736f 636b 6574 7320 2020 203c 2f74 n sockets
    #SOAP_FIXED XM\n-0013f920: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att\n-0013f930: 7269 6275 7465 2076 616c 7565 2069 7320 ribute value is \n-0013f940: 6669 7865 6420 616e 6420 7468 6520 7061 fixed and the pa\n-0013f950: 7273 6564 2076 616c 7565 2064 6f65 7320 rsed value does \n-0013f960: 6e6f 7420 6d61 7463 6820 7468 6520 6669 not match the fi\n-0013f970: 7865 6420 7661 6c75 6520 2020 203c 2f74 xed value
    #SOAP_GET_METHO\n-0013f9e0: 443c 2f63 6f64 653e 2020 203c 2f74 643e D An HTTP GET re\n-0013fa20: 7175 6573 7420 7761 7320 7265 6365 6976 quest was receiv\n-0013fa30: 6564 2062 7920 7468 6520 7365 7276 6963 ed by the servic\n-0013fa40: 6520 6275 7420 7468 6520 4745 5420 7265 e but the GET re\n-0013fa50: 7175 6573 7420 6361 6c6c 6261 636b 203c quest callback <\n-0013fa60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fge\n-0013fb30: 743c 2f61 3e3c 2f63 6f64 653e 2069 7320 t is \n-0013fb40: 6e6f 7420 696d 706c 656d 656e 7465 642c not implemented,\n-0013fb50: 2073 6565 2053 6563 7469 6f6e 7320 3c61 see Sections How to impleme\n-0013fb90: 6e74 2048 5454 5020 4745 542c 2050 5554 nt HTTP GET, PUT\n-0013fba0: 2c20 616e 6420 5041 5443 4820 7365 7276 , and PATCH serv\n-0013fbb0: 6963 6573 3c2f 613e 2061 6e64 203c 6120 ices and Function c\n-0013fbf0: 616c 6c62 6163 6b73 2066 6f72 2063 7573 allbacks for cus\n-0013fc00: 746f 6d69 7a65 6420 492f 4f20 616e 6420 tomized I/O and \n-0013fc10: 4854 5450 2068 616e 646c 696e 673c 2f61 HTTP handling
    #SOAP_\n-0013fc80: 4852 4546 3c2f 636f 6465 3e20 2020 3c2f HREF Reference t\n-0013fcc0: 6f20 6f62 6a65 6374 2069 6e20 584d 4c20 o object in XML \n-0013fcd0: 6964 656e 7469 6669 6564 2062 7920 6974 identified by it\n-0013fce0: 7320 6964 2061 7474 7269 6275 7465 2069 s id attribute i\n-0013fcf0: 7320 696e 636f 6d70 6174 6962 6c65 2077 s incompatible w\n-0013fd00: 6974 6820 7468 6520 6f62 6a65 6374 2072 ith the object r\n-0013fd10: 6566 6572 7265 6420 746f 2062 7920 7468 eferred to by th\n-0013fd20: 6520 7265 6620 6f72 2068 7265 6620 6174 e ref or href at\n-0013fd30: 7472 6962 7574 6520 2861 7070 6c69 6361 tribute (applica\n-0013fd40: 626c 6520 746f 2053 4f41 5020 6d75 6c74 ble to SOAP mult\n-0013fd50: 692d 7265 6620 656e 636f 6469 6e67 2061 i-ref encoding a\n-0013fd60: 6e64 203c 636f 6465 3e23 534f 4150 5f58 nd #SOAP_X\n-0013fd70: 4d4c 5f47 5241 5048 3c2f 636f 6465 3e20 ML_GRAPH \n-0013fd80: 7365 7269 616c 697a 6174 696f 6e29 2020 serialization) \n-0013fd90: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    An unspec\n-0013fe30: 6966 6965 6420 4854 5450 2065 7272 6f72 ified HTTP error\n-0013fe40: 206f 6363 7572 7265 6420 2020 203c 2f74 occurred
    #SOAP_HTTP_MET\n-0013feb0: 484f 443c 2f63 6f64 653e 2020 203c 2f74 HOD An HTTP requ\n-0013fef0: 6573 7420 7761 7320 7265 6365 6976 6564 est was received\n-0013ff00: 2062 7920 7468 6520 7365 7276 6963 6520 by the service \n-0013ff10: 7468 6174 2063 616e 6e6f 7420 6265 2068 that cannot be h\n-0013ff20: 616e 646c 6564 2020 2020 3c2f 7464 3e3c andled
    #S\n-0013ff80: 4f41 505f 494f 423c 2f63 6f64 653e 2020 OAP_IOB \n-0013ff90: 203c 2f74 643e 3c74 6420 636c 6173 733d SOAP arr\n-0013ffc0: 6179 2069 6e64 6578 206f 7574 206f 6620 ay index out of \n-0013ffd0: 626f 756e 6473 2020 2020 3c2f 7464 3e3c bounds
    #\n-00140030: 534f 4150 5f4c 454e 4754 483c 2f63 6f64 SOAP_LENGTH XML \n-00140070: 656c 656d 656e 7420 6f72 2061 7474 7269 element or attri\n-00140080: 6275 7465 206c 656e 6774 6820 7661 6c69 bute length vali\n-00140090: 6461 7469 6f6e 2065 7272 6f72 206f 7220 dation error or \n-001400a0: 3c63 6f64 653e 2353 4f41 505f 4d41 584c #SOAP_MAXL\n-001400b0: 454e 4754 483c 2f63 6f64 653e 2065 7863 ENGTH exc\n-001400c0: 6565 6465 6420 2020 203c 2f74 643e 3c2f eeded
    #SO\n-00140120: 4150 5f4c 4556 454c 3c2f 636f 6465 3e20 AP_LEVEL \n-00140130: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 XML nes\n-00140160: 7469 6e67 2064 6570 7468 206c 6576 656c ting depth level\n-00140170: 2065 7863 6565 6473 203c 636f 6465 3e23 exceeds #\n-00140180: 534f 4150 5f4d 4158 4c45 5645 4c3c 2f63 SOAP_MAXLEVEL
    #SO\n-001401f0: 4150 5f4d 494d 455f 454e 443c 2f63 6f64 AP_MIME_END End \n-00140230: 6f66 204d 494d 4520 6174 7461 6368 6d65 of MIME attachme\n-00140240: 6e74 7320 7072 6f74 6f63 6f6c 2065 7272 nts protocol err\n-00140250: 6f72 2020 2020 3c2f 7464 3e3c 2f74 723e or
    #SOAP_\n-001402b0: 4d49 4d45 5f45 5252 4f52 3c2f 636f 6465 MIME_ERROR MIME \n-001402f0: 6174 7461 6368 6d65 6e74 2070 6172 7369 attachment parsi\n-00140300: 6e67 2065 7272 6f72 2020 2020 3c2f 7464 ng error
    #SOAP_MIME_HREF\n-00140370: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SO\n-00140460: 4150 5f4d 4953 5349 4e47 5f49 443c 2f63 AP_MISSING_ID An\n-001404a0: 2058 4d4c 2065 6c65 6d65 6e74 2077 6974 XML element wit\n-001404b0: 6820 6964 2061 7474 7269 6275 7465 2069 h id attribute i\n-001404c0: 7320 6d69 7373 696e 6720 7468 6174 2073 s missing that s\n-001404d0: 686f 756c 6420 6d61 7463 6820 7468 6520 hould match the \n-001404e0: 656c 656d 656e 7420 7769 7468 2068 7265 element with hre\n-001404f0: 662f 7265 6620 6174 7472 6962 7574 6520 f/ref attribute \n-00140500: 2861 7070 6c69 6361 626c 6520 746f 2053 (applicable to S\n-00140510: 4f41 5020 6d75 6c74 692d 7265 6620 656e OAP multi-ref en\n-00140520: 636f 6469 6e67 2061 6e64 203c 636f 6465 coding and #SOAP_XML_GRAPH\n-00140540: 3c2f 636f 6465 3e20 7365 7269 616c 697a serializ\n-00140550: 6174 696f 6e29 2020 2020 3c2f 7464 3e3c ation)
    #\n-001405b0: 534f 4150 5f4d 4f45 3c2f 636f 6465 3e20 SOAP_MOE \n-001405c0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Memory \n-001405f0: 6f76 6572 666c 6f77 206f 7220 6d65 6d6f overflow or memo\n-00140600: 7279 2063 6f72 7275 7074 696f 6e20 6572 ry corruption er\n-00140610: 726f 7220 2861 7070 6c69 6361 626c 6520 ror (applicable \n-00140620: 696e 203c 636f 6465 3e23 4445 4255 473c in #DEBUG<\n-00140630: 2f63 6f64 653e 206d 6f64 6520 6f6e 6c79 /code> mode only\n-00140640: 2920 2020 203c 2f74 643e 3c2f 7472 3e0a )
    #SOAP_M\n-001406a0: 5553 5455 4e44 4552 5354 414e 443c 2f63 USTUNDERSTAND An\n-001406e0: 2058 4d4c 2065 6c65 6d65 6e74 2069 7320 XML element is \n-001406f0: 7072 6573 656e 7420 7769 7468 2061 206d present with a m\n-00140700: 7573 7455 6e64 6572 7374 616e 6420 6174 ustUnderstand at\n-00140710: 7472 6962 7574 6520 7768 6963 6820 6d75 tribute which mu\n-00140720: 7374 2062 6520 756e 6465 7273 746f 6f64 st be understood\n-00140730: 2062 7574 2069 7320 6e6f 7420 6465 7365 but is not dese\n-00140740: 7269 616c 697a 6564 2020 2020 3c2f 7464 rialized
    #SOAP_NAMESPACE\n-001407b0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    No data in th\n-001408b0: 6520 4854 5450 2062 6f64 7920 6f66 2074 e HTTP body of t\n-001408c0: 6865 206d 6573 7361 6765 2072 6563 6569 he message recei\n-001408d0: 7665 6420 2020 203c 2f74 643e 3c2f 7472 ved
    #SOA\n-00140930: 505f 4e4f 5f4d 4554 484f 443c 2f63 6f64 P_NO_METHOD The \n-00140970: 7365 7276 6963 6520 7265 7175 6573 7420 service request \n-00140980: 6469 7370 6174 6368 6572 2064 6964 206e dispatcher did n\n-00140990: 6f74 2066 696e 6420 6120 6d61 7463 6869 ot find a matchi\n-001409a0: 6e67 2073 6572 7669 6365 206f 7065 7261 ng service opera\n-001409b0: 7469 6f6e 2066 6f72 2061 2073 6572 7669 tion for a servi\n-001409c0: 6365 2072 6571 7565 7374 2020 2020 3c2f ce request
    #SOAP_NO_TAG
    #SOAP_\n-00140af0: 4e54 4c4d 5f45 5252 4f52 3c2f 636f 6465 NTLM_ERROR An NT\n-00140b30: 4c4d 2061 7574 6865 6e74 6963 6174 696f LM authenticatio\n-00140b40: 6e20 6861 6e64 7368 616b 6520 6572 726f n handshake erro\n-00140b50: 7220 6f63 6375 7272 6564 2020 2020 3c2f r occurred
    #SOAP_NULL XML\n-00140bf0: 2065 6c65 6d65 6e74 2068 6173 2061 6e20 element has an \n-00140c00: 3c63 6f64 653e 7873 693a 6e69 6c3c 2f63 xsi:nil attribute w\n-00140c20: 6865 6e20 7468 6520 656c 656d 656e 7420 hen the element \n-00140c30: 6973 206e 6f74 206e 696c 6c61 626c 652c is not nillable,\n-00140c40: 2063 6175 7369 6e67 2061 2076 616c 6964 causing a valid\n-00140c50: 6174 696f 6e20 6572 726f 7220 2020 203c ation error <\n-00140c60: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_OCCURS\n-00140cc0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    An HTTP \n-00140df0: 5041 5443 4820 7265 7175 6573 7420 7761 PATCH request wa\n-00140e00: 7320 7265 6365 6976 6564 2062 7920 7468 s received by th\n-00140e10: 6520 7365 7276 6963 6520 6275 7420 7468 e service but th\n-00140e20: 6520 5041 5443 4820 7265 7175 6573 7420 e PATCH request \n-00140e30: 6361 6c6c 6261 636b 203c 636f 6465 3e3c callback <\n-00140e40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00140e50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00140e60: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00140e70: 6761 3830 3861 3661 3962 3765 3664 3137 ga808a6a9b7e6d17\n-00140e80: 6530 3339 6662 3533 6135 6538 6139 6238 e039fb53a5e8a9b8\n-00140e90: 3461 2220 7469 746c 653d 2243 616c 6c62 4a\" title=\"Callb\n-00140ea0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n-00140eb0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n-00140ec0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n-00140ed0: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n-00140ee0: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque\n-00140ef0: 7374 7320 6672 6f6d 2063 6c69 656e 7473 sts from clients\n-00140f00: 2e2e 2e22 3e73 6f61 703a 3a66 7061 7463 ...\">soap::fpatc\n-00140f10: 683c 2f61 3e3c 2f63 6f64 653e 2069 7320 h is \n-00140f20: 6e6f 7420 696d 706c 656d 656e 7465 642c not implemented,\n-00140f30: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section Function c\n-00140f70: 616c 6c62 6163 6b73 2066 6f72 2063 7573 allbacks for cus\n-00140f80: 746f 6d69 7a65 6420 492f 4f20 616e 6420 tomized I/O and \n-00140f90: 4854 5450 2068 616e 646c 696e 673c 2f61 HTTP handling
    #SOAP_\n-00141000: 5041 5454 4552 4e3c 2f63 6f64 653e 2020 PATTERN \n-00141010: 203c 2f74 643e 3c74 6420 636c 6173 733d XML elem\n-00141040: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute\n-00141050: 2076 616c 7565 2070 6174 7465 726e 206d value pattern m\n-00141060: 6973 6d61 7463 6820 2020 203c 2f74 643e ismatch
    #\n-001410c0: 534f 4150 5f50 4c55 4749 4e5f 4552 524f SOAP_PLUGIN_ERRO\n-001410d0: 523c 2f63 6f64 653e 2020 203c 2f74 643e R Failed to regi\n-00141110: 7374 6572 2070 6c75 6769 6e20 2020 203c ster plugin <\n-00141120: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_PROHIB\n-00141180: 4954 4544 3c2f 636f 6465 3e20 2020 3c2f ITED XML attribu\n-001411c0: 7465 2069 7320 7072 6f68 6962 6974 6564 te is prohibited\n-001411d0: 2062 7574 2070 7265 7365 6e74 2020 2020 but present \n-001411e0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_PUT_ME\n-00141240: 5448 4f44 3c2f 636f 6465 3e20 2020 3c2f THOD An HTTP PUT\n-00141280: 2072 6571 7565 7374 2077 6173 2072 6563 request was rec\n-00141290: 6569 7665 6420 6279 2074 6865 2073 6572 eived by the ser\n-001412a0: 7669 6365 2062 7574 2074 6865 2050 5554 vice but the PUT\n-001412b0: 2072 6571 7565 7374 2063 616c 6c62 6163 request callbac\n-001412c0: 6b20 3c63 6f64 653e 3c61 2063 6c61 7373 k soap::\n-00141390: 6670 7574 3c2f 613e 3c2f 636f 6465 3e20 fput \n-001413a0: 6973 206e 6f74 2069 6d70 6c65 6d65 6e74 is not implement\n-001413b0: 6564 2c20 7365 6520 5365 6374 696f 6e20 ed, see Section \n-001413c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Functio\n-001413f0: 6e20 6361 6c6c 6261 636b 7320 666f 7220 n callbacks for \n-00141400: 6375 7374 6f6d 697a 6564 2049 2f4f 2061 customized I/O a\n-00141410: 6e64 2048 5454 5020 6861 6e64 6c69 6e67 nd HTTP handling\n-00141420: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #SO\n-00141480: 4150 5f52 4551 5549 5245 443c 2f63 6f64 AP_REQUIRED XML \n-001414c0: 6174 7472 6962 7574 6520 6973 2072 6571 attribute is req\n-001414d0: 7569 7265 6420 6275 7420 6e6f 7420 7072 uired but not pr\n-001414e0: 6573 656e 7420 2020 203c 2f74 643e 3c2f esent
    #SO\n-00141540: 4150 5f53 534c 5f45 5252 4f52 3c2f 636f AP_SSL_ERROR An \n-00141580: 5353 4c20 6572 726f 7220 6f63 6375 7272 SSL error occurr\n-00141590: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    #SOAP\n-001415f0: 5f53 5652 5f46 4155 4c54 3c2f 636f 6465 _SVR_FAULT The s\n-00141630: 6572 7669 6365 2072 6574 7572 6e65 6420 ervice returned \n-00141640: 6120 534f 4150 2031 2e31 2073 6572 7665 a SOAP 1.1 serve\n-00141650: 7220 6661 756c 7420 6f72 2053 4f41 5020 r fault or SOAP \n-00141660: 312e 3220 7265 6365 6976 6572 2066 6175 1.2 receiver fau\n-00141670: 6c74 2074 6f20 7468 6520 636c 6965 6e74 lt to the client\n-00141680: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_SY\n-001416e0: 4e54 4158 5f45 5252 4f52 3c2f 636f 6465 NTAX_ERROR An XM\n-00141720: 4c20 7379 6e74 6178 2065 7272 6f72 206f L syntax error o\n-00141730: 6363 7572 7265 6420 7768 696c 6520 7061 ccurred while pa\n-00141740: 7273 696e 6720 7468 6520 696e 7075 7420 rsing the input \n-00141750: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_TA\n-001417b0: 475f 4d49 534d 4154 4348 3c2f 636f 6465 G_MISMATCH XML e\n-001417f0: 6c65 6d65 6e74 2074 6167 2070 6172 7365 lement tag parse\n-00141800: 6420 646f 6573 206e 6f74 206d 6174 6368 d does not match\n-00141810: 2061 6e79 7468 696e 6720 7468 6174 2069 anything that i\n-00141820: 7320 6578 7065 6374 6564 2020 2020 3c2f s expected
    #SOAP_TCP_ERRO\n-00141890: 523c 2f63 6f64 653e 2020 203c 2f74 643e R A TCP/IP conne\n-001418d0: 6374 696f 6e20 6572 726f 7220 6f63 6375 ction error occu\n-001418e0: 7272 6564 2020 2020 3c2f 7464 3e3c 2f74 rred
    #SO\n-00141940: 4150 5f54 5950 453c 2f63 6f64 653e 2020 AP_TYPE \n-00141950: 203c 2f74 643e 3c74 6420 636c 6173 733d XML elem\n-00141980: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute\n-00141990: 2068 6173 2061 206d 6973 6d61 7463 6869 has a mismatchi\n-001419a0: 6e67 2074 7970 6520 6f72 2076 616c 7565 ng type or value\n-001419b0: 2074 6861 7420 6973 2063 6175 7369 6e67 that is causing\n-001419c0: 2061 2076 616c 6964 6174 696f 6e20 6572 a validation er\n-001419d0: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror
    #SOAP\n-00141a30: 5f55 4450 5f45 5252 4f52 3c2f 636f 6465 _UDP_ERROR A UDP\n-00141a70: 2f49 5020 636f 6e6e 6563 7469 6f6e 2065 /IP connection e\n-00141a80: 7272 6f72 206f 6363 7572 7265 6420 6f72 rror occurred or\n-00141a90: 2074 6865 206d 6573 7361 6765 2074 6f6f the message too\n-00141aa0: 206c 6172 6765 2074 6f20 7374 6f72 6520 large to store \n-00141ab0: 696e 2061 2055 4450 2070 6163 6b65 7420 in a UDP packet \n-00141ac0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_US\n-00141b20: 4552 5f45 5252 4f52 3c2f 636f 6465 3e20 ER_ERROR \n-00141b30: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 soap::user \n-00141c20: 6e6f 7420 7365 7420 746f 206e 6f6e 2d4e not set to non-N\n-00141c30: 554c 4c20 2020 203c 2f74 643e 3c2f 7472 ULL
    #SOAP\n-00141c90: 5f55 5446 5f45 5252 4f52 3c2f 636f 6465 _UTF_ERROR An UT\n-00141cd0: 462d 3820 6465 636f 6469 6e67 2065 7272 F-8 decoding err\n-00141ce0: 6f72 206f 6363 7572 7265 6420 2020 203c or occurred <\n-00141cf0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_VERSIO\n-00141d50: 4e4d 4953 4d41 5443 483c 2f63 6f64 653e NMISMATCH\n-00141d60: 2020 203c 2f74 643e 3c74 6420 636c 6173 SOAP v\n-00141d90: 6572 7369 6f6e 206d 6973 6d61 7463 6820 ersion mismatch \n-00141da0: 6f72 206e 6f20 534f 4150 206d 6573 7361 or no SOAP messa\n-00141db0: 6765 2069 7320 7265 6365 6976 6564 2020 ge is received \n-00141dc0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    A zlib er\n-00141e60: 726f 7220 6f63 6375 7272 6564 2020 203c ror occurred <\n-00141e70: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>
    ..C\n-00143710: 6f64 6520 2020 3c2f 7468 3e3c 7468 2063 ode ......\n-001438f0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n-00143940: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-001439b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001439c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001439d0: 3e32 3034 2020 203c 2f74 643e 3c74 6420 >204 ........\n-00143c10: 3c74 6420 636c 6173 733d 226d 6172 6b64 .....<\n-00143d60: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00143d70: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-00143d80: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n-00143dd0: 4e6f 7420 4d6f 6469 6669 6564 2020 2020 Not Modified \n-00143de0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ....<\n-00143f00: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...<\n-00143f90: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00143fa0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-00143fb0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n-00144000: 556e 6175 7468 6f72 697a 6564 2020 2020 Unauthorized \n-00144010: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ........4\n-00144200: 3035 2020 203c 2f74 643e 3c74 6420 636c 05 ..\n-00144290: 3430 3620 2020 3c2f 7464 3e3c 7464 2063 406 ....\n-00144400: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....<\n-001444b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001444c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001444d0: 3e34 3130 2020 203c 2f74 643e 3c74 6420 >410 \n-00144510: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n-00144560: 3c74 6420 636c 6173 733d 226d 6172 6b64 .\n-001445a0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-001445c0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n-00144610: 5072 6563 6f6e 6469 7469 6f6e 2046 6169 Precondition Fai\n-00144620: 6c65 6420 2020 203c 2f74 643e 3c2f 7472 led ......\n-00144780: 3c74 6420 636c 6173 733d 226d 6172 6b64 U\n-001447d0: 6e73 7570 706f 7274 6564 204d 6564 6961 nsupported Media\n-001447e0: 2054 7970 6520 2020 203c 2f74 643e 3c2f Type ..........\n-00144ad0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n-00144b20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......

    HTTP sta\n-00144ca0: 7475 7320 636f 6465 2032 3030 2069 7320 tus code 200 is \n-00144cb0: 6e6f 7420 666c 6167 6765 6420 6173 2061 not flagged as a\n-00144cc0: 6e20 6572 726f 7220 6279 2074 6865 2065 n error by the e\n-00144cd0: 6e67 696e 652e 2053 7461 7475 7320 636f ngine. Status co\n-00144ce0: 6465 7320 3230 3120 616e 6420 3230 3220 des 201 and 202 \n-00144cf0: 6172 6520 696e 666f 726d 6174 6976 6520 are informative \n-00144d00: 616e 6420 7368 6f75 6c64 206e 6f74 2062 and should not b\n-00144d10: 6520 636f 6e73 6964 6572 6564 2065 7272 e considered err\n-00144d20: 6f72 7320 6279 2074 6865 2061 7070 6c69 ors by the appli\n-00144d30: 6361 7469 6f6e 206c 6f67 6963 2e3c 2f70 cation logic..

    Server-side\n-00144d50: 2069 6d70 6c65 6d65 6e74 6174 696f 6e73 implementations\n-00144d60: 206f 6620 7365 7276 6963 6520 6f70 6572 of service oper\n-00144d70: 6174 696f 6e73 2073 686f 756c 6420 7265 ations should re\n-00144d80: 7475 726e 203c 636f 6465 3e23 534f 4150 turn #SOAP\n-00144d90: 5f4f 4b3c 2f63 6f64 653e 2077 6865 6e20 _OK when \n-00144da0: 7468 6520 6f70 6572 6174 696f 6e20 7761 the operation wa\n-00144db0: 7320 7375 6363 6573 7366 756c 2c20 7768 s successful, wh\n-00144dc0: 6963 6820 7265 7475 726e 7320 6120 2232 ich returns a \"2\n-00144dd0: 3030 204f 4b22 2048 5454 5020 6865 6164 00 OK\" HTTP head\n-00144de0: 6572 2077 6974 6820 7468 6520 584d 4c20 er with the XML \n-00144df0: 7265 7370 6f6e 7365 206d 6573 7361 6765 response message\n-00144e00: 2e20 5365 7276 6572 2d73 6964 6520 696d . Server-side im\n-00144e10: 706c 656d 656e 7461 7469 6f6e 7320 6f66 plementations of\n-00144e20: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n-00144e30: 6f6e 7320 696e 2067 534f 4150 206d 6179 ons in gSOAP may\n-00144e40: 2064 6972 6563 746c 7920 7265 7475 726e directly return\n-00144e50: 2061 6e20 4854 5450 2073 7461 7475 7320 an HTTP status \n-00144e60: 636f 6465 2077 6865 6e20 616e 2048 5454 code when an HTT\n-00144e70: 502d 7265 6c61 7465 6420 6572 726f 7220 P-related error \n-00144e80: 7368 6f75 6c64 2062 6520 7265 7475 726e should be return\n-00144e90: 6564 2e20 466f 7220 6578 616d 706c 652c ed. For example,\n-00144ea0: 203c 636f 6465 3e72 6574 7572 6e20 3430 return 40\n-00144eb0: 343c 2f63 6f64 653e 2072 6574 7572 6e73 4 returns\n-00144ec0: 2022 3430 3420 4e6f 7420 466f 756e 6422 \"404 Not Found\"\n-00144ed0: 2074 6f20 7468 6520 636c 6965 6e74 2061 to the client a\n-00144ee0: 6e64 2074 6865 203c 636f 6465 3e3c 6120 nd the soap::error variab\n-00144fb0: 6c65 2069 7320 7365 7420 746f 2034 3034 le is set to 404\n-00144fc0: 2061 7420 7468 6520 636c 6965 6e74 2073 at the client s\n-00144fd0: 6964 652e 3c2f 703e 0a3c 703e 546f 2072 ide.

    .

    To r\n-00144fe0: 6574 7572 6e20 6120 534f 4150 2046 6175 eturn a SOAP Fau\n-00144ff0: 6c74 2066 726f 6d20 6120 7365 7276 6572 lt from a server\n-00145000: 2d73 6964 6520 696d 706c 656d 656e 7461 -side implementa\n-00145010: 7469 6f6e 206f 6620 6120 7365 7276 6963 tion of a servic\n-00145020: 6520 6f70 6572 6174 696f 6e2c 2075 7365 e operation, use\n-00145030: 206f 6e65 206f 6620 7468 6520 666f 6c6c one of the foll\n-00145040: 6f77 696e 6720 6675 6e63 7469 6f6e 7320 owing functions \n-00145050: 746f 2070 6f70 756c 6174 6520 7468 6520 to populate the \n-00145060: 534f 4150 2046 6175 6c74 206d 6573 7361 SOAP Fault messa\n-00145070: 6765 3a3c 2f70 3e3c 756c 3e0a 3c6c 693e ge:

    .

    A\n-00145950: 2072 6563 6569 7665 7220 6572 726f 7220 receiver error \n-00145960: 696e 6469 6361 7465 7320 7468 6174 2074 indicates that t\n-00145970: 6865 2073 6572 7669 6365 2063 6f75 6c64 he service could\n-00145980: 206e 6f74 2068 616e 646c 6520 7468 6520 not handle the \n-00145990: 636c 6965 6e74 2072 6571 7565 7374 2c20 client request, \n-001459a0: 6275 7420 6974 2063 616e 2070 6f73 7369 but it can possi\n-001459b0: 626c 7920 7265 636f 7665 7220 6672 6f6d bly recover from\n-001459c0: 2074 6865 2065 7272 6f72 206c 6174 6572 the error later\n-001459d0: 2c20 666f 7220 6578 616d 706c 6520 7768 , for example wh\n-001459e0: 656e 2072 6573 6f75 7263 6573 2061 7265 en resources are\n-001459f0: 2074 656d 706f 7261 7269 6c79 2075 6e61 temporarily una\n-00145a00: 7661 696c 6162 6c65 2e20 4120 7365 6e64 vailable. A send\n-00145a10: 6572 2065 7272 6f72 2069 6e64 6963 6174 er error indicat\n-00145a20: 6573 2074 6861 7420 7468 6520 636c 6965 es that the clie\n-00145a30: 6e74 2072 6571 7565 7374 2069 7320 6661 nt request is fa\n-00145a40: 756c 7479 2061 6e64 2073 2072 656a 6563 ulty and s rejec\n-00145a50: 7465 6420 6279 2074 6865 2073 6572 7669 ted by the servi\n-00145a60: 6365 2e3c 2f70 3e0a 3c70 3e53 6565 2053 ce.

    .

    See S\n-00145a70: 6563 7469 6f6e 203c 6120 636c 6173 733d ection SOA\n-00145aa0: 5020 4661 756c 7420 7072 6f63 6573 7369 P Fault processi\n-00145ab0: 6e67 3c2f 613e 2066 6f72 206d 6f72 6520 ng for more \n-00145ac0: 6465 7461 696c 7320 6f6e 2068 6f77 2074 details on how t\n-00145ad0: 6f20 7573 6520 7468 6573 6520 6675 6e63 o use these func\n-00145ae0: 7469 6f6e 732e 3c2f 703e 0a3c 703e f09f tions.

    .

    ..\n-00145af0: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B\n-00145b00: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of \n-00145b10: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    \n-00145b20: 0a3c 6831 3e3c 6120 636c 6173 733d 2261 .

    .Memory m\n-00145b50: 616e 6167 656d 656e 743c 2f68 313e 0a3c anagement

    .<\n-00145b60: 703e 4d65 6d6f 7279 206d 616e 6167 656d p>Memory managem\n-00145b70: 656e 7420 7769 7468 2067 534f 4150 2069 ent with gSOAP i\n-00145b80: 7320 6175 746f 6d61 7469 632e 2054 6865 s automatic. The\n-00145b90: 2065 6e67 696e 6520 636f 6e74 6578 7420 engine context \n-00145ba0: 6d61 6e61 6765 7320 616c 6c20 6d65 6d6f manages all memo\n-00145bb0: 7279 2061 6c6c 6f63 6174 6564 2074 6f20 ry allocated to \n-00145bc0: 7365 7269 616c 697a 6520 6461 7461 2061 serialize data a\n-00145bd0: 6e64 2066 6f72 2074 656d 706f 7261 7279 nd for temporary\n-00145be0: 2073 746f 7261 6765 2e20 4465 7365 7269 storage. Deseri\n-00145bf0: 616c 697a 6564 2064 6174 6120 6973 2061 alized data is a\n-00145c00: 6c6c 6f63 6174 6564 2069 6e20 6d61 6e61 llocated in mana\n-00145c10: 6765 6420 6d65 6d6f 7279 2061 6e64 2064 ged memory and d\n-00145c20: 6174 6120 7374 7275 6374 7572 6573 2063 ata structures c\n-00145c30: 616e 2062 6520 616c 6c6f 6361 7465 6420 an be allocated \n-00145c40: 696e 206d 616e 6167 6564 206d 656d 6f72 in managed memor\n-00145c50: 7920 6279 2074 6865 2075 7365 7220 7768 y by the user wh\n-00145c60: 656e 2064 6573 6972 6564 2075 7369 6e67 en desired using\n-00145c70: 203c 636f 6465 3e73 6f61 705f 6e65 775f soap_new_\n-00145c80: 543c 2f63 6f64 653e 2066 756e 6374 696f T functio\n-00145c90: 6e73 2067 656e 6572 6174 6564 2062 7920 ns generated by \n-00145ca0: 736f 6170 6370 7032 2066 6f72 2065 6163 soapcpp2 for eac\n-00145cb0: 6820 7365 7269 616c 697a 6162 6c65 2074 h serializable t\n-00145cc0: 7970 6520 3c63 6f64 653e 543c 2f63 6f64 ype T. All memory m\n-00145ce0: 616e 6167 6564 2062 7920 6120 636f 6e74 anaged by a cont\n-00145cf0: 6578 7420 6973 2064 6561 6c6c 6f63 6174 ext is deallocat\n-00145d00: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with soa\n-00145dc0: 705f 6465 7374 726f 793c 2f61 3e3c 2f63 p_destroy to destroy \n-00145de0: 6d61 6e61 6765 6420 432b 2b20 6f62 6a65 managed C++ obje\n-00145df0: 6374 7320 616e 6420 3c63 6f64 653e 3c61 cts and soap_end to delete \n-00145ee0: 616c 6c20 6f74 6865 7220 6d61 6e61 6765 all other manage\n-00145ef0: 6420 6461 7461 2e20 5768 656e 2061 2063 d data. When a c\n-00145f00: 6f6e 7465 7874 2069 7320 6669 6e61 6c69 ontext is finali\n-00145f10: 7a65 6420 6f72 2066 7265 6564 2077 6974 zed or freed wit\n-00145f20: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap\n-00145ff0: 5f64 6f6e 6528 7374 7275 6374 2073 6f61 _done(struct soa\n-00146000: 702a 293c 2f61 3e3c 2f63 6f64 653e 2061 p*) a\n-00146010: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap_fr\n-001460c0: 6565 2873 7472 7563 7420 736f 6170 2a29 ee(struct soap*)\n-001460d0: 3c2f 613e 3c2f 636f 6465 3e20 7468 656e then\n-001460e0: 206d 616e 6167 6564 206d 656d 6f72 7920 managed memory \n-001460f0: 6973 206e 6f74 2072 656c 6561 7365 642c is not released,\n-00146100: 2073 6f20 6974 2069 7320 696d 706f 7274 so it is import\n-00146110: 616e 7420 746f 2063 616c 6c20 7468 6520 ant to call the \n-00146120: 6465 616c 6c6f 6361 7469 6f6e 2066 756e deallocation fun\n-00146130: 6374 696f 6e73 2066 6972 7374 2e20 5468 ctions first. Th\n-00146140: 6973 2077 6173 2064 6f6e 6520 746f 2061 is was done to a\n-00146150: 6c6c 6f77 206d 616e 6167 6564 2064 6174 llow managed dat\n-00146160: 6120 746f 206f 7574 6c69 7665 2074 6865 a to outlive the\n-00146170: 2063 6f6e 7465 7874 2c20 7375 6368 2061 context, such a\n-00146180: 7320 6465 7365 7269 616c 697a 6564 206f s deserialized o\n-00146190: 626a 6563 7473 2c20 6275 7420 7468 6973 bjects, but this\n-001461a0: 2069 7320 7261 7265 6c79 2069 6620 6576 is rarely if ev\n-001461b0: 6572 2075 7365 6420 6265 6361 7573 6520 er used because \n-001461c0: 6465 6c65 7469 6e67 2074 6865 206f 7574 deleting the out\n-001461d0: 6c69 7665 6420 6461 7461 2065 7870 6c69 lived data expli\n-001461e0: 6369 746c 7920 6973 2070 726f 6e65 2074 citly is prone t\n-001461f0: 6f20 6d69 7374 616b 6573 2e3c 2f70 3e0a o mistakes.

    .\n-00146200: 3c70 3e49 6620 796f 7520 7761 6e74 2074

    If you want t\n-00146210: 6f20 6c65 7420 6465 7365 7269 616c 697a o let deserializ\n-00146220: 6564 2064 6174 6120 6f75 746c 6976 6520 ed data outlive \n-00146230: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap context that\n-001462a0: 2079 6f75 2061 7265 2061 626f 7574 2074 you are about t\n-001462b0: 6f20 6672 6565 2c20 7468 656e 2079 6f75 o free, then you\n-001462c0: 2063 616e 2064 656c 6567 6174 6520 6d61 can delegate ma\n-001462d0: 6e61 6765 6d65 6e74 206f 6620 7468 6520 nagement of the \n-001462e0: 6461 7461 2074 6f20 616e 6f74 6865 7220 data to another \n-001462f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with <\n-00146360: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_de\n-00146430: 6c65 6761 7465 5f64 656c 6574 696f 6e28 legate_deletion(\n-00146440: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00146450: 705f 6672 6f6d 2c20 7374 7275 6374 2073 p_from, struct s\n-00146460: 6f61 7020 2a73 6f61 705f 746f 293c 2f61 oap *soap_to). This m\n-00146480: 6f76 6573 2061 6c6c 2064 6573 6572 6961 oves all deseria\n-00146490: 6c69 7a65 6420 616e 6420 7465 6d70 6f72 lized and tempor\n-001464a0: 6172 7920 6461 7461 2074 6f20 7468 6520 ary data to the \n-001464b0: 6f74 6865 7220 3c63 6f64 653e 3c61 2063 other soap\n-00146510: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n-00146520: 3c63 6f64 653e 736f 6170 5f74 6f3c 2f63 soap_to, which will\n-00146540: 2064 656c 6574 6520 6974 7320 6461 7461 delete its data\n-00146550: 2061 6e64 2061 6c6c 2074 6865 2064 656c and all the del\n-00146560: 6567 6174 6564 2064 6174 6120 6974 2069 egated data it i\n-00146570: 7320 7265 7370 6f6e 7369 626c 6520 666f s responsible fo\n-00146580: 7220 7768 656e 2079 6f75 2063 616c 6c20 r when you call \n-00146590: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_destro\n-00146650: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and\n-00146660: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n-00146730: 656e 643c 2f61 3e3c 2f63 6f64 653e 2e20 end. \n-00146740: 5468 6973 2063 616e 2062 6520 7061 7274 This can be part\n-00146750: 6963 756c 6172 6c79 2075 7365 6675 6c20 icularly useful \n-00146760: 666f 7220 6d61 6b69 6e67 2063 6c69 656e for making clien\n-00146770: 7420 6361 6c6c 7320 696e 7369 6465 2061 t calls inside a\n-00146780: 2073 6572 7665 7220 6f70 6572 6174 696f server operatio\n-00146790: 6e2c 2069 2e65 2e20 6120 6d69 7865 6420 n, i.e. a mixed \n-001467a0: 7365 7276 6572 2061 6e64 2063 6c69 656e server and clien\n-001467b0: 742e 2054 6865 2063 6c69 656e 7420 6361 t. The client ca\n-001467c0: 6c6c 2069 6e73 6964 6520 7468 6520 7365 ll inside the se\n-001467d0: 7276 6572 206f 7065 7261 7469 6f6e 2072 rver operation r\n-001467e0: 6571 7569 7265 7320 6120 6e65 7720 3c63 equires a new \n-00146840: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n-00146850: 636f 6e74 6578 742c 2065 2e67 2e20 636f context, e.g. co\n-00146860: 7069 6564 2066 726f 6d20 7468 6520 7365 pied from the se\n-00146870: 7276 6572 2773 2077 6974 6820 3c63 6f64 rver's with soa\n-00146930: 705f 636f 7079 3c2f 613e 3c2f 636f 6465 p_copy. Before destro\n-00146950: 7969 6e67 2074 6865 2063 6c69 656e 7420 ying the client \n-00146960: 636f 6e74 6578 7420 7769 7468 203c 636f context with soap_free\n-00146a20: 3c2f 636f 6465 3e2c 2074 6865 2064 6174 , the dat\n-00146a30: 6120 6361 6e20 6265 2064 656c 6567 6174 a can be delegat\n-00146a40: 6564 2074 6f20 7468 6520 7365 7276 6572 ed to the server\n-00146a50: 2773 2063 6f6e 7465 7874 2077 6974 6820 's context with \n-00146a60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n-00146b30: 656c 6567 6174 655f 6465 6c65 7469 6f6e elegate_deletion\n-00146b40: 3c2f 613e 3c2f 636f 6465 3e2e 2053 6565 . See\n-00146b50: 2066 6f72 2065 7861 6d70 6c65 203c 656d for example gsoap/sam\n-00146b70: 706c 6573 2f6d 6173 6875 702f 6d61 7368 ples/mashup/mash\n-00146b80: 7570 7365 7276 6572 2e63 3c2f 636f 6465 upserver.c in the gS\n-00146ba0: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code \n-00146bb0: 7061 636b 6167 652e 3c2f 703e 0a3c 703e package.

    .

    \n-00146bc0: 5468 6520 6675 6e63 7469 6f6e 7320 7265 The functions re\n-00146bd0: 6c61 7465 6420 746f 206d 656d 6f72 7920 lated to memory \n-00146be0: 6d61 6e61 6765 6d65 6e74 2062 7920 7468 management by th\n-00146bf0: 6520 636f 6e74 6578 7420 6172 653a 3c2f e context are:.

    .To help underst\n-00148180: 616e 6420 7468 6520 6469 6666 6572 656e and the differen\n-00148190: 6365 7320 6265 7477 6565 6e20 6d61 6e61 ces between mana\n-001481a0: 6765 6420 6f62 6a65 6374 732c 206d 616e ged objects, man\n-001481b0: 6167 6564 2064 6174 612c 2061 6e64 206d aged data, and m\n-001481c0: 616e 6167 6564 2074 656d 706f 7261 7279 anaged temporary\n-001481d0: 2064 6174 613a 2074 656d 706f 7261 7279 data: temporary\n-001481e0: 2064 6174 6120 6973 2063 7265 6174 6564 data is created\n-001481f0: 2062 7920 7468 6520 656e 6769 6e65 2074 by the engine t\n-00148200: 6f20 6b65 6570 2074 7261 636b 206f 6620 o keep track of \n-00148210: 7468 696e 6773 2c20 7375 6368 2061 7320 things, such as \n-00148220: 6861 7368 2074 6162 6c65 7320 746f 206b hash tables to k\n-00148230: 6565 7020 706f 696e 7465 7220 7265 6665 eep pointer refe\n-00148240: 7265 6e63 6520 696e 666f 726d 6174 696f rence informatio\n-00148250: 6e20 666f 7220 7365 7269 616c 697a 6174 n for serializat\n-00148260: 696f 6e20 616e 6420 6861 7368 2074 6162 ion and hash tab\n-00148270: 6c65 7320 746f 206b 6565 7020 584d 4c20 les to keep XML \n-00148280: 6964 2f68 7265 6620 696e 666f 726d 6174 id/href informat\n-00148290: 696f 6e20 666f 7220 6d75 6c74 692d 7265 ion for multi-re\n-001482a0: 6665 7265 6e63 6520 6f62 6a65 6374 2064 ference object d\n-001482b0: 6573 6572 6961 6c69 7a61 7469 6f6e 2e20 eserialization. \n-001482c0: 4465 7365 7269 616c 697a 6564 2064 6174 Deserialized dat\n-001482d0: 6120 6973 2061 6c6c 6f63 6174 6564 2062 a is allocated b\n-001482e0: 7920 7468 6520 636f 6e74 6578 7420 696e y the context in\n-001482f0: 206d 616e 6167 6564 206d 656d 6f72 7920 managed memory \n-00148300: 7768 656e 2063 6f6e 7374 7275 6374 696e when constructin\n-00148310: 6720 6461 7461 2073 7472 7563 7475 7265 g data structure\n-00148320: 7320 6279 2064 6573 6572 6961 6c69 7a69 s by deserializi\n-00148330: 6e67 2058 4d4c 2061 6e64 204a 534f 4e20 ng XML and JSON \n-00148340: 6d65 7373 6167 6573 2e20 4461 7461 2069 messages. Data i\n-00148350: 7320 7374 6f72 6564 2069 6e20 6d65 6d6f s stored in memo\n-00148360: 7279 206d 616e 6167 6564 2062 7920 7468 ry managed by th\n-00148370: 6520 636f 6e74 6578 7420 7573 696e 6720 e context using \n-00148380: 6361 6c6c 7320 746f 203c 636f 6465 3e3c calls to <\n-00148390: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001483a0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001483b0: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-001483c0: 6261 3535 3637 3130 6530 3130 6665 6562 ba556710e010feeb\n-001483d0: 3232 3131 6564 3433 6235 6266 3035 3963 2211ed43b5bf059c\n-001483e0: 2220 7469 746c 653d 2241 6c6c 6f63 6174 \" title=\"Allocat\n-001483f0: 6520 6120 626c 6f63 6b20 6f66 2068 6561 e a block of hea\n-00148400: 7020 6d65 6d6f 7279 206d 616e 6167 6564 p memory managed\n-00148410: 2062 7920 7468 6520 7370 6563 6966 6965 by the specifie\n-00148420: 6420 736f 6170 2063 6f6e 7465 7874 2e22 d soap context.\"\n-00148430: 3e73 6f61 705f 6d61 6c6c 6f63 3c2f 613e >soap_malloc\n-00148440: 3c2f 636f 6465 3e20 746f 2061 6c6c 6f63 to alloc\n-00148450: 6174 6520 6865 6170 2073 7061 6365 2077 ate heap space w\n-00148460: 6974 6820 3c63 6f64 653e 6d61 6c6c 6f63 ith malloc\n-00148470: 3c2f 636f 6465 3e2e 2041 2074 696e 7920 . A tiny \n-00148480: 6269 7420 6d6f 7265 2073 7061 6365 2069 bit more space i\n-00148490: 7320 616c 6c6f 6361 7465 6420 746f 206b s allocated to k\n-001484a0: 6565 7020 7472 6163 6b20 6f66 2074 6865 eep track of the\n-001484b0: 2061 6c6c 6f63 6174 696f 6e73 2061 6e64 allocations and\n-001484c0: 2074 6f20 6164 6420 6120 2263 616e 6172 to add a \"canar\n-001484d0: 7922 2077 6f72 6420 746f 2064 6574 6563 y\" word to detec\n-001484e0: 7420 6865 6170 206d 656d 6f72 7920 6f76 t heap memory ov\n-001484f0: 6572 666c 6f77 732e 2048 6561 7020 6d65 erflows. Heap me\n-00148500: 6d6f 7279 206f 7665 7266 6c6f 7773 2061 mory overflows a\n-00148510: 7265 2064 6574 6563 7465 6420 7768 656e re detected when\n-00148520: 2063 6f6e 7465 7874 2d6d 616e 6167 6564 context-managed\n-00148530: 2064 6174 6120 6973 2064 6561 6c6c 6f63 data is dealloc\n-00148540: 6174 6564 2077 6974 6820 3c63 6f64 653e ated with \n-00148550: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end\n-00148620: 3c2f 636f 6465 3e2e 2043 2b2b 206f 626a . C++ obj\n-00148630: 6563 7473 2061 7265 2061 6c6c 6f63 6174 ects are allocat\n-00148640: 6564 2077 6974 6820 3c63 6f64 653e 6e65 ed with ne\n-00148650: 773c 2f63 6f64 653e 2069 6e73 7465 6164 w instead\n-00148660: 206f 6620 3c63 6f64 653e 6d61 6c6c 6f63 of malloc\n-00148670: 3c2f 636f 6465 3e20 616e 6420 6172 6520 and are \n-00148680: 7472 6163 6b65 6420 6173 2077 656c 6c2e tracked as well.\n-00148690: 2054 6865 7365 206f 626a 6563 7473 2061 These objects a\n-001486a0: 7265 2064 6561 6c6c 6f63 6174 6564 2077 re deallocated w\n-001486b0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_de\n-00148770: 7374 726f 793c 2f61 3e3c 2f63 6f64 653e stroy\n-00148780: 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 7468 .

    .

    When th\n-00148790: 6520 6753 4f41 5020 6170 706c 6963 6174 e gSOAP applicat\n-001487a0: 696f 6e20 6973 2063 6f6d 7069 6c65 6420 ion is compiled \n-001487b0: 7769 7468 203c 623e 3c63 6f64 653e 2d44 with -D\n-001487c0: 4445 4255 473c 2f63 6f64 653e 3c2f 623e DEBUG\n-001487d0: 2075 7369 6e67 2074 6865 2063 6f6d 7069 using the compi\n-001487e0: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #DEBUG\n-00148800: 2c20 7468 6520 656e 6769 6e65 2072 6570 , the engine rep\n-00148810: 6f72 7473 206d 656d 6f72 7920 6c65 616b orts memory leak\n-00148820: 7320 7768 6963 6820 6172 6520 6465 7465 s which are dete\n-00148830: 6374 6564 2062 7920 3c63 6f64 653e 3c61 cted by soap_done<\n-00148910: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_free. To improv\n-001489e0: 6520 7468 6520 6163 6375 7261 6379 206f e the accuracy o\n-001489f0: 6620 6465 7465 6374 696f 6e2c 206e 6f20 f detection, no \n-00148a00: 6d65 6d6f 7279 2069 7320 6163 7475 616c memory is actual\n-00148a10: 6c79 2066 7265 6564 2075 6e74 696c 203c ly freed until <\n-00148a20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_do\n-00148af0: 6e65 3c2f 613e 3c2f 636f 6465 3e20 6f72 ne or\n-00148b00: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_free\n-00148bb0: 3c2f 613e 3c2f 636f 6465 3e20 6172 6520 are \n-00148bc0: 6361 6c6c 6564 2074 6f20 6465 7465 6374 called to detect\n-00148bd0: 206d 656d 6f72 7920 6973 7375 6573 2c20 memory issues, \n-00148be0: 736f 2061 6e79 2063 616c 6c73 2074 6f20 so any calls to \n-00148bf0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_destro\n-00148cb0: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and\n-00148cc0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n-00148d90: 656e 643c 2f61 3e3c 2f63 6f64 653e 2061 end a\n-00148da0: 7265 2061 6374 7561 6c6c 7920 6465 6665 re actually defe\n-00148db0: 7272 6564 2074 6f20 6265 2065 7865 6375 rred to be execu\n-00148dc0: 7465 6420 7768 656e 2074 6865 2063 6f6e ted when the con\n-00148dd0: 7465 7874 2066 696e 616c 697a 6573 2e3c text finalizes.<\n-00148de0: 2f70 3e0a 3c70 3e57 6869 6c65 206d 656d /p>.

    While mem\n-00148df0: 6f72 7920 6d61 6e61 6765 6d65 6e74 2069 ory management i\n-00148e00: 6e20 6753 4f41 5020 6973 2061 7574 6f6d n gSOAP is autom\n-00148e10: 6174 6963 2c20 6974 2064 6f65 7320 6e6f atic, it does no\n-00148e20: 7420 656e 666f 7263 6520 6974 7320 6f77 t enforce its ow\n-00148e30: 6e20 6d65 6d6f 7279 206d 616e 6167 656d n memory managem\n-00148e40: 656e 7420 706f 6c69 6379 206f 6e20 7468 ent policy on th\n-00148e50: 6520 7573 6572 2e20 546f 206d 6f76 6520 e user. To move \n-00148e60: 6d61 6e61 6765 6420 6f62 6a65 6374 7320 managed objects \n-00148e70: 616e 6420 6461 7461 2069 6e74 6f20 756e and data into un\n-00148e80: 6d61 6e61 6765 6420 6865 6170 2073 7061 managed heap spa\n-00148e90: 6365 2c20 7468 6520 3c63 6f64 653e 736f ce, the so\n-00148ea0: 6170 5f64 7570 5f54 3c2f 636f 6465 3e20 ap_dup_T \n-00148eb0: 6465 6570 2063 6f70 7920 6675 6e63 7469 deep copy functi\n-00148ec0: 6f6e 7320 6765 6e65 7261 7465 6420 6279 ons generated by\n-00148ed0: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp\n-00148ee0: 7032 202d 4563 3c2f 636f 6465 3e3c 2f62 p2 -Ec option -Ec\n-00148f10: 2063 616e 2062 6520 7573 6564 2e20 546f can be used. To\n-00148f20: 2064 656c 6574 6520 6465 6570 2063 6f70 delete deep cop\n-00148f30: 6965 732c 2074 6865 203c 636f 6465 3e73 ies, the s\n-00148f40: 6f61 705f 6465 6c5f 543c 2f63 6f64 653e oap_del_T\n-00148f50: 2064 6565 7020 6465 6c65 7469 6f6e 2066 deep deletion f\n-00148f60: 756e 6374 696f 6e73 2067 656e 6572 6174 unctions generat\n-00148f70: 6564 2062 7920 3c62 3e3c 636f 6465 3e73 ed by s\n-00148f80: 6f61 7063 7070 3220 2d45 643c 2f63 6f64 oapcpp2 -Ed option -Ed can be use\n-00148fc0: 642e 2041 6674 6572 2063 6f70 7969 6e67 d. After copying\n-00148fd0: 2074 6865 2075 7375 616c 203c 636f 6465 the usual \n-00149090: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy\n-001490a0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap_end functi\n-00149190: 6f6e 7320 7265 6d6f 7665 2074 6865 206d ons remove the m\n-001491a0: 616e 6167 6564 206f 7269 6769 6e61 6c73 anaged originals\n-001491b0: 2e20 5365 6520 616c 736f 2053 6563 7469 . See also Secti\n-001491c0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Generati\n-001491f0: 6e67 2064 6565 7020 636f 7079 2061 6e64 ng deep copy and\n-00149200: 2064 656c 6574 696f 6e20 6675 6e63 7469 deletion functi\n-00149210: 6f6e 733c 2f61 3e2e 3c2f 703e 0a3c 703e ons.

    .

    \n-00149220: 4675 7274 6865 726d 6f72 652c 2074 6865 Furthermore, the\n-00149230: 206d 656d 6f72 7920 616c 6c6f 6361 7469 memory allocati\n-00149240: 6f6e 2066 756e 6374 696f 6e73 203c 636f on functions malloc\n-00149260: 2061 6e64 203c 636f 6465 3e6e 6577 3c2f and new used by th\n-00149280: 6520 656e 6769 6e65 2069 6e74 6572 6e61 e engine interna\n-00149290: 6c6c 7920 6361 6e20 6265 2072 6570 6c61 lly can be repla\n-001492a0: 6365 6420 7769 7468 206f 7468 6572 2061 ced with other a\n-001492b0: 6c6c 6f63 6174 6f72 7320 6279 2064 6566 llocators by def\n-001492c0: 696e 696e 6720 3c63 6f64 653e 534f 4150 ining SOAP\n-001492d0: 5f4d 414c 4c4f 433c 2f63 6f64 653e 2061 _MALLOC a\n-001492e0: 6e64 203c 636f 6465 3e53 4f41 505f 4652 nd SOAP_FR\n-001492f0: 4545 3c2f 636f 6465 3e20 746f 2072 6570 EE to rep\n-00149300: 6c61 6365 203c 636f 6465 3e6d 616c 6c6f lace mallo\n-00149310: 633c 2f63 6f64 653e 2061 6e64 203c 636f c and free, \n-00149330: 616e 6420 6465 6669 6e65 203c 636f 6465 and define SOAP_NEW\n-00149350: 2c20 3c63 6f64 653e 534f 4150 5f4e 4557 , SOAP_NEW\n-00149360: 5f41 5252 4159 3c2f 636f 6465 3e2c 203c _ARRAY, <\n-00149370: 636f 6465 3e53 4f41 505f 504c 4143 454d code>SOAP_PLACEM\n-00149380: 454e 545f 4e45 573c 2f63 6f64 653e 2c20 ENT_NEW, \n-00149390: 616e 6420 3c63 6f64 653e 534f 4150 5f44 and SOAP_D\n-001493a0: 454c 4554 453c 2f63 6f64 653e 2c20 3c63 ELETE, SOAP_DELETE_\n-001493c0: 4152 5241 593c 2f63 6f64 653e 2074 6f20 ARRAY to \n-001493d0: 7265 706c 6163 6520 3c63 6f64 653e 6e65 replace ne\n-001493e0: 773c 2f63 6f64 653e 2061 6e64 203c 636f w and delete\n-00149400: 2075 7365 6420 6279 2074 6865 2065 6e67 used by the eng\n-00149410: 696e 6520 746f 2061 6c6c 6f63 6174 6520 ine to allocate \n-00149420: 6d61 6e61 6765 6420 6d65 6d6f 7279 2e20 managed memory. \n-00149430: 4f6e 6520 6361 6e20 666f 7220 6578 616d One can for exam\n-00149440: 706c 6520 7573 6520 6120 6761 7262 6167 ple use a garbag\n-00149450: 6520 636f 6c6c 6563 746f 7220 7769 7468 e collector with\n-00149460: 2067 534f 4150 2062 7920 6465 6669 6e69 gSOAP by defini\n-00149470: 6e67 2073 7569 7461 626c 6520 7265 706c ng suitable repl\n-00149480: 6163 656d 656e 7473 2e3c 2f70 3e0a 3c70 acements.

    .More informatio\n-001494a0: 6e20 6f6e 206d 656d 6f72 7920 6d61 6e61 n on memory mana\n-001494b0: 6765 6d65 6e74 2063 616e 2062 6520 666f gement can be fo\n-001494c0: 756e 6420 696e 2074 6865 203c 6120 6872 und in the C and C++\n-00149500: 2058 4d4c 2044 6174 6120 4269 6e64 696e XML Data Bindin\n-00149510: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta\n-00149520: 7469 6f6e 2074 6861 7420 6861 7320 7365 tion that has se\n-00149530: 7061 7261 7465 2073 6563 7469 6f6e 7320 parate sections \n-00149540: 6f6e 206d 656d 6f72 7920 6d61 6e61 6765 on memory manage\n-00149550: 6d65 6e74 2069 6e20 4320 616e 6420 696e ment in C and in\n-00149560: 2043 2b2b 2e3c 2f70 3e0a 3c70 3ef0 9f94 C++.

    .

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

    .\n-001495a0: 3c68 313e 3c61 2063 6c61 7373 3d22 616e

    .Intr\n-001495d0: 612d 636c 6173 7320 6d65 6d6f 7279 206d a-class memory m\n-001495e0: 616e 6167 656d 656e 743c 2f68 313e 0a3c anagement

    .<\n-001495f0: 703e 5768 656e 2061 2063 6c61 7373 203c p>When a class <\n-00149600: 636f 6465 3e54 3c2f 636f 6465 3e20 6861 code>T ha\n-00149610: 7320 6120 3c63 6f64 653e 7374 7275 6374 s a struct\n-00149620: 2073 6f61 7020 2a20 543a 3a73 6f61 703c soap * T::soap<\n-00149630: 2f63 6f64 653e 206d 656d 6265 7220 6465 /code> member de\n-00149640: 636c 6172 6564 2069 6e20 616e 2069 6e74 clared in an int\n-00149650: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n-00149660: 6c65 2066 6f72 2073 6f61 7063 7070 322c le for soapcpp2,\n-00149670: 2074 6865 6e20 7468 6973 206d 656d 6265 then this membe\n-00149680: 7220 7769 6c6c 2062 6520 7365 7420 746f r will be set to\n-00149690: 2070 6f69 6e74 2074 6f20 7468 6520 6375 point to the cu\n-001496a0: 7272 656e 7420 636f 6e74 6578 7420 6279 rrent context by\n-001496b0: 2074 6865 2064 6573 6572 6961 6c69 7a65 the deserialize\n-001496c0: 7273 2061 6e64 2062 7920 7468 6520 3c63 rs and by the soap_default\n-001496e0: 3c2f 636f 6465 3e20 6d65 7468 6f64 206f method o\n-001496f0: 6620 7468 6520 636c 6173 7320 616e 6420 f the class and \n-00149700: 6279 2074 6865 203c 636f 6465 3e73 6f61 by the soa\n-00149710: 705f 6465 6661 756c 745f 543c 2f63 6f64 p_default_T and soa\n-00149730: 705f 6e65 775f 543c 2f63 6f64 653e 2066 p_new_T f\n-00149740: 756e 6374 696f 6e73 2066 6f72 2074 6869 unctions for thi\n-00149750: 7320 636c 6173 7320 6e61 6d65 6420 3c63 s class named T. Th\n-00149770: 6973 2073 696d 706c 6966 6965 7320 6d65 is simplifies me\n-00149780: 6d6f 7279 206d 616e 6167 656d 656e 7420 mory management \n-00149790: 6279 2063 6c61 7373 206d 6574 686f 6473 by class methods\n-001497a0: 2074 6861 7420 616c 6c6f 6361 7465 2064 that allocate d\n-001497b0: 6174 6120 6173 736f 6369 6174 6564 2077 ata associated w\n-001497c0: 6974 6820 7468 6520 636c 6173 7320 696e ith the class in\n-001497d0: 7374 616e 6365 2074 6861 7420 6d75 7374 stance that must\n-001497e0: 2062 6520 6d61 6e61 6765 6420 6279 2074 be managed by t\n-001497f0: 6865 2063 6f6e 7465 7874 2e3c 2f70 3e0a he context.

    .\n-00149800: 3c70 3e43 6f6e 7369 6465 7220 666f 7220

    Consider for \n-00149810: 6578 616d 706c 6520 7468 6520 666f 6c6c example the foll\n-00149820: 6f77 696e 6720 636c 6173 7320 6465 636c owing class decl\n-00149830: 6172 6174 696f 6e3a 3c2f 703e 0a3c 6469 aration:

    .
    class\n-00149880: 203c 2f73 7061 6e3e 436c 6173 7320 3c2f Class .
    { p\n-001498c0: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    Class(\n-001498f0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    ~\n-00149910: 436c 6173 7328 293b 3c2f 6469 763e 0a3c Class();
    .<\n-00149920: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00149930: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc\n-00149950: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-00149980: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap;.
    char *\n-00149a20: 6e61 6d65 3b20 3c2f 6469 763e 0a3c 6469 name;
    . \n-00149a40: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi\n-00149a60: 643c 2f73 7061 6e3e 2073 6574 4e61 6d65 d setName\n-00149a70: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const ch\n-00149ab0: 6172 3c2f 7370 616e 3e20 2a73 293b 203c ar *s); <\n-00149ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *getName();.
    };
    .<\n-00149b30: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Since t\n-00149b50: 6865 203c 636f 6465 3e6e 616d 653c 2f63 he name member is a\n-00149b70: 2063 6861 7261 6374 6572 2070 6f69 6e74 character point\n-00149b80: 6572 2074 6f20 6120 7374 7269 6e67 2c20 er to a string, \n-00149b90: 7768 6572 6520 7368 6f75 6c64 2077 6520 where should we \n-00149ba0: 616c 6c6f 6361 7465 2074 6869 7320 7374 allocate this st\n-00149bb0: 7269 6e67 3f20 496e 206d 6f73 7420 6361 ring? In most ca\n-00149bc0: 7365 7320 7765 2077 696c 6c20 6164 6420 ses we will add \n-00149bd0: 6120 636f 6e73 7472 7563 746f 7220 7468 a constructor th\n-00149be0: 6174 2069 6e69 7469 616c 6c79 2073 6574 at initially set\n-00149bf0: 7320 3c63 6f64 653e 6e61 6d65 3c2f 636f s name to NULL and \n-00149c10: 6120 6465 7374 7275 6374 6f72 2074 6861 a destructor tha\n-00149c20: 7420 6465 6c65 7465 7320 3c63 6f64 653e t deletes \n-00149c30: 6e61 6d65 3c2f 636f 6465 3e20 7768 656e name when\n-00149c40: 206e 6f6e 2d4e 554c 4c2c 206c 696b 6520 non-NULL, like \n-00149c50: 736f 3a3c 2f70 3e0a 3c64 6976 2063 6c61 so:

    .
    \n-00149c80: 436c 6173 733a 3a43 6c61 7373 2829 203c Class::Class() <\n+001362a0: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine\">class\n+001362c0: 203c 2f73 7061 6e3e 6e73 5f5f 6d79 436c ns__myCl\n+001362d0: 6173 7320 3c2f 6469 763e 0a3c 6469 7620 ass
    .
    { <\n+001362f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00136300: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord\">public:
    .
    \n+00136330: 3c73 7061 6e20 636c 6173 733d 226b 6579 virtual v\n+00136370: 6f69 643c 2f73 7061 6e3e 2070 7269 6e74 oid print\n+00136380: 2873 7464 3a3a 6f73 7472 6561 6d20 2661 (std::ostream &a\n+00136390: 6d70 3b73 2920 3c73 7061 6e20 636c 6173 mp;s) cons\n+001363b0: 743c 2f73 7061 6e3e 3b20 3c73 7061 6e20 t; \n+001363d0: 2f2f 2077 6520 6e65 6564 2073 7464 3a3a // we need std::\n+001363e0: 6f73 7472 6561 6d20 6865 7265 203c 2f73 ostream here
    .
    \n+00136410: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
    .
    };<\n+00136450: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00136470: 5365 6520 616c 736f 2053 6563 7469 6f6e See also Section\n+00136480: 203c 6120 636c 6173 733d 2265 6c22 2068 Trans\n+001364b0: 6965 6e74 2064 6174 6120 7479 7065 733c ient data types<\n+001364c0: 2f61 3e20 2c20 6e6f 6e2d 7365 7269 616c /a> , non-serial\n+001364d0: 697a 6162 6c65 2064 6174 6120 7479 7065 izable data type\n+001364e0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... <\n+001364f0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href=\"#\">Back \n+00136500: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont\n+00136510: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6831 ents

    ..Run-time flag\n+00136550: 733c 2f68 313e 0a3c 703e 5468 6520 6753 s.

    The gS\n+00136560: 4f41 5020 656e 6769 6e65 2073 7461 7465 OAP engine state\n+00136570: 2069 7320 7374 6f72 6564 2069 6e20 7468 is stored in th\n+00136580: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context that\n+001365f0: 2069 7320 696e 6974 6961 6c69 7a65 6420 is initialized \n+00136600: 616e 6420 636f 6e74 726f 6c6c 6564 2062 and controlled b\n+00136610: 7920 7661 7269 6f75 7320 6f70 7469 6f6e y various option\n+00136620: 616c 2072 756e 7469 6d65 2066 6c61 6773 al runtime flags\n+00136630: 2e20 4d6f 7374 2066 6c61 6773 2061 7265 . Most flags are\n+00136640: 2061 7070 6c69 6361 626c 6520 746f 2065 applicable to e\n+00136650: 6974 6865 7220 7072 6f63 6573 7369 6e67 ither processing\n+00136660: 2069 6e70 7574 206f 7220 746f 2070 726f input or to pro\n+00136670: 6365 7373 696e 6720 6f75 7470 7574 2c20 cessing output, \n+00136680: 6275 7420 736f 6d65 2061 7265 2061 7070 but some are app\n+00136690: 6c69 6361 626c 6520 746f 2062 6f74 6820 licable to both \n+001366a0: 696e 7075 7420 616e 6420 6f75 7470 7574 input and output\n+001366b0: 206d 6573 7361 6765 2061 6e64 2064 6f63 message and doc\n+001366c0: 756d 656e 7420 7072 6f63 6573 7369 6e67 ument processing\n+001366d0: 2e3c 2f70 3e0a 3c70 3e46 7572 7468 6572 .

    .

    Further\n+001366e0: 6d6f 7265 2c20 7468 6573 6520 666c 6167 more, these flag\n+001366f0: 7320 6172 6520 6469 7669 6465 6420 696e s are divided in\n+00136700: 746f 2066 6f75 7220 6361 7465 676f 7269 to four categori\n+00136710: 6573 3a20 7472 616e 7370 6f72 7420 2849 es: transport (I\n+00136720: 4f29 2c20 636f 6e74 656e 7420 656e 636f O), content enco\n+00136730: 6469 6e67 2028 454e 4329 2c20 584d 4c20 ding (ENC), XML \n+00136740: 7061 7273 696e 6720 616e 6420 6765 6e65 parsing and gene\n+00136750: 7261 7469 6f6e 2028 584d 4c29 2c20 616e ration (XML), an\n+00136760: 6420 432f 432b 2b20 7573 6167 6520 2843 d C/C++ usage (C\n+00136770: 292e 3c2f 703e 0a3c 703e 5468 6520 696e ).

    .

    The in\n+00136780: 7075 742d 6d6f 6465 2061 6e64 206f 7574 put-mode and out\n+00136790: 7075 742d 6d6f 6465 2066 6c61 6773 2066 put-mode flags f\n+001367a0: 6f72 2069 6e62 6f75 6e64 2028 696e 2920 or inbound (in) \n+001367b0: 616e 6420 6f75 7462 6f75 6e64 2028 6f75 and outbound (ou\n+001367c0: 7429 206d 6573 7361 6765 2070 726f 6365 t) message proce\n+001367d0: 7373 696e 6720 6172 653a 3c2f 703e 0a3c ssing are:

    .<\n+001367e0: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n+001367f0: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..
    <\n+00136850: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n+00136860: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n+00136870: 3e69 6e2f 6f75 7420 2020 3c2f 7468 3e3c >in/out <\n+00136880: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n+00136890: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n+001368a0: 3e72 6573 756c 7420 2020 203c 2f74 683e >result \n+001368b0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ......\n+00136b20: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ..\n+00136bc0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+00136d00: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ........<\n+001370e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001370f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137100: 3e3c 636f 6465 3e23 534f 4150 5f45 4e43 >#SOAP_ENC\n+00137110: 5f58 4d4c 3c2f 636f 6465 3e20 2020 3c2f _XML \n+001371a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+001372a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....\n+001374b0: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ..\n+00137560: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n+00137570: 5a4c 4942 3c2f 636f 6465 3e20 2020 3c2f ZLIB \n+001375b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+001376a0: 696e 2b6f 7574 2020 203c 2f74 643e 3c74 in+out \n+001376d0: 7573 6520 5353 4c2f 544c 532c 2061 7574 use SSL/TLS, aut\n+001376e0: 6f6d 6174 6963 2077 6865 6e20 636f 6e6e omatic when conn\n+001376f0: 6563 7469 6e67 2022 6874 7470 733a 2220 ecting \"https:\" \n+00137700: 656e 6470 6f69 6e74 7320 2020 203c 2f74 endpoints ..\n+00137780: 3c74 6420 636c 6173 733d 226d 6172 6b64 o\n+001377d0: 7574 7075 7420 696e 6465 6e74 6564 2058 utput indented X\n+001377e0: 4d4c 2061 6e64 204a 534f 4e20 2020 203c ML and JSON <\n+001377f0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>....\n+00137970: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00137a50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137a60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137a70: 3e69 6e20 2020 3c2f 7464 3e3c 7464 2063 >in .<\n+00137ad0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00137ae0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00137af0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00137c20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137c30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137c40: 3e69 6e2b 6f75 7420 2020 3c2f 7464 3e3c >in+out <\n+00137c50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137c60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137c70: 3e6f 7574 3a20 7365 7269 616c 697a 6520 >out: serialize \n+00137c80: 6461 7461 2061 7320 584d 4c20 7472 6565 data as XML tree\n+00137c90: 7320 286e 6f20 6d75 6c74 692d 7265 662c s (no multi-ref,\n+00137ca0: 2064 7570 6c69 6361 7465 2064 6174 6120 duplicate data \n+00137cb0: 7768 656e 206e 6563 6573 7361 7279 293b when necessary);\n+00137cc0: 2069 6e3a 2069 676e 6f72 6520 6964 2061 in: ignore id a\n+00137cd0: 7474 7269 6275 7465 7320 2864 6f20 6e6f ttributes (do no\n+00137ce0: 7420 7265 736f 6c76 6520 6964 2d72 6566 t resolve id-ref\n+00137cf0: 2920 2020 203c 2f74 643e 3c2f 7472 3e0a ) .\n+00137d00: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00137d20: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..\n+00137e10: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+00137f00: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+00137f90: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ..<\n+00138020: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00138030: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00138040: 3e3c 636f 6465 3e23 534f 4150 5f43 5f4e >#SOAP_C_N\n+00138050: 4f49 4f42 3c2f 636f 6465 3e20 2020 3c2f OIOB <\n+00138090: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001380a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001380b0: 3e64 6f20 6e6f 7420 6661 756c 7420 7769 >do not fault wi\n+001380c0: 7468 203c 636f 6465 3e23 534f 4150 5f49 th #SOAP_I\n+001380d0: 4f42 3c2f 636f 6465 3e20 2020 203c 2f74 OB ..<\n+00138200: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n+00138290: 696e 2b6f 7574 2020 203c 2f74 643e 3c74 in+out \n+001382c0: 656e 6162 6c65 206d 756c 7469 6279 7465 enable multibyte\n+001382d0: 2063 6861 7261 6374 6572 2073 7570 706f character suppo\n+001382e0: 7274 2066 6f72 2038 2d62 6974 2063 6861 rt for 8-bit cha\n+001382f0: 7261 6374 6572 2073 7472 696e 6773 2077 racter strings w\n+00138300: 6974 6820 3c63 6f64 653e 7763 746f 6d62 ith wctomb\n+00138310: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and mbtowc \n+00138330: 7573 696e 6720 7468 6520 6375 7272 656e using the curren\n+00138340: 7420 6c6f 6361 6c65 2020 2020 3c2f 7464 t locale ..\n+001383c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 s\n+00138410: 6572 6961 6c69 7a65 2065 6d70 7479 2073 erialize empty s\n+00138420: 7472 696e 6773 2061 7320 7873 693a 6e69 trings as xsi:ni\n+00138430: 6c20 6174 7472 6962 7574 6564 2065 6c65 l attributed ele\n+00138440: 6d65 6e74 7320 2020 3c2f 7464 3e3c 2f74 ments .
    Des\n-00143740: 6372 6970 7469 6f6e 2020 2020 3c2f 7468 cription
    200 \n-001437a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 OK (no er\n-001437d0: 726f 7229 2020 2020 3c2f 7464 3e3c 2f74 ror)
    201 Created <\n-00143860: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    202\n-001438b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Accept\n-001438e0: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    203 Non-Authoritat\n-00143970: 6976 6520 496e 666f 726d 6174 696f 6e20 ive Information \n-00143980: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    No\n-00143a00: 2043 6f6e 7465 6e74 2020 2020 3c2f 7464 Content
    205 \n-00143a60: 203c 2f74 643e 3c74 6420 636c 6173 733d Reset Co\n-00143a90: 6e74 656e 7420 2020 203c 2f74 643e 3c2f ntent
    206 Partial Cont\n-00143b20: 656e 7420 2020 203c 2f74 643e 3c2f 7472 ent
    300 Multiple Choi\n-00143bb0: 6365 7320 2020 203c 2f74 643e 3c2f 7472 ces
    301 Moved Permanen\n-00143c40: 746c 7920 2020 203c 2f74 643e 3c2f 7472 tly
    302 Found
    303 \n-00143d20: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 See Other\n-00143d50: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    304
    30\n-00143e30: 3520 2020 3c2f 7464 3e3c 7464 2063 6c61 5 Use P\n-00143e60: 726f 7879 2020 2020 3c2f 7464 3e3c 2f74 roxy
    307 Temporary Re\n-00143ef0: 6469 7265 6374 2020 2020 3c2f 7464 3e3c direct
    400 Bad Request\n-00143f80: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    401
    40\n-00144060: 3220 2020 3c2f 7464 3e3c 7464 2063 6c61 2 Payme\n-00144090: 6e74 2052 6571 7569 7265 6420 2020 203c nt Required <\n-001440a0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    40\n-001440f0: 3320 2020 3c2f 7464 3e3c 7464 2063 6c61 3 Forbi\n-00144120: 6464 656e 2020 2020 3c2f 7464 3e3c 2f74 dden
    404 Not Found \n-001441b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    Meth\n-00144230: 6f64 204e 6f74 2041 6c6c 6f77 6564 2020 od Not Allowed \n-00144240: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    Not\n-001442c0: 2041 6363 6570 7461 626c 6520 2020 203c Acceptable <\n-001442d0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    40\n-00144320: 3720 2020 3c2f 7464 3e3c 7464 2063 6c61 7 Proxy\n-00144350: 2041 7574 6865 6e74 6963 6174 696f 6e20 Authentication \n-00144360: 5265 7175 6972 6564 2020 2020 3c2f 7464 Required
    408 \n-001443c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Request T\n-001443f0: 696d 652d 6f75 7420 2020 203c 2f74 643e ime-out
    409 \n-00144450: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Conflict \n-00144480: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    Go\n-00144500: 6e65 2020 2020 3c2f 7464 3e3c 2f74 723e ne
    411 Length Require\n-00144590: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d
    412
    413 Request Entit\n-001446b0: 7920 546f 6f20 4c61 7267 6520 2020 203c y Too Large <\n-001446c0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    414\n-00144710: 2020 203c 2f74 643e 3c74 6420 636c 6173 Reques\n-00144740: 742d 5552 4920 546f 6f20 4c61 7267 6520 t-URI Too Large \n-00144750: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    415
    416 Requested ra\n-00144870: 6e67 6520 6e6f 7420 7361 7469 7366 6961 nge not satisfia\n-00144880: 626c 6520 2020 203c 2f74 643e 3c2f 7472 ble
    417 Expectation F\n-00144910: 6169 6c65 6420 2020 203c 2f74 643e 3c2f ailed
    500 Internal Ser\n-001449a0: 7665 7220 4572 726f 7220 2020 203c 2f74 ver Error
    501 \n-00144a00: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Not Imp\n-00144a30: 6c65 6d65 6e74 6564 2020 2020 3c2f 7464 lemented
    502 \n-00144a90: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Bad Gatew\n-00144ac0: 6179 2020 2020 3c2f 7464 3e3c 2f74 723e ay
    503 Service Unavai\n-00144b50: 6c61 626c 6520 2020 203c 2f74 643e 3c2f lable
    504 Gateway Time\n-00144be0: 2d6f 7574 2020 2020 3c2f 7464 3e3c 2f74 -out
    505 HTTP Version\n-00144c70: 206e 6f74 2073 7570 706f 7274 6564 2020 not supported \n-00144c80: 203c 2f74 643e 3c2f 7472 3e0a 3c2f 7461
    mo\n+00136840: 6465 2066 6c61 6720 2020 3c2f 7468 3e3c de flag
    #\n+00136900: 534f 4150 5f49 4f5f 464c 5553 483c 2f63 SOAP_IO_FLUSH ou\n+00136940: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t flush\n+00136970: 206f 7574 7075 7420 696d 6d65 6469 6174 output immediat\n+00136980: 656c 7920 2020 203c 2f74 643e 3c2f 7472 ely
    #SOA\n+001369e0: 505f 494f 5f42 5546 4645 523c 2f63 6f64 P_IO_BUFFER out \n+00136a20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enable \n+00136a50: 6f75 7470 7574 2062 7566 6665 7269 6e67 output buffering\n+00136a60: 2c20 7468 6520 6465 6661 756c 7420 6d6f , the default mo\n+00136a70: 6465 2066 6f72 2073 6f63 6b65 7420 636f de for socket co\n+00136a80: 6e6e 6563 7469 6f6e 7320 2020 203c 2f74 nnections
    #SOAP_IO_STORE<\n+00136af0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> sto\n+00136b50: 7265 2074 6865 2065 6e74 6972 6520 6f75 re the entire ou\n+00136b60: 7462 6f75 6e64 206d 6573 7361 6765 2074 tbound message t\n+00136b70: 6f20 6361 6c63 756c 6174 6520 4854 5450 o calculate HTTP\n+00136b80: 2063 6f6e 7465 6e74 206c 656e 6774 6820 content length \n+00136b90: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_IO\n+00136bf0: 5f43 4855 4e4b 3c2f 636f 6465 3e20 2020 _CHUNK \n+00136c00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 out enable HTTP \n+00136c60: 6368 756e 6b69 6e67 2020 2020 3c2f 7464 chunking
    \n+00136cc0: 2353 4f41 505f 494f 5f4c 454e 4754 483c #SOAP_IO_LENGTH<\n+00136cd0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> use\n+00136d30: 6420 7769 7468 2074 776f 2d70 6861 7365 d with two-phase\n+00136d40: 2073 6572 6961 6c69 7a61 7469 6f6e 2c20 serialization, \n+00136d50: 6669 7273 7420 7068 6173 6520 7769 7468 first phase with\n+00136d60: 2074 6869 7320 666c 6167 2074 6f20 6361 this flag to ca\n+00136d70: 6c63 756c 6174 6520 4854 5450 2063 6f6e lculate HTTP con\n+00136d80: 7465 6e74 206c 656e 6774 6820 2020 203c tent length <\n+00136d90: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_IO_KEE\n+00136df0: 5041 4c49 5645 3c2f 636f 6465 3e20 2020 PALIVE \n+00136e00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 in+out \n+00136e30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 keep sock\n+00136e60: 6574 2063 6f6e 6e65 6374 696f 6e73 2061 et connections a\n+00136e70: 6c69 7665 2c20 7768 656e 2073 7570 706f live, when suppo\n+00136e80: 7274 6564 2062 7920 7468 6520 4854 5450 rted by the HTTP\n+00136e90: 2070 6565 7220 2020 203c 2f74 643e 3c2f peer
    #SO\n+00136ef0: 4150 5f49 4f5f 5544 503c 2f63 6f64 653e AP_IO_UDP\n+00136f00: 2020 203c 2f74 643e 3c74 6420 636c 6173 in+out\n+00136f30: 2020 203c 2f74 643e 3c74 6420 636c 6173 use UD\n+00136f60: 5020 2864 6174 6167 7261 6d29 2074 7261 P (datagram) tra\n+00136f70: 6e73 706f 7274 2c20 6d61 7869 6d75 6d20 nsport, maximum \n+00136f80: 6d65 7373 6167 6520 6c65 6e67 7468 2069 message length i\n+00136f90: 7320 3c63 6f64 653e 2353 4f41 505f 4255 s #SOAP_BU\n+00136fa0: 464c 454e 3c2f 636f 6465 3e20 2020 203c FLEN <\n+00136fb0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_ENC_PL\n+00137010: 4149 4e3c 2f63 6f64 653e 2020 203c 2f74 AIN in+out use plain me\n+00137080: 7373 6167 6573 2077 6974 686f 7574 2070 ssages without p\n+00137090: 6172 7369 6e67 206f 7220 656d 6974 7469 arsing or emitti\n+001370a0: 6e67 2048 5454 5020 6865 6164 6572 7320 ng HTTP headers \n+001370b0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    alia\n+00137170: 7320 666f 7220 3c63 6f64 653e 2353 4f41 s for #SOA\n+00137180: 505f 454e 435f 504c 4149 4e3c 2f63 6f64 P_ENC_PLAIN
    #SOAP\n+001371f0: 5f45 4e43 5f44 494d 453c 2f63 6f64 653e _ENC_DIME\n+00137200: 2020 203c 2f74 643e 3c74 6420 636c 6173 out \n+00137230: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 use DIME \n+00137260: 656e 636f 6469 6e67 2c20 6175 746f 6d61 encoding, automa\n+00137270: 7469 6320 7768 656e 2044 494d 4520 6174 tic when DIME at\n+00137280: 7461 6368 6d65 6e74 7320 6172 6520 7573 tachments are us\n+00137290: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    #SOAP_\n+001372f0: 454e 435f 4d49 4d45 3c2f 636f 6465 3e20 ENC_MIME \n+00137300: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 out <\n+00137330: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>use MIME e\n+00137360: 6e63 6f64 696e 6720 696e 7374 6561 6420 ncoding instead \n+00137370: 6f66 2044 494d 452c 2061 6374 6976 6174 of DIME, activat\n+00137380: 6564 2075 7369 6e67 203c 636f 6465 3e3c ed using <\n+00137390: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001373a0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001373b0: 5f6d 696d 652e 6874 6d6c 2367 6139 3138 _mime.html#ga918\n+001373c0: 3065 3562 6136 3334 6232 3033 3035 6237 0e5ba634b20305b7\n+001373d0: 3535 6234 3130 3034 3564 3965 6522 2074 55b410045d9ee\" t\n+001373e0: 6974 6c65 3d22 456e 6162 6c65 204d 494d itle=\"Enable MIM\n+001373f0: 4520 6174 7461 6368 6d65 6e74 732e 223e E attachments.\">\n+00137400: 736f 6170 5f73 6574 5f6d 696d 653c 2f61 soap_set_mime
    #SOAP_ENC_MTOM<\n+00137480: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> use\n+001374e0: 204d 544f 4d20 584f 5020 6174 7461 6368 MTOM XOP attach\n+001374f0: 6d65 6e74 7320 696e 7374 6561 6420 6f66 ments instead of\n+00137500: 2044 494d 4520 616e 6420 4d49 4d45 2020 DIME and MIME \n+00137510: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    out compress outpu\n+001375e0: 7420 7769 7468 205a 6c69 622c 2075 7369 t with Zlib, usi\n+001375f0: 6e67 2064 6566 6c61 7465 206f 7220 677a ng deflate or gz\n+00137600: 6970 2066 6f72 6d61 7420 2020 203c 2f74 ip format
    #SOAP_ENC_SSL<\n+00137670: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_XML_INDEN\n+00137770: 543c 2f63 6f64 653e 2020 203c 2f74 643e T out
    #SOAP_XML_CA\n+00137850: 4e4f 4e49 4341 4c3c 2f63 6f64 653e 2020 NONICAL \n+00137860: 203c 2f74 643e 3c74 6420 636c 6173 733d out output cano\n+001378c0: 6e69 6361 6c20 584d 4c20 2020 203c 2f74 nical XML
    #SOAP_XML_DEFAU\n+00137930: 4c54 4e53 3c2f 636f 6465 3e20 2020 3c2f LTNS out output XML wit\n+001379a0: 6820 6465 6661 756c 7420 6e61 6d65 7370 h default namesp\n+001379b0: 6163 6520 6269 6e64 696e 6773 203c 636f ace bindings xmlns=\"...\"
    #S\n+00137a30: 4f41 505f 584d 4c5f 4947 4e4f 5245 4e53 OAP_XML_IGNORENS\n+00137a40: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c ign\n+00137aa0: 6f72 6573 2058 4d4c 206e 616d 6573 7061 ores XML namespa\n+00137ab0: 6365 7320 696e 2058 4d4c 2069 6e70 7574 ces in XML input\n+00137ac0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_XM\n+00137b20: 4c5f 5354 5249 4354 3c2f 636f 6465 3e20 L_STRICT \n+00137b30: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 in apply stric\n+00137b90: 7420 7661 6c69 6461 7469 6f6e 206f 6620 t validation of \n+00137ba0: 584d 4c20 696e 7075 7420 2020 203c 2f74 XML input
    #SOAP_XML_TREE\n+00137c10: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SOAP_X\n+00137d50: 4d4c 5f47 5241 5048 3c2f 636f 6465 3e20 ML_GRAPH \n+00137d60: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 out <\n+00137d90: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>serialize \n+00137dc0: 6170 706c 6963 6174 696f 6e20 6461 7461 application data\n+00137dd0: 2061 7320 616e 2058 4d4c 2067 7261 7068 as an XML graph\n+00137de0: 2077 6974 6820 6d75 6c74 692d 7265 6620 with multi-ref \n+00137df0: 6964 2f72 6566 2061 7474 7269 6275 7465 id/ref attribute\n+00137e00: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #SOAP_\n+00137e60: 584d 4c5f 4e49 4c3c 2f63 6f64 653e 2020 XML_NIL \n+00137e70: 203c 2f74 643e 3c74 6420 636c 6173 733d out serialize N\n+00137ed0: 554c 4c20 6461 7461 2061 7320 7873 693a ULL data as xsi:\n+00137ee0: 6e69 6c20 6174 7472 6962 7574 6564 2065 nil attributed e\n+00137ef0: 6c65 6d65 6e74 7320 2020 203c 2f74 643e lements
    #\n+00137f50: 534f 4150 5f58 4d4c 5f4e 4f54 5950 453c SOAP_XML_NOTYPE<\n+00137f60: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> dis\n+00137fc0: 6162 6c65 203c 656d 3e3c 636f 6465 3e78 able x\n+00137fd0: 7369 3a74 7970 653c 2f63 6f64 653e 3c2f si:type attributes \n+00137ff0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    in
    #SOAP_C_UTFSTRI\n+00138140: 4e47 3c2f 636f 6465 3e20 2020 3c2f 7464 NG in+out serialize 8-b\n+001381b0: 6974 2063 6861 7261 6374 6572 2073 7472 it character str\n+001381c0: 696e 6773 2022 6173 2069 7322 2c20 6d65 ings \"as is\", me\n+001381d0: 616e 696e 6720 382d 6269 7420 7374 7269 aning 8-bit stri\n+001381e0: 6e67 7320 6861 7665 2055 5446 2d38 2063 ngs have UTF-8 c\n+001381f0: 6f6e 7465 6e74 2020 2020 3c2f 7464 3e3c ontent
    #\n+00138250: 534f 4150 5f43 5f4d 4253 5452 494e 473c SOAP_C_MBSTRING<\n+00138260: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    \n+001383a0: 2353 4f41 505f 435f 4e49 4c53 5452 494e #SOAP_C_NILSTRIN\n+001383b0: 473c 2f63 6f64 653e 2020 203c 2f74 643e G out
    .

    A\n+00138460: 6c6c 2066 6c61 6773 2061 7265 2069 6e64 ll flags are ind\n+00138470: 6570 656e 6465 6e74 2061 6e64 2063 616e ependent and can\n+00138480: 2062 6520 636f 6d62 696e 6564 2075 7369 be combined usi\n+00138490: 6e67 2061 2062 6974 7769 7365 206f 7220 ng a bitwise or \n+001384a0: 283c 636f 6465 3e7c 3c2f 636f 6465 3e29 (|)\n+001384b0: 2c20 6578 6365 7074 2066 6f72 203c 636f , except for #SOAP_IO_FLUS\n+001384d0: 483c 2f63 6f64 653e 2c20 3c63 6f64 653e H, \n+001384e0: 2353 4f41 505f 494f 5f42 5546 4645 523c #SOAP_IO_BUFFER<\n+001384f0: 2f63 6f64 653e 2c20 3c63 6f64 653e 2353 /code>, #S\n+00138500: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE, and #\n+00138520: 534f 4150 5f49 4f5f 4348 554e 4b3c 2f63 SOAP_IO_CHUNK which are e\n+00138540: 6e75 6d65 7261 7469 6f6e 7320 616e 6420 numerations and \n+00138550: 6f6e 6c79 206f 6e65 206f 6620 7468 6573 only one of thes\n+00138560: 6520 492f 4f20 666c 6167 7320 6361 6e20 e I/O flags can \n+00138570: 6265 2075 7365 642e 2041 6c73 6f20 7468 be used. Also th\n+00138580: 6520 584d 4c20 7365 7269 616c 697a 6174 e XML serializat\n+00138590: 696f 6e20 666c 6167 7320 3c63 6f64 653e ion flags \n+001385a0: 2353 4f41 505f 584d 4c5f 5452 4545 3c2f #SOAP_XML_TREE and \n+001385c0: 2353 4f41 505f 584d 4c5f 4752 4150 483c #SOAP_XML_GRAPH<\n+001385d0: 2f63 6f64 653e 2073 686f 756c 6420 6e6f /code> should no\n+001385e0: 7420 6265 206d 6978 6564 2e3c 2f70 3e0a t be mixed.

    .\n+001385f0: 3c70 3e54 6f20 616c 6c6f 6361 7465 2061

    To allocate a\n+00138600: 6e64 2069 6e69 7469 616c 697a 6520 6120 nd initialize a \n+00138610: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with i\n+00138680: 6e70 7574 2061 6e64 206f 7574 7075 7420 nput and output \n+00138690: 6d6f 6465 2066 6c61 6773 3a3c 2f70 3e0a mode flags:

    .\n+001386a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+001386e0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap * soap_new1\n+00138780: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_mode iomode);
    \n+001387f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    so\n+00138ae0: 6170 5f6e 6577 323c 2f61 3e3c 2f64 6976 ap_new2
    struct soap\n+00138b10: 202a 2073 6f61 705f 6e65 7732 2873 6f61 * soap_new2(soa\n+00138b20: 705f 6d6f 6465 2069 6e70 7574 5f6d 6f64 p_mode input_mod\n+00138b30: 652c 2073 6f61 705f 6d6f 6465 206f 7574 e, soap_mode out\n+00138b40: 7075 745f 6d6f 6465 293c 2f64 6976 3e3c put_mode)
    <\n+00138b50: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00138b60: 223e 416c 6c6f 6361 7465 2061 6e64 2069 \">Allocate and i\n+00138b70: 6e69 7469 616c 697a 6520 6120 6e65 7720 nitialize a new \n+00138b80: 736f 6170 2063 6f6e 7465 7874 2077 6974 soap context wit\n+00138b90: 6820 7365 7061 7261 7465 2069 6e70 7574 h separate input\n+00138ba0: 2061 6e64 206f 7574 7075 7420 736f 6170 and output soap\n+00138bb0: 5f6d 6f64 6520 666c 6167 732e 3c2f 6469 _mode flags.
    .
    <\n+00138bd0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00138be0: 3c70 3e54 6f20 696e 6974 6961 6c69 7a65

    To initialize\n+00138bf0: 2061 2073 7461 636b 2d61 6c6c 6f63 6174 a stack-allocat\n+00138c00: 6564 203c 636f 6465 3e3c 6120 636c 6173 ed soap context wit\n+00138c70: 6820 696e 7075 7420 616e 6420 6f75 7470 h input and outp\n+00138c80: 7574 206d 6f64 6520 666c 6167 733a 3c2f ut mode flags:.

    void\n+00138ce0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init1\n+00138d40: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (struc\n+00138d60: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00138d90: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, so\n+00138e20: 6170 5f6d 6f64 653c 2f61 3e20 696f 6d6f ap_mode iomo\n+00138e30: 6465 293b 3c2f 6469 763e 0a3c 6469 7620 de);
    ..
    s\n+00139180: 6f61 705f 696e 6974 323c 2f61 3e3c 2f64 oap_init2
    void soap\n+001391b0: 5f69 6e69 7432 2873 7472 7563 7420 736f _init2(struct so\n+001391c0: 6170 202a 736f 6170 2c20 736f 6170 5f6d ap *soap, soap_m\n+001391d0: 6f64 6520 696e 7075 745f 6d6f 6465 2c20 ode input_mode, \n+001391e0: 736f 6170 5f6d 6f64 6520 6f75 7470 7574 soap_mode output\n+001391f0: 5f6d 6f64 6529 3c2f 6469 763e 3c64 6976 _mode)
    I\n+00139210: 6e69 7469 616c 697a 6520 6120 7374 6163 nitialize a stac\n+00139220: 6b2d 616c 6c6f 6361 7465 6420 736f 6170 k-allocated soap\n+00139230: 2063 6f6e 7465 7874 2077 6974 6820 696e context with in\n+00139240: 7075 7420 616e 6420 6f75 7470 7574 2073 put and output s\n+00139250: 6f61 705f 6d6f 6465 2066 6c61 6773 2e3c oap_mode flags.<\n+00139260: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    To set and\n+00139290: 2063 6c65 6172 206d 6f64 6520 666c 6167 clear mode flag\n+001392a0: 7320 7573 653a 3c2f 703e 0a3c 6469 7620 s use:

    .
    voi\n+001392f0: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d so\n+00139350: 6170 5f73 6574 5f6d 6f64 653c 2f61 3e28 ap_set_mode(\n+00139360: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001393b0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001393e0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soap_mo\n+00139440: 6465 3c2f 613e 2069 6f6d 6f64 6529 3b20 de iomode); \n+00139450: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set inp\n+00139470: 7574 2061 6e64 206f 7574 7075 7420 6d6f ut and output mo\n+00139480: 6465 2066 6c61 6773 3c2f 7370 616e 3e3c de flags<\n+00139490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    void soap_set_imod\n+00139530: 653c 2f61 3e28 3c73 7061 6e20 636c 6173 e(stru\n+00139550: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, s\n+00139610: 6f61 705f 6d6f 6465 3c2f 613e 203c 6120 oap_mode imode)\n+00139670: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // set i\n+00139690: 6e70 7574 206d 6f64 6520 666c 6167 733c nput mode flags<\n+001396a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001396c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001396d0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void soap_s\n+00139740: 6574 5f6f 6d6f 6465 3c2f 613e 283c 7370 et_omode(struct
    \n+00139770: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001397a0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, soap_mode<\n+00139830: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> omo\n+00139880: 6465 3c2f 613e 293b 203c 7370 616e 2063 de); /\n+001398a0: 2f20 7365 7420 6f75 7470 7574 206d 6f64 / set output mod\n+001398b0: 6520 666c 6167 733c 2f73 7061 6e3e 3c2f e flags.
    void soap_clr_mode<\n+00139960: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(struct\n+00139980: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001399b0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001399e0: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, soa\n+00139a40: 705f 6d6f 6465 3c2f 613e 2069 6f6d 6f64 p_mode iomod\n+00139a50: 6529 3b20 3c73 7061 6e20 636c 6173 733d e); // cle\n+00139a70: 6172 2069 6e70 7574 2061 6e64 206f 7574 ar input and out\n+00139a80: 7075 7420 6d6f 6465 2066 6c61 6773 3c2f put mode flags
    .void soap_cl\n+00139b30: 725f 696d 6f64 653c 2f61 3e28 3c73 7061 r_imode(struct \n+00139b60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00139b90: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00139bc0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap_mode imod\n+00139c70: 653c 2f61 3e29 3b20 3c73 7061 6e20 636c e); //\n+00139c90: 2063 6c65 6172 2069 6e70 7574 206d 6f64 clear input mod\n+00139ca0: 6520 666c 6167 733c 2f73 7061 6e3e 3c2f e flags.
    void soap_clr_omode\n+00139d50: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (struc\n+00139d70: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00139da0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, so\n+00139e30: 6170 5f6d 6f64 653c 2f61 3e20 3c61 2063 ap_mode omode);\n+00139e90: 203c 7370 616e 2063 6c61 7373 3d22 636f // clear \n+00139eb0: 6f75 7470 7574 206d 6f64 6520 666c 6167 output mode flag\n+00139ec0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n+00139ed0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00139ee0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+00139ef0: 705f 5f63 6f6e 7465 7874 5f68 746d 6c5f p__context_html_\n+00139f00: 6761 3036 6637 3639 6638 3062 6365 6137 ga06f769f80bcea7\n+00139f10: 6265 6232 6562 6666 6430 6134 3066 6335 beb2ebffd0a40fc5\n+00139f20: 3231 223e 3c64 6976 2063 6c61 7373 3d22 21\">.
    soap_cl\n+0013a110: 725f 696d 6f64 653c 2f61 3e3c 2f64 6976 r_imode
    void soap_c\n+0013a140: 6c72 5f69 6d6f 6465 2873 7472 7563 7420 lr_imode(struct \n+0013a150: 736f 6170 202a 736f 6170 2c20 736f 6170 soap *soap, soap\n+0013a160: 5f6d 6f64 6520 696e 7075 745f 6d6f 6465 _mode input_mode\n+0013a170: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Clear \n+0013a190: 696e 7075 7420 736f 6170 5f6d 6f64 6520 input soap_mode \n+0013a1a0: 666c 6167 7320 6f66 2074 6865 2067 6976 flags of the giv\n+0013a1b0: 656e 2073 6f61 7020 636f 6e74 6578 742e en soap context.\n+0013a1c0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    so\n+0013a280: 6170 5f63 6c72 5f6f 6d6f 6465 3c2f 613e ap_clr_omode\n+0013a290: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s\n+0013a2b0: 6f61 705f 636c 725f 6f6d 6f64 6528 7374 oap_clr_omode(st\n+0013a2c0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0013a2d0: 2073 6f61 705f 6d6f 6465 206f 7574 7075 soap_mode outpu\n+0013a2e0: 745f 6d6f 6465 293c 2f64 6976 3e3c 6469 t_mode)
    \n+0013a300: 436c 6561 7220 6f75 7470 7574 2073 6f61 Clear output soa\n+0013a310: 705f 6d6f 6465 2066 6c61 6773 206f 6620 p_mode flags of \n+0013a320: 7468 6520 6769 7665 6e20 736f 6170 2063 the given soap c\n+0013a330: 6f6e 7465 7874 2e3c 2f64 6976 3e3c 2f64 ontext.
    .
    void soap_set_i\n+0013a430: 6d6f 6465 2873 7472 7563 7420 736f 6170 mode(struct soap\n+0013a440: 202a 736f 6170 2c20 736f 6170 5f6d 6f64 *soap, soap_mod\n+0013a450: 6520 696e 7075 745f 6d6f 6465 293c 2f64 e input_mode)
    Set input \n+0013a480: 736f 6170 5f6d 6f64 6520 666c 6167 7320 soap_mode flags \n+0013a490: 6f66 2074 6865 2067 6976 656e 2073 6f61 of the given soa\n+0013a4a0: 7020 636f 6e74 6578 742e 3c2f 6469 763e p context.
    \n+0013a4b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0013a520: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_set\n+0013a570: 5f6f 6d6f 6465 3c2f 613e 3c2f 6469 763e _omode
    \n+0013a580: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_se\n+0013a5a0: 745f 6f6d 6f64 6528 7374 7275 6374 2073 t_omode(struct s\n+0013a5b0: 6f61 7020 2a73 6f61 702c 2073 6f61 705f oap *soap, soap_\n+0013a5c0: 6d6f 6465 206f 7574 7075 745f 6d6f 6465 mode output_mode\n+0013a5d0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Set ou\n+0013a5f0: 7470 7574 2073 6f61 705f 6d6f 6465 2066 tput soap_mode f\n+0013a600: 6c61 6773 206f 6620 7468 6520 6769 7665 lags of the give\n+0013a610: 6e20 736f 6170 2063 6f6e 7465 7874 2e3c n soap context.<\n+0013a620: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .
    \n+0013a660: 4e6f 7465 3c2f 6474 3e3c 6464 3e54 6865 Note
    The\n+0013a670: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML\n+0013a680: 5f54 5245 453c 2f63 6f64 653e 206d 6f64 _TREE mod\n+0013a690: 6520 666c 6167 2063 616e 2062 6520 7573 e flag can be us\n+0013a6a0: 6564 2074 6f20 696d 7072 6f76 6520 696e ed to improve in\n+0013a6b0: 7465 726f 7065 7261 6269 6c69 7479 2077 teroperability w\n+0013a6c0: 6974 6820 534f 4150 2069 6d70 6c65 6d65 ith SOAP impleme\n+0013a6d0: 6e74 6174 696f 6e73 2074 6861 7420 6172 ntations that ar\n+0013a6e0: 6520 6e6f 7420 6675 6c6c 7920 534f 4150 e not fully SOAP\n+0013a6f0: 2031 2e31 2f31 2e32 2052 5043 2065 6e63 1.1/1.2 RPC enc\n+0013a700: 6f64 696e 6720 636f 6d70 6c69 616e 7420 oding compliant \n+0013a710: 7769 7468 2072 6573 7065 6374 2074 6f20 with respect to \n+0013a720: 7072 6f63 6573 7369 6e67 2069 642d 6872 processing id-hr\n+0013a730: 6566 2f72 6566 2061 7474 7269 6275 7465 ef/ref attribute\n+0013a740: 732e 2048 6f77 6576 6572 2c20 7472 6565 s. However, tree\n+0013a750: 2073 6572 6961 6c69 7a61 7469 6f6e 2077 serialization w\n+0013a760: 696c 6c20 6475 706c 6963 6174 6520 6461 ill duplicate da\n+0013a770: 7461 2077 6865 6e20 7468 6973 2064 6174 ta when this dat\n+0013a780: 6120 6973 2063 6f2d 7265 6665 7265 6e63 a is co-referenc\n+0013a790: 6564 2e20 4379 636c 6573 2061 7265 2064 ed. Cycles are d\n+0013a7a0: 6574 6563 7465 6420 616e 6420 6272 6f6b etected and brok\n+0013a7b0: 656e 2074 6f20 6176 6f69 6420 696e 6669 en to avoid infi\n+0013a7c0: 6e69 7465 2073 6572 6961 6c69 7a61 7469 nite serializati\n+0013a7d0: 6f6e 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 on.
    .In addition to \n+0013a7f0: 7468 6520 636f 6e74 6578 7420 6d6f 6465 the context mode\n+0013a800: 2066 6c61 6773 2c20 7468 6520 666f 6c6c flags, the foll\n+0013a810: 6f77 696e 6720 636f 6e74 6578 7420 666c owing context fl\n+0013a820: 6167 7320 6361 6e20 6265 2075 7365 6420 ags can be used \n+0013a830: 746f 2073 6574 203c 636f 6465 3e73 6574 to set set\n+0013a840: 736f 636b 6f70 743c 2f63 6f64 653e 206c sockopt l\n+0013a850: 6576 656c 203c 636f 6465 3e53 4f4c 5f53 evel SOL_S\n+0013a860: 4f43 4b45 543c 2f63 6f64 653e 206f 7074 OCKET opt\n+0013a870: 696f 6e73 2077 6865 6e20 736f 636b 6574 ions when socket\n+0013a880: 7320 6172 6520 6372 6561 7465 642c 2074 s are created, t\n+0013a890: 686f 7567 6820 736f 6d65 206f 7074 696f hough some optio\n+0013a8a0: 6e73 206d 6179 206e 6f74 2062 6520 6170 ns may not be ap\n+0013a8b0: 706c 6963 6162 6c65 2074 6f20 796f 7572 plicable to your\n+0013a8c0: 206f 7065 7261 7469 6e67 2073 7973 7465 operating syste\n+0013a8d0: 6d3a 3c2f 703e 0a3c 7461 626c 6520 636c m:

    .......\n+0013ab60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0013ac20: 6170 3a3a 636f 6e6e 6563 745f 666c 6167 ap::connect_flag\n+0013ac30: 733c 2f61 3e3c 2f63 6f64 653e 203d 203c s = <\n+0013ac40: 636f 6465 3e53 4f5f 4445 4255 473c 2f63 code>SO_DEBUG ..\n+0013ae40: 7065 726d 6974 7320 7365 6e64 696e 6720 permits sending \n+0013ae50: 6f66 2062 726f 6164 6361 7374 206d 6573 of broadcast mes\n+0013ae60: 7361 6765 732c 2066 6f72 2065 7861 6d70 sages, for examp\n+0013ae70: 6c65 2077 6974 6820 5544 502c 2077 6865 le with UDP, whe\n+0013ae80: 6e20 7065 726d 6974 7465 6420 2020 203c n permitted <\n+0013ae90: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>........\n+0013b4a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0013b560: 6170 3a3a 6163 6365 7074 5f66 6c61 6773 ap::accept_flags\n+0013b570: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_DEBUG ....\n+0013ba30: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+0013bc20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0013bce0: 703a 3a62 696e 645f 666c 6167 733c 2f61 p::bind_flags = SO_REUSEPORT .
    context fl\n+0013a940: 6167 2077 6974 6820 7365 7473 6f63 6b6f ag with setsocko\n+0013a950: 7074 206f 7074 696f 6e20 2020 3c2f 7468 pt option result
    soap::c\n+0013aaa0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n+0013aab0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n+0013aac0: 534f 5f4e 4f53 4947 5049 5045 3c2f 636f SO_NOSIGPIPE dis\n+0013ab00: 6162 6c65 7320 5349 4750 4950 4520 2020 ables SIGPIPE \n+0013ab10: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    tu\n+0013ac80: 726e 7320 6f6e 2072 6563 6f72 6469 6e67 rns on recording\n+0013ac90: 206f 6620 6465 6275 6767 696e 6720 696e of debugging in\n+0013aca0: 666f 726d 6174 696f 6e20 696e 2074 6865 formation in the\n+0013acb0: 2075 6e64 6572 6c79 696e 6720 7072 6f74 underlying prot\n+0013acc0: 6f63 6f6c 206d 6f64 756c 6573 2020 2020 ocol modules \n+0013acd0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    soap\n+0013ade0: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags<\n+0013adf0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_BROADCAST<\n+0013ae10: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    soap\n+0013afa0: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags<\n+0013afb0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_LINGER set\n+0013b000: 7320 636c 6965 6e74 2d73 6964 6520 6c69 s client-side li\n+0013b010: 6e67 6572 2074 696d 6520 746f 2074 6865 nger time to the\n+0013b020: 2076 616c 7565 206f 6620 3c63 6f64 653e value of \n+0013b030: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::li\n+0013b0f0: 6e67 6572 5f74 696d 653c 2f61 3e3c 2f63 nger_time
    soap::connec\n+0013b220: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_DO\n+0013b240: 4e54 524f 5554 453c 2f63 6f64 653e 2020 NTROUTE \n+0013b250: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n+0013b280: 726f 7574 696e 6720 6279 7061 7373 2066 routing bypass f\n+0013b290: 6f72 206f 7574 676f 696e 6720 6d65 7373 or outgoing mess\n+0013b2a0: 6167 6573 2020 2020 3c2f 7464 3e3c 2f74 ages
    soap::accep\n+0013b3c0: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_NO\n+0013b3e0: 5349 4750 4950 453c 2f63 6f64 653e 2020 SIGPIPE \n+0013b3f0: 203c 2f74 643e 3c74 6420 636c 6173 733d disables\n+0013b420: 2053 4947 5049 5045 2028 6368 6563 6b20 SIGPIPE (check \n+0013b430: 796f 7572 204f 532c 2074 6869 7320 6973 your OS, this is\n+0013b440: 206e 6f74 2070 6f72 7461 626c 6529 2020 not portable) \n+0013b450: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    tur\n+0013b5c0: 6e73 206f 6e20 7265 636f 7264 696e 6720 ns on recording \n+0013b5d0: 6f66 2064 6562 7567 6769 6e67 2069 6e66 of debugging inf\n+0013b5e0: 6f72 6d61 7469 6f6e 2069 6e20 7468 6520 ormation in the \n+0013b5f0: 756e 6465 726c 7969 6e67 2070 726f 746f underlying proto\n+0013b600: 636f 6c20 6d6f 6475 6c65 7320 2020 203c col modules <\n+0013b610: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    soap\n+0013b720: 3a3a 6163 6365 7074 5f66 6c61 6773 3c2f ::accept_flags = SO_LINGER sets\n+0013b780: 2073 6572 7665 722d 7369 6465 206c 696e server-side lin\n+0013b790: 6765 7220 7469 6d65 2074 6f20 7468 6520 ger time to the \n+0013b7a0: 7661 6c75 6520 6f66 203c 636f 6465 3e3c value of <\n+0013b7b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013b7c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013b7d0: 6d6c 2361 3066 3464 3032 3530 3533 6664 ml#a0f4d025053fd\n+0013b7e0: 6537 3732 3136 6130 6361 3637 3430 3737 e77216a0ca674077\n+0013b7f0: 3139 3864 2220 7469 746c 653d 2255 7365 198d\" title=\"Use\n+0013b800: 722d 6465 6669 6e61 626c 6520 6c69 6e67 r-definable ling\n+0013b810: 6572 2074 696d 6520 7661 6c75 652c 2072 er time value, r\n+0013b820: 6571 7569 7265 7320 7468 6520 534f 5f4c equires the SO_L\n+0013b830: 494e 4745 5220 7365 7473 6f63 6b6f 7074 INGER setsockopt\n+0013b840: 2066 6c61 6720 7661 6c75 6520 746f 2062 flag value to b\n+0013b850: 6520 6173 7369 676e 6564 2074 6f20 736f e assigned to so\n+0013b860: 6170 2e2e 2e22 3e73 6f61 703a 3a6c 696e ap...\">soap::lin\n+0013b870: 6765 725f 7469 6d65 3c2f 613e 3c2f 636f ger_time
    soap::accept_\n+0013b9a0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+0013b9b0: 203d 203c 636f 6465 3e53 4f5f 444f 4e54 = SO_DONT\n+0013b9c0: 524f 5554 453c 2f63 6f64 653e 2020 203c ROUTE <\n+0013b9d0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables ro\n+0013ba00: 7574 696e 6720 6279 7061 7373 2066 6f72 uting bypass for\n+0013ba10: 206f 7574 676f 696e 6720 6d65 7373 6167 outgoing messag\n+0013ba20: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es
    soap::bind_fl\n+0013bb40: 6167 733c 2f61 3e3c 2f63 6f64 653e 203d ags =\n+0013bb50: 203c 636f 6465 3e53 4f5f 5245 5553 4541 SO_REUSEA\n+0013bb60: 4444 523c 2f63 6f64 653e 2020 203c 2f74 DDR enables loca\n+0013bba0: 6c20 6164 6472 6573 7320 7265 7573 6520 l address reuse \n+0013bbb0: 696d 6d65 6469 6174 656c 792c 2075 7365 immediately, use\n+0013bbc0: 2077 6974 6820 6361 7574 696f 6e20 2020 with caution \n+0013bbd0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    en\n+0013bd40: 6162 6c65 7320 6475 706c 6963 6174 6520 ables duplicate \n+0013bd50: 6164 6472 6573 7320 616e 6420 706f 7274 address and port\n+0013bd60: 2062 696e 6469 6e67 7320 2020 3c2f 7464 bindings
    .\n+0013bd80: 3c70 3e46 6f72 2065 7861 6d70 6c65 2c20

    For example, \n+0013bd90: 7768 656e 203c 636f 6465 3e3c 6120 636c when soap::accept_\n+0013be60: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+0013be70: 2069 7320 7365 7420 746f 203c 636f 6465 is set to (SO_NOSIGPIPE |\n+0013be90: 2053 4f5f 4c49 4e47 4552 293c 2f63 6f64 SO_LINGER) this disables\n+0013beb0: 2053 4947 5049 5045 2073 6967 6e61 6c73 SIGPIPE signals\n+0013bec0: 2061 6e64 2073 6574 206c 696e 6765 7220 and set linger \n+0013bed0: 7469 6d65 2076 616c 7565 2067 6976 656e time value given\n+0013bee0: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap::linger_t\n+0013bfb0: 696d 653c 2f61 3e3c 2f63 6f64 653e 2c20 ime, \n+0013bfc0: 7768 6963 6820 6973 207a 6572 6f20 6279 which is zero by\n+0013bfd0: 2064 6566 6175 6c74 2e3c 2f70 3e0a 3c70 default.

    .The soap::socket_\n+0013c0b0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+0013c0c0: 2063 6f6e 7465 7874 2066 6c61 6720 6361 context flag ca\n+0013c0d0: 6e20 6265 2075 7365 6420 746f 2070 6173 n be used to pas\n+0013c0e0: 7320 6f70 7469 6f6e 7320 746f 2074 6865 s options to the\n+0013c0f0: 203c 636f 6465 3e26 6c74 3b73 7973 2f73 <sys/s\n+0013c100: 6f63 6b65 742e 6826 6774 3b3c 2f63 6f64 ocket.h> send, send\n+0013c130: 746f 3c2f 636f 6465 3e2c 203c 636f 6465 to, recv, an\n+0013c150: 6420 3c63 6f64 653e 7265 6376 6672 6f6d d recvfrom\n+0013c160: 3c2f 636f 6465 3e20 6361 6c6c 7320 6d61 calls ma\n+0013c170: 6465 2062 7920 7468 6520 656e 6769 6e65 de by the engine\n+0013c180: 2c20 7468 6f75 6768 2073 6f6d 6520 6f70 , though some op\n+0013c190: 7469 6f6e 7320 6d61 7920 6e6f 7420 6265 tions may not be\n+0013c1a0: 2061 7070 6c69 6361 626c 6520 746f 2079 applicable to y\n+0013c1b0: 6f75 7220 6f70 6572 6174 696e 6720 7379 our operating sy\n+0013c1c0: 7374 656d 3a3c 2f70 3e0a 3c74 6162 6c65 stem:

    ...context\n+0013c230: 2066 6c61 6720 7769 7468 2073 656e 742f flag with sent/\n+0013c240: 7265 6376 2066 6c61 6773 2020 203c 2f74 recv flags result ..soap::\n+0013c390: 736f 636b 6574 5f66 6c61 6773 3c2f 613e socket_flags\n+0013c3a0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e
    = \n+0013c3b0: 4d53 475f 4e4f 5349 474e 414c 3c2f 636f MSG_NOSIGNAL dis\n+0013c3f0: 6162 6c65 7320 5349 4750 4950 4520 2020 ables SIGPIPE \n+0013c400: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+0013c450: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0013c510: 6170 3a3a 736f 636b 6574 5f66 6c61 6773 ap::socket_flags\n+0013c520: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = MSG_DONTROUT\n+0013c540: 453c 2f63 6f64 653e 2020 203c 2f74 643e E \n+0013c550: 3c74 6420 636c 6173 733d 226d 6172 6b64 enables routin\n+0013c580: 6720 6279 7061 7373 2066 6f72 206f 7574 g bypass for out\n+0013c590: 676f 696e 6720 6d65 7373 6167 6573 2020 going messages \n+0013c5a0: 203c 2f74 643e 3c2f 7472 3e0a 3c2f 7461 ..

    Furtherm\n+0013c5c0: 6f72 652c 2074 6865 203c 636f 6465 3e73 ore, the s\n+0013c5d0: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt\n+0013c5e0: 206c 6576 656c 203c 636f 6465 3e53 4f4c level SOL\n+0013c5f0: 5f53 4f43 4b45 543c 2f63 6f64 653e 206f _SOCKET o\n+0013c600: 7074 696f 6e73 203c 636f 6465 3e53 4f5f ptions SO_\n+0013c610: 534e 4442 5546 3c2f 636f 6465 3e20 616e SNDBUF an\n+0013c620: 6420 3c63 6f64 653e 534f 5f52 4356 4255 d SO_RCVBU\n+0013c630: 463c 2f63 6f64 653e 2061 7265 2073 6574 F are set\n+0013c640: 2074 6865 2065 6e67 696e 6520 7768 656e the engine when\n+0013c650: 203c 636f 6465 3e3c 6120 636c 6173 733d so\n+0013c700: 6170 3a3a 736e 6462 7566 3c2f 613e 3c2f ap::sndbuf and \n+0013c720: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::rcv\n+0013c7d0: 6275 663c 2f61 3e3c 2f63 6f64 653e 2061 buf a\n+0013c7e0: 7265 2073 6574 2074 6f20 6120 6e6f 6e7a re set to a nonz\n+0013c7f0: 6572 6f20 7661 6c75 652e 2054 6865 2064 ero value. The d\n+0013c800: 6566 6175 6c74 2076 616c 7565 2069 7320 efault value is \n+0013c810: 3c63 6f64 653e 2353 4f41 505f 4255 464c #SOAP_BUFL\n+0013c820: 454e 3c2f 636f 6465 3e2c 2077 6869 6368 EN, which\n+0013c830: 2069 7320 7468 6520 7361 6d65 2073 697a is the same siz\n+0013c840: 6520 7573 6564 2062 7920 7468 6520 696e e used by the in\n+0013c850: 7465 726e 616c 2062 7566 6665 7220 3c63 ternal buffer soap\n+0013c920: 3a3a 6275 663c 2f61 3e3c 2f63 6f64 653e ::buf\n+0013c930: 2074 6f20 7365 6e64 2061 6e64 2072 6563 to send and rec\n+0013c940: 6569 7665 206d 6573 7361 6765 732e 2041 eive messages. A\n+0013c950: 207a 6572 6f20 7661 6c75 6520 6f6d 6974 zero value omit\n+0013c960: 7320 7468 6520 696e 7465 726e 616c 203c s the internal <\n+0013c970: 636f 6465 3e73 6574 736f 636b 6f70 743c code>setsockopt<\n+0013c980: 2f63 6f64 653e 2063 616c 6c20 746f 2073 /code> call to s\n+0013c990: 6574 2074 6865 7365 206f 7074 696f 6e73 et these options\n+0013c9a0: 2e20 5365 7474 696e 6720 7468 6573 6520 . Setting these \n+0013c9b0: 7661 6c75 6573 2074 6f20 7a65 726f 2061 values to zero a\n+0013c9c0: 6374 6976 6174 6573 2061 7574 6f2d 7475 ctivates auto-tu\n+0013c9d0: 6e69 6e67 2077 6974 6820 4c69 6e75 7820 ning with Linux \n+0013c9e0: 322e 3420 616e 6420 6772 6561 7465 722e 2.4 and greater.\n+0013c9f0: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The setsockopt level \n+0013ca20: 534f 4c5f 534f 434b 4554 3c2f 636f 6465 SOL_SOCKET option S\n+0013ca40: 4f5f 4b45 4550 414c 4956 453c 2f63 6f64 O_KEEPALIVE is set when k\n+0013ca60: 6565 702d 616c 6976 6520 6973 2065 6e61 eep-alive is ena\n+0013ca70: 626c 6564 2077 6974 6820 636f 6e74 6578 bled with contex\n+0013ca80: 7420 666c 6167 203c 636f 6465 3e23 534f t flag #SO\n+0013ca90: 4150 5f49 4f5f 4b45 4550 414c 4956 453c AP_IO_KEEPALIVE<\n+0013caa0: 2f63 6f64 653e 206f 7220 7768 656e 203c /code> or when <\n+0013cab0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0013cb70: 703a 3a74 6370 5f6b 6565 705f 616c 6976 p::tcp_keep_aliv\n+0013cb80: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is \n+0013cb90: 6e6f 6e7a 6572 6f2e 2057 6974 6820 3c63 nonzero. With soap\n+0013cc60: 3a3a 7463 705f 6b65 6570 5f61 6c69 7665 ::tcp_keep_alive\n+0013cc70: 3c2f 613e 3c2f 636f 6465 3e20 6164 6469 addi\n+0013cc80: 7469 6f6e 616c 206f 7074 696f 6e73 2063 tional options c\n+0013cc90: 616e 2062 6520 7370 6563 6966 6965 6420 an be specified \n+0013cca0: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap::\n+0013cd50: 7463 705f 6b65 6570 5f69 646c 653c 2f61 tcp_keep_idle, \n+0013cd70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+0013ce10: 736f 6170 3a3a 7463 705f 6b65 6570 5f69 soap::tcp_keep_i\n+0013ce20: 6e74 766c 3c2f 613e 3c2f 636f 6465 3e2c ntvl,\n+0013ce30: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::t\n+0013cee0: 6370 5f6b 6565 705f 636e 743c 2f61 3e3c cp_keep_cnt<\n+0013cef0: 2f63 6f64 653e 2e20 466f 7220 6578 616d /code>. For exam\n+0013cf00: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    <\n+0013cf20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0013cf30: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+0013cf80: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+0013cfb0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+0013d010: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    soap\n+0013d060: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->tcp_keep_alive\n+0013d0c0: 3c2f 613e 203d 2031 3b20 2020 3c73 7061 = 1; // setsockopt \n+0013d0f0: 534f 5f4b 4545 5041 4c49 5645 3c2f 7370 SO_KEEPALIVE
    .
    soap->\n+0013d150: 3c61 2063 6c61 7373 3d22 636f 6465 2220 tcp_kee\n+0013d1a0: 705f 6964 6c65 3c2f 613e 203d 2033 303b p_idle = 30;\n+0013d1b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // time\n+0013d1d0: 2069 6e20 7365 636f 6e64 7320 7468 6520 in seconds the \n+0013d1e0: 636f 6e6e 6563 7469 6f6e 206e 6565 6473 connection needs\n+0013d1f0: 2074 6f20 7265 6d61 696e 2069 646c 6520 to remain idle \n+0013d200: 6265 666f 7265 2054 4350 2073 7461 7274 before TCP start\n+0013d210: 7320 7365 6e64 696e 6720 6b65 6570 616c s sending keepal\n+0013d220: 6976 6520 7072 6f62 6573 3c2f 7370 616e ive probes
    .
    soap->tcp_keep_\n+0013d2d0: 696e 7476 6c3c 2f61 3e20 3d20 3132 303b intvl = 120;\n+0013d2e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // time i\n+0013d300: 6e20 7365 636f 6e64 7320 6265 7477 6565 n seconds betwee\n+0013d310: 6e20 696e 6469 7669 6475 616c 206b 6565 n individual kee\n+0013d320: 7061 6c69 7665 2070 726f 6265 733c 2f73 palive probes
    .
    soap->\n+0013d380: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;tcp_ke\n+0013d3d0: 6570 5f63 6e74 3c2f 613e 203d 2035 3b20 ep_cnt = 5; \n+0013d3e0: 2020 2020 3c73 7061 6e20 636c 6173 733d // max\n+0013d400: 696d 756d 206e 756d 6265 7220 6f66 206b imum number of k\n+0013d410: 6565 7061 6c69 7665 2070 726f 6265 7320 eepalive probes \n+0013d420: 5443 5020 7368 6f75 6c64 2073 656e 6420 TCP should send \n+0013d430: 6265 666f 7265 2064 726f 7070 696e 6720 before dropping \n+0013d440: 7468 6520 636f 6e6e 6563 7469 6f6e 3c2f the connection
    .
    soap::tcp_k\n+0013d500: 6565 705f 636e 743c 2f61 3e3c 2f64 6976 eep_cnt
    unsigned in\n+0013d530: 7420 7463 705f 6b65 6570 5f63 6e74 3c2f t tcp_keep_cnt
    User-defi\n+0013d560: 6e61 626c 6520 7661 6c75 6520 746f 2073 nable value to s\n+0013d570: 6574 2054 4350 5f4b 4545 5043 4e54 2073 et TCP_KEEPCNT s\n+0013d580: 6574 736f 636b 6f70 7420 2874 6865 2076 etsockopt (the v\n+0013d590: 616c 7565 2069 7320 3020 6279 2064 6566 alue is 0 by def\n+0013d5a0: 6175 6c74 293c 2f64 6976 3e3c 6469 7620 ault)
    Definition:\n+0013d5d0: 2073 7464 736f 6170 322e 683a 3335 3834 stdsoap2.h:3584\n+0013d5e0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    soap::tcp_\n+0013d690: 6b65 6570 5f69 6e74 766c 3c2f 613e 3c2f keep_intvl
    unsigned\n+0013d6c0: 2069 6e74 2074 6370 5f6b 6565 705f 696e int tcp_keep_in\n+0013d6d0: 7476 6c3c 2f64 6976 3e3c 6469 7620 636c tvl
    User\n+0013d6f0: 2d64 6566 696e 6162 6c65 2076 616c 7565 -definable value\n+0013d700: 2074 6f20 7365 7420 5443 505f 4b45 4550 to set TCP_KEEP\n+0013d710: 494e 5456 4c20 7365 7473 6f63 6b6f 7074 INTVL setsockopt\n+0013d720: 2028 7468 6520 7661 6c75 6520 6973 2030 (the value is 0\n+0013d730: 2062 7920 6465 6661 756c 7429 3c2f 6469 by default)
    Definiti\n+0013d760: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0013d770: 2e68 3a33 3535 393c 2f64 6976 3e3c 2f64 .h:3559
    .
    un\n+0013d850: 7369 676e 6564 2069 6e74 2074 6370 5f6b signed int tcp_k\n+0013d860: 6565 705f 6964 6c65 3c2f 6469 763e 3c64 eep_idle
    User-definable \n+0013d890: 7661 6c75 6520 746f 2073 6574 2054 4350 value to set TCP\n+0013d8a0: 5f4b 4545 5049 444c 4520 7365 7473 6f63 _KEEPIDLE setsoc\n+0013d8b0: 6b6f 7074 2028 7468 6520 7661 6c75 6520 kopt (the value \n+0013d8c0: 6973 2030 2062 7920 6465 6661 756c 7429 is 0 by default)\n+0013d8d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+0013d8f0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+0013d900: 6f61 7032 2e68 3a33 3533 343c 2f64 6976 oap2.h:3534
    .
    <\n+0013d9d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0013d9e0: 6922 3e69 6e74 2074 6370 5f6b 6565 705f i\">int tcp_keep_\n+0013d9f0: 616c 6976 653c 2f64 6976 3e3c 6469 7620 alive
    Us\n+0013da10: 6572 2d64 6566 696e 6162 6c65 2076 616c er-definable val\n+0013da20: 7565 2074 6f20 7365 7420 534f 5f4b 4545 ue to set SO_KEE\n+0013da30: 5041 4c49 5645 2073 6574 736f 636b 6f70 PALIVE setsockop\n+0013da40: 7420 2830 2062 7920 6465 6661 756c 7420 t (0 by default \n+0013da50: 756e 6c65 7373 2074 6865 2023 534f 4150 unless the #SOAP\n+0013da60: 5f49 4f5f 4b45 4550 414c 4956 4520 6d6f _IO_KEEPALIVE mo\n+0013da70: 6465 202e 2e2e 3c2f 6469 763e 3c64 6976 de ...
    <\n+0013da90: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:350\n+0013dab0: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 9
    .

    For UDP \n+0013dae0: 6d65 7373 6167 696e 672c 2075 7365 203c messaging, use <\n+0013daf0: 636f 6465 3e23 534f 4150 5f49 4f5f 5544 code>#SOAP_IO_UD\n+0013db00: 503c 2f63 6f64 653e 2e20 5365 6520 616c P. See al\n+0013db10: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section S\n+0013db40: 4f41 502f 584d 4c20 6f76 6572 2055 4450 OAP/XML over UDP\n+0013db50: 3c2f 613e 2e20 5468 6520 636f 6e74 6578 . The contex\n+0013db60: 7420 666c 6167 7320 7468 6174 2063 616e t flags that can\n+0013db70: 2062 6520 7365 7420 6174 2074 6865 2063 be set at the c\n+0013db80: 6c69 656e 7420 7369 6465 2066 6f72 2055 lient side for U\n+0013db90: 4450 206d 6573 7361 6769 6e67 2061 7265 DP messaging are\n+0013dba0: 203c 636f 6465 3e3c 6120 636c 6173 733d \n+0013dc50: 736f 6170 3a3a 6970 7634 5f6d 756c 7469 soap::ipv4_multi\n+0013dc60: 6361 7374 5f69 663c 2f61 3e3c 2f63 6f64 cast_if, soap::ipv4_mu\n+0013dd30: 6c74 6963 6173 745f 7474 6c3c 2f61 3e3c lticast_ttl<\n+0013dd40: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and soap::ipv\n+0013ddf0: 365f 6d75 6c74 6963 6173 745f 6966 3c2f 6_multicast_if:

    .<\n+0013de10: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n+0013de20: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..co\n+0013de70: 6e74 6578 7420 666c 6167 2020 203c 2f74 ntext flag result ..soap:\n+0013dfb0: 3a69 7076 345f 6d75 6c74 6963 6173 745f :ipv4_multicast_\n+0013dfc0: 6966 3c2f 613e 3c2f 636f 6465 3e20 2020 if \n+0013dfd0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 set setsockopt level I\n+0013e020: 5050 524f 544f 5f49 503c 2f63 6f64 653e PPROTO_IP\n+0013e030: 2074 6f20 3c63 6f64 653e 4950 5f4d 554c to IP_MUL\n+0013e040: 5449 4341 5354 5f49 463c 2f63 6f64 653e TICAST_IF\n+0013e050: 2077 6974 6820 7661 6c75 6520 3c63 6f64 with value soap:\n+0013e110: 3a69 7076 345f 6d75 6c74 6963 6173 745f :ipv4_multicast_\n+0013e120: 6966 3c2f 613e 3c2f 636f 6465 3e20 7768 if
    wh\n+0013e130: 656e 206e 6f6e 2d4e 554c 4c20 2020 203c en non-NULL <\n+0013e140: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..soa\n+0013e240: 703a 3a69 7076 345f 6d75 6c74 6963 6173 p::ipv4_multicas\n+0013e250: 745f 7474 6c3c 2f61 3e3c 2f63 6f64 653e t_ttl\n+0013e260: 2020 203c 2f74 643e 3c74 6420 636c 6173 set setsockopt level IPPROTO_IP to IP_\n+0013e2d0: 4d55 4c54 4943 4153 545f 5454 4c3c 2f63 MULTICAST_TTL with value \n+0013e2f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s\n+0013e3a0: 6f61 703a 3a69 7076 345f 6d75 6c74 6963 oap::ipv4_multic\n+0013e3b0: 6173 745f 7474 6c3c 2f61 3e3c 2f63 6f64 ast_ttl when nonzero \n+0013e3d0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+0013e400: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013e410: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013e420: 3e3c 636f 6465 3e3c 6120 636c 6173 733d >soap\n+0013e4c0: 3a3a 6970 7636 5f6d 756c 7469 6361 7374 ::ipv6_multicast\n+0013e4d0: 5f69 663c 2f61 3e3c 2f63 6f64 653e 2020 _if \n+0013e4e0: 203c 2f74 643e 3c74 6420 636c 6173 733d set sockaddr_in6::\n+0013e520: 7369 6e36 5f73 636f 7065 5f69 643c 2f63 sin6_scope_id to soap::ipv6_mu\n+0013e5e0: 6c74 6963 6173 745f 6966 3c2f 613e 3c2f lticast_if when nonze\n+0013e600: 726f 2020 203c 2f74 643e 3c2f 7472 3e0a ro .\n+0013e610: 3c2f 7461 626c 653e 0a3c 703e f09f 949d .

    ....\n+0013e620: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+0013e630: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+0013e640: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+0013e650: 6831 3e3c 6120 636c 6173 733d 2261 6e63 h1>.Run-time\n+0013e680: 2065 7272 6f72 2063 6f64 6573 3c2f 6831 error codes.

    Status erro\n+0013e6a0: 7220 636f 6465 7320 6172 6520 696e 7465 r codes are inte\n+0013e6b0: 6765 7220 7661 6c75 6573 2c20 7768 6963 ger values, whic\n+0013e6c0: 6820 6172 6520 7265 7475 726e 6564 2062 h are returned b\n+0013e6d0: 7920 7468 6520 6753 4f41 5020 4150 4920 y the gSOAP API \n+0013e6e0: 6675 6e63 7469 6f6e 732e 2054 6865 2066 functions. The f\n+0013e6f0: 756c 6c20 6c69 7374 206f 6620 3c63 6f64 ull list of soap_status error \n+0013e7d0: 636f 6465 7320 6973 206c 6973 7465 6420 codes is listed \n+0013e7e0: 6265 6c6f 773a 3c2f 703e 0a3c 7461 626c below:

    ...Error \n+0013e850: 636f 6465 2020 203c 2f74 683e 3c74 6820 code De\n+0013e880: 7363 7269 7074 696f 6e20 2020 203c 2f74 scription ..#SOAP_OK
    \n+0013e8f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 No err\n+0013e920: 6f72 2028 7a65 726f 2920 2020 203c 2f74 or (zero) ..#SOAP_CLI_FAUL\n+0013e990: 543c 2f63 6f64 653e 2020 203c 2f74 643e T
    \n+0013e9a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 The service re\n+0013e9d0: 7475 726e 6564 2061 2053 4f41 5020 312e turned a SOAP 1.\n+0013e9e0: 3120 636c 6965 6e74 2066 6175 6c74 202f 1 client fault /\n+0013e9f0: 2053 4f41 5020 312e 3220 7365 6e64 6572 SOAP 1.2 sender\n+0013ea00: 2066 6175 6c74 2074 6f20 7468 6520 636c fault to the cl\n+0013ea10: 6965 6e74 2020 2020 3c2f 7464 3e3c 2f74 ient ..#SOA\n+0013ea70: 505f 4441 5441 454e 434f 4449 4e47 554e P_DATAENCODINGUN\n+0013ea80: 4b4e 4f57 4e3c 2f63 6f64 653e 2020 203c KNOWN <\n+0013ea90: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>SOAP 1.2 D\n+0013eac0: 6174 6145 6e63 6f64 696e 6755 6e6b 6e6f ataEncodingUnkno\n+0013ead0: 776e 2066 6175 6c74 2020 2020 3c2f 7464 wn fault ..#SOAP_DEL_METHO\n+0013eb40: 443c 2f63 6f64 653e 2020 203c 2f74 643e D \n+0013eb50: 3c74 6420 636c 6173 733d 226d 6172 6b64 An HTTP DELETE\n+0013eb80: 2072 6571 7565 7374 2077 6173 2072 6563 request was rec\n+0013eb90: 6569 7665 6420 6279 2074 6865 2073 6572 eived by the ser\n+0013eba0: 7669 6365 2062 7574 2074 6865 2044 454c vice but the DEL\n+0013ebb0: 4554 4520 7265 7175 6573 7420 6361 6c6c ETE request call\n+0013ebc0: 6261 636b 203c 636f 6465 3e3c 6120 636c back soap::fdel<\n+0013eca0: 2f63 6f64 653e 2069 7320 6e6f 7420 696d /code> is not im\n+0013ecb0: 706c 656d 656e 7465 642c 2073 6565 2053 plemented, see S\n+0013ecc0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection \n+0013ecf0: 4675 6e63 7469 6f6e 2063 616c 6c62 6163 Function callbac\n+0013ed00: 6b73 2066 6f72 2063 7573 746f 6d69 7a65 ks for customize\n+0013ed10: 6420 492f 4f20 616e 6420 4854 5450 2068 d I/O and HTTP h\n+0013ed20: 616e 646c 696e 673c 2f61 3e20 2020 203c andling <\n+0013ed30: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_DIME_EN\n+0013ed90: 443c 2f63 6f64 653e 2020 203c 2f74 643e D \n+0013eda0: 3c74 6420 636c 6173 733d 226d 6172 6b64 End of DIME at\n+0013edd0: 7461 6368 6d65 6e74 7320 7072 6f74 6f63 tachments protoc\n+0013ede0: 6f6c 2065 7272 6f72 2020 2020 3c2f 7464 ol error ..#SOAP_DIME_ERRO\n+0013ee50: 523c 2f63 6f64 653e 2020 203c 2f74 643e R \n+0013ee60: 3c74 6420 636c 6173 733d 226d 6172 6b64 DIME formattin\n+0013ee90: 6720 6572 726f 7220 6f72 2044 494d 4520 g error or DIME \n+0013eea0: 6174 7461 6368 6d65 6e74 2073 697a 6520 attachment size \n+0013eeb0: 6578 6365 6564 7320 3c63 6f64 653e 2353 exceeds #S\n+0013eec0: 4f41 505f 4d41 5844 494d 4553 495a 453c OAP_MAXDIMESIZE<\n+0013eed0: 2f63 6f64 653e 2020 2020 3c2f 7464 3e3c /code> <\n+0013eee0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S\n+0013ef30: 4f41 505f 4449 4d45 5f48 5245 463c 2f63 OAP_DIME_HREF DI\n+0013ef70: 4d45 2061 7474 6163 686d 656e 7420 6861 ME attachment ha\n+0013ef80: 7320 6e6f 2068 7265 6620 6672 6f6d 2053 s no href from S\n+0013ef90: 4f41 5020 626f 6479 2061 6e64 206e 6f20 OAP body and no \n+0013efa0: 4449 4d45 2063 616c 6c62 6163 6b73 2077 DIME callbacks w\n+0013efb0: 6572 6520 6465 6669 6e65 6420 746f 2073 ere defined to s\n+0013efc0: 6176 6520 7468 6520 6174 7461 6368 6d65 ave the attachme\n+0013efd0: 6e74 2020 2020 3c2f 7464 3e3c 2f74 723e nt \n+0013efe0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP\n+0013f030: 5f44 494d 455f 4d49 534d 4154 4348 3c2f _DIME_MISMATCH D\n+0013f070: 494d 4520 7665 7273 696f 6e20 6572 726f IME version erro\n+0013f080: 7220 2020 203c 2f74 643e 3c2f 7472 3e0a r .\n+0013f090: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0013f0b0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_D\n+0013f0e0: 5550 4c49 4341 5445 5f49 443c 2f63 6f64 UPLICATE_ID XML \n+0013f120: 656c 656d 656e 7420 6861 7320 6475 706c element has dupl\n+0013f130: 6963 6174 6520 6964 2061 7474 7269 6275 icate id attribu\n+0013f140: 7465 2076 616c 7565 2028 6170 706c 6963 te value (applic\n+0013f150: 6162 6c65 2074 6f20 534f 4150 206d 756c able to SOAP mul\n+0013f160: 7469 2d72 6566 2065 6e63 6f64 696e 6720 ti-ref encoding \n+0013f170: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_\n+0013f180: 584d 4c5f 4752 4150 483c 2f63 6f64 653e XML_GRAPH\n+0013f190: 2073 6572 6961 6c69 7a61 7469 6f6e 2920 serialization) \n+0013f1a0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0013f1d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_EM\n+0013f200: 5054 593c 2f63 6f64 653e 2020 203c 2f74 PTY XML element \n+0013f240: 6f72 2061 7474 7269 6275 7465 2069 7320 or attribute is \n+0013f250: 656d 7074 7920 7768 656e 2061 2076 616c empty when a val\n+0013f260: 7565 2069 7320 7265 7175 6972 6564 2020 ue is required \n+0013f270: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n+0013f2c0: 3c63 6f64 653e 2353 4f41 505f 454f 463c #SOAP_EOF<\n+0013f2d0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+0013f300: 556e 6578 7065 6374 6564 2065 6e64 206f Unexpected end o\n+0013f310: 6620 6669 6c65 2c20 6e6f 2069 6e70 7574 f file, no input\n+0013f320: 2c20 7472 616e 736d 6973 7369 6f6e 2069 , transmission i\n+0013f330: 6e74 6572 7275 7074 6564 206f 7220 7469 nterrupted or ti\n+0013f340: 6d65 6420 6f75 742c 2073 616d 6520 6173 med out, same as\n+0013f350: 203c 636f 6465 3e45 4f46 3c2f 636f 6465 EOF .\n+0013f370: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_\n+0013f3c0: 454f 4d3c 2f63 6f64 653e 2020 203c 2f74 EOM Out of memor\n+0013f400: 7920 2020 203c 2f74 643e 3c2f 7472 3e0a y .\n+0013f410: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0013f430: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_E\n+0013f460: 5252 3c2f 636f 6465 3e20 2020 3c2f 7464 RR Same as EOF, but\n+0013f4b0: 2069 6e64 6963 6174 6573 2061 6e20 756e indicates an un\n+0013f4c0: 7370 6563 6966 6965 6420 6572 726f 7220 specified error \n+0013f4d0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0013f500: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_FA\n+0013f530: 554c 543c 2f63 6f64 653e 2020 203c 2f74 ULT The fault co\n+0013f570: 6465 2074 6f20 6265 2072 6574 7572 6e65 de to be returne\n+0013f580: 6420 6279 2061 2073 6572 7669 6365 206f d by a service o\n+0013f590: 7065 7261 7469 6f6e 2077 6865 6e20 6361 peration when ca\n+0013f5a0: 6c6c 696e 6720 3c63 6f64 653e 3c61 2063 lling soap_s\n+0013f650: 656e 6465 725f 6661 756c 743c 2f61 3e3c ender_fault<\n+0013f660: 2f63 6f64 653e 2028 636c 6965 6e74 2069 /code> (client i\n+0013f670: 7320 6174 2066 6175 6c74 2920 6f72 203c s at fault) or <\n+0013f680: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_receiv\n+0013f730: 6572 5f66 6175 6c74 3c2f 613e 3c2f 636f er_fault (server is a\n+0013f750: 7420 6661 756c 7429 2c20 636c 6965 6e74 t fault), client\n+0013f760: 7320 7265 6365 6976 6520 7468 6520 6661 s receive the fa\n+0013f770: 756c 7420 6173 203c 636f 6465 3e23 534f ult as #SO\n+0013f780: 4150 5f43 4c49 5f46 4155 4c54 3c2f 636f AP_CLI_FAULT or #SO\n+0013f7a0: 4150 5f53 5652 5f46 4155 4c54 3c2f 636f AP_SVR_FAULT respectively\n+0013f7c0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+0013f7d0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013f7e0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0013f7f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_FD\n+0013f820: 5f45 5843 4545 4445 443c 2f63 6f64 653e _EXCEEDED\n+0013f830: 2020 203c 2f74 643e 3c74 6420 636c 6173 Too ma\n+0013f860: 6e79 206f 7065 6e20 736f 636b 6574 7320 ny open sockets \n+0013f870: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0013f8a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_FI\n+0013f8d0: 5845 443c 2f63 6f64 653e 2020 203c 2f74 XED XML element \n+0013f910: 6f72 2061 7474 7269 6275 7465 2076 616c or attribute val\n+0013f920: 7565 2069 7320 6669 7865 6420 616e 6420 ue is fixed and \n+0013f930: 7468 6520 7061 7273 6564 2076 616c 7565 the parsed value\n+0013f940: 2064 6f65 7320 6e6f 7420 6d61 7463 6820 does not match \n+0013f950: 7468 6520 6669 7865 6420 7661 6c75 6520 the fixed value \n+0013f960: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+0013f990: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013f9a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013f9b0: 3e3c 636f 6465 3e23 534f 4150 5f47 4554 >#SOAP_GET\n+0013f9c0: 5f4d 4554 484f 443c 2f63 6f64 653e 2020 _METHOD \n+0013f9d0: 203c 2f74 643e 3c74 6420 636c 6173 733d An HTTP \n+0013fa00: 4745 5420 7265 7175 6573 7420 7761 7320 GET request was \n+0013fa10: 7265 6365 6976 6564 2062 7920 7468 6520 received by the \n+0013fa20: 7365 7276 6963 6520 6275 7420 7468 6520 service but the \n+0013fa30: 4745 5420 7265 7175 6573 7420 6361 6c6c GET request call\n+0013fa40: 6261 636b 203c 636f 6465 3e3c 6120 636c back soa\n+0013fb10: 703a 3a66 6765 743c 2f61 3e3c 2f63 6f64 p::fget is not implem\n+0013fb30: 656e 7465 642c 2073 6565 2053 6563 7469 ented, see Secti\n+0013fb40: 6f6e 7320 3c61 2063 6c61 7373 3d22 656c ons How to i\n+0013fb70: 6d70 6c65 6d65 6e74 2048 5454 5020 4745 mplement HTTP GE\n+0013fb80: 542c 2050 5554 2c20 616e 6420 5041 5443 T, PUT, and PATC\n+0013fb90: 4820 7365 7276 6963 6573 3c2f 613e 2061 H services a\n+0013fba0: 6e64 203c 6120 636c 6173 733d 2265 6c22 nd Func\n+0013fbd0: 7469 6f6e 2063 616c 6c62 6163 6b73 2066 tion callbacks f\n+0013fbe0: 6f72 2063 7573 746f 6d69 7a65 6420 492f or customized I/\n+0013fbf0: 4f20 616e 6420 4854 5450 2068 616e 646c O and HTTP handl\n+0013fc00: 696e 673c 2f61 3e20 2020 203c 2f74 643e ing \n+0013fc10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0013fc60: 2353 4f41 505f 4852 4546 3c2f 636f 6465 #SOAP_HREF Refer\n+0013fca0: 656e 6365 2074 6f20 6f62 6a65 6374 2069 ence to object i\n+0013fcb0: 6e20 584d 4c20 6964 656e 7469 6669 6564 n XML identified\n+0013fcc0: 2062 7920 6974 7320 6964 2061 7474 7269 by its id attri\n+0013fcd0: 6275 7465 2069 7320 696e 636f 6d70 6174 bute is incompat\n+0013fce0: 6962 6c65 2077 6974 6820 7468 6520 6f62 ible with the ob\n+0013fcf0: 6a65 6374 2072 6566 6572 7265 6420 746f ject referred to\n+0013fd00: 2062 7920 7468 6520 7265 6620 6f72 2068 by the ref or h\n+0013fd10: 7265 6620 6174 7472 6962 7574 6520 2861 ref attribute (a\n+0013fd20: 7070 6c69 6361 626c 6520 746f 2053 4f41 pplicable to SOA\n+0013fd30: 5020 6d75 6c74 692d 7265 6620 656e 636f P multi-ref enco\n+0013fd40: 6469 6e67 2061 6e64 203c 636f 6465 3e23 ding and #\n+0013fd50: 534f 4150 5f58 4d4c 5f47 5241 5048 3c2f SOAP_XML_GRAPH serializat\n+0013fd70: 696f 6e29 2020 2020 3c2f 7464 3e3c 2f74 ion) ..#SOA\n+0013fdd0: 505f 4854 5450 5f45 5252 4f52 3c2f 636f P_HTTP_ERROR An \n+0013fe10: 756e 7370 6563 6966 6965 6420 4854 5450 unspecified HTTP\n+0013fe20: 2065 7272 6f72 206f 6363 7572 7265 6420 error occurred \n+0013fe30: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0013fe60: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_HT\n+0013fe90: 5450 5f4d 4554 484f 443c 2f63 6f64 653e TP_METHOD\n+0013fea0: 2020 203c 2f74 643e 3c74 6420 636c 6173 An HTT\n+0013fed0: 5020 7265 7175 6573 7420 7761 7320 7265 P request was re\n+0013fee0: 6365 6976 6564 2062 7920 7468 6520 7365 ceived by the se\n+0013fef0: 7276 6963 6520 7468 6174 2063 616e 6e6f rvice that canno\n+0013ff00: 7420 6265 2068 616e 646c 6564 2020 2020 t be handled \n+0013ff10: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..#SOAP_IOB SO\n+0013ffa0: 4150 2061 7272 6179 2069 6e64 6578 206f AP array index o\n+0013ffb0: 7574 206f 6620 626f 756e 6473 2020 2020 ut of bounds \n+0013ffc0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+00140010: 636f 6465 3e23 534f 4150 5f4c 454e 4754 code>#SOAP_LENGT\n+00140020: 483c 2f63 6f64 653e 2020 203c 2f74 643e H \n+00140030: 3c74 6420 636c 6173 733d 226d 6172 6b64 XML element or\n+00140060: 2061 7474 7269 6275 7465 206c 656e 6774 attribute lengt\n+00140070: 6820 7661 6c69 6461 7469 6f6e 2065 7272 h validation err\n+00140080: 6f72 206f 7220 3c63 6f64 653e 2353 4f41 or or #SOA\n+00140090: 505f 4d41 584c 454e 4754 483c 2f63 6f64 P_MAXLENGTH exceeded <\n+001400b0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_LEVEL X\n+00140140: 4d4c 206e 6573 7469 6e67 2064 6570 7468 ML nesting depth\n+00140150: 206c 6576 656c 2065 7863 6565 6473 203c level exceeds <\n+00140160: 636f 6465 3e23 534f 4150 5f4d 4158 4c45 code>#SOAP_MAXLE\n+00140170: 5645 4c3c 2f63 6f64 653e 2020 2020 3c2f VEL ..#SOAP_MIME_EN\n+001401e0: 443c 2f63 6f64 653e 2020 203c 2f74 643e D \n+001401f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 End of MIME at\n+00140220: 7461 6368 6d65 6e74 7320 7072 6f74 6f63 tachments protoc\n+00140230: 6f6c 2065 7272 6f72 2020 2020 3c2f 7464 ol error ..\n+00140290: 2353 4f41 505f 4d49 4d45 5f45 5252 4f52 #SOAP_MIME_ERROR\n+001402a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+001402b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001402c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001402d0: 3e4d 494d 4520 6174 7461 6368 6d65 6e74 >MIME attachment\n+001402e0: 2070 6172 7369 6e67 2065 7272 6f72 2020 parsing error \n+001402f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00140320: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00140330: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00140340: 3e3c 636f 6465 3e23 534f 4150 5f4d 494d >#SOAP_MIM\n+00140350: 455f 4852 4546 3c2f 636f 6465 3e20 2020 E_HREF \n+00140360: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 MIME atta\n+00140390: 6368 6d65 6e74 2068 6173 206e 6f20 6872 chment has no hr\n+001403a0: 6566 2066 726f 6d20 534f 4150 2062 6f64 ef from SOAP bod\n+001403b0: 7920 616e 6420 6e6f 204d 494d 4520 6361 y and no MIME ca\n+001403c0: 6c6c 6261 636b 7320 7765 7265 2064 6566 llbacks were def\n+001403d0: 696e 6564 2074 6f20 7361 7665 2074 6865 ined to save the\n+001403e0: 2061 7474 6163 686d 656e 7420 2020 203c attachment <\n+001403f0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_MISSING\n+00140450: 5f49 443c 2f63 6f64 653e 2020 203c 2f74 _ID An XML eleme\n+00140490: 6e74 2077 6974 6820 6964 2061 7474 7269 nt with id attri\n+001404a0: 6275 7465 2069 7320 6d69 7373 696e 6720 bute is missing \n+001404b0: 7468 6174 2073 686f 756c 6420 6d61 7463 that should matc\n+001404c0: 6820 7468 6520 656c 656d 656e 7420 7769 h the element wi\n+001404d0: 7468 2068 7265 662f 7265 6620 6174 7472 th href/ref attr\n+001404e0: 6962 7574 6520 2861 7070 6c69 6361 626c ibute (applicabl\n+001404f0: 6520 746f 2053 4f41 5020 6d75 6c74 692d e to SOAP multi-\n+00140500: 7265 6620 656e 636f 6469 6e67 2061 6e64 ref encoding and\n+00140510: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML\n+00140520: 5f47 5241 5048 3c2f 636f 6465 3e20 7365 _GRAPH se\n+00140530: 7269 616c 697a 6174 696f 6e29 2020 2020 rialization) \n+00140540: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+00140590: 636f 6465 3e23 534f 4150 5f4d 4f45 3c2f code>#SOAP_MOE M\n+001405d0: 656d 6f72 7920 6f76 6572 666c 6f77 206f emory overflow o\n+001405e0: 7220 6d65 6d6f 7279 2063 6f72 7275 7074 r memory corrupt\n+001405f0: 696f 6e20 6572 726f 7220 2861 7070 6c69 ion error (appli\n+00140600: 6361 626c 6520 696e 203c 636f 6465 3e23 cable in #\n+00140610: 4445 4255 473c 2f63 6f64 653e 206d 6f64 DEBUG mod\n+00140620: 6520 6f6e 6c79 2920 2020 203c 2f74 643e e only) \n+00140630: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..#\n+00140680: 534f 4150 5f4d 5553 5455 4e44 4552 5354 SOAP_MUSTUNDERST\n+00140690: 414e 443c 2f63 6f64 653e 2020 203c 2f74 AND An XML eleme\n+001406d0: 6e74 2069 7320 7072 6573 656e 7420 7769 nt is present wi\n+001406e0: 7468 2061 206d 7573 7455 6e64 6572 7374 th a mustUnderst\n+001406f0: 616e 6420 6174 7472 6962 7574 6520 7768 and attribute wh\n+00140700: 6963 6820 6d75 7374 2062 6520 756e 6465 ich must be unde\n+00140710: 7273 746f 6f64 2062 7574 2069 7320 6e6f rstood but is no\n+00140720: 7420 6465 7365 7269 616c 697a 6564 2020 t deserialized \n+00140730: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00140760: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00140770: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00140780: 3e3c 636f 6465 3e23 534f 4150 5f4e 414d >#SOAP_NAM\n+00140790: 4553 5041 4345 3c2f 636f 6465 3e20 2020 ESPACE \n+001407a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML names\n+001407d0: 7061 6365 206e 616d 6520 6d69 736d 6174 pace name mismat\n+001407e0: 6368 2076 616c 6964 6174 696f 6e20 6572 ch validation er\n+001407f0: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror ..#SOAP\n+00140850: 5f4e 4f5f 4441 5441 3c2f 636f 6465 3e20 _NO_DATA \n+00140860: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 No data\n+00140890: 2069 6e20 7468 6520 4854 5450 2062 6f64 in the HTTP bod\n+001408a0: 7920 6f66 2074 6865 206d 6573 7361 6765 y of the message\n+001408b0: 2072 6563 6569 7665 6420 2020 203c 2f74 received ..#SOAP_NO_METHO\n+00140920: 443c 2f63 6f64 653e 2020 203c 2f74 643e D \n+00140930: 3c74 6420 636c 6173 733d 226d 6172 6b64 The service re\n+00140960: 7175 6573 7420 6469 7370 6174 6368 6572 quest dispatcher\n+00140970: 2064 6964 206e 6f74 2066 696e 6420 6120 did not find a \n+00140980: 6d61 7463 6869 6e67 2073 6572 7669 6365 matching service\n+00140990: 206f 7065 7261 7469 6f6e 2066 6f72 2061 operation for a\n+001409a0: 2073 6572 7669 6365 2072 6571 7565 7374 service request\n+001409b0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+001409c0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+001409d0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+001409e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_NO\n+00140a10: 5f54 4147 3c2f 636f 6465 3e20 2020 3c2f _TAG No XML elem\n+00140a50: 656e 7420 7461 6720 7761 7320 666f 756e ent tag was foun\n+00140a60: 6420 7768 656e 206f 6e65 2077 6173 2065 d when one was e\n+00140a70: 7870 6563 7465 6420 2020 203c 2f74 643e xpected \n+00140a80: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+00140ad0: 2353 4f41 505f 4e54 4c4d 5f45 5252 4f52 #SOAP_NTLM_ERROR\n+00140ae0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00140af0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00140b00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00140b10: 3e41 6e20 4e54 4c4d 2061 7574 6865 6e74 >An NTLM authent\n+00140b20: 6963 6174 696f 6e20 6861 6e64 7368 616b ication handshak\n+00140b30: 6520 6572 726f 7220 6f63 6375 7272 6564 e error occurred\n+00140b40: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00140b50: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00140b60: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00140b70: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_NU\n+00140ba0: 4c4c 3c2f 636f 6465 3e20 2020 3c2f 7464 LL XML element h\n+00140be0: 6173 2061 6e20 3c63 6f64 653e 7873 693a as an xsi:\n+00140bf0: 6e69 6c3c 2f63 6f64 653e 2061 7474 7269 nil attri\n+00140c00: 6275 7465 2077 6865 6e20 7468 6520 656c bute when the el\n+00140c10: 656d 656e 7420 6973 206e 6f74 206e 696c ement is not nil\n+00140c20: 6c61 626c 652c 2063 6175 7369 6e67 2061 lable, causing a\n+00140c30: 2076 616c 6964 6174 696f 6e20 6572 726f validation erro\n+00140c40: 7220 2020 203c 2f74 643e 3c2f 7472 3e0a r .\n+00140c50: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_\n+00140ca0: 4f43 4355 5253 3c2f 636f 6465 3e20 2020 OCCURS \n+00140cb0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML eleme\n+00140ce0: 6e74 206d 696e 4f63 6375 7273 206f 7220 nt minOccurs or \n+00140cf0: 6d61 784f 6363 7572 7320 7661 6c69 6461 maxOccurs valida\n+00140d00: 7469 6f6e 2065 7272 6f72 206f 7220 3c63 tion error or #SOAP_MAXOCC\n+00140d20: 5552 533c 2f63 6f64 653e 2065 7863 6565 URS excee\n+00140d30: 6465 6420 2020 203c 2f74 643e 3c2f 7472 ded ..#SOAP\n+00140d90: 5f50 4154 4348 5f4d 4554 484f 443c 2f63 _PATCH_METHOD An\n+00140dd0: 2048 5454 5020 5041 5443 4820 7265 7175 HTTP PATCH requ\n+00140de0: 6573 7420 7761 7320 7265 6365 6976 6564 est was received\n+00140df0: 2062 7920 7468 6520 7365 7276 6963 6520 by the service \n+00140e00: 6275 7420 7468 6520 5041 5443 4820 7265 but the PATCH re\n+00140e10: 7175 6573 7420 6361 6c6c 6261 636b 203c quest callback <\n+00140e20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n+00140ef0: 3a66 7061 7463 683c 2f61 3e3c 2f63 6f64 :fpatch is not implem\n+00140f10: 656e 7465 642c 2073 6565 2053 6563 7469 ented, see Secti\n+00140f20: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Func\n+00140f50: 7469 6f6e 2063 616c 6c62 6163 6b73 2066 tion callbacks f\n+00140f60: 6f72 2063 7573 746f 6d69 7a65 6420 492f or customized I/\n+00140f70: 4f20 616e 6420 4854 5450 2068 616e 646c O and HTTP handl\n+00140f80: 696e 673c 2f61 3e20 2020 203c 2f74 643e ing \n+00140f90: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+00140fe0: 2353 4f41 505f 5041 5454 4552 4e3c 2f63 #SOAP_PATTERN XM\n+00141020: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att\n+00141030: 7269 6275 7465 2076 616c 7565 2070 6174 ribute value pat\n+00141040: 7465 726e 206d 6973 6d61 7463 6820 2020 tern mismatch \n+00141050: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+001410a0: 636f 6465 3e23 534f 4150 5f50 4c55 4749 code>#SOAP_PLUGI\n+001410b0: 4e5f 4552 524f 523c 2f63 6f64 653e 2020 N_ERROR \n+001410c0: 203c 2f74 643e 3c74 6420 636c 6173 733d Failed t\n+001410f0: 6f20 7265 6769 7374 6572 2070 6c75 6769 o register plugi\n+00141100: 6e20 2020 203c 2f74 643e 3c2f 7472 3e0a n .\n+00141110: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_\n+00141160: 5052 4f48 4942 4954 4544 3c2f 636f 6465 PROHIBITED XML a\n+001411a0: 7474 7269 6275 7465 2069 7320 7072 6f68 ttribute is proh\n+001411b0: 6962 6974 6564 2062 7574 2070 7265 7365 ibited but prese\n+001411c0: 6e74 2020 2020 3c2f 7464 3e3c 2f74 723e nt \n+001411d0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP_\n+00141220: 5055 545f 4d45 5448 4f44 3c2f 636f 6465 PUT_METHOD An HT\n+00141260: 5450 2050 5554 2072 6571 7565 7374 2077 TP PUT request w\n+00141270: 6173 2072 6563 6569 7665 6420 6279 2074 as received by t\n+00141280: 6865 2073 6572 7669 6365 2062 7574 2074 he service but t\n+00141290: 6865 2050 5554 2072 6571 7565 7374 2063 he PUT request c\n+001412a0: 616c 6c62 6163 6b20 3c63 6f64 653e 3c61 allback \n+00141370: 736f 6170 3a3a 6670 7574 3c2f 613e 3c2f soap::fput is not imp\n+00141390: 6c65 6d65 6e74 6564 2c20 7365 6520 5365 lemented, see Se\n+001413a0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction F\n+001413d0: 756e 6374 696f 6e20 6361 6c6c 6261 636b unction callback\n+001413e0: 7320 666f 7220 6375 7374 6f6d 697a 6564 s for customized\n+001413f0: 2049 2f4f 2061 6e64 2048 5454 5020 6861 I/O and HTTP ha\n+00141400: 6e64 6c69 6e67 3c2f 613e 2020 2020 3c2f ndling ..#SOAP_REQUIRE\n+00141470: 443c 2f63 6f64 653e 2020 203c 2f74 643e D \n+00141480: 3c74 6420 636c 6173 733d 226d 6172 6b64 XML attribute \n+001414b0: 6973 2072 6571 7569 7265 6420 6275 7420 is required but \n+001414c0: 6e6f 7420 7072 6573 656e 7420 2020 203c not present <\n+001414d0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_SSL_ERR\n+00141530: 4f52 3c2f 636f 6465 3e20 2020 3c2f 7464 OR An SSL error \n+00141570: 6f63 6375 7272 6564 2020 2020 3c2f 7464 occurred ..#SOAP_SVR_FAULT\n+001415e0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+001415f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141600: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141610: 3e54 6865 2073 6572 7669 6365 2072 6574 >The service ret\n+00141620: 7572 6e65 6420 6120 534f 4150 2031 2e31 urned a SOAP 1.1\n+00141630: 2073 6572 7665 7220 6661 756c 7420 6f72 server fault or\n+00141640: 2053 4f41 5020 312e 3220 7265 6365 6976 SOAP 1.2 receiv\n+00141650: 6572 2066 6175 6c74 2074 6f20 7468 6520 er fault to the \n+00141660: 636c 6965 6e74 2020 2020 3c2f 7464 3e3c client <\n+00141670: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S\n+001416c0: 4f41 505f 5359 4e54 4158 5f45 5252 4f52 OAP_SYNTAX_ERROR\n+001416d0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+001416e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001416f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141700: 3e41 6e20 584d 4c20 7379 6e74 6178 2065 >An XML syntax e\n+00141710: 7272 6f72 206f 6363 7572 7265 6420 7768 rror occurred wh\n+00141720: 696c 6520 7061 7273 696e 6720 7468 6520 ile parsing the \n+00141730: 696e 7075 7420 2020 203c 2f74 643e 3c2f input ..#S\n+00141790: 4f41 505f 5441 475f 4d49 534d 4154 4348 OAP_TAG_MISMATCH\n+001417a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+001417b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001417c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001417d0: 3e58 4d4c 2065 6c65 6d65 6e74 2074 6167 >XML element tag\n+001417e0: 2070 6172 7365 6420 646f 6573 206e 6f74 parsed does not\n+001417f0: 206d 6174 6368 2061 6e79 7468 696e 6720 match anything \n+00141800: 7468 6174 2069 7320 6578 7065 6374 6564 that is expected\n+00141810: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00141820: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00141830: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00141840: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_TC\n+00141870: 505f 4552 524f 523c 2f63 6f64 653e 2020 P_ERROR \n+00141880: 203c 2f74 643e 3c74 6420 636c 6173 733d A TCP/IP\n+001418b0: 2063 6f6e 6e65 6374 696f 6e20 6572 726f connection erro\n+001418c0: 7220 6f63 6375 7272 6564 2020 2020 3c2f r occurred ..#SOAP_TYPE XM\n+00141960: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att\n+00141970: 7269 6275 7465 2068 6173 2061 206d 6973 ribute has a mis\n+00141980: 6d61 7463 6869 6e67 2074 7970 6520 6f72 matching type or\n+00141990: 2076 616c 7565 2074 6861 7420 6973 2063 value that is c\n+001419a0: 6175 7369 6e67 2061 2076 616c 6964 6174 ausing a validat\n+001419b0: 696f 6e20 6572 726f 7220 2020 203c 2f74 ion error ..#SOAP_UDP_ERROR\n+00141a20: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00141a30: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141a40: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141a50: 3e41 2055 4450 2f49 5020 636f 6e6e 6563 >A UDP/IP connec\n+00141a60: 7469 6f6e 2065 7272 6f72 206f 6363 7572 tion error occur\n+00141a70: 7265 6420 6f72 2074 6865 206d 6573 7361 red or the messa\n+00141a80: 6765 2074 6f6f 206c 6172 6765 2074 6f20 ge too large to \n+00141a90: 7374 6f72 6520 696e 2061 2055 4450 2070 store in a UDP p\n+00141aa0: 6163 6b65 7420 2020 203c 2f74 643e 3c2f acket ..#S\n+00141b00: 4f41 505f 5553 4552 5f45 5252 4f52 3c2f OAP_USER_ERROR <\n+00141b40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00141b50: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00141b60: 6d6c 2361 3865 6233 3563 3034 3335 3961 ml#a8eb35c04359a\n+00141b70: 3536 3763 3062 3565 3236 3634 6633 6639 567c0b5e2664f3f9\n+00141b80: 3464 3562 2220 7469 746c 653d 2255 7365 4d5b\" title=\"Use\n+00141b90: 722d 6465 6669 6e61 626c 6520 7661 7269 r-definable vari\n+00141ba0: 6162 6c65 2074 6861 7420 6d61 7920 706f able that may po\n+00141bb0: 696e 7420 746f 2075 7365 722d 7370 6563 int to user-spec\n+00141bc0: 6966 6965 6420 6461 7461 206f 6620 616e ified data of an\n+00141bd0: 7920 7479 7065 2074 6f20 7061 7373 2074 y type to pass t\n+00141be0: 6865 2064 6174 6120 7468 726f 7567 6820 he data through \n+00141bf0: 746f 2e2e 2e22 3e73 6f61 703a 3a75 7365 to...\">soap::use\n+00141c00: 723c 2f61 3e20 6e6f 7420 7365 7420 746f r not set to\n+00141c10: 206e 6f6e 2d4e 554c 4c20 2020 203c 2f74 non-NULL ..#SOAP_UTF_ERROR\n+00141c80: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00141c90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141ca0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141cb0: 3e41 6e20 5554 462d 3820 6465 636f 6469 >An UTF-8 decodi\n+00141cc0: 6e67 2065 7272 6f72 206f 6363 7572 7265 ng error occurre\n+00141cd0: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d .\n+00141ce0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_\n+00141d30: 5645 5253 494f 4e4d 4953 4d41 5443 483c VERSIONMISMATCH<\n+00141d40: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+00141d70: 534f 4150 2076 6572 7369 6f6e 206d 6973 SOAP version mis\n+00141d80: 6d61 7463 6820 6f72 206e 6f20 534f 4150 match or no SOAP\n+00141d90: 206d 6573 7361 6765 2069 7320 7265 6365 message is rece\n+00141da0: 6976 6564 2020 2020 3c2f 7464 3e3c 2f74 ived ..#SOA\n+00141e00: 505f 5a4c 4942 5f45 5252 4f52 3c2f 636f P_ZLIB_ERROR A z\n+00141e40: 6c69 6220 6572 726f 7220 6f63 6375 7272 lib error occurr\n+00141e50: 6564 2020 203c 2f74 643e 3c2f 7472 3e0a ed .\n+00141e60: 3c2f 7461 626c 653e 0a3c 703e 4120 7374 .

    A st\n+00141e70: 6174 7573 2063 6f64 6520 6f66 203c 636f atus code of #SOAP_OK (zero) is ret\n+00141ea0: 7572 6e65 6420 6279 2061 2067 534f 4150 urned by a gSOAP\n+00141eb0: 2041 5049 2066 756e 6374 696f 6e20 7768 API function wh\n+00141ec0: 656e 2074 6865 2066 756e 6374 696f 6e20 en the function \n+00141ed0: 6361 6c6c 2077 6173 2073 7563 6365 7373 call was success\n+00141ee0: 6675 6c2c 206f 7468 6572 7769 7365 2061 ful, otherwise a\n+00141ef0: 206e 6f6e 2d7a 6572 6f20 6572 726f 7220 non-zero error \n+00141f00: 636f 6465 2069 7320 7265 7475 726e 6564 code is returned\n+00141f10: 2e20 5468 6520 7374 6174 7573 2065 7272 . The status err\n+00141f20: 6f72 2063 6f64 6520 6973 2061 6c73 6f20 or code is also \n+00141f30: 7374 6f72 6564 2069 6e20 7468 6520 6375 stored in the cu\n+00141f40: 7272 656e 7420 3c63 6f64 653e 3c61 2063 rrent soap\n+00141fa0: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+00141fb0: 6173 203c 636f 6465 3e3c 6120 636c 6173 as s\n+00142060: 6f61 703a 3a65 7272 6f72 3c2f 613e 3c2f oap::error. For IO an\n+00142080: 6420 736f 636b 6574 2d72 656c 6174 6564 d socket-related\n+00142090: 2065 7272 6f72 732c 2061 6c73 6f20 7468 errors, also th\n+001420a0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::er\n+00142130: 726e 756d 3c2f 613e 3c2f 636f 6465 3e20 rnum \n+00142140: 7661 7269 6162 6c65 2069 7320 7365 7420 variable is set \n+00142150: 746f 2074 6865 203c 636f 6465 3e65 7272 to the err\n+00142160: 6e6f 3c2f 636f 6465 3e20 7661 6c75 6520 no value \n+00142170: 6f66 2074 6865 2073 7973 7465 6d20 6572 of the system er\n+00142180: 726f 7220 666f 7220 6578 616d 706c 6520 ror for example \n+00142190: 7768 656e 2061 203c 636f 6465 3e23 534f when a #SO\n+001421a0: 4150 5f45 4f46 3c2f 636f 6465 3e20 6572 AP_EOF er\n+001421b0: 726f 7220 6f63 6375 7272 6564 2e3c 2f70 ror occurred..

    To display \n+001421d0: 7468 6520 6572 726f 722c 2075 7365 203c the error, use <\n+001421e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_\n+00142270: 7072 696e 745f 6661 756c 7428 7374 7275 print_fault(stru\n+00142280: 6374 2073 6f61 7020 2a73 6f61 702c 2046 ct soap *soap, F\n+00142290: 494c 4520 2a66 6429 3c2f 613e 3c2f 636f ILE *fd) where the cu\n+001422b0: 7272 656e 7420 7661 6c75 6520 6f66 203c rrent value of <\n+001422c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n+00142370: 3a65 7272 6f72 3c2f 613e 3c2f 636f 6465 :error is used by the\n+00142390: 2066 756e 6374 696f 6e20 746f 2070 7269 function to pri\n+001423a0: 6e74 2074 6865 2065 7272 6f72 2074 6f20 nt the error to \n+001423b0: 7468 6520 7370 6563 6966 6965 6420 3c63 the specified fd fi\n+001423d0: 6c65 2e20 416c 7465 726e 6174 6976 656c le. Alternativel\n+001423e0: 792c 2069 6e20 432b 2b20 796f 7520 6361 y, in C++ you ca\n+001423f0: 6e20 7573 6520 3c63 6f64 653e 3c61 2063 n use soap_st\n+00142490: 7265 616d 5f66 6175 6c74 2873 7472 7563 ream_fault(struc\n+001424a0: 7420 736f 6170 202a 736f 6170 2c20 7374 t soap *soap, st\n+001424b0: 643a 3a6f 7374 7265 616d 2661 6d70 3b20 d::ostream& \n+001424c0: 6f73 293c 2f61 3e3c 2f63 6f64 653e 2074 os) t\n+001424d0: 6f20 7072 696e 7420 7468 6520 6572 726f o print the erro\n+001424e0: 7220 6f6e 2074 6865 2073 7065 6369 6669 r on the specifi\n+001424f0: 6564 203c 636f 6465 3e6f 733c 2f63 6f64 ed os output stream\n+00142510: 2e3c 2f70 3e0a 3c70 3e54 6f20 6469 7370 .

    .

    To disp\n+00142520: 6c61 7920 7468 6520 6c6f 6361 7469 6f6e lay the location\n+00142530: 206f 6620 616e 2058 4d4c 2070 6172 7369 of an XML parsi\n+00142540: 6e67 2061 6e64 2076 616c 6964 6174 696f ng and validatio\n+00142550: 6e20 6572 726f 722c 2075 7365 203c 636f n error, use soap_print_faul\n+00142610: 745f 6c6f 6361 7469 6f6e 2873 7472 7563 t_location(struc\n+00142620: 7420 736f 6170 202a 736f 6170 2c20 4649 t soap *soap, FI\n+00142630: 4c45 202a 6664 293c 2f61 3e3c 2f63 6f64 LE *fd) or soap_s\n+001426f0: 7472 6561 6d5f 6661 756c 745f 6c6f 6361 tream_fault_loca\n+00142700: 7469 6f6e 2873 7472 7563 7420 736f 6170 tion(struct soap\n+00142710: 202a 736f 6170 2c20 7374 643a 3a6f 7374 *soap, std::ost\n+00142720: 7265 616d 2661 6d70 3b20 6f73 293c 2f61 ream& os) to prin\n+00142740: 7420 7061 7274 206f 6620 7468 6520 584d t part of the XM\n+00142750: 4c20 7769 7468 2074 6865 2065 7272 6f72 L with the error\n+00142760: 206c 6f63 6174 696f 6e20 6d61 726b 6564 location marked\n+00142770: 2069 6e20 7468 6520 584d 4c20 6f75 7470 in the XML outp\n+00142780: 7574 2e3c 2f70 3e0a 3c70 3e54 6f20 7361 ut.

    .

    To sa\n+00142790: 7665 2074 6865 2065 7272 6f72 2069 6e20 ve the error in \n+001427a0: 6120 7374 7269 6e67 2062 7566 6665 7220 a string buffer \n+001427b0: 3c63 6f64 653e 6275 665b 302e 2e2e 6c65 buf[0...le\n+001427c0: 6e2d 315d 3c2f 636f 6465 3e2c 2075 7365 n-1], use\n+001427d0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sprint_\n+00142870: 6661 756c 7428 7374 7275 6374 2073 6f61 fault(struct soa\n+00142880: 702a 2c20 6368 6172 202a 6275 662c 2073 p*, char *buf, s\n+00142890: 697a 655f 7420 6c65 6e29 3c2f 613e 3c2f ize_t len), where buf is\n+001428c0: 2070 6f70 756c 6174 6564 2077 6974 6820 populated with \n+001428d0: 7468 6520 6661 756c 7420 6d65 7373 6167 the fault messag\n+001428e0: 6520 7465 726d 696e 6174 696e 6720 7769 e terminating wi\n+001428f0: 7468 2061 203c 636f 6465 3e5c 303c 2f63 th a \\0.

    .

    To \n+00142910: 6465 7465 726d 696e 6520 7468 6520 7479 determine the ty\n+00142920: 7065 206f 6620 6572 726f 7220 7468 6174 pe of error that\n+00142930: 206f 6363 7572 7265 642c 2075 7365 3a3c occurred, use:<\n+00142940: 2f70 3e3c 756c 3e0a 3c6c 693e 3c63 6f64 /p>

    The\n-0014ade0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n-0014aeb0: 756e 6c69 6e6b 3c2f 613e 3c2f 636f 6465 unlink call unlinks d\n-0014aed0: 6174 6120 616e 6420 6f62 6a65 6374 7320 ata and objects \n-0014aee0: 6672 6f6d 206d 616e 6167 6564 206d 656d from managed mem\n-0014aef0: 6f72 792e 2049 6e20 7468 6973 2077 6179 ory. In this way\n-0014af00: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_destr\n-0014afc0: 6f79 3c2f 613e 3c2f 636f 6465 3e20 616e oy an\n-0014afd0: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap\n-0014b0a0: 5f65 6e64 3c2f 613e 3c2f 636f 6465 3e20 _end \n-0014b0b0: 6361 6e20 6265 2063 616c 6c65 6420 6c61 can be called la\n-0014b0c0: 7465 7220 6576 656e 2077 6865 6e20 7468 ter even when th\n-0014b0d0: 6973 2063 6c61 7373 2077 6173 2064 6573 is class was des\n-0014b0e0: 6572 6961 6c69 7a65 642e 3c2f 703e 0a3c erialized.

    .<\n-0014b0f0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-0014b110: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-0014b120: 3c2f 703e 0a3c 6831 3e3c 6120 636c 6173

    .

    .D\n-0014b150: 6562 7567 6769 6e67 3c2f 6831 3e0a 3c70 ebugging

    .To activate deb\n-0014b170: 7567 6769 6e67 2061 6e64 206d 6573 7361 ugging and messa\n-0014b180: 6765 206c 6f67 6769 6e67 2063 6f6d 7069 ge logging compi\n-0014b190: 6c65 2074 6865 2073 6f75 7263 6520 636f le the source co\n-0014b1a0: 6465 2077 6974 6820 636f 6d70 696c 652d de with compile-\n-0014b1b0: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n-0014b1c0: 2344 4542 5547 3c2f 636f 6465 3e2e 204f #DEBUG. O\n-0014b1d0: 7220 7768 656e 2075 7369 6e67 203c 623e r when using \n-0014b1e0: 3c63 6f64 653e 2d6c 6773 6f61 703c 2f63 -lgsoap or <\n-0014b200: 636f 6465 3e2d 6c67 736f 6170 2b2b 3c2f code>-lgsoap++ then r\n-0014b220: 6569 6e73 7461 6c6c 2067 534f 4150 2077 einstall gSOAP w\n-0014b230: 6974 6820 3c62 3e3c 636f 6465 3e2e 2f63 ith ./c\n-0014b240: 6f6e 6669 6775 7265 202d 2d65 6e61 626c onfigure --enabl\n-0014b250: 652d 6465 6275 673c 2f63 6f64 653e 3c2f e-debug and \n-0014b270: 6d61 6b65 3c2f 636f 6465 3e3c 2f62 3e2e make.\n-0014b280: 3c2f 703e 0a3c 703e 5768 656e 2079 6f75

    .

    When you\n-0014b290: 7220 6753 4f41 5020 636c 6965 6e74 206f r gSOAP client o\n-0014b2a0: 7220 7365 7276 6572 2061 7070 6c69 6361 r server applica\n-0014b2b0: 7469 6f6e 7320 7275 6e2c 2074 6865 7920 tions run, they \n-0014b2c0: 7769 6c6c 206c 6f67 2074 6865 6972 2061 will log their a\n-0014b2d0: 6374 6976 6974 7920 696e 2074 6872 6565 ctivity in three\n-0014b2e0: 2073 6570 6172 6174 6520 6669 6c65 733a separate files:\n-0014b2f0: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 3c65

    .
      .
    • SENT.log\n-0014b310: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 2063 a c\n-0014b320: 6f6e 6361 7465 6e61 7469 6f6e 206f 6620 oncatenation of \n-0014b330: 616c 6c20 6d65 7373 6167 6573 2073 656e all messages sen\n-0014b340: 743c 2f6c 693e 0a3c 6c69 3e3c 656d 3e3c t
    • .
    • <\n-0014b350: 636f 6465 3e52 4543 562e 6c6f 673c 2f63 code>RECV.log a conc\n-0014b370: 6174 656e 6174 696f 6e20 6f66 2061 6c6c atenation of all\n-0014b380: 206d 6573 7361 6765 7320 7265 6365 6976 messages receiv\n-0014b390: 6564 3c2f 6c69 3e0a 3c6c 693e 3c65 6d3e ed
    • .
    • \n-0014b3a0: 3c63 6f64 653e 5445 5354 2e6c 6f67 3c2f TEST.log a log\n-0014b3c0: 206f 6620 7468 6520 656e 6769 6e65 2773 of the engine's\n-0014b3d0: 206f 7065 7261 7469 6f6e 733c 2f6c 693e operations
    • \n-0014b3e0: 0a3c 2f75 6c3e 0a3c 646c 2063 6c61 7373 .
    .
    Warning
    The gSOAP\n-0014b420: 2063 6c69 656e 7420 616e 6420 7365 7276 client and serv\n-0014b430: 6572 2061 7070 6c69 6361 7469 6f6e 7320 er applications \n-0014b440: 7769 6c6c 2072 756e 2073 6c6f 7720 6475 will run slow du\n-0014b450: 6520 746f 2064 6562 7567 6769 6e67 2061 e to debugging a\n-0014b460: 6e64 206d 6573 7361 6765 206c 6f67 6769 nd message loggi\n-0014b470: 6e67 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 ng.
    .You can set mac\n-0014b490: 726f 203c 636f 6465 3e23 4445 4255 475f ro #DEBUG_\n-0014b4a0: 5354 414d 503c 2f63 6f64 653e 2069 6e73 STAMP ins\n-0014b4b0: 7465 6164 206f 6620 3c63 6f64 653e 2344 tead of #D\n-0014b4c0: 4542 5547 3c2f 636f 6465 3e20 746f 2061 EBUG to a\n-0014b4d0: 6464 2074 696d 6520 7374 616d 7073 2074 dd time stamps t\n-0014b4e0: 6f20 3c63 6f64 653e 5445 5354 2e6c 6f67 o TEST.log\n-0014b4f0: 3c2f 636f 6465 3e2e 2054 6869 7320 776f . This wo\n-0014b500: 726b 7320 6f6e 2061 6c6c 206f 7065 7261 rks on all opera\n-0014b510: 7469 6e67 2073 7973 7465 6d73 2073 7570 ting systems sup\n-0014b520: 706f 7274 696e 6720 7468 6520 3c63 6f64 porting the gettimeofday function.<\n-0014b550: 2f70 3e0a 3c70 3e57 6865 6e20 696e 7374 /p>.

    When inst\n-0014b560: 616c 6c69 6e67 2061 2043 4749 2073 6572 alling a CGI ser\n-0014b570: 7669 6365 2061 7070 6c69 6361 7469 6f6e vice application\n-0014b580: 2063 6f6d 7069 6c65 6420 7769 7468 2064 compiled with d\n-0014b590: 6562 7567 6769 6e67 2065 6e61 626c 6564 ebugging enabled\n-0014b5a0: 2c20 7468 6520 6c6f 6720 6669 6c65 7320 , the log files \n-0014b5b0: 6d61 7920 736f 6d65 7469 6d65 7320 6e6f may sometimes no\n-0014b5c0: 7420 6265 2063 7265 6174 6564 2064 7565 t be created due\n-0014b5d0: 2074 6f20 6669 6c65 2061 6363 6573 7320 to file access \n-0014b5e0: 7065 726d 6973 7369 6f6e 2072 6573 7472 permission restr\n-0014b5f0: 6963 7469 6f6e 7320 696d 706f 7365 6420 ictions imposed \n-0014b600: 6f6e 2043 4749 2061 7070 6c69 6361 7469 on CGI applicati\n-0014b610: 6f6e 732e 2054 6f20 6765 7420 6172 6f75 ons. To get arou\n-0014b620: 6e64 2074 6869 732c 2063 7265 6174 6520 nd this, create \n-0014b630: 656d 7074 7920 6c6f 6720 6669 6c65 7320 empty log files \n-0014b640: 7769 7468 2075 6e69 7665 7273 616c 2077 with universal w\n-0014b650: 7269 7465 2070 6572 6d69 7373 696f 6e73 rite permissions\n-0014b660: 2e20 4265 2063 6172 6566 756c 2061 626f . Be careful abo\n-0014b670: 7574 2074 6865 2073 6563 7572 6974 7920 ut the security \n-0014b680: 696d 706c 6963 6174 696f 6e20 6f66 2074 implication of t\n-0014b690: 6869 732e 3c2f 703e 0a3c 703e 596f 7520 his.

    .

    You \n-0014b6a0: 6361 6e20 6163 7475 616c 6c79 2074 6573 can actually tes\n-0014b6b0: 7420 6120 4347 4920 7365 7276 6963 6520 t a CGI service \n-0014b6c0: 6170 706c 6963 6174 696f 6e20 7769 7468 application with\n-0014b6d0: 6f75 7420 6465 706c 6f79 696e 6720 6974 out deploying it\n-0014b6e0: 206f 6e20 7468 6520 5765 622e 2054 6f20 on the Web. To \n-0014b6f0: 646f 2074 6869 732c 2063 7265 6174 6520 do this, create \n-0014b700: 7468 6520 4347 4920 7365 7276 6963 6520 the CGI service \n-0014b710: 6170 706c 6963 6174 696f 6e20 616e 6420 application and \n-0014b720: 7365 6e64 2069 7420 6120 7265 7175 6573 send it a reques\n-0014b730: 7420 6d65 7373 6167 6520 7573 696e 6720 t message using \n-0014b740: 7265 6469 7265 6374 696f 6e20 6173 2066 redirection as f\n-0014b750: 6f6c 6c6f 7773 3a20 3c2f 703e 3c70 7265 ollows:

    ./service.cgi \n-0014b780: 266c 743b 206e 732e 6164 642e 7265 712e < ns.add.req.\n-0014b790: 786d 6c0a 3c2f 7072 653e 3c70 3e20 7468 xml.

    th\n-0014b7a0: 6973 2073 686f 756c 6420 6469 7370 6c61 is should displa\n-0014b7b0: 7920 7468 6520 7365 7276 6963 6520 7265 y the service re\n-0014b7c0: 7370 6f6e 7365 206f 6e20 7468 6520 7465 sponse on the te\n-0014b7d0: 726d 696e 616c 2c20 7768 6572 6520 3c65 rminal, where ns.add.r\n-0014b7f0: 6571 2e78 6d6c 3c2f 636f 6465 3e3c 2f65 eq.xml was generated\n-0014b810: 2062 7920 736f 6170 6370 7032 206f 7220 by soapcpp2 or \n-0014b820: 6120 6d6f 6469 6669 6564 2076 6572 7369 a modified versi\n-0014b830: 6f6e 206f 6620 7468 6973 2066 696c 652e on of this file.\n-0014b840: 2059 6f75 2063 616e 2061 6c73 6f20 7573 You can also us\n-0014b850: 6520 6120 3c65 6d3e 3c63 6f64 653e 5345 e a SE\n-0014b860: 4e54 2e6c 6f67 3c2f 636f 6465 3e3c 2f65 NT.log file produced\n-0014b880: 2062 7920 6120 636c 6965 6e74 2061 7070 by a client app\n-0014b890: 6c69 6361 7469 6f6e 2074 6f20 7265 6469 lication to redi\n-0014b8a0: 7265 6374 2074 6f20 7468 6520 4347 4920 rect to the CGI \n-0014b8b0: 7365 7276 6963 6520 6170 706c 6963 6174 service applicat\n-0014b8c0: 696f 6e2e 2059 6f75 2063 616e 2061 6c73 ion. You can als\n-0014b8d0: 6f20 7573 6520 7468 6520 6753 4f41 5020 o use the gSOAP \n-0014b8e0: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f74 Test Me\n-0014b910: 7373 656e 6765 723c 2f61 3e20 6170 706c ssenger appl\n-0014b920: 6963 6174 696f 6e20 746f 2067 656e 6572 ication to gener\n-0014b930: 6174 6520 7261 6e64 6f6d 697a 6564 206d ate randomized m\n-0014b940: 6573 7361 6765 7320 746f 2074 6573 7420 essages to test \n-0014b950: 796f 7572 2073 6572 7665 7273 2e3c 2f70 your servers..

    The file na\n-0014b970: 6d65 7320 6f66 2074 6865 206c 6f67 2066 mes of the log f\n-0014b980: 696c 6573 2061 6e64 2074 6865 206c 6f67 iles and the log\n-0014b990: 6769 6e67 2061 6374 6976 6974 7920 6361 ging activity ca\n-0014b9a0: 6e20 6265 2063 6f6e 7472 6f6c 6c65 6420 n be controlled \n-0014b9b0: 6174 2074 6865 2061 7070 6c69 6361 7469 at the applicati\n-0014b9c0: 6f6e 206c 6576 656c 2e20 5468 6973 2061 on level. This a\n-0014b9d0: 6c6c 6f77 7320 7468 6520 6372 6561 7469 llows the creati\n-0014b9e0: 6f6e 206f 6620 7365 7061 7261 7465 206c on of separate l\n-0014b9f0: 6f67 2066 696c 6573 2062 7920 7365 7061 og files by sepa\n-0014ba00: 7261 7465 2073 6572 7669 6365 732c 2063 rate services, c\n-0014ba10: 6c69 656e 7473 2c20 616e 6420 7468 7265 lients, and thre\n-0014ba20: 6164 732e 2046 6f72 2065 7861 6d70 6c65 ads. For example\n-0014ba30: 2c20 7468 6520 666f 6c6c 6f77 696e 6720 , the following \n-0014ba40: 7365 7276 6963 6520 6c6f 6773 2061 6c6c service logs all\n-0014ba50: 206d 6573 7361 6765 7320 2862 7574 206e messages (but n\n-0014ba60: 6f20 6465 6275 6720 6d65 7373 6167 6573 o debug messages\n-0014ba70: 2920 696e 2073 6570 6172 6174 6520 6469 ) in separate di\n-0014ba80: 7265 6374 6f72 6965 733a 3c2f 703e 0a3c rectories:

    .<\n-0014ba90: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-0014baa0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n-0014bad0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n-0014bba0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    s\n-0014bc10: 6f61 705f 7365 745f 7265 6376 5f6c 6f67 oap_set_recv_log\n-0014bc20: 6669 6c65 3c2f 613e 283c 6120 636c 6173 file(\n-0014bc50: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "logs\n-0014bc80: 2f72 6563 762f 7365 7276 6963 6531 322e /recv/service12.\n-0014bc90: 6c6f 6726 7175 6f74 3b3c 2f73 7061 6e3e log"\n-0014bca0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // appe\n-0014bcc0: 6e64 2061 6c6c 206d 6573 7361 6765 7320 nd all messages \n-0014bcd0: 7265 6365 6976 6564 2069 6e20 2f6c 6f67 received in /log\n-0014bce0: 732f 7265 6376 2f73 6572 7669 6365 3132 s/recv/service12\n-0014bcf0: 2e6c 6f67 203c 2f73 7061 6e3e 3c2f 6469 .log ..
    soa\n-0014bec0: 705f 7365 745f 7465 7374 5f6c 6f67 6669 p_set_test_logfi\n-0014bed0: 6c65 3c2f 613e 283c 6120 636c 6173 733d le(so\n-0014bf00: 6170 3c2f 613e 2c20 4e55 4c4c 293b 2020 ap, NULL); \n-0014bf10: 2020 2020 2020 2020 2020 2020 2020 2020 \n-0014bf20: 2020 2020 3c73 7061 6e20 636c 6173 733d // no \n-0014bf40: 6669 6c65 206e 616d 653a 2064 6f20 6e6f file name: do no\n-0014bf50: 7420 7361 7665 2064 6562 7567 206d 6573 t save debug mes\n-0014bf60: 7361 6765 7320 3c2f 7370 616e 3e3c 2f64 sages .
    ... \n-0014bfa0: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    .\n-0014bfb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_serve\n-0014c020: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0014c050: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    ... \n-0014c070: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n-0014c090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n-0014c100: 705f 6672 6565 3c2f 613e 283c 6120 636c p_free(soap);.
    <\n-0014c210: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0014c220: 6922 3e76 6f69 6420 736f 6170 5f73 6574 i\">void soap_set\n-0014c230: 5f72 6563 765f 6c6f 6766 696c 6528 7374 _recv_logfile(st\n-0014c240: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-0014c250: 2063 6f6e 7374 2063 6861 7220 2a6c 6f67 const char *log\n-0014c260: 6669 6c65 293c 2f64 6976 3e3c 6469 7620 file)
    Sp\n-0014c280: 6563 6966 7920 6120 6669 6c65 206e 616d ecify a file nam\n-0014c290: 6520 746f 2073 6176 6520 6d65 7373 6167 e to save messag\n-0014c2a0: 6573 2072 6563 6569 7665 642e 3c2f 6469 es received.
    .
    \n-0014c320: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_set_t\n-0014c370: 6573 745f 6c6f 6766 696c 653c 2f61 3e3c est_logfile<\n-0014c380: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void so\n-0014c3a0: 6170 5f73 6574 5f74 6573 745f 6c6f 6766 ap_set_test_logf\n-0014c3b0: 696c 6528 7374 7275 6374 2073 6f61 7020 ile(struct soap \n-0014c3c0: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n-0014c3d0: 7220 2a6c 6f67 6669 6c65 293c 2f64 6976 r *logfile)
    Specify a fi\n-0014c400: 6c65 206e 616d 6520 746f 2073 6176 6520 le name to save \n-0014c410: 6465 6275 6767 696e 6720 696e 666f 2e3c debugging info.<\n-0014c420: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .<\n-0014c480: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0014c490: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_se\n-0014c4e0: 745f 7365 6e74 5f6c 6f67 6669 6c65 3c2f t_sent_logfile
    .

    Likewise\n-0014c5c0: 2c20 6d65 7373 6167 6573 2063 616e 2062 , messages can b\n-0014c5d0: 6520 6c6f 6767 6564 2066 6f72 2069 6e64 e logged for ind\n-0014c5e0: 6976 6964 7561 6c20 636c 6965 6e74 2d73 ividual client-s\n-0014c5f0: 6964 6520 7365 7276 6963 6520 6f70 6572 ide service oper\n-0014c600: 6174 696f 6e20 6361 6c6c 7320 696e 2061 ation calls in a\n-0014c610: 2063 6c69 656e 7420 6170 706c 6963 6174 client applicat\n-0014c620: 696f 6e2e 3c2f 703e 0a3c 703e 546f 206c ion.

    .

    To l\n-0014c630: 6f67 206d 6573 7361 6765 7320 6d6f 7265 og messages more\n-0014c640: 2065 6666 6963 6965 6e74 6c79 2c20 7573 efficiently, us\n-0014c650: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the l\n-0014c6e0: 6f67 6769 6e67 3c2f 613e 3c2f 636f 6465 ogging plugin.

    ..... Back to table \n-0014c720: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-0014c730: 2f70 3e0a 3c68 313e 3c61 2063 6c61 7373 /p>.

    .\n-0014c760: 4c69 6d69 7461 7469 6f6e 733c 2f68 313e Limitations

    \n-0014c770: 0a3c 703e 4672 6f6d 2074 6865 2070 6572 .

    From the per\n-0014c780: 7370 6563 7469 7665 206f 6620 7468 6520 spective of the \n-0014c790: 432f 432b 2b20 6c61 6e67 7561 6765 2c20 C/C++ language, \n-0014c7a0: 6120 6665 7720 432f 432b 2b20 6c61 6e67 a few C/C++ lang\n-0014c7b0: 7561 6765 2066 6561 7475 7265 7320 6172 uage features ar\n-0014c7c0: 6520 6e6f 7420 7375 7070 6f72 7465 6420 e not supported \n-0014c7d0: 6279 2067 534f 4150 2061 6e64 2074 6865 by gSOAP and the\n-0014c7e0: 7365 2066 6561 7475 7265 7320 6361 6e6e se features cann\n-0014c7f0: 6f74 2062 6520 7573 6564 2069 6e20 616e ot be used in an\n-0014c800: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-0014c810: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n-0014c820: 7070 322e 3c2f 703e 0a3c 756c 3e0a 3c6c pp2.

    .
      .STL: the soapc\n-0014c840: 7070 3220 746f 6f6c 2073 7570 706f 7274 pp2 tool support\n-0014c850: 7320 7468 6520 7365 7269 616c 697a 6174 s the serializat\n-0014c860: 696f 6e20 6f66 2043 2b2b 2073 7472 696e ion of C++ strin\n-0014c870: 6773 203c 636f 6465 3e73 7464 3a3a 7374 gs std::st\n-0014c880: 7269 6e67 3c2f 636f 6465 3e20 616e 6420 ring and \n-0014c890: 3c63 6f64 653e 7374 643a 3a77 7374 7269 std::wstri\n-0014c8a0: 6e67 3c2f 636f 6465 3e20 616e 6420 7468 ng and th\n-0014c8b0: 6520 636f 6e74 6169 6e65 7273 203c 636f e containers std::deque, std:\n-0014c8e0: 3a6c 6973 743c 2f63 6f64 653e 2c20 3c63 :list, std::vector<\n-0014c900: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and std::set, (see Section \n-0014c930: 3c61 2063 6c61 7373 3d22 656c 2220 6872 STL co\n-0014c960: 6e74 6169 6e65 7273 3c2f 613e 2029 2e20 ntainers ). \n-0014c970: 416c 736f 203c 636f 6465 3e73 7464 3a3a Also std::\n-0014c980: 7368 6172 6564 5f70 7472 3c2f 636f 6465 shared_ptr, std::un\n-0014c9a0: 6971 7565 5f70 7472 3c2f 636f 6465 3e2c ique_ptr,\n-0014c9b0: 2061 6e64 203c 636f 6465 3e73 7464 3a3a and std::\n-0014c9c0: 6175 746f 5f70 7472 3c2f 636f 6465 3e20 auto_ptr \n-0014c9d0: 6172 6520 7375 7070 6f72 7465 642e 204f are supported. O\n-0014c9e0: 7468 6572 2053 544c 2074 7970 6573 2061 ther STL types a\n-0014c9f0: 7265 206e 6f74 2073 6572 6961 6c69 7a61 re not serializa\n-0014ca00: 626c 652e 3c2f 6c69 3e0a 3c6c 693e 5465 ble..
    • Te\n-0014ca10: 6d70 6c61 7465 733a 2074 6865 2073 6f61 mplates: the soa\n-0014ca20: 7063 7070 3220 746f 6f6c 2061 7373 756d pcpp2 tool assum\n-0014ca30: 6573 2074 6861 7420 7465 6d70 6c61 7465 es that template\n-0014ca40: 7320 636c 6173 7365 7320 6861 7665 206f s classes have o\n-0014ca50: 6e6c 7920 6f6e 6520 7465 6d70 6c61 7465 nly one template\n-0014ca60: 2070 6172 616d 6574 6572 2074 7970 6520 parameter type \n-0014ca70: 616e 6420 7468 6573 6520 7465 6d70 6c61 and these templa\n-0014ca80: 7465 7320 6172 6520 636f 6e74 6169 6e65 tes are containe\n-0014ca90: 7273 206f 6620 7661 6c75 6573 206f 6620 rs of values of \n-0014caa0: 7468 6973 2074 656d 706c 6174 6520 7061 this template pa\n-0014cab0: 7261 6d65 7465 7220 7479 7065 2e20 5468 rameter type. Th\n-0014cac0: 6973 2074 656d 706c 6174 6520 636c 6173 is template clas\n-0014cad0: 7320 7368 6f75 6c64 2064 6566 696e 6520 s should define \n-0014cae0: 3c63 6f64 653e 6265 6769 6e28 293c 2f63 begin(), end(\n-0014cb00: 293c 2f63 6f64 653e 2c20 3c63 6f64 653e ), \n-0014cb10: 7369 7a65 2829 3c2f 636f 6465 3e2c 203c size(), <\n-0014cb20: 636f 6465 3e63 6c65 6172 2829 3c2f 636f code>clear(), and i\n-0014cb40: 6e73 6572 7428 293c 2f63 6f64 653e 206d nsert() m\n-0014cb50: 6574 686f 6473 2e3c 2f6c 693e 0a3c 6c69 ethods.
    • .Inheritance: si\n-0014cb70: 6e67 6c65 2063 6c61 7373 2069 6e68 6572 ngle class inher\n-0014cb80: 6974 616e 6365 2069 7320 7375 7070 6f72 itance is suppor\n-0014cb90: 7465 642e 3c2f 6c69 3e0a 3c6c 693e 4162 ted..
    • Ab\n-0014cba0: 7374 7261 6374 206d 6574 686f 6473 3a20 stract methods: \n-0014cbb0: 6120 636c 6173 7320 6d75 7374 2062 6520 a class must be \n-0014cbc0: 696e 7374 616e 7469 6162 6c65 2074 6f20 instantiable to \n-0014cbd0: 7375 7070 6f72 7420 7365 7269 616c 697a support serializ\n-0014cbe0: 6174 696f 6e20 6f66 2074 6861 7420 636c ation of that cl\n-0014cbf0: 6173 732e 2041 6e20 6162 7374 7261 6374 ass. An abstract\n-0014cc00: 2063 6c61 7373 2077 6865 6e20 7573 6564 class when used\n-0014cc10: 2073 686f 756c 6420 6265 2064 6563 6c61 should be decla\n-0014cc20: 7265 6420 7472 616e 7369 656e 742c 2073 red transient, s\n-0014cc30: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Transient d\n-0014cc70: 6174 6120 7479 7065 733c 2f61 3e2e 3c2f ata types..
    • Directiv\n-0014cc90: 6573 3a20 6469 7265 6374 6976 6573 2061 es: directives a\n-0014cca0: 6e64 2070 7261 676d 6173 2073 7563 6820 nd pragmas such \n-0014ccb0: 6173 203c 636f 6465 3e23 696e 636c 7564 as #includ\n-0014ccc0: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and #define are moved to t\n-0014ccf0: 6865 2067 656e 6572 6174 6564 203c 656d he generated soapStub.\n-0014cd10: 683c 2f63 6f64 653e 3c2f 656d 3e20 736f h so\n-0014cd20: 7572 6365 2063 6f64 6520 6279 2073 6f61 urce code by soa\n-0014cd30: 7063 7070 322e 2054 6865 7365 2064 6972 pcpp2. These dir\n-0014cd40: 6563 7469 7665 7320 6172 6520 616c 6c20 ectives are all \n-0014cd50: 706c 6163 6564 2061 7420 7468 6520 746f placed at the to\n-0014cd60: 7020 6f66 2074 6861 7420 6669 6c65 2c20 p of that file, \n-0014cd70: 7365 6520 3c61 2063 6c61 7373 3d22 656c see The \n-0014cda0: 2369 6e63 6c75 6465 2061 6e64 2023 6465 #include and #de\n-0014cdb0: 6669 6e65 2064 6972 6563 7469 7665 733c fine directives<\n-0014cdc0: 2f61 3e2e 2055 7365 2074 6865 203c 636f /a>. Use the #import directive to i\n-0014cdf0: 6d70 6f72 7420 696e 7465 7266 6163 6520 mport interface \n-0014ce00: 6865 6164 6572 2066 696c 6573 2069 6e74 header files int\n-0014ce10: 6f20 6f74 6865 7220 696e 7465 7266 6163 o other interfac\n-0014ce20: 6520 6865 6164 6572 2066 696c 6573 2c20 e header files, \n-0014ce30: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section The #import d\n-0014ce70: 6972 6563 7469 7665 3c2f 613e 202e 3c2f irective ..
    • C and C+\n-0014ce90: 2b20 636f 6465 2073 7461 7465 6d65 6e74 + code statement\n-0014cea0: 733a 206e 6f20 636f 6465 2073 7461 7465 s: no code state\n-0014ceb0: 6d65 6e74 7320 6172 6520 616c 6c6f 7773 ments are allows\n-0014cec0: 2069 6e20 696e 7465 7266 6163 6520 6865 in interface he\n-0014ced0: 6164 6572 2066 696c 6573 2e20 436c 6173 ader files. Clas\n-0014cee0: 7320 6d65 7468 6f64 7320 7368 6f75 6c64 s methods should\n-0014cef0: 2062 6520 6465 636c 6172 6564 2077 6974 be declared wit\n-0014cf00: 686f 7574 2063 6f64 6520 696e 203c 636f hout code in { and \n-0014cf20: 3c63 6f64 653e 7d3c 2f63 6f64 653e 2e20 }. \n-0014cf30: 416c 736f 2063 6f6e 7374 7275 6374 6f72 Also constructor\n-0014cf40: 2069 6e69 7469 616c 697a 6572 7320 6172 initializers ar\n-0014cf50: 6520 6e6f 7420 616c 6c6f 7765 642e 2043 e not allowed. C\n-0014cf60: 6c61 7373 206d 6574 686f 6420 696d 706c lass method impl\n-0014cf70: 656d 656e 7461 7469 6f6e 7320 7368 6f75 ementations shou\n-0014cf80: 6c64 2062 6520 6465 6669 6e65 6420 696e ld be defined in\n-0014cf90: 2061 2073 6570 6172 6174 6520 432b 2b20 a separate C++ \n-0014cfa0: 736f 7572 6365 2066 696c 652e 3c2f 6c69 source file..
    • C++ refere\n-0014cfc0: 6e63 6573 3a20 7468 6573 6520 6361 6e6e nces: these cann\n-0014cfd0: 6f74 2062 6520 7365 7269 616c 697a 6564 ot be serialized\n-0014cfe0: 2c20 7573 6520 706f 696e 7465 7273 2069 , use pointers i\n-0014cff0: 6e73 7465 6164 2e3c 2f6c 693e 0a3c 2f75 nstead.
    • ..

      The follow\n-0014d010: 696e 6720 432f 432b 2b20 6461 7461 2074 ing C/C++ data t\n-0014d020: 7970 6573 2072 6571 7569 7265 2073 6f6d ypes require som\n-0014d030: 6520 6174 7465 6e74 696f 6e20 746f 2065 e attention to e\n-0014d040: 6e73 7572 6520 7468 6579 2063 616e 2062 nsure they can b\n-0014d050: 6520 7365 7269 616c 697a 6564 3a3c 2f70 e serialized:.

        .
      • Union\n-0014d070: 2074 7970 6573 3a20 6120 756e 696f 6e20 types: a union \n-0014d080: 6461 7461 2074 7970 6520 6361 6e20 6e6f data type can no\n-0014d090: 7420 6265 2073 6572 6961 6c69 7a65 6420 t be serialized \n-0014d0a0: 756e 6c65 7373 2072 756e 2d74 696d 6520 unless run-time \n-0014d0b0: 696e 666f 726d 6174 696f 6e20 6973 2061 information is a\n-0014d0c0: 7373 6f63 6961 7465 6420 7769 7468 2061 ssociated with a\n-0014d0d0: 2075 6e69 6f6e 2066 6f72 2074 6865 2073 union for the s\n-0014d0e0: 6572 6961 6c69 7a65 7220 746f 2064 6574 erializer to det\n-0014d0f0: 6572 6d69 6e65 2077 6869 6368 2075 6e69 ermine which uni\n-0014d100: 6f6e 206d 656d 6265 7220 6973 2076 616c on member is val\n-0014d110: 6964 2e20 546f 2073 6572 6961 6c69 7a65 id. To serialize\n-0014d120: 2061 2075 6e69 6f6e 2c20 706c 6163 6520 a union, place \n-0014d130: 7468 6520 756e 696f 6e20 696e 2061 2073 the union in a s\n-0014d140: 7472 7563 7420 6f72 2063 6c61 7373 2061 truct or class a\n-0014d150: 7320 6120 6d65 6d62 6572 2061 6e64 2070 s a member and p\n-0014d160: 7265 6365 6465 2074 6869 7320 6d65 6d62 recede this memb\n-0014d170: 6572 2077 6974 6820 616e 2069 6e74 6567 er with an integ\n-0014d180: 6572 206d 656d 6265 7220 7468 6174 2073 er member that s\n-0014d190: 6572 7665 7320 6173 2061 2073 656c 6563 erves as a selec\n-0014d1a0: 746f 722e 2053 6565 2053 6563 7469 6f6e tor. See Section\n-0014d1b0: 203c 6120 636c 6173 733d 2265 6c22 2068 Union ser\n-0014d1e0: 6961 6c69 7a61 7469 6f6e 3c2f 613e 2066 ialization f\n-0014d1f0: 6f72 2064 6574 6169 6c73 2e3c 2f6c 693e or details.
      • \n-0014d200: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 642a .
      • void*\n-0014d210: 3c2f 636f 6465 3e20 7479 7065 733a 2074 types: t\n-0014d220: 6865 203c 636f 6465 3e76 6f69 642a 3c2f he void* data type \n-0014d240: 6361 6e6e 6f74 2062 6520 7365 7269 616c cannot be serial\n-0014d250: 697a 6564 2075 6e6c 6573 7320 7275 6e2d ized unless run-\n-0014d260: 7469 6d65 2074 7970 6520 696e 666f 726d time type inform\n-0014d270: 6174 696f 6e20 6973 2061 7373 6f63 6961 ation is associa\n-0014d280: 7465 6420 7769 7468 2074 6865 2070 6f69 ted with the poi\n-0014d290: 6e74 6572 2075 7369 6e67 2061 203c 636f nter using a int __type member in t\n-0014d2c0: 6865 2073 7472 7563 7420 6f72 2063 6c61 he struct or cla\n-0014d2d0: 7373 2074 6861 7420 636f 6e74 6169 6e73 ss that contains\n-0014d2e0: 2074 6865 203c 636f 6465 3e76 6f69 642a the void*\n-0014d2f0: 3c2f 636f 6465 3e20 6d65 6d62 6572 2e20 member. \n-0014d300: 5365 6520 5365 6374 696f 6e20 3c61 2063 See Section Void pointer se\n-0014d340: 7269 616c 697a 6174 696f 6e3c 2f61 3e20 rialization \n-0014d350: 666f 7220 6465 7461 696c 732e 3c2f 6c69 for details..
      • Pointers t\n-0014d370: 6f20 6172 7261 7973 3a20 616e 7920 706f o arrays: any po\n-0014d380: 696e 7465 722c 2065 7863 6570 7420 666f inter, except fo\n-0014d390: 7220 4320 7374 7269 6e67 7320 7768 6963 r C strings whic\n-0014d3a0: 6820 6172 6520 706f 696e 7465 7273 2074 h are pointers t\n-0014d3b0: 6f20 616e 2061 7272 6179 206f 6620 6368 o an array of ch\n-0014d3c0: 6172 6163 7465 7273 2c20 6172 6520 7472 aracters, are tr\n-0014d3d0: 6561 7465 6420 6279 2074 6865 2073 6f61 eated by the soa\n-0014d3e0: 7063 7070 3220 746f 6f6c 2061 7320 6966 pcpp2 tool as if\n-0014d3f0: 2074 6865 2070 6f69 6e74 6572 2070 6f69 the pointer poi\n-0014d400: 6e74 7320 746f 206f 6e6c 7920 6f6e 6520 nts to only one \n-0014d410: 7661 6c75 652e 2043 6f6e 7365 7175 656e value. Consequen\n-0014d420: 746c 792c 2074 6865 2073 6572 6961 6c69 tly, the seriali\n-0014d430: 7a61 7469 6f6e 2066 756e 6374 696f 6e73 zation functions\n-0014d440: 2066 6f72 2070 6f69 6e74 6572 7320 6f6e for pointers on\n-0014d450: 6c79 2073 6572 6961 6c69 7a65 2074 6865 ly serialize the\n-0014d460: 2066 6972 7374 2076 616c 7565 2070 6f69 first value poi\n-0014d470: 6e74 6564 2074 6f2c 2077 6865 6e20 7468 nted to, when th\n-0014d480: 6520 706f 696e 7465 7220 6973 206e 6f6e e pointer is non\n-0014d490: 2d4e 554c 4c2e 2054 6f20 6465 636c 6172 -NULL. To declar\n-0014d4a0: 6520 706f 696e 7465 7273 2074 6f20 6172 e pointers to ar\n-0014d4b0: 7261 7973 2061 7320 7374 7275 6374 2061 rays as struct a\n-0014d4c0: 6e64 2063 6c61 7373 206d 656d 6265 7273 nd class members\n-0014d4d0: 2c20 6120 7369 7a65 206d 656d 6265 7220 , a size member \n-0014d4e0: 6973 2069 6e63 6c75 6465 6420 696e 2074 is included in t\n-0014d4f0: 6865 2073 7472 7563 7420 6f72 2063 6c61 he struct or cla\n-0014d500: 7373 2c20 7365 6520 5365 6374 696f 6e20 ss, see Section \n-0014d510: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Dynamic\n-0014d540: 2061 7272 6179 2073 6572 6961 6c69 7a61 array serializa\n-0014d550: 7469 6f6e 3c2f 613e 2066 6f72 2064 6574 tion for det\n-0014d560: 6169 6c73 2e3c 2f6c 693e 0a3c 6c69 3e43 ails.
      • .
      • C\n-0014d570: 6f6e 7374 616e 7420 7661 6c75 6573 3a20 onstant values: \n-0014d580: 3c63 6f64 653e 636f 6e73 743c 2f63 6f64 const constant valu\n-0014d5a0: 6573 2073 7563 6820 6173 203c 636f 6465 es such as const me\n-0014d5c0: 6d62 6572 7320 6f66 2061 2073 7472 7563 mbers of a struc\n-0014d5d0: 7420 6f72 2063 6c61 7373 2063 616e 6e6f t or class canno\n-0014d5e0: 7420 6265 2073 6572 6961 6c69 7a65 6420 t be serialized \n-0014d5f0: 6578 6365 7074 2066 6f72 203c 636f 6465 except for const char* and co\n-0014d620: 6e73 7420 7763 6861 725f 742a 3c2f 636f nst wchar_t* strings..
      • Uninitiali\n-0014d650: 7a65 6420 706f 696e 7465 7273 3a20 4f62 zed pointers: Ob\n-0014d660: 7669 6f75 736c 792c 2061 6c6c 2070 6f69 viously, all poi\n-0014d670: 6e74 6572 7320 7468 6174 2061 7265 2070 nters that are p\n-0014d680: 6172 7420 6f66 2061 2064 6174 6120 7374 art of a data st\n-0014d690: 7275 6374 7572 6520 746f 2073 6572 6961 ructure to seria\n-0014d6a0: 6c69 7a65 206d 7573 7420 6265 2076 616c lize must be val\n-0014d6b0: 6964 206f 7220 4e55 4c4c 2e20 4f74 6865 id or NULL. Othe\n-0014d6c0: 7277 6973 6520 7468 6520 7365 7269 616c rwise the serial\n-0014d6d0: 697a 6572 2077 696c 6c20 6372 6173 682e izer will crash.\n-0014d6e0: 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 3ef0
      • .
      .

      .\n-0014d6f0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-0014d700: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-0014d710: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

      .Advan\n-0014d750: 6365 6420 6665 6174 7572 6573 3c2f 6831 ced features.

      .... Back to ta\n-0014d780: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n-0014d790: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

      .

      .Int\n-0014d7d0: 6572 6e61 7469 6f6e 616c 697a 6174 696f ernationalizatio\n-0014d7e0: 6e3c 2f68 323e 0a3c 703e 5265 6775 6c61 n

      .

      Regula\n-0014d7f0: 7220 382d 6269 7420 7374 7269 6e67 7320 r 8-bit strings \n-0014d800: 6361 6e6e 6f74 2068 6f6c 6420 7769 6465 cannot hold wide\n-0014d810: 2063 6861 7261 6374 6572 7320 6f75 7473 characters outs\n-0014d820: 6964 6520 6f66 2074 6865 2063 6861 7261 ide of the chara\n-0014d830: 6374 6572 2072 616e 6765 205b 312c 3235 cter range [1,25\n-0014d840: 355d 2e20 4f66 2063 6f75 7273 6520 796f 5]. Of course yo\n-0014d850: 7520 6361 6e20 7573 6520 7769 6465 2073 u can use wide s\n-0014d860: 7472 696e 6773 2069 6e73 7465 6164 206f trings instead o\n-0014d870: 6620 382d 6269 7420 7374 7269 6e67 7320 f 8-bit strings \n-0014d880: 696e 2074 6865 2069 6e74 6572 6661 6365 in the interface\n-0014d890: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n-0014d8a0: 2073 6f61 7063 7070 322e 2041 6c74 6572 soapcpp2. Alter\n-0014d8b0: 6e61 7469 7665 6c79 2c20 7365 7420 7468 natively, set th\n-0014d8c0: 6520 3c63 6f64 653e 2353 4f41 505f 435f e #SOAP_C_\n-0014d8d0: 5554 4653 5452 494e 473c 2f63 6f64 653e UTFSTRING\n-0014d8e0: 206d 6f64 6520 666c 6167 2074 6f20 656e mode flag to en\n-0014d8f0: 636f 6465 2077 6964 6520 6368 6172 6163 code wide charac\n-0014d900: 7465 7273 2069 6e20 382d 6269 7420 7374 ters in 8-bit st\n-0014d910: 7269 6e67 7320 696e 2055 5446 2d38 2066 rings in UTF-8 f\n-0014d920: 6f72 6d61 742e 3c2f 703e 0a3c 703e 466f ormat.

      .

      Fo\n-0014d930: 7220 6578 616d 706c 652c 2074 6865 203c r example, the <\n-0014d940: 656d 3e3c 636f 6465 3e78 7364 3a73 7472 em>xsd:str\n-0014d950: 696e 673c 2f63 6f64 653e 3c2f 656d 3e20 ing \n-0014d960: 7374 7269 6e67 2073 6368 656d 6120 7479 string schema ty\n-0014d970: 7065 2063 616e 2062 6520 6465 636c 6172 pe can be declar\n-0014d980: 6564 2061 7320 6120 7769 6465 2d63 6861 ed as a wide-cha\n-0014d990: 7261 6374 6572 2073 7472 696e 6720 616e racter string an\n-0014d9a0: 6420 7573 6564 2073 7562 7365 7175 656e d used subsequen\n-0014d9b0: 746c 793a 3c2f 703e 0a3c 6469 7620 636c tly:

      .
      <\n-0014d9d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0014d9e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef \n-0014da20: 7763 6861 725f 743c 2f73 7061 6e3e 202a wchar_t *\n-0014da30: 7873 645f 5f73 7472 696e 673b 203c 2f64 xsd__string; .
      \n-0014da70: 696e 743c 2f73 7061 6e3e 206e 735f 5f6d int ns__m\n-0014da80: 794d 6574 686f 6428 7873 645f 5f73 7472 yMethod(xsd__str\n-0014da90: 696e 6720 696e 7075 742c 2078 7364 5f5f ing input, xsd__\n-0014daa0: 7374 7269 6e67 202a 6f75 7470 7574 293b string *output);\n-0014dab0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      To do so automa\n-0014dae0: 7469 6361 6c6c 7920 7769 7468 2077 7364 tically with wsd\n-0014daf0: 6c32 682c 2065 6469 7420 3c65 6d3e 3c63 l2h, edit typemap.dat<\n-0014db10: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-0014db20: 6164 6420 7468 6520 6c69 6e65 3a20 3c2f add the line:
      xsd__str\n-0014db50: 696e 6720 3d20 7c20 7763 6861 725f 742a  ing = | wchar_t*\n-0014db60: 207c 2077 6368 6172 5f74 2a0a 3c2f 7072   | wchar_t*.

      or for C++\n-0014db80: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

      xsd_\n-0014dba0: 5f73 7472 696e 6720 3d20 7c20 7374 643a  _string = | std:\n-0014dbb0: 3a77 7374 7269 6e67 207c 2073 7464 3a3a  :wstring | std::\n-0014dbc0: 7773 7472 696e 672a 0a3c 2f70 7265 3e3c  wstring*.
      <\n-0014dbd0: 703e 2041 6c74 6572 6e61 7469 7665 6c79 p> Alternatively\n-0014dbe0: 2c20 382d 6269 7420 7374 7269 6e67 7320 , 8-bit strings \n-0014dbf0: 6361 6e20 686f 6c64 2055 5446 2d38 2066 can hold UTF-8 f\n-0014dc00: 6f72 6d61 7474 6564 2077 6964 6520 6368 ormatted wide ch\n-0014dc10: 6172 6163 7465 7273 2077 6865 6e20 7468 aracters when th\n-0014dc20: 6520 3c63 6f64 653e 2353 4f41 505f 435f e #SOAP_C_\n-0014dc30: 5554 4653 5452 494e 473c 2f63 6f64 653e UTFSTRING\n-0014dc40: 2066 6c61 6720 6973 2065 6e61 626c 6564 flag is enabled\n-0014dc50: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Run-time fla\n-0014dc90: 6773 3c2f 613e 202e 2054 6865 2061 7070 gs . The app\n-0014dca0: 6c69 6361 7469 6f6e 2069 7320 7265 7370 lication is resp\n-0014dcb0: 6f6e 7369 626c 6520 666f 7220 6669 6c6c onsible for fill\n-0014dcc0: 696e 6720 7265 6775 6c61 7220 7374 7269 ing regular stri\n-0014dcd0: 6e67 7320 7769 7468 2055 5446 2d38 2063 ngs with UTF-8 c\n-0014dce0: 6f6e 7465 6e74 2e3c 2f70 3e0a 3c70 3e41 ontent.

      .

      A\n-0014dcf0: 6c73 6f20 7468 6520 3c63 6f64 653e 2353 lso the #S\n-0014dd00: 4f41 505f 435f 4d42 5354 5249 4e47 3c2f OAP_C_MBSTRING flag can b\n-0014dd20: 6520 7573 6564 2074 6f20 6163 7469 7661 e used to activa\n-0014dd30: 7465 206d 756c 7469 6279 7465 2063 6861 te multibyte cha\n-0014dd40: 7261 6374 6572 2073 7570 706f 7274 2075 racter support u\n-0014dd50: 7369 6e67 2074 6865 2063 7572 7265 6e74 sing the current\n-0014dd60: 206c 6f63 616c 652e 204d 756c 7469 6279 locale. Multiby\n-0014dd70: 7465 2073 7570 706f 7274 2064 6570 656e te support depen\n-0014dd80: 6473 206f 6e20 7468 6520 6c6f 6361 6c65 ds on the locale\n-0014dd90: 2073 6574 7469 6e67 7320 666f 7220 6465 settings for de\n-0014dda0: 616c 696e 6720 7769 7468 2065 7874 656e aling with exten\n-0014ddb0: 6465 6420 6e61 7475 7261 6c20 6c61 6e67 ded natural lang\n-0014ddc0: 7561 6765 2065 6e63 6f64 696e 6773 2e3c uage encodings.<\n-0014ddd0: 2f70 3e0a 3c70 3e42 6f74 6820 382d 6269 /p>.

      Both 8-bi\n-0014dde0: 7420 7374 7269 6e67 7320 616e 6420 7769 t strings and wi\n-0014ddf0: 6465 2d63 6861 7261 6374 6572 2073 7472 de-character str\n-0014de00: 696e 6773 2063 616e 2062 6520 7573 6564 ings can be used\n-0014de10: 2074 6f67 6574 6865 7220 7769 7468 696e together within\n-0014de20: 2061 6e20 6170 706c 6963 6174 696f 6e2e an application.\n-0014de30: 2046 6f72 2065 7861 6d70 6c65 2c20 7468 For example, th\n-0014de40: 6520 666f 6c6c 6f77 696e 6720 6865 6164 e following head\n-0014de50: 6572 2066 696c 6520 6465 636c 6172 6174 er file declarat\n-0014de60: 696f 6e20 696e 7472 6f64 7563 6573 2074 ion introduces t\n-0014de70: 776f 2073 7472 696e 6720 7363 6865 6d61 wo string schema\n-0014de80: 2074 7970 6573 3a3c 2f70 3e0a 3c64 6976 types:

      .
      typede\n-0014ded0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f wchar_t *xsd__string; \n-0014df10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      t\n-0014df40: 7970 6564 6566 3c2f 7370 616e 3e20 3c73 ypedef char *xsd__string\n-0014df80: 5f3b 203c 7370 616e 2063 6c61 7373 3d22 _; // trai\n-0014dfa0: 6c69 6e67 2026 2333 393b 5f26 2333 393b ling '_'\n-0014dfb0: 2061 766f 6964 7320 6e61 6d65 2063 6c61 avoids name cla\n-0014dfc0: 7368 203c 2f73 7061 6e3e 3c2f 6469 763e sh
      \n-0014dfd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      int\n-0014e000: 3c2f 7370 616e 3e20 6e73 5f5f 6d79 4d65 ns__myMe\n-0014e010: 7468 6f64 2878 7364 5f5f 7374 7269 6e67 thod(xsd__string\n-0014e020: 2069 6e70 7574 2c20 7873 645f 5f73 7472 input, xsd__str\n-0014e030: 696e 675f 202a 6f75 7470 7574 293b 3c2f ing_ *output);.

      P\n-0014e060: 6c65 6173 6520 636f 6e73 756c 7420 7468 lease consult th\n-0014e070: 6520 5554 462d 3820 7370 6563 6966 6963 e UTF-8 specific\n-0014e080: 6174 696f 6e20 666f 7220 6465 7461 696c ation for detail\n-0014e090: 7320 6f6e 2074 6865 2055 5446 2d38 2066 s on the UTF-8 f\n-0014e0a0: 6f72 6d61 7420 7768 656e 2070 726f 6365 ormat when proce\n-0014e0b0: 7373 696e 6720 382d 6269 7420 7374 7269 ssing 8-bit stri\n-0014e0c0: 6e67 7320 7769 7468 2055 5446 2d38 2063 ngs with UTF-8 c\n-0014e0d0: 6f6e 7465 6e74 2e20 4e6f 7465 2074 6861 ontent. Note tha\n-0014e0e0: 7420 7468 6520 4153 4349 4920 6368 6172 t the ASCII char\n-0014e0f0: 6163 7465 7220 7365 7420 5b31 2d31 3237 acter set [1-127\n-0014e100: 5d20 6973 2061 2073 7562 7365 7420 6f66 ] is a subset of\n-0014e110: 2055 5446 2d38 2e20 5468 6572 6566 6f72 UTF-8. Therefor\n-0014e120: 652c 2077 6974 6820 7468 6520 3c63 6f64 e, with the #SOAP_C_UTFSTR\n-0014e140: 494e 473c 2f63 6f64 653e 2066 6c61 6720 ING flag \n-0014e150: 7365 742c 2073 7472 696e 6773 206d 6179 set, strings may\n-0014e160: 2068 6f6c 6420 4153 4349 4920 6368 6172 hold ASCII char\n-0014e170: 6163 7465 7220 6461 7461 2061 6e64 2055 acter data and U\n-0014e180: 5446 2d38 2065 7874 656e 7369 6f6e 732e TF-8 extensions.\n-0014e190: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

      .

      See also\n-0014e1a0: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f C a\n-0014e1d0: 6e64 2043 2b2b 2058 4d4c 2064 6174 6120 nd C++ XML data \n-0014e1e0: 6269 6e64 696e 6773 3c2f 613e 2064 6f63 bindings doc\n-0014e1f0: 756d 656e 7461 7469 6f6e 2066 6f72 206d umentation for m\n-0014e200: 6f72 6520 6465 7461 696c 7320 6f6e 2075 ore details on u\n-0014e210: 7369 6e67 203c 656d 3e3c 636f 6465 3e74 sing t\n-0014e220: 7970 656d 6170 2e64 6174 3c2f 636f 6465 ypemap.dat for wsdl2\n-0014e240: 682e 3c2f 703e 0a3c 703e f09f 949d 203c h.

      .

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

      ..Directiv\n-0014e2b0: 6573 3c2f 6832 3e0a 3c70 3e41 6e20 696e es

      .

      An in\n-0014e2c0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-0014e2d0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n-0014e2e0: 206d 6179 2069 6e63 6c75 6465 203c 636f may include //gsoap directives to \n-0014e310: 636f 6e66 6967 7572 6520 6d65 7373 6167 configure messag\n-0014e320: 696e 6720 7072 6f74 6f63 6f6c 7320 7375 ing protocols su\n-0014e330: 6368 2061 7320 534f 4150 206f 7220 5245 ch as SOAP or RE\n-0014e340: 5354 2c20 746f 2061 7373 6f63 6961 7465 ST, to associate\n-0014e350: 2053 4f41 5020 4865 6164 6572 7320 616e SOAP Headers an\n-0014e360: 6420 4661 756c 7473 2077 6974 6820 6d65 d Faults with me\n-0014e370: 7373 6167 6573 2c20 616e 6420 746f 2073 ssages, and to s\n-0014e380: 6574 2070 726f 7065 7274 6965 7320 6f66 et properties of\n-0014e390: 2074 6865 2057 6562 2073 6572 7669 6365 the Web service\n-0014e3a0: 2064 6566 696e 6564 2069 6e20 7468 6520 defined in the \n-0014e3b0: 736f 6170 6370 7032 2d67 656e 6572 6174 soapcpp2-generat\n-0014e3c0: 6564 2057 5344 4c20 616e 6420 5853 4420 ed WSDL and XSD \n-0014e3d0: 6669 6c65 732e 2044 6972 6563 7469 7665 files. Directive\n-0014e3e0: 7320 666f 7220 736f 6170 6370 7032 2061 s for soapcpp2 a\n-0014e3f0: 7265 2073 7065 6369 6669 6564 2061 7320 re specified as \n-0014e400: 3c63 6f64 653e 2f2f 6773 6f61 703c 2f63 //gsoap-comments th\n-0014e420: 6174 2061 7265 2070 726f 6365 7373 6564 at are processed\n-0014e430: 2062 7920 736f 6170 6370 7032 2e3c 2f70 by soapcpp2..

      .S\n-0014e470: 6572 7669 6365 2064 6972 6563 7469 7665 ervice directive\n-0014e480: 733c 2f68 333e 0a3c 703e 4120 7365 7276 s

      .

      A serv\n-0014e490: 6963 6520 6469 7265 6374 6976 6520 6d75 ice directive mu\n-0014e4a0: 7374 2073 7461 7274 2061 7420 6120 6e65 st start at a ne\n-0014e4b0: 7720 6c69 6e65 2061 6e64 2069 7320 6f66 w line and is of\n-0014e4c0: 2074 6865 2066 6f72 6d3a 3c2f 703e 0a3c the form:

      .<\n-0014e4d0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-0014e4e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      //g\n-0014e510: 736f 6170 2026 6c74 3b70 7265 6669 7826 soap <prefix&\n-0014e520: 6774 3b20 7365 7276 6963 6520 266c 743b gt; service <\n-0014e530: 7072 6f70 6572 7479 2667 743b 3a20 266c property>: &l\n-0014e540: 743b 7661 6c75 6526 6774 3b3c 2f73 7061 t;value>
      .
    <\n-0014e560: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0014e570: 3c70 3e77 6865 7265 203c 636f 6465 3e26

    where &\n-0014e580: 6c74 3b70 7265 6669 7826 6774 3b3c 2f63 lt;prefix> is the XML \n-0014e5a0: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n-0014e5b0: 206f 6620 6120 7365 7276 6963 6520 6269 of a service bi\n-0014e5c0: 6e64 696e 672e 2054 6865 203c 636f 6465 nding. The <property>\n-0014e5e0: 3b3c 2f63 6f64 653e 2061 6e64 203c 636f ; and <value>\n-0014e600: 3c2f 636f 6465 3e20 6669 656c 6473 2061 fields a\n-0014e610: 7265 206f 6e65 206f 6620 7468 6520 666f re one of the fo\n-0014e620: 6c6c 6f77 696e 673a 3c2f 703e 0a3c 7461 llowing:

    ...prop\n-0014e690: 6572 7479 2020 203c 2f74 683e 3c74 6820 erty va\n-0014e6c0: 6c75 6520 2020 203c 2f74 683e 3c2f 7472 lue ..name<\n-0014e720: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-0014e750: 6e61 6d65 206f 6620 7468 6520 7365 7276 name of the serv\n-0014e760: 6963 652c 206f 7074 696f 6e61 6c6c 7920 ice, optionally \n-0014e770: 666f 6c6c 6f77 6564 2062 7920 7465 7874 followed by text\n-0014e780: 2064 6573 6372 6962 696e 6720 7468 6520 describing the \n-0014e790: 7365 7276 6963 6520 2020 203c 2f74 643e service \n-0014e7a0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-0014e7f0: 6e61 6d65 7370 6163 653c 2f63 6f64 653e namespace\n-0014e800: 2020 203c 2f74 643e 3c74 6420 636c 6173 URI of\n-0014e830: 2074 6865 2057 5344 4c20 7461 7267 6574 the WSDL target\n-0014e840: 4e61 6d65 7370 6163 6520 2020 203c 2f74 Namespace ..documentation t\n-0014e8e0: 6578 7420 6465 7363 7269 6269 6e67 2074 ext describing t\n-0014e8f0: 6865 2073 6572 7669 6365 2028 7365 6520 he service (see \n-0014e900: 616c 736f 2074 6865 203c 636f 6465 3e6e also the n\n-0014e910: 616d 653c 2f63 6f64 653e 2070 726f 7065 ame prope\n-0014e920: 7274 7929 2c20 6d75 6c74 6970 6c65 2070 rty), multiple p\n-0014e930: 6572 6d69 7474 6564 2020 2020 3c2f 7464 ermitted ..doc an alias fo\n-0014e9d0: 7220 7468 6520 3c63 6f64 653e 646f 6375 r the docu\n-0014e9e0: 6d65 6e74 6174 696f 6e3c 2f63 6f64 653e mentation\n-0014e9f0: 2070 726f 7065 7274 7920 2020 203c 2f74 property ..style
    \n-0014ea60: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 doc\n-0014ea90: 756d 656e 743c 2f63 6f64 653e 2028 6465 ument (de\n-0014eaa0: 6661 756c 7429 2053 4f41 5020 6d65 7373 fault) SOAP mess\n-0014eab0: 6167 696e 6720 7374 796c 6520 6f72 203c aging style or <\n-0014eac0: 636f 6465 3e72 7063 3c2f 636f 6465 3e20 code>rpc
    \n-0014ead0: 666f 7220 534f 4150 2052 5043 2020 2020 for SOAP RPC \n-0014eae0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-0014eb30: 636f 6465 3e65 6e63 6f64 696e 673c 2f63 code>encoding literal (default), encoded for SOAP enco\n-0014ebb0: 6469 6e67 2c20 6f72 2061 2063 7573 746f ding, or a custo\n-0014ebc0: 6d20 5552 4920 2020 203c 2f74 643e 3c2f m URI ..pro\n-0014ec20: 746f 636f 6c3c 2f63 6f64 653e 2020 203c tocol <\n-0014ec30: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>specifies \n-0014ec60: 534f 4150 206f 7220 5245 5354 2c20 7365 SOAP or REST, se\n-0014ec70: 6520 6265 6c6f 7720 2020 203c 2f74 643e e below \n-0014ec80: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-0014ecd0: 706f 7274 3c2f 636f 6465 3e20 2020 3c2f port URL of the \n-0014ed10: 7365 7276 6963 6520 656e 6470 6f69 6e74 service endpoint\n-0014ed20: 2c20 7573 7561 6c6c 7920 616e 2068 7474 , usually an htt\n-0014ed30: 7020 6f72 2068 7474 7073 2061 6464 7265 p or https addre\n-0014ed40: 7373 2c20 746f 2075 7365 2069 6e20 7468 ss, to use in th\n-0014ed50: 6520 5753 444c 2064 6566 696e 6974 696f e WSDL definitio\n-0014ed60: 6e73 2f73 6572 7669 6365 2f70 6f72 742f ns/service/port/\n-0014ed70: 6164 6472 6573 732f 406c 6f63 6174 696f address/@locatio\n-0014ed80: 6e20 2020 203c 2f74 643e 3c2f 7472 3e0a n .\n-0014ed90: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-0014edb0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .locatio\n-0014ede0: 6e3c 2f63 6f64 653e 2020 203c 2f74 643e n \n-0014edf0: 3c74 6420 636c 6173 733d 226d 6172 6b64 an alias for t\n-0014ee20: 6865 203c 636f 6465 3e70 6f72 743c 2f63 he port property \n-0014ee40: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n-0014ee90: 3c63 6f64 653e 656e 6470 6f69 6e74 3c2f endpoint a\n-0014eed0: 6e20 616c 6961 7320 666f 7220 7468 6520 n alias for the \n-0014eee0: 3c63 6f64 653e 706f 7274 3c2f 636f 6465 port property ..transport URI \n-0014ef90: 6465 636c 6172 6174 696f 6e20 6f66 2074 declaration of t\n-0014efa0: 6865 2074 7261 6e73 706f 7274 2c20 7573 he transport, us\n-0014efb0: 7561 6c6c 7920 3c63 6f64 653e 3c61 2068 ually http:\n-0014eff0: 2f2f 7363 6865 6d61 732e 786d 6c73 6f61 //schemas.xmlsoa\n-0014f000: 702e 6f72 672f 736f 6170 2f68 7474 703c p.org/soap/http<\n-0014f010: 2f61 3e3c 2f63 6f64 653e 2020 2020 3c2f /a> ..definitions n\n-0014f0b0: 616d 6520 6f66 2074 6865 2057 5344 4c20 ame of the WSDL \n-0014f0c0: 6465 6669 6e69 7469 6f6e 732f 406e 616d definitions/@nam\n-0014f0d0: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n-0014f0e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-0014f100: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .type na\n-0014f160: 6d65 206f 6620 7468 6520 5753 444c 2064 me of the WSDL d\n-0014f170: 6566 696e 6974 696f 6e73 2f70 6f72 7454 efinitions/portT\n-0014f180: 7970 652f 406e 616d 6520 2857 5344 4c32 ype/@name (WSDL2\n-0014f190: 2e30 2069 6e74 6572 6661 6365 2f40 6e61 .0 interface/@na\n-0014f1a0: 6d65 2920 2020 203c 2f74 643e 3c2f 7472 me) ..port\n-0014f200: 5479 7065 3c2f 636f 6465 3e20 2020 3c2f Type an alias fo\n-0014f240: 7220 7468 6520 3c63 6f64 653e 7479 7065 r the type\n-0014f250: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property\n-0014f260: 2028 3c63 6f64 653e 706f 7274 5479 7065 (portType\n-0014f270: 3c2f 636f 6465 3e20 666f 6c6c 6f77 7320 follows \n-0014f280: 534f 4150 2031 2e31 206e 616d 696e 6720 SOAP 1.1 naming \n-0014f290: 636f 6e76 656e 7469 6f6e 7329 2020 2020 conventions) \n-0014f2a0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..interface an\n-0014f330: 2061 6c69 6173 2066 6f72 2074 6865 203c alias for the <\n-0014f340: 636f 6465 3e74 7970 653c 2f63 6f64 653e code>type\n-0014f350: 2070 726f 7065 7274 7920 283c 636f 6465 property (interface follows SOAP 1\n-0014f380: 2e32 206e 616d 696e 6720 636f 6e76 656e .2 naming conven\n-0014f390: 7469 6f6e 7329 2020 2020 3c2f 7464 3e3c tions) <\n-0014f3a0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..b\n-0014f3f0: 696e 6469 6e67 3c2f 636f 6465 3e20 2020 inding \n-0014f400: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 name of t\n-0014f430: 6865 2057 5344 4c20 6465 6669 6e69 7469 he WSDL definiti\n-0014f440: 6f6e 732f 6269 6e64 696e 672f 406e 616d ons/binding/@nam\n-0014f450: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n-0014f460: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-0014f480: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .portNam\n-0014f4b0: 653c 2f63 6f64 653e 2020 203c 2f74 643e e \n-0014f4c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 name of the WS\n-0014f4f0: 444c 2064 6566 696e 6974 696f 6e73 2f73 DL definitions/s\n-0014f500: 6572 7669 6365 2f70 6f72 742f 406e 616d ervice/port/@nam\n-0014f510: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n-0014f520: 3c74 7220 636c 6173 733d 226d 6172 6b64 .execut\n-0014f570: 6162 6c65 3c2f 636f 6465 3e20 2020 3c2f able name of the\n-0014f5b0: 2022 6578 6563 7574 6162 6c65 2220 746f \"executable\" to\n-0014f5c0: 2075 7365 2069 6e20 7468 6520 5753 444c use in the WSDL\n-0014f5d0: 2064 6566 696e 6974 696f 6e73 2f73 6572 definitions/ser\n-0014f5e0: 7669 6365 2f70 6f72 742f 6164 6472 6573 vice/port/addres\n-0014f5f0: 732f 406c 6f63 6174 696f 6e20 2020 3c2f s/@location ..

    The service\n-0014f620: 203c 636f 6465 3e6e 616d 653c 2f63 6f64 name and nam\n-0014f640: 6573 7061 6365 3c2f 636f 6465 3e20 7072 espace pr\n-0014f650: 6f70 6572 7469 6573 2061 7265 2072 6571 operties are req\n-0014f660: 7569 7265 6420 696e 206f 7264 6572 2074 uired in order t\n-0014f670: 6f20 6765 6e65 7261 7465 2061 2076 616c o generate a val\n-0014f680: 6964 2057 5344 4c20 7769 7468 2073 6f61 id WSDL with soa\n-0014f690: 7063 7070 322e 2054 6865 206f 7468 6572 pcpp2. The other\n-0014f6a0: 2070 726f 7065 7274 6965 7320 6172 6520 properties are \n-0014f6b0: 6f70 7469 6f6e 616c 2e3c 2f70 3e0a 3c70 optional.

    .The style\n-0014f6d0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and encoding property defau\n-0014f700: 6c74 7320 6172 6520 6368 616e 6765 6420 lts are changed \n-0014f710: 7769 7468 203c 623e 3c63 6f64 653e 736f with so\n-0014f720: 6170 6370 7032 202d 653c 2f63 6f64 653e apcpp2 -e\n-0014f730: 3c2f 623e 206f 7074 696f 6e20 3c62 3e3c option <\n-0014f740: 636f 6465 3e2d 653c 2f63 6f64 653e 3c2f code>-e to rpc<\n-0014f760: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and encoded.\n-0014f780: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    The \n-00150130: 3c63 6f64 653e 7072 6f74 6f63 6f6c 3c2f protocol property i\n-00150150: 7320 3c63 6f64 653e 534f 4150 3c2f 636f s SOAP by default. \n-00150170: 5468 6520 6465 6661 756c 7420 6973 2063 The default is c\n-00150180: 6861 6e67 6564 2077 6974 6820 3c62 3e3c hanged with <\n-00150190: 636f 6465 3e73 6f61 7063 7070 3220 2d31 code>soapcpp2 -1\n-001501a0: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n-001501b0: 6f6e 203c 623e 3c63 6f64 653e 2d31 3c2f on -1 to SOA\n-001501d0: 5020 312e 312c 203c 623e 3c63 6f64 653e P 1.1, \n-001501e0: 736f 6170 6370 7032 202d 323c 2f63 6f64 soapcpp2 -2 option -2\n-00150210: 3c2f 623e 2074 6f20 534f 4150 2031 2e32 to SOAP 1.2\n-00150220: 2c20 616e 6420 6e6f 6e2d 534f 4150 2052 , and non-SOAP R\n-00150230: 4553 5420 7769 7468 203c 623e 3c63 6f64 EST with soapcpp2 -0 option \n-00150260: 3c62 3e3c 636f 6465 3e2d 303c 2f63 6f64 -0

    .

    Th\n-00150280: 6520 3c63 6f64 653e 4745 543c 2f63 6f64 e GET protocols for\n-001502a0: 2053 4f41 5020 616e 6420 5245 5354 2072 SOAP and REST r\n-001502b0: 6571 7569 7265 2074 6861 7420 7468 6520 equire that the \n-001502c0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-001502d0: 6e73 206f 6e6c 7920 7573 6520 7072 696d ns only use prim\n-001502e0: 6974 6976 6520 7479 7065 7320 7769 7468 itive types with\n-001502f0: 2074 6865 6972 2069 6e70 7574 2070 6172 their input par\n-00150300: 616d 6574 6572 732c 2062 6563 6175 7365 ameters, because\n-00150310: 2074 6865 7365 2070 6172 616d 6574 6572 these parameter\n-00150320: 7320 6172 6520 656e 636f 6465 6420 7769 s are encoded wi\n-00150330: 7468 2074 6865 2055 524c 2061 7320 5552 th the URL as UR\n-00150340: 4c20 7175 6572 7920 7661 6c75 6573 2e3c L query values.<\n-00150350: 2f70 3e0a 3c70 3e54 6f20 6c65 7420 6469 /p>.

    To let di\n-00150360: 7265 6374 6976 6573 2074 616b 6520 6566 rectives take ef\n-00150370: 6665 6374 2077 6974 6820 7365 7276 6963 fect with servic\n-00150380: 6520 6f70 6572 6174 696f 6e73 2c20 796f e operations, yo\n-00150390: 7520 7368 6f75 6c64 2062 696e 6420 7468 u should bind th\n-001503a0: 6520 7365 7276 6963 6520 6f70 6572 6174 e service operat\n-001503b0: 696f 6e73 2074 6f20 7468 6520 5753 444c ions to the WSDL\n-001503c0: 206e 616d 6573 7061 6365 206f 6620 6120 namespace of a \n-001503d0: 7365 7276 6963 6520 6279 2075 7369 6e67 service by using\n-001503e0: 2074 6865 206e 616d 6573 7061 6365 2070 the namespace p\n-001503f0: 7265 6669 7820 6173 2070 6172 7420 6f66 refix as part of\n-00150400: 2074 6865 2069 6465 6e74 6966 6965 7220 the identifier \n-00150410: 6e61 6d65 206f 6620 7468 6520 6675 6e63 name of the func\n-00150420: 7469 6f6e 2074 6861 7420 6465 6669 6e65 tion that define\n-00150430: 7320 7468 6520 7365 7276 6963 6520 6f70 s the service op\n-00150440: 6572 6174 696f 6e3a 3c2f 703e 0a3c 6469 eration:

    .
    i\n-00150490: 6e74 3c2f 7370 616e 3e20 7072 6566 6978 nt prefix\n-001504a0: 5f5f 6675 6e63 2861 7267 312c 2061 7267 __func(arg1, arg\n-001504b0: 322c 202e 2e2e 2c20 6172 676e 2c20 7265 2, ..., argn, re\n-001504c0: 7375 6c74 293b 3c2f 6469 763e 0a3c 2f64 sult);
    .

    where prefix\n-00150500: 2063 616e 206e 6f77 2062 6520 7573 6564 can now be used\n-00150510: 2074 6f20 6c65 7420 6469 7265 6374 6976 to let directiv\n-00150520: 6573 2074 616b 6520 6566 6665 6374 206f es take effect o\n-00150530: 6e20 7468 6973 2073 6572 7669 6365 206f n this service o\n-00150540: 7065 7261 7469 6f6e 2e3c 2f70 3e0a 3c70 peration.

    ..... Back to table \n-00150570: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-00150580: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n-001505b0: 0a53 6572 7669 6365 206d 6574 686f 6420 .Service method \n-001505c0: 6469 7265 6374 6976 6573 3c2f 6833 3e0a directives

    .\n-001505d0: 3c70 3e53 6572 7669 6365 2070 726f 7065

    Service prope\n-001505e0: 7274 6965 7320 6172 6520 6170 706c 6963 rties are applic\n-001505f0: 6162 6c65 2074 6f20 6120 7365 7276 6963 able to a servic\n-00150600: 6520 616e 6420 746f 2061 6c6c 206f 6620 e and to all of \n-00150610: 6974 7320 6f70 6572 6174 696f 6e73 2e20 its operations. \n-00150620: 5365 7276 6963 6520 6d65 7468 6f64 2064 Service method d\n-00150630: 6972 6563 7469 7665 7320 6172 6520 7370 irectives are sp\n-00150640: 6563 6966 6963 616c 6c79 2061 7070 6c69 ecifically appli\n-00150650: 6361 626c 6520 746f 2061 2073 6572 7669 cable to a servi\n-00150660: 6365 206f 7065 7261 7469 6f6e 2e3c 2f70 ce operation..

    A service m\n-00150680: 6574 686f 6420 6469 7265 6374 6976 6520 ethod directive \n-00150690: 6973 206f 6620 7468 6520 666f 726d 3a3c is of the form:<\n-001506a0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    You can \n-0014f790: 6f76 6572 7269 6465 2074 6865 203c 636f override the port e\n-0014f7b0: 6e64 706f 696e 7420 5552 4c20 6174 2072 ndpoint URL at r\n-0014f7c0: 756e 7469 6d65 2069 6e20 7468 6520 6175 untime in the au\n-0014f7d0: 746f 2d67 656e 6572 6174 6564 203c 636f to-generated soap_call_pre\n-0014f7f0: 6669 785f 5f66 756e 633c 2f63 6f64 653e fix__func\n-0014f800: 2073 6572 7669 6365 2063 616c 6c20 2843 service call (C\n-0014f810: 2f43 2b2b 2063 6c69 656e 7420 7369 6465 /C++ client side\n-0014f820: 2920 616e 6420 696e 2074 6865 2043 2b2b ) and in the C++\n-0014f830: 2070 726f 7879 2063 6c61 7373 2073 6572 proxy class ser\n-0014f840: 7669 6365 2063 616c 6c2e 3c2f 703e 0a3c vice call.

    .<\n-0014f850: 703e 5072 6f74 6f63 6f6c 2070 726f 7065 p>Protocol prope\n-0014f860: 7274 7920 7661 6c75 6573 2061 7265 3a3c rty values are:<\n-0014f870: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>..\n-0014f8b0: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b .<\n-0014f920: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>........<\n-0014fb90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014fba0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014fbb0: 3e3c 636f 6465 3e53 4f41 502d 4745 543c >SOAP-GET<\n-0014fbc0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-0014fbf0: 6f6e 652d 7761 7920 534f 4150 2031 2e31 one-way SOAP 1.1\n-0014fc00: 206f 7220 312e 3220 7769 7468 2048 5454 or 1.2 with HTT\n-0014fc10: 5020 4745 5420 2020 203c 2f74 643e 3c2f P GET ..\n-0014fcd0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .............\n-00150120: 3c2f 7461 626c 653e 0a3c 703e 5468 6520
    protocol valu\n-0014f8e0: 6520 2020 3c2f 7468 3e3c 7468 2063 6c61 e descr\n-0014f910: 6970 7469 6f6e 2020 2020 3c2f 7468 3e3c iption
    SO\n-0014f970: 4150 3c2f 636f 6465 3e20 2020 3c2f 7464 AP SOAP transpor\n-0014f9b0: 742c 2073 7570 706f 7274 696e 6720 626f t, supporting bo\n-0014f9c0: 7468 2053 4f41 5020 312e 3120 616e 6420 th SOAP 1.1 and \n-0014f9d0: 312e 3220 2020 203c 2f74 643e 3c2f 7472 1.2
    SOAP\n-0014fa30: 312e 313c 2f63 6f64 653e 2020 203c 2f74 1.1 SOAP 1.1 tra\n-0014fa70: 6e73 706f 7274 2028 7361 6d65 2061 7320 nsport (same as \n-0014fa80: 3c63 6f64 653e 736f 6170 6370 7032 202d soapcpp2 -\n-0014fa90: 313c 2f63 6f64 653e 2920 2020 203c 2f74 1)
    SOAP1.2 \n-0014fb00: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 SOAP 1.\n-0014fb30: 3220 7472 616e 7370 6f72 7420 2873 616d 2 transport (sam\n-0014fb40: 6520 6173 203c 636f 6465 3e73 6f61 7063 e as soapc\n-0014fb50: 7070 3220 2d32 3c2f 636f 6465 3e29 2020 pp2 -2) \n-0014fb60: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    SOA\n-0014fc70: 5031 2e31 2d47 4554 3c2f 636f 6465 3e20 P1.1-GET \n-0014fc80: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 one-way\n-0014fcb0: 2053 4f41 5020 312e 3120 7769 7468 2048 SOAP 1.1 with H\n-0014fcc0: 5454 5020 4745 5420 2020 203c 2f74 643e TTP GET
    \n-0014fd20: 534f 4150 312e 322d 4745 543c 2f63 6f64 SOAP1.2-GET one-\n-0014fd60: 7761 7920 534f 4150 2031 2e32 2077 6974 way SOAP 1.2 wit\n-0014fd70: 6820 4854 5450 2047 4554 2020 2020 3c2f h HTTP GET
    HTTP \n-0014fde0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 an alias \n-0014fe10: 666f 7220 3c63 6f64 653e 504f 5354 3c2f for POST (same as <\n-0014fe30: 636f 6465 3e73 6f61 7063 7070 3220 2d30 code>soapcpp2 -0\n-0014fe40: 3c2f 636f 6465 3e29 2020 2020 3c2f 7464 )
    POST <\n-0014feb0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>non-SOAP R\n-0014fee0: 4553 5420 7072 6f74 6f63 6f6c 2077 6974 EST protocol wit\n-0014fef0: 6820 4854 5450 2050 4f53 5420 2020 203c h HTTP POST <\n-0014ff00: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    GET \n-0014ff60: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 non-SOAP \n-0014ff90: 5245 5354 2070 726f 746f 636f 6c20 7769 REST protocol wi\n-0014ffa0: 7468 2048 5454 5020 4745 5420 2020 203c th HTTP GET <\n-0014ffb0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    PUT \n-00150010: 203c 2f74 643e 3c74 6420 636c 6173 733d non-SOAP\n-00150040: 2052 4553 5420 7072 6f74 6f63 6f6c 2077 REST protocol w\n-00150050: 6974 6820 4854 5450 2050 5554 2020 2020 ith HTTP PUT \n-00150060: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    DELETE non-S\n-001500f0: 4f41 5020 5245 5354 2070 726f 746f 636f OAP REST protoco\n-00150100: 6c20 7769 7468 2048 5454 5020 4445 4c45 l with HTTP DELE\n-00150110: 5445 2020 203c 2f74 643e 3c2f 7472 3e0a TE
    .
    //gsoap <pr\n-001506f0: 6566 6978 2667 743b 2073 6572 7669 6365 efix> service\n-00150700: 206d 6574 686f 642d 266c 743b 7072 6f70 method-<prop\n-00150710: 6572 7479 2667 743b 3a20 266c 743b 6d65 erty>: <me\n-00150720: 7468 6f64 2667 743b 2026 6c74 3b76 616c thod> <val\n-00150730: 7565 2667 743b 3c2f 7370 616e 3e3c 2f64 ue>.

    wh\n-00150760: 6572 6520 3c63 6f64 653e 266c 743b 7072 ere <pr\n-00150770: 6566 6978 2667 743b 3c2f 636f 6465 3e20 efix> \n-00150780: 6973 2074 6865 2058 4d4c 206e 616d 6573 is the XML names\n-00150790: 7061 6365 2070 7265 6669 7820 6f66 2061 pace prefix of a\n-001507a0: 2073 6572 7669 6365 2062 696e 6469 6e67 service binding\n-001507b0: 2061 6e64 203c 636f 6465 3e26 6c74 3b6d and <m\n-001507c0: 6574 686f 6426 6774 3b3c 2f63 6f64 653e ethod>\n-001507d0: 2069 7320 7468 6520 756e 7175 616c 6966 is the unqualif\n-001507e0: 6965 6420 6e61 6d65 206f 6620 6120 7365 ied name of a se\n-001507f0: 7276 6963 6520 6f70 6572 6174 696f 6e2e rvice operation.\n-00150800: 2054 6865 203c 636f 6465 3e26 6c74 3b70 The <p\n-00150810: 726f 7065 7274 7926 6774 3b3c 2f63 6f64 roperty> and <\n-00150830: 3b76 616c 7565 2667 743b 3c2f 636f 6465 ;value> fields are one\n-00150850: 206f 6620 7468 6520 666f 6c6c 6f77 696e of the followin\n-00150860: 673a 3c2f 703e 0a3c 7461 626c 6520 636c g:

    ...v\n-00150900: 616c 7565 2020 2020 3c2f 7468 3e3c 2f74 alue ..<\n-00150980: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150990: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001509a0: 3e74 6578 7420 6465 7363 7269 6269 6e67 >text describing\n-001509b0: 2074 6865 2073 6572 7669 6365 206f 7065 the service ope\n-001509c0: 7261 7469 6f6e 2020 2020 3c2f 7464 3e3c ration <\n-001509d0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......<\n-00150b90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150ba0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00150bb0: 3e3c 636f 6465 3e6d 6574 686f 642d 696e >method-in\n-00150bc0: 7075 742d 6163 7469 6f6e 3c2f 636f 6465 put-action ..<\n-00150cc0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150cd0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00150ce0: 3e3c 636f 6465 3e22 223c 2f63 6f64 653e >\"\"\n-00150cf0: 206f 7220 5552 4920 534f 4150 4163 7469 or URI SOAPActi\n-00150d00: 6f6e 2048 5454 5020 6865 6164 6572 206f on HTTP header o\n-00150d10: 6620 7365 7276 6963 6520 7265 7370 6f6e f service respon\n-00150d20: 7365 206d 6573 7361 6765 7320 2020 203c se messages <\n-00150d30: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>....<\n-00150e40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150e50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00150e60: 3e3c 636f 6465 3e6d 6574 686f 642d 6865 >method-he\n-00150e70: 6164 6572 2d70 6172 743c 2f63 6f64 653e ader-part\n-00150e80: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....<\n-00151100: 636f 6465 3e6d 6574 686f 642d 6f75 7470 code>method-outp\n-00151110: 7574 2d68 6561 6465 722d 7061 7274 3c2f ut-header-part m\n-00151150: 656d 6265 7220 6e61 6d65 206f 6620 7468 ember name of th\n-00151160: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e SOAP_ENV__Hea\n-001511d0: 6465 723c 2f61 3e3c 2f63 6f64 653e 2073 der s\n-001511e0: 7472 7563 7420 7573 6564 2069 6e20 534f truct used in SO\n-001511f0: 4150 2048 6561 6465 7273 206f 6620 7265 AP Headers of re\n-00151200: 7370 6f6e 7365 7320 2020 203c 2f74 643e sponses \n-00151210: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ...<\n-00151300: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00151310: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-00151320: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n-001513d0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n-00151440: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-00151500: 3c63 6f64 653e 6d65 7468 6f64 2d6f 7574 method-out\n-00151510: 7075 742d 6d69 6d65 2d74 7970 653c 2f63 put-mime-type ..<\n-00151610: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00151620: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00151630: 3e3c 636f 6465 3e64 6f63 756d 656e 743c >document<\n-00151640: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n-00151650: 7270 633c 2f63 6f64 653e 2020 2020 3c2f rpc ..\n-001516d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n-00151880: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00151890: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001518a0: 3e3c 636f 6465 3e6d 6574 686f 642d 7072 >method-pr\n-001518b0: 6f74 6f63 6f6c 3c2f 636f 6465 3e20 2020 otocol \n-001518c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..

    The \n-00151960: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa\n-00151970: 7274 3c2f 636f 6465 3e20 7072 6f70 6572 rt proper\n-00151980: 7469 6573 2063 616e 2062 6520 7265 7065 ties can be repe\n-00151990: 6174 6564 2066 6f72 2061 2073 6572 7669 ated for a servi\n-001519a0: 6365 206f 7065 7261 7469 6f6e 2074 6f20 ce operation to \n-001519b0: 6465 636c 6172 6520 6d75 6c74 6970 6c65 declare multiple\n-001519c0: 2053 4f41 5020 4865 6164 6572 2070 6172 SOAP Header par\n-001519d0: 7473 2074 6861 7420 7468 6520 7365 7276 ts that the serv\n-001519e0: 6963 6520 6f70 6572 6174 696f 6e20 7265 ice operation re\n-001519f0: 7175 6972 6573 2e20 596f 7520 6361 6e20 quires. You can \n-00151a00: 7573 6520 3c63 6f64 653e 6d65 7468 6f64 use method\n-00151a10: 2d69 6e70 7574 2d68 6561 6465 722d 7061 -input-header-pa\n-00151a20: 7274 3c2f 636f 6465 3e20 616e 6420 3c63 rt and method-outpu\n-00151a40: 742d 6865 6164 6572 2d70 6172 743c 2f63 t-header-part to differen\n-00151a60: 7469 6174 6520 6265 7477 6565 6e20 7265 tiate between re\n-00151a70: 7175 6573 7420 616e 6420 7265 7370 6f6e quest and respon\n-00151a80: 7365 206d 6573 7361 6765 732e 3c2f 703e se messages.

    \n-00151a90: 0a3c 703e 5468 6520 3c63 6f64 653e 6d65 .

    The me\n-00151aa0: 7468 6f64 2d66 6175 6c74 3c2f 636f 6465 thod-fault property can b\n-00151ac0: 6520 7265 7065 6174 6564 2066 6f72 2061 e repeated for a\n-00151ad0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n-00151ae0: 6f6e 2074 6f20 6465 636c 6172 6520 6d75 on to declare mu\n-00151af0: 6c74 6970 6c65 2066 6175 6c74 7320 7468 ltiple faults th\n-00151b00: 6174 2074 6865 2073 6572 7669 6365 206f at the service o\n-00151b10: 7065 7261 7469 6f6e 206d 6179 2072 6574 peration may ret\n-00151b20: 7572 6e2e 3c2f 703e 0a3c 703e 5468 6520 urn.

    .

    The \n-00151b30: 3c63 6f64 653e 6d65 7468 6f64 2d61 6374 method-act\n-00151b40: 696f 6e3c 2f63 6f64 653e 2070 726f 7065 ion prope\n-00151b50: 7274 7920 7365 7276 6573 2074 776f 2070 rty serves two p\n-00151b60: 7572 706f 7365 733a 3c2f 703e 0a3c 6f6c urposes:

    ..
  • T\n-00151b80: 6f20 7365 7420 7468 6520 534f 4150 4163 o set the SOAPAc\n-00151b90: 7469 6f6e 2068 6561 6465 7220 666f 7220 tion header for \n-00151ba0: 534f 4150 2070 726f 746f 636f 6c73 2c20 SOAP protocols, \n-00151bb0: 692e 652e 2073 6574 7320 7468 6520 6465 i.e. sets the de\n-00151bc0: 6669 6e69 7469 6f6e 732f 6269 6e64 696e finitions/bindin\n-00151bd0: 672f 6f70 6572 6174 696f 6e2f 534f 4150 g/operation/SOAP\n-00151be0: 3a6f 7065 7261 7469 6f6e 2f40 736f 6170 :operation/@soap\n-00151bf0: 4163 7469 6f6e 2e3c 2f6c 693e 0a3c 6c69 Action.
  • .To set the URL \n-00151c10: 7175 6572 7920 7374 7269 6e67 2066 6f72 query string for\n-00151c20: 2065 6e64 706f 696e 7473 2077 6974 6820 endpoints with \n-00151c30: 5245 5354 2070 726f 746f 636f 6c73 2c20 REST protocols, \n-00151c40: 692e 652e 2073 6574 7320 7468 6520 6465 i.e. sets the de\n-00151c50: 6669 6e69 7469 6f6e 732f 6269 6e64 696e finitions/bindin\n-00151c60: 672f 6f70 6572 6174 696f 6e2f 4854 5450 g/operation/HTTP\n-00151c70: 3a6f 7065 7261 7469 6f6e 2f40 6c6f 6361 :operation/@loca\n-00151c80: 7469 6f6e 2c20 7768 6963 6820 7370 6563 tion, which spec\n-00151c90: 6966 6965 7320 6120 5552 4c20 7175 6572 ifies a URL quer\n-00151ca0: 7920 7374 7269 6e67 2028 7374 6172 7473 y string (starts\n-00151cb0: 2077 6974 6820 6120 3c63 6f64 653e 3f3c with a ?<\n-00151cc0: 2f63 6f64 653e 2920 746f 2063 6f6d 706c /code>) to compl\n-00151cd0: 6574 6520 7468 6520 7365 7276 6963 6520 ete the service \n-00151ce0: 656e 6470 6f69 6e74 2055 524c 206f 7220 endpoint URL or \n-00151cf0: 6578 7465 6e64 7320 7468 6520 656e 6470 extends the endp\n-00151d00: 6f69 6e74 2055 524c 2077 6974 6820 6120 oint URL with a \n-00151d10: 6c6f 6361 6c20 7061 7468 2028 7374 6172 local path (star\n-00151d20: 7473 2077 6974 6820 6120 3c63 6f64 653e ts with a \n-00151d30: 2f3c 2f63 6f64 653e 292e 3c2f 6c69 3e0a /)..\n-00151d40: 3c2f 6f6c 3e0a 3c70 3e55 7365 203c 636f .

    Use method-input-\n-00151d60: 6163 7469 6f6e 3c2f 636f 6465 3e20 616e action an\n-00151d70: 6420 3c63 6f64 653e 6d65 7468 6f64 2d6f d method-o\n-00151d80: 7574 7075 742d 6163 7469 6f6e 3c2f 636f utput-action to different\n-00151da0: 6961 7465 2074 6865 2053 4f41 5041 6374 iate the SOAPAct\n-00151db0: 696f 6e20 6265 7477 6565 6e20 534f 4150 ion between SOAP\n-00151dc0: 2072 6571 7565 7374 2061 6e64 2072 6573 request and res\n-00151dd0: 706f 6e73 6520 6d65 7373 6167 6573 2e3c ponse messages.<\n-00151de0: 2f70 3e0a 3c70 3e59 6f75 2063 616e 2061 /p>.

    You can a\n-00151df0: 6c77 6179 7320 6f76 6572 7269 6465 2074 lways override t\n-00151e00: 6865 2070 6f72 7420 656e 6470 6f69 6e74 he port endpoint\n-00151e10: 2055 524c 2061 6e64 2061 6374 696f 6e20 URL and action \n-00151e20: 7661 6c75 6573 2061 7420 7275 6e74 696d values at runtim\n-00151e30: 6520 696e 2074 6865 2061 7574 6f2d 6765 e in the auto-ge\n-00151e40: 6e65 7261 7465 6420 3c63 6f64 653e 736f nerated so\n-00151e50: 6170 5f63 616c 6c5f 7072 6566 6978 5f5f ap_call_prefix__\n-00151e60: 6675 6e63 3c2f 636f 6465 3e20 7365 7276 func serv\n-00151e70: 6963 6520 6361 6c6c 2028 432f 432b 2b20 ice call (C/C++ \n-00151e80: 636c 6965 6e74 2073 6964 6529 2061 6e64 client side) and\n-00151e90: 2069 6e20 7468 6520 6175 746f 2d67 656e in the auto-gen\n-00151ea0: 6572 6174 6564 2043 2b2b 2070 726f 7879 erated C++ proxy\n-00151eb0: 2063 6c61 7373 2073 6572 7669 6365 2063 class service c\n-00151ec0: 616c 6c73 2e20 4120 7275 6e74 696d 6520 alls. A runtime \n-00151ed0: 4e55 4c4c 2065 6e64 706f 696e 7420 5552 NULL endpoint UR\n-00151ee0: 4c20 616e 642f 6f72 2061 6374 696f 6e20 L and/or action \n-00151ef0: 7573 6573 2074 6865 2064 6566 6175 6c74 uses the default\n-00151f00: 7320 7365 7420 6279 2074 6865 7365 2064 s set by these d\n-00151f10: 6972 6563 7469 7665 732e 3c2f 703e 0a3c irectives.

    .<\n-00151f20: 703e 5468 6520 3c63 6f64 653e 6d65 7468 p>The meth\n-00151f30: 6f64 2d6d 696d 652d 7479 7065 3c2f 636f od-mime-type property ser\n-00151f50: 7665 7320 7477 6f20 7075 7270 6f73 6573 ves two purposes\n-00151f60: 3a3c 2f70 3e0a 3c6f 6c20 7479 7065 3d22 :

    .
      .
    1. To set t\n-00151f80: 6865 2074 7970 6520 6f66 204d 494d 452f he type of MIME/\n-00151f90: 4d54 4f4d 2061 7474 6163 686d 656e 7473 MTOM attachments\n-00151fa0: 2075 7365 6420 7769 7468 2053 4f41 5020 used with SOAP \n-00151fb0: 7072 6f74 6f63 6f6c 732e 204d 756c 7469 protocols. Multi\n-00151fc0: 706c 6520 6174 7461 6368 6d65 6e74 2074 ple attachment t\n-00151fd0: 7970 6573 2063 616e 2062 6520 6465 636c ypes can be decl\n-00151fe0: 6172 6564 2066 6f72 2061 2053 4f41 5020 ared for a SOAP \n-00151ff0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-00152000: 6e2c 2069 2e65 2e20 6164 6473 2064 6566 n, i.e. adds def\n-00152010: 696e 6974 696f 6e73 2f62 696e 6469 6e67 initions/binding\n-00152020: 2f6f 7065 7261 7469 6f6e 2f69 6e70 7574 /operation/input\n-00152030: 2f4d 494d 453a 6d75 6c74 6970 6172 7452 /MIME:multipartR\n-00152040: 656c 6174 6564 2f4d 494d 453a 7061 7274 elated/MIME:part\n-00152050: 2f4d 494d 453a 636f 6e74 656e 742f 4074 /MIME:content/@t\n-00152060: 7970 6520 666f 7220 6561 6368 2074 7970 ype for each typ\n-00152070: 6520 7370 6563 6966 6965 642e 3c2f 6c69 e specified..
    2. To set the\n-00152090: 204d 494d 4520 7479 7065 206f 6620 6120 MIME type of a \n-001520a0: 5245 5354 206f 7065 7261 7469 6f6e 2e20 REST operation. \n-001520b0: 5468 6973 2072 6570 6c61 6365 7320 584d This replaces XM\n-001520c0: 4c20 6465 636c 6172 6564 2069 6e20 5753 L declared in WS\n-001520d0: 444c 2062 7920 6465 6669 6e69 7469 6f6e DL by definition\n-001520e0: 732f 6269 6e64 696e 672f 6f70 6572 6174 s/binding/operat\n-001520f0: 696f 6e2f 2869 6e70 7574 7c6f 7574 7075 ion/(input|outpu\n-00152100: 7429 2f4d 494d 453a 6d69 6d65 586d 6c20 t)/MIME:mimeXml \n-00152110: 7769 7468 204d 494d 453a 636f 6e74 656e with MIME:conten\n-00152120: 742f 4074 7970 652e 2055 7365 203c 636f t/@type. Use application/x\n-00152140: 2d77 7777 2d66 6f72 6d2d 7572 6c65 6e63 -www-form-urlenc\n-00152150: 6f64 6564 3c2f 636f 6465 3e20 7769 7468 oded with\n-00152160: 2052 4553 5420 504f 5354 2061 6e64 2050 REST POST and P\n-00152170: 5554 2070 726f 746f 636f 6c73 2074 6f20 UT protocols to \n-00152180: 7365 6e64 2065 6e63 6f64 6564 2066 6f72 send encoded for\n-00152190: 6d20 6461 7461 2061 7574 6f6d 6174 6963 m data automatic\n-001521a0: 616c 6c79 2069 6e73 7465 6164 206f 6620 ally instead of \n-001521b0: 584d 4c2e 204f 6e6c 7920 7072 696d 6974 XML. Only primit\n-001521c0: 6976 6520 7479 7065 2076 616c 7565 7320 ive type values \n-001521d0: 6361 6e20 6265 2074 7261 6e73 6d69 7474 can be transmitt\n-001521e0: 6564 2077 6974 6820 666f 726d 2064 6174 ed with form dat\n-001521f0: 612c 2073 7563 6820 6173 206e 756d 6265 a, such as numbe\n-00152200: 7273 2061 6e64 2073 7472 696e 6773 2c20 rs and strings, \n-00152210: 692e 652e 206f 6e6c 7920 7479 7065 7320 i.e. only types \n-00152220: 7468 6174 2061 7265 206c 6567 616c 2074 that are legal t\n-00152230: 6f20 7573 6520 6173 2061 7474 7269 6275 o use as attribu\n-00152240: 7465 7320 6d65 6d62 6572 732e 3c2f 6c69 tes members..
    .

    Use <\n-00152260: 636f 6465 3e6d 6574 686f 642d 696e 7075 code>method-inpu\n-00152270: 742d 6d69 6d65 2d74 7970 653c 2f63 6f64 t-mime-type and met\n-00152290: 686f 642d 6f75 7470 7574 2d6d 696d 652d hod-output-mime-\n-001522a0: 7479 7065 3c2f 636f 6465 3e20 746f 2064 type to d\n-001522b0: 6966 6665 7265 6e74 6961 7465 2074 6865 ifferentiate the\n-001522c0: 2061 7474 6163 686d 656e 7420 7479 7065 attachment type\n-001522d0: 7320 6265 7477 6565 6e20 7265 7175 6573 s between reques\n-001522e0: 7420 616e 6420 7265 7370 6f6e 7365 206d t and response m\n-001522f0: 6573 7361 6765 732e 3c2f 703e 0a3c 703e essages.

    .

    \n-00152300: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n-00152320: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .\n-00152360: 5363 6865 6d61 2064 6972 6563 7469 7665 Schema directive\n-00152370: 733c 2f68 333e 0a3c 703e 4120 7363 6865 s

    .

    A sche\n-00152380: 6d61 2064 6972 6563 7469 7665 2069 7320 ma directive is \n-00152390: 6f66 2074 6865 2066 6f72 6d3a 3c2f 703e of the form:

    \n-001523a0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    /\n-001523e0: 2f67 736f 6170 2026 6c74 3b70 7265 6669 /gsoap <prefi\n-001523f0: 7826 6774 3b20 7363 6865 6d61 2026 6c74 x> schema <\n-00152400: 3b70 726f 7065 7274 7926 6774 3b3a 2026 ;property>: &\n-00152410: 6c74 3b76 616c 7565 2667 743b 3c2f 7370 lt;value>
    .
    \n-00152430: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    where <prefix>\n-00153020: 3b3c 2f63 6f64 653e 2069 7320 7468 6520 ; is the \n-00153030: 584d 4c20 6e61 6d65 7370 6163 6520 7072 XML namespace pr\n-00153040: 6566 6978 206f 6620 6120 7363 6865 6d61 efix of a schema\n-00153050: 2061 6e64 203c 636f 6465 3e26 6c74 3b6e and <n\n-00153060: 616d 6526 6774 3b3c 2f63 6f64 653e 2069 ame> i\n-00153070: 7320 616e 2075 6e71 7561 6c69 6669 6564 s an unqualified\n-00153080: 206e 616d 6520 6f66 2061 2043 2f43 2b2b name of a C/C++\n-00153090: 2074 7970 652c 2061 6e64 2074 6865 206f type, and the o\n-001530a0: 7074 696f 6e61 6c20 3c63 6f64 653e 266c ptional &l\n-001530b0: 743b 6d65 6d62 6572 2667 743b 3c2f 636f t;member> is a class/s\n-001530d0: 7472 7563 7420 6d65 6d62 6572 7320 6f72 truct members or\n-001530e0: 2065 6e75 6d20 636f 6e73 7461 6e74 2e3c enum constant.<\n-001530f0: 2f70 3e0a 3c70 3e59 6f75 2063 616e 2064 /p>.

    You can d\n-00153100: 6573 6372 6962 6520 6120 7479 7065 2077 escribe a type w\n-00153110: 6974 6820 6f6e 6520 6f66 2074 6865 2066 ith one of the f\n-00153120: 6f6c 6c6f 7769 6e67 3a3c 2f70 3e0a 3c74 ollowing:

    ..
    .....<\n-001532f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00153300: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00153310: 3e61 6e20 616c 6961 7320 666f 7220 7468 >an alias for th\n-00153320: 6520 3c63 6f64 653e 7479 7065 2d64 6f63 e type-doc\n-00153330: 756d 656e 7461 7469 6f6e 3c2f 636f 6465 umentation property .
    method pro\n-001508d0: 7065 7274 7920 2020 3c2f 7468 3e3c 7468 perty
    meth\n-00150960: 6f64 2d64 6f63 756d 656e 7461 7469 6f6e od-documentation\n-00150970: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    m\n-00150a20: 6574 686f 643c 2f63 6f64 653e 2020 203c ethod <\n-00150a30: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>same as ab\n-00150a60: 6f76 652c 2073 686f 7274 6861 6e64 2066 ove, shorthand f\n-00150a70: 6f72 6d20 2020 203c 2f74 643e 3c2f 7472 orm
    metho\n-00150ad0: 642d 6163 7469 6f6e 3c2f 636f 6465 3e20 d-action \n-00150ae0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 \"\n-00150b10: 223c 2f63 6f64 653e 206f 7220 5552 4920 \" or URI \n-00150b20: 534f 4150 4163 7469 6f6e 2048 5454 5020 SOAPAction HTTP \n-00150b30: 6865 6164 6572 2c20 6f72 2055 524c 2071 header, or URL q\n-00150b40: 7565 7279 2073 7472 696e 6720 666f 7220 uery string for \n-00150b50: 5245 5354 2070 726f 746f 636f 6c73 2020 REST protocols \n-00150b60: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    \"\" or UR\n-00150c10: 4920 534f 4150 4163 7469 6f6e 2048 5454 I SOAPAction HTT\n-00150c20: 5020 6865 6164 6572 206f 6620 7365 7276 P header of serv\n-00150c30: 6963 6520 7265 7175 6573 7420 6d65 7373 ice request mess\n-00150c40: 6167 6573 2020 2020 3c2f 7464 3e3c 2f74 ages
    meth\n-00150ca0: 6f64 2d6f 7574 7075 742d 6163 7469 6f6e od-output-action\n-00150cb0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    method-fault\n-00150d90: 2d61 6374 696f 6e3c 2f63 6f64 653e 2020 -action \n-00150da0: 203c 2f74 643e 3c74 6420 636c 6173 733d \"\"\n-00150dd0: 3c2f 636f 6465 3e20 6f72 2055 5249 2053 or URI S\n-00150de0: 4f41 5041 6374 696f 6e20 4854 5450 2068 OAPAction HTTP h\n-00150df0: 6561 6465 7220 6f66 2073 6572 7669 6365 eader of service\n-00150e00: 2066 6175 6c74 206d 6573 7361 6765 7320 fault messages \n-00150e10: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    member\n-00150eb0: 206e 616d 6520 6f66 2074 6865 203c 636f name of the SO\n-00150f20: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header struct\n-00150f40: 2075 7365 6420 696e 2053 4f41 5020 4865 used in SOAP He\n-00150f50: 6164 6572 2020 2020 3c2f 7464 3e3c 2f74 ader
    met\n-00150fb0: 686f 642d 696e 7075 742d 6865 6164 6572 hod-input-header\n-00150fc0: 2d70 6172 743c 2f63 6f64 653e 2020 203c -part <\n-00150fd0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>member nam\n-00151000: 6520 6f66 2074 6865 203c 636f 6465 3e3c e of the <\n-00151010: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00151020: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n-00151030: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n-00151040: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n-00151050: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n-00151060: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n-00151070: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header struct use\n-00151090: 6420 696e 2053 4f41 5020 4865 6164 6572 d in SOAP Header\n-001510a0: 7320 6f66 2072 6571 7565 7374 7320 2020 s of requests \n-001510b0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    \n-00151260: 6d65 7468 6f64 2d66 6175 6c74 3c2f 636f method-fault typ\n-001512a0: 6520 6e61 6d65 206f 6620 6120 7374 7275 e name of a stru\n-001512b0: 6374 206f 7220 636c 6173 7320 6d65 6d62 ct or class memb\n-001512c0: 6572 2075 7365 6420 696e 203c 636f 6465 er used in SOAP_ENV__Detai\n-001512e0: 6c73 3c2f 636f 6465 3e20 7374 7275 6374 ls struct\n-001512f0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    method-m\n-00151350: 696d 652d 7479 7065 3c2f 636f 6465 3e20 ime-type \n-00151360: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 REST co\n-00151390: 6e74 656e 7420 7479 7065 206f 7220 534f ntent type or SO\n-001513a0: 4150 204d 494d 4520 6174 7461 6368 6d65 AP MIME attachme\n-001513b0: 6e74 2063 6f6e 7465 6e74 2074 7970 6528 nt content type(\n-001513c0: 7329 2020 2020 3c2f 7464 3e3c 2f74 723e s)
    metho\n-00151420: 642d 696e 7075 742d 6d69 6d65 2d74 7970 d-input-mime-typ\n-00151430: 653c 2f63 6f64 653e 2020 203c 2f74 643e e REST content t\n-00151470: 7970 6520 6f72 2053 4f41 5020 4d49 4d45 ype or SOAP MIME\n-00151480: 2061 7474 6163 686d 656e 7420 636f 6e74 attachment cont\n-00151490: 656e 7420 7479 7065 2873 2920 6f66 2072 ent type(s) of r\n-001514a0: 6571 7565 7374 206d 6573 7361 6765 2020 equest message \n-001514b0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    RE\n-00151550: 5354 2063 6f6e 7465 6e74 2074 7970 6520 ST content type \n-00151560: 6f72 2053 4f41 5020 4d49 4d45 2061 7474 or SOAP MIME att\n-00151570: 6163 686d 656e 7420 636f 6e74 656e 7420 achment content \n-00151580: 7479 7065 2873 2920 6f66 2072 6573 706f type(s) of respo\n-00151590: 6e73 6520 6d65 7373 6167 6520 2020 203c nse message <\n-001515a0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    method-style\n-00151600: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    method-encodin\n-001516c0: 673c 2f63 6f64 653e 2020 203c 2f74 643e g literal<\n-00151700: 2f63 6f64 653e 2c20 3c63 6f64 653e 656e /code>, en\n-00151710: 636f 6465 643c 2f63 6f64 653e 2c20 6f72 coded, or\n-00151720: 2061 2063 7573 746f 6d20 5552 4920 666f a custom URI fo\n-00151730: 7220 656e 636f 6469 6e67 5374 796c 6520 r encodingStyle \n-00151740: 6f66 206d 6573 7361 6765 7320 2020 203c of messages <\n-00151750: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    method-respo\n-001517b0: 6e73 652d 656e 636f 6469 6e67 3c2f 636f nse-encoding literal, encoded\n-00151810: 3c2f 636f 6465 3e2c 206f 7220 6120 6375 , or a cu\n-00151820: 7374 6f6d 2055 5249 2066 6f72 2065 6e63 stom URI for enc\n-00151830: 6f64 696e 6753 7479 6c65 206f 6620 7265 odingStyle of re\n-00151840: 7370 6f6e 7365 206d 6573 7361 6765 7320 sponse messages \n-00151850: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    SOAP or R\n-001518f0: 4553 542c 2073 6565 203c 6120 636c 6173 EST, see Service di\n-00151930: 7265 6374 6976 6573 3c2f 613e 2020 203c rectives <\n-00151940: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>
    typ\n-00153190: 6520 7072 6f70 6572 7479 2020 203c 2f74 e property value
    type-documentat\n-00153230: 696f 6e3c 2f63 6f64 653e 2020 203c 2f74 ion text describ\n-00153270: 696e 6720 7468 6520 7363 6865 6d61 2074 ing the schema t\n-00153280: 7970 6520 2020 203c 2f74 643e 3c2f 7472 ype
    type\n-001532e0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    \n-00153360: 0a3c 703e 466f 7220 6578 616d 706c 652c .

    For example,\n-00153370: 2079 6f75 2063 616e 2061 6464 2061 2064 you can add a d\n-00153380: 6573 6372 6970 7469 6f6e 2074 6f20 616e escription to an\n-00153390: 2065 6e75 6d65 7261 7469 6f6e 3a3c 2f70 enumeration:.

    \n-001533e0: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem\n-001533f0: 6120 7479 7065 3a20 566f 7765 6c73 2054 a type: Vowels T\n-00153400: 6865 206c 6574 7465 7273 2041 2c20 452c he letters A, E,\n-00153410: 2049 2c20 4f2c 2055 2c20 616e 6420 736f I, O, U, and so\n-00153420: 6d65 7469 6d65 7320 593c 2f73 7061 6e3e metimes Y\n-00153430: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-00153460: 2f67 736f 6170 206e 7320 7363 6865 6d61 /gsoap ns schema\n-00153470: 2074 7970 653a 2056 6f77 656c 733a 3a59 type: Vowels::Y\n-00153480: 2041 2076 6f77 656c 2c20 736f 6d65 7469 A vowel, someti\n-00153490: 6d65 733c 2f73 7061 6e3e 3c2f 6469 763e mes
    \n-001534a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    enum cl\n-001534d0: 6173 733c 2f73 7061 6e3e 206e 735f 5f56 ass ns__V\n-001534e0: 6f77 656c 7320 3a20 6368 6172 207b 2041 owels : char { A\n-001534f0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = \n-00153510: 393b 4126 2333 393b 3c2f 7370 616e 3e2c 9;A',\n-00153520: 2045 203d 203c 7370 616e 2063 6c61 7373 E = &\n-00153540: 2333 393b 4526 2333 393b 3c2f 7370 616e #39;E', I = 'I', O = 'O', U = 'U'\n-001535e0: 3c2f 7370 616e 3e2c 2059 203d 203c 7370 , Y = 'Y\n-00153610: 393b 3c2f 7370 616e 3e20 7d3b 3c2f 6469 9; };.

    Thi\n-00153640: 7320 646f 6375 6d65 6e74 6564 2065 6e75 s documented enu\n-00153650: 6d65 7261 7469 6f6e 206d 6170 7320 746f meration maps to\n-00153660: 2061 2073 696d 706c 6554 7970 6520 7265 a simpleType re\n-00153670: 7374 7269 6374 696f 6e20 6f66 203c 656d striction of xsd:strin\n-00153690: 673c 2f63 6f64 653e 3c2f 656d 3e20 696e g in\n-001536a0: 2074 6865 2073 6f61 7063 7070 322d 6765 the soapcpp2-ge\n-001536b0: 6e65 7261 7465 6420 7363 6865 6d61 3a3c nerated schema:<\n-001536c0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    &l\n-00153700: 743b 3c73 7061 6e20 636c 6173 733d 226b t;simp\n-00153720: 6c65 5479 7065 3c2f 7370 616e 3e20 3c73 leType name=\n-00153750: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00153770: 743b 566f 7765 6c73 2671 756f 743b 3c2f t;Vowels">
    .\n-00153790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <annotation>
    .\n-001537f0: 2020 2020 266c 743b 3c73 7061 6e20 636c <documentation<\n-00153820: 2f73 7061 6e3e 2667 743b 3c73 7061 6e20 /span>>\n-00153840: 5468 653c 2f73 7061 6e3e 203c 7370 616e The letters \n-00153870: 3c73 7061 6e20 636c 6173 733d 226b 6579 A, \n-00153890: 3c73 7061 6e20 636c 6173 733d 226b 6579 E, \n-001538b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 I, \n-001538d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 O, \n-001538f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 U, \n-00153910: 3c73 7061 6e20 636c 6173 733d 226b 6579 and\n-00153930: 203c 7370 616e 2063 6c61 7373 3d22 6b65 sometimes\n-00153950: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Y<\n-00153970: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></documentati\n-001539a0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 2f64 on>.
    </annotatio\n-001539f0: 6e3c 2f73 7061 6e3e 2667 743b 3c2f 6469 n>.
    <restriction\n-00153a40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ba\n-00153a60: 7365 3c2f 7370 616e 3e3d 3c73 7061 6e20 se="xsd:\n-00153a90: 7374 7269 6e67 2671 756f 743b 3c2f 7370 string">
    .\n-00153ac0: 2020 2020 266c 743b 3c73 7061 6e20 636c <enumeration value\n-00153b10: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="A"\n-00153b40: 3b3c 2f73 7061 6e3e 2f26 6774 3b3c 2f64 ;/>.
    <enumerat\n-00153b90: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion value="\n-00153be0: 4526 7175 6f74 3b3c 2f73 7061 6e3e 2f26 E"/&\n-00153bf0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n-00153c10: 266c 743b 3c73 7061 6e20 636c 6173 733d <en\n-00153c30: 756d 6572 6174 696f 6e3c 2f73 7061 6e3e umeration\n-00153c40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value=\n-00153c80: 2671 756f 743b 4926 7175 6f74 3b3c 2f73 "I"/>
    .\n-00153ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <enumeration<\n-00153ce0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val\n-00153d00: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="O&qu\n-00153d30: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n-00153d40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-00153d60: 3c73 7061 6e20 636c 6173 733d 226b 6579 enumer\n-00153d80: 6174 696f 6e3c 2f73 7061 6e3e 203c 7370 ation value=\n-00153db0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00153dd0: 743b 5526 7175 6f74 3b3c 2f73 7061 6e3e t;U"\n-00153de0: 2f26 6774 3b3c 2f64 6976 3e0a 3c64 6976 />
    . \n-00153e00: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-00153e20: 656e 756d 6572 6174 696f 6e3c 2f73 7061 enumeration value="Y"<\n-00153e80: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n-00153e90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <annotatio\n-00153ed0: 6e3c 2f73 7061 6e3e 2667 743b 3c2f 6469 n>.
    <\n-00153f00: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;docum\n-00153f20: 656e 7461 7469 6f6e 3c2f 7370 616e 3e26 entation&\n-00153f30: 6774 3b3c 7370 616e 2063 6c61 7373 3d22 gt;A vowel, some\n-00153f90: 7469 6d65 733c 2f73 7061 6e3e 266c 743b times<\n-00153fa0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /docum\n-00153fc0: 656e 7461 7469 6f6e 3c2f 7370 616e 3e26 entation&\n-00153fd0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n-00153ff0: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </annotation>
    . \n-00154040: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <enumeration/>
    .<\n-00154080: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00154090: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </restriction>
    .<\n-001540d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001540e0: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n-00154100: 7369 6d70 6c65 5479 7065 3c2f 7370 616e simpleType>
    .

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

    .\n-00154170: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .Exampl\n-001541a0: 653c 2f68 333e 0a3c 703e 5468 6520 7573 e

    .

    The us\n-001541b0: 6520 6f66 2064 6972 6563 7469 7665 7320 e of directives \n-001541c0: 6973 2062 6573 7420 696c 6c75 7374 7261 is best illustra\n-001541d0: 7465 6420 7769 7468 2061 6e20 6578 616d ted with an exam\n-001541e0: 706c 652e 2054 6865 2065 7861 6d70 6c65 ple. The example\n-001541f0: 2075 7365 7320 6120 6879 706f 7468 6574 uses a hypothet\n-00154200: 6963 616c 2073 746f 636b 2071 756f 7465 ical stock quote\n-00154210: 2073 6572 7669 6365 2061 6e64 2065 7863 service and exc\n-00154220: 6861 6e67 6520 7261 7465 2073 6572 7669 hange rate servi\n-00154230: 6365 2c20 6163 7475 616c 2073 6572 7669 ce, actual servi\n-00154240: 6365 7320 7375 6368 2061 7320 7468 6573 ces such as thes\n-00154250: 6520 6172 6520 6176 6169 6c61 626c 6520 e are available \n-00154260: 666f 7220 6672 6565 206f 6e20 7468 6520 for free on the \n-00154270: 7765 622e 3c2f 703e 0a3c 6469 7620 636c web.

    .
    <\n-00154290: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001542a0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-001542c0: 7331 2073 6572 7669 6365 206e 616d 6573 s1 service names\n-001542d0: 7061 6365 3a20 2075 726e 3a47 6574 5175 pace: urn:GetQu\n-001542e0: 6f74 6520 3c2f 7370 616e 3e3c 2f64 6976 ote .
    in\n-00154320: 743c 2f73 7061 6e3e 206e 7331 5f5f 6765 t ns1__ge\n-00154330: 7451 756f 7465 283c 7370 616e 2063 6c61 tQuote(char *sy\n-00154360: 6d62 6f6c 2c20 3c73 7061 6e20 636c 6173 mbol, \n-00154380: 666c 6f61 743c 2f73 7061 6e3e 2026 616d float &am\n-00154390: 703b 7265 7375 6c74 293b 203c 2f64 6976 p;result); co\n+0014ab50: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+0014ab80: 202a 6765 744e 616d 6528 293c 2f64 6976 *getName().
    {
    . \n+0014abc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+0014abe0: 3c2f 7370 616e 3e20 6e61 6d65 3b3c 2f64 name;.
    }
    .
    s\n+0014acc0: 6f61 705f 756e 6c69 6e6b 3c2f 613e 3c2f oap_unlink
    int soap\n+0014acf0: 5f75 6e6c 696e 6b28 7374 7275 6374 2073 _unlink(struct s\n+0014ad00: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+0014ad10: 2076 6f69 6420 2a70 7472 293c 2f64 6976 void *ptr)
    Unlink a blo\n+0014ad40: 636b 206f 6620 6865 6170 206d 656d 6f72 ck of heap memor\n+0014ad50: 7920 6d61 6e61 6765 6420 6279 2074 6865 y managed by the\n+0014ad60: 2073 7065 6369 6669 6564 2073 6f61 7020 specified soap \n+0014ad70: 636f 6e74 6578 742c 2074 6f20 7265 6c65 context, to rele\n+0014ad80: 6173 6520 7468 6520 6d65 6d6f 7279 2065 ase the memory e\n+0014ad90: 7870 6c69 6369 746c 792e 2e2e 3c2f 6469 xplicitly...
    .
    <\n+0014adb0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0014adc0: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The soap_unlink\n+0014aea0: 3c2f 636f 6465 3e20 6361 6c6c 2075 6e6c call unl\n+0014aeb0: 696e 6b73 2064 6174 6120 616e 6420 6f62 inks data and ob\n+0014aec0: 6a65 6374 7320 6672 6f6d 206d 616e 6167 jects from manag\n+0014aed0: 6564 206d 656d 6f72 792e 2049 6e20 7468 ed memory. In th\n+0014aee0: 6973 2077 6179 203c 636f 6465 3e3c 6120 is way soap\n+0014afa0: 5f64 6573 7472 6f79 3c2f 613e 3c2f 636f _destroy and soap_end can be cal\n+0014b0a0: 6c65 6420 6c61 7465 7220 6576 656e 2077 led later even w\n+0014b0b0: 6865 6e20 7468 6973 2063 6c61 7373 2077 hen this class w\n+0014b0c0: 6173 2064 6573 6572 6961 6c69 7a65 642e as deserialized.\n+0014b0d0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+0014b0f0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+0014b100: 7473 3c2f 613e 3c2f 703e 0a3c 6831 3e3c ts

    .

    <\n+0014b110: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0014b120: 2069 643d 2264 6562 7567 6769 6e67 223e id=\"debugging\">\n+0014b130: 3c2f 613e 0a44 6562 7567 6769 6e67 3c2f .Debugging.

    To activa\n+0014b150: 7465 2064 6562 7567 6769 6e67 2061 6e64 te debugging and\n+0014b160: 206d 6573 7361 6765 206c 6f67 6769 6e67 message logging\n+0014b170: 2063 6f6d 7069 6c65 2074 6865 2073 6f75 compile the sou\n+0014b180: 7263 6520 636f 6465 2077 6974 6820 636f rce code with co\n+0014b190: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n+0014b1a0: 3c63 6f64 653e 2344 4542 5547 3c2f 636f #DEBUG. Or when usi\n+0014b1c0: 6e67 203c 623e 3c63 6f64 653e 2d6c 6773 ng -lgs\n+0014b1d0: 6f61 703c 2f63 6f64 653e 3c2f 623e 206f oap o\n+0014b1e0: 7220 3c62 3e3c 636f 6465 3e2d 6c67 736f r -lgso\n+0014b1f0: 6170 2b2b 3c2f 636f 6465 3e3c 2f62 3e20 ap++ \n+0014b200: 7468 656e 2072 6569 6e73 7461 6c6c 2067 then reinstall g\n+0014b210: 534f 4150 2077 6974 6820 3c62 3e3c 636f SOAP with ./configure -\n+0014b230: 2d65 6e61 626c 652d 6465 6275 673c 2f63 -enable-debug and \n+0014b250: 3c63 6f64 653e 6d61 6b65 3c2f 636f 6465 make.

    .

    Wh\n+0014b270: 656e 2079 6f75 7220 6753 4f41 5020 636c en your gSOAP cl\n+0014b280: 6965 6e74 206f 7220 7365 7276 6572 2061 ient or server a\n+0014b290: 7070 6c69 6361 7469 6f6e 7320 7275 6e2c pplications run,\n+0014b2a0: 2074 6865 7920 7769 6c6c 206c 6f67 2074 they will log t\n+0014b2b0: 6865 6972 2061 6374 6976 6974 7920 696e heir activity in\n+0014b2c0: 2074 6872 6565 2073 6570 6172 6174 6520 three separate \n+0014b2d0: 6669 6c65 733a 3c2f 703e 0a3c 756c 3e0a files:

    .
      .\n+0014b2e0: 3c6c 693e 3c65 6d3e 3c63 6f64 653e 5345
    • SE\n+0014b2f0: 4e54 2e6c 6f67 3c2f 636f 6465 3e3c 2f65 NT.log a concatenati\n+0014b310: 6f6e 206f 6620 616c 6c20 6d65 7373 6167 on of all messag\n+0014b320: 6573 2073 656e 743c 2f6c 693e 0a3c 6c69 es sent
    • .RECV.\n+0014b340: 6c6f 673c 2f63 6f64 653e 3c2f 656d 3e20 log \n+0014b350: 6120 636f 6e63 6174 656e 6174 696f 6e20 a concatenation \n+0014b360: 6f66 2061 6c6c 206d 6573 7361 6765 7320 of all messages \n+0014b370: 7265 6365 6976 6564 3c2f 6c69 3e0a 3c6c received.TEST\n+0014b390: 2e6c 6f67 3c2f 636f 6465 3e3c 2f65 6d3e .log\n+0014b3a0: 2061 206c 6f67 206f 6620 7468 6520 656e a log of the en\n+0014b3b0: 6769 6e65 2773 206f 7065 7261 7469 6f6e gine's operation\n+0014b3c0: 733c 2f6c 693e 0a3c 2f75 6c3e 0a3c 646c s.
    .
    War\n+0014b3f0: 6e69 6e67 3c2f 6474 3e3c 6464 3e54 6865 ning
    The\n+0014b400: 2067 534f 4150 2063 6c69 656e 7420 616e gSOAP client an\n+0014b410: 6420 7365 7276 6572 2061 7070 6c69 6361 d server applica\n+0014b420: 7469 6f6e 7320 7769 6c6c 2072 756e 2073 tions will run s\n+0014b430: 6c6f 7720 6475 6520 746f 2064 6562 7567 low due to debug\n+0014b440: 6769 6e67 2061 6e64 206d 6573 7361 6765 ging and message\n+0014b450: 206c 6f67 6769 6e67 2e3c 2f64 643e 3c2f logging.
    .

    You can s\n+0014b470: 6574 206d 6163 726f 203c 636f 6465 3e23 et macro #\n+0014b480: 4445 4255 475f 5354 414d 503c 2f63 6f64 DEBUG_STAMP instead of #DEBUG to add time st\n+0014b4c0: 616d 7073 2074 6f20 3c63 6f64 653e 5445 amps to TE\n+0014b4d0: 5354 2e6c 6f67 3c2f 636f 6465 3e2e 2054 ST.log. T\n+0014b4e0: 6869 7320 776f 726b 7320 6f6e 2061 6c6c his works on all\n+0014b4f0: 206f 7065 7261 7469 6e67 2073 7973 7465 operating syste\n+0014b500: 6d73 2073 7570 706f 7274 696e 6720 7468 ms supporting th\n+0014b510: 6520 3c63 6f64 653e 6765 7474 696d 656f e gettimeo\n+0014b520: 6664 6179 3c2f 636f 6465 3e20 6675 6e63 fday func\n+0014b530: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e57 6865 tion.

    .

    Whe\n+0014b540: 6e20 696e 7374 616c 6c69 6e67 2061 2043 n installing a C\n+0014b550: 4749 2073 6572 7669 6365 2061 7070 6c69 GI service appli\n+0014b560: 6361 7469 6f6e 2063 6f6d 7069 6c65 6420 cation compiled \n+0014b570: 7769 7468 2064 6562 7567 6769 6e67 2065 with debugging e\n+0014b580: 6e61 626c 6564 2c20 7468 6520 6c6f 6720 nabled, the log \n+0014b590: 6669 6c65 7320 6d61 7920 736f 6d65 7469 files may someti\n+0014b5a0: 6d65 7320 6e6f 7420 6265 2063 7265 6174 mes not be creat\n+0014b5b0: 6564 2064 7565 2074 6f20 6669 6c65 2061 ed due to file a\n+0014b5c0: 6363 6573 7320 7065 726d 6973 7369 6f6e ccess permission\n+0014b5d0: 2072 6573 7472 6963 7469 6f6e 7320 696d restrictions im\n+0014b5e0: 706f 7365 6420 6f6e 2043 4749 2061 7070 posed on CGI app\n+0014b5f0: 6c69 6361 7469 6f6e 732e 2054 6f20 6765 lications. To ge\n+0014b600: 7420 6172 6f75 6e64 2074 6869 732c 2063 t around this, c\n+0014b610: 7265 6174 6520 656d 7074 7920 6c6f 6720 reate empty log \n+0014b620: 6669 6c65 7320 7769 7468 2075 6e69 7665 files with unive\n+0014b630: 7273 616c 2077 7269 7465 2070 6572 6d69 rsal write permi\n+0014b640: 7373 696f 6e73 2e20 4265 2063 6172 6566 ssions. Be caref\n+0014b650: 756c 2061 626f 7574 2074 6865 2073 6563 ul about the sec\n+0014b660: 7572 6974 7920 696d 706c 6963 6174 696f urity implicatio\n+0014b670: 6e20 6f66 2074 6869 732e 3c2f 703e 0a3c n of this.

    .<\n+0014b680: 703e 596f 7520 6361 6e20 6163 7475 616c p>You can actual\n+0014b690: 6c79 2074 6573 7420 6120 4347 4920 7365 ly test a CGI se\n+0014b6a0: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n+0014b6b0: 6e20 7769 7468 6f75 7420 6465 706c 6f79 n without deploy\n+0014b6c0: 696e 6720 6974 206f 6e20 7468 6520 5765 ing it on the We\n+0014b6d0: 622e 2054 6f20 646f 2074 6869 732c 2063 b. To do this, c\n+0014b6e0: 7265 6174 6520 7468 6520 4347 4920 7365 reate the CGI se\n+0014b6f0: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n+0014b700: 6e20 616e 6420 7365 6e64 2069 7420 6120 n and send it a \n+0014b710: 7265 7175 6573 7420 6d65 7373 6167 6520 request message \n+0014b720: 7573 696e 6720 7265 6469 7265 6374 696f using redirectio\n+0014b730: 6e20 6173 2066 6f6c 6c6f 7773 3a20 3c2f n as follows:
    ./servic\n+0014b760: 652e 6367 6920 266c 743b 206e 732e 6164  e.cgi < ns.ad\n+0014b770: 642e 7265 712e 786d 6c0a 3c2f 7072 653e  d.req.xml.
    \n+0014b780: 3c70 3e20 7468 6973 2073 686f 756c 6420

    this should \n+0014b790: 6469 7370 6c61 7920 7468 6520 7365 7276 display the serv\n+0014b7a0: 6963 6520 7265 7370 6f6e 7365 206f 6e20 ice response on \n+0014b7b0: 7468 6520 7465 726d 696e 616c 2c20 7768 the terminal, wh\n+0014b7c0: 6572 6520 3c65 6d3e 3c63 6f64 653e 6e73 ere ns\n+0014b7d0: 2e61 6464 2e72 6571 2e78 6d6c 3c2f 636f .add.req.xml was gen\n+0014b7f0: 6572 6174 6564 2062 7920 736f 6170 6370 erated by soapcp\n+0014b800: 7032 206f 7220 6120 6d6f 6469 6669 6564 p2 or a modified\n+0014b810: 2076 6572 7369 6f6e 206f 6620 7468 6973 version of this\n+0014b820: 2066 696c 652e 2059 6f75 2063 616e 2061 file. You can a\n+0014b830: 6c73 6f20 7573 6520 6120 3c65 6d3e 3c63 lso use a SENT.log file pr\n+0014b860: 6f64 7563 6564 2062 7920 6120 636c 6965 oduced by a clie\n+0014b870: 6e74 2061 7070 6c69 6361 7469 6f6e 2074 nt application t\n+0014b880: 6f20 7265 6469 7265 6374 2074 6f20 7468 o redirect to th\n+0014b890: 6520 4347 4920 7365 7276 6963 6520 6170 e CGI service ap\n+0014b8a0: 706c 6963 6174 696f 6e2e 2059 6f75 2063 plication. You c\n+0014b8b0: 616e 2061 6c73 6f20 7573 6520 7468 6520 an also use the \n+0014b8c0: 6753 4f41 5020 3c61 2068 7265 663d 222e gSOAP T\n+0014b8f0: 6573 7420 4d65 7373 656e 6765 723c 2f61 est Messenger application to\n+0014b910: 2067 656e 6572 6174 6520 7261 6e64 6f6d generate random\n+0014b920: 697a 6564 206d 6573 7361 6765 7320 746f ized messages to\n+0014b930: 2074 6573 7420 796f 7572 2073 6572 7665 test your serve\n+0014b940: 7273 2e3c 2f70 3e0a 3c70 3e54 6865 2066 rs.

    .

    The f\n+0014b950: 696c 6520 6e61 6d65 7320 6f66 2074 6865 ile names of the\n+0014b960: 206c 6f67 2066 696c 6573 2061 6e64 2074 log files and t\n+0014b970: 6865 206c 6f67 6769 6e67 2061 6374 6976 he logging activ\n+0014b980: 6974 7920 6361 6e20 6265 2063 6f6e 7472 ity can be contr\n+0014b990: 6f6c 6c65 6420 6174 2074 6865 2061 7070 olled at the app\n+0014b9a0: 6c69 6361 7469 6f6e 206c 6576 656c 2e20 lication level. \n+0014b9b0: 5468 6973 2061 6c6c 6f77 7320 7468 6520 This allows the \n+0014b9c0: 6372 6561 7469 6f6e 206f 6620 7365 7061 creation of sepa\n+0014b9d0: 7261 7465 206c 6f67 2066 696c 6573 2062 rate log files b\n+0014b9e0: 7920 7365 7061 7261 7465 2073 6572 7669 y separate servi\n+0014b9f0: 6365 732c 2063 6c69 656e 7473 2c20 616e ces, clients, an\n+0014ba00: 6420 7468 7265 6164 732e 2046 6f72 2065 d threads. For e\n+0014ba10: 7861 6d70 6c65 2c20 7468 6520 666f 6c6c xample, the foll\n+0014ba20: 6f77 696e 6720 7365 7276 6963 6520 6c6f owing service lo\n+0014ba30: 6773 2061 6c6c 206d 6573 7361 6765 7320 gs all messages \n+0014ba40: 2862 7574 206e 6f20 6465 6275 6720 6d65 (but no debug me\n+0014ba50: 7373 6167 6573 2920 696e 2073 6570 6172 ssages) in separ\n+0014ba60: 6174 6520 6469 7265 6374 6f72 6965 733a ate directories:\n+0014ba70: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n+0014baf0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+0014bb80: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    .\n+0014bb90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_set_re\n+0014bc00: 6376 5f6c 6f67 6669 6c65 3c2f 613e 283c cv_logfile(<\n+0014bc10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0014bc20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0014bc30: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0014bc40: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0014bc60: 743b 6c6f 6773 2f72 6563 762f 7365 7276 t;logs/recv/serv\n+0014bc70: 6963 6531 322e 6c6f 6726 7175 6f74 3b3c ice12.log"<\n+0014bc80: 2f73 7061 6e3e 293b 203c 7370 616e 2063 /span>); /\n+0014bca0: 2f20 6170 7065 6e64 2061 6c6c 206d 6573 / append all mes\n+0014bcb0: 7361 6765 7320 7265 6365 6976 6564 2069 sages received i\n+0014bcc0: 6e20 2f6c 6f67 732f 7265 6376 2f73 6572 n /logs/recv/ser\n+0014bcd0: 7669 6365 3132 2e6c 6f67 203c 2f73 7061 vice12.log
    .
    so\n+0014bd50: 6170 5f73 6574 5f73 656e 745f 6c6f 6766 ap_set_sent_logf\n+0014bd60: 696c 653c 2f61 3e28 3c61 2063 6c61 7373 ile(s\n+0014bd90: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "logs/\n+0014bdc0: 7365 6e74 2f73 6572 7669 6365 3132 2e6c sent/service12.l\n+0014bdd0: 6f67 2671 756f 743b 3c2f 7370 616e 3e29 og")\n+0014bde0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // appen\n+0014be00: 6420 616c 6c20 6d65 7373 6167 6573 2073 d all messages s\n+0014be10: 656e 7420 696e 202f 6c6f 6773 2f73 656e ent in /logs/sen\n+0014be20: 742f 7365 7276 6963 6531 322e 6c6f 6720 t/service12.log \n+0014be30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0014be50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_test\n+0014beb0: 5f6c 6f67 6669 6c65 3c2f 613e 283c 6120 _logfile(soap, NU\n+0014bef0: 4c4c 293b 2020 2020 2020 2020 2020 2020 LL); \n+0014bf00: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n+0014bf20: 2f2f 206e 6f20 6669 6c65 206e 616d 653a // no file name:\n+0014bf30: 2064 6f20 6e6f 7420 7361 7665 2064 6562 do not save deb\n+0014bf40: 7567 206d 6573 7361 6765 7320 3c2f 7370 ug messages
    .
    ... \n+0014bf70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n+0014bf90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n+0014c040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //
    .soap_free\n+0014c0f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0014c120: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n+0014c190: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_set_r\n+0014c1e0: 6563 765f 6c6f 6766 696c 653c 2f61 3e3c ecv_logfile<\n+0014c1f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void so\n+0014c210: 6170 5f73 6574 5f72 6563 765f 6c6f 6766 ap_set_recv_logf\n+0014c220: 696c 6528 7374 7275 6374 2073 6f61 7020 ile(struct soap \n+0014c230: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+0014c240: 7220 2a6c 6f67 6669 6c65 293c 2f64 6976 r *logfile)
    Specify a fi\n+0014c270: 6c65 206e 616d 6520 746f 2073 6176 6520 le name to save \n+0014c280: 6d65 7373 6167 6573 2072 6563 6569 7665 messages receive\n+0014c290: 642e 3c2f 6469 763e 3c2f 6469 763e 0a3c d.
    .<\n+0014c2a0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0014c2b0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0014c2c0: 705f 5f64 6562 7567 5f68 746d 6c5f 6761 p__debug_html_ga\n+0014c2d0: 3430 3965 6265 3166 6235 6631 3034 3461 409ebe1fb5f1044a\n+0014c2e0: 3230 6164 3132 6233 3832 3036 3831 3438 20ad12b382068148\n+0014c2f0: 223e 3c64 6976 2063 6c61 7373 3d22 7474 \">
    v\n+0014c380: 6f69 6420 736f 6170 5f73 6574 5f74 6573 oid soap_set_tes\n+0014c390: 745f 6c6f 6766 696c 6528 7374 7275 6374 t_logfile(struct\n+0014c3a0: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n+0014c3b0: 7374 2063 6861 7220 2a6c 6f67 6669 6c65 st char *logfile\n+0014c3c0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Specif\n+0014c3e0: 7920 6120 6669 6c65 206e 616d 6520 746f y a file name to\n+0014c3f0: 2073 6176 6520 6465 6275 6767 696e 6720 save debugging \n+0014c400: 696e 666f 2e3c 2f64 6976 3e3c 2f64 6976 info.
    .
    void soap_set_\n+0014c500: 7365 6e74 5f6c 6f67 6669 6c65 2873 7472 sent_logfile(str\n+0014c510: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+0014c520: 636f 6e73 7420 6368 6172 202a 6c6f 6766 const char *logf\n+0014c530: 696c 6529 3c2f 6469 763e 3c64 6976 2063 ile)
    Spe\n+0014c550: 6369 6679 2061 2066 696c 6520 6e61 6d65 cify a file name\n+0014c560: 2074 6f20 7361 7665 206d 6573 7361 6765 to save message\n+0014c570: 7320 7365 6e74 2e3c 2f64 6976 3e3c 2f64 s sent.
    .

    Li\n+0014c5a0: 6b65 7769 7365 2c20 6d65 7373 6167 6573 kewise, messages\n+0014c5b0: 2063 616e 2062 6520 6c6f 6767 6564 2066 can be logged f\n+0014c5c0: 6f72 2069 6e64 6976 6964 7561 6c20 636c or individual cl\n+0014c5d0: 6965 6e74 2d73 6964 6520 7365 7276 6963 ient-side servic\n+0014c5e0: 6520 6f70 6572 6174 696f 6e20 6361 6c6c e operation call\n+0014c5f0: 7320 696e 2061 2063 6c69 656e 7420 6170 s in a client ap\n+0014c600: 706c 6963 6174 696f 6e2e 3c2f 703e 0a3c plication.

    .<\n+0014c610: 703e 546f 206c 6f67 206d 6573 7361 6765 p>To log message\n+0014c620: 7320 6d6f 7265 2065 6666 6963 6965 6e74 s more efficient\n+0014c630: 6c79 2c20 7573 6520 7468 6520 3c63 6f64 ly, use the logging\n+0014c6d0: 3c2f 636f 6465 3e20 706c 7567 696e 2e3c
    plugin.<\n+0014c6e0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to \n+0014c700: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n+0014c710: 733c 2f61 3e3c 2f70 3e0a 3c68 313e 3c61 s

    .

    .Limitation\n+0014c750: 733c 2f68 313e 0a3c 703e 4672 6f6d 2074 s

    .

    From t\n+0014c760: 6865 2070 6572 7370 6563 7469 7665 206f he perspective o\n+0014c770: 6620 7468 6520 432f 432b 2b20 6c61 6e67 f the C/C++ lang\n+0014c780: 7561 6765 2c20 6120 6665 7720 432f 432b uage, a few C/C+\n+0014c790: 2b20 6c61 6e67 7561 6765 2066 6561 7475 + language featu\n+0014c7a0: 7265 7320 6172 6520 6e6f 7420 7375 7070 res are not supp\n+0014c7b0: 6f72 7465 6420 6279 2067 534f 4150 2061 orted by gSOAP a\n+0014c7c0: 6e64 2074 6865 7365 2066 6561 7475 7265 nd these feature\n+0014c7d0: 7320 6361 6e6e 6f74 2062 6520 7573 6564 s cannot be used\n+0014c7e0: 2069 6e20 616e 2069 6e74 6572 6661 6365 in an interface\n+0014c7f0: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n+0014c800: 2073 6f61 7063 7070 322e 3c2f 703e 0a3c soapcpp2.

    .<\n+0014c810: 756c 3e0a 3c6c 693e 5354 4c3a 2074 6865 ul>.
  • STL: the\n+0014c820: 2073 6f61 7063 7070 3220 746f 6f6c 2073 soapcpp2 tool s\n+0014c830: 7570 706f 7274 7320 7468 6520 7365 7269 upports the seri\n+0014c840: 616c 697a 6174 696f 6e20 6f66 2043 2b2b alization of C++\n+0014c850: 2073 7472 696e 6773 203c 636f 6465 3e73 strings s\n+0014c860: 7464 3a3a 7374 7269 6e67 3c2f 636f 6465 td::string and std:\n+0014c880: 3a77 7374 7269 6e67 3c2f 636f 6465 3e20 :wstring \n+0014c890: 616e 6420 7468 6520 636f 6e74 6169 6e65 and the containe\n+0014c8a0: 7273 203c 636f 6465 3e73 7464 3a3a 6465 rs std::de\n+0014c8b0: 7175 653c 2f63 6f64 653e 2c20 3c63 6f64 que, std::list, std::v\n+0014c8e0: 6563 746f 723c 2f63 6f64 653e 2c20 616e ector, an\n+0014c8f0: 6420 3c63 6f64 653e 7374 643a 3a73 6574 d std::set\n+0014c900: 3c2f 636f 6465 3e2c 2028 7365 6520 5365 , (see Se\n+0014c910: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction \n+0014c940: 5354 4c20 636f 6e74 6169 6e65 7273 3c2f STL containers ). Also std::shared_ptr\n+0014c970: 3c2f 636f 6465 3e2c 203c 636f 6465 3e73 , s\n+0014c980: 7464 3a3a 756e 6971 7565 5f70 7472 3c2f td::unique_ptr, and std::auto_ptr are suppor\n+0014c9c0: 7465 642e 204f 7468 6572 2053 544c 2074 ted. Other STL t\n+0014c9d0: 7970 6573 2061 7265 206e 6f74 2073 6572 ypes are not ser\n+0014c9e0: 6961 6c69 7a61 626c 652e 3c2f 6c69 3e0a ializable.
  • .\n+0014c9f0: 3c6c 693e 5465 6d70 6c61 7465 733a 2074
  • Templates: t\n+0014ca00: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool\n+0014ca10: 2061 7373 756d 6573 2074 6861 7420 7465 assumes that te\n+0014ca20: 6d70 6c61 7465 7320 636c 6173 7365 7320 mplates classes \n+0014ca30: 6861 7665 206f 6e6c 7920 6f6e 6520 7465 have only one te\n+0014ca40: 6d70 6c61 7465 2070 6172 616d 6574 6572 mplate parameter\n+0014ca50: 2074 7970 6520 616e 6420 7468 6573 6520 type and these \n+0014ca60: 7465 6d70 6c61 7465 7320 6172 6520 636f templates are co\n+0014ca70: 6e74 6169 6e65 7273 206f 6620 7661 6c75 ntainers of valu\n+0014ca80: 6573 206f 6620 7468 6973 2074 656d 706c es of this templ\n+0014ca90: 6174 6520 7061 7261 6d65 7465 7220 7479 ate parameter ty\n+0014caa0: 7065 2e20 5468 6973 2074 656d 706c 6174 pe. This templat\n+0014cab0: 6520 636c 6173 7320 7368 6f75 6c64 2064 e class should d\n+0014cac0: 6566 696e 6520 3c63 6f64 653e 6265 6769 efine begi\n+0014cad0: 6e28 293c 2f63 6f64 653e 2c20 3c63 6f64 n(), end(), \n+0014caf0: 3c63 6f64 653e 7369 7a65 2829 3c2f 636f size(), clear\n+0014cb10: 2829 3c2f 636f 6465 3e2c 2061 6e64 203c (), and <\n+0014cb20: 636f 6465 3e69 6e73 6572 7428 293c 2f63 code>insert() methods..
  • Inheritan\n+0014cb50: 6365 3a20 7369 6e67 6c65 2063 6c61 7373 ce: single class\n+0014cb60: 2069 6e68 6572 6974 616e 6365 2069 7320 inheritance is \n+0014cb70: 7375 7070 6f72 7465 642e 3c2f 6c69 3e0a supported.
  • .\n+0014cb80: 3c6c 693e 4162 7374 7261 6374 206d 6574
  • Abstract met\n+0014cb90: 686f 6473 3a20 6120 636c 6173 7320 6d75 hods: a class mu\n+0014cba0: 7374 2062 6520 696e 7374 616e 7469 6162 st be instantiab\n+0014cbb0: 6c65 2074 6f20 7375 7070 6f72 7420 7365 le to support se\n+0014cbc0: 7269 616c 697a 6174 696f 6e20 6f66 2074 rialization of t\n+0014cbd0: 6861 7420 636c 6173 732e 2041 6e20 6162 hat class. An ab\n+0014cbe0: 7374 7261 6374 2063 6c61 7373 2077 6865 stract class whe\n+0014cbf0: 6e20 7573 6564 2073 686f 756c 6420 6265 n used should be\n+0014cc00: 2064 6563 6c61 7265 6420 7472 616e 7369 declared transi\n+0014cc10: 656e 742c 2073 6565 2053 6563 7469 6f6e ent, see Section\n+0014cc20: 203c 6120 636c 6173 733d 2265 6c22 2068 Trans\n+0014cc50: 6965 6e74 2064 6174 6120 7479 7065 733c ient data types<\n+0014cc60: 2f61 3e2e 3c2f 6c69 3e0a 3c6c 693e 4469 /a>.
  • .
  • Di\n+0014cc70: 7265 6374 6976 6573 3a20 6469 7265 6374 rectives: direct\n+0014cc80: 6976 6573 2061 6e64 2070 7261 676d 6173 ives and pragmas\n+0014cc90: 2073 7563 6820 6173 203c 636f 6465 3e23 such as #\n+0014cca0: 696e 636c 7564 653c 2f63 6f64 653e 2061 include a\n+0014ccb0: 6e64 203c 636f 6465 3e23 6465 6669 6e65 nd #define\n+0014ccc0: 3c2f 636f 6465 3e20 6172 6520 6d6f 7665 are move\n+0014ccd0: 6420 746f 2074 6865 2067 656e 6572 6174 d to the generat\n+0014cce0: 6564 203c 656d 3e3c 636f 6465 3e73 6f61 ed soa\n+0014ccf0: 7053 7475 622e 683c 2f63 6f64 653e 3c2f pStub.h source code \n+0014cd10: 6279 2073 6f61 7063 7070 322e 2054 6865 by soapcpp2. The\n+0014cd20: 7365 2064 6972 6563 7469 7665 7320 6172 se directives ar\n+0014cd30: 6520 616c 6c20 706c 6163 6564 2061 7420 e all placed at \n+0014cd40: 7468 6520 746f 7020 6f66 2074 6861 7420 the top of that \n+0014cd50: 6669 6c65 2c20 7365 6520 3c61 2063 6c61 file, see The #include a\n+0014cd90: 6e64 2023 6465 6669 6e65 2064 6972 6563 nd #define direc\n+0014cda0: 7469 7665 733c 2f61 3e2e 2055 7365 2074 tives. Use t\n+0014cdb0: 6865 203c 636f 6465 3e23 696d 706f 7274 he #import\n+0014cdc0: 3c2f 636f 6465 3e20 6469 7265 6374 6976 directiv\n+0014cdd0: 6520 746f 2069 6d70 6f72 7420 696e 7465 e to import inte\n+0014cde0: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+0014cdf0: 6573 2069 6e74 6f20 6f74 6865 7220 696e es into other in\n+0014ce00: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n+0014ce10: 696c 6573 2c20 7365 6520 5365 6374 696f iles, see Sectio\n+0014ce20: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n The #im\n+0014ce50: 706f 7274 2064 6972 6563 7469 7665 3c2f port directive .
  • .
  • C \n+0014ce70: 616e 6420 432b 2b20 636f 6465 2073 7461 and C++ code sta\n+0014ce80: 7465 6d65 6e74 733a 206e 6f20 636f 6465 tements: no code\n+0014ce90: 2073 7461 7465 6d65 6e74 7320 6172 6520 statements are \n+0014cea0: 616c 6c6f 7773 2069 6e20 696e 7465 7266 allows in interf\n+0014ceb0: 6163 6520 6865 6164 6572 2066 696c 6573 ace header files\n+0014cec0: 2e20 436c 6173 7320 6d65 7468 6f64 7320 . Class methods \n+0014ced0: 7368 6f75 6c64 2062 6520 6465 636c 6172 should be declar\n+0014cee0: 6564 2077 6974 686f 7574 2063 6f64 6520 ed without code \n+0014cef0: 696e 203c 636f 6465 3e7b 3c2f 636f 6465 in { and }. Also const\n+0014cf20: 7275 6374 6f72 2069 6e69 7469 616c 697a ructor initializ\n+0014cf30: 6572 7320 6172 6520 6e6f 7420 616c 6c6f ers are not allo\n+0014cf40: 7765 642e 2043 6c61 7373 206d 6574 686f wed. Class metho\n+0014cf50: 6420 696d 706c 656d 656e 7461 7469 6f6e d implementation\n+0014cf60: 7320 7368 6f75 6c64 2062 6520 6465 6669 s should be defi\n+0014cf70: 6e65 6420 696e 2061 2073 6570 6172 6174 ned in a separat\n+0014cf80: 6520 432b 2b20 736f 7572 6365 2066 696c e C++ source fil\n+0014cf90: 652e 3c2f 6c69 3e0a 3c6c 693e 432b 2b20 e.
  • .
  • C++ \n+0014cfa0: 7265 6665 7265 6e63 6573 3a20 7468 6573 references: thes\n+0014cfb0: 6520 6361 6e6e 6f74 2062 6520 7365 7269 e cannot be seri\n+0014cfc0: 616c 697a 6564 2c20 7573 6520 706f 696e alized, use poin\n+0014cfd0: 7465 7273 2069 6e73 7465 6164 2e3c 2f6c ters instead...

    The \n+0014cff0: 666f 6c6c 6f77 696e 6720 432f 432b 2b20 following C/C++ \n+0014d000: 6461 7461 2074 7970 6573 2072 6571 7569 data types requi\n+0014d010: 7265 2073 6f6d 6520 6174 7465 6e74 696f re some attentio\n+0014d020: 6e20 746f 2065 6e73 7572 6520 7468 6579 n to ensure they\n+0014d030: 2063 616e 2062 6520 7365 7269 616c 697a can be serializ\n+0014d040: 6564 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 ed:

    .
  • .

    \n+0014d7d0: 5265 6775 6c61 7220 382d 6269 7420 7374 Regular 8-bit st\n+0014d7e0: 7269 6e67 7320 6361 6e6e 6f74 2068 6f6c rings cannot hol\n+0014d7f0: 6420 7769 6465 2063 6861 7261 6374 6572 d wide character\n+0014d800: 7320 6f75 7473 6964 6520 6f66 2074 6865 s outside of the\n+0014d810: 2063 6861 7261 6374 6572 2072 616e 6765 character range\n+0014d820: 205b 312c 3235 355d 2e20 4f66 2063 6f75 [1,255]. Of cou\n+0014d830: 7273 6520 796f 7520 6361 6e20 7573 6520 rse you can use \n+0014d840: 7769 6465 2073 7472 696e 6773 2069 6e73 wide strings ins\n+0014d850: 7465 6164 206f 6620 382d 6269 7420 7374 tead of 8-bit st\n+0014d860: 7269 6e67 7320 696e 2074 6865 2069 6e74 rings in the int\n+0014d870: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+0014d880: 6c65 2066 6f72 2073 6f61 7063 7070 322e le for soapcpp2.\n+0014d890: 2041 6c74 6572 6e61 7469 7665 6c79 2c20 Alternatively, \n+0014d8a0: 7365 7420 7468 6520 3c63 6f64 653e 2353 set the #S\n+0014d8b0: 4f41 505f 435f 5554 4653 5452 494e 473c OAP_C_UTFSTRING<\n+0014d8c0: 2f63 6f64 653e 206d 6f64 6520 666c 6167 /code> mode flag\n+0014d8d0: 2074 6f20 656e 636f 6465 2077 6964 6520 to encode wide \n+0014d8e0: 6368 6172 6163 7465 7273 2069 6e20 382d characters in 8-\n+0014d8f0: 6269 7420 7374 7269 6e67 7320 696e 2055 bit strings in U\n+0014d900: 5446 2d38 2066 6f72 6d61 742e 3c2f 703e TF-8 format.

    \n+0014d910: 0a3c 703e 466f 7220 6578 616d 706c 652c .

    For example,\n+0014d920: 2074 6865 203c 656d 3e3c 636f 6465 3e78 the x\n+0014d930: 7364 3a73 7472 696e 673c 2f63 6f64 653e sd:string\n+0014d940: 3c2f 656d 3e20 7374 7269 6e67 2073 6368 string sch\n+0014d950: 656d 6120 7479 7065 2063 616e 2062 6520 ema type can be \n+0014d960: 6465 636c 6172 6564 2061 7320 6120 7769 declared as a wi\n+0014d970: 6465 2d63 6861 7261 6374 6572 2073 7472 de-character str\n+0014d980: 696e 6720 616e 6420 7573 6564 2073 7562 ing and used sub\n+0014d990: 7365 7175 656e 746c 793a 3c2f 703e 0a3c sequently:

    .<\n+0014d9a0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0014d9b0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    typ\n+0014d9e0: 6564 6566 3c2f 7370 616e 3e20 3c73 7061 edef wchar_t *xsd__strin\n+0014da20: 673b 203c 2f64 6976 3e0a 3c64 6976 2063 g;
    .
    int\n+0014da60: 206e 735f 5f6d 794d 6574 686f 6428 7873 ns__myMethod(xs\n+0014da70: 645f 5f73 7472 696e 6720 696e 7075 742c d__string input,\n+0014da80: 2078 7364 5f5f 7374 7269 6e67 202a 6f75 xsd__string *ou\n+0014da90: 7470 7574 293b 3c2f 6469 763e 0a3c 2f64 tput);
    .

    To do so \n+0014dac0: 6175 746f 6d61 7469 6361 6c6c 7920 7769 automatically wi\n+0014dad0: 7468 2077 7364 6c32 682c 2065 6469 7420 th wsdl2h, edit \n+0014dae0: 3c65 6d3e 3c63 6f64 653e 7479 7065 6d61 typema\n+0014daf0: 702e 6461 743c 2f63 6f64 653e 3c2f 656d p.dat and add the li\n+0014db10: 6e65 3a20 3c2f 703e 3c70 7265 2063 6c61 ne:

    xs\n+0014db30: 645f 5f73 7472 696e 6720 3d20 7c20 7763  d__string = | wc\n+0014db40: 6861 725f 742a 207c 2077 6368 6172 5f74  har_t* | wchar_t\n+0014db50: 2a0a 3c2f 7072 653e 3c70 3e20 6f72 2066  *.

    or f\n+0014db60: 6f72 2043 2b2b 3a20 3c2f 703e 3c70 7265 or C++:

    xsd__string = \n+0014db90: 7c20 7374 643a 3a77 7374 7269 6e67 207c | std::wstring |\n+0014dba0: 2073 7464 3a3a 7773 7472 696e 672a 0a3c std::wstring*.<\n+0014dbb0: 2f70 7265 3e3c 703e 2041 6c74 6572 6e61 /pre>

    Alterna\n+0014dbc0: 7469 7665 6c79 2c20 382d 6269 7420 7374 tively, 8-bit st\n+0014dbd0: 7269 6e67 7320 6361 6e20 686f 6c64 2055 rings can hold U\n+0014dbe0: 5446 2d38 2066 6f72 6d61 7474 6564 2077 TF-8 formatted w\n+0014dbf0: 6964 6520 6368 6172 6163 7465 7273 2077 ide characters w\n+0014dc00: 6865 6e20 7468 6520 3c63 6f64 653e 2353 hen the #S\n+0014dc10: 4f41 505f 435f 5554 4653 5452 494e 473c OAP_C_UTFSTRING<\n+0014dc20: 2f63 6f64 653e 2066 6c61 6720 6973 2065 /code> flag is e\n+0014dc30: 6e61 626c 6564 2c20 7365 6520 5365 6374 nabled, see Sect\n+0014dc40: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Run-ti\n+0014dc70: 6d65 2066 6c61 6773 3c2f 613e 202e 2054 me flags . T\n+0014dc80: 6865 2061 7070 6c69 6361 7469 6f6e 2069 he application i\n+0014dc90: 7320 7265 7370 6f6e 7369 626c 6520 666f s responsible fo\n+0014dca0: 7220 6669 6c6c 696e 6720 7265 6775 6c61 r filling regula\n+0014dcb0: 7220 7374 7269 6e67 7320 7769 7468 2055 r strings with U\n+0014dcc0: 5446 2d38 2063 6f6e 7465 6e74 2e3c 2f70 TF-8 content..

    Also the #SOAP_C_MBST\n+0014dcf0: 5249 4e47 3c2f 636f 6465 3e20 666c 6167 RING flag\n+0014dd00: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n+0014dd10: 6163 7469 7661 7465 206d 756c 7469 6279 activate multiby\n+0014dd20: 7465 2063 6861 7261 6374 6572 2073 7570 te character sup\n+0014dd30: 706f 7274 2075 7369 6e67 2074 6865 2063 port using the c\n+0014dd40: 7572 7265 6e74 206c 6f63 616c 652e 204d urrent locale. M\n+0014dd50: 756c 7469 6279 7465 2073 7570 706f 7274 ultibyte support\n+0014dd60: 2064 6570 656e 6473 206f 6e20 7468 6520 depends on the \n+0014dd70: 6c6f 6361 6c65 2073 6574 7469 6e67 7320 locale settings \n+0014dd80: 666f 7220 6465 616c 696e 6720 7769 7468 for dealing with\n+0014dd90: 2065 7874 656e 6465 6420 6e61 7475 7261 extended natura\n+0014dda0: 6c20 6c61 6e67 7561 6765 2065 6e63 6f64 l language encod\n+0014ddb0: 696e 6773 2e3c 2f70 3e0a 3c70 3e42 6f74 ings.

    .

    Bot\n+0014ddc0: 6820 382d 6269 7420 7374 7269 6e67 7320 h 8-bit strings \n+0014ddd0: 616e 6420 7769 6465 2d63 6861 7261 6374 and wide-charact\n+0014dde0: 6572 2073 7472 696e 6773 2063 616e 2062 er strings can b\n+0014ddf0: 6520 7573 6564 2074 6f67 6574 6865 7220 e used together \n+0014de00: 7769 7468 696e 2061 6e20 6170 706c 6963 within an applic\n+0014de10: 6174 696f 6e2e 2046 6f72 2065 7861 6d70 ation. For examp\n+0014de20: 6c65 2c20 7468 6520 666f 6c6c 6f77 696e le, the followin\n+0014de30: 6720 6865 6164 6572 2066 696c 6520 6465 g header file de\n+0014de40: 636c 6172 6174 696f 6e20 696e 7472 6f64 claration introd\n+0014de50: 7563 6573 2074 776f 2073 7472 696e 6720 uces two string \n+0014de60: 7363 6865 6d61 2074 7970 6573 3a3c 2f70 schema types:.

    \n+0014deb0: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef <\n+0014dec0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0014ded0: 6f72 6474 7970 6522 3e77 6368 6172 5f74 ordtype\">wchar_t\n+0014dee0: 3c2f 7370 616e 3e20 2a78 7364 5f5f 7374 *xsd__st\n+0014def0: 7269 6e67 3b20 3c2f 6469 763e 0a3c 6469 ring;
    .<\n+0014df10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0014df20: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef ch\n+0014df50: 6172 3c2f 7370 616e 3e20 2a78 7364 5f5f ar *xsd__\n+0014df60: 7374 7269 6e67 5f3b 203c 7370 616e 2063 string_; /\n+0014df80: 2f20 7472 6169 6c69 6e67 2026 2333 393b / trailing '\n+0014df90: 5f26 2333 393b 2061 766f 6964 7320 6e61 _' avoids na\n+0014dfa0: 6d65 2063 6c61 7368 203c 2f73 7061 6e3e me clash \n+0014dfb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n+0014dff0: 5f5f 6d79 4d65 7468 6f64 2878 7364 5f5f __myMethod(xsd__\n+0014e000: 7374 7269 6e67 2069 6e70 7574 2c20 7873 string input, xs\n+0014e010: 645f 5f73 7472 696e 675f 202a 6f75 7470 d__string_ *outp\n+0014e020: 7574 293b 3c2f 6469 763e 0a3c 2f64 6976 ut);
    .

    where <\n+0014e560: 636f 6465 3e26 6c74 3b70 7265 6669 7826 code><prefix&\n+0014e570: 6774 3b3c 2f63 6f64 653e 2069 7320 7468 gt; is th\n+0014e580: 6520 584d 4c20 6e61 6d65 7370 6163 6520 e XML namespace \n+0014e590: 7072 6566 6978 206f 6620 6120 7365 7276 prefix of a serv\n+0014e5a0: 6963 6520 6269 6e64 696e 672e 2054 6865 ice binding. The\n+0014e5b0: 203c 636f 6465 3e26 6c74 3b70 726f 7065 <prope\n+0014e5c0: 7274 7926 6774 3b3c 2f63 6f64 653e 2061 rty> a\n+0014e5d0: 6e64 203c 636f 6465 3e26 6c74 3b76 616c nd <val\n+0014e5e0: 7565 2667 743b 3c2f 636f 6465 3e20 6669 ue> fi\n+0014e5f0: 656c 6473 2061 7265 206f 6e65 206f 6620 elds are one of \n+0014e600: 7468 6520 666f 6c6c 6f77 696e 673a 3c2f the following:.\n+0014e630: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+0014e650: 3c74 6820 636c 6173 733d 226d 6172 6b64 ....\n+0014e7d0: 3c63 6f64 653e 6e61 6d65 7370 6163 653c namespace<\n+0014e7e0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+0014e810: 5552 4920 6f66 2074 6865 2057 5344 4c20 URI of the WSDL \n+0014e820: 7461 7267 6574 4e61 6d65 7370 6163 6520 targetNamespace \n+0014e830: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+0014e860: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014e870: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014e880: 3e3c 636f 6465 3e64 6f63 756d 656e 7461 >documenta\n+0014e890: 7469 6f6e 3c2f 636f 6465 3e20 2020 3c2f tion ..<\n+0014e950: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014e960: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014e970: 3e3c 636f 6465 3e64 6f63 3c2f 636f 6465 >doc ..<\n+0014ea10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014ea20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014ea30: 3e3c 636f 6465 3e73 7479 6c65 3c2f 636f >style \n+0014ead0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......\n+0014ecb0: 3c63 6f64 653e 706f 7274 3c2f 636f 6465 port \n+0014ed70: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .....<\n+0014eef0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0014ef00: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0014ef10: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+0014ef50: 3c74 6420 636c 6173 733d 226d 6172 6b64 .<\n+0014f010: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0014f020: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+0014f030: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+0014f0c0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n+0014f290: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+0014f3d0: 636f 6465 3e62 696e 6469 6e67 3c2f 636f code>binding \n+0014f440: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0014f500: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ...<\n+0014f5f0: 2f74 6162 6c65 3e0a 3c70 3e54 6865 2073 /table>.

    The s\n+0014f600: 6572 7669 6365 203c 636f 6465 3e6e 616d ervice nam\n+0014f610: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and namespace properties a\n+0014f640: 7265 2072 6571 7569 7265 6420 696e 206f re required in o\n+0014f650: 7264 6572 2074 6f20 6765 6e65 7261 7465 rder to generate\n+0014f660: 2061 2076 616c 6964 2057 5344 4c20 7769 a valid WSDL wi\n+0014f670: 7468 2073 6f61 7063 7070 322e 2054 6865 th soapcpp2. The\n+0014f680: 206f 7468 6572 2070 726f 7065 7274 6965 other propertie\n+0014f690: 7320 6172 6520 6f70 7469 6f6e 616c 2e3c s are optional.<\n+0014f6a0: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The style an\n+0014f6c0: 6420 3c63 6f64 653e 656e 636f 6469 6e67 d encoding\n+0014f6d0: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property\n+0014f6e0: 2064 6566 6175 6c74 7320 6172 6520 6368 defaults are ch\n+0014f6f0: 616e 6765 6420 7769 7468 203c 623e 3c63 anged with soapcpp2 -e<\n+0014f710: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio\n+0014f720: 6e20 3c62 3e3c 636f 6465 3e2d 653c 2f63 n -e to rpc and\n+0014f750: 203c 636f 6465 3e65 6e63 6f64 6564 3c2f encoded.

    .

    Yo\n+0014f770: 7520 6361 6e20 6f76 6572 7269 6465 2074 u can override t\n+0014f780: 6865 203c 636f 6465 3e70 6f72 743c 2f63 he port endpoint UR\n+0014f7a0: 4c20 6174 2072 756e 7469 6d65 2069 6e20 L at runtime in \n+0014f7b0: 7468 6520 6175 746f 2d67 656e 6572 6174 the auto-generat\n+0014f7c0: 6564 203c 636f 6465 3e73 6f61 705f 6361 ed soap_ca\n+0014f7d0: 6c6c 5f70 7265 6669 785f 5f66 756e 633c ll_prefix__func<\n+0014f7e0: 2f63 6f64 653e 2073 6572 7669 6365 2063 /code> service c\n+0014f7f0: 616c 6c20 2843 2f43 2b2b 2063 6c69 656e all (C/C++ clien\n+0014f800: 7420 7369 6465 2920 616e 6420 696e 2074 t side) and in t\n+0014f810: 6865 2043 2b2b 2070 726f 7879 2063 6c61 he C++ proxy cla\n+0014f820: 7373 2073 6572 7669 6365 2063 616c 6c2e ss service call.\n+0014f830: 3c2f 703e 0a3c 703e 5072 6f74 6f63 6f6c

    .

    Protocol\n+0014f840: 2070 726f 7065 7274 7920 7661 6c75 6573 property values\n+0014f850: 2061 7265 3a3c 2f70 3e0a 3c74 6162 6c65 are:

    ..
    .<\n+0014f8d0: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n+0014f8e0: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n+0014f8f0: 3e64 6573 6372 6970 7469 6f6e 2020 2020 >description \n+0014f900: 3c2f 7468 3e3c 2f74 723e 0a3c 7472 2063 ......<\n+0014fab0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014fac0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014fad0: 3e3c 636f 6465 3e53 4f41 5031 2e32 3c2f >SOAP1.2 S\n+0014fb10: 4f41 5020 312e 3220 7472 616e 7370 6f72 OAP 1.2 transpor\n+0014fb20: 7420 2873 616d 6520 6173 203c 636f 6465 t (same as soapcpp2 -2) ....o\n+0014fc90: 6e65 2d77 6179 2053 4f41 5020 312e 3120 ne-way SOAP 1.1 \n+0014fca0: 7769 7468 2048 5454 5020 4745 5420 2020 with HTTP GET \n+0014fcb0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+0014fd00: 3c63 6f64 653e 534f 4150 312e 322d 4745 SOAP1.2-GE\n+0014fd10: 543c 2f63 6f64 653e 2020 203c 2f74 643e T \n+0014fd20: 3c74 6420 636c 6173 733d 226d 6172 6b64 .<\n+0014fd70: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0014fd80: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0014fd90: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+0014fe60: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014fe70: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014fe80: 3e3c 636f 6465 3e50 4f53 543c 2f63 6f64 >POST .\n+0014fef0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0014ff10: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..\n+0014ffa0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+00150050: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..<\n+001500b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001500c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001500d0: 3e6e 6f6e 2d53 4f41 5020 5245 5354 2070 >non-SOAP REST p\n+001500e0: 726f 746f 636f 6c20 7769 7468 2048 5454 rotocol with HTT\n+001500f0: 5020 4445 4c45 5445 2020 203c 2f74 643e P DELETE \n+00150100: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c .
    property value
    name <\n+0014e710: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>name of th\n+0014e740: 6520 7365 7276 6963 652c 206f 7074 696f e service, optio\n+0014e750: 6e61 6c6c 7920 666f 6c6c 6f77 6564 2062 nally followed b\n+0014e760: 7920 7465 7874 2064 6573 6372 6962 696e y text describin\n+0014e770: 6720 7468 6520 7365 7276 6963 6520 2020 g the service \n+0014e780: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    text descri\n+0014e8d0: 6269 6e67 2074 6865 2073 6572 7669 6365 bing the service\n+0014e8e0: 2028 7365 6520 616c 736f 2074 6865 203c (see also the <\n+0014e8f0: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name\n+0014e900: 2070 726f 7065 7274 7929 2c20 6d75 6c74 property), mult\n+0014e910: 6970 6c65 2070 6572 6d69 7474 6564 2020 iple permitted \n+0014e920: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    an al\n+0014e9b0: 6961 7320 666f 7220 7468 6520 3c63 6f64 ias for the documentation<\n+0014e9d0: 2f63 6f64 653e 2070 726f 7065 7274 7920 /code> property \n+0014e9e0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    document (default) SOA\n+0014ea90: 5020 6d65 7373 6167 696e 6720 7374 796c P messaging styl\n+0014eaa0: 6520 6f72 203c 636f 6465 3e72 7063 3c2f e or rpc for SOAP R\n+0014eac0: 5043 2020 2020 3c2f 7464 3e3c 2f74 723e PC
    encod\n+0014eb20: 696e 673c 2f63 6f64 653e 2020 203c 2f74 ing litera\n+0014eb60: 6c3c 2f63 6f64 653e 2028 6465 6661 756c l (defaul\n+0014eb70: 7429 2c20 3c63 6f64 653e 656e 636f 6465 t), encode\n+0014eb80: 643c 2f63 6f64 653e 2066 6f72 2053 4f41 d for SOA\n+0014eb90: 5020 656e 636f 6469 6e67 2c20 6f72 2061 P encoding, or a\n+0014eba0: 2063 7573 746f 6d20 5552 4920 2020 203c custom URI <\n+0014ebb0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    protocol spec\n+0014ec40: 6966 6965 7320 534f 4150 206f 7220 5245 ifies SOAP or RE\n+0014ec50: 5354 2c20 7365 6520 6265 6c6f 7720 2020 ST, see below \n+0014ec60: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    URL o\n+0014ecf0: 6620 7468 6520 7365 7276 6963 6520 656e f the service en\n+0014ed00: 6470 6f69 6e74 2c20 7573 7561 6c6c 7920 dpoint, usually \n+0014ed10: 616e 2068 7474 7020 6f72 2068 7474 7073 an http or https\n+0014ed20: 2061 6464 7265 7373 2c20 746f 2075 7365 address, to use\n+0014ed30: 2069 6e20 7468 6520 5753 444c 2064 6566 in the WSDL def\n+0014ed40: 696e 6974 696f 6e73 2f73 6572 7669 6365 initions/service\n+0014ed50: 2f70 6f72 742f 6164 6472 6573 732f 406c /port/address/@l\n+0014ed60: 6f63 6174 696f 6e20 2020 203c 2f74 643e ocation
    l\n+0014edc0: 6f63 6174 696f 6e3c 2f63 6f64 653e 2020 ocation \n+0014edd0: 203c 2f74 643e 3c74 6420 636c 6173 733d an alias\n+0014ee00: 2066 6f72 2074 6865 203c 636f 6465 3e70 for the p\n+0014ee10: 6f72 743c 2f63 6f64 653e 2070 726f 7065 ort prope\n+0014ee20: 7274 7920 2020 203c 2f74 643e 3c2f 7472 rty
    endp\n+0014ee80: 6f69 6e74 3c2f 636f 6465 3e20 2020 3c2f oint an alias fo\n+0014eec0: 7220 7468 6520 3c63 6f64 653e 706f 7274 r the port\n+0014eed0: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property\n+0014eee0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    transpor\n+0014ef40: 743c 2f63 6f64 653e 2020 203c 2f74 643e t URI declaratio\n+0014ef80: 6e20 6f66 2074 6865 2074 7261 6e73 706f n of the transpo\n+0014ef90: 7274 2c20 7573 7561 6c6c 7920 3c63 6f64 rt, usually http://schemas.\n+0014efe0: 786d 6c73 6f61 702e 6f72 672f 736f 6170 xmlsoap.org/soap\n+0014eff0: 2f68 7474 703c 2f61 3e3c 2f63 6f64 653e /http\n+0014f000: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    definit\n+0014f060: 696f 6e73 3c2f 636f 6465 3e20 2020 3c2f ions name of the\n+0014f0a0: 2057 5344 4c20 6465 6669 6e69 7469 6f6e WSDL definition\n+0014f0b0: 732f 406e 616d 6520 2020 203c 2f74 643e s/@name
    t\n+0014f110: 7970 653c 2f63 6f64 653e 2020 203c 2f74 ype name of the \n+0014f150: 5753 444c 2064 6566 696e 6974 696f 6e73 WSDL definitions\n+0014f160: 2f70 6f72 7454 7970 652f 406e 616d 6520 /portType/@name \n+0014f170: 2857 5344 4c32 2e30 2069 6e74 6572 6661 (WSDL2.0 interfa\n+0014f180: 6365 2f40 6e61 6d65 2920 2020 203c 2f74 ce/@name)
    portType an al\n+0014f220: 6961 7320 666f 7220 7468 6520 3c63 6f64 ias for the type pr\n+0014f240: 6f70 6572 7479 2028 3c63 6f64 653e 706f operty (po\n+0014f250: 7274 5479 7065 3c2f 636f 6465 3e20 666f rtType fo\n+0014f260: 6c6c 6f77 7320 534f 4150 2031 2e31 206e llows SOAP 1.1 n\n+0014f270: 616d 696e 6720 636f 6e76 656e 7469 6f6e aming convention\n+0014f280: 7329 2020 2020 3c2f 7464 3e3c 2f74 723e s)
    interf\n+0014f2e0: 6163 653c 2f63 6f64 653e 2020 203c 2f74 ace an alias for\n+0014f320: 2074 6865 203c 636f 6465 3e74 7970 653c the type<\n+0014f330: 2f63 6f64 653e 2070 726f 7065 7274 7920 /code> property \n+0014f340: 283c 636f 6465 3e69 6e74 6572 6661 6365 (interface\n+0014f350: 3c2f 636f 6465 3e20 666f 6c6c 6f77 7320 follows \n+0014f360: 534f 4150 2031 2e32 206e 616d 696e 6720 SOAP 1.2 naming \n+0014f370: 636f 6e76 656e 7469 6f6e 7329 2020 2020 conventions) \n+0014f380: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    nam\n+0014f410: 6520 6f66 2074 6865 2057 5344 4c20 6465 e of the WSDL de\n+0014f420: 6669 6e69 7469 6f6e 732f 6269 6e64 696e finitions/bindin\n+0014f430: 672f 406e 616d 6520 2020 203c 2f74 643e g/@name
    p\n+0014f490: 6f72 744e 616d 653c 2f63 6f64 653e 2020 ortName \n+0014f4a0: 203c 2f74 643e 3c74 6420 636c 6173 733d name of \n+0014f4d0: 7468 6520 5753 444c 2064 6566 696e 6974 the WSDL definit\n+0014f4e0: 696f 6e73 2f73 6572 7669 6365 2f70 6f72 ions/service/por\n+0014f4f0: 742f 406e 616d 6520 2020 203c 2f74 643e t/@name
    \n+0014f550: 6578 6563 7574 6162 6c65 3c2f 636f 6465 executable name \n+0014f590: 6f66 2074 6865 2022 6578 6563 7574 6162 of the \"executab\n+0014f5a0: 6c65 2220 746f 2075 7365 2069 6e20 7468 le\" to use in th\n+0014f5b0: 6520 5753 444c 2064 6566 696e 6974 696f e WSDL definitio\n+0014f5c0: 6e73 2f73 6572 7669 6365 2f70 6f72 742f ns/service/port/\n+0014f5d0: 6164 6472 6573 732f 406c 6f63 6174 696f address/@locatio\n+0014f5e0: 6e20 2020 3c2f 7464 3e3c 2f74 723e 0a3c n
    protoco\n+0014f8c0: 6c20 7661 6c75 6520 2020 3c2f 7468 3e3c l value
    SOAP \n+0014f960: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 SOAP tr\n+0014f990: 616e 7370 6f72 742c 2073 7570 706f 7274 ansport, support\n+0014f9a0: 696e 6720 626f 7468 2053 4f41 5020 312e ing both SOAP 1.\n+0014f9b0: 3120 616e 6420 312e 3220 2020 203c 2f74 1 and 1.2
    SOAP1.1\n+0014fa20: 2020 203c 2f74 643e 3c74 6420 636c 6173 SOAP 1\n+0014fa50: 2e31 2074 7261 6e73 706f 7274 2028 7361 .1 transport (sa\n+0014fa60: 6d65 2061 7320 3c63 6f64 653e 736f 6170 me as soap\n+0014fa70: 6370 7032 202d 313c 2f63 6f64 653e 2920 cpp2 -1) \n+0014fa80: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    SOA\n+0014fba0: 502d 4745 543c 2f63 6f64 653e 2020 203c P-GET <\n+0014fbb0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>one-way SO\n+0014fbe0: 4150 2031 2e31 206f 7220 312e 3220 7769 AP 1.1 or 1.2 wi\n+0014fbf0: 7468 2048 5454 5020 4745 5420 2020 203c th HTTP GET <\n+0014fc00: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    SOAP1.1-GET
    one-way SOAP 1\n+0014fd50: 2e32 2077 6974 6820 4854 5450 2047 4554 .2 with HTTP GET\n+0014fd60: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    HTTP an \n+0014fdf0: 616c 6961 7320 666f 7220 3c63 6f64 653e alias for \n+0014fe00: 504f 5354 3c2f 636f 6465 3e20 2873 616d POST (sam\n+0014fe10: 6520 6173 203c 636f 6465 3e73 6f61 7063 e as soapc\n+0014fe20: 7070 3220 2d30 3c2f 636f 6465 3e29 2020 pp2 -0) \n+0014fe30: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    non-\n+0014fec0: 534f 4150 2052 4553 5420 7072 6f74 6f63 SOAP REST protoc\n+0014fed0: 6f6c 2077 6974 6820 4854 5450 2050 4f53 ol with HTTP POS\n+0014fee0: 5420 2020 203c 2f74 643e 3c2f 7472 3e0a T
    GET non\n+0014ff70: 2d53 4f41 5020 5245 5354 2070 726f 746f -SOAP REST proto\n+0014ff80: 636f 6c20 7769 7468 2048 5454 5020 4745 col with HTTP GE\n+0014ff90: 5420 2020 203c 2f74 643e 3c2f 7472 3e0a T
    PUT no\n+00150020: 6e2d 534f 4150 2052 4553 5420 7072 6f74 n-SOAP REST prot\n+00150030: 6f63 6f6c 2077 6974 6820 4854 5450 2050 ocol with HTTP P\n+00150040: 5554 2020 2020 3c2f 7464 3e3c 2f74 723e UT
    DELETE\n+001500a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    .<\n+00150110: 703e 5468 6520 3c63 6f64 653e 7072 6f74 p>The prot\n+00150120: 6f63 6f6c 3c2f 636f 6465 3e20 7072 6f70 ocol prop\n+00150130: 6572 7479 2069 7320 3c63 6f64 653e 534f erty is SO\n+00150140: 4150 3c2f 636f 6465 3e20 6279 2064 6566 AP by def\n+00150150: 6175 6c74 2e20 5468 6520 6465 6661 756c ault. The defaul\n+00150160: 7420 6973 2063 6861 6e67 6564 2077 6974 t is changed wit\n+00150170: 6820 3c62 3e3c 636f 6465 3e73 6f61 7063 h soapc\n+00150180: 7070 3220 2d31 3c2f 636f 6465 3e3c 2f62 pp2 -1 option -1 \n+001501b0: 746f 2053 4f41 5020 312e 312c 203c 623e to SOAP 1.1, \n+001501c0: 3c63 6f64 653e 736f 6170 6370 7032 202d soapcpp2 -\n+001501d0: 323c 2f63 6f64 653e 3c2f 623e 206f 7074 2 opt\n+001501e0: 696f 6e20 3c62 3e3c 636f 6465 3e2d 323c ion -2<\n+001501f0: 2f63 6f64 653e 3c2f 623e 2074 6f20 534f /code> to SO\n+00150200: 4150 2031 2e32 2c20 616e 6420 6e6f 6e2d AP 1.2, and non-\n+00150210: 534f 4150 2052 4553 5420 7769 7468 203c SOAP REST with <\n+00150220: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2\n+00150230: 202d 303c 2f63 6f64 653e 3c2f 623e 206f -0 o\n+00150240: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n+00150250: 303c 2f63 6f64 653e 3c2f 623e 3c2f 703e 0

    \n+00150260: 0a3c 703e 5468 6520 3c63 6f64 653e 4745 .

    The GE\n+00150270: 543c 2f63 6f64 653e 2070 726f 746f 636f T protoco\n+00150280: 6c73 2066 6f72 2053 4f41 5020 616e 6420 ls for SOAP and \n+00150290: 5245 5354 2072 6571 7569 7265 2074 6861 REST require tha\n+001502a0: 7420 7468 6520 7365 7276 6963 6520 6f70 t the service op\n+001502b0: 6572 6174 696f 6e73 206f 6e6c 7920 7573 erations only us\n+001502c0: 6520 7072 696d 6974 6976 6520 7479 7065 e primitive type\n+001502d0: 7320 7769 7468 2074 6865 6972 2069 6e70 s with their inp\n+001502e0: 7574 2070 6172 616d 6574 6572 732c 2062 ut parameters, b\n+001502f0: 6563 6175 7365 2074 6865 7365 2070 6172 ecause these par\n+00150300: 616d 6574 6572 7320 6172 6520 656e 636f ameters are enco\n+00150310: 6465 6420 7769 7468 2074 6865 2055 524c ded with the URL\n+00150320: 2061 7320 5552 4c20 7175 6572 7920 7661 as URL query va\n+00150330: 6c75 6573 2e3c 2f70 3e0a 3c70 3e54 6f20 lues.

    .

    To \n+00150340: 6c65 7420 6469 7265 6374 6976 6573 2074 let directives t\n+00150350: 616b 6520 6566 6665 6374 2077 6974 6820 ake effect with \n+00150360: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n+00150370: 6e73 2c20 796f 7520 7368 6f75 6c64 2062 ns, you should b\n+00150380: 696e 6420 7468 6520 7365 7276 6963 6520 ind the service \n+00150390: 6f70 6572 6174 696f 6e73 2074 6f20 7468 operations to th\n+001503a0: 6520 5753 444c 206e 616d 6573 7061 6365 e WSDL namespace\n+001503b0: 206f 6620 6120 7365 7276 6963 6520 6279 of a service by\n+001503c0: 2075 7369 6e67 2074 6865 206e 616d 6573 using the names\n+001503d0: 7061 6365 2070 7265 6669 7820 6173 2070 pace prefix as p\n+001503e0: 6172 7420 6f66 2074 6865 2069 6465 6e74 art of the ident\n+001503f0: 6966 6965 7220 6e61 6d65 206f 6620 7468 ifier name of th\n+00150400: 6520 6675 6e63 7469 6f6e 2074 6861 7420 e function that \n+00150410: 6465 6669 6e65 7320 7468 6520 7365 7276 defines the serv\n+00150420: 6963 6520 6f70 6572 6174 696f 6e3a 3c2f ice operation:.

    int \n+00150480: 7072 6566 6978 5f5f 6675 6e63 2861 7267 prefix__func(arg\n+00150490: 312c 2061 7267 322c 202e 2e2e 2c20 6172 1, arg2, ..., ar\n+001504a0: 676e 2c20 7265 7375 6c74 293b 3c2f 6469 gn, result);.

    whe\n+001504d0: 7265 203c 636f 6465 3e70 7265 6669 783c re prefix<\n+001504e0: 2f63 6f64 653e 2063 616e 206e 6f77 2062 /code> can now b\n+001504f0: 6520 7573 6564 2074 6f20 6c65 7420 6469 e used to let di\n+00150500: 7265 6374 6976 6573 2074 616b 6520 6566 rectives take ef\n+00150510: 6665 6374 206f 6e20 7468 6973 2073 6572 fect on this ser\n+00150520: 7669 6365 206f 7065 7261 7469 6f6e 2e3c vice operation.<\n+00150530: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to \n+00150550: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n+00150560: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

    .

    .Service m\n+001505a0: 6574 686f 6420 6469 7265 6374 6976 6573 ethod directives\n+001505b0: 3c2f 6833 3e0a 3c70 3e53 6572 7669 6365

    .

    Service\n+001505c0: 2070 726f 7065 7274 6965 7320 6172 6520 properties are \n+001505d0: 6170 706c 6963 6162 6c65 2074 6f20 6120 applicable to a \n+001505e0: 7365 7276 6963 6520 616e 6420 746f 2061 service and to a\n+001505f0: 6c6c 206f 6620 6974 7320 6f70 6572 6174 ll of its operat\n+00150600: 696f 6e73 2e20 5365 7276 6963 6520 6d65 ions. Service me\n+00150610: 7468 6f64 2064 6972 6563 7469 7665 7320 thod directives \n+00150620: 6172 6520 7370 6563 6966 6963 616c 6c79 are specifically\n+00150630: 2061 7070 6c69 6361 626c 6520 746f 2061 applicable to a\n+00150640: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+00150650: 6f6e 2e3c 2f70 3e0a 3c70 3e41 2073 6572 on.

    .

    A ser\n+00150660: 7669 6365 206d 6574 686f 6420 6469 7265 vice method dire\n+00150670: 6374 6976 6520 6973 206f 6620 7468 6520 ctive is of the \n+00150680: 666f 726d 3a3c 2f70 3e0a 3c64 6976 2063 form:

    .
    \n+001506a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+001506d0: 266c 743b 7072 6566 6978 2667 743b 2073 <prefix> s\n+001506e0: 6572 7669 6365 206d 6574 686f 642d 266c ervice method-&l\n+001506f0: 743b 7072 6f70 6572 7479 2667 743b 3a20 t;property>: \n+00150700: 266c 743b 6d65 7468 6f64 2667 743b 2026 <method> &\n+00150710: 6c74 3b76 616c 7565 2667 743b 3c2f 7370 lt;value>
    .
    \n+00150730: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    where \n+00152430: 3c63 6f64 653e 266c 743b 7072 6566 6978 <prefix\n+00152440: 2667 743b 3c2f 636f 6465 3e20 6973 2074 > is t\n+00152450: 6865 2058 4d4c 206e 616d 6573 7061 6365 he XML namespace\n+00152460: 2070 7265 6669 7820 6f66 2061 2073 6368 prefix of a sch\n+00152470: 656d 612e 2054 6865 203c 636f 6465 3e26 ema. The &\n+00152480: 6c74 3b70 726f 7065 7274 7926 6774 3b3c lt;property><\n+00152490: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and <value> fields are\n+001524c0: 206f 6e65 206f 6620 7468 6520 666f 6c6c one of the foll\n+001524d0: 6f77 696e 673a 3c2f 703e 0a3c 7461 626c owing:

    ...proper\n+00152540: 7479 2020 203c 2f74 683e 3c74 6820 636c ty valu\n+00152570: 6520 2020 203c 2f74 683e 3c2f 7472 3e0a e .\n+00152580: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+001525a0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .namespa\n+001525d0: 6365 3c2f 636f 6465 3e20 2020 3c2f 7464 ce URI of the XS\n+00152610: 4420 7461 7267 6574 4e61 6d65 7370 6163 D targetNamespac\n+00152620: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n+00152630: 3c74 7220 636c 6173 733d 226d 6172 6b64 .namesp\n+00152680: 6163 6532 3c2f 636f 6465 3e20 2020 3c2f ace2 alternate U\n+001526c0: 5249 2070 6174 7465 726e 2066 6f72 2074 RI pattern for t\n+001526d0: 6865 2058 5344 206e 616d 6573 7061 6365 he XSD namespace\n+001526e0: 2028 692e 652e 2055 5249 2069 7320 616c (i.e. URI is al\n+001526f0: 736f 2061 6363 6570 7465 6420 6279 2074 so accepted by t\n+00152700: 6865 2058 4d4c 2070 6172 7365 7229 2020 he XML parser) \n+00152710: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n+00152760: 3c63 6f64 653e 696d 706f 7274 3c2f 636f import URI\n+001527a0: 206f 6620 616e 2069 6d70 6f72 7465 6420 of an imported \n+001527b0: 6e61 6d65 7370 6163 652c 2061 7320 616e namespace, as an\n+001527c0: 2061 6c74 6572 6e61 7469 7665 206f 7220 alternative or \n+001527d0: 696e 2061 6464 6974 696f 6e20 746f 203c in addition to <\n+001527e0: 636f 6465 3e6e 616d 6573 7061 6365 3c2f code>namespace, adds xsd:import to the gener\n+00152820: 6174 6564 2057 5344 4c20 616e 6420 5853 ated WSDL and XS\n+00152830: 4420 6669 6c65 7320 2020 203c 2f74 643e D files \n+00152840: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+00152890: 666f 726d 3c2f 636f 6465 3e20 2020 3c2f form unqua\n+001528d0: 6c69 6669 6564 3c2f 636f 6465 3e20 2864 lified (d\n+001528e0: 6566 6175 6c74 2920 6f72 203c 636f 6465 efault) or qualified local element \n+00152910: 616e 6420 6174 7472 6962 7574 6520 666f and attribute fo\n+00152920: 726d 2064 6566 6175 6c74 7320 2020 203c rm defaults <\n+00152930: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..elementForm <\n+001529c0: 636f 6465 3e75 6e71 7561 6c69 6669 6564 code>unqualified\n+001529d0: 3c2f 636f 6465 3e20 2864 6566 6175 6c74 (default\n+001529e0: 2920 6f72 203c 636f 6465 3e71 7561 6c69 ) or quali\n+001529f0: 6669 6564 3c2f 636f 6465 3e20 6c6f 6361 fied loca\n+00152a00: 6c20 656c 656d 656e 7420 666f 726d 2064 l element form d\n+00152a10: 6566 6175 6c74 2020 2020 3c2f 7464 3e3c efault <\n+00152a20: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..a\n+00152a70: 7474 7269 6275 7465 466f 726d 3c2f 636f ttributeForm unqualified (default) \n+00152ad0: 6f72 203c 636f 6465 3e71 7561 6c69 6669 or qualifi\n+00152ae0: 6564 3c2f 636f 6465 3e20 6c6f 6361 6c20 ed local \n+00152af0: 6174 7472 6962 7574 6520 666f 726d 2064 attribute form d\n+00152b00: 6566 6175 6c74 2020 2020 3c2f 7464 3e3c efault <\n+00152b10: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..ty\n+00152b60: 7065 643c 2f63 6f64 653e 2020 203c 2f74 ped no (default) or\n+00152bb0: 203c 636f 6465 3e79 6573 3c2f 636f 6465 yes for serializer\n+00152bd0: 7320 746f 2061 6464 203c 636f 6465 3e78 s to add x\n+00152be0: 7369 3a74 7970 653c 2f63 6f64 653e 2061 si:type a\n+00152bf0: 7474 7269 6275 7465 7320 746f 2058 4d4c ttributes to XML\n+00152c00: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c2f ..

    The namespace2 URI is a p\n+00152c40: 6174 7465 726e 2077 6974 6820 3c63 6f64 attern with * match\n+00152c60: 696e 6720 616e 7920 7365 7175 656e 6365 ing any sequence\n+00152c70: 206f 6620 6368 6172 6163 7465 7273 2061 of characters a\n+00152c80: 6e64 203c 636f 6465 3e2d 3c2f 636f 6465 nd - matching any c\n+00152ca0: 6861 7261 6374 6572 2e20 5468 6973 2070 haracter. This p\n+00152cb0: 6174 7465 726e 2069 6e73 7472 7563 7473 attern instructs\n+00152cc0: 2074 6865 2058 4d4c 2070 6172 7365 7220 the XML parser \n+00152cd0: 616e 6420 7661 6c69 6461 746f 7220 746f and validator to\n+00152ce0: 2061 6c73 6f20 6163 6365 7074 2074 6865 also accept the\n+00152cf0: 2055 5249 2070 6174 7465 726e 2061 7320 URI pattern as \n+00152d00: 6120 7661 6c69 6420 6e61 6d65 7370 6163 a valid namespac\n+00152d10: 6520 666f 7220 7468 6520 7370 6563 6966 e for the specif\n+00152d20: 6965 6420 3c63 6f64 653e 266c 743b 7072 ied <pr\n+00152d30: 6566 6978 2667 743b 3c2f 636f 6465 3e2e efix>.\n+00152d40: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The typed p\n+00152d60: 726f 7065 7274 7920 6973 203c 636f 6465 roperty is no by de\n+00152d80: 6661 756c 7420 616e 6420 6361 6e20 6265 fault and can be\n+00152d90: 2063 6861 6e67 6564 2074 6f20 3c63 6f64 changed to yes wit\n+00152db0: 6820 3c62 3e3c 636f 6465 3e73 6f61 7063 h soapc\n+00152dc0: 7070 3220 2d74 3c2f 636f 6465 3e3c 2f62 pp2 -t option -t.\n+00152df0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+00152e10: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+00152e20: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+00152e30: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00152e40: 2069 643d 2264 6972 6563 7469 7665 732d id=\"directives-\n+00152e50: 3422 3e3c 2f61 3e0a 5363 6865 6d61 2074 4\">.Schema t\n+00152e60: 7970 6520 6469 7265 6374 6976 6573 3c2f ype directives.

    A schema \n+00152e80: 7479 7065 2064 6972 6563 7469 7665 2069 type directive i\n+00152e90: 7320 6f66 2074 6865 2066 6f72 6d3a 3c2f s of the form:.

    //gsoap <pre\n+00152ef0: 6669 7826 6774 3b20 7363 6865 6d61 2074 fix> schema t\n+00152f00: 7970 652d 266c 743b 7072 6f70 6572 7479 ype-<property\n+00152f10: 2667 743b 3a20 266c 743b 6e61 6d65 2667 >: <name&g\n+00152f20: 743b 2026 6c74 3b76 616c 7565 2667 743b t; <value>\n+00152f30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00152f50: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap &l\n+00152f70: 743b 7072 6566 6978 2667 743b 2073 6368 t;prefix> sch\n+00152f80: 656d 6120 7479 7065 2d26 6c74 3b70 726f ema type-<pro\n+00152f90: 7065 7274 7926 6774 3b3a 2026 6c74 3b6e perty>: <n\n+00152fa0: 616d 6526 6774 3b3a 3a26 6c74 3b6d 656d ame>::<mem\n+00152fb0: 6265 7226 6774 3b20 266c 743b 7661 6c75 ber> <valu\n+00152fc0: 6526 6774 3b3c 2f73 7061 6e3e 3c2f 6469 e>.

    whe\n+00152ff0: 7265 203c 636f 6465 3e26 6c74 3b70 7265 re <pre\n+00153000: 6669 7826 6774 3b3c 2f63 6f64 653e 2069 fix> i\n+00153010: 7320 7468 6520 584d 4c20 6e61 6d65 7370 s the XML namesp\n+00153020: 6163 6520 7072 6566 6978 206f 6620 6120 ace prefix of a \n+00153030: 7363 6865 6d61 2061 6e64 203c 636f 6465 schema and <name> is an unqua\n+00153060: 6c69 6669 6564 206e 616d 6520 6f66 2061 lified name of a\n+00153070: 2043 2f43 2b2b 2074 7970 652c 2061 6e64 C/C++ type, and\n+00153080: 2074 6865 206f 7074 696f 6e61 6c20 3c63 the optional <member&g\n+001530a0: 743b 3c2f 636f 6465 3e20 6973 2061 2063 t; is a c\n+001530b0: 6c61 7373 2f73 7472 7563 7420 6d65 6d62 lass/struct memb\n+001530c0: 6572 7320 6f72 2065 6e75 6d20 636f 6e73 ers or enum cons\n+001530d0: 7461 6e74 2e3c 2f70 3e0a 3c70 3e59 6f75 tant.

    .

    You\n+001530e0: 2063 616e 2064 6573 6372 6962 6520 6120 can describe a \n+001530f0: 7479 7065 2077 6974 6820 6f6e 6520 6f66 type with one of\n+00153100: 2074 6865 2066 6f6c 6c6f 7769 6e67 3a3c the following:<\n+00153110: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>..\n+00153150: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b ...<\n+001531e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001531f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00153200: 3e3c 636f 6465 3e74 7970 652d 646f 6375 >type-docu\n+00153210: 6d65 6e74 6174 696f 6e3c 2f63 6f64 653e mentation\n+00153220: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....

    For ex\n+00153350: 616d 706c 652c 2079 6f75 2063 616e 2061 ample, you can a\n+00153360: 6464 2061 2064 6573 6372 6970 7469 6f6e dd a description\n+00153370: 2074 6f20 616e 2065 6e75 6d65 7261 7469 to an enumerati\n+00153380: 6f6e 3a3c 2f70 3e0a 3c64 6976 2063 6c61 on:

    .
    \n+001533b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+001533d0: 2073 6368 656d 6120 7479 7065 3a20 566f schema type: Vo\n+001533e0: 7765 6c73 2054 6865 206c 6574 7465 7273 wels The letters\n+001533f0: 2041 2c20 452c 2049 2c20 4f2c 2055 2c20 A, E, I, O, U, \n+00153400: 616e 6420 736f 6d65 7469 6d65 7320 593c and sometimes Y<\n+00153410: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+00153430: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00153440: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+00153450: 7363 6865 6d61 2074 7970 653a 2056 6f77 schema type: Vow\n+00153460: 656c 733a 3a59 2041 2076 6f77 656c 2c20 els::Y A vowel, \n+00153470: 736f 6d65 7469 6d65 733c 2f73 7061 6e3e sometimes\n+00153480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
    e\n+001534b0: 6e75 6d20 636c 6173 733c 2f73 7061 6e3e num class\n+001534c0: 206e 735f 5f56 6f77 656c 7320 3a20 6368 ns__Vowels : ch\n+001534d0: 6172 207b 2041 203d 203c 7370 616e 2063 ar { A = 'A', E = 'E'\n+00153530: 3c2f 7370 616e 3e2c 2049 203d 203c 7370 , I = 'I\n+00153560: 393b 3c2f 7370 616e 3e2c 204f 203d 203c 9;, O = <\n+00153570: 7370 616e 2063 6c61 7373 3d22 6368 6172 span class=\"char\n+00153580: 6c69 7465 7261 6c22 3e26 2333 393b 4f26 literal\">'O&\n+00153590: 2333 393b 3c2f 7370 616e 3e2c 2055 203d #39;, U =\n+001535a0: 203c 7370 616e 2063 6c61 7373 3d22 6368 '\n+001535c0: 5526 2333 393b 3c2f 7370 616e 3e2c 2059 U', Y\n+001535d0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = \n+001535f0: 393b 5926 2333 393b 3c2f 7370 616e 3e20 9;Y' \n+00153600: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .<\n+00153610: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00153620: 3c70 3e54 6869 7320 646f 6375 6d65 6e74

    This document\n+00153630: 6564 2065 6e75 6d65 7261 7469 6f6e 206d ed enumeration m\n+00153640: 6170 7320 746f 2061 2073 696d 706c 6554 aps to a simpleT\n+00153650: 7970 6520 7265 7374 7269 6374 696f 6e20 ype restriction \n+00153660: 6f66 203c 656d 3e3c 636f 6465 3e78 7364 of xsd\n+00153670: 3a73 7472 696e 673c 2f63 6f64 653e 3c2f :string in the soapc\n+00153690: 7070 322d 6765 6e65 7261 7465 6420 7363 pp2-generated sc\n+001536a0: 6865 6d61 3a3c 2f70 3e0a 3c64 6976 2063 hema:

    .
    <simpleType name="Vowels&q\n+00153760: 756f 743b 3c2f 7370 616e 3e26 6774 3b3c uot;><\n+00153770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <annotati\n+001537b0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 2f64 on>.
    <document\n+00153800: 6174 696f 6e3c 2f73 7061 6e3e 2667 743b ation>\n+00153810: 3c73 7061 6e20 636c 6173 733d 226b 6579 The\n+00153830: 203c 7370 616e 2063 6c61 7373 3d22 6b65 letters A, E, I, O, U, and<\n+00153910: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> som\n+00153930: 6574 696d 6573 3c2f 7370 616e 3e20 3c73 etimes Y<\n+00153960: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /docum\n+00153980: 656e 7461 7469 6f6e 3c2f 7370 616e 3e26 entation&\n+00153990: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    &l\n+001539b0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ann\n+001539d0: 6f74 6174 696f 6e3c 2f73 7061 6e3e 2667 otation&g\n+001539e0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    <\n+00153a00: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;restr\n+00153a20: 6963 7469 6f6e 3c2f 7370 616e 3e20 3c73 iction base=\n+00153a50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00153a70: 743b 7873 643a 7374 7269 6e67 2671 756f t;xsd:string&quo\n+00153a80: 743b 3c2f 7370 616e 3e26 6774 3b3c 2f64 t;>.
    <enumerat\n+00153ad0: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion value="\n+00153b20: 4126 7175 6f74 3b3c 2f73 7061 6e3e 2f26 A"/&\n+00153b30: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n+00153b50: 266c 743b 3c73 7061 6e20 636c 6173 733d <en\n+00153b70: 756d 6572 6174 696f 6e3c 2f73 7061 6e3e umeration\n+00153b80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value=\n+00153bc0: 2671 756f 743b 4526 7175 6f74 3b3c 2f73 "E"/>
    .\n+00153be0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <enumeration<\n+00153c20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val\n+00153c40: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="I&qu\n+00153c70: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n+00153c80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00153ca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 enumer\n+00153cc0: 6174 696f 6e3c 2f73 7061 6e3e 203c 7370 ation value=\n+00153cf0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00153d10: 743b 4f26 7175 6f74 3b3c 2f73 7061 6e3e t;O"\n+00153d20: 2f26 6774 3b3c 2f64 6976 3e0a 3c64 6976 />
    . \n+00153d40: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+00153d60: 656e 756d 6572 6174 696f 6e3c 2f73 7061 enumeration value="U"<\n+00153dc0: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>.
    <enumeratio\n+00153e10: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n v\n+00153e30: 616c 7565 3c2f 7370 616e 3e3d 3c73 7061 alue="Y&\n+00153e60: 7175 6f74 3b3c 2f73 7061 6e3e 2667 743b quot;>\n+00153e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    &\n+00153e90: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ann\n+00153eb0: 6f74 6174 696f 6e3c 2f73 7061 6e3e 2667 otation&g\n+00153ec0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    \n+00153ee0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <documentation>A\n+00153f30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c vo\n+00153f50: 7765 6c3c 2f73 7061 6e3e 2c20 3c73 7061 wel, sometimes</documentation>
    .\n+00153fc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </annotatio\n+00154000: 6e3c 2f73 7061 6e3e 2667 743b 3c2f 6469 n>.
    <enumerati\n+00154050: 6f6e 3c2f 7370 616e 3e2f 2667 743b 3c2f on/>.
    </restrict\n+001540a0: 696f 6e3c 2f73 7061 6e3e 2667 743b 3c2f ion>.
    </simpleType\n+001540f0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    \n+00154120: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n+00154140: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .\n+00154180: 4578 616d 706c 653c 2f68 333e 0a3c 703e Example

    .

    \n+00154190: 5468 6520 7573 6520 6f66 2064 6972 6563 The use of direc\n+001541a0: 7469 7665 7320 6973 2062 6573 7420 696c tives is best il\n+001541b0: 6c75 7374 7261 7465 6420 7769 7468 2061 lustrated with a\n+001541c0: 6e20 6578 616d 706c 652e 2054 6865 2065 n example. The e\n+001541d0: 7861 6d70 6c65 2075 7365 7320 6120 6879 xample uses a hy\n+001541e0: 706f 7468 6574 6963 616c 2073 746f 636b pothetical stock\n+001541f0: 2071 756f 7465 2073 6572 7669 6365 2061 quote service a\n+00154200: 6e64 2065 7863 6861 6e67 6520 7261 7465 nd exchange rate\n+00154210: 2073 6572 7669 6365 2c20 6163 7475 616c service, actual\n+00154220: 2073 6572 7669 6365 7320 7375 6368 2061 services such a\n+00154230: 7320 7468 6573 6520 6172 6520 6176 6169 s these are avai\n+00154240: 6c61 626c 6520 666f 7220 6672 6565 206f lable for free o\n+00154250: 6e20 7468 6520 7765 622e 3c2f 703e 0a3c n the web.

    .<\n+00154260: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00154270: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    //g\n+001542a0: 736f 6170 206e 7331 2073 6572 7669 6365 soap ns1 service\n+001542b0: 206e 616d 6573 7061 6365 3a20 2075 726e namespace: urn\n+001542c0: 3a47 6574 5175 6f74 6520 3c2f 7370 616e :GetQuote
    .
    int n\n+00154310: 7331 5f5f 6765 7451 756f 7465 283c 7370 s1__getQuote(char *symbol, float &result);\n+00154380: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .//gsoap ns2 \n-001543f0: 7365 7276 6963 6520 6e61 6d65 7370 6163 service namespac\n-00154400: 653a 2020 7572 6e3a 4375 7272 656e 6379 e: urn:Currency\n-00154410: 4578 6368 616e 6765 203c 2f73 7061 6e3e Exchange \n-00154420: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n-00154460: 325f 5f67 6574 5261 7465 283c 7370 616e 2__getRate(char\n-00154490: 202a 636f 756e 7472 7931 2c20 3c73 7061 *country1, char *country2, float &result)\n-00154500: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .
    //gso\n-00154550: 6170 206e 7333 2073 6572 7669 6365 206e ap ns3 service n\n-00154560: 616d 653a 2020 2020 2020 2071 756f 7465 ame: quote\n-00154570: 7820 3c2f 7370 616e 3e3c 2f64 6976 3e0a x
    .\n-00154580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-001545b0: 6e73 3320 7365 7276 6963 6520 7374 796c ns3 service styl\n-001545c0: 653a 2020 2020 2020 7270 6320 3c2f 7370 e: rpc
    .
    //gsoap ns3 se\n-00154610: 7276 6963 6520 656e 636f 6469 6e67 3a20 rvice encoding: \n-00154620: 2020 656e 636f 6465 6420 3c2f 7370 616e encoded
    .
    \n-00154660: 2f2f 6773 6f61 7020 6e73 3320 7365 7276 //gsoap ns3 serv\n-00154670: 6963 6520 706f 7274 3a20 2020 2020 2020 ice port: \n-00154680: 6874 7470 3a2f 2f77 7777 2e6d 7964 6f6d http://www.mydom\n-00154690: 6169 6e2e 636f 6d2f 7175 6f74 6578 2e63 ain.com/quotex.c\n-001546a0: 6769 203c 2f73 7061 6e3e 3c2f 6469 763e gi
    \n-001546b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-001546e0: 206e 7333 2073 6572 7669 6365 206e 616d ns3 service nam\n-001546f0: 6573 7061 6365 3a20 2075 726e 3a71 756f espace: urn:quo\n-00154700: 7465 7820 3c2f 7370 616e 3e3c 2f64 6976 tex .
    in\n-00154740: 743c 2f73 7061 6e3e 206e 7333 5f5f 6765 t ns3__ge\n-00154750: 7451 756f 7465 283c 7370 616e 2063 6c61 tQuote(char *sy\n-00154780: 6d62 6f6c 2c20 3c73 7061 6e20 636c 6173 mbol, \n-001547a0: 6368 6172 3c2f 7370 616e 3e20 2a63 6f75 char *cou\n-001547b0: 6e74 7279 2c20 3c73 7061 6e20 636c 6173 ntry, \n-001547d0: 666c 6f61 743c 2f73 7061 6e3e 2026 616d float &am\n-001547e0: 703b 7265 7375 6c74 293b 3c2f 6469 763e p;result);
    \n-001547f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The <\n-00154810: 656d 3e3c 636f 6465 3e71 756f 7465 782e em>quotex.\n-00154820: 683c 2f63 6f64 653e 3c2f 656d 3e20 6578 h ex\n-00154830: 616d 706c 6520 6973 2061 206e 6577 2057 ample is a new W\n-00154840: 6562 2053 6572 7669 6365 2063 7265 6174 eb Service creat\n-00154850: 6564 2062 7920 636f 6d62 696e 696e 6720 ed by combining \n-00154860: 7477 6f20 6578 6973 7469 6e67 2057 6562 two existing Web\n-00154870: 2053 6572 7669 6365 733a 2061 2053 746f Services: a Sto\n-00154880: 636b 2051 756f 7465 2073 6572 7669 6365 ck Quote service\n-00154890: 2061 6e64 2061 2043 7572 7265 6e63 7920 and a Currency \n-001548a0: 4578 6368 616e 6765 2073 6572 7669 6365 Exchange service\n-001548b0: 2e3c 2f70 3e0a 3c70 3e54 6865 206e 616d .

    .

    The nam\n-001548c0: 6573 7061 6365 2070 7265 6669 7820 3c63 espace prefix ns3 i\n-001548e0: 7320 7573 6564 2066 6f72 2074 6865 206e s used for the n\n-001548f0: 6577 203c 636f 6465 3e71 756f 7465 783c ew quotex<\n-00154900: 2f63 6f64 653e 2057 6562 2053 6572 7669 /code> Web Servi\n-00154910: 6365 2077 6974 6820 6e61 6d65 7370 6163 ce with namespac\n-00154920: 6520 5552 4920 3c65 6d3e 3c63 6f64 653e e URI \n-00154930: 7572 6e3a 7175 6f74 6578 3c2f 636f 6465 urn:quotex, service \n-00154950: 6e61 6d65 203c 636f 6465 3e71 756f 7465 name quote\n-00154960: 783c 2f63 6f64 653e 2c20 616e 6420 656e x, and en\n-00154970: 6470 6f69 6e74 2070 6f72 7420 3c65 6d3e dpoint port \n-00154980: 3c63 6f64 653e 3c61 2068 7265 663d 2268 http://www.my\n-001549c0: 646f 6d61 696e 2e63 6f6d 2f71 756f 7465 domain.com/quote\n-001549d0: 782e 6367 693c 2f61 3e3c 2f63 6f64 653e x.cgi\n-001549e0: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e 5369 .

    .

    Si\n-001549f0: 6e63 6520 7468 6520 6e65 7720 5765 6220 nce the new Web \n-00154a00: 5365 7276 6963 6520 696e 766f 6b65 7320 Service invokes \n-00154a10: 7468 6520 3c63 6f64 653e 6e73 315f 5f67 the ns1__g\n-00154a20: 6574 5175 6f74 653c 2f63 6f64 653e 2061 etQuote a\n-00154a30: 6e64 203c 636f 6465 3e6e 7332 5f5f 6765 nd ns2__ge\n-00154a40: 7452 6174 653c 2f63 6f64 653e 2073 6572 tRate ser\n-00154a50: 7669 6365 206f 7065 7261 7469 6f6e 732c vice operations,\n-00154a60: 2074 6865 2073 6572 7669 6365 206e 616d the service nam\n-00154a70: 6573 7061 6365 7320 616e 6420 6f74 6865 espaces and othe\n-00154a80: 7220 6465 7461 696c 7320 7375 6368 2061 r details such a\n-00154a90: 7320 7374 796c 6520 616e 6420 656e 636f s style and enco\n-00154aa0: 6469 6e67 206f 6620 7468 6573 6520 6d65 ding of these me\n-00154ab0: 7468 6f64 7320 6172 6520 6769 7665 6e20 thods are given \n-00154ac0: 6279 2064 6972 6563 7469 7665 732e 2041 by directives. A\n-00154ad0: 6674 6572 2069 6e76 6f6b 696e 6720 7468 fter invoking th\n-00154ae0: 6520 736f 6170 6370 7032 2074 6f6f 6c20 e soapcpp2 tool \n-00154af0: 6f6e 2074 6865 203c 656d 3e3c 636f 6465 on the quotex.h\n-00154b10: 3c2f 656d 3e20 6865 6164 6572 2066 696c header fil\n-00154b20: 653a 203c 2f70 3e3c 7072 6520 636c 6173 e:

     so\n-00154b40: 6170 6370 7032 2071 756f 7465 782e 680a  apcpp2 quotex.h.\n-00154b50: 3c2f 7072 653e 3c70 3e20 7468 6520 5753  

    the WS\n-00154b60: 444c 206f 6620 7468 6520 6e65 7720 3c63 DL of the new quotex Web Service is\n-00154b90: 2073 6176 6564 2061 7320 3c65 6d3e 3c63 saved as quotex.wsdl<\n-00154bb0: 2f63 6f64 653e 3c2f 656d 3e2e 2053 696e /code>. Sin\n-00154bc0: 6365 2074 6865 2073 6572 7669 6365 206e ce the service n\n-00154bd0: 616d 652c 2065 6e64 706f 696e 7420 706f ame, endpoint po\n-00154be0: 7274 2c20 616e 6420 6e61 6d65 7370 6163 rt, and namespac\n-00154bf0: 6520 5552 4920 7765 7265 2070 726f 7669 e URI were provi\n-00154c00: 6465 6420 696e 2074 6865 2068 6561 6465 ded in the heade\n-00154c10: 7220 6669 6c65 2c20 7468 6520 6765 6e65 r file, the gene\n-00154c20: 7261 7465 6420 5753 444c 2066 696c 6520 rated WSDL file \n-00154c30: 6361 6e20 6265 2070 7562 6c69 7368 6564 can be published\n-00154c40: 2074 6f67 6574 6865 7220 7769 7468 2074 together with t\n-00154c50: 6865 2063 6f6d 7069 6c65 6420 5765 6220 he compiled Web \n-00154c60: 5365 7276 6963 6520 696e 7374 616c 6c65 Service installe\n-00154c70: 6420 6173 2061 2043 4749 2061 7070 6c69 d as a CGI appli\n-00154c80: 6361 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 cation.

    .

    T\n-00154c90: 6865 206e 616d 6573 7061 6365 206d 6170 he namespace map\n-00154ca0: 7069 6e67 2074 6162 6c65 2066 6f72 2074 ping table for t\n-00154cb0: 6865 203c 656d 3e3c 636f 6465 3e71 756f he quo\n-00154cc0: 7465 782e 6370 703c 2f63 6f64 653e 3c2f tex.cpp Web Service \n-00154ce0: 696d 706c 656d 656e 7461 7469 6f6e 2069 implementation i\n-00154cf0: 7320 7361 7665 6420 6173 203c 656d 3e3c s saved as <\n-00154d00: 636f 6465 3e71 756f 7465 782e 6e73 6d61 code>quotex.nsma\n-00154d10: 703c 2f63 6f64 653e 3c2f 656d 3e2e 2054 p. T\n-00154d20: 6869 7320 6669 6c65 2063 616e 2062 6520 his file can be \n-00154d30: 6469 7265 6374 6c79 2069 6e63 6c75 6465 directly include\n-00154d40: 6420 696e 203c 656d 3e3c 636f 6465 3e71 d in q\n-00154d50: 756f 7465 782e 6370 703c 2f63 6f64 653e uotex.cpp\n-00154d60: 3c2f 656d 3e20 696e 7374 6561 6420 6f66 instead of\n-00154d70: 2073 7065 6369 6669 6564 2062 7920 6861 specified by ha\n-00154d80: 6e64 2069 6e20 7468 6520 736f 7572 6365 nd in the source\n-00154d90: 206f 6620 3c65 6d3e 3c63 6f64 653e 7175 of qu\n-00154da0: 6f74 6578 2e63 7070 3c2f 636f 6465 3e3c otex.cpp<\n-00154db0: 2f65 6d3e 2e3c 2f70 3e0a 3c70 3ef0 9f94 /em>.

    .

    ...\n-00154dc0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n-00154dd0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n-00154de0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n-00154df0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Transi\n-00154e20: 656e 7420 6461 7461 2074 7970 6573 3c2f ent data types.

    There are\n-00154e40: 2073 6974 7561 7469 6f6e 7320 7768 656e situations when\n-00154e50: 2063 6572 7461 696e 2074 7970 6573 2068 certain types h\n-00154e60: 6176 6520 746f 2062 6520 7573 6564 2069 ave to be used i\n-00154e70: 6e20 616e 2069 6e74 6572 6661 6365 2068 n an interface h\n-00154e80: 6561 6465 7220 6669 6c65 2c20 6275 7420 eader file, but \n-00154e90: 7468 6520 7479 7065 7320 6172 6520 6e6f the types are no\n-00154ea0: 7420 7365 7269 616c 697a 6162 6c65 2061 t serializable a\n-00154eb0: 6e64 2074 6865 7265 666f 7265 2068 6176 nd therefore hav\n-00154ec0: 6520 746f 2062 6520 2269 6e76 6973 6962 e to be \"invisib\n-00154ed0: 6c65 2220 746f 2074 6865 2073 6f61 7063 le\" to the soapc\n-00154ee0: 7070 3220 746f 6f6c 2e20 5468 6573 6520 pp2 tool. These \n-00154ef0: 7479 7065 7320 6172 6520 6361 6c6c 6564 types are called\n-00154f00: 2074 7261 6e73 6965 6e74 2e3c 2f70 3e0a transient.

    .\n-00154f10: 3c70 3e54 6869 7320 6665 6174 7572 6520

    This feature \n-00154f20: 6973 2075 7365 6675 6c20 7768 656e 2061 is useful when a\n-00154f30: 206c 6962 7261 7279 2074 7970 6520 6973 library type is\n-00154f40: 2075 7365 6420 696e 2074 6865 2069 6e74 used in the int\n-00154f50: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n-00154f60: 6c65 2061 7320 7061 7274 206f 6620 6120 le as part of a \n-00154f70: 7374 7275 6374 206f 7220 636c 6173 732c struct or class,\n-00154f80: 2066 6f72 2065 7861 6d70 6c65 2074 6865 for example the\n-00154f90: 203c 636f 6465 3e46 494c 453c 2f63 6f64 FILE type or std::ostream that are cl\n-00154fd0: 6561 726c 7920 6e6f 7420 7365 7269 616c early not serial\n-00154fe0: 697a 6162 6c65 2e20 4966 2074 6865 7365 izable. If these\n-00154ff0: 2074 7970 6573 2061 7265 2069 6e74 726f types are intro\n-00155000: 6475 6365 6420 696e 2061 6e20 696e 7465 duced in an inte\n-00155010: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-00155020: 6520 7468 656e 2074 6865 7365 2074 7970 e then these typ\n-00155030: 6573 206d 7573 7420 6265 2064 6563 6c61 es must be decla\n-00155040: 7265 6420 7472 616e 7369 656e 742e 204f red transient. O\n-00155050: 7468 6572 7769 7365 2c20 736f 6170 6370 therwise, soapcp\n-00155060: 7032 2077 696c 6c20 7468 726f 7720 616e p2 will throw an\n-00155070: 2065 7272 6f72 2e3c 2f70 3e0a 3c70 3e54 error.

    .

    T\n-00155080: 6f20 6465 636c 6172 6520 6120 7472 616e o declare a tran\n-00155090: 7369 656e 7420 7479 7065 2075 7365 203c sient type use <\n-001550a0: 636f 6465 3e65 7874 6572 6e3c 2f63 6f64 code>extern. For example:\n-001550c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    extern\n-00155110: 203c 7370 616e 2063 6c61 7373 3d22 6b65 class FILE;
    .\n-00155140: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Even t\n-00155160: 686f 7567 6820 3c63 6f64 653e 4649 4c45 hough FILE\n-00155170: 3c2f 636f 6465 3e20 6973 206e 6f74 2061 is not a\n-00155180: 2063 6c61 7373 2c20 7468 6973 2064 6563 class, this dec\n-00155190: 6c61 7261 7469 6f6e 206d 6572 656c 7920 laration merely \n-001551a0: 696e 7472 6f64 7563 6573 2074 6865 203c introduces the <\n-001551b0: 636f 6465 3e46 494c 453c 2f63 6f64 653e code>FILE\n-001551c0: 2074 7970 6520 6e61 6d65 2077 6974 686f type name witho\n-001551d0: 7574 2073 7065 6369 6679 696e 6720 6974 ut specifying it\n-001551e0: 7320 6465 7461 696c 732e 3c2f 703e 0a3c s details.

    .<\n-001551f0: 703e 496e 2043 2077 6520 6361 6e20 7374 p>In C we can st\n-00155200: 696c 6c20 7573 6520 7468 6520 636c 6173 ill use the clas\n-00155210: 7320 6b65 7977 6f72 642c 2062 6563 6175 s keyword, becau\n-00155220: 7365 206e 6f20 636f 6465 2069 7320 6765 se no code is ge\n-00155230: 6e65 7261 7465 6420 6279 2073 6f61 7063 nerated by soapc\n-00155240: 7070 3220 666f 7220 7468 6973 2074 7261 pp2 for this tra\n-00155250: 6e73 6965 6e74 2074 7970 652e 3c2f 703e nsient type.

    \n-00155260: 0a3c 703e 5765 2063 616e 2074 6865 6e20 .

    We can then \n-00155270: 7573 6520 7468 6973 2074 7970 6520 656c use this type el\n-00155280: 7365 7768 6572 652c 2066 6f72 2065 7861 sewhere, for exa\n-00155290: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    \n-001552b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-001552e0: 2f73 7061 6e3e 6e73 5f5f 7265 636f 7264 /span>ns__record\n+001543b0: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne\">//gsoa\n+001543d0: 7020 6e73 3220 7365 7276 6963 6520 6e61 p ns2 service na\n+001543e0: 6d65 7370 6163 653a 2020 7572 6e3a 4375 mespace: urn:Cu\n+001543f0: 7272 656e 6379 4578 6368 616e 6765 203c rrencyExchange <\n+00154400: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+00154420: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00154430: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns2__getRate\n+00154450: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n+00154470: 2f73 7061 6e3e 202a 636f 756e 7472 7931 /span> *country1\n+00154480: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n+001544a0: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country\n+001544b0: 322c 203c 7370 616e 2063 6c61 7373 3d22 2, flo\n+001544d0: 6174 3c2f 7370 616e 3e20 2661 6d70 3b72 at &r\n+001544e0: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .<\n+001544f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00154500: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >

    .
    //gsoap ns3 ser\n+00154540: 7669 6365 206e 616d 653a 2020 2020 2020 vice name: \n+00154550: 2071 756f 7465 7820 3c2f 7370 616e 3e3c quotex <\n+00154560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+00154590: 6773 6f61 7020 6e73 3320 7365 7276 6963 gsoap ns3 servic\n+001545a0: 6520 7374 796c 653a 2020 2020 2020 7270 e style: rp\n+001545b0: 6320 3c2f 7370 616e 3e3c 2f64 6976 3e0a c
    .\n+001545c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+001545f0: 6e73 3320 7365 7276 6963 6520 656e 636f ns3 service enco\n+00154600: 6469 6e67 3a20 2020 656e 636f 6465 6420 ding: encoded \n+00154610: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00154630: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+00154650: 3320 7365 7276 6963 6520 706f 7274 3a20 3 service port: \n+00154660: 2020 2020 2020 6874 7470 3a2f 2f77 7777 http://www\n+00154670: 2e6d 7964 6f6d 6169 6e2e 636f 6d2f 7175 .mydomain.com/qu\n+00154680: 6f74 6578 2e63 6769 203c 2f73 7061 6e3e otex.cgi \n+00154690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001546c0: 2f67 736f 6170 206e 7333 2073 6572 7669 /gsoap ns3 servi\n+001546d0: 6365 206e 616d 6573 7061 6365 3a20 2075 ce namespace: u\n+001546e0: 726e 3a71 756f 7465 7820 3c2f 7370 616e rn:quotex
    .
    int n\n+00154730: 7333 5f5f 6765 7451 756f 7465 283c 7370 s3__getQuote(char *symbol, char *country, float &result);\n+001547d0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The q\n+00154800: 756f 7465 782e 683c 2f63 6f64 653e 3c2f uotex.h example is a\n+00154820: 206e 6577 2057 6562 2053 6572 7669 6365 new Web Service\n+00154830: 2063 7265 6174 6564 2062 7920 636f 6d62 created by comb\n+00154840: 696e 696e 6720 7477 6f20 6578 6973 7469 ining two existi\n+00154850: 6e67 2057 6562 2053 6572 7669 6365 733a ng Web Services:\n+00154860: 2061 2053 746f 636b 2051 756f 7465 2073 a Stock Quote s\n+00154870: 6572 7669 6365 2061 6e64 2061 2043 7572 ervice and a Cur\n+00154880: 7265 6e63 7920 4578 6368 616e 6765 2073 rency Exchange s\n+00154890: 6572 7669 6365 2e3c 2f70 3e0a 3c70 3e54 ervice.

    .

    T\n+001548a0: 6865 206e 616d 6573 7061 6365 2070 7265 he namespace pre\n+001548b0: 6669 7820 3c63 6f64 653e 6e73 333c 2f63 fix ns3 is used for\n+001548d0: 2074 6865 206e 6577 203c 636f 6465 3e71 the new q\n+001548e0: 756f 7465 783c 2f63 6f64 653e 2057 6562 uotex Web\n+001548f0: 2053 6572 7669 6365 2077 6974 6820 6e61 Service with na\n+00154900: 6d65 7370 6163 6520 5552 4920 3c65 6d3e mespace URI \n+00154910: 3c63 6f64 653e 7572 6e3a 7175 6f74 6578 urn:quotex\n+00154920: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 7365 , se\n+00154930: 7276 6963 6520 6e61 6d65 203c 636f 6465 rvice name quotex, \n+00154950: 616e 6420 656e 6470 6f69 6e74 2070 6f72 and endpoint por\n+00154960: 7420 3c65 6d3e 3c63 6f64 653e 3c61 2068 t http://\n+001549a0: 7777 772e 6d79 646f 6d61 696e 2e63 6f6d www.mydomain.com\n+001549b0: 2f71 756f 7465 782e 6367 693c 2f61 3e3c /quotex.cgi<\n+001549c0: 2f63 6f64 653e 3c2f 656d 3e2e 3c2f 703e /code>.

    \n+001549d0: 0a3c 703e 5369 6e63 6520 7468 6520 6e65 .

    Since the ne\n+001549e0: 7720 5765 6220 5365 7276 6963 6520 696e w Web Service in\n+001549f0: 766f 6b65 7320 7468 6520 3c63 6f64 653e vokes the \n+00154a00: 6e73 315f 5f67 6574 5175 6f74 653c 2f63 ns1__getQuote and n\n+00154a20: 7332 5f5f 6765 7452 6174 653c 2f63 6f64 s2__getRate service opera\n+00154a40: 7469 6f6e 732c 2074 6865 2073 6572 7669 tions, the servi\n+00154a50: 6365 206e 616d 6573 7061 6365 7320 616e ce namespaces an\n+00154a60: 6420 6f74 6865 7220 6465 7461 696c 7320 d other details \n+00154a70: 7375 6368 2061 7320 7374 796c 6520 616e such as style an\n+00154a80: 6420 656e 636f 6469 6e67 206f 6620 7468 d encoding of th\n+00154a90: 6573 6520 6d65 7468 6f64 7320 6172 6520 ese methods are \n+00154aa0: 6769 7665 6e20 6279 2064 6972 6563 7469 given by directi\n+00154ab0: 7665 732e 2041 6674 6572 2069 6e76 6f6b ves. After invok\n+00154ac0: 696e 6720 7468 6520 736f 6170 6370 7032 ing the soapcpp2\n+00154ad0: 2074 6f6f 6c20 6f6e 2074 6865 203c 656d tool on the quotex.h<\n+00154af0: 2f63 6f64 653e 3c2f 656d 3e20 6865 6164 /code> head\n+00154b00: 6572 2066 696c 653a 203c 2f70 3e3c 7072 er file:

    soapcpp2 quo\n+00154b30: 7465 782e 680a 3c2f 7072 653e 3c70 3e20 tex.h.

    \n+00154b40: 7468 6520 5753 444c 206f 6620 7468 6520 the WSDL of the \n+00154b50: 6e65 7720 3c63 6f64 653e 7175 6f74 6578 new quotex\n+00154b60: 3c2f 636f 6465 3e20 5765 6220 5365 7276 Web Serv\n+00154b70: 6963 6520 6973 2073 6176 6564 2061 7320 ice is saved as \n+00154b80: 3c65 6d3e 3c63 6f64 653e 7175 6f74 6578 quotex\n+00154b90: 2e77 7364 6c3c 2f63 6f64 653e 3c2f 656d .wsdl. Since the ser\n+00154bb0: 7669 6365 206e 616d 652c 2065 6e64 706f vice name, endpo\n+00154bc0: 696e 7420 706f 7274 2c20 616e 6420 6e61 int port, and na\n+00154bd0: 6d65 7370 6163 6520 5552 4920 7765 7265 mespace URI were\n+00154be0: 2070 726f 7669 6465 6420 696e 2074 6865 provided in the\n+00154bf0: 2068 6561 6465 7220 6669 6c65 2c20 7468 header file, th\n+00154c00: 6520 6765 6e65 7261 7465 6420 5753 444c e generated WSDL\n+00154c10: 2066 696c 6520 6361 6e20 6265 2070 7562 file can be pub\n+00154c20: 6c69 7368 6564 2074 6f67 6574 6865 7220 lished together \n+00154c30: 7769 7468 2074 6865 2063 6f6d 7069 6c65 with the compile\n+00154c40: 6420 5765 6220 5365 7276 6963 6520 696e d Web Service in\n+00154c50: 7374 616c 6c65 6420 6173 2061 2043 4749 stalled as a CGI\n+00154c60: 2061 7070 6c69 6361 7469 6f6e 2e3c 2f70 application..

    The namespa\n+00154c80: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table\n+00154c90: 2066 6f72 2074 6865 203c 656d 3e3c 636f for the quotex.cpp Web Se\n+00154cc0: 7276 6963 6520 696d 706c 656d 656e 7461 rvice implementa\n+00154cd0: 7469 6f6e 2069 7320 7361 7665 6420 6173 tion is saved as\n+00154ce0: 203c 656d 3e3c 636f 6465 3e71 756f 7465 quote\n+00154cf0: 782e 6e73 6d61 703c 2f63 6f64 653e 3c2f x.nsmap. This file c\n+00154d10: 616e 2062 6520 6469 7265 6374 6c79 2069 an be directly i\n+00154d20: 6e63 6c75 6465 6420 696e 203c 656d 3e3c ncluded in <\n+00154d30: 636f 6465 3e71 756f 7465 782e 6370 703c code>quotex.cpp<\n+00154d40: 2f63 6f64 653e 3c2f 656d 3e20 696e 7374 /code> inst\n+00154d50: 6561 6420 6f66 2073 7065 6369 6669 6564 ead of specified\n+00154d60: 2062 7920 6861 6e64 2069 6e20 7468 6520 by hand in the \n+00154d70: 736f 7572 6365 206f 6620 3c65 6d3e 3c63 source of quotex.cpp.

    .\n+00154da0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n+00154dc0: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .\n+00154e00: 5472 616e 7369 656e 7420 6461 7461 2074 Transient data t\n+00154e10: 7970 6573 3c2f 6832 3e0a 3c70 3e54 6865 ypes

    .

    The\n+00154e20: 7265 2061 7265 2073 6974 7561 7469 6f6e re are situation\n+00154e30: 7320 7768 656e 2063 6572 7461 696e 2074 s when certain t\n+00154e40: 7970 6573 2068 6176 6520 746f 2062 6520 ypes have to be \n+00154e50: 7573 6564 2069 6e20 616e 2069 6e74 6572 used in an inter\n+00154e60: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n+00154e70: 2c20 6275 7420 7468 6520 7479 7065 7320 , but the types \n+00154e80: 6172 6520 6e6f 7420 7365 7269 616c 697a are not serializ\n+00154e90: 6162 6c65 2061 6e64 2074 6865 7265 666f able and therefo\n+00154ea0: 7265 2068 6176 6520 746f 2062 6520 2269 re have to be \"i\n+00154eb0: 6e76 6973 6962 6c65 2220 746f 2074 6865 nvisible\" to the\n+00154ec0: 2073 6f61 7063 7070 3220 746f 6f6c 2e20 soapcpp2 tool. \n+00154ed0: 5468 6573 6520 7479 7065 7320 6172 6520 These types are \n+00154ee0: 6361 6c6c 6564 2074 7261 6e73 6965 6e74 called transient\n+00154ef0: 2e3c 2f70 3e0a 3c70 3e54 6869 7320 6665 .

    .

    This fe\n+00154f00: 6174 7572 6520 6973 2075 7365 6675 6c20 ature is useful \n+00154f10: 7768 656e 2061 206c 6962 7261 7279 2074 when a library t\n+00154f20: 7970 6520 6973 2075 7365 6420 696e 2074 ype is used in t\n+00154f30: 6865 2069 6e74 6572 6661 6365 2068 6561 he interface hea\n+00154f40: 6465 7220 6669 6c65 2061 7320 7061 7274 der file as part\n+00154f50: 206f 6620 6120 7374 7275 6374 206f 7220 of a struct or \n+00154f60: 636c 6173 732c 2066 6f72 2065 7861 6d70 class, for examp\n+00154f70: 6c65 2074 6865 203c 636f 6465 3e46 494c le the FIL\n+00154f80: 453c 2f63 6f64 653e 2074 7970 6520 6f72 E type or\n+00154f90: 203c 636f 6465 3e73 7464 3a3a 6f73 7472 std::ostr\n+00154fa0: 6561 6d3c 2f63 6f64 653e 2074 6861 7420 eam that \n+00154fb0: 6172 6520 636c 6561 726c 7920 6e6f 7420 are clearly not \n+00154fc0: 7365 7269 616c 697a 6162 6c65 2e20 4966 serializable. If\n+00154fd0: 2074 6865 7365 2074 7970 6573 2061 7265 these types are\n+00154fe0: 2069 6e74 726f 6475 6365 6420 696e 2061 introduced in a\n+00154ff0: 6e20 696e 7465 7266 6163 6520 6865 6164 n interface head\n+00155000: 6572 2066 696c 6520 7468 656e 2074 6865 er file then the\n+00155010: 7365 2074 7970 6573 206d 7573 7420 6265 se types must be\n+00155020: 2064 6563 6c61 7265 6420 7472 616e 7369 declared transi\n+00155030: 656e 742e 204f 7468 6572 7769 7365 2c20 ent. Otherwise, \n+00155040: 736f 6170 6370 7032 2077 696c 6c20 7468 soapcpp2 will th\n+00155050: 726f 7720 616e 2065 7272 6f72 2e3c 2f70 row an error..

    To declare \n+00155070: 6120 7472 616e 7369 656e 7420 7479 7065 a transient type\n+00155080: 2075 7365 203c 636f 6465 3e65 7874 6572 use exter\n+00155090: 6e3c 2f63 6f64 653e 2e20 466f 7220 6578 n. For ex\n+001550a0: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    extern<\n+001550f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> cla\n+00155110: 7373 203c 2f73 7061 6e3e 4649 4c45 3b3c ss FILE;<\n+00155120: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00155140: 4576 656e 2074 686f 7567 6820 3c63 6f64 Even though FILE is\n+00155160: 206e 6f74 2061 2063 6c61 7373 2c20 7468 not a class, th\n+00155170: 6973 2064 6563 6c61 7261 7469 6f6e 206d is declaration m\n+00155180: 6572 656c 7920 696e 7472 6f64 7563 6573 erely introduces\n+00155190: 2074 6865 203c 636f 6465 3e46 494c 453c the FILE<\n+001551a0: 2f63 6f64 653e 2074 7970 6520 6e61 6d65 /code> type name\n+001551b0: 2077 6974 686f 7574 2073 7065 6369 6679 without specify\n+001551c0: 696e 6720 6974 7320 6465 7461 696c 732e ing its details.\n+001551d0: 3c2f 703e 0a3c 703e 496e 2043 2077 6520

    .

    In C we \n+001551e0: 6361 6e20 7374 696c 6c20 7573 6520 7468 can still use th\n+001551f0: 6520 636c 6173 7320 6b65 7977 6f72 642c e class keyword,\n+00155200: 2062 6563 6175 7365 206e 6f20 636f 6465 because no code\n+00155210: 2069 7320 6765 6e65 7261 7465 6420 6279 is generated by\n+00155220: 2073 6f61 7063 7070 3220 666f 7220 7468 soapcpp2 for th\n+00155230: 6973 2074 7261 6e73 6965 6e74 2074 7970 is transient typ\n+00155240: 652e 3c2f 703e 0a3c 703e 5765 2063 616e e.

    .

    We can\n+00155250: 2074 6865 6e20 7573 6520 7468 6973 2074 then use this t\n+00155260: 7970 6520 656c 7365 7768 6572 652c 2066 ype elsewhere, f\n+00155270: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n+00155280: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+001552c0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n+001552d0: 7265 636f 7264 3c2f 6469 763e 0a3c 6469 record
    .{\n 001552f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00155310: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    FILE *fd;\n-00155330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    const \n-00155370: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *name;.
    };
    .

    Only the\n-001553e0: 203c 636f 6465 3e6e 616d 653c 2f63 6f64 name member is ser\n-00155400: 6961 6c69 7a65 6420 6f66 203c 636f 6465 ialized of ns__record.

    .

    Anoth\n-00155430: 6572 2065 7861 6d70 6c65 3a3c 2f70 3e0a er example:

    .\n-00155440: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    ex\n-00155480: 7465 726e 3c2f 7370 616e 3e20 3c73 7061 tern class s\n-001554b0: 7464 3a3a 6f73 7472 6561 6d3b 203c 7370 td::ostream; // std::ostre\n-001554e0: 616d 2063 616e 2623 3339 3b74 2062 6520 am can't be \n-001554f0: 7365 7269 616c 697a 6564 2c20 6275 7420 serialized, but \n-00155500: 6e65 6564 2074 6f20 6265 2064 6563 6c61 need to be decla\n-00155510: 7265 643c 2f73 7061 6e3e 3c2f 6469 763e red
    \n-00155520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    class <\n-00155550: 2f73 7061 6e3e 6e73 5f5f 6d79 436c 6173 /span>ns__myClas\n-00155560: 7320 3c2f 6469 763e 0a3c 6469 7620 636c s
    .
    { public\n-001555a0: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    virtual voi\n-00155600: 643c 2f73 7061 6e3e 2070 7269 6e74 2873 d print(s\n-00155610: 7464 3a3a 6f73 7472 6561 6d20 2661 6d70 td::ostream &\n-00155620: 3b73 2920 3c73 7061 6e20 636c 6173 733d ;s) const<\n-00155640: 2f73 7061 6e3e 3b20 3c73 7061 6e20 636c /span>; //\n-00155660: 206e 6565 6420 6f73 7472 6561 6d20 6865 need ostream he\n-00155670: 7265 203c 2f73 7061 6e3e 3c2f 6469 763e re
    \n-00155680: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... //
    \n-001556c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    In other c\n-00155700: 6173 6573 2077 6520 646f 2077 616e 7420 ases we do want \n-00155710: 746f 2064 6563 6c61 7265 2061 2074 7970 to declare a typ\n-00155720: 6520 7468 6174 2073 6f61 7063 7070 3220 e that soapcpp2 \n-00155730: 7368 6f75 6c64 2063 6f70 7920 696e 746f should copy into\n-00155740: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS\n-00155750: 7475 622e 683c 2f63 6f64 653e 3c2f 656d tub.h for the applic\n-00155770: 6174 696f 6e20 736f 7572 6365 2063 6f64 ation source cod\n-00155780: 652c 2062 7574 2077 6869 6368 2073 686f e, but which sho\n-00155790: 756c 6420 6e6f 7420 6265 2073 6572 6961 uld not be seria\n-001557a0: 6c69 7a61 626c 652e 2057 6520 6361 6e20 lizable. We can \n-001557b0: 7573 6520 3c63 6f64 653e 6578 7465 726e use extern\n-001557c0: 3c2f 636f 6465 3e20 666f 7220 7468 6973 for this\n-001557d0: 206f 7220 7075 7420 7468 6520 6465 636c or put the decl\n-001557e0: 6172 6174 696f 6e20 696e 203c 636f 6465 aration in [ and ] bra\n-00155810: 636b 6574 733a 3c2f 703e 0a3c 6469 7620 ckets:

    .
    [
    . \n-00155860: 3c73 7061 6e20 636c 6173 733d 226b 6579 class ns__myBase // base clas\n-001558b0: 7320 6e65 6564 206e 6f74 2062 6520 7365 s need not be se\n-001558c0: 7269 616c 697a 6162 6c65 3c2f 7370 616e rializable
    .
    {.
    ... // members
    . \n-00155950: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    ] .
    cla\n-001559a0: 7373 203c 2f73 7061 6e3e 6e73 5f5f 6d79 ss ns__my\n-001559b0: 4465 7269 7665 6420 3a20 6e73 5f5f 6d79 Derived : ns__my\n-001559c0: 4261 7365 203c 2f64 6976 3e0a 3c64 6976 Base
    .{<\n-001559e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // members
    .};\n-00155a40: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
    .
    <\n-00155a60: 703e 5765 2063 616e 2075 7365 203c 636f p>We can use [ and \n-00155a80: 3c63 6f64 653e 5d3c 2f63 6f64 653e 2062 ] b\n-00155a90: 7261 636b 6574 7320 666f 7220 7061 7274 rackets for part\n-00155aa0: 7320 6f66 2074 6865 2063 6f64 652c 2066 s of the code, f\n-00155ab0: 6f72 2065 7861 6d70 6c65 2074 6f20 6d61 or example to ma\n-00155ac0: 6b65 2073 6576 6572 616c 2063 6c61 7373 ke several class\n-00155ad0: 206d 656d 6265 7273 2074 7261 6e73 6965 members transie\n-00155ae0: 6e74 3a3c 2f70 3e0a 3c64 6976 2063 6c61 nt:

    .
    \n-00155b10: 5b20 3c73 7061 6e20 636c 6173 733d 226b [ typedef<\n-00155b30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int tran\n-00155b60: 7369 656e 7449 6e74 3b20 5d20 3c2f 6469 sientInt; ] .
    class\n-00155ba0: 203c 2f73 7061 6e3e 6e73 5f5f 6d79 436c ns__myCl\n-00155bb0: 6173 7320 3c2f 6469 763e 0a3c 6469 7620 ass
    .
    {.
    int a;\n-00155c10: 203c 7370 616e 2063 6c61 7373 3d22 636f // will b\n-00155c30: 6520 7365 7269 616c 697a 6564 203c 2f73 e serialized
    .
    [\n-00155c60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int\n-00155ca0: 2062 3b20 3c73 7061 6e20 636c 6173 733d b; // tra\n-00155cc0: 6e73 6965 6e74 206d 656d 6265 7220 3c2f nsient member
    . \n-00155cf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char s[256]; // transient\n-00155d40: 206d 656d 6265 7220 3c2f 7370 616e 3e3c member <\n-00155d50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ] .
    ex\n-00155da0: 7465 726e 3c2f 7370 616e 3e20 3c73 7061 tern float d; // t\n-00155df0: 7261 6e73 6965 6e74 2074 7970 6520 666c ransient type fl\n-00155e00: 6f61 7420 616e 6420 6d65 6d62 6572 3c2f oat and member
    . \n-00155e30: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *t; \n-00155e70: 2f2f 2077 696c 6c20 6265 2073 6572 6961 // will be seria\n-00155e80: 6c69 7a65 6420 3c2f 7370 616e 3e3c 2f64 lized .
    transien\n-00155eb0: 7449 6e74 202a 6e3b 203c 7370 616e 2063 tInt *n; /\n-00155ed0: 2f20 7472 616e 7369 656e 7420 7479 7065 / transient type\n-00155ee0: 2069 6e74 2061 6e64 206d 656d 6265 7220 int and member \n-00155ef0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00155f10: 2020 5b20 3c2f 6469 763e 0a3c 6469 7620 [
    .
    <\n-00155f30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00155f40: 6f72 6422 3e76 6972 7475 616c 3c2f 7370 ord\">virtual vo\n-00155f70: 6964 3c2f 7370 616e 3e20 6d65 7468 6f64 id method\n-00155f80: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n-00155fa0: 2f73 7061 6e3e 2062 7566 5b31 3032 345d /span> buf[1024]\n-00155fb0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // does\n-00155fd0: 206e 6f74 2063 7265 6174 6520 6120 6368 not create a ch\n-00155fe0: 6172 5b31 3032 345d 2073 6572 6961 6c69 ar[1024] seriali\n-00155ff0: 7a65 7220 3c2f 7370 616e 3e3c 2f64 6976 zer .
    ]
    .\n-00156020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

    On\n+001553c0: 6c79 2074 6865 203c 636f 6465 3e6e 616d ly the nam\n+001553d0: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member \n+001553e0: 6973 2073 6572 6961 6c69 7a65 6420 6f66 is serialized of\n+001553f0: 203c 636f 6465 3e6e 735f 5f72 6563 6f72 ns__recor\n+00155400: 643c 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 d.

    .Another example\n+00155420: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    extern class std::ostrea\n+001554a0: 6d3b 203c 7370 616e 2063 6c61 7373 3d22 m; // std:\n+001554c0: 3a6f 7374 7265 616d 2063 616e 2623 3339 :ostream can'\n+001554d0: 3b74 2062 6520 7365 7269 616c 697a 6564 ;t be serialized\n+001554e0: 2c20 6275 7420 6e65 6564 2074 6f20 6265 , but need to be\n+001554f0: 2064 6563 6c61 7265 643c 2f73 7061 6e3e declared\n+00155500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n+00155530: 6c61 7373 203c 2f73 7061 6e3e 6e73 5f5f lass ns__\n+00155540: 6d79 436c 6173 7320 3c2f 6469 763e 0a3c myClass
    .<\n+00155550: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00155560: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n+00155580: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
    .\n+001555a0: 2020 2020 3c73 7061 6e20 636c 6173 733d virtua\n+001555c0: 6c3c 2f73 7061 6e3e 203c 7370 616e 2063 l void p\n+001555f0: 7269 6e74 2873 7464 3a3a 6f73 7472 6561 rint(std::ostrea\n+00155600: 6d20 2661 6d70 3b73 2920 3c73 7061 6e20 m &s) \n+00155620: 636f 6e73 743c 2f73 7061 6e3e 3b20 3c73 const; // need ostr\n+00155650: 6561 6d20 6865 7265 203c 2f73 7061 6e3e eam here \n+00155660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n+00155680: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n+001556a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };.

    In o\n+001556e0: 7468 6572 2063 6173 6573 2077 6520 646f ther cases we do\n+001556f0: 2077 616e 7420 746f 2064 6563 6c61 7265 want to declare\n+00155700: 2061 2074 7970 6520 7468 6174 2073 6f61 a type that soa\n+00155710: 7063 7070 3220 7368 6f75 6c64 2063 6f70 pcpp2 should cop\n+00155720: 7920 696e 746f 203c 656d 3e3c 636f 6465 y into soapStub.h for the \n+00155750: 6170 706c 6963 6174 696f 6e20 736f 7572 application sour\n+00155760: 6365 2063 6f64 652c 2062 7574 2077 6869 ce code, but whi\n+00155770: 6368 2073 686f 756c 6420 6e6f 7420 6265 ch should not be\n+00155780: 2073 6572 6961 6c69 7a61 626c 652e 2057 serializable. W\n+00155790: 6520 6361 6e20 7573 6520 3c63 6f64 653e e can use \n+001557a0: 6578 7465 726e 3c2f 636f 6465 3e20 666f extern fo\n+001557b0: 7220 7468 6973 206f 7220 7075 7420 7468 r this or put th\n+001557c0: 6520 6465 636c 6172 6174 696f 6e20 696e e declaration in\n+001557d0: 203c 636f 6465 3e5b 3c2f 636f 6465 3e20 [ \n+001557e0: 616e 6420 3c63 6f64 653e 5d3c 2f63 6f64 and ] brackets:

    \n+00155800: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    [ .
    clas\n+00155860: 7320 3c2f 7370 616e 3e6e 735f 5f6d 7942 s ns__myB\n+00155870: 6173 6520 3c73 7061 6e20 636c 6173 733d ase // bas\n+00155890: 6520 636c 6173 7320 6e65 6564 206e 6f74 e class need not\n+001558a0: 2062 6520 7365 7269 616c 697a 6162 6c65 be serializable\n+001558b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001558d0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+001558f0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // mem\n+00155910: 6265 7273 3c2f 7370 616e 3e3c 2f64 6976 bers.
    };
    .\n+00155940: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ]
    .
    class \n+00155990: 6e73 5f5f 6d79 4465 7269 7665 6420 3a20 ns__myDerived : \n+001559a0: 6e73 5f5f 6d79 4261 7365 203c 2f64 6976 ns__myBase .
    {
    . \n+001559e0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // mem\n+00155a00: 6265 7273 3c2f 7370 616e 3e3c 2f64 6976 bers.
    };
    .

    We can u\n+00155a50: 7365 203c 636f 6465 3e5b 3c2f 636f 6465 se [ and ] brackets fo\n+00155a80: 7220 7061 7274 7320 6f66 2074 6865 2063 r parts of the c\n+00155a90: 6f64 652c 2066 6f72 2065 7861 6d70 6c65 ode, for example\n+00155aa0: 2074 6f20 6d61 6b65 2073 6576 6572 616c to make several\n+00155ab0: 2063 6c61 7373 206d 656d 6265 7273 2074 class members t\n+00155ac0: 7261 6e73 6965 6e74 3a3c 2f70 3e0a 3c64 ransient:

    .
    [ ty\n+00155b10: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef int transientInt; \n+00155b50: 5d20 3c2f 6469 763e 0a3c 6469 7620 636c ]
    .
    class ns\n+00155b90: 5f5f 6d79 436c 6173 7320 3c2f 6469 763e __myClass
    \n+00155ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+00155bd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00155be0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int a; // \n+00155c10: 7769 6c6c 2062 6520 7365 7269 616c 697a will be serializ\n+00155c20: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    \n+00155c30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    [
    .\n+00155c60: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+00155c80: 2f73 7061 6e3e 2062 3b20 3c73 7061 6e20 /span> b; \n+00155ca0: 2f2f 2074 7261 6e73 6965 6e74 206d 656d // transient mem\n+00155cb0: 6265 7220 3c2f 7370 616e 3e3c 2f64 6976 ber .
    \n+00155cf0: 6368 6172 3c2f 7370 616e 3e20 735b 3235 char s[25\n+00155d00: 365d 3b20 3c73 7061 6e20 636c 6173 733d 6]; // tra\n+00155d20: 6e73 6965 6e74 206d 656d 6265 7220 3c2f nsient member
    . \n+00155d50: 5d20 203c 2f64 6976 3e0a 3c64 6976 2063 ]
    .
    extern floa\n+00155db0: 743c 2f73 7061 6e3e 2064 3b20 3c73 7061 t d; // transient t\n+00155de0: 7970 6520 666c 6f61 7420 616e 6420 6d65 ype float and me\n+00155df0: 6d62 6572 3c2f 7370 616e 3e3c 2f64 6976 mber.
    \n+00155e30: 6368 6172 3c2f 7370 616e 3e20 2a74 3b20 char *t; \n+00155e40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // will be\n+00155e60: 2073 6572 6961 6c69 7a65 6420 3c2f 7370 serialized
    .
    tr\n+00155e90: 616e 7369 656e 7449 6e74 202a 6e3b 203c ansientInt *n; <\n+00155ea0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00155eb0: 656e 7422 3e2f 2f20 7472 616e 7369 656e ent\">// transien\n+00155ec0: 7420 7479 7065 2069 6e74 2061 6e64 206d t type int and m\n+00155ed0: 656d 6265 7220 3c2f 7370 616e 3e3c 2f64 ember .
    [
    \n+00155f00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    virtu\n+00155f30: 616c 3c2f 7370 616e 3e20 3c73 7061 6e20 al void \n+00155f60: 6d65 7468 6f64 283c 7370 616e 2063 6c61 method(char buf\n+00155f90: 5b31 3032 345d 293b 203c 7370 616e 2063 [1024]); /\n+00155fb0: 2f20 646f 6573 206e 6f74 2063 7265 6174 / does not creat\n+00155fc0: 6520 6120 6368 6172 5b31 3032 345d 2073 e a char[1024] s\n+00155fd0: 6572 6961 6c69 7a65 7220 3c2f 7370 616e erializer
    .
    ] <\n+00156000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    \n+00156020: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    In th\n+00156040: 6973 2065 7861 6d70 6c65 2c20 3c63 6f64 is example, ns__myClass has three t\n+00156070: 7261 6e73 6965 6e74 206d 656d 6265 7273 ransient members\n+00156080: 3a20 3c63 6f64 653e 623c 2f63 6f64 653e : b\n+00156090: 2c20 3c63 6f64 653e 733c 2f63 6f64 653e , s\n+001560a0: 2c20 616e 6420 3c63 6f64 653e 6e3c 2f63 , and n which will \n+001560c0: 6e6f 7420 6265 2073 6572 6961 6c69 7a65 not be serialize\n+001560d0: 642e 204d 656d 6265 7220 3c63 6f64 653e d. Member \n+001560e0: 6e3c 2f63 6f64 653e 2069 7320 7472 616e n is tran\n+001560f0: 7369 656e 7420 6265 6361 7573 6520 7468 sient because th\n+00156100: 6520 7479 7065 2069 7320 6465 636c 6172 e type is declar\n+00156110: 6564 2077 6974 6869 6e20 6120 7472 616e ed within a tran\n+00156120: 7369 656e 7420 626c 6f63 6b2e 2050 6f69 sient block. Poi\n+00156130: 6e74 6572 732c 2072 6566 6572 656e 6365 nters, reference\n+00156140: 732c 2061 6e64 2061 7272 6179 7320 6f66 s, and arrays of\n+00156150: 2074 7261 6e73 6965 6e74 2074 7970 6573 transient types\n+00156160: 2061 7265 2074 7261 6e73 6965 6e74 2e20 are transient. \n+00156170: 5468 6520 7369 6e67 6c65 2063 6c61 7373 The single class\n+00156180: 206d 6574 686f 6420 6973 2065 6e63 6170 method is encap\n+00156190: 7375 6c61 7465 6420 7769 7468 696e 203c sulated within <\n+001561a0: 636f 6465 3e5b 3c2f 636f 6465 3e20 616e code>[ an\n+001561b0: 6420 3c63 6f64 653e 5d3c 2f63 6f64 653e d ]\n+001561c0: 2074 6f20 7072 6576 656e 7420 736f 6170 to prevent soap\n+001561d0: 6370 7032 2066 726f 6d20 6372 6561 7469 cpp2 from creati\n+001561e0: 6e67 2073 6572 6961 6c69 7a65 7273 2066 ng serializers f\n+001561f0: 6f72 2074 6865 203c 636f 6465 3e63 6861 or the cha\n+00156200: 725b 3130 3234 5d3c 2f63 6f64 653e 2074 r[1024] t\n+00156210: 7970 652e 3c2f 703e 0a3c 703e 5765 2061 ype.

    .

    We a\n+00156220: 6c73 6f20 7573 6520 3c63 6f64 653e 5b3c lso use [<\n+00156230: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and ] bracke\n+00156250: 7473 2074 6f20 696e 7472 6f64 7563 6520 ts to introduce \n+00156260: 6120 7472 616e 7369 656e 7420 696e 7465 a transient inte\n+00156270: 6765 7220 7479 7065 203c 636f 6465 3e74 ger type t\n+00156280: 7261 6e73 6965 6e74 496e 743c 2f63 6f64 ransientInt using a typed\n+001562a0: 6566 2e20 5765 2063 616e 6e6f 7420 7573 ef. We cannot us\n+001562b0: 6520 3c63 6f64 653e 6578 7465 726e 3c2f e extern with typedef \n+001562e0: 6265 6361 7573 6520 7468 6973 2063 6f6e because this con\n+001562f0: 7374 7275 6374 2069 7320 7265 7365 7276 struct is reserv\n+00156300: 6564 2066 6f72 2063 7573 746f 6d20 7365 ed for custom se\n+00156310: 7269 616c 697a 6572 732e 3c2f 703e 0a3c rializers.

    .<\n+00156320: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+00156340: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+00156350: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Se\n+00156380: 7269 616c 697a 6174 696f 6e20 2261 7320 rialization \"as \n+00156390: 6973 2220 6f66 2076 6f6c 6174 696c 6520 is\" of volatile \n+001563a0: 6461 7461 2074 7970 6573 3c2f 6832 3e0a data types

    .\n+001563b0: 3c70 3e54 7970 6573 2064 6563 6c61 7265

    Types declare\n+001563c0: 6420 3c63 6f64 653e 766f 6c61 7469 6c65 d volatile\n+001563d0: 3c2f 636f 6465 3e20 696e 2061 6e20 696e in an in\n+001563e0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n+001563f0: 696c 6520 6172 6520 7365 7269 616c 697a ile are serializ\n+00156400: 6162 6c65 2062 7574 206e 6f74 2063 6f70 able but not cop\n+00156410: 6965 6420 6279 2073 6f61 7063 7070 3220 ied by soapcpp2 \n+00156420: 746f 203c 656d 3e3c 636f 6465 3e73 6f61 to soa\n+00156430: 7053 7475 622e 683c 2f63 6f64 653e 3c2f pStub.h. These types\n+00156450: 2061 7265 2074 7970 6963 616c 6c79 206c are typically l\n+00156460: 6962 7261 7279 2074 7970 6573 2074 6861 ibrary types tha\n+00156470: 7420 6172 6520 696e 636c 7564 6564 2069 t are included i\n+00156480: 6e20 7468 6520 736f 7572 6365 2063 6f64 n the source cod\n+00156490: 6520 616e 6420 7368 6f75 6c64 206e 6f74 e and should not\n+001564a0: 2062 6520 7265 6465 6669 6e65 6420 696e be redefined in\n+001564b0: 2074 6865 2061 7070 6c69 6361 7469 6f6e the application\n+001564c0: 2073 6f75 7263 6520 636f 6465 2e20 5765 source code. We\n+001564d0: 2077 616e 7420 746f 2073 6572 6961 6c69 want to seriali\n+001564e0: 7a65 2074 6865 7365 206c 6962 7261 7279 ze these library\n+001564f0: 2074 7970 6573 2022 6173 2069 7322 2077 types \"as is\" w\n+00156500: 6974 686f 7574 2072 6564 6566 696e 696e ithout redefinin\n+00156510: 6720 7468 656d 2e3c 2f70 3e0a 3c70 3e43 g them.

    .

    C\n+00156520: 6f6e 7369 6465 7220 666f 7220 6578 616d onsider for exam\n+00156530: 706c 6520 3c63 6f64 653e 7374 7275 6374 ple struct\n+00156540: 2074 6d3c 2f63 6f64 653e 2c20 6465 636c tm, decl\n+00156550: 6172 6564 2069 6e20 3c65 6d3e 3c63 6f64 ared in time.h<\n+00156570: 2f65 6d3e 2e20 5468 6520 7374 7275 6374 /em>. The struct\n+00156580: 7572 6520 6d61 7920 6163 7475 616c 6c79 ure may actually\n+00156590: 2076 6172 7920 6265 7477 6565 6e20 706c vary between pl\n+001565a0: 6174 666f 726d 732c 2062 7574 2074 6865 atforms, but the\n+001565b0: 203c 636f 6465 3e74 6d3c 2f63 6f64 653e tm\n+001565c0: 2073 7472 7563 7475 7265 2069 6e63 6c75 structure inclu\n+001565d0: 6465 7320 6174 206c 6561 7374 2074 6865 des at least the\n+001565e0: 2066 6f6c 6c6f 7769 6e67 206d 656d 6265 following membe\n+001565f0: 7273 2061 7320 6465 636c 6172 6564 2069 rs as declared i\n+00156600: 6e20 7468 6520 666f 6c6c 6f77 696e 6720 n the following \n+00156610: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n+00156620: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp\n+00156630: 7032 3a3c 2f70 3e0a 3c64 6976 2063 6c61 p2:

    .
    \n+00156660: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+00156680: 7564 6520 266c 743b 7469 6d65 2e68 2667 ude <time.h&g\n+00156690: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n+001566a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    volatile\n+001566d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c st\n+001566f0: 7275 6374 203c 2f73 7061 6e3e 746d 203c ruct tm <\n+00156700: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n 00156720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n-00156750: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_sec; \n-00156780: 2020 2020 203c 7370 616e 2063 6c61 7373 /* se\n-001567a0: 636f 6e64 7320 2830 202d 2036 3029 202a conds (0 - 60) *\n-001567b0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-001567c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-001567f0: 696e 743c 2f73 7061 6e3e 2074 6d5f 6d69 int tm_mi\n-00156800: 6e3b 2020 2020 2020 2020 203c 7370 616e n; /* minutes (0 -\n-00156830: 2035 3929 202a 2f3c 2f73 7061 6e3e 203c 59) */ <\n-00156840: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n-00156880: 2074 6d5f 686f 7572 3b20 2020 2020 2020 tm_hour; \n-00156890: 203c 7370 616e 2063 6c61 7373 3d22 636f /* hours \n-001568b0: 2830 202d 2032 3329 202a 2f3c 2f73 7061 (0 - 23) */
    .
    \n-001568e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_mday; \n-00156910: 2020 2020 203c 7370 616e 2063 6c61 7373 /* da\n-00156930: 7920 6f66 206d 6f6e 7468 2028 3120 2d20 y of month (1 - \n-00156940: 3331 2920 2a2f 3c2f 7370 616e 3e20 3c2f 31) */ .
    int \n-00156990: 746d 5f6d 6f6e 3b20 2020 2020 2020 2020 tm_mon; \n-001569a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* month o\n-001569c0: 6620 7965 6172 2028 3020 2d20 3131 2920 f year (0 - 11) \n-001569d0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-001569e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_y\n-00156a20: 6561 723b 2020 2020 2020 2020 3c73 7061 ear; /* year - 1900\n-00156a50: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    int tm_\n-00156aa0: 7764 6179 3b20 2020 2020 2020 203c 7370 wday; /* day of wee\n-00156ad0: 6b20 2853 756e 6461 7920 3d20 3029 202a k (Sunday = 0) *\n-00156ae0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00156af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00156b20: 696e 743c 2f73 7061 6e3e 2074 6d5f 7964 int tm_yd\n-00156b30: 6179 3b20 2020 2020 2020 203c 7370 616e ay; /* day of year \n-00156b60: 2830 202d 2033 3635 2920 2a2f 3c2f 7370 (0 - 365) */
    .
    \n-00156b90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_isdst; \n-00156bc0: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* i\n-00156be0: 7320 7375 6d6d 6572 2074 696d 6520 696e s summer time in\n-00156bf0: 2065 6666 6563 743f 202a 2f3c 2f73 7061 effect? */
    .
    \n-00156c20: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tm_zone; \n-00156c50: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n-00156c70: 6162 6272 6576 6961 7469 6f6e 206f 6620 abbreviation of \n-00156c80: 7469 6d65 7a6f 6e65 206e 616d 6520 2a2f timezone name */\n-00156c90: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-00156ca0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00156cb0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > l\n-00156cd0: 6f6e 673c 2f73 7061 6e3e 2074 6d5f 676d ong tm_gm\n-00156ce0: 746f 6666 3b20 2020 2020 203c 7370 616e toff; /* offset from \n-00156d10: 5554 4320 696e 2073 6563 6f6e 6473 202a UTC in seconds *\n-00156d20: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00156d30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

    It is als\n-001572e0: 6f20 706f 7373 6962 6c65 2074 6f20 7365 o possible to se\n-001572f0: 7269 616c 697a 6520 7468 6520 3c63 6f64 rialize the tm memb\n-00157310: 6572 7320 6173 2058 4d4c 2061 7474 7269 ers as XML attri\n-00157320: 6275 7465 7320 6279 2064 6563 6c61 7269 butes by declari\n-00157330: 6e67 2074 6865 206d 656d 6265 7273 2061 ng the members a\n-00157340: 7320 6174 7472 6962 7574 6573 2077 6974 s attributes wit\n-00157350: 6820 7468 6520 3c63 6f64 653e 403c 2f63 h the @ qualifier, \n-00157370: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section How to de\n-001573b0: 636c 6172 6520 584d 4c20 6174 7472 6962 clare XML attrib\n-001573c0: 7574 6573 3c2f 613e 202e 3c2f 703e 0a3c utes .

    .<\n-001573d0: 703e 4966 2079 6f75 2077 616e 7420 746f p>If you want to\n-001573e0: 2070 726f 6475 6365 2061 2073 6368 656d produce a schem\n-001573f0: 6120 6669 6c65 2c20 7361 7920 3c65 6d3e a file, say \n-00157400: 3c63 6f64 653e 7469 6d65 2e78 7364 3c2f time.xsd, that\n-00157420: 2064 6566 696e 6573 2061 6e20 584d 4c20 defines an XML \n-00157430: 7363 6865 6d61 2061 6e64 206e 616d 6573 schema and names\n-00157440: 7061 6365 2066 6f72 2074 6865 203c 636f pace for the tm str\n-00157460: 7563 742c 2079 6f75 2063 616e 2061 6464 uct, you can add\n-00157470: 2061 203c 636f 6465 3e74 7970 6564 6566 a typedef\n-00157480: 3c2f 636f 6465 3e20 6465 636c 6172 6174 declarat\n-00157490: 696f 6e20 746f 2074 6865 2068 6561 6465 ion to the heade\n-001574a0: 7220 6669 6c65 3a3c 2f70 3e0a 3c64 6976 r file:

    .
    #\n-001574f0: 696e 636c 7564 6520 266c 743b 7469 6d65 include <time\n-00157500: 2e68 2667 743b 3c2f 7370 616e 3e3c 2f64 .h>.
    vola\n-00157540: 7469 6c65 3c2f 7370 616e 3e20 3c73 7061 tile struct \n-00157570: 746d 3c2f 6469 763e 0a3c 6469 7620 636c tm
    .
    {.
    ... // see above<\n-001575d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-001575f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n-00157620: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef <\n-00157630: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00157640: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct tm time__stru\n-00157660: 6374 5f74 6d3b 3c2f 6469 763e 0a3c 2f64 ct_tm;
    .

    or simply\n-00157690: 2075 7365 2063 6f6c 6f6e 206e 6f74 6174 use colon notat\n-001576a0: 696f 6e20 7369 6e63 6520 7765 206b 6565 ion since we kee\n-001576b0: 7020 7468 6520 3c63 6f64 653e 746d 3c2f p the tm name:

    .\n-001576d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include <\n-00157720: 7469 6d65 2e68 2667 743b 3c2f 7370 616e time.h>
    .
    \n-00157760: 766f 6c61 7469 6c65 3c2f 7370 616e 3e20 volatile \n-00157770: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct time:tm \n+00156750: 696e 743c 2f73 7061 6e3e 2074 6d5f 7365 int tm_se\n+00156760: 633b 2020 2020 2020 2020 203c 7370 616e c; /* seconds (0 -\n+00156790: 2036 3029 202a 2f3c 2f73 7061 6e3e 203c 60) */ <\n+001567a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n+001567e0: 2074 6d5f 6d69 6e3b 2020 2020 2020 2020 tm_min; \n+001567f0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* minute\n+00156810: 7320 2830 202d 2035 3929 202a 2f3c 2f73 s (0 - 59) */
    . \n+00156840: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+00156860: 2f73 7061 6e3e 2074 6d5f 686f 7572 3b20 /span> tm_hour; \n+00156870: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n+00156890: 686f 7572 7320 2830 202d 2032 3329 202a hours (0 - 23) *\n+001568a0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n+001568b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+001568e0: 696e 743c 2f73 7061 6e3e 2074 6d5f 6d64 int tm_md\n+001568f0: 6179 3b20 2020 2020 2020 203c 7370 616e ay; /* day of month\n+00156920: 2028 3120 2d20 3331 2920 2a2f 3c2f 7370 (1 - 31) */
    .
    \n+00156950: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_mon; \n+00156980: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* m\n+001569a0: 6f6e 7468 206f 6620 7965 6172 2028 3020 onth of year (0 \n+001569b0: 2d20 3131 2920 2a2f 3c2f 7370 616e 3e20 - 11) */ \n+001569c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int tm_year; \n+00156a10: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* year \n+00156a30: 2d20 3139 3030 202a 2f3c 2f73 7061 6e3e - 1900 */\n+00156a40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int tm_wday; \n+00156a90: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* day \n+00156ab0: 6f66 2077 6565 6b20 2853 756e 6461 7920 of week (Sunday \n+00156ac0: 3d20 3029 202a 2f3c 2f73 7061 6e3e 203c = 0) */ <\n+00156ad0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n+00156b10: 2074 6d5f 7964 6179 3b20 2020 2020 2020 tm_yday; \n+00156b20: 203c 7370 616e 2063 6c61 7373 3d22 636f /* day of\n+00156b40: 2079 6561 7220 2830 202d 2033 3635 2920 year (0 - 365) \n+00156b50: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n+00156b60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_i\n+00156ba0: 7364 7374 3b20 2020 2020 2020 3c73 7061 sdst; /* is summer t\n+00156bd0: 696d 6520 696e 2065 6666 6563 743f 202a ime in effect? *\n+00156be0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n+00156bf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00156c20: 6368 6172 3c2f 7370 616e 3e20 2a74 6d5f char *tm_\n+00156c30: 7a6f 6e65 3b20 2020 2020 2020 203c 7370 zone; /* abbreviati\n+00156c60: 6f6e 206f 6620 7469 6d65 7a6f 6e65 206e on of timezone n\n+00156c70: 616d 6520 2a2f 3c2f 7370 616e 3e20 3c2f ame */ .
    long\n+00156cc0: 2074 6d5f 676d 746f 6666 3b20 2020 2020 tm_gmtoff; \n+00156cd0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* offset\n+00156cf0: 2066 726f 6d20 5554 4320 696e 2073 6563 from UTC in sec\n+00156d00: 6f6e 6473 202a 2f3c 2f73 7061 6e3e 203c onds */ <\n+00156d10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    \n+00156d30: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    By de\n+00156d50: 636c 6172 696e 6720 7374 7275 6374 203c claring struct <\n+00156d60: 636f 6465 3e74 6d3c 2f63 6f64 653e 2076 code>tm v\n+00156d70: 6f6c 6174 696c 652c 2073 6f61 7063 7070 olatile, soapcpp\n+00156d80: 3220 646f 6573 206e 6f74 2072 6564 6566 2 does not redef\n+00156d90: 696e 6520 6974 2069 6e20 7468 6520 6f75 ine it in the ou\n+00156da0: 7470 7574 2073 6f75 7263 6520 636f 6465 tput source code\n+00156db0: 2e20 5468 6520 3c63 6f64 653e 2369 6e63 . The #inc\n+00156dc0: 6c75 6465 2026 6c74 3b74 696d 652e 6826 lude <time.h&\n+00156dd0: 6774 3b3c 2f63 6f64 653e 2069 7320 636f gt; is co\n+00156de0: 7069 6564 2074 6f20 7468 6520 736f 7572 pied to the sour\n+00156df0: 6365 2063 6f64 6520 6f75 7470 7574 2e20 ce code output. \n+00156e00: 5765 2063 616e 206e 6f77 2073 6572 6961 We can now seria\n+00156e10: 6c69 7a65 2074 6865 203c 636f 6465 3e74 lize the t\n+00156e20: 6d3c 2f63 6f64 653e 2073 7472 7563 7475 m structu\n+00156e30: 7265 2e20 5468 6520 666f 6c6c 6f77 696e re. The followin\n+00156e40: 6720 6578 616d 706c 6520 7365 7269 616c g example serial\n+00156e50: 697a 6573 2074 6865 206c 6f63 616c 2074 izes the local t\n+00156e60: 696d 6520 7374 6f72 6564 2069 6e20 6120 ime stored in a \n+00156e70: 3c63 6f64 653e 746d 3c2f 636f 6465 3e20 tm \n+00156e80: 7374 7275 6374 7572 6520 746f 2073 7464 structure to std\n+00156e90: 6f75 743a 3c2f 703e 0a3c 6469 7620 636c out:

    .
    <\n+00156eb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00156ec0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+00156f10: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00156f40: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+00156fa0: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); .
    time_t T =\n+00156fd0: 2074 696d 6528 4e55 4c4c 293b 203c 2f64 time(NULL); .
    stru\n+00157010: 6374 203c 2f73 7061 6e3e 746d 202a 7420 ct tm *t \n+00157020: 3d20 6c6f 6361 6c74 696d 6528 2661 6d70 = localtime(&\n+00157030: 3b54 293b 203c 2f64 6976 3e0a 3c64 6976 ;T);
    .so\n+00157050: 6170 5f77 7269 7465 5f74 6d28 3c61 2063 ap_write_tm(soap, t);\n+00157090: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s\n+00157100: 6f61 705f 6465 7374 726f 793c 2f61 3e28 oap_destroy(\n+00157110: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+00157140: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+001571b0: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); <\n+001571f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

    It \n+001572c0: 6973 2061 6c73 6f20 706f 7373 6962 6c65 is also possible\n+001572d0: 2074 6f20 7365 7269 616c 697a 6520 7468 to serialize th\n+001572e0: 6520 3c63 6f64 653e 746d 3c2f 636f 6465 e tm members as XML\n+00157300: 2061 7474 7269 6275 7465 7320 6279 2064 attributes by d\n+00157310: 6563 6c61 7269 6e67 2074 6865 206d 656d eclaring the mem\n+00157320: 6265 7273 2061 7320 6174 7472 6962 7574 bers as attribut\n+00157330: 6573 2077 6974 6820 7468 6520 3c63 6f64 es with the @ quali\n+00157350: 6669 6572 2c20 7365 6520 5365 6374 696f fier, see Sectio\n+00157360: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n How\n+00157390: 2074 6f20 6465 636c 6172 6520 584d 4c20 to declare XML \n+001573a0: 6174 7472 6962 7574 6573 3c2f 613e 202e attributes .\n+001573b0: 3c2f 703e 0a3c 703e 4966 2079 6f75 2077

    .

    If you w\n+001573c0: 616e 7420 746f 2070 726f 6475 6365 2061 ant to produce a\n+001573d0: 2073 6368 656d 6120 6669 6c65 2c20 7361 schema file, sa\n+001573e0: 7920 3c65 6d3e 3c63 6f64 653e 7469 6d65 y time\n+001573f0: 2e78 7364 3c2f 636f 6465 3e3c 2f65 6d3e .xsd\n+00157400: 2c20 7468 6174 2064 6566 696e 6573 2061 , that defines a\n+00157410: 6e20 584d 4c20 7363 6865 6d61 2061 6e64 n XML schema and\n+00157420: 206e 616d 6573 7061 6365 2066 6f72 2074 namespace for t\n+00157430: 6865 203c 636f 6465 3e74 6d3c 2f63 6f64 he tm struct, you c\n+00157450: 616e 2061 6464 2061 203c 636f 6465 3e74 an add a t\n+00157460: 7970 6564 6566 3c2f 636f 6465 3e20 6465 ypedef de\n+00157470: 636c 6172 6174 696f 6e20 746f 2074 6865 claration to the\n+00157480: 2068 6561 6465 7220 6669 6c65 3a3c 2f70 header file:.

    #include &l\n+001574e0: 743b 7469 6d65 2e68 2667 743b 3c2f 7370 t;time.h>
    .
    volatile struct <\n+00157550: 2f73 7061 6e3e 746d 3c2f 6469 763e 0a3c /span>tm
    .<\n+00157560: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00157570: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    .\n+00157590: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // see \n+001575b0: 6162 6f76 653c 2f73 7061 6e3e 3c2f 6469 above.
    };
    .\n+001575f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef struc\n+00157630: 7420 3c2f 7370 616e 3e74 6d20 7469 6d65 t tm time\n+00157640: 5f5f 7374 7275 6374 5f74 6d3b 3c2f 6469 __struct_tm;.

    or \n+00157670: 7369 6d70 6c79 2075 7365 2063 6f6c 6f6e simply use colon\n+00157680: 206e 6f74 6174 696f 6e20 7369 6e63 6520 notation since \n+00157690: 7765 206b 6565 7020 7468 6520 3c63 6f64 we keep the tm name\n+001576b0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ\n+00157700: 6520 266c 743b 7469 6d65 2e68 2667 743b e <time.h>\n+00157710: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00157730: 3c73 7061 6e20 636c 6173 733d 226b 6579 volatile stru\n+00157770: 6374 203c 2f73 7061 6e3e 7469 6d65 3a74 ct time:t\n+00157780: 6d20 3c2f 6469 763e 0a3c 6469 7620 636c m
    .
    {.
    {
    . \n-001577d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-001577f0: 3c2f 7370 616e 3e20 746d 5f73 6563 3b20 tm_sec; \n-00157800: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00157820: 2073 6563 6f6e 6473 2028 3020 2d20 3630 seconds (0 - 60\n-00157830: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    int tm\n-00157880: 5f6d 696e 3b20 2020 2020 2020 2020 3c73 _min; /* minutes (\n-001578b0: 3020 2d20 3539 2920 2a2f 3c2f 7370 616e 0 - 59) */
    .
    <\n-001578e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001578f0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int tm_hour; \n-00157910: 2020 2020 3c73 7061 6e20 636c 6173 733d /* hou\n-00157930: 7273 2028 3020 2d20 3233 2920 2a2f 3c2f rs (0 - 23) */
    . \n-00157960: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-00157980: 3c2f 7370 616e 3e20 746d 5f6d 6461 793b tm_mday;\n-00157990: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-001579b0: 2064 6179 206f 6620 6d6f 6e74 6820 2831 day of month (1\n-001579c0: 202d 2033 3129 202a 2f3c 2f73 7061 6e3e - 31) */\n-001579d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int tm_mon; \n-00157a20: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* mont\n-00157a40: 6820 6f66 2079 6561 7220 2830 202d 2031 h of year (0 - 1\n-00157a50: 3129 202a 2f3c 2f73 7061 6e3e 203c 2f64 1) */ .
    int t\n-00157aa0: 6d5f 7965 6172 3b20 2020 2020 2020 203c m_year; <\n-00157ab0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00157ac0: 656e 7422 3e2f 2a20 7965 6172 202d 2031 ent\">/* year - 1\n-00157ad0: 3930 3020 2a2f 3c2f 7370 616e 3e20 3c2f 900 */ .
    int \n-00157b20: 746d 5f77 6461 793b 2020 2020 2020 2020 tm_wday; \n-00157b30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* day of \n-00157b50: 7765 656b 2028 5375 6e64 6179 203d 2030 week (Sunday = 0\n-00157b60: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    int tm\n-00157bb0: 5f79 6461 793b 2020 2020 2020 2020 3c73 _yday; /* day of ye\n-00157be0: 6172 2028 3020 2d20 3336 3529 202a 2f3c ar (0 - 365) */<\n-00157bf0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00157c10: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-00157c30: 743c 2f73 7061 6e3e 2074 6d5f 6973 6473 t tm_isds\n-00157c40: 743b 2020 2020 2020 203c 7370 616e 2063 t; /\n-00157c60: 2a20 6973 2073 756d 6d65 7220 7469 6d65 * is summer time\n-00157c70: 2069 6e20 6566 6665 6374 3f20 2a2f 3c2f in effect? */
    . \n-00157ca0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-00157cc0: 723c 2f73 7061 6e3e 202a 746d 5f7a 6f6e r *tm_zon\n-00157cd0: 653b 2020 2020 2020 3c73 7061 6e20 636c e; /*\n-00157cf0: 2061 6262 7265 7669 6174 696f 6e20 6f66 abbreviation of\n-00157d00: 2074 696d 657a 6f6e 6520 6e61 6d65 202a timezone name *\n-00157d10: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00157d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00157d50: 6c6f 6e67 3c2f 7370 616e 3e20 746d 5f67 long tm_g\n-00157d60: 6d74 6f66 663b 2020 2020 203c 7370 616e mtoff; /* offset from \n-00157d90: 5554 4320 696e 2073 6563 6f6e 6473 202a UTC in seconds *\n-00157da0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00157db0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

    We us\n+00157dd0: 6564 2074 6865 2074 7970 6564 6566 206e ed the typedef n\n+00157de0: 616d 6520 3c63 6f64 653e 7469 6d65 5f5f ame time__\n+00157df0: 7374 7275 6374 5f74 6d3c 2f63 6f64 653e struct_tm\n+00157e00: 2072 6174 6865 7220 7468 616e 203c 636f rather than time__tm, because a sc\n+00157e30: 6865 6d61 206e 616d 6520 636c 6173 6820 hema name clash \n+00157e40: 7769 6c6c 206f 6363 7572 2066 6f72 2074 will occur for t\n+00157e50: 6865 2066 6972 7374 2065 7861 6d70 6c65 he first example\n+00157e60: 2061 626f 7665 2074 6861 7420 6861 7320 above that has \n+00157e70: 3c63 6f64 653e 746d 3c2f 636f 6465 3e20 tm \n+00157e80: 616c 7265 6164 7920 6465 636c 6172 6564 already declared\n+00157e90: 2061 7320 7365 7269 616c 697a 6162 6c65 as serializable\n+00157ea0: 2074 7970 6520 696e 2074 6865 2073 6368 type in the sch\n+00157eb0: 656d 6120 6f66 2074 6865 2067 656e 6572 ema of the gener\n+00157ec0: 6174 6564 2057 5344 4c2e 2054 6865 2073 ated WSDL. The s\n+00157ed0: 6563 6f6e 6420 6578 616d 706c 6520 7769 econd example wi\n+00157ee0: 7468 2074 6865 2063 6f6c 6f6e 206e 6f74 th the colon not\n+00157ef0: 6174 696f 6e20 6176 6f69 6473 2074 6869 ation avoids thi\n+00157f00: 7320 616c 746f 6765 7468 6572 2e3c 2f70 s altogether..

    .... Back to ta\n+00157f30: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n+00157f40: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

    .

    .H\n+00157f70: 6f77 2074 6f20 6465 636c 6172 6520 6375 ow to declare cu\n+00157f80: 7374 6f6d 2073 6572 6961 6c69 7a65 7273 stom serializers\n+00157f90: 2061 6e64 2064 6573 6572 6961 6c69 7a65 and deserialize\n+00157fa0: 7273 3c2f 6832 3e0a 3c70 3e59 6f75 2063 rs

    .

    You c\n+00157fb0: 616e 2069 6d70 6c65 6d65 6e74 2079 6f75 an implement you\n+00157fc0: 7220 6f77 6e20 6375 7374 6f6d 2073 6572 r own custom ser\n+00157fd0: 6961 6c69 7a65 7273 2066 6f72 2064 6174 ializers for dat\n+00157fe0: 6120 7479 7065 732e 2041 2063 7573 746f a types. A custo\n+00157ff0: 6d20 7365 7269 616c 697a 6572 2069 7320 m serializer is \n+00158000: 6465 636c 6172 6564 2069 6e20 616e 2069 declared in an i\n+00158010: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+00158020: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n+00158030: 3220 7573 696e 6720 7468 6520 7061 6972 2 using the pair\n+00158040: 206f 6620 6b65 7977 6f72 6473 203c 636f of keywords extern typede\n+00158060: 663c 2f63 6f64 653e 2e20 466f 7220 6578 f. For ex\n+00158070: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    extern<\n+001580c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ\n+001580e0: 6564 6566 3c2f 7370 616e 3e20 3c73 7061 edef char *MyData; .
    struct\n+00158150: 203c 2f73 7061 6e3e 5361 6d70 6c65 203c Sample <\n+00158160: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n 00158180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n-001581b0: 4d79 4461 7461 2073 3b20 3c73 7061 6e20 MyData s; \n-001581d0: 2f2f 2075 7365 2063 7573 746f 6d20 7365 // use custom se\n-001581e0: 7269 616c 697a 6572 2066 6f72 2074 6869 rializer for thi\n-001581f0: 7320 6d65 6d62 6572 203c 2f73 7061 6e3e s member \n-00158200: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char *t; //\n-00158260: 2075 7365 2061 7574 6f2d 6765 6e65 7261 use auto-genera\n-00158270: 7465 6420 7365 7269 616c 697a 6572 3c2f ted serializer
    .};\n-001582a0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Then provide th\n-001582d0: 6520 666f 6c6c 6f77 696e 6720 6675 6e63 e following func\n-001582e0: 7469 6f6e 7320 666f 7220 6561 6368 203c tions for each <\n-001582f0: 636f 6465 3e65 7874 6572 6e20 7479 7065 code>extern type\n-00158300: 6465 663c 2f63 6f64 653e 2064 6563 6c61 def decla\n-00158310: 7265 7320 7479 7065 203c 636f 6465 3e54 res type T\n-00158320: 3c2f 636f 6465 3e3a 3c2f 703e 0a3c 6469 :

    .
    i\n-00158370: 6e74 3c2f 7370 616e 3e20 736f 6170 5f73 nt soap_s\n-00158380: 6572 6961 6c69 7a65 5f54 283c 7370 616e erialize_T(struct <\n-001583b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001583c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001583d0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001583e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00158410: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const T *a);
    \n-00158440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    voi\n-00158470: 643c 2f73 7061 6e3e 2073 6f61 705f 6465 d soap_de\n-00158480: 6661 756c 745f 5428 3c73 7061 6e20 636c fault_T(st\n-001584a0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, T \n-00158510: 2a61 293b 3c2f 6469 763e 0a3c 6469 7620 *a);
    ..T \n-00158710: 2a73 6f61 705f 696e 5f54 283c 7370 616e *soap_in_T(struct <\n-00158740: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00158750: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00158760: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-00158770: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001587a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-001587e0: 6172 3c2f 7370 616e 3e20 2a74 6167 2c20 ar *tag, \n-001587f0: 5420 2a61 2c20 3c73 7061 6e20 636c 6173 T *a, cons\n-00158810: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-00158840: 7479 7065 293b 3c2f 6469 763e 0a3c 2f64 type);
    .

    The funct\n-00158870: 696f 6e20 7072 6f74 6f74 7970 6573 206f ion prototypes o\n-00158880: 6620 7468 6573 6520 6675 6e63 7469 6f6e f these function\n-00158890: 7320 6361 6e20 6265 2066 6f75 6e64 2069 s can be found i\n-001588a0: 6e20 7468 6520 736f 6170 6370 7032 2d67 n the soapcpp2-g\n-001588b0: 656e 6572 6174 6564 203c 656d 3e3c 636f enerated soapH.h file.

    \n-001588e0: 0a3c 703e 466f 7220 6578 616d 706c 652c .

    For example,\n-001588f0: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati\n-00158900: 6f6e 206f 6620 3c63 6f64 653e 4d79 4461 on of MyDa\n-00158910: 7461 3c2f 636f 6465 3e20 6361 6e20 6265 ta can be\n-00158920: 2064 6f6e 6520 7769 7468 2074 6865 2066 done with the f\n-00158930: 6f6c 6c6f 7769 6e67 2063 6f64 653a 3c2f ollowing code:.

    int \n-00158990: 736f 6170 5f73 6572 6961 6c69 7a65 5f4d soap_serialize_M\n-001589a0: 7944 6174 6128 3c73 7061 6e20 636c 6173 yData(stru\n-001589c0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, MyDa\n-00158a30: 7461 203c 7370 616e 2063 6c61 7373 3d22 ta const*a)
    .\n+00158190: 223e 2020 2020 4d79 4461 7461 2073 3b20 \"> MyData s; \n+001581a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // use cus\n+001581c0: 746f 6d20 7365 7269 616c 697a 6572 2066 tom serializer f\n+001581d0: 6f72 2074 6869 7320 6d65 6d62 6572 203c or this member <\n+001581e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00158200: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n+00158220: 723c 2f73 7061 6e3e 202a 743b 2020 3c73 r *t; // use auto-\n+00158250: 6765 6e65 7261 7465 6420 7365 7269 616c generated serial\n+00158260: 697a 6572 3c2f 7370 616e 3e3c 2f64 6976 izer.
    };
    .

    Then prov\n+001582b0: 6964 6520 7468 6520 666f 6c6c 6f77 696e ide the followin\n+001582c0: 6720 6675 6e63 7469 6f6e 7320 666f 7220 g functions for \n+001582d0: 6561 6368 203c 636f 6465 3e65 7874 6572 each exter\n+001582e0: 6e20 7479 7065 6465 663c 2f63 6f64 653e n typedef\n+001582f0: 2064 6563 6c61 7265 7320 7479 7065 203c declares type <\n+00158300: 636f 6465 3e54 3c2f 636f 6465 3e3a 3c2f code>T:.

    int \n+00158360: 736f 6170 5f73 6572 6961 6c69 7a65 5f54 soap_serialize_T\n+00158370: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001583c0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001583f0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, con\n+00158410: 7374 3c2f 7370 616e 3e20 5420 2a61 293b st T *a);\n+00158420: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void s\n+00158460: 6f61 705f 6465 6661 756c 745f 5428 3c73 oap_default_T(struct soap *soap, T *a);
    \n+00158500: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n+00158530: 3c2f 7370 616e 3e20 736f 6170 5f6f 7574 soap_out\n+00158540: 5f54 283c 7370 616e 2063 6c61 7373 3d22 _T(struct<\n+00158560: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+00158590: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001585c0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n+001585e0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *tag, int id\n+00158660: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const T *a, const char *type);.
    T *soap_in_T\n+00158700: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+00158750: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00158780: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, con\n+001587a0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001587d0: 2a74 6167 2c20 5420 2a61 2c20 3c73 7061 *tag, T *a, const <\n+00158800: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00158810: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *type);.

    The\n+00158850: 2066 756e 6374 696f 6e20 7072 6f74 6f74 function protot\n+00158860: 7970 6573 206f 6620 7468 6573 6520 6675 ypes of these fu\n+00158870: 6e63 7469 6f6e 7320 6361 6e20 6265 2066 nctions can be f\n+00158880: 6f75 6e64 2069 6e20 7468 6520 736f 6170 ound in the soap\n+00158890: 6370 7032 2d67 656e 6572 6174 6564 203c cpp2-generated <\n+001588a0: 656d 3e3c 636f 6465 3e73 6f61 7048 2e68 em>soapH.h\n+001588b0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+001588c0: 652e 3c2f 703e 0a3c 703e 466f 7220 6578 e.

    .

    For ex\n+001588d0: 616d 706c 652c 2074 6865 2073 6572 6961 ample, the seria\n+001588e0: 6c69 7a61 7469 6f6e 206f 6620 3c63 6f64 lization of MyData \n+00158900: 6361 6e20 6265 2064 6f6e 6520 7769 7468 can be done with\n+00158910: 2074 6865 2066 6f6c 6c6f 7769 6e67 2063 the following c\n+00158920: 6f64 653a 3c2f 703e 0a3c 6469 7620 636c ode:

    .
    <\n+00158940: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00158950: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int soap_seria\n+00158980: 6c69 7a65 5f4d 7944 6174 6128 3c73 7061 lize_MyData(struct \n+001589b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001589e0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00158a10: 2c20 4d79 4461 7461 203c 7370 616e 2063 , MyData c\n+00158a30: 6f6e 7374 3c2f 7370 616e 3e2a 6129 203c onst*a) <\n+00158a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n 00158a60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    // no need t\n-00158ab0: 6f20 6d61 726b 2074 6869 7320 6e6f 6465 o mark this node\n-00158ac0: 2028 666f 7220 6d75 6c74 692d 7265 6620 (for multi-ref \n-00158ad0: 616e 6420 6379 636c 6520 6465 7465 6374 and cycle detect\n-00158ae0: 696f 6e29 203c 2f73 7061 6e3e 3c2f 6469 ion) .
    return <\n-00158b30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00158b40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00158b50: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-00158b60: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n-00158b70: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n-00158b80: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b3c 0\">SOAP_OK;<\n+00158a70: 223e 2020 3c73 7061 6e20 636c 6173 733d \"> // no \n+00158a90: 6e65 6564 2074 6f20 6d61 726b 2074 6869 need to mark thi\n+00158aa0: 7320 6e6f 6465 2028 666f 7220 6d75 6c74 s node (for mult\n+00158ab0: 692d 7265 6620 616e 6420 6379 636c 6520 i-ref and cycle \n+00158ac0: 6465 7465 6374 696f 6e29 203c 2f73 7061 detection)
    ..}<\n 00158b90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-00158bb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-00158be0: 3c2f 7370 616e 3e20 736f 6170 5f64 6566 soap_def\n-00158bf0: 6175 6c74 5f4d 7944 6174 6128 3c73 7061 ault_MyData(struct \n-00158c20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00158c50: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00158c80: 2c20 4d79 4461 7461 202a 6129 203c 2f64 , MyData *a) void so\n+00158bd0: 6170 5f64 6566 6175 6c74 5f4d 7944 6174 ap_default_MyDat\n+00158be0: 6128 3c73 7061 6e20 636c 6173 733d 226b a(struct soa\n+00158c30: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00158c60: 6170 3c2f 613e 2c20 4d79 4461 7461 202a ap, MyData *\n+00158c70: 6129 203c 2f64 6976 3e0a 3c64 6976 2063 a)
    .
    {.
    {
    .\n-00158cc0: 2020 2a61 203d 204e 554c 4c3b 3c2f 6469 *a = NULL;.
    }
    .\n-00158d00: 3c73 7061 6e20 636c 6173 733d 226b 6579 int soap_out_My\n-00158d30: 4461 7461 283c 7370 616e 2063 6c61 7373 Data(struc\n-00158d50: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-00158d80: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *tag, int <\n-00158e30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00158e40: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype\">id, MyData const*a,\n-00158e80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-00158ec0: 6172 3c2f 7370 616e 3e20 2a74 7970 6529 ar *type)\n-00158ed0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n-00158f20: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-00158f30: 656c 656d 656e 745f 6265 6769 6e5f 6f75 element_begin_ou\n-00158f40: 7428 3c61 2063 6c61 7373 3d22 636f 6465 t(soap, tag, id, typ\n-00158fa0: 6529 203c 7370 616e 2063 6c61 7373 3d22 e) // prin\n-00158fc0: 7420 584d 4c20 6265 6769 6e6e 696e 6720 t XML beginning \n-00158fd0: 7461 6720 3c2f 7370 616e 3e3c 2f64 6976 tag .
    || soap_s\n-00159050: 656e 643c 2f61 3e28 3c61 2063 6c61 7373 end(s\n-00159080: 6f61 703c 2f61 3e2c 202a 6129 203c 7370 oap, *a) // just print\n-001590b0: 2074 6865 2073 7472 696e 6720 286e 6f20 the string (no \n-001590c0: 584d 4c20 636f 6e76 6572 7369 6f6e 2920 XML conversion) \n-001590d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001590f0: 2020 207c 7c20 736f 6170 5f65 6c65 6d65 || soap_eleme\n-00159100: 6e74 5f65 6e64 5f6f 7574 283c 6120 636c nt_end_out(soap, tag)\n-00159140: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // print\n-00159160: 2058 4d4c 2065 6e64 696e 6720 7461 6720 XML ending tag \n-00159170: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00159190: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-001591b0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn soap->\n-001591f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error;
    ..<\n-001592f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00159300: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    MyDa\n-00159320: 7461 202a 2a73 6f61 705f 696e 5f4d 7944 ta **soap_in_MyD\n-00159330: 6174 6128 3c73 7061 6e20 636c 6173 733d ata(struct\n-00159350: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-00159380: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-001593b0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n-001593d0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *tag, MyData \n-00159410: 2a61 2c20 3c73 7061 6e20 636c 6173 733d *a, const<\n-00159430: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty\n-00159460: 7065 2920 3c2f 6469 763e 0a3c 6469 7620 pe)
    .
    {.\n-001595a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    a = (MyDa\n-001595c0: 7461 2a29 3c61 2063 6c61 7373 3d22 636f ta*)soap_ma\n-00159620: 6c6c 6f63 3c2f 613e 283c 6120 636c 6173 lloc(\n-00159650: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n-00159670: 7369 7a65 6f66 3c2f 7370 616e 3e28 4d79 sizeof(My\n-00159680: 4461 7461 2929 3b20 3c2f 6469 763e 0a3c Data));
    .<\n-00159690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001596a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-001596c0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n-001596f0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->null) <\n-00159750: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    *a =\n-00159770: 204e 554c 4c3b 203c 7370 616e 2063 6c61 NULL; // \n-00159790: 7873 693a 6e69 6c20 656c 656d 656e 7420 xsi:nil element \n-001597a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001597c0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (*s\n-00159810: 6f61 703c 2f61 3e2d 2667 743b 7479 7065 oap->type\n-00159820: 2026 616d 703b 2661 6d70 3b20 3c61 2063 && so\n-00159880: 6170 5f6d 6174 6368 5f74 6167 3c2f 613e ap_match_tag\n-00159890: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001598c0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap->type, type\n-00159900: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {<\n-00159920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->\n-00159970: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error = SOAP_TY\n-00159a20: 5045 3c2f 613e 3b20 3c2f 6469 763e 0a3c PE;
    .<\n-00159a30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00159a40: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-00159a60: 6574 7572 6e3c 2f73 7061 6e3e 204e 554c eturn NUL\n-00159a70: 4c3b 203c 7370 616e 2063 6c61 7373 3d22 L; // type\n-00159a90: 206d 6973 6d61 7463 6820 3c2f 7370 616e mismatch
    .
    } .
    if (*<\n-00159b00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00159b10: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00159b20: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00159b30: 6774 3b68 7265 6629 203c 2f64 6976 3e0a gt;href)
    .\n-00159b40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    a = (MyDat\n-00159b60: 612a 2a29 736f 6170 5f69 645f 666f 7277 a**)soap_id_forw\n-00159b70: 6172 6428 3c61 2063 6c61 7373 3d22 636f ard(soap<\n-00159ba0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap\n-00159bd0: 3c2f 613e 2d26 6774 3b68 7265 662c 2061 ->href, a\n-00159be0: 2c20 302c 2053 4f41 505f 5459 5045 5f4d , 0, SOAP_TYPE_M\n-00159bf0: 7944 6174 612c 2030 2c20 3c73 7061 6e20 yData, 0, \n-00159c10: 7369 7a65 6f66 3c2f 7370 616e 3e28 4d79 sizeof(My\n-00159c20: 4461 7461 292c 2030 2c20 4e55 4c4c 2c20 Data), 0, NULL, \n-00159c30: 4e55 4c4c 2920 3c2f 6469 763e 0a3c 6469 NULL)
    . \n-00159c50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-00159c70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap->\n-00159cd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 body)
    .
    {<\n-00159d40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    *a \n-00159e10: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (cha\n-00159e30: 723c 2f73 7061 6e3e 2a29 3c61 2063 6c61 r*)s\n-00159e90: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(<\n-00159ea0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00159eb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00159ec0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00159ed0: 7374 726c 656e 2873 292b 3129 3b20 3c2f strlen(s)+1); .
    strcp\n-00159f00: 7928 2a61 2c20 7329 3b20 3c2f 6469 763e y(*a, s);
    \n-00159f10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-00159f40: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so\n-00159f90: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->body &am\n-00159ff0: 703b 2661 6d70 3b20 736f 6170 5f65 6c65 p;& soap_ele\n-0015a000: 6d65 6e74 5f65 6e64 5f69 6e28 3c61 2063 ment_end_in(soap, tag\n-0015a040: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n-0015a060: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-0015a080: 3c2f 7370 616e 3e20 4e55 4c4c 3b20 3c2f NULL; .
    return\n-0015a0d0: 2061 3b20 3c2f 6469 763e 0a3c 6469 7620 a;
    .
    }.
    #defi\n-0015a1d0: 6e65 2053 4f41 505f 5459 5045 3c2f 6469 ne SOAP_TYPE
    A soap_stat\n-0015a200: 7573 2065 7272 6f72 2063 6f64 653a 2058 us error code: X\n-0015a210: 4d4c 2065 6c65 6d65 6e74 206f 7220 6174 ML element or at\n-0015a220: 7472 6962 7574 6520 6861 7320 6120 6d69 tribute has a mi\n-0015a230: 736d 6174 6368 696e 6720 7479 7065 206f smatching type o\n-0015a240: 7220 7661 6c75 6520 7468 6174 2069 7320 r value that is \n-0015a250: 6361 7573 696e 6720 6120 2e2e 2e3c 2f64 causing a ...
    Definit\n-0015a280: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0015a290: 322e 683a 3236 3037 3c2f 6469 763e 3c2f 2.h:2607
    .
    <\n-0015a360: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0015a370: 6922 3e69 6e74 2073 6f61 705f 7365 6e64 i\">int soap_send\n-0015a380: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0015a390: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n-0015a3a0: 7329 3c2f 6469 763e 3c64 6976 2063 6c61 s)
    Send \n-0015a3c0: 6120 7374 7269 6e67 2e3c 2f64 6976 3e3c a string.
    <\n-0015a3d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    <\n-0015a5e0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0015a5f0: 6922 3e73 686f 7274 2062 6f64 793c 2f64 i\">short body
    The soap::\n-0015a620: 626f 6479 2066 6c61 6720 6973 2073 6574 body flag is set\n-0015a630: 2077 6865 6e20 616e 2065 6c65 6d65 6e74 when an element\n-0015a640: 2068 6173 2065 6c65 6d65 6e74 2063 6f6e has element con\n-0015a650: 7465 6e74 2064 7572 696e 6720 584d 4c20 tent during XML \n-0015a660: 7061 7273 696e 6720 6f72 2077 6865 6e20 parsing or when \n-0015a670: 6120 4854 5450 206d 6573 732e 2e2e 3c2f a HTTP mess...
    Defini\n-0015a6a0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-0015a6b0: 7032 2e68 3a32 3936 353c 2f64 6976 3e3c p2.h:2965
    <\n-0015a6c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-0015a710: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0015a720: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-0015a760: 6f61 703a 3a6e 756c 6c3c 2f61 3e3c 2f64 oap::null
    short nul\n-0015a790: 6c3c 2f64 6976 3e3c 6469 7620 636c 6173 l
    The so\n-0015a7b0: 6170 3a3a 6e75 6c6c 2066 6c61 6720 6973 ap::null flag is\n-0015a7c0: 2073 6574 2077 6865 6e20 616e 2065 6c65 set when an ele\n-0015a7d0: 6d65 6e74 2063 6172 7269 6573 2061 2078 ment carries a x\n-0015a7e0: 7369 3a6e 696c 2061 7474 7269 6275 7465 si:nil attribute\n-0015a7f0: 2074 6861 7420 6973 2074 7275 652e 3c2f that is true.
    Defini\n-0015a820: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-0015a830: 7032 2e68 3a32 3936 333c 2f64 6976 3e3c p2.h:2963
    <\n-0015a840: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-0015a860: 4d6f 7265 2069 6e66 6f72 6d61 7469 6f6e More information\n-0015a870: 206f 6e20 6375 7374 6f6d 2073 6572 6961 on custom seria\n-0015a880: 6c69 7a61 7469 6f6e 2069 7320 6176 6169 lization is avai\n-0015a890: 6c61 626c 6520 696e 2074 6865 2067 534f lable in the gSO\n-0015a8a0: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p\n-0015a8b0: 6163 6b61 6765 2069 6e20 7468 6520 3c65 ackage in the gsoap/cu\n-0015a8d0: 7374 6f6d 3c2f 636f 6465 3e3c 2f65 6d3e stom\n-0015a8e0: 2064 6972 6563 746f 7279 2c20 7768 6572 directory, wher\n-0015a8f0: 6520 796f 7520 6361 6e20 616c 736f 2066 e you can also f\n-0015a900: 696e 6420 7365 7665 7261 6c20 6375 7374 ind several cust\n-0015a910: 6f6d 2073 6572 6961 6c69 7a65 7273 2074 om serializers t\n-0015a920: 6f20 7573 6520 7769 7468 2079 6f75 7220 o use with your \n-0015a930: 7072 6f6a 6563 7473 2e3c 2f70 3e0a 3c70 projects.

    ..... Back to table \n-0015a960: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-0015a970: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .Fun\n-0015a9a0: 6374 696f 6e20 6361 6c6c 6261 636b 7320 ction callbacks \n-0015a9b0: 666f 7220 6375 7374 6f6d 697a 6564 2049 for customized I\n-0015a9c0: 2f4f 2061 6e64 2048 5454 5020 6861 6e64 /O and HTTP hand\n-0015a9d0: 6c69 6e67 3c2f 6832 3e0a 3c70 3e54 6865 ling

    .

    The\n-0015a9e0: 2066 6f6c 6c6f 7769 6e67 206c 6973 7420 following list \n-0015a9f0: 6f66 2066 756e 6374 696f 6e73 2063 616e of functions can\n-0015aa00: 2062 6520 7573 6564 2066 6f72 2063 7573 be used for cus\n-0015aa10: 746f 6d69 7a65 6420 4854 5450 2068 616e tomized HTTP han\n-0015aa20: 646c 696e 6720 616e 6420 492f 4f2e 3c2f dling and I/O..

    See also A\n-0015aa40: 5049 2064 6f63 756d 656e 7461 7469 6f6e PI documentation\n-0015aa50: 204d 6f64 756c 6520 3c61 2063 6c61 7373 Module Callba\n-0015aa90: 636b 2066 756e 6374 696f 6e73 3c2f 613e ck functions\n-0015aaa0: 2e3c 2f70 3e0a 3c70 3e54 6f20 7265 7365 .

    .

    To rese\n-0015aab0: 7420 7468 6520 6361 6c6c 6261 636b 2066 t the callback f\n-0015aac0: 756e 6374 696f 6e73 2074 6f20 7468 6520 unctions to the \n-0015aad0: 696e 7465 726e 616c 2066 756e 6374 696f internal functio\n-0015aae0: 6e73 206f 6620 7468 6520 656e 6769 6e65 ns of the engine\n-0015aaf0: 2c20 7573 6520 3c63 6f64 653e 3c61 2063 , use \n-0015abc0: 736f 6170 5f64 6f6e 653c 2f61 3e3c 2f63 soap_done followed by\n-0015abe0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n-0015ac70: 705f 696e 6974 3c2f 613e 3c2f 636f 6465 p_init. This re-initi\n-0015ac90: 616c 697a 6573 2074 6865 203c 636f 6465 alizes the soa\n-0015acf0: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n-0015ad00: 7465 7874 2c20 7265 6d6f 7665 7320 616c text, removes al\n-0015ad10: 6c20 706c 7567 696e 732c 2061 6e64 2072 l plugins, and r\n-0015ad20: 6573 6574 7320 6675 6e63 7469 6f6e 2063 esets function c\n-0015ad30: 616c 6c62 6163 6b73 2e3c 2f70 3e0a 3c68 allbacks.

    ..fpost\n-0015ad70: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69 .

    i\n-0015ad80: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap::fpos\n-0015ae50: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so\n-0015ae60: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n-0015ae70: 6368 6172 202a 656e 6470 6f69 6e74 2c20 char *endpoint, \n-0015ae80: 636f 6e73 7420 6368 6172 202a 686f 7374 const char *host\n-0015ae90: 2c20 696e 7420 706f 7274 2c20 636f 6e73 , int port, cons\n-0015aea0: 7420 6368 6172 202a 7061 7468 2c20 636f t char *path, co\n-0015aeb0: 6e73 7420 6368 6172 202a 6163 7469 6f6e nst char *action\n-0015aec0: 2c20 554c 4f4e 4736 3420 636f 756e 7429 , ULONG64 count)\n-0015aed0: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-0015aee0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-0015aef0: 6361 6c6c 6564 2061 7420 7468 6520 7365 called at the se\n-0015af00: 7276 6572 2073 6964 6520 6279 2074 6865 rver side by the\n-0015af10: 2065 6e67 696e 6520 746f 2073 656e 6420 engine to send \n-0015af20: 7468 6520 4854 5450 2068 6561 6465 7273 the HTTP headers\n-0015af30: 2074 6f20 7468 6520 636f 6e6e 6563 7465 to the connecte\n-0015af40: 6420 636c 6965 6e74 2e20 5468 6520 7061 d client. The pa\n-0015af50: 7261 6d65 7465 7220 3c63 6f64 653e 7374 rameter st\n-0015af60: 6174 7573 3c2f 636f 6465 3e20 7368 6f75 atus shou\n-0015af70: 6c64 2062 6520 616e 2048 5454 5020 7374 ld be an HTTP st\n-0015af80: 6174 7573 2065 7272 6f72 2063 6f64 6520 atus error code \n-0015af90: 6f72 203c 636f 6465 3e23 534f 4150 5f4f or #SOAP_O\n-0015afa0: 4b3c 2f63 6f64 653e 2028 3230 3020 4f4b K (200 OK\n-0015afb0: 2920 6f72 203c 636f 6465 3e23 534f 4150 ) or #SOAP\n-0015afc0: 5f48 544d 4c3c 2f63 6f64 653e 206f 7220 _HTML or \n-0015afd0: 3c63 6f64 653e 2353 4f41 505f 4649 4c45 #SOAP_FILE\n-0015afe0: 3c2f 636f 6465 3e2e 2055 7369 6e67 203c . Using <\n-0015aff0: 636f 6465 3e23 534f 4150 5f48 544d 4c3c code>#SOAP_HTML<\n-0015b000: 2f63 6f64 653e 2073 6574 7320 7468 6520 /code> sets the \n-0015b010: 636f 6e74 656e 742d 7479 7065 2068 6561 content-type hea\n-0015b020: 6465 7220 746f 203c 636f 6465 3e74 6578 der to tex\n-0015b030: 742f 6874 6d6c 3b20 6368 6172 7365 743d t/html; charset=\n-0015b040: 7574 662d 383c 2f63 6f64 653e 2e20 5573 utf-8. Us\n-0015b050: 696e 6720 3c63 6f64 653e 2353 4f41 505f ing #SOAP_\n-0015b060: 4649 4c45 3c2f 636f 6465 3e20 7365 7473 FILE sets\n-0015b070: 2074 6865 2063 6f6e 7465 6e74 2d74 7970 the content-typ\n-0015b080: 6520 6865 6164 6572 2074 6f20 7468 6520 e header to the \n-0015b090: 7661 6c75 6520 6f66 203c 636f 6465 3e3c value of <\n-0015b0a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015b0b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0015b0c0: 6d6c 2361 6535 6539 3837 3333 6134 3334 ml#ae5e98733a434\n-0015b0d0: 3962 3565 3134 3636 6139 6530 6363 6332 9b5e1466a9e0ccc2\n-0015b0e0: 3263 3131 2220 7469 746c 653d 2253 7472 2c11\" title=\"Str\n-0015b0f0: 696e 6720 7769 7468 2048 5454 5020 636f ing with HTTP co\n-0015b100: 6e74 656e 7420 7479 7065 2068 6561 6465 ntent type heade\n-0015b110: 7220 7661 6c75 6520 7265 6365 6976 6564 r value received\n-0015b120: 2c20 6361 6e20 616c 736f 2062 6520 6173 , can also be as\n-0015b130: 7369 676e 6564 2074 6f20 7370 6563 6966 signed to specif\n-0015b140: 7920 6120 636f 6e74 656e 7420 7479 7065 y a content type\n-0015b150: 2068 2e2e 2e22 3e73 6f61 703a 3a68 7474 h...\">soap::htt\n-0015b160: 705f 636f 6e74 656e 743c 2f61 3e3c 2f63 p_content. Extra HTTP\n-0015b180: 2068 6561 6465 7273 2061 7265 2061 6464 headers are add\n-0015b190: 6564 2077 6865 6e20 3c63 6f64 653e 3c61 ed when soa\n-0015b250: 703a 3a68 7474 705f 6578 7472 615f 6865 p::http_extra_he\n-0015b260: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n-0015b270: 6973 2073 6574 2074 6f20 6f6e 6520 6f72 is set to one or\n-0015b280: 206d 6f72 6520 6865 6164 6572 206c 696e more header lin\n-0015b290: 6573 2073 6570 6172 6174 6564 2062 7920 es separated by \n-0015b2a0: 4352 4c46 2e20 5768 656e 2072 6564 6566 CRLF. When redef\n-0015b2b0: 696e 696e 6720 7468 6973 2063 616c 6c62 ining this callb\n-0015b2c0: 6163 6b2c 2075 7365 2066 756e 6374 696f ack, use functio\n-0015b2d0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soa\n-0015b340: 705f 7365 6e64 3c2f 613e 3c2f 636f 6465 p_send to write the h\n-0015b360: 6561 6465 7220 636f 6e74 656e 7473 2e20 eader contents. \n-0015b370: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-0015b380: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-0015b390: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-0015b450: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-0015b460: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n-0015b470: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n-0015b480: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n-0015b490: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::frespons\n-0015b560: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is \n-0015b570: 3c63 6f64 653e 6874 7470 5f72 6573 706f http_respo\n-0015b580: 6e73 653c 2f63 6f64 653e 2e3c 2f70 3e0a nse.

    .\n-0015b590: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fre\n-0015b5c0: 7370 6f6e 7365 3c2f 6833 3e0a 3c70 3e3c sponse

    .

    <\n-0015b5d0: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap::fre\n-0015b6a0: 7370 6f6e 7365 3c2f 613e 2928 7374 7275 sponse)(stru\n-0015b6b0: 6374 2073 6f61 7020 2a73 6f61 702c 2069 ct soap *soap, i\n-0015b6c0: 6e74 2073 6f61 705f 6572 726f 725f 636f nt soap_error_co\n-0015b6d0: 6465 2c20 554c 4f4e 4736 3420 636f 756e de, ULONG64 coun\n-0015b6e0: 7429 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 t)

    .This callback i\n-0015b700: 7320 6361 6c6c 6564 2061 7420 7468 6520 s called at the \n-0015b710: 7365 7276 6572 2073 6964 6520 6279 2074 server side by t\n-0015b720: 6865 2065 6e67 696e 6520 746f 2073 656e he engine to sen\n-0015b730: 6420 7468 6520 4854 5450 2068 6561 6465 d the HTTP heade\n-0015b740: 7273 2074 6f20 7468 6520 636f 6e6e 6563 rs to the connec\n-0015b750: 7465 6420 636c 6965 6e74 2e20 5468 6520 ted client. The \n-0015b760: 7061 7261 6d65 7465 7220 3c63 6f64 653e parameter \n-0015b770: 7374 6174 7573 3c2f 636f 6465 3e20 7368 status sh\n-0015b780: 6f75 6c64 2062 6520 616e 2048 5454 5020 ould be an HTTP \n-0015b790: 7374 6174 7573 2065 7272 6f72 2063 6f64 status error cod\n-0015b7a0: 6520 6f72 203c 636f 6465 3e23 534f 4150 e or #SOAP\n-0015b7b0: 5f4f 4b3c 2f63 6f64 653e 2028 3230 3020 _OK (200 \n-0015b7c0: 4f4b 2920 6f72 203c 636f 6465 3e23 534f OK) or #SO\n-0015b7d0: 4150 5f48 544d 4c3c 2f63 6f64 653e 206f AP_HTML o\n-0015b7e0: 7220 3c63 6f64 653e 2353 4f41 505f 4649 r #SOAP_FI\n-0015b7f0: 4c45 3c2f 636f 6465 3e2e 2055 7369 6e67 LE. Using\n-0015b800: 203c 636f 6465 3e23 534f 4150 5f48 544d #SOAP_HTM\n-0015b810: 4c3c 2f63 6f64 653e 2073 6574 7320 7468 L sets th\n-0015b820: 6520 636f 6e74 656e 742d 7479 7065 2068 e content-type h\n-0015b830: 6561 6465 7220 746f 203c 636f 6465 3e74 eader to t\n-0015b840: 6578 742f 6874 6d6c 3b20 6368 6172 7365 ext/html; charse\n-0015b850: 743d 7574 662d 383c 2f63 6f64 653e 2e20 t=utf-8. \n-0015b860: 5573 696e 6720 3c63 6f64 653e 2353 4f41 Using #SOA\n-0015b870: 505f 4649 4c45 3c2f 636f 6465 3e20 7365 P_FILE se\n-0015b880: 7473 2074 6865 2063 6f6e 7465 6e74 2d74 ts the content-t\n-0015b890: 7970 6520 6865 6164 6572 2074 6f20 7468 ype header to th\n-0015b8a0: 6520 7661 6c75 6520 6f66 203c 636f 6465 e value of soap::h\n-0015b970: 7474 705f 636f 6e74 656e 743c 2f61 3e3c ttp_content<\n-0015b980: 2f63 6f64 653e 2e20 4578 7472 6120 4854 /code>. Extra HT\n-0015b990: 5450 2068 6561 6465 7273 2061 7265 2061 TP headers are a\n-0015b9a0: 6464 6564 2077 6865 6e20 3c63 6f64 653e dded when \n-0015b9b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n-0015ba60: 6f61 703a 3a68 7474 705f 6578 7472 615f oap::http_extra_\n-0015ba70: 6865 6164 6572 3c2f 613e 3c2f 636f 6465 header is set to one \n-0015ba90: 6f72 206d 6f72 6520 6865 6164 6572 206c or more header l\n-0015baa0: 696e 6573 2073 6570 6172 6174 6564 2062 ines separated b\n-0015bab0: 7920 4352 4c46 2e20 5768 656e 2072 6564 y CRLF. When red\n-0015bac0: 6566 696e 696e 6720 7468 6973 2063 616c efining this cal\n-0015bad0: 6c62 6163 6b2c 2075 7365 2066 756e 6374 lback, use funct\n-0015bae0: 696f 6e20 3c63 6f64 653e 3c61 2063 6c61 ion s\n-0015bb50: 6f61 705f 7365 6e64 3c2f 613e 3c2f 636f oap_send to write the\n-0015bb70: 2068 6561 6465 7220 636f 6e74 656e 7473 header contents\n-0015bb80: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns \n-0015bb90: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK \n-0015bba0: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap\n-0015bc60: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status error code. T\n-0015bc80: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func\n-0015bc90: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to\n-0015bca0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::frespo\n-0015bd70: 6e73 653c 2f61 3e3c 2f63 6f64 653e 2069 nse i\n-0015bd80: 7320 3c63 6f64 653e 6874 7470 5f72 6573 s http_res\n-0015bd90: 706f 6e73 653c 2f63 6f64 653e 2e3c 2f70 ponse..

    .f\n-0015bdd0: 706f 7374 6864 723c 2f68 333e 0a3c 703e posthdr

    .

    \n-0015bde0: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soap::f\n-0015be90: 706f 7374 6864 723c 2f61 3e29 2873 7472 posthdr)(str\n-0015bea0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-0015beb0: 636f 6e73 7420 6368 6172 202a 6b65 792c const char *key,\n-0015bec0: 2063 6f6e 7374 2063 6861 7220 2a76 616c const char *val\n-0015bed0: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n-0015bee0: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n-0015bef0: 2063 616c 6c65 6420 6279 203c 636f 6465 called by soap::fpost and soap::fresponse\n-0015c0b0: 3c2f 613e 3c2f 636f 6465 3e20 746f 2073 to s\n-0015c0c0: 656e 6420 616e 2048 5454 5020 6865 6164 end an HTTP head\n-0015c0d0: 6572 2077 6974 6820 6120 6b65 7920 616e er with a key an\n-0015c0e0: 6420 616e 206f 7074 696f 6e61 6c20 7661 d an optional va\n-0015c0f0: 6c75 652e 2052 6574 7572 6e73 203c 636f lue. Returns #SOAP_OK or a s\n-0015c1d0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n-0015c1f0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n-0015c200: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n-0015c210: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-0015c220: 3c61 2063 6c61 7373 3d22 656c 2220 6872 so\n-0015c2c0: 6170 3a3a 6670 6f73 7468 6472 3c2f 613e ap::fposthdr\n-0015c2d0: 3c2f 636f 6465 3e20 6973 203c 636f 6465 is http_post_heade\n-0015c2f0: 723c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 r.

    ..fpars\n-0015c330: 653c 2f68 333e 0a3c 703e 3c63 6f64 653e e.

    \n-0015c340: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fp\n-0015c3e0: 6172 7365 3c2f 613e 2928 7374 7275 6374 arse)(struct\n-0015c3f0: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This \n-0015c410: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n-0015c420: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-0015c430: 2028 6173 2061 2063 6c69 656e 7420 6f72 (as a client or\n-0015c440: 2073 6572 7665 7229 2074 6f20 7265 6164 server) to read\n-0015c450: 2061 6e64 2070 6172 7365 2048 5454 5020 and parse HTTP \n-0015c460: 6865 6164 6572 7320 6f72 204d 494d 4520 headers or MIME \n-0015c470: 6865 6164 6572 732e 2057 6865 6e20 7265 headers. When re\n-0015c480: 6465 6669 6e65 642c 2074 6869 7320 6675 defined, this fu\n-0015c490: 6e63 7469 6f6e 2073 686f 756c 6420 6174 nction should at\n-0015c4a0: 2072 6561 6420 6f72 2073 6b69 7020 7468 read or skip th\n-0015c4b0: 6520 656e 7469 7265 2048 5454 5020 6865 e entire HTTP he\n-0015c4c0: 6164 6572 2074 6f20 7265 6163 6820 7468 ader to reach th\n-0015c4d0: 6520 6d65 7373 6167 6520 626f 6479 2e20 e message body. \n-0015c4e0: 4675 6e63 7469 6f6e 203c 636f 6465 3e3c Function <\n-0015c4f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015c500: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015c510: 5f69 6f2e 6874 6d6c 2367 6133 6635 3463 _io.html#ga3f54c\n-0015c520: 3539 3136 6336 6636 6464 6666 6563 3564 5916c6f6ddffec5d\n-0015c530: 3731 3230 6132 3330 6634 3622 2074 6974 7120a230f46\" tit\n-0015c540: 6c65 3d22 4765 7420 6120 6865 6164 6572 le=\"Get a header\n-0015c550: 206c 696e 652e 223e 736f 6170 5f67 6574 line.\">soap_get\n-0015c560: 6c69 6e65 3c2f 613e 3c2f 636f 6465 3e20 line \n-0015c570: 6973 2075 7365 6420 6279 2074 6869 7320 is used by this \n-0015c580: 6361 6c6c 6261 636b 2074 6f20 7265 6164 callback to read\n-0015c590: 2065 6163 6820 6865 6164 6572 206c 696e each header lin\n-0015c5a0: 6520 696e 746f 2061 6e20 696e 7465 726e e into an intern\n-0015c5b0: 616c 2062 7566 6665 7220 3c63 6f64 653e al buffer \n-0015c5c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ms\n-0015c680: 6762 7566 3c2f 613e 3c2f 636f 6465 3e20 gbuf \n-0015c690: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap_getline\n-0015c710: 3c2f 613e 2873 6f61 702c 2073 6f61 702d (soap, soap-\n-0015c720: 2667 743b 6d73 6762 7566 2c20 7369 7a65 >msgbuf, size\n-0015c730: 6f66 2873 6f61 702d 2667 743b 6d73 6762 of(soap->msgb\n-0015c740: 7566 2929 3c2f 636f 6465 3e2e 2052 6574 uf)). Ret\n-0015c750: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-0015c760: 5f4f 4b3c 2f63 6f64 653e 2c20 6f72 2061 _OK, or a\n-0015c770: 2067 534f 4150 2065 7272 6f72 2063 6f64 gSOAP error cod\n-0015c780: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n-0015c790: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n-0015c7a0: 6420 746f 203c 636f 6465 3e3c 6120 636c d to so\n-0015c840: 6170 3a3a 6670 6172 7365 3c2f 613e 3c2f ap::fparse is h\n-0015c860: 7474 705f 7061 7273 653c 2f63 6f64 653e ttp_parse\n-0015c870: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fparsehdr.

    int (\n-0015c8c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fpar\n-0015c970: 7365 6864 723c 2f61 3e29 2873 7472 7563 sehdr)(struc\n-0015c980: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n-0015c990: 6e73 7420 6368 6172 202a 6b65 792c 2063 nst char *key, c\n-0015c9a0: 6f6e 7374 2063 6861 7220 2a76 616c 293c onst char *val)<\n-0015c9b0: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-0015c9c0: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-0015c9d0: 616c 6c65 6420 6279 203c 636f 6465 3e3c alled by <\n-0015c9e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015c9f0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015ca00: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-0015ca10: 6761 3963 6230 3563 6539 3866 3834 3566 ga9cb05ce98f845f\n-0015ca20: 3136 6339 3230 6334 3434 3236 6163 3335 16c920c44426ac35\n-0015ca30: 6135 2220 7469 746c 653d 2243 616c 6c62 a5\" title=\"Callb\n-0015ca40: 6163 6b20 7468 6174 2072 6561 6473 2061 ack that reads a\n-0015ca50: 6e64 2070 6172 7365 7320 4854 5450 2061 nd parses HTTP a\n-0015ca60: 6e64 204d 494d 4520 6865 6164 6572 732e nd MIME headers.\n-0015ca70: 223e 736f 6170 3a3a 6670 6172 7365 3c2f \">soap::fparse, consu\n-0015ca90: 6d65 7320 616e 2048 5454 5020 6865 6164 mes an HTTP head\n-0015caa0: 6572 2074 6861 7420 6973 2073 706c 6974 er that is split\n-0015cab0: 2069 6e20 6120 6b65 792d 7661 6c75 6520 in a key-value \n-0015cac0: 7061 6972 2061 6e64 2075 7064 6174 6573 pair and updates\n-0015cad0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap<\n-0015cb30: 2f63 6f64 653e 2063 6f6e 7465 7874 2073 /code> context s\n-0015cb40: 7461 7465 2061 6363 6f72 6469 6e67 6c79 tate accordingly\n-0015cb50: 2e20 5468 6520 636f 6e74 6578 7420 6973 . The context is\n-0015cb60: 2075 7064 6174 6564 2077 6974 6820 7468 updated with th\n-0015cb70: 6520 4854 5450 2068 6561 6465 7220 696e e HTTP header in\n-0015cb80: 666f 726d 6174 696f 6e20 7265 6365 6976 formation receiv\n-0015cb90: 6564 2c20 6275 7420 4854 5450 2068 6561 ed, but HTTP hea\n-0015cba0: 6465 7273 2061 7265 206e 6f74 206c 6974 ders are not lit\n-0015cbb0: 6572 616c 6c79 2072 6574 6169 6e65 6420 erally retained \n-0015cbc0: 6279 2074 6865 2065 6e67 696e 652e 2052 by the engine. R\n-0015cbd0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n-0015cbe0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n-0015cbf0: 3c63 6f64 653e 2353 4f41 505f 5354 4f50 #SOAP_STOP\n-0015cc00: 3c2f 636f 6465 3e20 746f 2070 7265 7665 to preve\n-0015cc10: 6e74 2066 7572 7468 6572 2072 6561 6469 nt further readi\n-0015cc20: 6e67 206f 6620 7468 6520 4854 5450 2062 ng of the HTTP b\n-0015cc30: 6f64 792c 206f 7220 6120 3c63 6f64 653e ody, or a \n-0015cc40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n-0015cd00: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n-0015cd10: 726f 7220 636f 6465 2e20 5468 6520 6275 ror code. The bu\n-0015cd20: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n-0015cd30: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fp\n-0015cdf0: 6172 7365 6864 723c 2f61 3e3c 2f63 6f64 arsehdr is http\n-0015ce10: 5f70 6172 7365 5f68 6561 6465 723c 2f63 _parse_header.

    .

    .fget

    \n-0015ce60: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (<\n-0015ce70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015ce80: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015ce90: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-0015cea0: 6761 6530 3232 3230 3466 6637 3030 3464 gae022204ff7004d\n-0015ceb0: 6632 6435 6163 3965 3038 3363 6262 3562 f2d5ac9e083cbb5b\n-0015cec0: 3136 2220 7469 746c 653d 2243 616c 6c62 16\" title=\"Callb\n-0015ced0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n-0015cee0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n-0015cef0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n-0015cf00: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n-0015cf10: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request\n-0015cf20: 7320 6672 6f6d 2063 6c69 656e 7473 2e22 s from clients.\"\n-0015cf30: 3e73 6f61 703a 3a66 6765 743c 2f61 3e29 >soap::fget)\n-0015cf40: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0015cf50: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .<\n-0015cf60: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-0015cf70: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n-0015cf80: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-0015cf90: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP\n-0015cfa0: 2047 4554 2072 6571 7565 7374 2069 7320 GET request is \n-0015cfb0: 7065 6e64 696e 672e 2052 6564 6566 696e pending. Redefin\n-0015cfc0: 6520 7468 6973 2063 616c 6c62 6163 6b20 e this callback \n-0015cfd0: 746f 2072 6573 706f 6e64 2074 6f20 4854 to respond to HT\n-0015cfe0: 5450 2047 4554 2072 6571 7565 7374 7320 TP GET requests \n-0015cff0: 7769 7468 2063 6f6e 7465 6e74 2c20 7365 with content, se\n-0015d000: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the htt\n-0015d090: 705f 6765 743c 2f61 3e3c 2f63 6f64 653e p_get\n-0015d0a0: 2048 5454 5020 4745 5420 706c 7567 696e HTTP GET plugin\n-0015d0b0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail\n-0015d0c0: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK
    \n-0015d0e0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n-0015d1a0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n-0015d1c0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n-0015d1d0: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n-0015d1e0: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to \n-0015d2b0: 736f 6170 3a3a 6667 6574 3c2f 613e 3c2f soap::fget is the int\n-0015d2d0: 6572 6e61 6c20 7374 6174 6963 2066 756e ernal static fun\n-0015d2e0: 6374 696f 6e20 3c63 6f64 653e 6874 7470 ction http\n-0015d2f0: 5f67 6574 3c2f 636f 6465 3e20 7468 6174 _get that\n-0015d300: 2072 6574 7572 6e73 2074 6865 203c 636f returns the #SOAP_GET_MET\n-0015d320: 484f 443c 2f63 6f64 653e 2065 7272 6f72 HOD error\n-0015d330: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fput

    .

    \n-0015d370: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soa\n-0015d440: 703a 3a66 7075 743c 2f61 3e29 2873 7472 p::fput)(str\n-0015d450: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-0015d460: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-0015d470: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-0015d480: 616c 6c65 6420 6279 2074 6865 2073 6572 alled by the ser\n-0015d490: 7669 6365 2064 6973 7061 7463 6865 7220 vice dispatcher \n-0015d4a0: 7768 656e 2061 6e20 4854 5450 2050 5554 when an HTTP PUT\n-0015d4b0: 2072 6571 7565 7374 2069 7320 7065 6e64 request is pend\n-0015d4c0: 696e 672e 2052 6564 6566 696e 6520 7468 ing. Redefine th\n-0015d4d0: 6973 2063 616c 6c62 6163 6b20 746f 2072 is callback to r\n-0015d4e0: 6573 706f 6e64 2074 6f20 4854 5450 2050 espond to HTTP P\n-0015d4f0: 5554 2072 6571 7565 7374 732c 2073 6565 UT requests, see\n-0015d500: 2074 6865 203c 636f 6465 3e3c 6120 636c the htt\n-0015d590: 705f 706f 7374 3c2f 613e 3c2f 636f 6465 p_post HTTP POST plug\n-0015d5b0: 696e 2066 6f72 206d 6f72 6520 6465 7461 in for more deta\n-0015d5c0: 696c 732e 2052 6574 7572 6e73 203c 636f ils. Returns #SOAP_OK or a s\n-0015d6a0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status error code\n-0015d6c0: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n-0015d6d0: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n-0015d6e0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap\n-0015d7b0: 3a3a 6670 7574 3c2f 613e 3c2f 636f 6465 ::fput is the interna\n-0015d7d0: 6c20 7374 6174 6963 2066 756e 6374 696f l static functio\n-0015d7e0: 6e20 3c63 6f64 653e 6874 7470 5f70 7574 n http_put\n-0015d7f0: 3c2f 636f 6465 3e20 7468 6174 2072 6574 that ret\n-0015d800: 7572 6e73 2074 6865 203c 636f 6465 3e23 urns the #\n-0015d810: 534f 4150 5f50 5554 5f4d 4554 484f 443c SOAP_PUT_METHOD<\n-0015d820: 2f63 6f64 653e 2065 7272 6f72 2e3c 2f70 /code> error..

    .f\n-0015d860: 7061 7463 683c 2f68 333e 0a3c 703e 3c63 patch

    .

    int (s\n-0015d940: 6f61 703a 3a66 7061 7463 683c 2f61 3e29 oap::fpatch)\n-0015d950: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0015d960: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .<\n-0015d970: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-0015d980: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n-0015d990: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-0015d9a0: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP\n-0015d9b0: 2050 4154 4348 2072 6571 7565 7374 2069 PATCH request i\n-0015d9c0: 7320 7065 6e64 696e 672e 2052 6564 6566 s pending. Redef\n-0015d9d0: 696e 6520 7468 6973 2063 616c 6c62 6163 ine this callbac\n-0015d9e0: 6b20 746f 2072 6573 706f 6e64 2074 6f20 k to respond to \n-0015d9f0: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque\n-0015da00: 7374 732c 2073 6565 2074 6865 203c 636f sts, see the http_post
    HTTP P\n-0015dab0: 4f53 5420 706c 7567 696e 2066 6f72 206d OST plugin for m\n-0015dac0: 6f72 6520 6465 7461 696c 732e 2052 6574 ore details. Ret\n-0015dad0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-0015dae0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-0015daf0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-0015dbb0: 7573 3c2f 613e 3c2f 636f 6465 3e20 6572 us er\n-0015dbc0: 726f 7220 636f 6465 2e20 5468 6520 6275 ror code. The bu\n-0015dbd0: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n-0015dbe0: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fp\n-0015dcc0: 6174 6368 3c2f 613e 3c2f 636f 6465 3e20 atch
    \n-0015dcd0: 6973 2074 6865 2069 6e74 6572 6e61 6c20 is the internal \n-0015dce0: 7374 6174 6963 2066 756e 6374 696f 6e20 static function \n-0015dcf0: 3c63 6f64 653e 6874 7470 5f70 6174 6368 http_patch\n-0015dd00: 3c2f 636f 6465 3e20 7468 6174 2072 6574 that ret\n-0015dd10: 7572 6e73 2074 6865 203c 636f 6465 3e23 urns the #\n-0015dd20: 534f 4150 5f50 4154 4348 5f4d 4554 484f SOAP_PATCH_METHO\n-0015dd30: 443c 2f63 6f64 653e 2065 7272 6f72 2e3c D error.<\n-0015dd40: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n-0015dd70: 0a66 6465 6c3c 2f68 333e 0a3c 703e 3c63 .fdel

    .

    int (s\n-0015de50: 6f61 703a 3a66 6465 6c3c 2f61 3e29 2873 oap::fdel)(s\n-0015de60: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0015de70: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n-0015de80: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n-0015de90: 2063 616c 6c65 6420 6279 2074 6865 2073 called by the s\n-0015dea0: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n-0015deb0: 7220 7768 656e 2061 6e20 4854 5450 2044 r when an HTTP D\n-0015dec0: 454c 4554 4520 7265 7175 6573 7420 6973 ELETE request is\n-0015ded0: 2070 656e 6469 6e67 2e20 5265 6465 6669 pending. Redefi\n-0015dee0: 6e65 2074 6869 7320 6361 6c6c 6261 636b ne this callback\n-0015def0: 2074 6f20 7265 7370 6f6e 6420 746f 2048 to respond to H\n-0015df00: 5454 5020 4445 4c45 5445 2072 6571 7565 TTP DELETE reque\n-0015df10: 7374 732c 2073 6565 2074 6865 203c 636f sts, see the http_post HTTP P\n-0015dfc0: 4f53 5420 706c 7567 696e 2066 6f72 206d OST plugin for m\n-0015dfd0: 6f72 6520 6465 7461 696c 732e 2052 6574 ore details. Ret\n-0015dfe0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-0015dff0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-0015e000: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-0015e0c0: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-0015e0d0: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-0015e0e0: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-0015e0f0: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-0015e100: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so\n-0015e1d0: 6170 3a3a 6664 656c 3c2f 613e 3c2f 636f ap::fdel is the inter\n-0015e1f0: 6e61 6c20 7374 6174 6963 2066 756e 6374 nal static funct\n-0015e200: 696f 6e20 3c63 6f64 653e 6874 7470 5f64 ion http_d\n-0015e210: 656c 3c2f 636f 6465 3e20 7468 6174 2072 el that r\n-0015e220: 6574 7572 6e73 2074 6865 203c 636f 6465 eturns the #SOAP_DEL_METHO\n-0015e240: 443c 2f63 6f64 653e 2065 7272 6f72 2e3c D error.<\n-0015e250: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n-0015e280: 0a66 6f70 743c 2f68 333e 0a3c 703e 3c63 .fopt

    .

    int (s\n-0015e360: 6f61 703a 3a66 6f70 743c 2f61 3e29 2873 oap::fopt)(s\n-0015e370: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0015e380: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n-0015e390: 4361 6c6c 6564 2062 7920 7468 6520 7365 Called by the se\n-0015e3a0: 7276 6963 6520 6469 7370 6174 6368 6572 rvice dispatcher\n-0015e3b0: 2077 6865 6e20 616e 2048 5454 5020 4f50 when an HTTP OP\n-0015e3c0: 5449 4f4e 2072 6571 7565 7374 2069 7320 TION request is \n-0015e3d0: 7065 6e64 696e 672e 2052 6564 6566 696e pending. Redefin\n-0015e3e0: 6520 7468 6973 2063 616c 6c62 6163 6b20 e this callback \n-0015e3f0: 746f 2072 6573 706f 6e64 2074 6f20 4854 to respond to HT\n-0015e400: 5450 204f 5054 494f 4e20 7265 7175 6573 TP OPTION reques\n-0015e410: 7473 2c20 7365 6520 7468 6520 3c63 6f64 ts, see the http_post HTTP PO\n-0015e4c0: 5354 2070 6c75 6769 6e20 666f 7220 6d6f ST plugin for mo\n-0015e4d0: 7265 2064 6574 6169 6c73 2e20 5265 7475 re details. Retu\n-0015e4e0: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-0015e4f0: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-0015e500: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-0015e5c0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-0015e5d0: 7429 2065 7272 6f72 2063 6f64 652e 2054 t) error code. T\n-0015e5e0: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func\n-0015e5f0: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to\n-0015e600: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n-0015e6d0: 703a 3a66 6f70 743c 2f61 3e3c 2f63 6f64 p::fopt is the intern\n-0015e6f0: 616c 2073 7461 7469 6320 6675 6e63 7469 al static functi\n-0015e700: 6f6e 203c 636f 6465 3e68 7474 705f 3230 on http_20\n-0015e710: 303c 2f63 6f64 653e 2074 6861 7420 7265 0 that re\n-0015e720: 7475 726e 7320 4854 5450 2032 3030 204f turns HTTP 200 O\n-0015e730: 4b2e 3c2f 703e 0a3c 6833 3e3c 6120 636c K.

    .

    <\n-0015e760: 2f61 3e0a 6668 6561 643c 2f68 333e 0a3c /a>.fhead

    .<\n-0015e770: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (\n-0015e840: 736f 6170 3a3a 6668 6561 643c 2f61 3e29 soap::fhead)\n-0015e850: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0015e860: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .<\n-0015e870: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-0015e880: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n-0015e890: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-0015e8a0: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP\n-0015e8b0: 2048 4541 4420 7265 7175 6573 7420 6973 HEAD request is\n-0015e8c0: 2070 656e 6469 6e67 2e20 5265 6465 6669 pending. Redefi\n-0015e8d0: 6e65 2074 6869 7320 6361 6c6c 6261 636b ne this callback\n-0015e8e0: 2074 6f20 7265 7370 6f6e 6420 746f 2048 to respond to H\n-0015e8f0: 5454 5020 4845 4144 2072 6571 7565 7374 TTP HEAD request\n-0015e900: 7320 6d6f 7265 2073 7065 6369 6669 6361 s more specifica\n-0015e910: 6c6c 792e 2052 6574 7572 6e73 203c 636f lly. Returns #SOAP_OK or a s\n-0015e9f0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n-0015ea10: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n-0015ea20: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n-0015ea30: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-0015ea40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fhead is the\n-0015eb20: 2069 6e74 6572 6e61 6c20 7374 6174 6963 internal static\n-0015eb30: 2066 756e 6374 696f 6e20 3c63 6f64 653e function \n-0015eb40: 6874 7470 5f32 3030 3c2f 636f 6465 3e20 http_200 \n-0015eb50: 7468 6174 2072 6574 7572 6e73 2048 5454 that returns HTT\n-0015eb60: 5020 3230 3020 4f4b 2e3c 2f70 3e0a 3c68 P 200 OK.

    .
    .fform\n-0015eba0: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

    .

    i\n-0015ebb0: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap::\n-0015ec80: 6666 6f72 6d3c 2f61 3e29 2873 7472 7563 fform)(struc\n-0015ec90: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

    .

    This\n-0015ecb0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-0015ecc0: 6c65 6420 6279 2074 6865 2048 5454 5020 led by the HTTP \n-0015ecd0: 464f 524d 2068 616e 646c 6572 2070 6c75 FORM handler plu\n-0015ece0: 6769 6e20 746f 2070 6172 7365 2048 544d gin to parse HTM\n-0015ecf0: 4c20 666f 726d 7320 7265 6365 6976 6564 L forms received\n-0015ed00: 2077 6974 6820 4854 5450 2050 4f53 5420 with HTTP POST \n-0015ed10: 616e 6420 5055 5420 7265 7175 6573 7473 and PUT requests\n-0015ed20: 2c20 7365 6520 7468 6520 3c63 6f64 653e , see the \n-0015ed30: 3b3a 6874 7470 5f66 6f72 6d3c 2f63 6f64 ;:http_form HTTP FORM plu\n-0015ed50: 6769 6e20 666f 7220 6d6f 7265 2064 6574 gin for more det\n-0015ed60: 6169 6c73 2e20 5468 6520 4854 5450 2062 ails. The HTTP b\n-0015ed70: 6f64 7920 7769 7468 2074 6865 2066 6f72 ody with the for\n-0015ed80: 6d20 6461 7461 2073 686f 756c 6420 6265 m data should be\n-0015ed90: 2070 6172 7365 6420 6279 2074 6869 7320 parsed by this \n-0015eda0: 6361 6c6c 6261 636b 2c20 6f74 6865 7277 callback, otherw\n-0015edb0: 6973 6520 4854 5450 206b 6565 702d 616c ise HTTP keep-al\n-0015edc0: 6976 6520 6d65 7373 6167 6573 2077 696c ive messages wil\n-0015edd0: 6c20 656e 6420 7570 206f 7574 206f 6620 l end up out of \n-0015ede0: 7379 6e63 2061 7320 6120 7265 7375 6c74 sync as a result\n-0015edf0: 206f 6620 7468 6520 6375 7272 656e 7420 of the current \n-0015ee00: 706f 7369 7469 6f6e 206e 6f74 2062 6569 position not bei\n-0015ee10: 6e67 2061 6476 616e 6365 6420 746f 2074 ng advanced to t\n-0015ee20: 6865 2065 6e64 206f 6620 7468 6520 4854 he end of the HT\n-0015ee30: 5450 2062 6f64 792e 2052 6574 7572 6e73 TP body. Returns\n-0015ee40: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n-0015ee50: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n-0015ef30: 6572 726f 7220 636f 6465 2e20 4e6f 2062 error code. No b\n-0015ef40: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-0015ef50: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to \n-0015ef60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n-0015f030: 3a3a 6666 6f72 6d3c 2f61 3e3c 2f63 6f64 ::fform.

    .

    \n-0015f070: 3c2f 613e 0a66 6865 6164 6572 3c2f 6833 .fheader.

    int (\n-0015f090: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fhea\n-0015f160: 6465 723c 2f61 3e29 2873 7472 7563 7420 der)(struct \n-0015f170: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

    .

    This c\n-0015f190: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-0015f1a0: 6420 696d 6d65 6469 6174 656c 7920 6166 d immediately af\n-0015f1b0: 7465 7220 7061 7273 696e 6720 6120 534f ter parsing a SO\n-0015f1c0: 4150 2048 6561 6465 7220 696e 746f 2074 AP Header into t\n-0015f1d0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::header structu\n-0015f2b0: 7265 2e20 5468 6520 534f 4150 2048 6561 re. The SOAP Hea\n-0015f2c0: 6465 7220 7374 7275 6374 7572 6520 3c63 der structure soap\n-0015f390: 3a3a 6865 6164 6572 3c2f 613e 3c2f 636f ::header can be inspe\n-0015f3b0: 6374 6564 2062 7920 7468 6973 2066 756e cted by this fun\n-0015f3c0: 6374 696f 6e20 616e 6420 7665 7269 6669 ction and verifi\n-0015f3d0: 6564 206f 7220 7265 6a65 6374 6564 2062 ed or rejected b\n-0015f3e0: 6566 6f72 6520 7468 6520 7265 7374 206f efore the rest o\n-0015f3f0: 6620 7468 6520 6d65 7373 6167 6520 7769 f the message wi\n-0015f400: 7468 2074 6865 2053 4f41 5020 426f 6479 th the SOAP Body\n-0015f410: 2069 7320 636f 6e73 756d 6564 2e20 5265 is consumed. Re\n-0015f420: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-0015f430: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-0015f440: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-0015f500: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n-0015f510: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n-0015f520: 204e 6f20 6275 696c 742d 696e 2066 756e No built-in fun\n-0015f530: 6374 696f 6e20 6973 2061 7373 6967 6e65 ction is assigne\n-0015f540: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fheader.

    .<\n-0015f630: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fign\n-0015f660: 6f72 653c 2f68 333e 0a3c 703e 3c63 6f64 ore

    .

    int (soa\n-0015f740: 703a 3a66 6967 6e6f 7265 3c2f 613e 2928 p::fignore)(\n-0015f750: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-0015f760: 702c 2063 6f6e 7374 2063 6861 7220 2a74 p, const char *t\n-0015f770: 6167 293c 2f63 6f64 653e 3c2f 703e 0a3c ag)

    .<\n-0015f780: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-0015f790: 6973 2063 616c 6c65 6420 7768 656e 2061 is called when a\n-0015f7a0: 6e20 756e 7265 636f 676e 697a 6564 2058 n unrecognized X\n-0015f7b0: 4d4c 2065 6c65 6d65 6e74 2077 6173 2065 ML element was e\n-0015f7c0: 6e63 6f75 6e74 6572 6564 206f 6e20 7468 ncountered on th\n-0015f7d0: 6520 696e 7075 7420 7468 6174 2063 6f75 e input that cou\n-0015f7e0: 6c64 2062 6520 6967 6e6f 7265 6420 6465 ld be ignored de\n-0015f7f0: 7065 6e64 696e 6720 6f6e 2073 6f6d 6520 pending on some \n-0015f800: 7370 6563 6966 6965 6420 6c6f 6769 632e specified logic.\n-0015f810: 2054 6865 203c 636f 6465 3e74 6167 3c2f The tag parameter \n-0015f830: 6973 2074 6865 206f 6666 656e 6469 6e67 is the offending\n-0015f840: 2058 4d4c 2065 6c65 6d65 6e74 2074 6167 XML element tag\n-0015f850: 206e 616d 6520 7374 7269 6e67 2e20 5468 name string. Th\n-0015f860: 6520 6361 6c6c 6261 636b 2073 686f 756c e callback shoul\n-0015f870: 6420 7265 7475 726e 203c 636f 6465 3e23 d return #\n-0015f880: 534f 4150 5f4f 4b3c 2f63 6f64 653e 2074 SOAP_OK t\n-0015f890: 6f20 6967 6e6f 7265 2074 6865 2065 6c65 o ignore the ele\n-0015f8a0: 6d65 6e74 206f 7220 7265 7475 726e 2061 ment or return a\n-0015f8b0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soap_st\n-0015f970: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n-0015f980: 6572 726f 7220 636f 6465 2073 7563 6820 error code such \n-0015f990: 6173 203c 636f 6465 3e23 534f 4150 5f54 as #SOAP_T\n-0015f9a0: 4147 5f4d 4953 4d41 5443 483c 2f63 6f64 AG_MISMATCH to trigger a \n-0015f9c0: 7661 6c69 6461 7469 6f6e 2065 7272 6f72 validation error\n-0015f9d0: 2e20 5468 6973 2063 616c 6c62 6163 6b20 . This callback \n-0015f9e0: 616c 736f 206f 7665 7272 6964 6573 203c also overrides <\n-0015f9f0: 636f 6465 3e6d 7573 7455 6e64 6572 7374 code>mustUnderst\n-0015fa00: 616e 643c 2f63 6f64 653e 2061 7474 7269 and attri\n-0015fa10: 6275 7465 7320 6f6e 2075 6e72 6563 6f67 butes on unrecog\n-0015fa20: 6e69 7a65 6420 534f 4150 2048 6561 6465 nized SOAP Heade\n-0015fa30: 7220 656c 656d 656e 7473 2074 6861 7420 r elements that \n-0015fa40: 6e6f 726d 616c 6c79 2072 6169 7365 2066 normally raise f\n-0015fa50: 6175 6c74 732e 2049 7420 6973 2073 7472 aults. It is str\n-0015fa60: 6f6e 676c 7920 7265 636f 6d6d 656e 6465 ongly recommende\n-0015fa70: 6420 7468 6174 2074 6865 2063 616c 6c62 d that the callb\n-0015fa80: 6163 6b20 7265 7475 726e 7320 3c63 6f64 ack returns #SOAP_MUSTUNDE\n-0015faa0: 5253 5441 4e44 3c2f 636f 6465 3e20 7768 RSTAND wh\n-0015fab0: 656e 203c 636f 6465 3e3c 6120 636c 6173 en soap::mustUnder\n-0015fb80: 7374 616e 643c 2f61 3e3c 2f63 6f64 653e stand\n-0015fb90: 2021 3d20 3c63 6f64 653e 303c 2f63 6f64 != 0. Returns #SOAP_OK or a so\n-0015fc80: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n-0015fca0: 2063 6f64 652e 204e 6f20 6275 696c 742d code. No built-\n-0015fcb0: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a\n-0015fcc0: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fig\n-0015fda0: 6e6f 7265 3c2f 613e 3c2f 636f 6465 3e2e nore.\n-0015fdb0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fsvalidate.

    int (\n-0015fe00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fsva\n-0015fea0: 6c69 6461 7465 3c2f 613e 2928 7374 7275 lidate)(stru\n-0015feb0: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-0015fec0: 6f6e 7374 2063 6861 7220 2a70 6174 7465 onst char *patte\n-0015fed0: 726e 2c20 636f 6e73 7420 6368 6172 202a rn, const char *\n-0015fee0: 7374 7269 6e67 293c 2f63 6f64 653e 3c2f string).

    This callb\n-0015ff00: 6163 6b20 6973 2063 616c 6c65 6420 746f ack is called to\n-0015ff10: 2076 616c 6964 6174 6520 6120 7374 7269 validate a stri\n-0015ff20: 6e67 2061 6761 696e 7374 2061 6e20 584d ng against an XM\n-0015ff30: 4c20 7265 6765 7820 7061 7474 6572 6e2e L regex pattern.\n-0015ff40: 2050 6174 7465 726e 7320 7573 6520 584d Patterns use XM\n-0015ff50: 4c20 7363 6865 6d61 2072 6567 6578 2073 L schema regex s\n-0015ff60: 796e 7461 782e 2054 6869 7320 6361 6c6c yntax. This call\n-0015ff70: 6261 636b 2061 6c6c 6f77 7320 7573 6572 back allows user\n-0015ff80: 2d64 6566 696e 6564 2070 6174 7465 726e -defined pattern\n-0015ff90: 2076 616c 6964 6174 696f 6e20 7468 6174 validation that\n-0015ffa0: 2069 7320 6e6f 726d 616c 6c79 2064 6973 is normally dis\n-0015ffb0: 6162 6c65 642e 2052 6574 7572 6e73 203c abled. Returns <\n-0015ffc0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK when the st\n-0015ffe0: 7269 6e67 206d 6174 6368 6573 2074 6865 ring matches the\n-0015fff0: 2070 6174 7465 726e 206f 7220 3c63 6f64 pattern or #SOAP_TYPE when the str\n-00160020: 696e 6720 646f 6573 206e 6f74 206d 6174 ing does not mat\n-00160030: 6368 2e20 4e6f 2062 7569 6c74 2d69 6e20 ch. No built-in \n-00160040: 6675 6e63 7469 6f6e 2069 7320 6173 7369 function is assi\n-00160050: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fsvali\n-00160100: 6461 7465 3c2f 613e 3c2f 636f 6465 3e2e date.\n-00160110: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fwvalidate.

    int (\n-00160160: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n-00160200: 3a66 7776 616c 6964 6174 653c 2f61 3e29 :fwvalidate)\n-00160210: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-00160220: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n-00160230: 7061 7474 6572 6e2c 2063 6f6e 7374 2077 pattern, const w\n-00160240: 6368 6172 5f74 202a 7374 7269 6e67 293c char_t *string)<\n-00160250: 2f63 6f64 653e 2054 6869 7320 6361 6c6c /code> This call\n-00160260: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t\n-00160270: 6f20 7661 6c69 6461 7465 2061 2077 6964 o validate a wid\n-00160280: 6520 7374 7269 6e67 2061 6761 696e 7374 e string against\n-00160290: 2061 6e20 584d 4c20 7265 6765 7820 7061 an XML regex pa\n-001602a0: 7474 6572 6e2e 2050 6174 7465 726e 7320 ttern. Patterns \n-001602b0: 7573 6520 584d 4c20 7363 6865 6d61 2072 use XML schema r\n-001602c0: 6567 6578 2073 796e 7461 782e 2054 6869 egex syntax. Thi\n-001602d0: 7320 6361 6c6c 6261 636b 2061 6c6c 6f77 s callback allow\n-001602e0: 7320 7573 6572 2d64 6566 696e 6564 2070 s user-defined p\n-001602f0: 6174 7465 726e 2076 616c 6964 6174 696f attern validatio\n-00160300: 6e20 7468 6174 2069 7320 6e6f 726d 616c n that is normal\n-00160310: 6c79 2064 6973 6162 6c65 642e 2052 6574 ly disabled. Ret\n-00160320: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00160330: 5f4f 4b3c 2f63 6f64 653e 2077 6865 6e20 _OK when \n-00160340: 7468 6520 7374 7269 6e67 206d 6174 6368 the string match\n-00160350: 6573 2074 6865 2070 6174 7465 726e 206f es the pattern o\n-00160360: 7220 3c63 6f64 653e 2353 4f41 505f 5459 r #SOAP_TY\n-00160370: 5045 3c2f 636f 6465 3e20 7768 656e 2074 PE when t\n-00160380: 6865 2073 7472 696e 6720 646f 6573 206e he string does n\n-00160390: 6f74 206d 6174 6368 2e20 4e6f 2062 7569 ot match. No bui\n-001603a0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i\n-001603b0: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to s\n-00160460: 6f61 703a 3a66 7776 616c 6964 6174 653c oap::fwvalidate<\n-00160470: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n-00160480: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fse\n-001604b0: 7465 7272 6f72 3c2f 6833 3e0a 3c70 3e3c terror

    .

    <\n-001604c0: 636f 6465 3e76 6f69 6420 283c 6120 636c code>void (soa\n-00160570: 703a 3a66 7365 7465 7272 6f72 3c2f 613e p::fseterror\n-00160580: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-00160590: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n-001605a0: 2a2a 636f 6465 2c20 636f 6e73 7420 6368 **code, const ch\n-001605b0: 6172 202a 2a73 7472 696e 6729 3c2f 636f ar **string)

    .

    This \n-001605d0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n-001605e0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-001605f0: 2077 6865 6e20 616e 2065 7272 6f72 2069 when an error i\n-00160600: 7320 7261 6973 6564 2074 6f20 616c 6c6f s raised to allo\n-00160610: 7720 696e 7370 6563 7469 6f6e 206f 7220 w inspection or \n-00160620: 6f76 6572 7269 6469 6e67 206f 6620 7468 overriding of th\n-00160630: 6520 6661 756c 7420 636f 6465 206f 7220 e fault code or \n-00160640: 6661 756c 7420 7374 7269 6e67 206d 6573 fault string mes\n-00160650: 7361 6765 7320 6265 666f 7265 2074 6865 sages before the\n-00160660: 2065 7272 6f72 2069 7320 7265 706f 7274 error is report\n-00160670: 6564 206f 7220 7472 616e 736d 6974 7465 ed or transmitte\n-00160680: 642e 204e 6f20 6275 696c 742d 696e 2066 d. No built-in f\n-00160690: 756e 6374 696f 6e20 6973 2061 7373 6967 unction is assig\n-001606a0: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to s\n-00160750: 6f61 703a 3a66 7365 7465 7272 6f72 3c2f oap::fseterror.

    .<\n-00160770: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fope\n-001607a0: 6e3c 2f68 333e 0a3c 703e 3c63 6f64 653e n

    .

    \n-001607b0: 534f 4150 5f53 4f43 4b45 5420 283c 6120 SOAP_SOCKET (soap::fo\n-00160860: 7065 6e3c 2f61 3e29 2873 7472 7563 7420 pen)(struct \n-00160870: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n-00160880: 7420 6368 6172 202a 656e 6470 6f69 6e74 t char *endpoint\n-00160890: 2c20 636f 6e73 7420 6368 6172 202a 686f , const char *ho\n-001608a0: 7374 2c20 696e 7420 706f 7274 293c 2f63 st, int port)

    .

    This\n-001608c0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-001608d0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin\n-001608e0: 6520 6174 2074 6865 2063 6c69 656e 742d e at the client-\n-001608f0: 7369 6465 2062 7920 3c63 6f64 653e 3c61 side by soap_co\n-00160980: 6e6e 6563 743c 2f61 3e3c 2f63 6f64 653e nnect\n-00160990: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or soap_connec\n-00160a10: 745f 636f 6d6d 616e 643c 2f61 3e3c 2f63 t_command to open a T\n-00160a30: 4350 206f 7220 5544 5020 636f 6e6e 6563 CP or UDP connec\n-00160a40: 7469 6f6e 2074 6f20 6120 7365 7276 6572 tion to a server\n-00160a50: 2073 7065 6369 6669 6564 2061 7420 616e specified at an\n-00160a60: 2065 6e64 706f 696e 742e 2050 6172 616d endpoint. Param\n-00160a70: 6574 6572 7320 3c63 6f64 653e 686f 7374 eters host\n-00160a80: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and port ar\n-00160aa0: 6520 6d69 6372 6f2d 7061 7273 6564 2066 e micro-parsed f\n-00160ab0: 726f 6d20 3c63 6f64 653e 656e 6470 6f69 rom endpoi\n-00160ac0: 6e74 3c2f 636f 6465 3e20 6265 666f 7265 nt before\n-00160ad0: 2062 6569 6e67 2070 6173 7365 6420 746f being passed to\n-00160ae0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fopen. Return\n-00160ba0: 7320 6120 7661 6c69 6420 736f 636b 6574 s a valid socket\n-00160bb0: 206f 7220 3c63 6f64 653e 2353 4f41 505f or #SOAP_\n-00160bc0: 494e 5641 4c49 445f 534f 434b 4554 3c2f INVALID_SOCKET with a soap::e\n-00160c90: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e20 rror \n-00160ca0: 7365 7420 746f 2061 203c 636f 6465 3e3c set to a <\n-00160cb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00160cc0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00160cd0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n-00160ce0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n-00160cf0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n-00160d00: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n-00160d10: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n-00160d20: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n-00160d30: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n-00160d40: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n-00160d50: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n-00160d60: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n-00160d70: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n-00160d80: 6f72 2063 6f64 6520 616e 6420 3c63 6f64 or code and soap::errnum set to\n-00160e30: 203c 636f 6465 3e65 7272 6e6f 3c2f 636f errno of the conne\n-00160e50: 6374 696f 6e20 6661 696c 7572 652e 2054 ction failure. T\n-00160e60: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func\n-00160e70: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to\n-00160e80: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fopen is tcp_connect.

    .

    .faccept.

    SOA\n-00160fa0: 505f 534f 434b 4554 2028 3c61 2063 6c61 P_SOCKET (soap::facc\n-00161060: 6570 743c 2f61 3e29 2873 7472 7563 7420 ept)(struct \n-00161070: 736f 6170 202a 736f 6170 2c20 534f 4150 soap *soap, SOAP\n-00161080: 5f53 4f43 4b45 5420 732c 2073 7472 7563 _SOCKET s, struc\n-00161090: 7420 736f 636b 6164 6472 202a 612c 2069 t sockaddr *a, i\n-001610a0: 6e74 202a 6e29 3c2f 636f 6465 3e3c 2f70 nt *n).

    This callba\n-001610c0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-001610d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s\n-00161150: 6f61 705f 6163 6365 7074 3c2f 613e 3c2f oap_accept (or the C+\n-00161170: 2b20 7365 7276 6963 6520 636c 6173 7320 + service class \n-00161180: 3c63 6f64 653e 6163 6365 7074 3c2f 636f accept method) to w\n-001611a0: 6169 7420 666f 7220 616e 6420 6163 6365 ait for and acce\n-001611b0: 7074 2061 2073 6f63 6b65 7420 636f 6e6e pt a socket conn\n-001611c0: 6563 7469 6f6e 2072 6571 7565 7374 6564 ection requested\n-001611d0: 2062 7920 6120 636c 6965 6e74 2e20 5265 by a client. Re\n-001611e0: 7475 726e 7320 6120 7661 6c69 6420 736f turns a valid so\n-001611f0: 636b 6574 206f 7220 3c63 6f64 653e 2353 cket or #S\n-00161200: 4f41 505f 494e 5641 4c49 445f 534f 434b OAP_INVALID_SOCK\n-00161210: 4554 3c2f 636f 6465 3e20 7768 656e 2061 ET when a\n-00161220: 6e20 6572 726f 7220 6f63 6375 7272 6564 n error occurred\n-00161230: 2061 6e64 2073 6574 7320 3c63 6f64 653e and sets \n-00161240: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::erro\n-001612f0: 723c 2f61 3e3c 2f63 6f64 653e 2074 6f20 r to \n-00161300: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n-001613c0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n-001613d0: 7661 6c75 652e 2054 6865 2062 7569 6c74 value. The built\n-001613e0: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass\n-001613f0: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n-00161400: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00161410: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00161420: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00161430: 6761 3832 3439 6234 6332 3366 3636 3264 ga8249b4c23f662d\n-00161440: 6265 3638 3061 6430 6465 6566 3237 3461 be680ad0deef274a\n-00161450: 6538 2220 7469 746c 653d 2243 616c 6c62 e8\" title=\"Callb\n-00161460: 6163 6b20 7468 6174 2077 6169 7473 2066 ack that waits f\n-00161470: 6f72 2061 6e64 2061 6363 6570 7473 2061 or and accepts a\n-00161480: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti\n-00161490: 6f6e 2072 6571 7565 7374 6564 2062 7920 on requested by \n-001614a0: 6120 636c 6965 6e74 2e22 3e73 6f61 703a a client.\">soap:\n-001614b0: 3a66 6163 6365 7074 3c2f 613e 3c2f 636f :faccept is tcp\n-001614d0: 5f61 6363 6570 743c 2f63 6f64 653e 2e3c _accept.<\n-001614e0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n-00161510: 0a66 636c 6f73 653c 2f68 333e 0a3c 703e .fclose

    .

    \n-00161520: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soap\n-001615c0: 3a3a 6663 6c6f 7365 3c2f 613e 2928 7374 ::fclose)(st\n-001615d0: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n-001615e0: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-001615f0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-00161600: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en\n-00161610: 6769 6e65 2061 7420 7468 6520 636c 6965 gine at the clie\n-00161620: 6e74 2d73 6964 6520 746f 2063 6c6f 7365 nt-side to close\n-00161630: 2074 6865 2063 7572 7265 6e74 2073 6f63 the current soc\n-00161640: 6b65 7420 636f 6e6e 6563 7469 6f6e 2062 ket connection b\n-00161650: 6566 6f72 6520 6120 6e65 7720 736f 636b efore a new sock\n-00161660: 6574 2063 6f6e 6e65 6374 696f 6e20 6973 et connection is\n-00161670: 2065 7374 6162 6c69 7368 6564 2e20 5468 established. Th\n-00161680: 6973 2063 616c 6c62 6163 6b20 6d61 7920 is callback may \n-00161690: 6265 2063 616c 6c65 6420 6d75 6c74 6970 be called multip\n-001616a0: 6c65 2074 696d 6573 2028 652e 672e 2062 le times (e.g. b\n-001616b0: 7920 7468 6520 656e 6769 6e65 2061 6e64 y the engine and\n-001616c0: 2062 7920 706c 7567 696e 7329 2074 6f20 by plugins) to \n-001616d0: 636c 6f73 6520 7468 6520 7361 6d65 2073 close the same s\n-001616e0: 6f63 6b65 7420 3c63 6f64 653e 3c61 2063 ocket soap::socket\n-001617b0: 3c2f 613e 3c2f 636f 6465 3e2e 2043 6865 . Che\n-001617c0: 636b 7320 696e 7465 726e 616c 6c79 2069 cks internally i\n-001617d0: 6620 3c63 6f64 653e 3c61 2063 6c61 7373 f \n-00161890: 736f 6170 3a3a 736f 636b 6574 3c2f 613e soap::socket\n-001618a0: 3c2f 636f 6465 3e20 3d3d 203c 636f 6465 == #SOAP_INVALID_S\n-001618c0: 4f43 4b45 543c 2f63 6f64 653e 2062 6566 OCKET bef\n-001618d0: 6f72 6520 636c 6f73 696e 672c 2077 6869 ore closing, whi\n-001618e0: 6368 206d 6561 6e73 2074 6861 7420 7468 ch means that th\n-001618f0: 6520 736f 636b 6574 2077 6173 2061 6c72 e socket was alr\n-00161900: 6561 6479 2063 6c6f 7365 642e 2052 6574 eady closed. Ret\n-00161910: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00161920: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00161930: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-001619f0: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00161a00: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00161a10: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00161a20: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-00161a30: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::f\n-00161ad0: 636c 6f73 653c 2f61 3e3c 2f63 6f64 653e close\n-00161ae0: 2069 7320 3c63 6f64 653e 7463 705f 6469 is tcp_di\n-00161af0: 7363 6f6e 6e65 6374 3c2f 636f 6465 3e2e sconnect.\n-00161b00: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fresolve

    .\n-00161b40: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fres\n-00161bf0: 6f6c 7665 3c2f 613e 2928 7374 7275 6374 olve)(struct\n-00161c00: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-00161c10: 7374 2063 6861 7220 2a61 6464 722c 2073 st char *addr, s\n-00161c20: 7472 7563 7420 696e 5f61 6464 7220 2a69 truct in_addr *i\n-00161c30: 6e61 6464 7229 3c2f 636f 6465 3e3c 2f70 naddr).

    This callba\n-00161c50: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-00161c60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_bind\n-00161ce0: 3c2f 613e 3c2f 636f 6465 3e20 286f 7220 (or \n-00161cf0: 7468 6520 432b 2b20 7365 7276 6963 6520 the C++ service \n-00161d00: 636c 6173 7320 3c63 6f64 653e 6269 6e64 class bind\n-00161d10: 3c2f 636f 6465 3e20 6d65 7468 6f64 2920 method) \n-00161d20: 6174 2074 6865 2073 6572 7665 722d 7369 at the server-si\n-00161d30: 6465 2061 6e64 2062 7920 3c63 6f64 653e de and by \n-00161d40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_\n-00161dc0: 636f 6e6e 6563 743c 2f61 3e3c 2f63 6f64 connect or soap_conn\n-00161e50: 6563 745f 636f 6d6d 616e 643c 2f61 3e3c ect_command<\n-00161e60: 2f63 6f64 653e 2061 7420 7468 6520 636c /code> at the cl\n-00161e70: 6965 6e74 2d73 6964 6520 7769 7468 2061 ient-side with a\n-00161e80: 2068 6f73 7420 3c63 6f64 653e 6e61 6d65 host name\n-00161e90: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n-00161ea0: 7220 746f 2072 6573 6f6c 7665 2074 6f20 r to resolve to \n-00161eb0: 6164 6472 6573 7320 3c63 6f64 653e 696e address in\n-00161ec0: 6164 6472 3c2f 636f 6465 3e20 6279 2061 addr by a\n-00161ed0: 6464 7265 7373 2074 7261 6e73 6c61 7469 ddress translati\n-00161ee0: 6f6e 2e20 5768 656e 2073 7563 6365 7373 on. When success\n-00161ef0: 6675 6c20 7365 7473 2070 6172 616d 6574 ful sets paramet\n-00161f00: 6572 203c 636f 6465 3e69 6e61 6464 723c er inaddr<\n-00161f10: 2f63 6f64 653e 2061 6e64 2072 6574 7572 /code> and retur\n-00161f20: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n-00161f30: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n-00162000: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n-00162010: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n-00162020: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n-00162030: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n-00162040: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-001620e0: 6170 3a3a 6672 6573 6f6c 7665 3c2f 613e ap::fresolve\n-001620f0: 3c2f 636f 6465 3e20 6973 203c 636f 6465 is tcp_gethost.

    .

    .fconnect.

    int\n-00162160: 2028 3c61 2063 6c61 7373 3d22 656c 2220 (so\n-00162200: 6170 3a3a 6663 6f6e 6e65 6374 3c2f 613e ap::fconnect\n-00162210: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-00162220: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n-00162230: 2a65 6e64 706f 696e 742c 2063 6f6e 7374 *endpoint, const\n-00162240: 2063 6861 7220 2a68 6f73 742c 2069 6e74 char *host, int\n-00162250: 2070 6f72 7429 3c2f 636f 6465 3e3c 2f70 port).

    This callba\n-00162270: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-00162280: 7468 6520 656e 6769 6e65 2074 6f20 6f70 the engine to op\n-00162290: 7469 6f6e 616c 6c79 206f 7665 7272 6964 tionally overrid\n-001622a0: 6520 636c 6965 6e74 2d73 6964 6520 636f e client-side co\n-001622b0: 6e6e 6563 7469 6e67 2e20 5468 6520 7061 nnecting. The pa\n-001622c0: 7261 6d65 7465 7273 203c 636f 6465 3e68 rameters h\n-001622d0: 6f73 743c 2f63 6f64 653e 2061 6e64 203c ost and <\n-001622e0: 636f 6465 3e70 6f72 743c 2f63 6f64 653e code>port\n-001622f0: 2077 6572 6520 6d69 6372 6f2d 7061 7273 were micro-pars\n-00162300: 6564 2066 726f 6d20 7468 6520 3c63 6f64 ed from the endpoint prior to passi\n-00162330: 6e67 2074 6865 6d20 746f 2074 6869 7320 ng them to this \n-00162340: 6361 6c6c 6261 636b 2e20 5265 7475 726e callback. Return\n-00162350: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-00162360: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n-00162430: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-00162440: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No \n-00162450: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n-00162460: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n-00162470: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fconnec\n-00162520: 743c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 t..

    .f\n-00162560: 6469 7363 6f6e 6e65 6374 3c2f 6833 3e0a disconnect

    .\n-00162570: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fdiscon\n-00162620: 6e65 6374 3c2f 613e 2928 7374 7275 6374 nect)(struct\n-00162630: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This \n-00162650: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n-00162660: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-00162670: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_c\n-001626f0: 6c6f 7365 736f 636b 3c2f 613e 3c2f 636f losesock before the <\n-00162710: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fclo\n-001627b0: 7365 3c2f 613e 3c2f 636f 6465 3e20 6361 se ca\n-001627c0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n-001627d0: 2074 6f20 7368 7574 646f 776e 2f64 6973 to shutdown/dis\n-001627e0: 636f 6e6e 6563 742e 2052 6574 7572 6e73 connect. Returns\n-001627f0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n-00162800: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n-001628e0: 6572 726f 7220 636f 6465 2e20 4e6f 2062 error code. No b\n-001628f0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-00162900: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to \n-00162910: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap:\n-001629b0: 3a66 6469 7363 6f6e 6e65 6374 3c2f 613e :fdisconnect\n-001629c0: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..fclose\n-00162a00: 736f 636b 6574 3c2f 6833 3e0a 3c70 3e3c socket.

    <\n-00162a10: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap\n-00162aa0: 3a3a 6663 6c6f 7365 736f 636b 6574 3c2f ::fclosesocket)(struct soap \n-00162ac0: 2a73 6f61 702c 2053 4f41 505f 534f 434b *soap, SOAP_SOCK\n-00162ad0: 4554 2073 6f63 6b29 3c2f 636f 6465 3e3c ET sock)<\n-00162ae0: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call\n-00162af0: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t\n-00162b00: 6f20 636c 6f73 6520 6120 736f 636b 6574 o close a socket\n-00162b10: 2062 7920 7468 6520 656e 6769 6e65 2e20 by the engine. \n-00162b20: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-00162b30: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-00162b40: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-00162c00: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-00162c10: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n-00162c20: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n-00162c30: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n-00162c40: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soa\n-00162cd0: 703a 3a66 636c 6f73 6573 6f63 6b65 743c p::fclosesocket<\n-00162ce0: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is tcp_closesoc\n-00162d00: 6b65 743c 2f63 6f64 653e 2e3c 2f70 3e0a ket.

    .\n-00162d10: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fsh\n-00162d40: 7574 646f 776e 736f 636b 6574 3c2f 6833 utdownsocket.

    int (\n-00162d60: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fshu\n-00162df0: 7464 6f77 6e73 6f63 6b65 743c 2f61 3e29 tdownsocket)\n-00162e00: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-00162e10: 6170 2c20 534f 4150 5f53 4f43 4b45 5420 ap, SOAP_SOCKET \n-00162e20: 736f 636b 2c20 696e 7420 686f 7729 3c2f sock, int how)

    .

    Thi\n-00162e40: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n-00162e50: 6c6c 6564 2074 6f20 7368 7574 2064 6f77 lled to shut dow\n-00162e60: 6e20 6120 736f 636b 6574 2062 7920 7468 n a socket by th\n-00162e70: 6520 656e 6769 6e65 2e20 5265 7475 726e e engine. Return\n-00162e80: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-00162e90: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n-00162f60: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-00162f70: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n-00162f80: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n-00162f90: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n-00162fa0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n-00163030: 3a66 7368 7574 646f 776e 736f 636b 6574 :fshutdownsocket\n-00163040: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is <\n-00163050: 636f 6465 3e74 6370 5f73 6875 7464 6f77 code>tcp_shutdow\n-00163060: 6e73 6f63 6b65 743c 2f63 6f64 653e 2e3c nsocket.<\n-00163070: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n-001630a0: 0a66 706f 6c6c 3c2f 6833 3e0a 3c70 3e3c .fpoll

    .

    <\n-001630b0: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap::fpol\n-00163180: 6c3c 2f61 3e29 2873 7472 7563 7420 736f l)(struct so\n-00163190: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n-001631a0: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-001631b0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-001631c0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n-001631d0: 2077 6169 7420 666f 7220 6163 7469 7669 wait for activi\n-001631e0: 7479 206f 6e20 7468 6520 3c63 6f64 653e ty on the \n-001631f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so\n-001632b0: 636b 6574 3c2f 613e 3c2f 636f 6465 3e20 cket \n-001632c0: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap::master socket \n-001633a0: 7573 696e 6720 3c63 6f64 653e 706f 6c6c using poll\n-001633b0: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or select. \n-001633d0: 5469 6d65 7320 6f75 7420 7768 656e 203c Times out when <\n-001633e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-00163490: 703a 3a73 656e 645f 7469 6d65 6f75 743c p::send_timeout<\n-001634a0: 2f61 3e3c 2f63 6f64 653e 206f 7220 3c63 /a> or s\n-00163560: 6f61 703a 3a72 6563 765f 7469 6d65 6f75 oap::recv_timeou\n-00163570: 743c 2f61 3e3c 2f63 6f64 653e 2061 7265 t are\n-00163580: 206e 6f6e 7a65 726f 2e20 5265 7475 726e nonzero. Return\n-00163590: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-001635a0: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n-00163670: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-00163680: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n-00163690: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n-001636a0: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n-001636b0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fpoll\n-00163780: 3c2f 636f 6465 3e20 6973 203c 636f 6465 is soap_poll.

    .

    <\n-001637d0: 2f61 3e0a 6672 6563 763c 2f68 333e 0a3c /a>.frecv

    .<\n-001637e0: 703e 3c63 6f64 653e 7369 7a65 5f74 2028 p>size_t (\n-001637f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::f\n-00163890: 7265 6376 3c2f 613e 2928 7374 7275 6374 recv)(struct\n-001638a0: 2073 6f61 7020 2a73 6f61 702c 2063 6861 soap *soap, cha\n-001638b0: 7220 2a62 7566 2c20 7369 7a65 5f74 206c r *buf, size_t l\n-001638c0: 656e 293c 2f63 6f64 653e 3c2f 703e 0a3c en)

    .<\n-001638d0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-001638e0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n-001638f0: 2065 6e67 696e 6520 746f 2072 6563 6569 engine to recei\n-00163900: 7665 2028 6f72 2072 6561 6429 2064 6174 ve (or read) dat\n-00163910: 6120 696e 746f 2061 2073 7065 6369 6669 a into a specifi\n-00163920: 6564 2062 7566 6665 7220 3c63 6f64 653e ed buffer \n-00163930: 6275 663c 2f63 6f64 653e 2061 6e64 203c buf and <\n-00163940: 636f 6465 3e6c 656e 3c2f 636f 6465 3e2e code>len
    .\n-00163950: 2054 6865 2073 6f75 7263 6520 666f 7220 The source for \n-00163960: 7468 6520 6461 7461 2074 6f20 7265 6164 the data to read\n-00163970: 2062 7920 7468 6973 2063 616c 6c62 6163 by this callbac\n-00163980: 6b20 6973 203c 636f 6465 3e3c 6120 636c k is soap::is<\n-00163a50: 2f63 6f64 653e 2077 6865 6e20 6e6f 6e2d /code> when non-\n-00163a60: 4e55 4c4c 2c20 3c63 6f64 653e 3c61 2063 NULL, soap::socket\n-00163b30: 3c2f 613e 3c2f 636f 6465 3e20 7768 656e when\n-00163b40: 2076 616c 6964 2c20 6f72 203c 636f 6465 valid, or soap::r\n-00163c10: 6563 7666 643c 2f61 3e3c 2f63 6f64 653e ecvfd\n-00163c20: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns \n-00163c30: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK \n-00163c40: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap\n-00163d00: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status (int) error c\n-00163d20: 6f64 652e 2054 6865 2062 7569 6c74 2d69 ode. The built-i\n-00163d30: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig\n-00163d40: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::frec\n-00163df0: 763c 2f61 3e3c 2f63 6f64 653e 2069 7320 v is \n-00163e00: 3c63 6f64 653e 6672 6563 763c 2f63 6f64 frecv.

    .

    \n-00163e40: 3c2f 613e 0a66 7365 6e64 3c2f 6833 3e0a .fsend

    .\n-00163e50: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fs\n-00163ef0: 656e 643c 2f61 3e29 2873 7472 7563 7420 end)(struct \n-00163f00: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n-00163f10: 7420 6368 6172 202a 6275 662c 2073 697a t char *buf, siz\n-00163f20: 655f 7420 6c65 6e29 3c2f 636f 6465 3e3c e_t len)<\n-00163f30: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call\n-00163f40: 6261 636b 2069 7320 6361 6c6c 6564 2062 back is called b\n-00163f50: 7920 7468 6520 656e 6769 6e65 2074 6f20 y the engine to \n-00163f60: 7365 6e64 2028 6f72 2077 7269 7465 2920 send (or write) \n-00163f70: 6461 7461 2073 7065 6369 6669 6564 2062 data specified b\n-00163f80: 7920 3c63 6f64 653e 6461 7461 3c2f 636f y data bytes of len\n-00163fa0: 6774 6820 3c63 6f64 653e 6c65 6e3c 2f63 gth len. The sink f\n-00163fc0: 6f72 2074 6865 2064 6174 6120 746f 2062 or the data to b\n-00163fd0: 6520 7365 6e74 2074 6f20 6973 2074 7970 e sent to is typ\n-00163fe0: 6963 616c 6c79 203c 636f 6465 3e3c 6120 ically soap::socke\n-001640b0: 743c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 t, soap\n-00164180: 3a3a 7365 6e64 6664 3c2f 613e 3c2f 636f ::sendfd or soap::os. Return\n-00164270: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-00164280: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n-00164350: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-00164360: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n-00164370: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n-00164380: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n-00164390: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>s\n-00164420: 6f61 703a 3a66 7365 6e64 3c2f 613e 3c2f oap::fsend is f\n-00164440: 7365 6e64 3c2f 636f 6465 3e2e 3c2f 703e send.

    \n-00164450: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    .fs\n-00164480: 6572 7665 726c 6f6f 703c 2f68 333e 0a3c erverloop

    .<\n-00164490: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (soap::fservel\n-00164570: 6f6f 703c 2f61 3e29 2873 7472 7563 7420 oop)(struct \n-00164580: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

    .

    This c\n-001645a0: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-001645b0: 6420 6166 7465 7220 6561 6368 2073 7563 d after each suc\n-001645c0: 6365 7373 6675 6c20 636f 6d70 6c65 7469 cessful completi\n-001645d0: 6f6e 206f 6620 6120 7365 7276 6572 206f on of a server o\n-001645e0: 7065 7261 7469 6f6e 2069 6e20 7468 6520 peration in the \n-001645f0: 7365 7276 6572 206c 6f6f 702e 2045 7865 server loop. Exe\n-00164600: 6375 7465 7320 696d 6d65 6469 6174 656c cutes immediatel\n-00164610: 7920 6166 7465 7220 7365 6e64 696e 6720 y after sending \n-00164620: 7468 6520 7265 7370 6f6e 7365 2074 6f20 the response to \n-00164630: 6120 636c 6965 6e74 2061 6e64 2062 6566 a client and bef\n-00164640: 6f72 6520 7468 6520 6e65 7874 206b 6565 ore the next kee\n-00164650: 702d 616c 6976 6520 7365 7276 6572 206c p-alive server l\n-00164660: 6f6f 7020 6974 6572 6174 696f 6e20 7768 oop iteration wh\n-00164670: 656e 2065 6e61 626c 6564 2077 6974 6820 en enabled with \n-00164680: 3c63 6f64 653e 2353 4f41 505f 494f 5f4b #SOAP_IO_K\n-00164690: 4545 5041 4c49 5645 3c2f 636f 6465 3e2e EEPALIVE.\n-001646a0: 2054 6869 7320 6361 6c6c 6261 636b 2063 This callback c\n-001646b0: 616e 2062 6520 7573 6564 2074 6f20 7265 an be used to re\n-001646c0: 636c 6169 6d20 7265 736f 7572 6365 7320 claim resources \n-001646d0: 696e 2074 6865 206b 6565 702d 616c 6976 in the keep-aliv\n-001646e0: 6520 7365 7276 6572 206c 6f6f 702c 2066 e server loop, f\n-001646f0: 6f72 2065 7861 6d70 6c65 206d 616e 6167 or example manag\n-00164700: 6564 206d 656d 6f72 7920 6361 6e20 6265 ed memory can be\n-00164710: 2072 6563 6c61 696d 6564 2062 7920 6361 reclaimed by ca\n-00164720: 6c6c 696e 6720 3c63 6f64 653e 3c61 2063 lling soap_\n-001647e0: 6465 7374 726f 793c 2f61 3e3c 2f63 6f64 destroy and soap_end in that ord\n-001648e0: 6572 2061 6e64 2061 6c6c 2064 6573 6572 er and all deser\n-001648f0: 6961 6c69 7a65 6420 616e 6420 6f74 6865 ialized and othe\n-00164900: 7220 6479 6e61 6d69 6361 6c6c 792d 616c r dynamically-al\n-00164910: 6c6f 6361 7465 6420 6461 7461 206d 616e located data man\n-00164920: 6167 6564 2062 7920 7468 6520 636f 6e74 aged by the cont\n-00164930: 6578 7420 7769 6c6c 2062 6520 6465 616c ext will be deal\n-00164940: 6c6f 6361 7465 642e 2052 6574 7572 6e73 located. Returns\n-00164950: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n-00164960: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n-00164a40: 6572 726f 7220 636f 6465 2e20 4e6f 2062 error code. No b\n-00164a50: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-00164a60: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to \n-00164a70: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n-00164b40: 3a3a 6673 6572 7665 6c6f 6f70 3c2f 613e ::fserveloop\n-00164b50: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..fmallo\n-00164b90: 633c 2f68 333e 0a3c 703e 3c63 6f64 653e c.

    \n-00164ba0: 766f 6964 2028 3c61 2063 6c61 7373 3d22 void (soap::fmalloc<\n-00164c50: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n-00164c60: 202a 736f 6170 2c20 7369 7a65 5f74 2073 *soap, size_t s\n-00164c70: 697a 6529 3c2f 636f 6465 3e3c 2f70 3e0a ize)

    .\n-00164c80: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n-00164c90: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n-00164ca0: 6f76 6572 7269 6465 206d 656d 6f72 7920 override memory \n-00164cb0: 616c 6c6f 6361 7469 6f6e 2061 6e64 206d allocation and m\n-00164cc0: 616e 6167 656d 656e 7420 646f 6e65 2062 anagement done b\n-00164cd0: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap_m\n-00164d80: 616c 6c6f 633c 2f61 3e3c 2f63 6f64 653e alloc\n-00164d90: 2069 6e20 432e 204d 656d 6f72 7920 616c in C. Memory al\n-00164da0: 6c6f 6361 7465 6420 7669 6120 7468 6973 located via this\n-00164db0: 2063 616c 6c62 6163 6b20 7769 6c6c 206e callback will n\n-00164dc0: 6f74 2062 6520 6d61 6e61 6765 6420 616e ot be managed an\n-00164dd0: 6420 6e6f 7420 6265 2061 7574 6f6d 6174 d not be automat\n-00164de0: 6963 616c 6c79 2072 656c 6561 7365 6420 ically released \n-00164df0: 6279 2074 6865 2065 6e67 696e 652e 2049 by the engine. I\n-00164e00: 6e73 7465 6164 2c20 7468 6520 6170 706c nstead, the appl\n-00164e10: 6963 6174 696f 6e20 7573 696e 6720 7468 ication using th\n-00164e20: 6973 2063 616c 6c62 6163 6b20 7368 6f75 is callback shou\n-00164e30: 6c64 2072 656c 6561 7365 2061 6c6c 6f63 ld release alloc\n-00164e40: 6174 6564 206d 656d 6f72 792e 2041 6c6c ated memory. All\n-00164e50: 2061 6c6c 6f63 6174 696f 6e73 2064 6f6e allocations don\n-00164e60: 6520 6279 203c 636f 6465 3e3c 6120 636c e by soa\n-00164f10: 705f 6d61 6c6c 6f63 3c2f 613e 3c2f 636f p_malloc are replaced\n-00164f30: 2077 6974 6820 6120 6361 6c6c 2074 6f20 with a call to \n-00164f40: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmalloc<\n-00164ff0: 2f61 3e3c 2f63 6f64 653e 2e20 486f 7765 /a>. Howe\n-00165000: 7665 722c 206e 6f20 6f74 6865 7220 616c ver, no other al\n-00165010: 6c6f 6361 7469 6f6e 732c 2073 7563 6820 locations, such \n-00165020: 6173 203c 636f 6465 3e3c 6120 636c 6173 as \n-001650b0: 736f 6170 5f6e 6577 3c2f 613e 3c2f 636f soap_new and so\n-001650d0: 6170 5f6e 6577 5f54 3c2f 636f 6465 3e20 ap_new_T \n-001650e0: 666f 7220 432b 2b20 636c 6173 7365 7320 for C++ classes \n-001650f0: 3c63 6f64 653e 543c 2f63 6f64 653e 2061 T a\n-00165100: 7265 2061 6666 6563 7465 642c 2062 6563 re affected, bec\n-00165110: 6175 7365 206f 626a 6563 7473 2061 7265 ause objects are\n-00165120: 2061 6c6c 6f63 6174 6564 2064 6966 6665 allocated diffe\n-00165130: 7265 6e74 6c79 2e20 5468 6973 2063 616c rently. This cal\n-00165140: 6c62 6163 6b20 6973 2074 6865 7265 666f lback is therefo\n-00165150: 7265 206e 6f74 2075 7365 6675 6c20 666f re not useful fo\n-00165160: 7220 432b 2b20 6170 706c 6963 6174 696f r C++ applicatio\n-00165170: 6e73 2e20 5265 7475 726e 7320 6120 706f ns. Returns a po\n-00165180: 696e 7465 7220 746f 2064 796e 616d 6963 inter to dynamic\n-00165190: 616c 6c79 2061 6c6c 6f63 6174 6564 206d ally allocated m\n-001651a0: 656d 6f72 7920 6f72 204e 554c 4c20 6f6e emory or NULL on\n-001651b0: 2066 6169 6c75 7265 2074 6f20 616c 6c6f failure to allo\n-001651c0: 6361 7465 2e20 4e6f 2062 7569 6c74 2d69 cate. No built-i\n-001651d0: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as\n-001651e0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-001651f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-00165290: 3a3a 666d 616c 6c6f 633c 2f61 3e3c 2f63 ::fmalloc.

    .
    Warnin\n-001652d0: 673c 2f64 743e 3c64 643e 4465 7072 6563 g
    Deprec\n-001652e0: 6174 6564 2073 696e 6365 2032 2e38 2e37 ated since 2.8.7\n-001652f0: 322e 2044 6566 696e 6520 3c63 6f64 653e 2. Define \n-00165300: 2353 4f41 505f 4d41 4c4c 4f43 3c2f 636f #SOAP_MALLOC and #S\n-00165320: 4f41 505f 4652 4545 3c2f 636f 6465 3e20 OAP_FREE \n-00165330: 696e 7374 6561 642e 3c2f 6464 3e3c 2f64 instead.
    .

    .\n-00165370: 7573 6572 2076 6172 6961 626c 653c 2f68 user variable.

    A vo\n-00165390: 6964 2a20 3c61 2063 6c61 7373 3d22 656c id* soap\n-00165450: 3a3a 7573 6572 3c2f 613e 3c2f 636f 6465 ::user variable is av\n-00165470: 6169 6c61 626c 6520 746f 2070 6173 7320 ailable to pass \n-00165480: 7573 6572 2d64 6566 696e 6564 2064 6174 user-defined dat\n-00165490: 6120 746f 2074 6865 2063 616c 6c62 6163 a to the callbac\n-001654a0: 6b73 2e3c 2f70 3e0a 3c68 333e 3c61 2063 ks.

    .

    \n-001654d0: 3c2f 613e 0a45 7861 6d70 6c65 733c 2f68 .Examples.

    The follow\n-001654f0: 696e 6720 6578 616d 706c 6520 7573 6573 ing example uses\n-00165500: 2049 2f4f 2063 616c 6c62 6163 6b73 2066 I/O callbacks f\n-00165510: 6f72 2063 7573 746f 6d69 7a65 6420 7365 or customized se\n-00165520: 7269 616c 697a 6174 696f 6e20 6f66 2064 rialization of d\n-00165530: 6174 6120 696e 746f 2061 2066 6978 6564 ata into a fixed\n-00165540: 2d73 697a 6520 6275 6666 6572 2061 6e64 -size buffer and\n-00165550: 2064 6573 6572 6961 6c69 7a61 7469 6f6e deserialization\n-00165560: 2062 6163 6b20 696e 746f 2061 2064 6174 back into a dat\n-00165570: 6120 7374 7275 6374 7572 653a 3c2f 703e a structure:

    \n-00165580: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    char b\n-001655d0: 7566 5b31 3030 3030 5d3b 203c 7370 616e uf[10000]; // XML buffer <\n-00165600: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-00165620: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165630: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int len1 = 0; \n-00165650: 203c 7370 616e 2063 6c61 7373 3d22 636f // #chars\n-00165670: 2077 7269 7474 656e 203c 2f73 7061 6e3e written \n-00165680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int le\n-001656c0: 6e32 203d 2030 3b20 2020 203c 7370 616e n2 = 0; // #chars read \n-001656f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . *a = NUL\n+00158cb0: 4c3b 3c2f 6469 763e 0a3c 6469 7620 636c L;

    .
    } .
    \n+00158d00: 696e 743c 2f73 7061 6e3e 2073 6f61 705f int soap_\n+00158d10: 6f75 745f 4d79 4461 7461 283c 7370 616e out_MyData(struct <\n+00158d40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00158d50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00158d60: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00158d70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00158da0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n+00158de0: 6172 3c2f 7370 616e 3e20 2a74 6167 2c20 ar *tag, \n+00158df0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int i\n+00158e30: 643c 2f73 7061 6e3e 2c20 4d79 4461 7461 d, MyData\n+00158e40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const*a, con\n+00158e80: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00158eb0: 2a74 7970 6529 203c 2f64 6976 3e0a 3c64 *type)
    .\n+00158ed0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n+00158f10: 2873 6f61 705f 656c 656d 656e 745f 6265 (soap_element_be\n+00158f20: 6769 6e5f 6f75 7428 3c61 2063 6c61 7373 gin_out(s\n+00158f50: 6f61 703c 2f61 3e2c 2074 6167 2c20 3c73 oap, tag, id, type) /\n+00158fa0: 2f20 7072 696e 7420 584d 4c20 6265 6769 / print XML begi\n+00158fb0: 6e6e 696e 6720 7461 6720 3c2f 7370 616e nning tag
    .
    || \n+00158fe0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+00159030: 736f 6170 5f73 656e 643c 2f61 3e28 3c61 soap_send(soap, *\n+00159070: 6129 203c 7370 616e 2063 6c61 7373 3d22 a) // just\n+00159090: 2070 7269 6e74 2074 6865 2073 7472 696e print the strin\n+001590a0: 6720 286e 6f20 584d 4c20 636f 6e76 6572 g (no XML conver\n+001590b0: 7369 6f6e 2920 3c2f 7370 616e 3e3c 2f64 sion) .
    || soap\n+001590e0: 5f65 6c65 6d65 6e74 5f65 6e64 5f6f 7574 _element_end_out\n+001590f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00159120: 2c20 7461 6729 2920 3c73 7061 6e20 636c , tag)) //\n+00159140: 2070 7269 6e74 2058 4d4c 2065 6e64 696e print XML endin\n+00159150: 6720 7461 6720 3c2f 7370 616e 3e3c 2f64 g tag .\n+00159230: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n+00159260: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK; .
    }
    .\n+001592f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    MyData **soap_\n+00159310: 696e 5f4d 7944 6174 6128 3c73 7061 6e20 in_MyData(\n+00159330: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00159370: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00159380: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00159390: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001593a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001593e0: 723c 2f73 7061 6e3e 202a 7461 672c 204d r *tag, M\n+001593f0: 7944 6174 6120 2a61 2c20 3c73 7061 6e20 yData *a, \n+00159410: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *type)
    \n+00159450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+00159480: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00159490: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_element\n+001594b0: 5f62 6567 696e 5f69 6e28 3c61 2063 6c61 _begin_in(soap, tag))\n+001594f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return NULL; .
    if (!a) \n+00159580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    a =\n+001595a0: 2028 4d79 4461 7461 2a29 3c61 2063 6c61 (MyData*)s\n+00159600: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(<\n+00159610: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00159620: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00159630: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00159640: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(MyData)); .
    if (soap-&g\n+001596e0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;null<\n+00159730: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    . \n+00159750: 2020 2a61 203d 204e 554c 4c3b 203c 7370 *a = NULL; // xsi:nil el\n+00159780: 656d 656e 7420 3c2f 7370 616e 3e3c 2f64 ement
    .
    if (*soap-&g\n+00159800: 743b 7479 7065 2026 616d 703b 2661 6d70 t;type &&\n+00159810: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; soap_match_t\n+00159870: 6167 3c2f 613e 283c 6120 636c 6173 733d ag(so\n+001598a0: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, s\n+001598d0: 6f61 703c 2f61 3e2d 2667 743b 7479 7065 oap->type\n+001598e0: 2c20 7479 7065 2929 203c 2f64 6976 3e0a , type))
    .\n+001598f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00159920: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e\n+001599a0: 7272 6f72 3c2f 613e 203d 203c 6120 636c rror = S\n+00159a00: 4f41 505f 5459 5045 3c2f 613e 3b20 3c2f OAP_TYPE; .
    return NULL; /\n+00159a70: 2f20 7479 7065 206d 6973 6d61 7463 6820 / type mismatch \n+00159a80: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00159aa0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n+00159ac0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00159ad0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (*soap\n+00159b10: 3c2f 613e 2d26 6774 3b68 7265 6629 203c ->href) <\n+00159b20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    a = \n+00159b40: 284d 7944 6174 612a 2a29 736f 6170 5f69 (MyData**)soap_i\n+00159b50: 645f 666f 7277 6172 6428 3c61 2063 6c61 d_forward(soap, soap->h\n+00159bc0: 7265 662c 2061 2c20 302c 2053 4f41 505f ref, a, 0, SOAP_\n+00159bd0: 5459 5045 5f4d 7944 6174 612c 2030 2c20 TYPE_MyData, 0, \n+00159be0: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(MyData), 0, \n+00159c10: 4e55 4c4c 2c20 4e55 4c4c 2920 3c2f 6469 NULL, NULL) .
    else if\n+00159c80: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->b\n+00159d00: 6f64 793c 2f61 3e29 203c 2f64 6976 3e0a ody)
    .\n+00159d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00159d40: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+00159d60: 3c2f 7370 616e 3e20 2a73 203d 2073 6f61 *s = soa\n+00159d70: 705f 7661 6c75 6528 3c61 2063 6c61 7373 p_value(s\n+00159da0: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); \n+00159dc0: 2f2f 2066 696c 6c20 6275 6666 6572 203c // fill buffer <\n+00159dd0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00159df0: 2020 202a 6120 3d20 283c 7370 616e 2063 *a = (char*)\n+00159e20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_malloc\n+00159e80: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+00159eb0: 3c2f 613e 2c20 7374 726c 656e 2873 292b , strlen(s)+\n+00159ec0: 3129 3b20 3c2f 6469 763e 0a3c 6469 7620 1);
    .
    \n+00159ee0: 2073 7472 6370 7928 2a61 2c20 7329 3b20 strcpy(*a, s); \n+00159ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } ..\n+0015a030: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0015a060: 7265 7475 726e 3c2f 7370 616e 3e20 4e55 return NU\n+0015a070: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
    .
    <\n+0015a090: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0015a0a0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+0015a0b0: 2f73 7061 6e3e 2061 3b20 3c2f 6469 763e /span> a;
    \n+0015a0c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    #define SOAP_TY\n+0015a1c0: 5045 3c2f 6469 763e 3c64 6976 2063 6c61 PE
    A soa\n+0015a1e0: 705f 7374 6174 7573 2065 7272 6f72 2063 p_status error c\n+0015a1f0: 6f64 653a 2058 4d4c 2065 6c65 6d65 6e74 ode: XML element\n+0015a200: 206f 7220 6174 7472 6962 7574 6520 6861 or attribute ha\n+0015a210: 7320 6120 6d69 736d 6174 6368 696e 6720 s a mismatching \n+0015a220: 7479 7065 206f 7220 7661 6c75 6520 7468 type or value th\n+0015a230: 6174 2069 7320 6361 7573 696e 6720 6120 at is causing a \n+0015a240: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n+0015a260: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+0015a270: 7464 736f 6170 322e 683a 3236 3037 3c2f tdsoap2.h:2607
    .
    <\n+0015a2f0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+0015a300: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga\n+0015a310: 3737 3132 6635 6263 3336 3132 3730 3530 7712f5bc36127050\n+0015a320: 6131 3161 6439 3935 6430 3539 3362 6463 a11ad995d0593bdc\n+0015a330: 223e 736f 6170 5f73 656e 643c 2f61 3e3c \">soap_send<\n+0015a340: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa\n+0015a360: 705f 7365 6e64 2873 7472 7563 7420 736f p_send(struct so\n+0015a370: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n+0015a380: 6368 6172 202a 7329 3c2f 6469 763e 3c64 char *s)
    Send a string.<\n+0015a3b0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .soap_matc\n+0015a470: 685f 7461 673c 2f61 3e3c 2f64 6976 3e3c h_tag
    <\n+0015a480: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0015a490: 6922 3e69 6e74 2073 6f61 705f 6d61 7463 i\">int soap_matc\n+0015a4a0: 685f 7461 6728 7374 7275 6374 2073 6f61 h_tag(struct soa\n+0015a4b0: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n+0015a4c0: 6861 7220 2a74 6167 312c 2063 6f6e 7374 har *tag1, const\n+0015a4d0: 2063 6861 7220 2a74 6167 3229 3c2f 6469 char *tag2)
    Match an XM\n+0015a500: 4c20 7461 6720 6e61 6d65 2e3c 2f64 6976 L tag name.
    .
    soap::body<\n+0015a5c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    short b\n+0015a5e0: 6f64 793c 2f64 6976 3e3c 6469 7620 636c ody
    The \n+0015a600: 736f 6170 3a3a 626f 6479 2066 6c61 6720 soap::body flag \n+0015a610: 6973 2073 6574 2077 6865 6e20 616e 2065 is set when an e\n+0015a620: 6c65 6d65 6e74 2068 6173 2065 6c65 6d65 lement has eleme\n+0015a630: 6e74 2063 6f6e 7465 6e74 2064 7572 696e nt content durin\n+0015a640: 6720 584d 4c20 7061 7273 696e 6720 6f72 g XML parsing or\n+0015a650: 2077 6865 6e20 6120 4854 5450 206d 6573 when a HTTP mes\n+0015a660: 732e 2e2e 3c2f 6469 763e 3c64 6976 2063 s...
    \n+0015a680: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0015a690: 7374 6473 6f61 7032 2e68 3a32 3936 353c stdsoap2.h:2965<\n+0015a6a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+0015a790: 5468 6520 736f 6170 3a3a 6e75 6c6c 2066 The soap::null f\n+0015a7a0: 6c61 6720 6973 2073 6574 2077 6865 6e20 lag is set when \n+0015a7b0: 616e 2065 6c65 6d65 6e74 2063 6172 7269 an element carri\n+0015a7c0: 6573 2061 2078 7369 3a6e 696c 2061 7474 es a xsi:nil att\n+0015a7d0: 7269 6275 7465 2074 6861 7420 6973 2074 ribute that is t\n+0015a7e0: 7275 652e 3c2f 6469 763e 3c64 6976 2063 rue.
    .

    More infor\n+0015a850: 6d61 7469 6f6e 206f 6e20 6375 7374 6f6d mation on custom\n+0015a860: 2073 6572 6961 6c69 7a61 7469 6f6e 2069 serialization i\n+0015a870: 7320 6176 6169 6c61 626c 6520 696e 2074 s available in t\n+0015a880: 6865 2067 534f 4150 2073 6f75 7263 6520 he gSOAP source \n+0015a890: 636f 6465 2070 6163 6b61 6765 2069 6e20 code package in \n+0015a8a0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n+0015a8b0: 6f61 702f 6375 7374 6f6d 3c2f 636f 6465 oap/custom directory\n+0015a8d0: 2c20 7768 6572 6520 796f 7520 6361 6e20 , where you can \n+0015a8e0: 616c 736f 2066 696e 6420 7365 7665 7261 also find severa\n+0015a8f0: 6c20 6375 7374 6f6d 2073 6572 6961 6c69 l custom seriali\n+0015a900: 7a65 7273 2074 6f20 7573 6520 7769 7468 zers to use with\n+0015a910: 2079 6f75 7220 7072 6f6a 6563 7473 2e3c your projects.<\n+0015a920: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to \n+0015a940: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n+0015a950: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

    .

    .Function call\n+0015a990: 6261 636b 7320 666f 7220 6375 7374 6f6d backs for custom\n+0015a9a0: 697a 6564 2049 2f4f 2061 6e64 2048 5454 ized I/O and HTT\n+0015a9b0: 5020 6861 6e64 6c69 6e67 3c2f 6832 3e0a P handling

    .\n+0015a9c0: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n+0015a9d0: 206c 6973 7420 6f66 2066 756e 6374 696f list of functio\n+0015a9e0: 6e73 2063 616e 2062 6520 7573 6564 2066 ns can be used f\n+0015a9f0: 6f72 2063 7573 746f 6d69 7a65 6420 4854 or customized HT\n+0015aa00: 5450 2068 616e 646c 696e 6720 616e 6420 TP handling and \n+0015aa10: 492f 4f2e 3c2f 703e 0a3c 703e 5365 6520 I/O.

    .

    See \n+0015aa20: 616c 736f 2041 5049 2064 6f63 756d 656e also API documen\n+0015aa30: 7461 7469 6f6e 204d 6f64 756c 6520 3c61 tation Module \n+0015aa70: 4361 6c6c 6261 636b 2066 756e 6374 696f Callback functio\n+0015aa80: 6e73 3c2f 613e 2e3c 2f70 3e0a 3c70 3e54 ns.

    .

    T\n+0015aa90: 6f20 7265 7365 7420 7468 6520 6361 6c6c o reset the call\n+0015aaa0: 6261 636b 2066 756e 6374 696f 6e73 2074 back functions t\n+0015aab0: 6f20 7468 6520 696e 7465 726e 616c 2066 o the internal f\n+0015aac0: 756e 6374 696f 6e73 206f 6620 7468 6520 unctions of the \n+0015aad0: 656e 6769 6e65 2c20 7573 6520 3c63 6f64 engine, use soap_done<\n+0015abb0: 2f61 3e3c 2f63 6f64 653e 2066 6f6c 6c6f /a> follo\n+0015abc0: 7765 6420 6279 203c 636f 6465 3e3c 6120 wed by soap_init\n+0015ac60: 3c2f 636f 6465 3e2e 2054 6869 7320 7265 . This re\n+0015ac70: 2d69 6e69 7469 616c 697a 6573 2074 6865 -initializes the\n+0015ac80: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context, remo\n+0015acf0: 7665 7320 616c 6c20 706c 7567 696e 732c ves all plugins,\n+0015ad00: 2061 6e64 2072 6573 6574 7320 6675 6e63 and resets func\n+0015ad10: 7469 6f6e 2063 616c 6c62 6163 6b73 2e3c tion callbacks.<\n+0015ad20: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+0015ad50: 0a66 706f 7374 3c2f 6833 3e0a 3c70 3e3c .fpost

    .

    <\n+0015ad60: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap\n+0015ae30: 3a3a 6670 6f73 743c 2f61 3e29 2873 7472 ::fpost)(str\n+0015ae40: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+0015ae50: 636f 6e73 7420 6368 6172 202a 656e 6470 const char *endp\n+0015ae60: 6f69 6e74 2c20 636f 6e73 7420 6368 6172 oint, const char\n+0015ae70: 202a 686f 7374 2c20 696e 7420 706f 7274 *host, int port\n+0015ae80: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa\n+0015ae90: 7468 2c20 636f 6e73 7420 6368 6172 202a th, const char *\n+0015aea0: 6163 7469 6f6e 2c20 554c 4f4e 4736 3420 action, ULONG64 \n+0015aeb0: 636f 756e 7429 3c2f 636f 6465 3e3c 2f70 count).

    This callba\n+0015aed0: 636b 2069 7320 6361 6c6c 6564 2061 7420 ck is called at \n+0015aee0: 7468 6520 7365 7276 6572 2073 6964 6520 the server side \n+0015aef0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n+0015af00: 2073 656e 6420 7468 6520 4854 5450 2068 send the HTTP h\n+0015af10: 6561 6465 7273 2074 6f20 7468 6520 636f eaders to the co\n+0015af20: 6e6e 6563 7465 6420 636c 6965 6e74 2e20 nnected client. \n+0015af30: 5468 6520 7061 7261 6d65 7465 7220 3c63 The parameter status should be an H\n+0015af60: 5454 5020 7374 6174 7573 2065 7272 6f72 TTP status error\n+0015af70: 2063 6f64 6520 6f72 203c 636f 6465 3e23 code or #\n+0015af80: 534f 4150 5f4f 4b3c 2f63 6f64 653e 2028 SOAP_OK (\n+0015af90: 3230 3020 4f4b 2920 6f72 203c 636f 6465 200 OK) or #SOAP_HTML or #SOA\n+0015afc0: 505f 4649 4c45 3c2f 636f 6465 3e2e 2055 P_FILE. U\n+0015afd0: 7369 6e67 203c 636f 6465 3e23 534f 4150 sing #SOAP\n+0015afe0: 5f48 544d 4c3c 2f63 6f64 653e 2073 6574 _HTML set\n+0015aff0: 7320 7468 6520 636f 6e74 656e 742d 7479 s the content-ty\n+0015b000: 7065 2068 6561 6465 7220 746f 203c 636f pe header to text/html; ch\n+0015b020: 6172 7365 743d 7574 662d 383c 2f63 6f64 arset=utf-8. Using \n+0015b040: 2353 4f41 505f 4649 4c45 3c2f 636f 6465 #SOAP_FILE sets the conte\n+0015b060: 6e74 2d74 7970 6520 6865 6164 6572 2074 nt-type header t\n+0015b070: 6f20 7468 6520 7661 6c75 6520 6f66 203c o the value of <\n+0015b080: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0015b140: 703a 3a68 7474 705f 636f 6e74 656e 743c p::http_content<\n+0015b150: 2f61 3e3c 2f63 6f64 653e 2e20 4578 7472 /a>. Extr\n+0015b160: 6120 4854 5450 2068 6561 6465 7273 2061 a HTTP headers a\n+0015b170: 7265 2061 6464 6564 2077 6865 6e20 3c63 re added when soap::http_ex\n+0015b240: 7472 615f 6865 6164 6572 3c2f 613e 3c2f tra_header is set to \n+0015b260: 6f6e 6520 6f72 206d 6f72 6520 6865 6164 one or more head\n+0015b270: 6572 206c 696e 6573 2073 6570 6172 6174 er lines separat\n+0015b280: 6564 2062 7920 4352 4c46 2e20 5768 656e ed by CRLF. When\n+0015b290: 2072 6564 6566 696e 696e 6720 7468 6973 redefining this\n+0015b2a0: 2063 616c 6c62 6163 6b2c 2075 7365 2066 callback, use f\n+0015b2b0: 756e 6374 696f 6e20 3c63 6f64 653e 3c61 unction soap_send\n+0015b330: 3c2f 636f 6465 3e20 746f 2077 7269 7465 to write\n+0015b340: 2074 6865 2068 6561 6465 7220 636f 6e74 the header cont\n+0015b350: 656e 7473 2e20 5265 7475 726e 7320 3c63 ents. Returns #SOAP_OK or a <\n+0015b380: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015b390: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015b3a0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+0015b3b0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+0015b3c0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+0015b3d0: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+0015b3e0: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+0015b3f0: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+0015b400: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+0015b410: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+0015b420: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+0015b430: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+0015b440: 2f63 6f64 653e 2065 7272 6f72 2063 6f64 /code> error cod\n+0015b450: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n+0015b460: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n+0015b470: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fr\n+0015b540: 6573 706f 6e73 653c 2f61 3e3c 2f63 6f64 esponse is http\n+0015b560: 5f72 6573 706f 6e73 653c 2f63 6f64 653e _response\n+0015b570: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fresponse.

    int (\n+0015b5c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa\n+0015b680: 703a 3a66 7265 7370 6f6e 7365 3c2f 613e p::fresponse\n+0015b690: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n+0015b6a0: 6f61 702c 2069 6e74 2073 6f61 705f 6572 oap, int soap_er\n+0015b6b0: 726f 725f 636f 6465 2c20 554c 4f4e 4736 ror_code, ULONG6\n+0015b6c0: 3420 636f 756e 7429 3c2f 636f 6465 3e3c 4 count)<\n+0015b6d0: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call\n+0015b6e0: 6261 636b 2069 7320 6361 6c6c 6564 2061 back is called a\n+0015b6f0: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid\n+0015b700: 6520 6279 2074 6865 2065 6e67 696e 6520 e by the engine \n+0015b710: 746f 2073 656e 6420 7468 6520 4854 5450 to send the HTTP\n+0015b720: 2068 6561 6465 7273 2074 6f20 7468 6520 headers to the \n+0015b730: 636f 6e6e 6563 7465 6420 636c 6965 6e74 connected client\n+0015b740: 2e20 5468 6520 7061 7261 6d65 7465 7220 . The parameter \n+0015b750: 3c63 6f64 653e 7374 6174 7573 3c2f 636f status should be an\n+0015b770: 2048 5454 5020 7374 6174 7573 2065 7272 HTTP status err\n+0015b780: 6f72 2063 6f64 6520 6f72 203c 636f 6465 or code or #SOAP_OK\n+0015b7a0: 2028 3230 3020 4f4b 2920 6f72 203c 636f (200 OK) or #SOAP_HTML or #S\n+0015b7d0: 4f41 505f 4649 4c45 3c2f 636f 6465 3e2e OAP_FILE.\n+0015b7e0: 2055 7369 6e67 203c 636f 6465 3e23 534f Using #SO\n+0015b7f0: 4150 5f48 544d 4c3c 2f63 6f64 653e 2073 AP_HTML s\n+0015b800: 6574 7320 7468 6520 636f 6e74 656e 742d ets the content-\n+0015b810: 7479 7065 2068 6561 6465 7220 746f 203c type header to <\n+0015b820: 636f 6465 3e74 6578 742f 6874 6d6c 3b20 code>text/html; \n+0015b830: 6368 6172 7365 743d 7574 662d 383c 2f63 charset=utf-8. Using #SOAP_FILE sets the con\n+0015b870: 7465 6e74 2d74 7970 6520 6865 6164 6572 tent-type header\n+0015b880: 2074 6f20 7468 6520 7661 6c75 6520 6f66 to the value of\n+0015b890: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+0015b950: 6f61 703a 3a68 7474 705f 636f 6e74 656e oap::http_conten\n+0015b960: 743c 2f61 3e3c 2f63 6f64 653e 2e20 4578 t. Ex\n+0015b970: 7472 6120 4854 5450 2068 6561 6465 7273 tra HTTP headers\n+0015b980: 2061 7265 2061 6464 6564 2077 6865 6e20 are added when \n+0015b990: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::http_\n+0015ba50: 6578 7472 615f 6865 6164 6572 3c2f 613e extra_header\n+0015ba60: 3c2f 636f 6465 3e20 6973 2073 6574 2074 is set t\n+0015ba70: 6f20 6f6e 6520 6f72 206d 6f72 6520 6865 o one or more he\n+0015ba80: 6164 6572 206c 696e 6573 2073 6570 6172 ader lines separ\n+0015ba90: 6174 6564 2062 7920 4352 4c46 2e20 5768 ated by CRLF. Wh\n+0015baa0: 656e 2072 6564 6566 696e 696e 6720 7468 en redefining th\n+0015bab0: 6973 2063 616c 6c62 6163 6b2c 2075 7365 is callback, use\n+0015bac0: 2066 756e 6374 696f 6e20 3c63 6f64 653e function \n+0015bad0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_send to wri\n+0015bb50: 7465 2074 6865 2068 6561 6465 7220 636f te the header co\n+0015bb60: 6e74 656e 7473 2e20 5265 7475 726e 7320 ntents. Returns \n+0015bb70: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status error c\n+0015bc60: 6f64 652e 2054 6865 2062 7569 6c74 2d69 ode. The built-i\n+0015bc70: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig\n+0015bc80: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::\n+0015bd50: 6672 6573 706f 6e73 653c 2f61 3e3c 2f63 fresponse is ht\n+0015bd70: 7470 5f72 6573 706f 6e73 653c 2f63 6f64 tp_response.

    .

    \n+0015bdb0: 3c2f 613e 0a66 706f 7374 6864 723c 2f68 .fposthdr.

    int \n+0015bdd0: 283c 6120 636c 6173 733d 2265 6c22 2068 (s\n+0015be70: 6f61 703a 3a66 706f 7374 6864 723c 2f61 oap::fposthdr)(struct soap *\n+0015be90: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+0015bea0: 202a 6b65 792c 2063 6f6e 7374 2063 6861 *key, const cha\n+0015beb0: 7220 2a76 616c 293c 2f63 6f64 653e 3c2f r *val).

    This callb\n+0015bed0: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n+0015bee0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::f\n+0015bfb0: 706f 7374 3c2f 613e 3c2f 636f 6465 3e20 post \n+0015bfc0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::fre\n+0015c090: 7370 6f6e 7365 3c2f 613e 3c2f 636f 6465 sponse to send an HTT\n+0015c0b0: 5020 6865 6164 6572 2077 6974 6820 6120 P header with a \n+0015c0c0: 6b65 7920 616e 6420 616e 206f 7074 696f key and an optio\n+0015c0d0: 6e61 6c20 7661 6c75 652e 2052 6574 7572 nal value. Retur\n+0015c0e0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+0015c0f0: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n+0015c1c0: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n+0015c1d0: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n+0015c1e0: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n+0015c1f0: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n+0015c200: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fposth\n+0015c2b0: 6472 3c2f 613e 3c2f 636f 6465 3e20 6973 dr is\n+0015c2c0: 203c 636f 6465 3e68 7474 705f 706f 7374 http_post\n+0015c2d0: 5f68 6561 6465 723c 2f63 6f64 653e 2e3c _header.<\n+0015c2e0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+0015c310: 0a66 7061 7273 653c 2f68 333e 0a3c 703e .fparse

    .

    \n+0015c320: 3c63 6f64 653e 696e 7420 283c 6120 636c int (so\n+0015c3c0: 6170 3a3a 6670 6172 7365 3c2f 613e 2928 ap::fparse)(\n+0015c3d0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+0015c3e0: 7029 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 p)

    .This callback i\n+0015c400: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+0015c410: 656e 6769 6e65 2028 6173 2061 2063 6c69 engine (as a cli\n+0015c420: 656e 7420 6f72 2073 6572 7665 7229 2074 ent or server) t\n+0015c430: 6f20 7265 6164 2061 6e64 2070 6172 7365 o read and parse\n+0015c440: 2048 5454 5020 6865 6164 6572 7320 6f72 HTTP headers or\n+0015c450: 204d 494d 4520 6865 6164 6572 732e 2057 MIME headers. W\n+0015c460: 6865 6e20 7265 6465 6669 6e65 642c 2074 hen redefined, t\n+0015c470: 6869 7320 6675 6e63 7469 6f6e 2073 686f his function sho\n+0015c480: 756c 6420 6174 2072 6561 6420 6f72 2073 uld at read or s\n+0015c490: 6b69 7020 7468 6520 656e 7469 7265 2048 kip the entire H\n+0015c4a0: 5454 5020 6865 6164 6572 2074 6f20 7265 TTP header to re\n+0015c4b0: 6163 6820 7468 6520 6d65 7373 6167 6520 ach the message \n+0015c4c0: 626f 6479 2e20 4675 6e63 7469 6f6e 203c body. Function <\n+0015c4d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>so\n+0015c540: 6170 5f67 6574 6c69 6e65 3c2f 613e 3c2f ap_getline is used by\n+0015c560: 2074 6869 7320 6361 6c6c 6261 636b 2074 this callback t\n+0015c570: 6f20 7265 6164 2065 6163 6820 6865 6164 o read each head\n+0015c580: 6572 206c 696e 6520 696e 746f 2061 6e20 er line into an \n+0015c590: 696e 7465 726e 616c 2062 7566 6665 7220 internal buffer \n+0015c5a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0015c660: 6170 3a3a 6d73 6762 7566 3c2f 613e 3c2f ap::msgbuf with soap_g\n+0015c6f0: 6574 6c69 6e65 3c2f 613e 2873 6f61 702c etline(soap,\n+0015c700: 2073 6f61 702d 2667 743b 6d73 6762 7566 soap->msgbuf\n+0015c710: 2c20 7369 7a65 6f66 2873 6f61 702d 2667 , sizeof(soap-&g\n+0015c720: 743b 6d73 6762 7566 2929 3c2f 636f 6465 t;msgbuf)). Returns #SOAP_OK\n+0015c750: 2c20 6f72 2061 2067 534f 4150 2065 7272 , or a gSOAP err\n+0015c760: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+0015c770: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+0015c780: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fparse\n+0015c830: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c
    is <\n+0015c840: 636f 6465 3e68 7474 705f 7061 7273 653c code>http_parse<\n+0015c850: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    \n+0015c860: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fparseh\n+0015c890: 6472 3c2f 6833 3e0a 3c70 3e3c 636f 6465 dr

    .

    int (soap\n+0015c950: 3a3a 6670 6172 7365 6864 723c 2f61 3e29 ::fparsehdr)\n+0015c960: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0015c970: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+0015c980: 6b65 792c 2063 6f6e 7374 2063 6861 7220 key, const char \n+0015c990: 2a76 616c 293c 2f63 6f64 653e 3c2f 703e *val)

    \n+0015c9a0: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

    This callbac\n+0015c9b0: 6b20 6973 2063 616c 6c65 6420 6279 203c k is called by <\n+0015c9c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fp\n+0015ca60: 6172 7365 3c2f 613e 3c2f 636f 6465 3e2c arse,\n+0015ca70: 2063 6f6e 7375 6d65 7320 616e 2048 5454 consumes an HTT\n+0015ca80: 5020 6865 6164 6572 2074 6861 7420 6973 P header that is\n+0015ca90: 2073 706c 6974 2069 6e20 6120 6b65 792d split in a key-\n+0015caa0: 7661 6c75 6520 7061 6972 2061 6e64 2075 value pair and u\n+0015cab0: 7064 6174 6573 2074 6865 203c 636f 6465 pdates the soa\n+0015cb10: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n+0015cb20: 7465 7874 2073 7461 7465 2061 6363 6f72 text state accor\n+0015cb30: 6469 6e67 6c79 2e20 5468 6520 636f 6e74 dingly. The cont\n+0015cb40: 6578 7420 6973 2075 7064 6174 6564 2077 ext is updated w\n+0015cb50: 6974 6820 7468 6520 4854 5450 2068 6561 ith the HTTP hea\n+0015cb60: 6465 7220 696e 666f 726d 6174 696f 6e20 der information \n+0015cb70: 7265 6365 6976 6564 2c20 6275 7420 4854 received, but HT\n+0015cb80: 5450 2068 6561 6465 7273 2061 7265 206e TP headers are n\n+0015cb90: 6f74 206c 6974 6572 616c 6c79 2072 6574 ot literally ret\n+0015cba0: 6169 6e65 6420 6279 2074 6865 2065 6e67 ained by the eng\n+0015cbb0: 696e 652e 2052 6574 7572 6e73 203c 636f ine. Returns #SOAP_OK or #SOA\n+0015cbe0: 505f 5354 4f50 3c2f 636f 6465 3e20 746f P_STOP to\n+0015cbf0: 2070 7265 7665 6e74 2066 7572 7468 6572 prevent further\n+0015cc00: 2072 6561 6469 6e67 206f 6620 7468 6520 reading of the \n+0015cc10: 4854 5450 2062 6f64 792c 206f 7220 6120 HTTP body, or a \n+0015cc20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n+0015cce0: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n+0015ccf0: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n+0015cd00: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n+0015cd10: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n+0015cd20: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so\n+0015cdd0: 6170 3a3a 6670 6172 7365 6864 723c 2f61 ap::fparsehdr is http_parse_hea\n+0015ce00: 6465 723c 2f63 6f64 653e 2e3c 2f70 3e0a der.

    .\n+0015ce10: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fge\n+0015ce40: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

    .

    \n+0015ce50: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fge\n+0015cf20: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so\n+0015cf30: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n+0015cf40: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+0015cf50: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015cf60: 6279 2074 6865 2073 6572 7669 6365 2064 by the service d\n+0015cf70: 6973 7061 7463 6865 7220 7768 656e 2061 ispatcher when a\n+0015cf80: 6e20 4854 5450 2047 4554 2072 6571 7565 n HTTP GET reque\n+0015cf90: 7374 2069 7320 7065 6e64 696e 672e 2052 st is pending. R\n+0015cfa0: 6564 6566 696e 6520 7468 6973 2063 616c edefine this cal\n+0015cfb0: 6c62 6163 6b20 746f 2072 6573 706f 6e64 lback to respond\n+0015cfc0: 2074 6f20 4854 5450 2047 4554 2072 6571 to HTTP GET req\n+0015cfd0: 7565 7374 7320 7769 7468 2063 6f6e 7465 uests with conte\n+0015cfe0: 6e74 2c20 7365 6520 7468 6520 3c63 6f64 nt, see the http_get<\n+0015d080: 2f63 6f64 653e 2048 5454 5020 4745 5420 /code> HTTP GET \n+0015d090: 706c 7567 696e 2066 6f72 206d 6f72 6520 plugin for more \n+0015d0a0: 6465 7461 696c 732e 2052 6574 7572 6e73 details. Returns\n+0015d0b0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0015d0c0: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n+0015d1a0: 6572 726f 7220 636f 6465 2e20 5468 6520 error code. The \n+0015d1b0: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+0015d1c0: 6e20 6173 7369 676e 6564 2074 6f20 3c63 n assigned to soap::fget\n+0015d2a0: 3c2f 613e 3c2f 636f 6465 3e20 6973 2074 is t\n+0015d2b0: 6865 2069 6e74 6572 6e61 6c20 7374 6174 he internal stat\n+0015d2c0: 6963 2066 756e 6374 696f 6e20 3c63 6f64 ic function http_get that returns t\n+0015d2f0: 6865 203c 636f 6465 3e23 534f 4150 5f47 he #SOAP_G\n+0015d300: 4554 5f4d 4554 484f 443c 2f63 6f64 653e ET_METHOD\n+0015d310: 2065 7272 6f72 2e3c 2f70 3e0a 3c68 333e error.

    .

    \n+0015d320: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fput.

    int \n+0015d360: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fput)(struct soap *\n+0015d440: 736f 6170 293c 2f63 6f64 653e 3c2f 703e soap)

    \n+0015d450: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

    This callbac\n+0015d460: 6b20 6973 2063 616c 6c65 6420 6279 2074 k is called by t\n+0015d470: 6865 2073 6572 7669 6365 2064 6973 7061 he service dispa\n+0015d480: 7463 6865 7220 7768 656e 2061 6e20 4854 tcher when an HT\n+0015d490: 5450 2050 5554 2072 6571 7565 7374 2069 TP PUT request i\n+0015d4a0: 7320 7065 6e64 696e 672e 2052 6564 6566 s pending. Redef\n+0015d4b0: 696e 6520 7468 6973 2063 616c 6c62 6163 ine this callbac\n+0015d4c0: 6b20 746f 2072 6573 706f 6e64 2074 6f20 k to respond to \n+0015d4d0: 4854 5450 2050 5554 2072 6571 7565 7374 HTTP PUT request\n+0015d4e0: 732c 2073 6565 2074 6865 203c 636f 6465 s, see the http_post\n+0015d580: 3c2f 636f 6465 3e20 4854 5450 2050 4f53 HTTP POS\n+0015d590: 5420 706c 7567 696e 2066 6f72 206d 6f72 T plugin for mor\n+0015d5a0: 6520 6465 7461 696c 732e 2052 6574 7572 e details. Retur\n+0015d5b0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+0015d5c0: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n+0015d690: 3c2f 613e 3c2f 636f 6465 3e20 6572 726f erro\n+0015d6a0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n+0015d6b0: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n+0015d6c0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+0015d6d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fput\n+0015d7a0: 3c2f 636f 6465 3e20 6973 2074 6865 2069 is the i\n+0015d7b0: 6e74 6572 6e61 6c20 7374 6174 6963 2066 nternal static f\n+0015d7c0: 756e 6374 696f 6e20 3c63 6f64 653e 6874 unction ht\n+0015d7d0: 7470 5f70 7574 3c2f 636f 6465 3e20 7468 tp_put th\n+0015d7e0: 6174 2072 6574 7572 6e73 2074 6865 203c at returns the <\n+0015d7f0: 636f 6465 3e23 534f 4150 5f50 5554 5f4d code>#SOAP_PUT_M\n+0015d800: 4554 484f 443c 2f63 6f64 653e 2065 7272 ETHOD err\n+0015d810: 6f72 2e3c 2f70 3e0a 3c68 333e 3c61 2063 or.

    .

    \n+0015d840: 3c2f 613e 0a66 7061 7463 683c 2f68 333e .fpatch

    \n+0015d850: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (<\n+0015d860: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015d870: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015d880: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0015d890: 6761 3830 3861 3661 3962 3765 3664 3137 ga808a6a9b7e6d17\n+0015d8a0: 6530 3339 6662 3533 6135 6538 6139 6238 e039fb53a5e8a9b8\n+0015d8b0: 3461 2220 7469 746c 653d 2243 616c 6c62 4a\" title=\"Callb\n+0015d8c0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n+0015d8d0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n+0015d8e0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n+0015d8f0: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n+0015d900: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque\n+0015d910: 7374 7320 6672 6f6d 2063 6c69 656e 7473 sts from clients\n+0015d920: 2e2e 2e22 3e73 6f61 703a 3a66 7061 7463 ...\">soap::fpatc\n+0015d930: 683c 2f61 3e29 2873 7472 7563 7420 736f h)(struct so\n+0015d940: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n+0015d950: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+0015d960: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015d970: 6279 2074 6865 2073 6572 7669 6365 2064 by the service d\n+0015d980: 6973 7061 7463 6865 7220 7768 656e 2061 ispatcher when a\n+0015d990: 6e20 4854 5450 2050 4154 4348 2072 6571 n HTTP PATCH req\n+0015d9a0: 7565 7374 2069 7320 7065 6e64 696e 672e uest is pending.\n+0015d9b0: 2052 6564 6566 696e 6520 7468 6973 2063 Redefine this c\n+0015d9c0: 616c 6c62 6163 6b20 746f 2072 6573 706f allback to respo\n+0015d9d0: 6e64 2074 6f20 4854 5450 2050 4154 4348 nd to HTTP PATCH\n+0015d9e0: 2072 6571 7565 7374 732c 2073 6565 2074 requests, see t\n+0015d9f0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_\n+0015da80: 706f 7374 3c2f 613e 3c2f 636f 6465 3e20 post \n+0015da90: 4854 5450 2050 4f53 5420 706c 7567 696e HTTP POST plugin\n+0015daa0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail\n+0015dab0: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK\n+0015dad0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+0015db90: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status error code. \n+0015dbb0: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n+0015dbc0: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n+0015dbd0: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so\n+0015dca0: 6170 3a3a 6670 6174 6368 3c2f 613e 3c2f ap::fpatch is the int\n+0015dcc0: 6572 6e61 6c20 7374 6174 6963 2066 756e ernal static fun\n+0015dcd0: 6374 696f 6e20 3c63 6f64 653e 6874 7470 ction http\n+0015dce0: 5f70 6174 6368 3c2f 636f 6465 3e20 7468 _patch th\n+0015dcf0: 6174 2072 6574 7572 6e73 2074 6865 203c at returns the <\n+0015dd00: 636f 6465 3e23 534f 4150 5f50 4154 4348 code>#SOAP_PATCH\n+0015dd10: 5f4d 4554 484f 443c 2f63 6f64 653e 2065 _METHOD e\n+0015dd20: 7272 6f72 2e3c 2f70 3e0a 3c68 333e 3c61 rror.

    .

    .fdel

    \n+0015dd60: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (<\n+0015dd70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015dd80: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015dd90: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0015dda0: 6761 6632 6264 6130 3138 3734 3839 6338 gaf2bda0187489c8\n+0015ddb0: 6632 6239 3835 3766 3631 6239 3661 6430 f2b9857f61b96ad0\n+0015ddc0: 6530 2220 7469 746c 653d 2243 616c 6c62 e0\" title=\"Callb\n+0015ddd0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n+0015dde0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n+0015ddf0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n+0015de00: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n+0015de10: 4854 5450 2044 454c 4554 4520 7265 7175 HTTP DELETE requ\n+0015de20: 6573 7473 2066 726f 6d20 636c 6965 6e74 ests from client\n+0015de30: 2e2e 2e22 3e73 6f61 703a 3a66 6465 6c3c ...\">soap::fdel<\n+0015de40: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+0015de50: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

    This callb\n+0015de70: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n+0015de80: 2074 6865 2073 6572 7669 6365 2064 6973 the service dis\n+0015de90: 7061 7463 6865 7220 7768 656e 2061 6e20 patcher when an \n+0015dea0: 4854 5450 2044 454c 4554 4520 7265 7175 HTTP DELETE requ\n+0015deb0: 6573 7420 6973 2070 656e 6469 6e67 2e20 est is pending. \n+0015dec0: 5265 6465 6669 6e65 2074 6869 7320 6361 Redefine this ca\n+0015ded0: 6c6c 6261 636b 2074 6f20 7265 7370 6f6e llback to respon\n+0015dee0: 6420 746f 2048 5454 5020 4445 4c45 5445 d to HTTP DELETE\n+0015def0: 2072 6571 7565 7374 732c 2073 6565 2074 requests, see t\n+0015df00: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_\n+0015df90: 706f 7374 3c2f 613e 3c2f 636f 6465 3e20 post \n+0015dfa0: 4854 5450 2050 4f53 5420 706c 7567 696e HTTP POST plugin\n+0015dfb0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail\n+0015dfc0: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK\n+0015dfe0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+0015e0a0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+0015e0c0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n+0015e0d0: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n+0015e0e0: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fdel is the\n+0015e1d0: 2069 6e74 6572 6e61 6c20 7374 6174 6963 internal static\n+0015e1e0: 2066 756e 6374 696f 6e20 3c63 6f64 653e function \n+0015e1f0: 6874 7470 5f64 656c 3c2f 636f 6465 3e20 http_del \n+0015e200: 7468 6174 2072 6574 7572 6e73 2074 6865 that returns the\n+0015e210: 203c 636f 6465 3e23 534f 4150 5f44 454c #SOAP_DEL\n+0015e220: 5f4d 4554 484f 443c 2f63 6f64 653e 2065 _METHOD e\n+0015e230: 7272 6f72 2e3c 2f70 3e0a 3c68 333e 3c61 rror.

    .

    .fopt

    \n+0015e270: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (<\n+0015e280: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015e290: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015e2a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0015e2b0: 6761 3635 3237 3263 3165 6362 3565 6439 ga65272c1ecb5ed9\n+0015e2c0: 3932 3561 3561 3637 3063 6637 6537 3764 925a5a670cf7e77d\n+0015e2d0: 3130 2220 7469 746c 653d 2243 616c 6c62 10\" title=\"Callb\n+0015e2e0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n+0015e2f0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n+0015e300: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n+0015e310: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n+0015e320: 4854 5450 204f 5054 494f 4e20 7265 7175 HTTP OPTION requ\n+0015e330: 6573 7473 2066 726f 6d20 636c 6965 6e74 ests from client\n+0015e340: 2e2e 2e22 3e73 6f61 703a 3a66 6f70 743c ...\">soap::fopt<\n+0015e350: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+0015e360: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

    Called by \n+0015e380: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp\n+0015e390: 6174 6368 6572 2077 6865 6e20 616e 2048 atcher when an H\n+0015e3a0: 5454 5020 4f50 5449 4f4e 2072 6571 7565 TTP OPTION reque\n+0015e3b0: 7374 2069 7320 7065 6e64 696e 672e 2052 st is pending. R\n+0015e3c0: 6564 6566 696e 6520 7468 6973 2063 616c edefine this cal\n+0015e3d0: 6c62 6163 6b20 746f 2072 6573 706f 6e64 lback to respond\n+0015e3e0: 2074 6f20 4854 5450 204f 5054 494f 4e20 to HTTP OPTION \n+0015e3f0: 7265 7175 6573 7473 2c20 7365 6520 7468 requests, see th\n+0015e400: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_p\n+0015e490: 6f73 743c 2f61 3e3c 2f63 6f64 653e 2048 ost H\n+0015e4a0: 5454 5020 504f 5354 2070 6c75 6769 6e20 TTP POST plugin \n+0015e4b0: 666f 7220 6d6f 7265 2064 6574 6169 6c73 for more details\n+0015e4c0: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns \n+0015e4d0: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK \n+0015e4e0: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap\n+0015e5a0: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status (int) error c\n+0015e5c0: 6f64 652e 2054 6865 2062 7569 6c74 2d69 ode. The built-i\n+0015e5d0: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig\n+0015e5e0: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::fopt is the \n+0015e6d0: 696e 7465 726e 616c 2073 7461 7469 6320 internal static \n+0015e6e0: 6675 6e63 7469 6f6e 203c 636f 6465 3e68 function h\n+0015e6f0: 7474 705f 3230 303c 2f63 6f64 653e 2074 ttp_200 t\n+0015e700: 6861 7420 7265 7475 726e 7320 4854 5450 hat returns HTTP\n+0015e710: 2032 3030 204f 4b2e 3c2f 703e 0a3c 6833 200 OK.

    ..fhead<\n+0015e750: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n+0015e760: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::fhea\n+0015e830: 643c 2f61 3e29 2873 7472 7563 7420 736f d)(struct so\n+0015e840: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n+0015e850: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+0015e860: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015e870: 6279 2074 6865 2073 6572 7669 6365 2064 by the service d\n+0015e880: 6973 7061 7463 6865 7220 7768 656e 2061 ispatcher when a\n+0015e890: 6e20 4854 5450 2048 4541 4420 7265 7175 n HTTP HEAD requ\n+0015e8a0: 6573 7420 6973 2070 656e 6469 6e67 2e20 est is pending. \n+0015e8b0: 5265 6465 6669 6e65 2074 6869 7320 6361 Redefine this ca\n+0015e8c0: 6c6c 6261 636b 2074 6f20 7265 7370 6f6e llback to respon\n+0015e8d0: 6420 746f 2048 5454 5020 4845 4144 2072 d to HTTP HEAD r\n+0015e8e0: 6571 7565 7374 7320 6d6f 7265 2073 7065 equests more spe\n+0015e8f0: 6369 6669 6361 6c6c 792e 2052 6574 7572 cifically. Retur\n+0015e900: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+0015e910: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n+0015e9e0: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n+0015e9f0: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n+0015ea00: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n+0015ea10: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n+0015ea20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::f\n+0015eaf0: 6865 6164 3c2f 613e 3c2f 636f 6465 3e20 head \n+0015eb00: 6973 2074 6865 2069 6e74 6572 6e61 6c20 is the internal \n+0015eb10: 7374 6174 6963 2066 756e 6374 696f 6e20 static function \n+0015eb20: 3c63 6f64 653e 6874 7470 5f32 3030 3c2f http_200 that retur\n+0015eb40: 6e73 2048 5454 5020 3230 3020 4f4b 2e3c ns HTTP 200 OK.<\n+0015eb50: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+0015eb80: 0a66 666f 726d 3c2f 6833 3e0a 3c70 3e3c .fform

    .

    <\n+0015eb90: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n+0015ec60: 736f 6170 3a3a 6666 6f72 6d3c 2f61 3e29 soap::fform)\n+0015ec70: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0015ec80: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .<\n+0015ec90: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n+0015eca0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n+0015ecb0: 2048 5454 5020 464f 524d 2068 616e 646c HTTP FORM handl\n+0015ecc0: 6572 2070 6c75 6769 6e20 746f 2070 6172 er plugin to par\n+0015ecd0: 7365 2048 544d 4c20 666f 726d 7320 7265 se HTML forms re\n+0015ece0: 6365 6976 6564 2077 6974 6820 4854 5450 ceived with HTTP\n+0015ecf0: 2050 4f53 5420 616e 6420 5055 5420 7265 POST and PUT re\n+0015ed00: 7175 6573 7473 2c20 7365 6520 7468 6520 quests, see the \n+0015ed10: 3c63 6f64 653e 3b3a 6874 7470 5f66 6f72 ;:http_for\n+0015ed20: 6d3c 2f63 6f64 653e 2048 5454 5020 464f m HTTP FO\n+0015ed30: 524d 2070 6c75 6769 6e20 666f 7220 6d6f RM plugin for mo\n+0015ed40: 7265 2064 6574 6169 6c73 2e20 5468 6520 re details. The \n+0015ed50: 4854 5450 2062 6f64 7920 7769 7468 2074 HTTP body with t\n+0015ed60: 6865 2066 6f72 6d20 6461 7461 2073 686f he form data sho\n+0015ed70: 756c 6420 6265 2070 6172 7365 6420 6279 uld be parsed by\n+0015ed80: 2074 6869 7320 6361 6c6c 6261 636b 2c20 this callback, \n+0015ed90: 6f74 6865 7277 6973 6520 4854 5450 206b otherwise HTTP k\n+0015eda0: 6565 702d 616c 6976 6520 6d65 7373 6167 eep-alive messag\n+0015edb0: 6573 2077 696c 6c20 656e 6420 7570 206f es will end up o\n+0015edc0: 7574 206f 6620 7379 6e63 2061 7320 6120 ut of sync as a \n+0015edd0: 7265 7375 6c74 206f 6620 7468 6520 6375 result of the cu\n+0015ede0: 7272 656e 7420 706f 7369 7469 6f6e 206e rrent position n\n+0015edf0: 6f74 2062 6569 6e67 2061 6476 616e 6365 ot being advance\n+0015ee00: 6420 746f 2074 6865 2065 6e64 206f 6620 d to the end of \n+0015ee10: 7468 6520 4854 5450 2062 6f64 792e 2052 the HTTP body. R\n+0015ee20: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+0015ee30: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+0015ee40: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+0015ef00: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+0015ef10: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n+0015ef20: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu\n+0015ef30: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign\n+0015ef40: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fform.

    .
    .fhead\n+0015f060: 6572 3c2f 6833 3e0a 3c70 3e3c 636f 6465 er

    .

    int (soap\n+0015f140: 3a3a 6668 6561 6465 723c 2f61 3e29 2873 ::fheader)(s\n+0015f150: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0015f160: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n+0015f170: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+0015f180: 2063 616c 6c65 6420 696d 6d65 6469 6174 called immediat\n+0015f190: 656c 7920 6166 7465 7220 7061 7273 696e ely after parsin\n+0015f1a0: 6720 6120 534f 4150 2048 6561 6465 7220 g a SOAP Header \n+0015f1b0: 696e 746f 2074 6865 203c 636f 6465 3e3c into the <\n+0015f1c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015f1d0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0015f1e0: 6d6c 2361 6330 3931 6466 6534 6530 3162 ml#ac091dfe4e01b\n+0015f1f0: 3661 3038 3264 3931 3663 3338 3165 3730 6a082d916c381e70\n+0015f200: 3036 6261 2220 7469 746c 653d 2254 6865 06ba\" title=\"The\n+0015f210: 2073 6f61 703a 3a68 6561 6465 7220 706f soap::header po\n+0015f220: 696e 7473 2074 6f20 6120 534f 4150 5f45 ints to a SOAP_E\n+0015f230: 4e56 5f5f 4865 6164 6572 2073 7472 7563 NV__Header struc\n+0015f240: 7475 7265 2077 6974 6820 7468 6520 534f ture with the SO\n+0015f250: 4150 2048 6561 6465 7220 7468 6174 2077 AP Header that w\n+0015f260: 6173 2072 6563 6569 7665 6420 6f72 2074 as received or t\n+0015f270: 6861 2e2e 2e22 3e73 6f61 703a 3a68 6561 ha...\">soap::hea\n+0015f280: 6465 723c 2f61 3e3c 2f63 6f64 653e 2073 der s\n+0015f290: 7472 7563 7475 7265 2e20 5468 6520 534f tructure. The SO\n+0015f2a0: 4150 2048 6561 6465 7220 7374 7275 6374 AP Header struct\n+0015f2b0: 7572 6520 3c63 6f64 653e 3c61 2063 6c61 ure soap::header can be\n+0015f390: 2069 6e73 7065 6374 6564 2062 7920 7468 inspected by th\n+0015f3a0: 6973 2066 756e 6374 696f 6e20 616e 6420 is function and \n+0015f3b0: 7665 7269 6669 6564 206f 7220 7265 6a65 verified or reje\n+0015f3c0: 6374 6564 2062 6566 6f72 6520 7468 6520 cted before the \n+0015f3d0: 7265 7374 206f 6620 7468 6520 6d65 7373 rest of the mess\n+0015f3e0: 6167 6520 7769 7468 2074 6865 2053 4f41 age with the SOA\n+0015f3f0: 5020 426f 6479 2069 7320 636f 6e73 756d P Body is consum\n+0015f400: 6564 2e20 5265 7475 726e 7320 3c63 6f64 ed. Returns #SOAP_OK or a so\n+0015f4e0: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n+0015f500: 2063 6f64 652e 204e 6f20 6275 696c 742d code. No built-\n+0015f510: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a\n+0015f520: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fhe\n+0015f600: 6164 6572 3c2f 613e 3c2f 636f 6465 3e2e ader.\n+0015f610: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fignore

    .<\n+0015f650: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (soap::fignore\n+0015f730: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n+0015f740: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n+0015f750: 6861 7220 2a74 6167 293c 2f63 6f64 653e har *tag)\n+0015f760: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+0015f770: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015f780: 7768 656e 2061 6e20 756e 7265 636f 676e when an unrecogn\n+0015f790: 697a 6564 2058 4d4c 2065 6c65 6d65 6e74 ized XML element\n+0015f7a0: 2077 6173 2065 6e63 6f75 6e74 6572 6564 was encountered\n+0015f7b0: 206f 6e20 7468 6520 696e 7075 7420 7468 on the input th\n+0015f7c0: 6174 2063 6f75 6c64 2062 6520 6967 6e6f at could be igno\n+0015f7d0: 7265 6420 6465 7065 6e64 696e 6720 6f6e red depending on\n+0015f7e0: 2073 6f6d 6520 7370 6563 6966 6965 6420 some specified \n+0015f7f0: 6c6f 6769 632e 2054 6865 203c 636f 6465 logic. The tag para\n+0015f810: 6d65 7465 7220 6973 2074 6865 206f 6666 meter is the off\n+0015f820: 656e 6469 6e67 2058 4d4c 2065 6c65 6d65 ending XML eleme\n+0015f830: 6e74 2074 6167 206e 616d 6520 7374 7269 nt tag name stri\n+0015f840: 6e67 2e20 5468 6520 6361 6c6c 6261 636b ng. The callback\n+0015f850: 2073 686f 756c 6420 7265 7475 726e 203c should return <\n+0015f860: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK to ignore t\n+0015f880: 6865 2065 6c65 6d65 6e74 206f 7220 7265 he element or re\n+0015f890: 7475 726e 2061 6e20 3c63 6f64 653e 3c61 turn an s\n+0015f950: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status error code\n+0015f970: 2073 7563 6820 6173 203c 636f 6465 3e23 such as #\n+0015f980: 534f 4150 5f54 4147 5f4d 4953 4d41 5443 SOAP_TAG_MISMATC\n+0015f990: 483c 2f63 6f64 653e 2074 6f20 7472 6967 H to trig\n+0015f9a0: 6765 7220 6120 7661 6c69 6461 7469 6f6e ger a validation\n+0015f9b0: 2065 7272 6f72 2e20 5468 6973 2063 616c error. This cal\n+0015f9c0: 6c62 6163 6b20 616c 736f 206f 7665 7272 lback also overr\n+0015f9d0: 6964 6573 203c 636f 6465 3e6d 7573 7455 ides mustU\n+0015f9e0: 6e64 6572 7374 616e 643c 2f63 6f64 653e nderstand\n+0015f9f0: 2061 7474 7269 6275 7465 7320 6f6e 2075 attributes on u\n+0015fa00: 6e72 6563 6f67 6e69 7a65 6420 534f 4150 nrecognized SOAP\n+0015fa10: 2048 6561 6465 7220 656c 656d 656e 7473 Header elements\n+0015fa20: 2074 6861 7420 6e6f 726d 616c 6c79 2072 that normally r\n+0015fa30: 6169 7365 2066 6175 6c74 732e 2049 7420 aise faults. It \n+0015fa40: 6973 2073 7472 6f6e 676c 7920 7265 636f is strongly reco\n+0015fa50: 6d6d 656e 6465 6420 7468 6174 2074 6865 mmended that the\n+0015fa60: 2063 616c 6c62 6163 6b20 7265 7475 726e callback return\n+0015fa70: 7320 3c63 6f64 653e 2353 4f41 505f 4d55 s #SOAP_MU\n+0015fa80: 5354 554e 4445 5253 5441 4e44 3c2f 636f STUNDERSTAND when <\n+0015faa0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015fab0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0015fac0: 6d6c 2361 3137 6337 3530 6632 3064 6162 ml#a17c750f20dab\n+0015fad0: 3537 3961 3661 3233 6333 3031 3939 6564 579a6a23c30199ed\n+0015fae0: 3132 3633 2220 7469 746c 653d 2254 6865 1263\" title=\"The\n+0015faf0: 2073 6f61 703a 3a6d 7573 7455 6e64 6572 soap::mustUnder\n+0015fb00: 7374 616e 6420 666c 6167 2069 7320 7365 stand flag is se\n+0015fb10: 7420 7768 656e 2061 2053 4f41 5020 4865 t when a SOAP He\n+0015fb20: 6164 6572 2065 6c65 6d65 6e74 2063 6172 ader element car\n+0015fb30: 7269 6573 2061 2053 4f41 502d 454e 563a ries a SOAP-ENV:\n+0015fb40: 6d75 7374 556e 6465 7273 7461 6e64 2061 mustUnderstand a\n+0015fb50: 7474 2e2e 2e22 3e73 6f61 703a 3a6d 7573 tt...\">soap::mus\n+0015fb60: 7455 6e64 6572 7374 616e 643c 2f61 3e3c tUnderstand<\n+0015fb70: 2f63 6f64 653e 2021 3d20 3c63 6f64 653e /code> != \n+0015fb80: 303c 2f63 6f64 653e 2e20 5265 7475 726e 0. Return\n+0015fb90: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n+0015fba0: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n+0015fc70: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n+0015fc80: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No \n+0015fc90: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+0015fca0: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n+0015fcb0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n+0015fd80: 703a 3a66 6967 6e6f 7265 3c2f 613e 3c2f p::fignore.

    .

    <\n+0015fda0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0015fdb0: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n+0015fdc0: 3222 3e3c 2f61 3e0a 6673 7661 6c69 6461 2\">.fsvalida\n+0015fdd0: 7465 3c2f 6833 3e0a 3c70 3e3c 636f 6465 te

    .

    int (soap\n+0015fe80: 3a3a 6673 7661 6c69 6461 7465 3c2f 613e ::fsvalidate\n+0015fe90: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n+0015fea0: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n+0015feb0: 2a70 6174 7465 726e 2c20 636f 6e73 7420 *pattern, const \n+0015fec0: 6368 6172 202a 7374 7269 6e67 293c 2f63 char *string)

    .

    This\n+0015fee0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015fef0: 6c65 6420 746f 2076 616c 6964 6174 6520 led to validate \n+0015ff00: 6120 7374 7269 6e67 2061 6761 696e 7374 a string against\n+0015ff10: 2061 6e20 584d 4c20 7265 6765 7820 7061 an XML regex pa\n+0015ff20: 7474 6572 6e2e 2050 6174 7465 726e 7320 ttern. Patterns \n+0015ff30: 7573 6520 584d 4c20 7363 6865 6d61 2072 use XML schema r\n+0015ff40: 6567 6578 2073 796e 7461 782e 2054 6869 egex syntax. Thi\n+0015ff50: 7320 6361 6c6c 6261 636b 2061 6c6c 6f77 s callback allow\n+0015ff60: 7320 7573 6572 2d64 6566 696e 6564 2070 s user-defined p\n+0015ff70: 6174 7465 726e 2076 616c 6964 6174 696f attern validatio\n+0015ff80: 6e20 7468 6174 2069 7320 6e6f 726d 616c n that is normal\n+0015ff90: 6c79 2064 6973 6162 6c65 642e 2052 6574 ly disabled. Ret\n+0015ffa0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n+0015ffb0: 5f4f 4b3c 2f63 6f64 653e 2077 6865 6e20 _OK when \n+0015ffc0: 7468 6520 7374 7269 6e67 206d 6174 6368 the string match\n+0015ffd0: 6573 2074 6865 2070 6174 7465 726e 206f es the pattern o\n+0015ffe0: 7220 3c63 6f64 653e 2353 4f41 505f 5459 r #SOAP_TY\n+0015fff0: 5045 3c2f 636f 6465 3e20 7768 656e 2074 PE when t\n+00160000: 6865 2073 7472 696e 6720 646f 6573 206e he string does n\n+00160010: 6f74 206d 6174 6368 2e20 4e6f 2062 7569 ot match. No bui\n+00160020: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i\n+00160030: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to soap::\n+001600e0: 6673 7661 6c69 6461 7465 3c2f 613e 3c2f fsvalidate.

    .

    <\n+00160100: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00160110: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n+00160120: 3322 3e3c 2f61 3e0a 6677 7661 6c69 6461 3\">.fwvalida\n+00160130: 7465 3c2f 6833 3e0a 3c70 3e3c 636f 6465 te

    .

    int (soap::fwvalidat\n+001601f0: 653c 2f61 3e29 2873 7472 7563 7420 736f e)(struct so\n+00160200: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n+00160210: 6368 6172 202a 7061 7474 6572 6e2c 2063 char *pattern, c\n+00160220: 6f6e 7374 2077 6368 6172 5f74 202a 7374 onst wchar_t *st\n+00160230: 7269 6e67 293c 2f63 6f64 653e 2054 6869 ring) Thi\n+00160240: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+00160250: 6c6c 6564 2074 6f20 7661 6c69 6461 7465 lled to validate\n+00160260: 2061 2077 6964 6520 7374 7269 6e67 2061 a wide string a\n+00160270: 6761 696e 7374 2061 6e20 584d 4c20 7265 gainst an XML re\n+00160280: 6765 7820 7061 7474 6572 6e2e 2050 6174 gex pattern. Pat\n+00160290: 7465 726e 7320 7573 6520 584d 4c20 7363 terns use XML sc\n+001602a0: 6865 6d61 2072 6567 6578 2073 796e 7461 hema regex synta\n+001602b0: 782e 2054 6869 7320 6361 6c6c 6261 636b x. This callback\n+001602c0: 2061 6c6c 6f77 7320 7573 6572 2d64 6566 allows user-def\n+001602d0: 696e 6564 2070 6174 7465 726e 2076 616c ined pattern val\n+001602e0: 6964 6174 696f 6e20 7468 6174 2069 7320 idation that is \n+001602f0: 6e6f 726d 616c 6c79 2064 6973 6162 6c65 normally disable\n+00160300: 642e 2052 6574 7572 6e73 203c 636f 6465 d. Returns #SOAP_OK\n+00160320: 2077 6865 6e20 7468 6520 7374 7269 6e67 when the string\n+00160330: 206d 6174 6368 6573 2074 6865 2070 6174 matches the pat\n+00160340: 7465 726e 206f 7220 3c63 6f64 653e 2353 tern or #S\n+00160350: 4f41 505f 5459 5045 3c2f 636f 6465 3e20 OAP_TYPE \n+00160360: 7768 656e 2074 6865 2073 7472 696e 6720 when the string \n+00160370: 646f 6573 206e 6f74 206d 6174 6368 2e20 does not match. \n+00160380: 4e6f 2062 7569 6c74 2d69 6e20 6675 6e63 No built-in func\n+00160390: 7469 6f6e 2069 7320 6173 7369 676e 6564 tion is assigned\n+001603a0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fwval\n+00160450: 6964 6174 653c 2f61 3e3c 2f63 6f64 653e idate\n+00160460: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fseterror.

    void \n+001604b0: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fseterr\n+00160560: 6f72 3c2f 613e 2928 7374 7275 6374 2073 or)(struct s\n+00160570: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+00160580: 2063 6861 7220 2a2a 636f 6465 2c20 636f char **code, co\n+00160590: 6e73 7420 6368 6172 202a 2a73 7472 696e nst char **strin\n+001605a0: 6729 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 g)

    .This callback i\n+001605c0: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+001605d0: 656e 6769 6e65 2077 6865 6e20 616e 2065 engine when an e\n+001605e0: 7272 6f72 2069 7320 7261 6973 6564 2074 rror is raised t\n+001605f0: 6f20 616c 6c6f 7720 696e 7370 6563 7469 o allow inspecti\n+00160600: 6f6e 206f 7220 6f76 6572 7269 6469 6e67 on or overriding\n+00160610: 206f 6620 7468 6520 6661 756c 7420 636f of the fault co\n+00160620: 6465 206f 7220 6661 756c 7420 7374 7269 de or fault stri\n+00160630: 6e67 206d 6573 7361 6765 7320 6265 666f ng messages befo\n+00160640: 7265 2074 6865 2065 7272 6f72 2069 7320 re the error is \n+00160650: 7265 706f 7274 6564 206f 7220 7472 616e reported or tran\n+00160660: 736d 6974 7465 642e 204e 6f20 6275 696c smitted. No buil\n+00160670: 742d 696e 2066 756e 6374 696f 6e20 6973 t-in function is\n+00160680: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::fsete\n+00160740: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e2e rror.\n+00160750: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fopen

    .

    \n+00160790: 3c63 6f64 653e 534f 4150 5f53 4f43 4b45 SOAP_SOCKE\n+001607a0: 5420 283c 6120 636c 6173 733d 2265 6c22 T (so\n+00160840: 6170 3a3a 666f 7065 6e3c 2f61 3e29 2873 ap::fopen)(s\n+00160850: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00160860: 2c20 636f 6e73 7420 6368 6172 202a 656e , const char *en\n+00160870: 6470 6f69 6e74 2c20 636f 6e73 7420 6368 dpoint, const ch\n+00160880: 6172 202a 686f 7374 2c20 696e 7420 706f ar *host, int po\n+00160890: 7274 293c 2f63 6f64 653e 3c2f 703e 0a3c rt)

    .<\n+001608a0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n+001608b0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n+001608c0: 2065 6e67 696e 6520 6174 2074 6865 2063 engine at the c\n+001608d0: 6c69 656e 742d 7369 6465 2062 7920 3c63 lient-side by s\n+00160960: 6f61 705f 636f 6e6e 6563 743c 2f61 3e3c oap_connect<\n+00160970: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n+00160980: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_\n+001609f0: 636f 6e6e 6563 745f 636f 6d6d 616e 643c connect_command<\n+00160a00: 2f61 3e3c 2f63 6f64 653e 2074 6f20 6f70 /a> to op\n+00160a10: 656e 2061 2054 4350 206f 7220 5544 5020 en a TCP or UDP \n+00160a20: 636f 6e6e 6563 7469 6f6e 2074 6f20 6120 connection to a \n+00160a30: 7365 7276 6572 2073 7065 6369 6669 6564 server specified\n+00160a40: 2061 7420 616e 2065 6e64 706f 696e 742e at an endpoint.\n+00160a50: 2050 6172 616d 6574 6572 7320 3c63 6f64 Parameters host an\n+00160a70: 6420 3c63 6f64 653e 706f 7274 3c2f 636f d port are micro-pa\n+00160a90: 7273 6564 2066 726f 6d20 3c63 6f64 653e rsed from \n+00160aa0: 656e 6470 6f69 6e74 3c2f 636f 6465 3e20 endpoint \n+00160ab0: 6265 666f 7265 2062 6569 6e67 2070 6173 before being pas\n+00160ac0: 7365 6420 746f 203c 636f 6465 3e3c 6120 sed to soap::fo\n+00160b70: 7065 6e3c 2f61 3e3c 2f63 6f64 653e 2e20 pen. \n+00160b80: 5265 7475 726e 7320 6120 7661 6c69 6420 Returns a valid \n+00160b90: 736f 636b 6574 206f 7220 3c63 6f64 653e socket or \n+00160ba0: 2353 4f41 505f 494e 5641 4c49 445f 534f #SOAP_INVALID_SO\n+00160bb0: 434b 4554 3c2f 636f 6465 3e20 7769 7468 CKET with\n+00160bc0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a s\n+00160c70: 6f61 703a 3a65 7272 6f72 3c2f 613e 3c2f oap::error set to a <\n+00160c90: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n+00160d50: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n+00160d60: 7429 2065 7272 6f72 2063 6f64 6520 616e t) error code an\n+00160d70: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap::er\n+00160e00: 726e 756d 3c2f 613e 3c2f 636f 6465 3e20 rnum \n+00160e10: 7365 7420 746f 203c 636f 6465 3e65 7272 set to err\n+00160e20: 6e6f 3c2f 636f 6465 3e20 6f66 2074 6865 no of the\n+00160e30: 2063 6f6e 6e65 6374 696f 6e20 6661 696c connection fail\n+00160e40: 7572 652e 2054 6865 2062 7569 6c74 2d69 ure. The built-i\n+00160e50: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig\n+00160e60: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::fo\n+00160f10: 7065 6e3c 2f61 3e3c 2f63 6f64 653e 2069 pen i\n+00160f20: 7320 3c63 6f64 653e 7463 705f 636f 6e6e s tcp_conn\n+00160f30: 6563 743c 2f63 6f64 653e 2e3c 2f70 3e0a ect.

    .\n+00160f40: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fac\n+00160f70: 6365 7074 3c2f 6833 3e0a 3c70 3e3c 636f cept

    .

    SOAP_SOCKET (\n+00160f90: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00161040: 3a3a 6661 6363 6570 743c 2f61 3e29 2873 ::faccept)(s\n+00161050: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00161060: 2c20 534f 4150 5f53 4f43 4b45 5420 732c , SOAP_SOCKET s,\n+00161070: 2073 7472 7563 7420 736f 636b 6164 6472 struct sockaddr\n+00161080: 202a 612c 2069 6e74 202a 6e29 3c2f 636f *a, int *n)

    .

    This \n+001610a0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+001610b0: 6564 2062 7920 3c63 6f64 653e 3c61 2063 ed by soap_accept\n+00161140: 3c2f 613e 3c2f 636f 6465 3e20 286f 7220 (or \n+00161150: 7468 6520 432b 2b20 7365 7276 6963 6520 the C++ service \n+00161160: 636c 6173 7320 3c63 6f64 653e 6163 6365 class acce\n+00161170: 7074 3c2f 636f 6465 3e20 6d65 7468 6f64 pt method\n+00161180: 2920 746f 2077 6169 7420 666f 7220 616e ) to wait for an\n+00161190: 6420 6163 6365 7074 2061 2073 6f63 6b65 d accept a socke\n+001611a0: 7420 636f 6e6e 6563 7469 6f6e 2072 6571 t connection req\n+001611b0: 7565 7374 6564 2062 7920 6120 636c 6965 uested by a clie\n+001611c0: 6e74 2e20 5265 7475 726e 7320 6120 7661 nt. Returns a va\n+001611d0: 6c69 6420 736f 636b 6574 206f 7220 3c63 lid socket or #SOAP_INVALI\n+001611f0: 445f 534f 434b 4554 3c2f 636f 6465 3e20 D_SOCKET \n+00161200: 7768 656e 2061 6e20 6572 726f 7220 6f63 when an error oc\n+00161210: 6375 7272 6564 2061 6e64 2073 6574 7320 curred and sets \n+00161220: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n+001612d0: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error to a s\n+001613a0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status value. The\n+001613c0: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n+001613d0: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n+001613e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::faccept is tcp_accept.

    .

    .fclose.

    int \n+00161510: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fclose)(struct soap \n+001615c0: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap).

    This callba\n+001615e0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n+001615f0: 7468 6520 656e 6769 6e65 2061 7420 7468 the engine at th\n+00161600: 6520 636c 6965 6e74 2d73 6964 6520 746f e client-side to\n+00161610: 2063 6c6f 7365 2074 6865 2063 7572 7265 close the curre\n+00161620: 6e74 2073 6f63 6b65 7420 636f 6e6e 6563 nt socket connec\n+00161630: 7469 6f6e 2062 6566 6f72 6520 6120 6e65 tion before a ne\n+00161640: 7720 736f 636b 6574 2063 6f6e 6e65 6374 w socket connect\n+00161650: 696f 6e20 6973 2065 7374 6162 6c69 7368 ion is establish\n+00161660: 6564 2e20 5468 6973 2063 616c 6c62 6163 ed. This callbac\n+00161670: 6b20 6d61 7920 6265 2063 616c 6c65 6420 k may be called \n+00161680: 6d75 6c74 6970 6c65 2074 696d 6573 2028 multiple times (\n+00161690: 652e 672e 2062 7920 7468 6520 656e 6769 e.g. by the engi\n+001616a0: 6e65 2061 6e64 2062 7920 706c 7567 696e ne and by plugin\n+001616b0: 7329 2074 6f20 636c 6f73 6520 7468 6520 s) to close the \n+001616c0: 7361 6d65 2073 6f63 6b65 7420 3c63 6f64 same socket soap::\n+00161790: 736f 636b 6574 3c2f 613e 3c2f 636f 6465 socket. Checks intern\n+001617b0: 616c 6c79 2069 6620 3c63 6f64 653e 3c61 ally if soap::sock\n+00161880: 6574 3c2f 613e 3c2f 636f 6465 3e20 3d3d et ==\n+00161890: 203c 636f 6465 3e23 534f 4150 5f49 4e56 #SOAP_INV\n+001618a0: 414c 4944 5f53 4f43 4b45 543c 2f63 6f64 ALID_SOCKET before closin\n+001618c0: 672c 2077 6869 6368 206d 6561 6e73 2074 g, which means t\n+001618d0: 6861 7420 7468 6520 736f 636b 6574 2077 hat the socket w\n+001618e0: 6173 2061 6c72 6561 6479 2063 6c6f 7365 as already close\n+001618f0: 642e 2052 6574 7572 6e73 203c 636f 6465 d. Returns #SOAP_OK\n+00161910: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+001619d0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+001619f0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n+00161a00: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n+00161a10: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to s\n+00161ab0: 6f61 703a 3a66 636c 6f73 653c 2f61 3e3c oap::fclose<\n+00161ac0: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n+00161ad0: 7463 705f 6469 7363 6f6e 6e65 6374 3c2f tcp_disconnect.

    .

    <\n+00161af0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00161b00: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n+00161b10: 3822 3e3c 2f61 3e0a 6672 6573 6f6c 7665 8\">.fresolve\n+00161b20: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

    .

    i\n+00161b30: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap\n+00161bd0: 3a3a 6672 6573 6f6c 7665 3c2f 613e 2928 ::fresolve)(\n+00161be0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00161bf0: 702c 2063 6f6e 7374 2063 6861 7220 2a61 p, const char *a\n+00161c00: 6464 722c 2073 7472 7563 7420 696e 5f61 ddr, struct in_a\n+00161c10: 6464 7220 2a69 6e61 6464 7229 3c2f 636f ddr *inaddr)

    .

    This \n+00161c30: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+00161c40: 6564 2062 7920 3c63 6f64 653e 3c61 2063 ed by soa\n+00161cc0: 705f 6269 6e64 3c2f 613e 3c2f 636f 6465 p_bind (or the C++ se\n+00161ce0: 7276 6963 6520 636c 6173 7320 3c63 6f64 rvice class bind me\n+00161d00: 7468 6f64 2920 6174 2074 6865 2073 6572 thod) at the ser\n+00161d10: 7665 722d 7369 6465 2061 6e64 2062 7920 ver-side and by \n+00161d20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_connect or soa\n+00161e30: 705f 636f 6e6e 6563 745f 636f 6d6d 616e p_connect_comman\n+00161e40: 643c 2f61 3e3c 2f63 6f64 653e 2061 7420 d at \n+00161e50: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n+00161e60: 7769 7468 2061 2068 6f73 7420 3c63 6f64 with a host name pa\n+00161e80: 7261 6d65 7465 7220 746f 2072 6573 6f6c rameter to resol\n+00161e90: 7665 2074 6f20 6164 6472 6573 7320 3c63 ve to address inaddr by address tra\n+00161ec0: 6e73 6c61 7469 6f6e 2e20 5768 656e 2073 nslation. When s\n+00161ed0: 7563 6365 7373 6675 6c20 7365 7473 2070 uccessful sets p\n+00161ee0: 6172 616d 6574 6572 203c 636f 6465 3e69 arameter i\n+00161ef0: 6e61 6464 723c 2f63 6f64 653e 2061 6e64 naddr and\n+00161f00: 2072 6574 7572 6e73 203c 636f 6465 3e23 returns #\n+00161f10: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n+00161f20: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+00161fe0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n+00162000: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n+00162010: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n+00162020: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fresol\n+001620d0: 7665 3c2f 613e 3c2f 636f 6465 3e20 6973 ve is\n+001620e0: 203c 636f 6465 3e74 6370 5f67 6574 686f tcp_getho\n+001620f0: 7374 3c2f 636f 6465 3e2e 3c2f 703e 0a3c st.

    .<\n+00162100: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fcon\n+00162130: 6e65 6374 3c2f 6833 3e0a 3c70 3e3c 636f nect

    .

    int (soap::fconne\n+001621f0: 6374 3c2f 613e 2928 7374 7275 6374 2073 ct)(struct s\n+00162200: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+00162210: 2063 6861 7220 2a65 6e64 706f 696e 742c char *endpoint,\n+00162220: 2063 6f6e 7374 2063 6861 7220 2a68 6f73 const char *hos\n+00162230: 742c 2069 6e74 2070 6f72 7429 3c2f 636f t, int port)

    .

    This \n+00162250: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+00162260: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n+00162270: 2074 6f20 6f70 7469 6f6e 616c 6c79 206f to optionally o\n+00162280: 7665 7272 6964 6520 636c 6965 6e74 2d73 verride client-s\n+00162290: 6964 6520 636f 6e6e 6563 7469 6e67 2e20 ide connecting. \n+001622a0: 5468 6520 7061 7261 6d65 7465 7273 203c The parameters <\n+001622b0: 636f 6465 3e68 6f73 743c 2f63 6f64 653e code>host\n+001622c0: 2061 6e64 203c 636f 6465 3e70 6f72 743c and port<\n+001622d0: 2f63 6f64 653e 2077 6572 6520 6d69 6372 /code> were micr\n+001622e0: 6f2d 7061 7273 6564 2066 726f 6d20 7468 o-parsed from th\n+001622f0: 6520 3c63 6f64 653e 656e 6470 6f69 6e74 e endpoint\n+00162300: 3c2f 636f 6465 3e20 7072 696f 7220 746f prior to\n+00162310: 2070 6173 7369 6e67 2074 6865 6d20 746f passing them to\n+00162320: 2074 6869 7320 6361 6c6c 6261 636b 2e20 this callback. \n+00162330: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+00162340: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+00162350: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+00162410: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+00162420: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n+00162430: 652e 204e 6f20 6275 696c 742d 696e 2066 e. No built-in f\n+00162440: 756e 6374 696f 6e20 6973 2061 7373 6967 unction is assig\n+00162450: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::f\n+00162500: 636f 6e6e 6563 743c 2f61 3e3c 2f63 6f64 connect.

    .

    \n+00162540: 3c2f 613e 0a66 6469 7363 6f6e 6e65 6374 .fdisconnect\n+00162550: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

    .

    i\n+00162560: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap::f\n+00162600: 6469 7363 6f6e 6e65 6374 3c2f 613e 2928 disconnect)(\n+00162610: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00162620: 7029 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 p)

    .This callback i\n+00162640: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+00162650: 656e 6769 6e65 203c 636f 6465 3e3c 6120 engine \n+001626d0: 736f 6170 5f63 6c6f 7365 736f 636b 3c2f soap_closesock before\n+001626f0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap\n+00162790: 3a3a 6663 6c6f 7365 3c2f 613e 3c2f 636f ::fclose callback is \n+001627b0: 6361 6c6c 6564 2074 6f20 7368 7574 646f called to shutdo\n+001627c0: 776e 2f64 6973 636f 6e6e 6563 742e 2052 wn/disconnect. R\n+001627d0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+001627e0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+001627f0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+001628b0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+001628c0: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n+001628d0: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu\n+001628e0: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign\n+001628f0: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fdisconne\n+001629a0: 6374 3c2f 613e 3c2f 636f 6465 3e2e 3c2f ct..

    .\n+001629e0: 6663 6c6f 7365 736f 636b 6574 3c2f 6833 fclosesocket.

    int (\n+00162a00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fcloseso\n+00162a90: 636b 6574 3c2f 613e 2928 7374 7275 6374 cket)(struct\n+00162aa0: 2073 6f61 7020 2a73 6f61 702c 2053 4f41 soap *soap, SOA\n+00162ab0: 505f 534f 434b 4554 2073 6f63 6b29 3c2f P_SOCKET sock)

    .

    Thi\n+00162ad0: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+00162ae0: 6c6c 6564 2074 6f20 636c 6f73 6520 6120 lled to close a \n+00162af0: 736f 636b 6574 2062 7920 7468 6520 656e socket by the en\n+00162b00: 6769 6e65 2e20 5265 7475 726e 7320 3c63 gine. Returns #SOAP_OK or a <\n+00162b30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00162b40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00162b50: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+00162b60: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+00162b70: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+00162b80: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+00162b90: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+00162ba0: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+00162bb0: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+00162bc0: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+00162bd0: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+00162be0: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+00162bf0: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n+00162c00: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+00162c10: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+00162c20: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fcloses\n+00162cc0: 6f63 6b65 743c 2f61 3e3c 2f63 6f64 653e ocket\n+00162cd0: 2069 7320 3c63 6f64 653e 7463 705f 636c is tcp_cl\n+00162ce0: 6f73 6573 6f63 6b65 743c 2f63 6f64 653e osesocket\n+00162cf0: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fshutdownsock\n+00162d30: 6574 3c2f 6833 3e0a 3c70 3e3c 636f 6465 et

    .

    int (soap\n+00162dd0: 3a3a 6673 6875 7464 6f77 6e73 6f63 6b65 ::fshutdownsocke\n+00162de0: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so\n+00162df0: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S\n+00162e00: 4f43 4b45 5420 736f 636b 2c20 696e 7420 OCKET sock, int \n+00162e10: 686f 7729 3c2f 636f 6465 3e3c 2f70 3e0a how)

    .\n+00162e20: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n+00162e30: 2069 7320 6361 6c6c 6564 2074 6f20 7368 is called to sh\n+00162e40: 7574 2064 6f77 6e20 6120 736f 636b 6574 ut down a socket\n+00162e50: 2062 7920 7468 6520 656e 6769 6e65 2e20 by the engine. \n+00162e60: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+00162e70: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+00162e80: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+00162f40: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+00162f50: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n+00162f60: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n+00162f70: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n+00162f80: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fshutdown\n+00163020: 736f 636b 6574 3c2f 613e 3c2f 636f 6465 socket is tcp_s\n+00163040: 6875 7464 6f77 6e73 6f63 6b65 743c 2f63 hutdownsocket.

    .

    .fpoll.

    int (\n+001630a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00163160: 3a3a 6670 6f6c 6c3c 2f61 3e29 2873 7472 ::fpoll)(str\n+00163170: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+00163180: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+00163190: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+001631a0: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n+001631b0: 696e 6520 746f 2077 6169 7420 666f 7220 ine to wait for \n+001631c0: 6163 7469 7669 7479 206f 6e20 7468 6520 activity on the \n+001631d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00163290: 6170 3a3a 736f 636b 6574 3c2f 613e 3c2f ap::socket or <\n+001632b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001632c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+001632d0: 6d6c 2361 6236 3439 6238 6633 6237 3130 ml#ab649b8f3b710\n+001632e0: 3831 6431 3465 6336 3335 3061 6234 6230 81d14ec6350ab4b0\n+001632f0: 3637 3934 2220 7469 746c 653d 2254 6865 6794\" title=\"The\n+00163300: 2073 6f63 6b65 7420 7365 7420 6279 2073 socket set by s\n+00163310: 6f61 705f 6269 6e64 2028 6f72 2074 6865 oap_bind (or the\n+00163320: 2043 2b2b 2073 6572 7669 6365 2063 6c61 C++ service cla\n+00163330: 7373 2062 696e 6420 6d65 7468 6f64 2920 ss bind method) \n+00163340: 746f 2073 6572 7665 2061 7320 7468 6520 to serve as the \n+00163350: 6d61 7374 6572 2073 6f63 6b65 7420 626f master socket bo\n+00163360: 756e 2e2e 2e22 3e73 6f61 703a 3a6d 6173 un...\">soap::mas\n+00163370: 7465 723c 2f61 3e3c 2f63 6f64 653e 2073 ter s\n+00163380: 6f63 6b65 7420 7573 696e 6720 3c63 6f64 ocket using poll or\n+001633a0: 203c 636f 6465 3e73 656c 6563 743c 2f63 select. Times out \n+001633c0: 7768 656e 203c 636f 6465 3e3c 6120 636c when soap::send_ti\n+00163480: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout\n+00163490: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or soap::recv_\n+00163550: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout are nonzero. \n+00163570: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+00163580: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+00163590: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+00163650: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+00163660: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n+00163670: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n+00163680: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n+00163690: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fpo\n+00163760: 6c6c 3c2f 613e 3c2f 636f 6465 3e20 6973 ll is\n+00163770: 203c 636f 6465 3e73 6f61 705f 706f 6c6c soap_poll\n+00163780: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..frecv<\n+001637c0: 2f68 333e 0a3c 703e 3c63 6f64 653e 7369 /h3>.

    si\n+001637d0: 7a65 5f74 2028 3c61 2063 6c61 7373 3d22 ze_t (s\n+00163870: 6f61 703a 3a66 7265 6376 3c2f 613e 2928 oap::frecv)(\n+00163880: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00163890: 702c 2063 6861 7220 2a62 7566 2c20 7369 p, char *buf, si\n+001638a0: 7a65 5f74 206c 656e 293c 2f63 6f64 653e ze_t len)\n+001638b0: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+001638c0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+001638d0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n+001638e0: 2072 6563 6569 7665 2028 6f72 2072 6561 receive (or rea\n+001638f0: 6429 2064 6174 6120 696e 746f 2061 2073 d) data into a s\n+00163900: 7065 6369 6669 6564 2062 7566 6665 7220 pecified buffer \n+00163910: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf\n+00163920: 2061 6e64 203c 636f 6465 3e6c 656e 3c2f and len. The sourc\n+00163940: 6520 666f 7220 7468 6520 6461 7461 2074 e for the data t\n+00163950: 6f20 7265 6164 2062 7920 7468 6973 2063 o read by this c\n+00163960: 616c 6c62 6163 6b20 6973 203c 636f 6465 allback is soap::i\n+00163a30: 733c 2f61 3e3c 2f63 6f64 653e 2077 6865 s whe\n+00163a40: 6e20 6e6f 6e2d 4e55 4c4c 2c20 3c63 6f64 n non-NULL, soap::\n+00163b10: 736f 636b 6574 3c2f 613e 3c2f 636f 6465 socket when valid, or\n+00163b30: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00163bf0: 6f61 703a 3a72 6563 7666 643c 2f61 3e3c oap::recvfd<\n+00163c00: 2f63 6f64 653e 2e20 5265 7475 726e 7320 /code>. Returns \n+00163c10: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n+00163d00: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n+00163d10: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+00163d20: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap\n+00163dd0: 3a3a 6672 6563 763c 2f61 3e3c 2f63 6f64 ::frecv is frec\n+00163df0: 763c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 v.

    ..fsend\n+00163e30: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

    .

    i\n+00163e40: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (so\n+00163ed0: 6170 3a3a 6673 656e 643c 2f61 3e29 2873 ap::fsend)(s\n+00163ee0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00163ef0: 2c20 636f 6e73 7420 6368 6172 202a 6275 , const char *bu\n+00163f00: 662c 2073 697a 655f 7420 6c65 6e29 3c2f f, size_t len)

    .

    Thi\n+00163f20: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+00163f30: 6c6c 6564 2062 7920 7468 6520 656e 6769 lled by the engi\n+00163f40: 6e65 2074 6f20 7365 6e64 2028 6f72 2077 ne to send (or w\n+00163f50: 7269 7465 2920 6461 7461 2073 7065 6369 rite) data speci\n+00163f60: 6669 6564 2062 7920 3c63 6f64 653e 6461 fied by da\n+00163f70: 7461 3c2f 636f 6465 3e20 6279 7465 7320 ta bytes \n+00163f80: 6f66 206c 656e 6774 6820 3c63 6f64 653e of length \n+00163f90: 6c65 6e3c 2f63 6f64 653e 2e20 5468 6520 len. The \n+00163fa0: 7369 6e6b 2066 6f72 2074 6865 2064 6174 sink for the dat\n+00163fb0: 6120 746f 2062 6520 7365 6e74 2074 6f20 a to be sent to \n+00163fc0: 6973 2074 7970 6963 616c 6c79 203c 636f is typically soap:\n+00164090: 3a73 6f63 6b65 743c 2f61 3e3c 2f63 6f64 :socket, soap::sendfd or soap:\n+00164240: 3a6f 733c 2f61 3e3c 2f63 6f64 653e 2e20 :os. \n+00164250: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+00164260: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+00164270: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+00164330: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+00164340: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n+00164350: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n+00164360: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n+00164370: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fsend\n+00164410: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is <\n+00164420: 636f 6465 3e66 7365 6e64 3c2f 636f 6465 code>fsend.

    .

    <\n+00164460: 2f61 3e0a 6673 6572 7665 726c 6f6f 703c /a>.fserverloop<\n+00164470: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n+00164480: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n+00164550: 7365 7276 656c 6f6f 703c 2f61 3e29 2873 serveloop)(s\n+00164560: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00164570: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n+00164580: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+00164590: 2063 616c 6c65 6420 6166 7465 7220 6561 called after ea\n+001645a0: 6368 2073 7563 6365 7373 6675 6c20 636f ch successful co\n+001645b0: 6d70 6c65 7469 6f6e 206f 6620 6120 7365 mpletion of a se\n+001645c0: 7276 6572 206f 7065 7261 7469 6f6e 2069 rver operation i\n+001645d0: 6e20 7468 6520 7365 7276 6572 206c 6f6f n the server loo\n+001645e0: 702e 2045 7865 6375 7465 7320 696d 6d65 p. Executes imme\n+001645f0: 6469 6174 656c 7920 6166 7465 7220 7365 diately after se\n+00164600: 6e64 696e 6720 7468 6520 7265 7370 6f6e nding the respon\n+00164610: 7365 2074 6f20 6120 636c 6965 6e74 2061 se to a client a\n+00164620: 6e64 2062 6566 6f72 6520 7468 6520 6e65 nd before the ne\n+00164630: 7874 206b 6565 702d 616c 6976 6520 7365 xt keep-alive se\n+00164640: 7276 6572 206c 6f6f 7020 6974 6572 6174 rver loop iterat\n+00164650: 696f 6e20 7768 656e 2065 6e61 626c 6564 ion when enabled\n+00164660: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA\n+00164670: 505f 494f 5f4b 4545 5041 4c49 5645 3c2f P_IO_KEEPALIVE. This call\n+00164690: 6261 636b 2063 616e 2062 6520 7573 6564 back can be used\n+001646a0: 2074 6f20 7265 636c 6169 6d20 7265 736f to reclaim reso\n+001646b0: 7572 6365 7320 696e 2074 6865 206b 6565 urces in the kee\n+001646c0: 702d 616c 6976 6520 7365 7276 6572 206c p-alive server l\n+001646d0: 6f6f 702c 2066 6f72 2065 7861 6d70 6c65 oop, for example\n+001646e0: 206d 616e 6167 6564 206d 656d 6f72 7920 managed memory \n+001646f0: 6361 6e20 6265 2072 6563 6c61 696d 6564 can be reclaimed\n+00164700: 2062 7920 6361 6c6c 696e 6720 3c63 6f64 by calling soap_destroy and soap_end<\n+001648b0: 2f61 3e3c 2f63 6f64 653e 2069 6e20 7468 /a> in th\n+001648c0: 6174 206f 7264 6572 2061 6e64 2061 6c6c at order and all\n+001648d0: 2064 6573 6572 6961 6c69 7a65 6420 616e deserialized an\n+001648e0: 6420 6f74 6865 7220 6479 6e61 6d69 6361 d other dynamica\n+001648f0: 6c6c 792d 616c 6c6f 6361 7465 6420 6461 lly-allocated da\n+00164900: 7461 206d 616e 6167 6564 2062 7920 7468 ta managed by th\n+00164910: 6520 636f 6e74 6578 7420 7769 6c6c 2062 e context will b\n+00164920: 6520 6465 616c 6c6f 6361 7465 642e 2052 e deallocated. R\n+00164930: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+00164940: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+00164950: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+00164a10: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+00164a20: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n+00164a30: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu\n+00164a40: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign\n+00164a50: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fservelo\n+00164b30: 6f70 3c2f 613e 3c2f 636f 6465 3e2e 3c2f op..

    .\n+00164b70: 666d 616c 6c6f 633c 2f68 333e 0a3c 703e fmalloc

    .

    \n+00164b80: 3c63 6f64 653e 766f 6964 2028 3c61 2063 void (soap::fm\n+00164c30: 616c 6c6f 633c 2f61 3e29 2873 7472 7563 alloc)(struc\n+00164c40: 7420 736f 6170 202a 736f 6170 2c20 7369 t soap *soap, si\n+00164c50: 7a65 5f74 2073 697a 6529 3c2f 636f 6465 ze_t size)

    .

    This ca\n+00164c70: 6c6c 6261 636b 2063 616e 2062 6520 7573 llback can be us\n+00164c80: 6564 2074 6f20 6f76 6572 7269 6465 206d ed to override m\n+00164c90: 656d 6f72 7920 616c 6c6f 6361 7469 6f6e emory allocation\n+00164ca0: 2061 6e64 206d 616e 6167 656d 656e 7420 and management \n+00164cb0: 646f 6e65 2062 7920 3c63 6f64 653e 3c61 done by \n+00164d60: 736f 6170 5f6d 616c 6c6f 633c 2f61 3e3c soap_malloc<\n+00164d70: 2f63 6f64 653e 2069 6e20 432e 204d 656d /code> in C. Mem\n+00164d80: 6f72 7920 616c 6c6f 6361 7465 6420 7669 ory allocated vi\n+00164d90: 6120 7468 6973 2063 616c 6c62 6163 6b20 a this callback \n+00164da0: 7769 6c6c 206e 6f74 2062 6520 6d61 6e61 will not be mana\n+00164db0: 6765 6420 616e 6420 6e6f 7420 6265 2061 ged and not be a\n+00164dc0: 7574 6f6d 6174 6963 616c 6c79 2072 656c utomatically rel\n+00164dd0: 6561 7365 6420 6279 2074 6865 2065 6e67 eased by the eng\n+00164de0: 696e 652e 2049 6e73 7465 6164 2c20 7468 ine. Instead, th\n+00164df0: 6520 6170 706c 6963 6174 696f 6e20 7573 e application us\n+00164e00: 696e 6720 7468 6973 2063 616c 6c62 6163 ing this callbac\n+00164e10: 6b20 7368 6f75 6c64 2072 656c 6561 7365 k should release\n+00164e20: 2061 6c6c 6f63 6174 6564 206d 656d 6f72 allocated memor\n+00164e30: 792e 2041 6c6c 2061 6c6c 6f63 6174 696f y. All allocatio\n+00164e40: 6e73 2064 6f6e 6520 6279 203c 636f 6465 ns done by soap_malloc are re\n+00164f10: 706c 6163 6564 2077 6974 6820 6120 6361 placed with a ca\n+00164f20: 6c6c 2074 6f20 3c63 6f64 653e 3c61 2063 ll to soap::fm\n+00164fd0: 616c 6c6f 633c 2f61 3e3c 2f63 6f64 653e alloc\n+00164fe0: 2e20 486f 7765 7665 722c 206e 6f20 6f74 . However, no ot\n+00164ff0: 6865 7220 616c 6c6f 6361 7469 6f6e 732c her allocations,\n+00165000: 2073 7563 6820 6173 203c 636f 6465 3e3c such as <\n+00165010: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00165020: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00165030: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00165040: 3837 6332 3034 3838 6232 6463 3638 3061 87c20488b2dc680a\n+00165050: 6161 3736 3839 6231 6430 3234 3938 3963 aa7689b1d024989c\n+00165060: 2220 7469 746c 653d 2241 6c6c 6f63 6174 \" title=\"Allocat\n+00165070: 6520 616e 6420 696e 6974 6961 6c69 7a65 e and initialize\n+00165080: 2061 206e 6577 2073 6f61 7020 636f 6e74 a new soap cont\n+00165090: 6578 742e 223e 736f 6170 5f6e 6577 3c2f ext.\">soap_new and soap_new_T for C++ cl\n+001650d0: 6173 7365 7320 3c63 6f64 653e 543c 2f63 asses T are affecte\n+001650f0: 642c 2062 6563 6175 7365 206f 626a 6563 d, because objec\n+00165100: 7473 2061 7265 2061 6c6c 6f63 6174 6564 ts are allocated\n+00165110: 2064 6966 6665 7265 6e74 6c79 2e20 5468 differently. Th\n+00165120: 6973 2063 616c 6c62 6163 6b20 6973 2074 is callback is t\n+00165130: 6865 7265 666f 7265 206e 6f74 2075 7365 herefore not use\n+00165140: 6675 6c20 666f 7220 432b 2b20 6170 706c ful for C++ appl\n+00165150: 6963 6174 696f 6e73 2e20 5265 7475 726e ications. Return\n+00165160: 7320 6120 706f 696e 7465 7220 746f 2064 s a pointer to d\n+00165170: 796e 616d 6963 616c 6c79 2061 6c6c 6f63 ynamically alloc\n+00165180: 6174 6564 206d 656d 6f72 7920 6f72 204e ated memory or N\n+00165190: 554c 4c20 6f6e 2066 6169 6c75 7265 2074 ULL on failure t\n+001651a0: 6f20 616c 6c6f 6361 7465 2e20 4e6f 2062 o allocate. No b\n+001651b0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+001651c0: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to \n+001651d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmalloc<\n+00165280: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n+00165290: 3c64 6c20 636c 6173 733d 2273 6563 7469
    \n+001652b0: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
    \n+001652c0: 4465 7072 6563 6174 6564 2073 696e 6365 Deprecated since\n+001652d0: 2032 2e38 2e37 322e 2044 6566 696e 6520 2.8.72. Define \n+001652e0: 3c63 6f64 653e 2353 4f41 505f 4d41 4c4c #SOAP_MALL\n+001652f0: 4f43 3c2f 636f 6465 3e20 616e 6420 3c63 OC and #SOAP_FREE instead.
    .

    .user varia\n+00165360: 626c 653c 2f68 333e 0a3c 703e 4120 3c63 ble

    .

    A void* soap::user\n+00165440: 3c2f 636f 6465 3e20 7661 7269 6162 6c65 variable\n+00165450: 2069 7320 6176 6169 6c61 626c 6520 746f is available to\n+00165460: 2070 6173 7320 7573 6572 2d64 6566 696e pass user-defin\n+00165470: 6564 2064 6174 6120 746f 2074 6865 2063 ed data to the c\n+00165480: 616c 6c62 6163 6b73 2e3c 2f70 3e0a 3c68 allbacks.

    ..Examp\n+001654c0: 6c65 733c 2f68 333e 0a3c 703e 5468 6520 les

    .

    The \n+001654d0: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl\n+001654e0: 6520 7573 6573 2049 2f4f 2063 616c 6c62 e uses I/O callb\n+001654f0: 6163 6b73 2066 6f72 2063 7573 746f 6d69 acks for customi\n+00165500: 7a65 6420 7365 7269 616c 697a 6174 696f zed serializatio\n+00165510: 6e20 6f66 2064 6174 6120 696e 746f 2061 n of data into a\n+00165520: 2066 6978 6564 2d73 697a 6520 6275 6666 fixed-size buff\n+00165530: 6572 2061 6e64 2064 6573 6572 6961 6c69 er and deseriali\n+00165540: 7a61 7469 6f6e 2062 6163 6b20 696e 746f zation back into\n+00165550: 2061 2064 6174 6120 7374 7275 6374 7572 a data structur\n+00165560: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+00165590: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001655a0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char buf[10000];\n+001655c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // XML bu\n+001655e0: 6666 6572 203c 2f73 7061 6e3e 3c2f 6469 ffer .
    i\n+00165620: 6e74 3c2f 7370 616e 3e20 6c65 6e31 203d nt len1 =\n+00165630: 2030 3b20 2020 203c 7370 616e 2063 6c61 0; // \n+00165650: 2363 6861 7273 2077 7269 7474 656e 203c #chars written <\n+00165660: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+00165680: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00165690: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int len2 = 0; \n+001656b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // #chars\n+001656d0: 2072 6561 6420 3c2f 7370 616e 3e3c 2f64 read .
    .\n-00165710: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-00165740: 2f2f 206d 7973 656e 643a 2070 7574 2058 // mysend: put X\n-00165750: 4d4c 2069 6e20 6275 665b 5d20 3c2f 7370 ML in buf[]
    .
    int\n-001657a0: 206d 7973 656e 6428 3c73 7061 6e20 636c mysend(st\n-001657c0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n-00165850: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00165870: 2f73 7061 6e3e 202a 732c 203c 7370 616e /span> *s, size_t n)
    .{\n-001658c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

    .
    if (\n-00165900: 6c65 6e31 202b 206e 2026 6774 3b20 3c73 len1 + n > sizeof(buf))
    .<\n-00165940: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00165950: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-00165970: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_EOF; <\n-001659e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    strcpy\n-00165a00: 2862 7566 202b 206c 656e 312c 2073 293b (buf + len1, s);\n-00165a10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    len1\n-00165a30: 202b 3d20 6e3b 203c 2f64 6976 3e0a 3c64 += n;
    .\n-00165a50: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-00165a70: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-00165ad0: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK; .
    }
    . \n-00165b10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-00165b40: 2f20 6d79 7265 6376 3a20 6765 7420 584d / myrecv: get XM\n-00165b50: 4c20 6672 6f6d 2062 7566 5b5d 203c 2f73 L from buf[]
    .
    size_t myrecv(struct \n-00165bd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00165c00: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00165c30: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n-00165c50: 3c2f 7370 616e 3e20 2a73 2c20 3c73 7061 *s, size_t n)
    .// mysend:\n+00165730: 2070 7574 2058 4d4c 2069 6e20 6275 665b put XML in buf[\n+00165740: 5d20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ]
    .\n+00165750: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+00165a10: 2020 6c65 6e31 202b 3d20 6e3b 203c 2f64 len1 += n; .
    return \n+00165a60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n+00165ac0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .<\n+00165b10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00165b20: 656e 7422 3e2f 2f20 6d79 7265 6376 3a20 ent\">// myrecv: \n+00165b30: 6765 7420 584d 4c20 6672 6f6d 2062 7566 get XML from buf\n+00165b40: 5b5d 203c 2f73 7061 6e3e 3c2f 6469 763e []
    \n+00165b50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    siz\n+00165b80: 655f 743c 2f73 7061 6e3e 206d 7972 6563 e_t myrec\n+00165b90: 7628 3c73 7061 6e20 636c 6173 733d 226b v(struct soa\n+00165be0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00165c10: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, char *s\n+00165c40: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size\n+00165c60: 5f74 3c2f 7370 616e 3e20 6e29 203c 2f64 _t n) .
    {
    .\n-00165ca0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n-00165ce0: 286c 656e 3220 2b20 6e20 2667 743b 206c (len2 + n > l\n-00165cf0: 656e 3129 203c 2f64 6976 3e0a 3c64 6976 en1)
    . \n-00165d10: 2020 6e20 3d20 6c65 6e31 202d 206c 656e n = len1 - len\n-00165d20: 323b 203c 2f64 6976 3e0a 3c64 6976 2063 2;
    .
    st\n-00165d40: 726e 6370 7928 732c 2062 7566 202b 206c rncpy(s, buf + l\n-00165d50: 656e 322c 206e 293b 203c 2f64 6976 3e0a en2, n);
    .\n-00165d60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    len2 += n; <\n-00165d80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return n;
    .} \n+00165ca0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (len2 + n \n+00165cd0: 2667 743b 206c 656e 3129 203c 2f64 6976 > len1) .
    n = len1\n+00165d00: 202d 206c 656e 323b 203c 2f64 6976 3e0a - len2;
    .\n+00165d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    strncpy(s, b\n+00165d30: 7566 202b 206c 656e 322c 206e 293b 203c uf + len2, n); <\n+00165d40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    len2 +\n+00165d60: 3d20 6e3b 203c 2f64 6976 3e0a 3c64 6976 = n;
    . \n+00165d80: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+00165da0: 3c2f 7370 616e 3e20 6e3b 203c 2f64 6976 n; .
    }
    . \n 00165de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00165e00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-00165e30: 3c2f 7370 616e 3e20 6d61 696e 2829 203c main() <\n+00165df0: 733d 226c 696e 6522 3e3c 7370 616e 2063 s=\"line\">int ma\n+00165e20: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n 00165e40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-00165e60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-00165f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n-00165f30: 203c 2f73 7061 6e3e 6e73 5f5f 7065 7273 ns__pers\n-00165f40: 6f6e 2070 3b20 3c2f 6469 763e 0a3c 6469 on p;
    . \n-00165f60: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init1\n-00165fc0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap, SO\n-00166050: 4150 5f58 4d4c 5f54 5245 453c 2f61 3e29 AP_XML_TREE)\n-00166060: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    len\n-00166080: 3120 3d20 6c65 6e32 203d 2030 3b20 2020 1 = len2 = 0; \n-00166090: 2020 3c73 7061 6e20 636c 6173 733d 2263 // reset\n-001660b0: 2062 7566 6665 7220 706f 696e 7465 7273 buffer pointers\n-001660c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001660d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001660e0: 3e20 2070 2e6e 616d 6520 3d20 3c73 7061 > p.name = "Jo\n-00166110: 686e 2044 6f65 2671 756f 743b 3c2f 7370 hn Doe";
    . \n-00166140: 702e 6167 6520 3d20 3235 3b20 3c2f 6469 p.age = 25; .
    so\n-00166190: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fs\n-001661f0: 656e 643c 2f61 3e20 3d20 6d79 7365 6e64 end = mysend\n-00166200: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // assig\n-00166220: 6e20 6361 6c6c 6261 636b 203c 2f73 7061 n callback
    .
    soap.frecv = \n-001662e0: 6d79 7265 6376 3b20 3c73 7061 6e20 636c myrecv; //\n-00166300: 2061 7373 6967 6e20 6361 6c6c 6261 636b assign callback\n-00166310: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00166320: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00166330: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-00166350: 2f73 7061 6e3e 2028 736f 6170 5f77 7269 /span> (soap_wri\n-00166360: 7465 5f6e 735f 5f70 6572 736f 6e28 2661 te_ns__person(&a\n-00166370: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, &p)).
    {
    .<\n-001663d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001663e0: 3e20 2020 203c 6120 636c 6173 733d 2263 >
    soap_pri\n-00166440: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am\n-00166450: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stdout); .
    exit(EX\n-001664b0: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    }
    \n-001664e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-00166510: 663c 2f73 7061 6e3e 2028 736f 6170 5f72 f (soap_r\n-00166520: 6561 645f 6e73 5f5f 5065 7273 6f6e 2826 ead_ns__Person(&\n-00166530: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-00166560: 2f61 3e2c 2026 616d 703b 7029 293c 2f64 /a>, &p)).
    {
    .\n-00166590: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr\n-00166600: 696e 745f 6661 756c 743c 2f61 3e28 2661 int_fault(&a\n-00166610: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, stdout); .
    exit(E\n-00166670: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    } .
    soap_\n-00166710: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(&\n-00166720: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-00166750: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_end(\n-001667d0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00166800: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n-00166820: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_done\n-00166880: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    }
    .
    soap::frecv\n-001669a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    size_t\n-001669c0: 282a 2066 7265 6376 2928 7374 7275 6374 (* frecv)(struct\n-001669d0: 2073 6f61 7020 2a73 6f61 702c 2063 6861 soap *soap, cha\n-001669e0: 7220 2a62 7566 2c20 7369 7a65 5f74 206c r *buf, size_t l\n-001669f0: 656e 293c 2f64 6976 3e3c 6469 7620 636c en)
    Call\n-00166a10: 6261 636b 2074 6861 7420 7265 6365 6976 back that receiv\n-00166a20: 6573 2062 7974 6573 206f 6620 6461 7461 es bytes of data\n-00166a30: 2069 6e74 6f20 7468 6520 6769 7665 6e20 into the given \n-00166a40: 6275 6666 6572 2e3c 2f64 6976 3e3c 6469 buffer.
    \n-00166a60: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:46\n-00166a80: 3037 3c2f 6469 763e 3c2f 6469 763e 0a3c 07
    .<\n-00166a90: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00166aa0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-00166ab0: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n-00166ac0: 6c5f 6761 6664 3532 6238 3036 3535 6534 l_gafd52b80655e4\n-00166ad0: 6631 3032 3165 6464 3663 3535 6238 6466 f1021edd6c55b8df\n-00166ae0: 6564 6666 223e 3c64 6976 2063 6c61 7373 edff\">\n-00166bb0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback that\n-00166bd0: 2073 656e 6473 2074 6865 2067 6976 656e sends the given\n-00166be0: 2062 7974 6573 206f 6620 6461 7461 2e3c bytes of data.<\n-00166bf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-00166c10: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-00166c20: 6170 322e 683a 3436 3230 3c2f 6469 763e ap2.h:4620
    \n-00166c30: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    A fixed-size bu\n-00166c60: 6666 6572 2074 6f20 7374 6f72 6520 7468 ffer to store th\n-00166c70: 6520 6f75 7462 6f75 6e64 206d 6573 7361 e outbound messa\n-00166c80: 6765 2073 656e 7420 6973 206e 6f74 2066 ge sent is not f\n-00166c90: 6c65 7869 626c 6520 746f 2068 616e 646c lexible to handl\n-00166ca0: 6520 6c61 7267 6520 636f 6e74 656e 742e e large content.\n-00166cb0: 2054 6f20 7374 6f72 6520 7468 6520 6d65 To store the me\n-00166cc0: 7373 6167 6520 696e 2061 6e20 6578 7061 ssage in an expa\n-00166cd0: 6e64 696e 6720 6275 6666 6572 3a3c 2f70 nding buffer:.
    \n-00166d20: 7374 7275 6374 203c 2f73 7061 6e3e 6275 struct bu\n-00166d30: 6666 6572 203c 2f64 6976 3e0a 3c64 6976 ffer
    .{<\n-00166d50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t len;
    .\n-00166db0: 2020 3c73 7061 6e20 636c 6173 733d 226b size\n-00166dd0: 5f74 3c2f 7370 616e 3e20 6d61 783b 203c _t max; <\n-00166de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char \n-00166e20: 2a62 7566 3b20 3c2f 6469 763e 0a3c 6469 *buf;
    .}\n-00166e40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .
    i\n-00166e90: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main()\n-00166ea0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    stru\n-00166ef0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap soap; .
    stru\n-00166f90: 6374 203c 2f73 7061 6e3e 6e73 5f5f 7065 ct ns__pe\n-00166fa0: 7273 6f6e 2070 3b20 3c2f 6469 763e 0a3c rson p;
    .<\n-00166fb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00166fc0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n-00166fe0: 3c2f 7370 616e 3e62 7566 6665 7220 2a68 buffer *h\n-00166ff0: 203d 206d 616c 6c6f 6328 3c73 7061 6e20 = malloc(\n-00167010: 7369 7a65 6f66 3c2f 7370 616e 3e28 3c73 sizeof(struct buffer)); .
    h->len\n-00167070: 203d 2030 3b20 3c2f 6469 763e 0a3c 6469 = 0;
    . \n-00167090: 2068 2d26 6774 3b6d 6178 203d 2030 3b20 h->max = 0; \n-001670a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    h->\n-001670c0: 3b62 7566 203d 204e 554c 4c3b 203c 2f64 ;buf = NULL; .
    soa\n-00167140: 705f 696e 6974 313c 2f61 3e28 2661 6d70 p_init1(&\n-00167150: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-00167180: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_XML_TR\n-001671e0: 4545 3c2f 613e 293b 203c 2f64 6976 3e0a EE);
    .\n-001671f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n-00167230: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.use\n-00167280: 723c 2f61 3e20 3d20 283c 7370 616e 2063 r = (void*)\n-001672b0: 683b 203c 7370 616e 2063 6c61 7373 3d22 h; // pass\n-001672d0: 2062 7566 6665 7220 6173 2061 2068 616e buffer as a han\n-001672e0: 646c 6520 746f 2074 6865 2063 616c 6c62 dle to the callb\n-001672f0: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack .
    soa\n-00167340: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.fse\n-001673a0: 6e64 3c2f 613e 203d 206d 7973 656e 643b nd = mysend;\n-001673b0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // assig\n-001673d0: 6e20 6361 6c6c 6261 636b 203c 2f73 7061 n callback
    .
    if\n-00167420: 2028 736f 6170 5f77 7269 7465 5f6e 735f (soap_write_ns_\n-00167430: 5f70 6572 736f 6e28 2661 6d70 3b3c 6120 _person(&soap, &a\n-00167470: 6d70 3b70 2929 3c2f 6469 763e 0a3c 6469 mp;p))
    . \n-00167490: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n-001674b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001674c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001674d0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-001674e0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-001674f0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-00167500: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-00167510: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n-00167550: 6f75 7429 3b20 3c2f 6469 763e 0a3c 6469 out);
    . \n-00167570: 2020 2065 7869 7428 4558 4954 5f46 4149 exit(EXIT_FAI\n-00167580: 4c55 5245 293b 203c 2f64 6976 3e0a 3c64 LURE);
    .\n-001675a0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n-001675c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001675d0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (h->len) <\n-001675f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    ... // use h->b\n-00167650: 7566 5b30 2e2e 682d 2667 743b 6c65 6e2d uf[0..h->len-\n-00167660: 315d 2063 6f6e 7465 6e74 203c 2f73 7061 1] content
    .
    <\n-00167690: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001676a0: 656e 7422 3e2f 2f20 7468 656e 2063 6c65 ent\">// then cle\n-001676b0: 616e 7570 3a20 3c2f 7370 616e 3e3c 2f64 anup: .
    h->\n-001676e0: 6c65 6e20 3d20 303b 203c 2f64 6976 3e0a len = 0;
    .\n-001676f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    h->max \n-00167710: 3d20 303b 203c 2f64 6976 3e0a 3c64 6976 = 0;
    . \n-00167730: 2020 6672 6565 2868 2d26 6774 3b62 7566 free(h->buf\n-00167740: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-00167760: 682d 2667 743b 6275 6620 3d20 4e55 4c4c h->buf = NULL\n-00167770: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } <\n-00167790: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n-00167860: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n-001678c0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-001678f0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soap_\n-00167970: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap);<\n-001679b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00165e50: 3d22 6c69 6e65 223e 2020 3c73 7061 6e20 =\"line\"> \n+00165e70: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n+00165ee0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00165f10: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n+00165f20: 5f5f 7065 7273 6f6e 2070 3b20 3c2f 6469 __person p; .
    soap\n+00165fa0: 5f69 6e69 7431 3c2f 613e 2826 616d 703b _init1(&\n+00165fb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00165fe0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_XML_TRE\n+00166040: 453c 2f61 3e29 3b20 3c2f 6469 763e 0a3c E);
    .<\n+00166050: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00166060: 3e20 206c 656e 3120 3d20 6c65 6e32 203d > len1 = len2 =\n+00166070: 2030 3b20 2020 2020 3c73 7061 6e20 636c 0; //\n+00166090: 2072 6573 6574 2062 7566 6665 7220 706f reset buffer po\n+001660a0: 696e 7465 7273 203c 2f73 7061 6e3e 3c2f inters .
    p.name \n+001660d0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+001660f0: 756f 743b 4a6f 686e 2044 6f65 2671 756f uot;John Doe&quo\n+00166100: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    p.age = 25\n+00166130: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap.fsend = \n+001661e0: 6d79 7365 6e64 3b20 3c73 7061 6e20 636c mysend; //\n+00166200: 2061 7373 6967 6e20 6361 6c6c 6261 636b assign callback\n+00166210: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00166220: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00166230: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap.frecv<\n+001662c0: 2f61 3e20 3d20 6d79 7265 6376 3b20 3c73 /a> = myrecv; // assign ca\n+001662f0: 6c6c 6261 636b 203c 2f73 7061 6e3e 3c2f llback ..
    {..
    e\n+00166490: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n+001664a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n+001664c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+00166500: 736f 6170 5f72 6561 645f 6e73 5f5f 5065 soap_read_ns__Pe\n+00166510: 7273 6f6e 2826 616d 703b 3c61 2063 6c61 rson(&soap, &\n+00166550: 7029 293c 2f64 6976 3e0a 3c64 6976 2063 p))
    .
    {<\n+00166570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    \n+00166650: 6578 6974 2845 5849 545f 4641 494c 5552 exit(EXIT_FAILUR\n+00166660: 4529 3b20 3c2f 6469 763e 0a3c 6469 7620 E);
    .
    }\n+00166680: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..\n+00166740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_en\n+001667b0: 643c 2f61 3e28 2661 6d70 3b3c 6120 636c d(&soap); .
    soa\n+00166860: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(&\n+00166870: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001668a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }.
    \n+001669a0: 7369 7a65 5f74 282a 2066 7265 6376 2928 size_t(* frecv)(\n+001669b0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+001669c0: 702c 2063 6861 7220 2a62 7566 2c20 7369 p, char *buf, si\n+001669d0: 7a65 5f74 206c 656e 293c 2f64 6976 3e3c ze_t len)
    <\n+001669e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001669f0: 223e 4361 6c6c 6261 636b 2074 6861 7420 \">Callback that \n+00166a00: 7265 6365 6976 6573 2062 7974 6573 206f receives bytes o\n+00166a10: 6620 6461 7461 2069 6e74 6f20 7468 6520 f data into the \n+00166a20: 6769 7665 6e20 6275 6666 6572 2e3c 2f64 given buffer.
    Definit\n+00166a50: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00166a60: 322e 683a 3436 3037 3c2f 6469 763e 3c2f 2.h:4607
    .
    \n+00166ae0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n+00166b30: 6673 656e 643c 2f61 3e3c 2f64 6976 3e3c fsend
    <\n+00166b40: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00166b50: 6922 3e69 6e74 282a 2066 7365 6e64 2928 i\">int(* fsend)(\n+00166b60: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00166b70: 702c 2063 6f6e 7374 2063 6861 7220 2a64 p, const char *d\n+00166b80: 6174 612c 2073 697a 655f 7420 6c65 6e29 ata, size_t len)\n+00166b90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac\n+00166bb0: 6b20 7468 6174 2073 656e 6473 2074 6865 k that sends the\n+00166bc0: 2067 6976 656e 2062 7974 6573 206f 6620 given bytes of \n+00166bd0: 6461 7461 2e3c 2f64 6976 3e3c 6469 7620 data.
    Definition:\n+00166c00: 2073 7464 736f 6170 322e 683a 3436 3230 stdsoap2.h:4620\n+00166c10: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    A fixed-s\n+00166c40: 697a 6520 6275 6666 6572 2074 6f20 7374 ize buffer to st\n+00166c50: 6f72 6520 7468 6520 6f75 7462 6f75 6e64 ore the outbound\n+00166c60: 206d 6573 7361 6765 2073 656e 7420 6973 message sent is\n+00166c70: 206e 6f74 2066 6c65 7869 626c 6520 746f not flexible to\n+00166c80: 2068 616e 646c 6520 6c61 7267 6520 636f handle large co\n+00166c90: 6e74 656e 742e 2054 6f20 7374 6f72 6520 ntent. To store \n+00166ca0: 7468 6520 6d65 7373 6167 6520 696e 2061 the message in a\n+00166cb0: 6e20 6578 7061 6e64 696e 6720 6275 6666 n expanding buff\n+00166cc0: 6572 3a3c 2f70 3e0a 3c64 6976 2063 6c61 er:

    .
    \n+00166cf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct buffer .
    {
    . \n+00166d50: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+00166d70: 3c2f 7370 616e 3e20 6c65 6e3b 203c 2f64 len; .
    size_t \n+00166dc0: 6d61 783b 203c 2f64 6976 3e0a 3c64 6976 max;
    . \n+00166de0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *buf; .
    };
    .<\n+00166e30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00166e40: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n+00166e80: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    .\n+00166ea0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n+00166ee0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00166f10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n+00166f40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct \n+00166f80: 6e73 5f5f 7065 7273 6f6e 2070 3b20 3c2f ns__person p; .
    s\n+00166fc0: 7472 7563 7420 3c2f 7370 616e 3e62 7566 truct buf\n+00166fd0: 6665 7220 2a68 203d 206d 616c 6c6f 6328 fer *h = malloc(\n+00166fe0: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(struct\n+00167020: 3c2f 7370 616e 3e20 6275 6666 6572 2929 buffer))\n+00167030: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    h-&\n+00167050: 6774 3b6c 656e 203d 2030 3b20 3c2f 6469 gt;len = 0; .
    h->max\n+00167080: 203d 2030 3b20 3c2f 6469 763e 0a3c 6469 = 0;
    . \n+001670a0: 2068 2d26 6774 3b62 7566 203d 204e 554c h->buf = NUL\n+001670b0: 4c3b 203c 2f64 6976 3e0a 3c64 6976 2063 L;
    .
    soap_init1(&so\n+00167160: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, SOAP_\n+001671c0: 584d 4c5f 5452 4545 3c2f 613e 293b 203c XML_TREE); <\n+001671d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.user = (<\n+00167270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00167280: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void*)h; /\n+001672b0: 2f20 7061 7373 2062 7566 6665 7220 6173 / pass buffer as\n+001672c0: 2061 2068 616e 646c 6520 746f 2074 6865 a handle to the\n+001672d0: 2063 616c 6c62 6163 6b20 3c2f 7370 616e callback
    .
    soap.fsend = m\n+00167390: 7973 656e 643b 2020 3c73 7061 6e20 636c ysend; //\n+001673b0: 2061 7373 6967 6e20 6361 6c6c 6261 636b assign callback\n+001673c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001673d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001673e0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00167400: 2f73 7061 6e3e 2028 736f 6170 5f77 7269 /span> (soap_wri\n+00167410: 7465 5f6e 735f 5f70 6572 736f 6e28 2661 te_ns__person(&a\n+00167420: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, &p)).
    {
    .<\n+00167480: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167490: 3e20 2020 203c 6120 636c 6173 733d 2263 >
    soap_pri\n+001674f0: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am\n+00167500: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stdout); .
    exit(EX\n+00167560: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    }
    \n+00167590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+001675c0: 663c 2f73 7061 6e3e 2028 682d 2667 743b f (h->\n+001675d0: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
    . \n+001675f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    ..\n+00167610: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // use h\n+00167630: 2d26 6774 3b62 7566 5b30 2e2e 682d 2667 ->buf[0..h-&g\n+00167640: 743b 6c65 6e2d 315d 2063 6f6e 7465 6e74 t;len-1] content\n+00167650: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00167660: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167670: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // th\n+00167690: 656e 2063 6c65 616e 7570 3a20 3c2f 7370 en cleanup:
    .
    \n+001676c0: 682d 2667 743b 6c65 6e20 3d20 303b 203c h->len = 0; <\n+001676d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    h-&g\n+001676f0: 743b 6d61 7820 3d20 303b 203c 2f64 6976 t;max = 0; .
    free(h-&\n+00167720: 6774 3b62 7566 293b 203c 2f64 6976 3e0a gt;buf);
    .\n+00167730: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    h->buf \n+00167750: 3d20 4e55 4c4c 3b20 3c2f 6469 763e 0a3c = NULL;
    .<\n+00167760: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167770: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n+00167790: 3c61 2063 6c61 7373 3d22 636f 6465 2220
    soap_destro\n+001677f0: 793c 2f61 3e28 2661 6d70 3b3c 6120 636c y(&soap); .
    soa\n+001678a0: 705f 656e 643c 2f61 3e28 2661 6d70 3b3c p_end(&<\n+001678b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001678c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001678d0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001678e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_done(&\n+00167960: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00167990: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .} \n+001679b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n 001679d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int mysend(s\n-00167a40: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-00167ab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00167ac0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00167af0: 3c2f 7370 616e 3e20 2a73 2c20 3c73 7061 *s, size_t n)
    .int\n+00167a00: 3c2f 7370 616e 3e20 6d79 7365 6e64 283c mysend(<\n+00167a10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00167a20: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+00167a90: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, const\n+00167ab0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *s\n+00167ae0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size\n+00167b00: 5f74 3c2f 7370 616e 3e20 6e29 203c 2f64 _t n) .
    {
    .\n-00167b40: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-00167b80: 6275 6666 6572 202a 6820 3d20 283c 7370 buffer *h = (struct buffer*)\n-00167be0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->user; \n-00167c40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get buf\n-00167c60: 6665 7220 7468 726f 7567 6820 6861 6e64 fer through hand\n-00167c70: 6c65 203c 2f73 7061 6e3e 3c2f 6469 763e le
    \n-00167c80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-00167cb0: 6e74 3c2f 7370 616e 3e20 6d20 3d20 682d nt m = h-\n-00167cc0: 2667 743b 6d61 782c 206b 203d 2068 2d26 >max, k = h-&\n-00167cd0: 6774 3b6c 656e 202b 206e 3b20 3c2f 6469 gt;len + n; .
    // \n-00167d10: 6e65 6564 2074 6f20 696e 6372 6561 7365 need to increase\n-00167d20: 2073 7061 6365 3f20 3c2f 7370 616e 3e3c space? <\n-00167d30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (m \n-00167d50: 3d3d 2030 2920 3c2f 6469 763e 0a3c 6469 == 0)
    . \n-00167d70: 2020 206d 203d 2031 3032 343b 203c 2f64 m = 1024; .
    else .
    while (k >= m) .
    m *\n-00167e30: 3d20 323b 203c 2f64 6976 3e0a 3c64 6976 = 2;
    . \n-00167e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (m != h->\n-00167e80: 6d61 7829 203c 2f64 6976 3e0a 3c64 6976 max)
    . \n-00167ea0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    char *buf = mallo\n-00167ef0: 6328 6d29 3b20 3c2f 6469 763e 0a3c 6469 c(m);
    . \n-00167f10: 2020 206d 656d 6370 7928 6275 662c 2068 memcpy(buf, h\n-00167f20: 2d26 6774 3b62 7566 2c20 682d 2667 743b ->buf, h->\n-00167f30: 6c65 6e29 3b20 3c2f 6469 763e 0a3c 6469 len);
    . \n-00167f50: 2020 2068 2d26 6774 3b6d 6178 203d 206d h->max = m\n-00167f60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-00167f80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00167f90: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (h->buf) <\n-00167fb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fr\n-00167fd0: 6565 2868 2d26 6774 3b62 7566 293b 203c ee(h->buf); <\n-00167fe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    h-&g\n-00168000: 743b 6275 6620 3d20 6275 663b 203c 2f64 t;buf = buf; .
    }
    \n-00168030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    memcpy(h-&g\n-00168050: 743b 6275 6620 2b20 682d 2667 743b 6c65 t;buf + h->le\n-00168060: 6e2c 2073 2c20 6e29 3b20 3c2f 6469 763e n, s, n);
    \n-00168070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    h->len +\n-00168090: 3d20 6e3b 203c 2f64 6976 3e0a 3c64 6976 = n;
    . \n-001680b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001680d0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-00168130: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    .\n-00168140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    \n-00168160: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The c\n-001686a0: 6c69 656e 7420 7072 6f67 7261 6d20 6973 lient program is\n-001686b0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ\n-00168700: 6520 2671 756f 743b 736f 6170 482e 6826 e "soapH.h&\n-00168710: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #include "\n-00168760: 6e73 2e6e 736d 6170 2671 756f 743b 3c2f ns.nsmap"
    . \n-00168790: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    SOAP_\n-00168800: 534f 434b 4554 3c2f 613e 206d 796f 7065 SOCKET myope\n-00168810: 6e28 3c73 7061 6e20 636c 6173 733d 226b n(struct soa\n-00168860: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-00168890: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, co\n-001688b0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001688e0: 202a 656e 6470 6f69 6e74 2c20 3c73 7061 *endpoint, const <\n-00168910: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00168920: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *host, int\n-00168960: 2070 6f72 7429 203c 2f64 6976 3e0a 3c64 port)
    .struct <\n+00167b60: 2f73 7061 6e3e 6275 6666 6572 202a 6820 /span>buffer *h \n+00167b70: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (struct \n+00167b90: 3c2f 7370 616e 3e62 7566 6665 722a 293c buffer*)<\n+00167ba0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00167bb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00167bc0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00167bd0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;user\n+00167c20: 3c2f 613e 3b20 3c73 7061 6e20 636c 6173 ; // g\n+00167c40: 6574 2062 7566 6665 7220 7468 726f 7567 et buffer throug\n+00167c50: 6820 6861 6e64 6c65 203c 2f73 7061 6e3e h handle \n+00167c60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int \n+00167ca0: 6d20 3d20 682d 2667 743b 6d61 782c 206b m = h->max, k\n+00167cb0: 203d 2068 2d26 6774 3b6c 656e 202b 206e = h->len + n\n+00167cc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    // need to in\n+00167d00: 6372 6561 7365 2073 7061 6365 3f20 3c2f crease space?
    . \n+00167d30: 6966 2028 6d20 3d3d 2030 2920 3c2f 6469 if (m == 0) .
    m = 102\n+00167d60: 343b 203c 2f64 6976 3e0a 3c64 6976 2063 4;
    .
    else
    .
    \n+00167dc0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while\n+00167de0: 3c2f 7370 616e 3e20 286b 2026 6774 3b3d (k >=\n+00167df0: 206d 2920 3c2f 6469 763e 0a3c 6469 7620 m)
    .
    \n+00167e10: 2020 206d 202a 3d20 323b 203c 2f64 6976 m *= 2; .
    \n+00167e50: 6966 3c2f 7370 616e 3e20 286d 2021 3d20 if (m != \n+00167e60: 682d 2667 743b 6d61 7829 203c 2f64 6976 h->max) .
    {
    .\n+00167ea0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+00167ec0: 6172 3c2f 7370 616e 3e20 2a62 7566 203d ar *buf =\n+00167ed0: 206d 616c 6c6f 6328 6d29 3b20 3c2f 6469 malloc(m); .
    memcpy(\n+00167f00: 6275 662c 2068 2d26 6774 3b62 7566 2c20 buf, h->buf, \n+00167f10: 682d 2667 743b 6c65 6e29 3b20 3c2f 6469 h->len); .
    h->m\n+00167f40: 6178 203d 206d 3b20 3c2f 6469 763e 0a3c ax = m;
    .<\n+00167f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167f60: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+00167f80: 663c 2f73 7061 6e3e 2028 682d 2667 743b f (h->\n+00167f90: 6275 6629 203c 2f64 6976 3e0a 3c64 6976 buf)
    . \n+00167fb0: 2020 2020 6672 6565 2868 2d26 6774 3b62 free(h->b\n+00167fc0: 7566 293b 203c 2f64 6976 3e0a 3c64 6976 uf);
    . \n+00167fe0: 2020 682d 2667 743b 6275 6620 3d20 6275 h->buf = bu\n+00167ff0: 663b 203c 2f64 6976 3e0a 3c64 6976 2063 f;
    .
    } \n+00168010: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    memcp\n+00168030: 7928 682d 2667 743b 6275 6620 2b20 682d y(h->buf + h-\n+00168040: 2667 743b 6c65 6e2c 2073 2c20 6e29 3b20 >len, s, n); \n+00168050: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    h->\n+00168070: 3b6c 656e 202b 3d20 6e3b 203c 2f64 6976 ;len += n; .
    \n+001680b0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; <\n+00168120: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+00168140: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The fo\n+00168160: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example \n+00168170: 696c 6c75 7374 7261 7465 7320 6375 7374 illustrates cust\n+00168180: 6f6d 697a 6564 2049 2f4f 2061 6e64 2048 omized I/O and H\n+00168190: 5454 5020 6865 6164 6572 2068 616e 646c TTP header handl\n+001681a0: 696e 672e 2054 6865 2058 4d4c 206d 6573 ing. The XML mes\n+001681b0: 7361 6765 2069 7320 7361 7665 6420 746f sage is saved to\n+001681c0: 2061 2066 696c 6520 746f 2064 656d 6f6e a file to demon\n+001681d0: 7374 7261 7465 2049 2f4f 2061 6e64 2048 strate I/O and H\n+001681e0: 5454 5020 6361 6c6c 6261 636b 732e 2054 TTP callbacks. T\n+001681f0: 6865 2063 6c69 656e 7420 7072 6f78 7920 he client proxy \n+00168200: 7468 656e 2072 6561 6473 2074 6865 2066 then reads the f\n+00168210: 696c 6520 636f 6e74 656e 7473 2061 7320 ile contents as \n+00168220: 7468 6520 7365 7276 6963 6520 7265 7370 the service resp\n+00168230: 6f6e 7365 2e20 546f 2070 6572 666f 726d onse. To perform\n+00168240: 2074 6869 7320 7472 6963 6b2c 2074 6865 this trick, the\n+00168250: 2073 6572 7669 6365 2072 6573 706f 6e73 service respons\n+00168260: 6520 6861 7320 6578 6163 746c 7920 7468 e has exactly th\n+00168270: 6520 7361 6d65 2073 7472 7563 7475 7265 e same structure\n+00168280: 2061 7320 7468 6520 7265 7175 6573 742e as the request.\n+00168290: 2054 6869 7320 6973 2064 6563 6c61 7265 This is declare\n+001682a0: 6420 6279 2074 6865 203c 636f 6465 3e73 d by the s\n+001682b0: 7472 7563 7420 6e73 5f5f 7465 7374 3c2f truct ns__test output par\n+001682d0: 616d 6574 6572 2070 6172 7420 6f66 2074 ameter part of t\n+001682e0: 6865 2073 6572 7669 6365 206f 7065 7261 he service opera\n+001682f0: 7469 6f6e 2064 6563 6c61 7261 7469 6f6e tion declaration\n+00168300: 2e20 5468 6973 2073 7472 7563 7420 7265 . This struct re\n+00168310: 7365 6d62 6c65 7320 7468 6520 7365 7276 sembles the serv\n+00168320: 6963 6520 7265 7175 6573 7420 2873 6565 ice request (see\n+00168330: 2074 6865 2067 656e 6572 6174 6564 203c the generated <\n+00168340: 656d 3e3c 636f 6465 3e73 6f61 7053 7475 em>soapStu\n+00168350: 622e 683c 2f63 6f64 653e 3c2f 656d 3e20 b.h \n+00168360: 6669 6c65 2067 656e 6572 6174 6564 2062 file generated b\n+00168370: 7920 736f 6170 6370 7032 2066 726f 6d20 y soapcpp2 from \n+00168380: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n+00168390: 6164 6572 2066 696c 6520 696e 7075 7429 ader file input)\n+001683a0: 2e3c 2f70 3e0a 3c70 3e54 6865 2069 6e74 .

    .

    The int\n+001683b0: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+001683c0: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 \n+001683d0: 6973 3a3c 2f70 3e0a 3c64 6976 2063 6c61 is:

    .
    \n+00168400: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+00168420: 2073 6572 7669 6365 206e 616d 653a 2063 service name: c\n+00168430: 616c 6c62 6163 6b20 3c2f 7370 616e 3e3c allback <\n+00168440: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+00168470: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+00168480: 206e 616d 6573 7061 6365 3a20 7572 6e3a namespace: urn:\n+00168490: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback \n+001684a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+001684d0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n+001684e0: 5f70 6572 736f 6e20 3c2f 6469 763e 0a3c _person
    .<\n+001684f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00168500: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n+00168520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00168530: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *name; .
    int ag\n+00168590: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    }; <\n+001685b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n+001685f0: 5f74 6573 7428 3c73 7061 6e20 636c 6173 _test(stru\n+00168610: 6374 3c2f 7370 616e 3e20 6e73 5f5f 7065 ct ns__pe\n+00168620: 7273 6f6e 2069 6e2c 203c 7370 616e 2063 rson in, s\n+00168640: 7472 7563 743c 2f73 7061 6e3e 206e 735f truct ns_\n+00168650: 5f74 6573 7420 2661 6d70 3b6f 7574 293b _test &out);\n+00168660: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The client prog\n+00168690: 7261 6d20 6973 3a3c 2f70 3e0a 3c64 6976 ram is:

    .
    #\n+001686e0: 696e 636c 7564 6520 2671 756f 743b 736f include "so\n+001686f0: 6170 482e 6826 7175 6f74 3b3c 2f73 7061 apH.h"
    .
    #include \n+00168740: 2671 756f 743b 6e73 2e6e 736d 6170 2671 "ns.nsmap&q\n+00168750: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; .
    .<\n+00168790: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001687a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001687b0: 705f 5f73 6f61 702e 6874 6d6c 2367 6136 p__soap.html#ga6\n+001687c0: 6562 3162 6465 3763 6563 6332 6662 6164 eb1bde7cecc2fbad\n+001687d0: 6263 6262 6336 3339 3532 3237 3433 3922 bcbbc6395227439\"\n+001687e0: 3e53 4f41 505f 534f 434b 4554 3c2f 613e >SOAP_SOCKET\n+001687f0: 206d 796f 7065 6e28 3c73 7061 6e20 636c myopen(st\n+00168810: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n+001688a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001688c0: 2f73 7061 6e3e 202a 656e 6470 6f69 6e74 /span> *endpoint\n+001688d0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n+00168910: 6861 723c 2f73 7061 6e3e 202a 686f 7374 har *host\n+00168920: 2c20 3c73 7061 6e20 636c 6173 733d 226b , int<\n+00168940: 2f73 7061 6e3e 2070 6f72 7429 203c 2f64 /span> port) .
    {
    .\n-00168980: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n-001689c0: 2873 7472 6e63 6d70 2865 6e64 706f 696e (strncmp(endpoin\n-001689d0: 742c 203c 7370 616e 2063 6c61 7373 3d22 t, &\n-001689f0: 7175 6f74 3b66 696c 653a 2671 756f 743b quot;file:"\n-00168a00: 3c2f 7370 616e 3e2c 2035 2929 203c 2f64 , 5)) .
    {
    .\n-00168a30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("F\n-00168a70: 696c 6520 6e61 6d65 2065 7870 6563 7465 ile name expecte\n-00168a80: 645c 6e26 7175 6f74 3b3c 2f73 7061 6e3e d\\n"\n-00168a90: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-00168ab0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00168ad0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP_I\n-00168b30: 4e56 414c 4944 5f53 4f43 4b45 543c 2f61 NVALID_SOCKET;
    .
    } \n-00168b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n-00168ba0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00168bd0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->se\n-00168c20: 6e64 6664 3c2f 613e 203d 203c 6120 636c ndfd = soap-><\n-00168c60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00168c70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00168c80: 6874 6d6c 2361 3139 3263 3235 6363 3230 html#a192c25cc20\n-00168c90: 3636 3638 3630 3032 3132 6664 3334 6636 6668600212fd34f6\n-00168ca0: 3534 3166 3334 223e 7265 6376 6664 3c2f 541f34\">recvfd = open(host, \n-00168cc0: 4f5f 5244 5752 7c4f 5f43 5245 4154 2c20 O_RDWR|O_CREAT, \n-00168cd0: 535f 4957 5553 527c 535f 4952 5553 5229 S_IWUSR|S_IRUSR)\n-00168ce0: 2920 266c 743b 2030 2920 3c2f 6469 763e ) < 0)
    \n-00168cf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return <\n-00168d30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00168d40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00168d50: 705f 5f73 6f61 702e 6874 6d6c 2367 6162 p__soap.html#gab\n-00168d60: 3965 3737 6231 3535 3737 3830 3239 3365 9e77b1557780293e\n-00168d70: 6563 3062 3236 3965 6631 3931 3437 3222 ec0b269ef191472\"\n-00168d80: 3e53 4f41 505f 494e 5641 4c49 445f 534f >SOAP_INVALID_SO\n-00168d90: 434b 4554 3c2f 613e 3b20 3c2f 6469 763e CKET;
    \n-00168da0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-00168dd0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soap->\n-00168e10: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;sendfd\n-00168e60: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    .}\n+00168980: 2020 3c73 7061 6e20 636c 6173 733d 226b if (strncmp(e\n+001689b0: 6e64 706f 696e 742c 203c 7370 616e 2063 ndpoint, "file:\n+001689e0: 2671 756f 743b 3c2f 7370 616e 3e2c 2035 ", 5\n+001689f0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {<\n+00168a10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    prin\n+00168a30: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n+00168a50: 7175 6f74 3b46 696c 6520 6e61 6d65 2065 quot;File name e\n+00168a60: 7870 6563 7465 645c 6e26 7175 6f74 3b3c xpected\\n"<\n+00168a70: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    .\n+00168a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00168ab0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return \n+00168b10: 534f 4150 5f49 4e56 414c 4944 5f53 4f43 SOAP_INVALID_SOC\n+00168b20: 4b45 543c 2f61 3e3b 203c 2f64 6976 3e0a KET;
    .\n+00168b30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n+00168b60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if ((so\n+00168bb0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->sendfd =\n+00168c10: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00168c40: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->re\n+00168c90: 6376 6664 3c2f 613e 203d 206f 7065 6e28 cvfd = open(\n+00168ca0: 686f 7374 2c20 4f5f 5244 5752 7c4f 5f43 host, O_RDWR|O_C\n+00168cb0: 5245 4154 2c20 535f 4957 5553 527c 535f REAT, S_IWUSR|S_\n+00168cc0: 4952 5553 5229 2920 266c 743b 2030 2920 IRUSR)) < 0) \n+00168cd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_INVA\n+00168d70: 4c49 445f 534f 434b 4554 3c2f 613e 3b20 LID_SOCKET; \n+00168d80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return soap->\n+00168e40: 7365 6e64 6664 3c2f 613e 3b20 3c2f 6469 sendfd; .
    }
    .\n 00168e80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    vo\n-00168ed0: 6964 3c2f 7370 616e 3e20 6d79 636c 6f73 id myclos\n-00168ee0: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa\n-00168f30: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-00168f60: 6170 3c2f 613e 2920 3c2f 6469 763e 0a3c ap)
    .<\n+00168e90: 7373 3d22 6c69 6e65 223e 3c73 7061 6e20 ss=\"line\">void \n+00168ec0: 6d79 636c 6f73 6528 3c73 7061 6e20 636c myclose(st\n+00168ee0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap) .
    {
    .<\n 00168f70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00168f80: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if\n-00168fc0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->s\n-00169040: 656e 6466 643c 2f61 3e20 2667 743b 2032 endfd > 2\n-00169050: 2920 203c 7370 616e 2063 6c61 7373 3d22 ) // stil\n-00169070: 6c20 6f70 656e 3f20 3c2f 7370 616e 3e3c l open? <\n-00169080: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    clos\n-001690a0: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap->s\n-00169120: 656e 6466 643c 2f61 3e29 3b20 3c73 7061 endfd); // then close \n-00169150: 6974 203c 2f73 7061 6e3e 3c2f 6469 763e it
    \n-00169160: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n-001691a0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->recvfd = 0\n-00169200: 3b20 2020 2020 203c 7370 616e 2063 6c61 ; // \n-00169220: 7365 7420 6261 636b 2074 6f20 7374 6469 set back to stdi\n-00169230: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n-00169240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n-00169280: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->sendfd = 1;\n-001692e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 // s\n-00169300: 6574 2062 6163 6b20 746f 2073 7464 6f75 et back to stdou\n-00169310: 7420 3c2f 7370 616e 3e3c 2f64 6976 3e0a t
    .\n-00169320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int mypo\n-00169390: 7374 283c 7370 616e 2063 6c61 7373 3d22 st(struct<\n-001693b0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-001693e0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-00169410: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n-00169430: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *endpoint, const \n-00169490: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *host, const \n-001694e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *path, const \n-00169530: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *action, <\n-00169560: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00169570: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00169580: 705f 5f73 6f61 702e 6874 6d6c 2367 6137 p__soap.html#ga7\n-00169590: 6336 6533 3864 3230 3966 3630 6131 3865 c6e38d209f60a18e\n-001695a0: 3336 3231 3732 6463 6131 6133 6236 6522 362172dca1a3b6e\"\n-001695b0: 3e55 4c4f 4e47 3634 3c2f 613e 2063 6f75 >ULONG64 cou\n-001695c0: 6e74 2920 3c2f 6469 763e 0a3c 6469 7620 nt)
    .
    {.
    return\n-00169620: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send(<\n-00169680: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00169690: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001696a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001696b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001696d0: 743b 4375 7374 6f6d 2d67 656e 6572 6174 t;Custom-generat\n-001696e0: 6564 2066 696c 655c 6e26 7175 6f74 3b3c ed file\\n"<\n-001696f0: 2f73 7061 6e3e 293b 203c 7370 616e 2063 /span>); /\n-00169710: 2f20 7772 6974 6573 2074 6f20 736f 6170 / writes to soap\n-00169720: 2d26 6774 3b73 656e 6466 6420 3c2f 7370 ->sendfd
    .
    } if<\n+00168fa0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n+00168fd0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->sendfd \n+00169030: 2667 743b 2032 2920 203c 7370 616e 2063 > 2) /\n+00169050: 2f20 7374 696c 6c20 6f70 656e 3f20 3c2f / still open?
    . \n+00169080: 2020 636c 6f73 6528 3c61 2063 6c61 7373 close(s\n+001690b0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->sendfd)\n+00169110: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // then \n+00169130: 636c 6f73 6520 6974 203c 2f73 7061 6e3e close it \n+00169140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap-><\n+00169190: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001691a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001691b0: 6874 6d6c 2361 3139 3263 3235 6363 3230 html#a192c25cc20\n+001691c0: 3636 3638 3630 3032 3132 6664 3334 6636 6668600212fd34f6\n+001691d0: 3534 3166 3334 223e 7265 6376 6664 3c2f 541f34\">recvfd = 0; // set back t\n+00169210: 6f20 7374 6469 6e20 3c2f 7370 616e 3e3c o stdin <\n+00169220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->sendfd = 1; // set back to\n+001692f0: 2073 7464 6f75 7420 3c2f 7370 616e 3e3c stdout <\n+00169300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00169320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int mypost(s\n+00169390: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+00169400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00169410: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+00169440: 3c2f 7370 616e 3e20 2a65 6e64 706f 696e *endpoin\n+00169450: 742c 203c 7370 616e 2063 6c61 7373 3d22 t, const \n+00169490: 6368 6172 3c2f 7370 616e 3e20 2a68 6f73 char *hos\n+001694a0: 742c 203c 7370 616e 2063 6c61 7373 3d22 t, const \n+001694e0: 6368 6172 3c2f 7370 616e 3e20 2a70 6174 char *pat\n+001694f0: 682c 203c 7370 616e 2063 6c61 7373 3d22 h, const \n+00169530: 6368 6172 3c2f 7370 616e 3e20 2a61 6374 char *act\n+00169540: 696f 6e2c 203c 6120 636c 6173 733d 2263 ion, ULONG64 count)
    \n+001695b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+001695e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001695f0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00169600: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_send\n+00169660: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+00169690: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "Custom-g\n+001696c0: 656e 6572 6174 6564 2066 696c 655c 6e26 enerated file\\n&\n+001696d0: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); <\n+001696e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001696f0: 656e 7422 3e2f 2f20 7772 6974 6573 2074 ent\">// writes t\n+00169700: 6f20 736f 6170 2d26 6774 3b73 656e 6466 o soap->sendf\n+00169710: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n+00169720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .<\n-00169770: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00169780: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int myparse(struct soap *soap)
    .
    {.
    char b\n-00169890: 7566 5b32 3536 5d3b 203c 2f64 6976 3e0a uf[256];
    .\n-001698a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-001698d0: 3c2f 7370 616e 3e20 286c 7365 656b 283c (lseek(<\n-001698e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001698f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00169900: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00169910: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;recv\n-00169960: 6664 3c2f 613e 2c20 302c 2053 4545 4b5f fd, 0, SEEK_\n-00169970: 5345 5429 2026 6c74 3b20 3020 7c7c 203c SET) < 0 || <\n-00169980: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00169990: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001699a0: 705f 5f69 6f2e 6874 6d6c 2367 6133 6635 p__io.html#ga3f5\n-001699b0: 3463 3539 3136 6336 6636 6464 6666 6563 4c5916c6f6ddffec\n-001699c0: 3564 3731 3230 6132 3330 6634 3622 3e73 5d7120a230f46\">s\n-001699d0: 6f61 705f 6765 746c 696e 653c 2f61 3e28 oap_getline(\n-001699e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00169a10: 2062 7566 2c20 3235 3629 2920 3c73 7061 buf, 256)) // go to begin\n-00169a40: 2061 6e64 2073 6b69 7020 6375 7374 6f6d and skip custom\n-00169a50: 2068 6561 6465 7220 3c2f 7370 616e 3e3c header <\n-00169a60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. \n-00169b20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00169b40: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-00169ba0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n-00169bb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n-00169be0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai\n-00169c20: 6e28 2920 3c2f 6469 763e 0a3c 6469 7620 n()
    .
    {.
    s\n-00169c70: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    s\n-00169d10: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n-00169d20: 5f74 6573 7420 723b 203c 2f64 6976 3e0a _test r;
    .\n-00169d30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n-00169d60: 203c 2f73 7061 6e3e 6e73 5f5f 7065 7273 ns__pers\n-00169d70: 6f6e 2070 3b20 3c2f 6469 763e 0a3c 6469 on p;
    . \n-00169d90: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init<\n-00169df0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-00169e20: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n-00169e30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    p.name = "\n-00169e70: 4a6f 686e 2044 6f65 2671 756f 743b 3c2f John Doe";
    .\n-00169ea0: 2020 702e 6167 6520 3d20 3939 3b20 3c2f p.age = 99; .
    \n-00169ef0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n-00169f50: 666f 7065 6e3c 2f61 3e20 3d20 6d79 6f70 fopen = myop\n-00169f60: 656e 3b20 2020 3c73 7061 6e20 636c 6173 en; // u\n-00169f80: 7365 2063 7573 746f 6d20 6f70 656e 203c se custom open <\n-00169f90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00169fb0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00169fe0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fpost = mypost; // use custo\n-0016a070: 6d20 706f 7374 203c 2f73 7061 6e3e 3c2f m post .
    \n-0016a0c0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n-0016a120: 6670 6172 7365 3c2f 613e 203d 206d 7970 fparse = myp\n-0016a130: 6172 7365 3b20 3c73 7061 6e20 636c 6173 arse; // u\n-0016a150: 7365 2063 7573 746f 6d20 7265 7370 6f6e se custom respon\n-0016a160: 7365 2070 6172 7365 7220 3c2f 7370 616e se parser
    .
    soap.fclose = \n-0016a220: 6d79 636c 6f73 653b 203c 7370 616e 2063 myclose; /\n-0016a240: 2f20 7573 6520 6375 7374 6f6d 2063 6c6f / use custom clo\n-0016a250: 7365 203c 2f73 7061 6e3e 3c2f 6469 763e se
    \n-0016a260: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_call_n\n-0016a280: 735f 5f74 6573 7428 2661 6d70 3b3c 6120 s__test(&soap, "\n-0016a2e0: 6669 6c65 3a2f 2f74 6573 742e 786d 6c26 file://test.xml&\n-0016a2f0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n-0016a320: 2671 756f 743b 3c2f 7370 616e 3e2c 2070 ", p\n-0016a330: 2c20 7229 3b20 3c2f 6469 763e 0a3c 6469 , r);
    . \n-0016a350: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n-0016a3a0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.e\n-0016a3f0: 7272 6f72 3c2f 613e 2920 3c2f 6469 763e rror)
    \n-0016a400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n-0016a430: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print\n-0016a490: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(&\n-0016a4a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0016a4d0: 2073 7464 6f75 7429 3b20 3c2f 6469 763e stdout);
    \n-0016a4e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT\n-0016a500: 5f46 4149 4c55 5245 293b 203c 2f64 6976 _FAILURE); .
    }
    .<\n-0016a530: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016a540: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des\n-0016a5a0: 7472 6f79 3c2f 613e 2826 616d 703b 3c61 troy(&soap);<\n-0016a5e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-0016a650: 6f61 705f 656e 643c 2f61 3e28 2661 6d70 oap_end(&\n-0016a660: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0016a690: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_done\n-0016a710: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-0016a740: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-0016a760: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    <\n-0016a7c0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0016a7d0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n-0016a820: 703a 3a66 706f 7374 3c2f 613e 3c2f 6469 p::fpost
    int(* fpos\n-0016a850: 7429 2873 7472 7563 7420 736f 6170 202a t)(struct soap *\n-0016a860: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-0016a870: 202a 656e 6470 6f69 6e74 2c20 636f 6e73 *endpoint, cons\n-0016a880: 7420 6368 6172 202a 686f 7374 2c20 696e t char *host, in\n-0016a890: 7420 706f 7274 2c20 636f 6e73 7420 6368 t port, const ch\n-0016a8a0: 6172 202a 7061 7468 2c20 636f 6e73 7420 ar *path, const \n-0016a8b0: 6368 6172 202a 6163 7469 6f6e 2c20 554c char *action, UL\n-0016a8c0: 4f4e 4736 3420 636f 756e 7429 3c2f 6469 ONG64 count)
    Callback th\n-0016a8f0: 6174 2070 6f70 756c 6174 6573 2061 6e64 at populates and\n-0016a900: 2074 6865 6e20 7365 6e64 7320 4854 5450 then sends HTTP\n-0016a910: 2068 6561 6465 7273 2066 726f 6d20 7468 headers from th\n-0016a920: 6520 636c 6965 6e74 2d73 6964 6520 746f e client-side to\n-0016a930: 2061 2063 6f6e 6e65 6374 6564 2048 5454 a connected HTT\n-0016a940: 5020 7365 7276 6572 2e3c 2f64 6976 3e3c P server.
    <\n-0016a950: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-0016a960: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-0016a970: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-0016a980: 3432 3230 3c2f 6469 763e 3c2f 6469 763e 4220
    \n-0016a990: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    \n-0016aa70: 696e 7428 2a20 6670 6172 7365 2928 7374 int(* fparse)(st\n-0016aa80: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n-0016aa90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac\n-0016aab0: 6b20 7468 6174 2072 6561 6473 2061 6e64 k that reads and\n-0016aac0: 2070 6172 7365 7320 4854 5450 2061 6e64 parses HTTP and\n-0016aad0: 204d 494d 4520 6865 6164 6572 732e 3c2f MIME headers.
    Defini\n-0016ab00: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-0016ab10: 7032 2e68 3a34 3235 303c 2f64 6976 3e3c p2.h:4250
    <\n-0016ab20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n-0016abd0: 705f 6765 746c 696e 653c 2f61 3e3c 2f64 p_getline
    int soap_\n-0016ac00: 6765 746c 696e 6528 7374 7275 6374 2073 getline(struct s\n-0016ac10: 6f61 7020 2a73 6f61 702c 2063 6861 7220 oap *soap, char \n-0016ac20: 2a62 7566 2c20 696e 7420 6c65 6e29 3c2f *buf, int len)
    Get a hea\n-0016ac50: 6465 7220 6c69 6e65 2e3c 2f64 6976 3e3c der line.
    <\n-0016ac60: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-0016ac80: 534f 4150 2031 2e31 2f31 2e32 2052 5043 SOAP 1.1/1.2 RPC\n-0016ac90: 2065 6e63 6f64 696e 6720 7370 6563 6966 encoding specif\n-0016aca0: 6965 7320 7468 6174 2053 4f41 502f 584d ies that SOAP/XM\n-0016acb0: 4c20 656c 656d 656e 7473 206d 6179 2062 L elements may b\n-0016acc0: 6520 6967 6e6f 7265 6420 7768 656e 2070 e ignored when p\n-0016acd0: 7265 7365 6e74 2069 6e20 6120 534f 4150 resent in a SOAP\n-0016ace0: 2070 6179 6c6f 6164 206f 6e20 7468 6520 payload on the \n-0016acf0: 7265 6365 6976 696e 6720 7369 6465 2e20 receiving side. \n-0016ad00: 486f 7765 7665 722c 2064 6f63 756d 656e However, documen\n-0016ad10: 742f 6c69 7465 7261 6c20 7374 796c 6520 t/literal style \n-0016ad20: 6d65 7373 6167 696e 6720 7661 6c69 6461 messaging valida\n-0016ad30: 7465 7320 584d 4c20 6d65 7373 6167 6573 tes XML messages\n-0016ad40: 2061 6e64 2065 7874 7261 2065 6c65 6d65 and extra eleme\n-0016ad50: 6e74 7320 6361 6e6e 6f74 206a 7573 7420 nts cannot just \n-0016ad60: 6265 2069 676e 6f72 6564 2061 7320 7375 be ignored as su\n-0016ad70: 6368 2e20 5769 7468 2053 4f41 5020 646f ch. With SOAP do\n-0016ad80: 6375 6d65 6e74 2f6c 6974 6572 616c 2073 cument/literal s\n-0016ad90: 7479 6c65 2069 7420 6973 2072 6563 6f6d tyle it is recom\n-0016ada0: 6d65 6e64 6564 2074 6f20 656e 6162 6c65 mended to enable\n-0016adb0: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n-0016adc0: 5f58 4d4c 5f53 5452 4943 543c 2f63 6f64 _XML_STRICT mode flag. Wi\n-0016ade0: 7468 2053 4f41 5020 5250 4320 656e 636f th SOAP RPC enco\n-0016adf0: 6469 6e67 2c20 7468 6520 656e 6769 6e65 ding, the engine\n-0016ae00: 2069 676e 6f72 6573 2058 4d4c 2065 6c65 ignores XML ele\n-0016ae10: 6d65 6e74 7320 7468 6174 2061 7265 2075 ments that are u\n-0016ae20: 6e6b 6e6f 776e 2062 7920 6465 6661 756c nknown by defaul\n-0016ae30: 742c 2075 6e6c 6573 7320 7468 6520 584d t, unless the XM\n-0016ae40: 4c20 6174 7472 6962 7574 6520 3c65 6d3e L attribute \n-0016ae50: 3c63 6f64 653e 6d75 7374 556e 6465 7273 mustUnders\n-0016ae60: 7461 6e64 3d22 7472 7565 223c 2f63 6f64 tand=\"true\" is prese\n-0016ae80: 6e74 2069 6e20 7468 6520 584d 4c20 656c nt in the XML el\n-0016ae90: 656d 656e 742e 2049 7420 6d61 7920 6265 ement. It may be\n-0016aea0: 2075 6e64 6573 6972 6162 6c65 2066 6f72 undesirable for\n-0016aeb0: 2065 6c65 6d65 6e74 7320 746f 2062 6520 elements to be \n-0016aec0: 6967 6e6f 7265 6420 7768 656e 2074 6865 ignored when the\n-0016aed0: 206f 7574 636f 6d65 206f 6620 7468 6520 outcome of the \n-0016aee0: 6f6d 6973 7369 6f6e 2069 7320 756e 6365 omission is unce\n-0016aef0: 7274 6169 6e2e 2054 6865 203c 636f 6465 rtain. The soap::fig\n-0016afd0: 6e6f 7265 3c2f 613e 3c2f 636f 6465 3e20 nore \n-0016afe0: 6361 6c6c 6261 636b 2063 616e 2062 6520 callback can be \n-0016aff0: 7365 7420 746f 2061 2066 756e 6374 696f set to a functio\n-0016b000: 6e20 7468 6174 2072 6574 7572 6e73 203c n that returns <\n-0016b010: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK in case the\n-0016b030: 2065 6c65 6d65 6e74 2063 616e 2062 6520 element can be \n-0016b040: 7361 6665 6c79 2069 676e 6f72 6564 2c20 safely ignored, \n-0016b050: 6f72 203c 636f 6465 3e23 534f 4150 5f4d or #SOAP_M\n-0016b060: 5553 5455 4e44 4552 5354 414e 443c 2f63 USTUNDERSTAND to throw an\n-0016b080: 2065 7863 6570 7469 6f6e 2c20 6f72 2074 exception, or t\n-0016b090: 6f20 7065 7266 6f72 6d20 736f 6d65 2061 o perform some a\n-0016b0a0: 7070 6c69 6361 7469 6f6e 2d73 7065 6369 pplication-speci\n-0016b0b0: 6669 6320 6163 7469 6f6e 2e20 466f 7220 fic action. For \n-0016b0c0: 6578 616d 706c 652c 2074 6f20 7468 726f example, to thro\n-0016b0d0: 7720 616e 2065 7863 6570 7469 6f6e 2061 w an exception a\n-0016b0e0: 7320 736f 6f6e 2061 7320 616e 2075 6e6b s soon as an unk\n-0016b0f0: 6e6f 776e 2065 6c65 6d65 6e74 2069 7320 nown element is \n-0016b100: 656e 636f 756e 7465 7265 6420 6f6e 2074 encountered on t\n-0016b110: 6865 2069 6e70 7574 2c20 7573 653a 3c2f he input, use:.

    int \n-0016b170: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{\n-0016b190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-0016b1d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016b1e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016b1f0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-0016b200: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0016b230: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-0016b290: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . \n-0016b2b0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-0016b2e0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fign\n-0016b340: 6f72 653c 2f61 3e20 3d20 6d79 6967 6e6f ore = myigno\n-0016b350: 7265 3b20 3c2f 6469 763e 0a3c 6469 7620 re;
    .
    .\n-0016b370: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // soap\n-0016b390: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n-0016b3a0: 686f 6428 736f 6170 2c20 2e2e 2e29 206f hod(soap, ...) o\n-0016b3b0: 7220 736f 6170 5f73 6572 7665 2873 6f61 r soap_serve(soa\n-0016b3c0: 7029 203c 2f73 7061 6e3e 3c2f 6469 763e p)
    \n+00169760: 226c 696e 6522 3e3c 7370 616e 2063 6c61 \"line\">int mypa\n+00169790: 7273 6528 3c73 7061 6e20 636c 6173 733d rse(struct\n+001697b0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001697e0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00169810: 736f 6170 3c2f 613e 2920 3c2f 6469 763e soap)
    \n+00169820: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+00169850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00169860: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char buf[256]; <\n+00169880: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (l\n+001698c0: 7365 656b 283c 6120 636c 6173 733d 2263 seek(soap\n+001698f0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->recvfd, 0,\n+00169950: 2053 4545 4b5f 5345 5429 2026 6c74 3b20 SEEK_SET) < \n+00169960: 3020 7c7c 203c 6120 636c 6173 733d 2263 0 || soap_getlin\n+001699c0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n+001699f0: 703c 2f61 3e2c 2062 7566 2c20 3235 3629 p, buf, 256)\n+00169a00: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // go to\n+00169a20: 2062 6567 696e 2061 6e64 2073 6b69 7020 begin and skip \n+00169a30: 6375 7374 6f6d 2068 6561 6465 7220 3c2f custom header
    . \n+00169a60: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00169a80: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n+00169ae0: 4150 5f45 4f46 3c2f 613e 3b20 3c2f 6469 AP_EOF; .
    return <\n+00169b30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169b40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00169b50: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+00169b60: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n+00169b70: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n+00169b80: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0\">SOAP_OK; \n+00169b90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    .int main()
    \n+00169c10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+00169c40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00169c50: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
    .
    <\n+00169ce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00169cf0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__test r; <\n+00169d10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00169d40: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n+00169d50: 5f5f 7065 7273 6f6e 2070 3b20 3c2f 6469 __person p; .
    soap\n+00169dd0: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n+00169de0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169df0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00169e00: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+00169e10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    p.nam\n+00169e30: 6520 3d20 3c73 7061 6e20 636c 6173 733d e = \n+00169e50: 2671 756f 743b 4a6f 686e 2044 6f65 2671 "John Doe&q\n+00169e60: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    p.age = \n+00169e90: 3939 3b20 3c2f 6469 763e 0a3c 6469 7620 99;
    .
    <\n+00169eb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169ec0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00169ed0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+00169ee0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169ef0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00169f00: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+00169f10: 6c23 6761 3962 3439 3835 6562 3561 3538 l#ga9b4985eb5a58\n+00169f20: 3866 3463 3136 6164 3838 6566 3763 6133 8f4c16ad88ef7ca3\n+00169f30: 3239 6463 223e 666f 7065 6e3c 2f61 3e20 29dc\">fopen \n+00169f40: 3d20 6d79 6f70 656e 3b20 2020 3c73 7061 = myopen; // use custom \n+00169f70: 6f70 656e 203c 2f73 7061 6e3e 3c2f 6469 open .
    so\n+00169fc0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fp\n+0016a020: 6f73 743c 2f61 3e20 3d20 6d79 706f 7374 ost = mypost\n+0016a030: 3b20 2020 3c73 7061 6e20 636c 6173 733d ; // use\n+0016a050: 2063 7573 746f 6d20 706f 7374 203c 2f73 custom post
    .
    <\n+0016a080: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016a090: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016a0a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0016a0b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016a0c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016a0d0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+0016a0e0: 6c23 6761 3963 6230 3563 6539 3866 3834 l#ga9cb05ce98f84\n+0016a0f0: 3566 3136 6339 3230 6334 3434 3236 6163 5f16c920c44426ac\n+0016a100: 3335 6135 223e 6670 6172 7365 3c2f 613e 35a5\">fparse\n+0016a110: 203d 206d 7970 6172 7365 3b20 3c73 7061 = myparse; // use custom \n+0016a140: 7265 7370 6f6e 7365 2070 6172 7365 7220 response parser \n+0016a150: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0016a170: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.fclose<\n+0016a200: 2f61 3e20 3d20 6d79 636c 6f73 653b 203c /a> = myclose; <\n+0016a210: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0016a220: 656e 7422 3e2f 2f20 7573 6520 6375 7374 ent\">// use cust\n+0016a230: 6f6d 2063 6c6f 7365 203c 2f73 7061 6e3e om close \n+0016a240: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_\n+0016a260: 6361 6c6c 5f6e 735f 5f74 6573 7428 2661 call_ns__test(&a\n+0016a270: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, \n+0016a2c0: 2671 756f 743b 6669 6c65 3a2f 2f74 6573 "file://tes\n+0016a2d0: 742e 786d 6c26 7175 6f74 3b3c 2f73 7061 t.xml", \n+0016a300: 2671 756f 743b 2671 756f 743b 3c2f 7370 "", p, r); .
    if (soap.error) \n+0016a3e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap\n+0016a470: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+0016a480: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0016a4b0: 703c 2f61 3e2c 2073 7464 6f75 7429 3b20 p, stdout); \n+0016a4c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi\n+0016a4e0: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n+0016a4f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..\n+0016a680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_do\n+0016a6f0: 6e65 3c2f 613e 2826 616d 703b 3c61 2063 ne(&soap);.
    }
    ..
    soap\n+0016aa30: 3a3a 6670 6172 7365 3c2f 613e 3c2f 6469 ::fparse
    int(* fpar\n+0016aa60: 7365 2928 7374 7275 6374 2073 6f61 7020 se)(struct soap \n+0016aa70: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    C\n+0016aa90: 616c 6c62 6163 6b20 7468 6174 2072 6561 allback that rea\n+0016aaa0: 6473 2061 6e64 2070 6172 7365 7320 4854 ds and parses HT\n+0016aab0: 5450 2061 6e64 204d 494d 4520 6865 6164 TP and MIME head\n+0016aac0: 6572 732e 3c2f 6469 763e 3c64 6976 2063 ers.
    \n+0016aae0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0016aaf0: 7374 6473 6f61 7032 2e68 3a34 3235 303c stdsoap2.h:4250<\n+0016ab00: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+0016ab70: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_getline<\n+0016abc0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    .

    SOAP 1.1/1\n+0016ac70: 2e32 2052 5043 2065 6e63 6f64 696e 6720 .2 RPC encoding \n+0016ac80: 7370 6563 6966 6965 7320 7468 6174 2053 specifies that S\n+0016ac90: 4f41 502f 584d 4c20 656c 656d 656e 7473 OAP/XML elements\n+0016aca0: 206d 6179 2062 6520 6967 6e6f 7265 6420 may be ignored \n+0016acb0: 7768 656e 2070 7265 7365 6e74 2069 6e20 when present in \n+0016acc0: 6120 534f 4150 2070 6179 6c6f 6164 206f a SOAP payload o\n+0016acd0: 6e20 7468 6520 7265 6365 6976 696e 6720 n the receiving \n+0016ace0: 7369 6465 2e20 486f 7765 7665 722c 2064 side. However, d\n+0016acf0: 6f63 756d 656e 742f 6c69 7465 7261 6c20 ocument/literal \n+0016ad00: 7374 796c 6520 6d65 7373 6167 696e 6720 style messaging \n+0016ad10: 7661 6c69 6461 7465 7320 584d 4c20 6d65 validates XML me\n+0016ad20: 7373 6167 6573 2061 6e64 2065 7874 7261 ssages and extra\n+0016ad30: 2065 6c65 6d65 6e74 7320 6361 6e6e 6f74 elements cannot\n+0016ad40: 206a 7573 7420 6265 2069 676e 6f72 6564 just be ignored\n+0016ad50: 2061 7320 7375 6368 2e20 5769 7468 2053 as such. With S\n+0016ad60: 4f41 5020 646f 6375 6d65 6e74 2f6c 6974 OAP document/lit\n+0016ad70: 6572 616c 2073 7479 6c65 2069 7420 6973 eral style it is\n+0016ad80: 2072 6563 6f6d 6d65 6e64 6564 2074 6f20 recommended to \n+0016ad90: 656e 6162 6c65 2074 6865 203c 636f 6465 enable the #SOAP_XML_STRIC\n+0016adb0: 543c 2f63 6f64 653e 206d 6f64 6520 666c T mode fl\n+0016adc0: 6167 2e20 5769 7468 2053 4f41 5020 5250 ag. With SOAP RP\n+0016add0: 4320 656e 636f 6469 6e67 2c20 7468 6520 C encoding, the \n+0016ade0: 656e 6769 6e65 2069 676e 6f72 6573 2058 engine ignores X\n+0016adf0: 4d4c 2065 6c65 6d65 6e74 7320 7468 6174 ML elements that\n+0016ae00: 2061 7265 2075 6e6b 6e6f 776e 2062 7920 are unknown by \n+0016ae10: 6465 6661 756c 742c 2075 6e6c 6573 7320 default, unless \n+0016ae20: 7468 6520 584d 4c20 6174 7472 6962 7574 the XML attribut\n+0016ae30: 6520 3c65 6d3e 3c63 6f64 653e 6d75 7374 e must\n+0016ae40: 556e 6465 7273 7461 6e64 3d22 7472 7565 Understand=\"true\n+0016ae50: 223c 2f63 6f64 653e 3c2f 656d 3e20 6973 \" is\n+0016ae60: 2070 7265 7365 6e74 2069 6e20 7468 6520 present in the \n+0016ae70: 584d 4c20 656c 656d 656e 742e 2049 7420 XML element. It \n+0016ae80: 6d61 7920 6265 2075 6e64 6573 6972 6162 may be undesirab\n+0016ae90: 6c65 2066 6f72 2065 6c65 6d65 6e74 7320 le for elements \n+0016aea0: 746f 2062 6520 6967 6e6f 7265 6420 7768 to be ignored wh\n+0016aeb0: 656e 2074 6865 206f 7574 636f 6d65 206f en the outcome o\n+0016aec0: 6620 7468 6520 6f6d 6973 7369 6f6e 2069 f the omission i\n+0016aed0: 7320 756e 6365 7274 6169 6e2e 2054 6865 s uncertain. The\n+0016aee0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n+0016afb0: 703a 3a66 6967 6e6f 7265 3c2f 613e 3c2f p::fignore callback c\n+0016afd0: 616e 2062 6520 7365 7420 746f 2061 2066 an be set to a f\n+0016afe0: 756e 6374 696f 6e20 7468 6174 2072 6574 unction that ret\n+0016aff0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n+0016b000: 5f4f 4b3c 2f63 6f64 653e 2069 6e20 6361 _OK in ca\n+0016b010: 7365 2074 6865 2065 6c65 6d65 6e74 2063 se the element c\n+0016b020: 616e 2062 6520 7361 6665 6c79 2069 676e an be safely ign\n+0016b030: 6f72 6564 2c20 6f72 203c 636f 6465 3e23 ored, or #\n+0016b040: 534f 4150 5f4d 5553 5455 4e44 4552 5354 SOAP_MUSTUNDERST\n+0016b050: 414e 443c 2f63 6f64 653e 2074 6f20 7468 AND to th\n+0016b060: 726f 7720 616e 2065 7863 6570 7469 6f6e row an exception\n+0016b070: 2c20 6f72 2074 6f20 7065 7266 6f72 6d20 , or to perform \n+0016b080: 736f 6d65 2061 7070 6c69 6361 7469 6f6e some application\n+0016b090: 2d73 7065 6369 6669 6320 6163 7469 6f6e -specific action\n+0016b0a0: 2e20 466f 7220 6578 616d 706c 652c 2074 . For example, t\n+0016b0b0: 6f20 7468 726f 7720 616e 2065 7863 6570 o throw an excep\n+0016b0c0: 7469 6f6e 2061 7320 736f 6f6e 2061 7320 tion as soon as \n+0016b0d0: 616e 2075 6e6b 6e6f 776e 2065 6c65 6d65 an unknown eleme\n+0016b0e0: 6e74 2069 7320 656e 636f 756e 7465 7265 nt is encountere\n+0016b0f0: 6420 6f6e 2074 6865 2069 6e70 7574 2c20 d on the input, \n+0016b100: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n+0016b120: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016b130: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main().
    {
    . \n+0016b190: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap\n+0016b1e0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+0016b210: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+0016b270: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    so\n+0016b2c0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fignore = \n+0016b330: 6d79 6967 6e6f 7265 3b20 3c2f 6469 763e myignore;
    \n+0016b340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n+0016b370: 2f20 736f 6170 5f63 616c 6c5f 6e73 5f5f / soap_call_ns__\n+0016b380: 7765 626d 6574 686f 6428 736f 6170 2c20 webmethod(soap, \n+0016b390: 2e2e 2e29 206f 7220 736f 6170 5f73 6572 ...) or soap_ser\n+0016b3a0: 7665 2873 6f61 7029 203c 2f73 7061 6e3e ve(soap) \n+0016b3b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n 0016b3d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    .
    int myig\n-0016b440: 6e6f 7265 283c 7370 616e 2063 6c61 7373 nore(struc\n-0016b460: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-0016b490: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *tag)
    \n+0016b3e0: 6522 3e20 3c2f 6469 763e 0a3c 6469 7620 e\">
    .
    int myignore(struct <\n+0016b450: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016b460: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016b470: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+0016b480: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0016b4b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n+0016b4f0: 6172 3c2f 7370 616e 3e20 2a74 6167 2920 ar *tag) \n+0016b500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n 0016b520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-0016b550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016b560: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-0016b570: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n-0016b5d0: 4d55 5354 554e 4445 5253 5441 4e44 3c2f MUSTUNDERSTAND; // nev\n-0016b600: 6572 2073 6b69 7020 656c 656d 656e 7473 er skip elements\n-0016b610: 2028 7365 6375 7265 2920 3c2f 7370 616e (secure)
    .
    } .
    <\n-0016b710: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0016b720: 6922 3e69 6e74 282a 2066 6967 6e6f 7265 i\">int(* fignore\n-0016b730: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-0016b740: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n-0016b750: 2a74 6167 293c 2f64 6976 3e3c 6469 7620 *tag)
    Ca\n-0016b770: 6c6c 6261 636b 2074 6f20 6361 7463 6820 llback to catch \n-0016b780: 756e 7265 636f 676e 697a 6564 2058 4d4c unrecognized XML\n-0016b790: 2065 6c65 6d65 6e74 7320 616e 6420 6f76 elements and ov\n-0016b7a0: 6572 7269 6465 7320 2353 4f41 505f 584d errides #SOAP_XM\n-0016b7b0: 4c5f 5354 5249 4354 2076 616c 6964 6174 L_STRICT validat\n-0016b7c0: 696f 6e20 6572 726f 7273 2066 6f72 2074 ion errors for t\n-0016b7d0: 6865 732e 2e2e 3c2f 6469 763e 3c64 6976 hes...
    <\n-0016b7f0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:444\n-0016b810: 333c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 3
    .
    #d\n-0016b900: 6566 696e 6520 534f 4150 5f4d 5553 5455 efine SOAP_MUSTU\n-0016b910: 4e44 4552 5354 414e 443c 2f64 6976 3e3c NDERSTAND
    <\n-0016b920: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0016b930: 223e 4120 736f 6170 5f73 7461 7475 7320 \">A soap_status \n-0016b940: 6572 726f 7220 636f 6465 3a20 616e 2058 error code: an X\n-0016b950: 4d4c 2065 6c65 6d65 6e74 2069 7320 7072 ML element is pr\n-0016b960: 6573 656e 7420 7769 7468 2061 206d 7573 esent with a mus\n-0016b970: 7455 6e64 6572 7374 616e 6420 6174 7472 tUnderstand attr\n-0016b980: 6962 7574 6520 7768 6963 6820 6d75 7374 ibute which must\n-0016b990: 2062 6520 756e 642e 2e2e 3c2f 6469 763e be und...
    \n-0016b9a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-0016b9c0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-0016b9d0: 3a32 3439 303c 2f64 6976 3e3c 2f64 6976 :2490
    .

    To s\n-0016ba00: 656c 6563 7469 7665 6c79 2074 6872 6f77 electively throw\n-0016ba10: 2061 6e20 6578 6365 7074 696f 6e20 7768 an exception wh\n-0016ba20: 656e 203c 656d 3e3c 636f 6465 3e6d 7573 en mus\n-0016ba30: 7455 6e64 6572 7374 616e 643d 2274 7275 tUnderstand=\"tru\n-0016ba40: 6522 3c2f 636f 6465 3e3c 2f65 6d3e 2053 e\" S\n-0016ba50: 4f41 5020 4865 6164 6572 2065 6c65 6d65 OAP Header eleme\n-0016ba60: 6e74 2069 7320 656e 636f 756e 7465 7265 nt is encountere\n-0016ba70: 6420 6f72 2077 6865 6e20 616e 2075 6e6b d or when an unk\n-0016ba80: 6e6f 776e 2065 6c65 6d65 6e74 2069 7320 nown element is \n-0016ba90: 656e 636f 756e 7465 7265 6420 6578 6365 encountered exce\n-0016baa0: 7074 2066 6f72 2065 6c65 6d65 6e74 203c pt for element <\n-0016bab0: 656d 3e3c 636f 6465 3e6e 733a 7879 7a3c em>ns:xyz<\n-0016bac0: 2f63 6f64 653e 3c2f 656d 3e2c 2075 7365 /code>, use\n-0016bad0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int main()
    .\n+0016b530: 6522 3e20 203c 7370 616e 2063 6c61 7373 e\"> r\n+0016b550: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_MUSTUNDERS\n+0016b5c0: 5441 4e44 3c2f 613e 3b20 3c73 7061 6e20 TAND; \n+0016b5e0: 2f2f 206e 6576 6572 2073 6b69 7020 656c // never skip el\n+0016b5f0: 656d 656e 7473 2028 7365 6375 7265 2920 ements (secure) \n+0016b600: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0016b620: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    \n+0016b680: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    so\n+0016b6e0: 6170 3a3a 6669 676e 6f72 653c 2f61 3e3c ap::fignore<\n+0016b6f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int(* f\n+0016b710: 6967 6e6f 7265 2928 7374 7275 6374 2073 ignore)(struct s\n+0016b720: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+0016b730: 2063 6861 7220 2a74 6167 293c 2f64 6976 char *tag)
    Callback to \n+0016b760: 6361 7463 6820 756e 7265 636f 676e 697a catch unrecogniz\n+0016b770: 6564 2058 4d4c 2065 6c65 6d65 6e74 7320 ed XML elements \n+0016b780: 616e 6420 6f76 6572 7269 6465 7320 2353 and overrides #S\n+0016b790: 4f41 505f 584d 4c5f 5354 5249 4354 2076 OAP_XML_STRICT v\n+0016b7a0: 616c 6964 6174 696f 6e20 6572 726f 7273 alidation errors\n+0016b7b0: 2066 6f72 2074 6865 732e 2e2e 3c2f 6469 for thes...
    Definiti\n+0016b7e0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0016b7f0: 2e68 3a34 3434 333c 2f64 6976 3e3c 2f64 .h:4443
    .
    \n+0016b8d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n+0016b8f0: 5f4d 5553 5455 4e44 4552 5354 414e 443c _MUSTUNDERSTAND<\n+0016b900: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    A soap_s\n+0016b920: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code\n+0016b930: 3a20 616e 2058 4d4c 2065 6c65 6d65 6e74 : an XML element\n+0016b940: 2069 7320 7072 6573 656e 7420 7769 7468 is present with\n+0016b950: 2061 206d 7573 7455 6e64 6572 7374 616e a mustUnderstan\n+0016b960: 6420 6174 7472 6962 7574 6520 7768 6963 d attribute whic\n+0016b970: 6820 6d75 7374 2062 6520 756e 642e 2e2e h must be und...\n+0016b980: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+0016b9a0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+0016b9b0: 6f61 7032 2e68 3a32 3439 303c 2f64 6976 oap2.h:2490
    .
    <\n+0016b9e0: 703e 546f 2073 656c 6563 7469 7665 6c79 p>To selectively\n+0016b9f0: 2074 6872 6f77 2061 6e20 6578 6365 7074 throw an except\n+0016ba00: 696f 6e20 7768 656e 203c 656d 3e3c 636f ion when mustUnderstan\n+0016ba20: 643d 2274 7275 6522 3c2f 636f 6465 3e3c d=\"true\"
    <\n+0016ba30: 2f65 6d3e 2053 4f41 5020 4865 6164 6572 /em> SOAP Header\n+0016ba40: 2065 6c65 6d65 6e74 2069 7320 656e 636f element is enco\n+0016ba50: 756e 7465 7265 6420 6f72 2077 6865 6e20 untered or when \n+0016ba60: 616e 2075 6e6b 6e6f 776e 2065 6c65 6d65 an unknown eleme\n+0016ba70: 6e74 2069 7320 656e 636f 756e 7465 7265 nt is encountere\n+0016ba80: 6420 6578 6365 7074 2066 6f72 2065 6c65 d except for ele\n+0016ba90: 6d65 6e74 203c 656d 3e3c 636f 6465 3e6e ment n\n+0016baa0: 733a 7879 7a3c 2f63 6f64 653e 3c2f 656d s:xyz, use:

    .
    in\n+0016bb00: 743c 2f73 7061 6e3e 206d 6169 6e28 293c t main()<\n+0016bb10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n 0016bb30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    ..\n-0016bc50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n-0016bd20: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // soa\n-0016bd40: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n-0016bd50: 7468 6f64 2873 6f61 702c 202e 2e2e 2920 thod(soap, ...) \n-0016bd60: 6f72 2073 6f61 705f 7365 7276 6528 736f or soap_serve(so\n-0016bd70: 6170 2920 3c2f 7370 616e 3e3c 2f64 6976 ap) struct\n+0016bb60: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+0016bb90: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+0016bbc0: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n+0016bc20: 736f 6170 5f6e 6577 3c2f 613e 2829 3b3c soap_new();<\n+0016bc30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->fignore\n+0016bce0: 203d 2069 676e 6f72 653b 203c 2f64 6976 = ignore; .
    ... \n+0016bd20: 2f2f 2073 6f61 705f 6361 6c6c 5f6e 735f // soap_call_ns_\n+0016bd30: 5f77 6562 6d65 7468 6f64 2873 6f61 702c _webmethod(soap,\n+0016bd40: 202e 2e2e 2920 6f72 2073 6f61 705f 7365 ...) or soap_se\n+0016bd50: 7276 6528 736f 6170 2920 3c2f 7370 616e rve(soap)
    .
    }.
    }
    . <\n-0016bdb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ign\n-0016bdf0: 6f72 6528 3c73 7061 6e20 636c 6173 733d ore(struct\n-0016be10: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-0016be40: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-0016be70: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n-0016be90: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *tag)
    .\n+0016bd90: 6e65 223e 203c 2f64 6976 3e0a 3c64 6976 ne\">
    .int ignore(\n+0016bdf0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+0016be30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016be40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016be50: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0016be60: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+0016bea0: 723c 2f73 7061 6e3e 202a 7461 6729 203c r *tag) <\n+0016beb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n 0016bed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    // do not ig\n-0016bf20: 6e6f 7265 206d 7573 7455 6e64 6572 7374 nore mustUnderst\n-0016bf30: 616e 643d 2671 756f 743b 7472 7565 2671 and="true&q\n-0016bf40: 756f 743b 203c 2f73 7061 6e3e 3c2f 6469 uot; .
    if (!soap->\n-0016bfc0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;mustUn\n-0016c010: 6465 7273 7461 6e64 3c2f 613e 293c 2f64 derstand).
    {
    .\n-0016c040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // t\n-0016c070: 6167 7320 266c 743b 6e73 3a73 6f6d 6545 ags <ns:someE\n-0016c080: 6c65 6d65 6e74 2667 743b 2063 616e 2062 lement> can b\n-0016c090: 6520 7361 6665 6c79 2069 676e 6f72 6564 e safely ignored\n-0016c0a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0016c0c0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-0016c0e0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_\n-0016c140: 6d61 7463 685f 7461 673c 2f61 3e28 3c61 match_tag(soap, t\n-0016c180: 6167 2c20 3c73 7061 6e20 636c 6173 733d ag, \n-0016c1a0: 2671 756f 743b 6e73 3a73 6f6d 6545 6c65 "ns:someEle\n-0016c1b0: 6d65 6e74 2671 756f 743b 3c2f 7370 616e ment") == SOAP_O\n-0016c220: 4b3c 2f61 3e29 3c2f 6469 763e 0a3c 6469 K)
    . \n-0016c240: 2020 2020 203c 7370 616e 2063 6c61 7373 r\n-0016c260: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK;.
    }
    .\n-0016c2f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+0016bee0: 223e 2020 3c73 7061 6e20 636c 6173 733d \"> // do \n+0016bf00: 6e6f 7420 6967 6e6f 7265 206d 7573 7455 not ignore mustU\n+0016bf10: 6e64 6572 7374 616e 643d 2671 756f 743b nderstand="\n+0016bf20: 7472 7565 2671 756f 743b 203c 2f73 7061 true"
    .
    if\n+0016bf70: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap->\n+0016bff0: 6d75 7374 556e 6465 7273 7461 6e64 3c2f mustUnderstand)
    .
    {<\n+0016c020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // tags <ns\n+0016c060: 3a73 6f6d 6545 6c65 6d65 6e74 2667 743b :someElement>\n+0016c070: 2063 616e 2062 6520 7361 6665 6c79 2069 can be safely i\n+0016c080: 676e 6f72 6564 3c2f 7370 616e 3e3c 2f64 gnored.
    if (<\n+0016c0d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016c0e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016c0f0: 705f 5f6d 6973 632e 6874 6d6c 2367 6139 p__misc.html#ga9\n+0016c100: 3161 3335 6432 6636 3765 6565 6138 6463 1a35d2f67eeea8dc\n+0016c110: 3331 6664 3233 6133 6365 6136 3564 3422 31fd23a3cea65d4\"\n+0016c120: 3e73 6f61 705f 6d61 7463 685f 7461 673c >soap_match_tag<\n+0016c130: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+0016c160: 2f61 3e2c 2074 6167 2c20 3c73 7061 6e20 /a>, tag, "ns:s\n+0016c190: 6f6d 6545 6c65 6d65 6e74 2671 756f 743b omeElement"\n+0016c1a0: 3c2f 7370 616e 3e29 203d 3d20 3c61 2063 ) == \n+0016c200: 534f 4150 5f4f 4b3c 2f61 3e29 3c2f 6469 SOAP_OK).
    return SOAP_OK;
    .
    }<\n+0016c2d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_MUSTU\n+0016c370: 4e44 4552 5354 414e 443c 2f61 3e3b 203c NDERSTAND; <\n+0016c380: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n 0016c3a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    stru\n-0016c400: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct Namespace\n-0016c440: 3c2f 613e 203c 6120 636c 6173 733d 2263 name\n-0016c4a0: 7370 6163 6573 3c2f 613e 5b5d 203d 203c spaces[] = <\n+0016c3b0: 223e 203c 2f64 6976 3e0a 3c64 6976 2063 \">
    .
    struct \n+0016c3f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 Nam\n+0016c420: 6573 7061 6365 3c2f 613e 203c 6120 636c espace namespaces\n+0016c490: 5b5d 203d 203c 2f64 6976 3e0a 3c64 6976 [] =
    .{<\n 0016c4b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-0016c4d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "SOAP-ENV\n-0016c510: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-0016c520: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0016c530: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0016c540: 3b68 7474 703a 2f2f 7363 6865 6d61 732e ;http://schemas.\n-0016c550: 786d 6c73 6f61 702e 6f72 672f 736f 6170 xmlsoap.org/soap\n-0016c560: 2f65 6e76 656c 6f70 652f 2671 756f 743b /envelope/"\n-0016c570: 3c2f 7370 616e 3e20 7d2c 203c 2f64 6976 }, .
    { "SOAP-E\n-0016c5c0: 4e43 2671 756f 743b 3c2f 7370 616e 3e2c NC",\n-0016c5d0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016c5f0: 6f74 3b68 7474 703a 2f2f 7363 6865 6d61 ot;http://schema\n-0016c600: 732e 786d 6c73 6f61 702e 6f72 672f 736f s.xmlsoap.org/so\n-0016c610: 6170 2f65 6e63 6f64 696e 672f 2671 756f ap/encoding/&quo\n-0016c620: 743b 3c2f 7370 616e 3e20 7d2c 203c 2f64 t; }, .
    { "xsi&\n-0016c670: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-0016c680: 2020 203c 7370 616e 2063 6c61 7373 3d22 &\n-0016c6a0: 7175 6f74 3b68 7474 703a 2f2f 7777 772e quot;http://www.\n-0016c6b0: 7733 2e6f 7267 2f32 3030 312f 584d 4c53 w3.org/2001/XMLS\n-0016c6c0: 6368 656d 612d 696e 7374 616e 6365 2671 chema-instance&q\n-0016c6d0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n-0016c6e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "xs\n-0016c720: 6426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 d", \n-0016c730: 2020 2020 203c 7370 616e 2063 6c61 7373 "http://ww\n-0016c760: 772e 7733 2e6f 7267 2f32 3030 312f 584d w.w3.org/2001/XM\n-0016c770: 4c53 6368 656d 6126 7175 6f74 3b3c 2f73 LSchema" },
    .<\n-0016c790: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016c7a0: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "ns"<\n-0016c7d0: 2f73 7061 6e3e 2c20 2020 2020 2020 3c73 /span>, "\n-0016c800: 736f 6d65 2d55 5249 2671 756f 743b 3c2f some-URI"}, //\n-0016c830: 2062 696e 6473 2026 7175 6f74 3b6e 7326 binds "ns&\n-0016c840: 7175 6f74 3b20 6e61 6d65 7370 6163 6520 quot; namespace \n-0016c850: 7072 6566 6978 2074 6f20 7363 6865 6d61 prefix to schema\n-0016c860: 2055 5249 3c2f 7370 616e 3e3c 2f64 6976 URI.
    { NULL, NU\n-0016c890: 4c4c 7d20 3c2f 6469 763e 0a3c 6469 7620 LL}
    .
    ];<\n-0016c8b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-0016c900: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0016c910: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-0016c950: 6f61 703a 3a6d 7573 7455 6e64 6572 7374 oap::mustUnderst\n-0016c960: 616e 643c 2f61 3e3c 2f64 6976 3e3c 6469 and
    short mustUnder\n-0016c990: 7374 616e 643c 2f64 6976 3e3c 6469 7620 stand
    Th\n-0016c9b0: 6520 736f 6170 3a3a 6d75 7374 556e 6465 e soap::mustUnde\n-0016c9c0: 7273 7461 6e64 2066 6c61 6720 6973 2073 rstand flag is s\n-0016c9d0: 6574 2077 6865 6e20 6120 534f 4150 2048 et when a SOAP H\n-0016c9e0: 6561 6465 7220 656c 656d 656e 7420 6361 eader element ca\n-0016c9f0: 7272 6965 7320 6120 534f 4150 2d45 4e56 rries a SOAP-ENV\n-0016ca00: 3a6d 7573 7455 6e64 6572 7374 616e 6420 :mustUnderstand \n-0016ca10: 6174 742e 2e2e 3c2f 6469 763e 3c64 6976 att...
    <\n-0016ca30: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:296\n-0016ca50: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 1
    .

    Function\n-0016ca80: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_match\n-0016cb00: 5f74 6167 3c2f 613e 3c2f 636f 6465 3e20 _tag \n-0016cb10: 636f 6d70 6172 6573 2074 776f 2074 6167 compares two tag\n-0016cb20: 732e 2054 6865 2074 6869 7264 2070 6172 s. The third par\n-0016cb30: 616d 6574 6572 206d 6179 2062 6520 6120 ameter may be a \n-0016cb40: 7061 7474 6572 6e20 7768 6572 6520 3c63 pattern where * is \n-0016cb60: 6120 7769 6c64 6361 7264 2061 6e64 203c a wildcard and <\n-0016cb70: 636f 6465 3e2d 3c2f 636f 6465 3e20 6973 code>- is\n-0016cb80: 2061 2073 696e 676c 6520 6368 6172 6163 a single charac\n-0016cb90: 7465 7220 7769 6c64 6361 7264 2e20 536f ter wildcard. So\n-0016cba0: 2066 6f72 2065 7861 6d70 6c65 203c 636f for example soap_match_ta\n-0016cbc0: 6728 736f 6170 2c20 7461 672c 2022 6e73 g(soap, tag, \"ns\n-0016cbd0: 3a2a 2229 3c2f 636f 6465 3e20 7769 6c6c :*\") will\n-0016cbe0: 206d 6174 6368 2061 6e79 2065 6c65 6d65 match any eleme\n-0016cbf0: 6e74 2069 6e20 6e61 6d65 7370 6163 6520 nt in namespace \n-0016cc00: 3c63 6f64 653e 6e73 3c2f 636f 6465 3e20 ns \n-0016cc10: 6f72 2077 6865 6e20 6e6f 206e 616d 6573 or when no names\n-0016cc20: 7061 6365 2070 7265 6669 7820 6973 2070 pace prefix is p\n-0016cc30: 7265 7365 6e74 2069 6e20 7468 6520 584d resent in the XM\n-0016cc40: 4c20 6d65 7373 6167 652e 3c2f 703e 0a3c L message.

    .<\n-0016cc50: 703e 5468 6520 6361 6c6c 6261 636b 2063 p>The callback c\n-0016cc60: 616e 2061 6c73 6f20 6265 2075 7365 6420 an also be used \n-0016cc70: 746f 206b 6565 7020 7472 6163 6b20 6f66 to keep track of\n-0016cc80: 2075 6e6b 6e6f 776e 2065 6c65 6d65 6e74 unknown element\n-0016cc90: 7320 696e 2061 6e20 696e 7465 726e 616c s in an internal\n-0016cca0: 2064 6174 6120 7374 7275 6374 7572 6520 data structure \n-0016ccb0: 7375 6368 2061 7320 6120 6c69 7374 3a3c such as a list:<\n-0016ccc0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    struct \n-0016cd10: 556e 6b6e 6f77 6e20 3c2f 6469 763e 0a3c Unknown
    .<\n+0016c4c0: 3d22 6c69 6e65 223e 2020 7b20 3c73 7061 =\"line\"> { "SO\n+0016c4f0: 4150 2d45 4e56 2671 756f 743b 3c2f 7370 AP-ENV", "http://sc\n+0016c530: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n+0016c540: 672f 736f 6170 2f65 6e76 656c 6f70 652f g/soap/envelope/\n+0016c550: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n+0016c560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { "\n+0016c5a0: 534f 4150 2d45 4e43 2671 756f 743b 3c2f SOAP-ENC", "http://\n+0016c5e0: 7363 6865 6d61 732e 786d 6c73 6f61 702e schemas.xmlsoap.\n+0016c5f0: 6f72 672f 736f 6170 2f65 6e63 6f64 696e org/soap/encodin\n+0016c600: 672f 2671 756f 743b 3c2f 7370 616e 3e20 g/" \n+0016c610: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },
    .
    { \n+0016c630: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0016c650: 743b 7873 6926 7175 6f74 3b3c 2f73 7061 t;xsi", "http:\n+0016c690: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200\n+0016c6a0: 312f 584d 4c53 6368 656d 612d 696e 7374 1/XMLSchema-inst\n+0016c6b0: 616e 6365 2671 756f 743b 3c2f 7370 616e ance" },
    . \n+0016c6e0: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n+0016c700: 756f 743b 7873 6426 7175 6f74 3b3c 2f73 uot;xsd", "htt\n+0016c740: 703a 2f2f 7777 772e 7733 2e6f 7267 2f32 p://www.w3.org/2\n+0016c750: 3030 312f 584d 4c53 6368 656d 6126 7175 001/XMLSchema&qu\n+0016c760: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c2f ot; }, .
    { "ns&\n+0016c7b0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n+0016c7c0: 2020 2020 3c73 7061 6e20 636c 6173 733d \n+0016c7e0: 2671 756f 743b 736f 6d65 2d55 5249 2671 "some-URI&q\n+0016c7f0: 756f 743b 3c2f 7370 616e 3e7d 2c20 3c73 uot;}, // binds &qu\n+0016c820: 6f74 3b6e 7326 7175 6f74 3b20 6e61 6d65 ot;ns" name\n+0016c830: 7370 6163 6520 7072 6566 6978 2074 6f20 space prefix to \n+0016c840: 7363 6865 6d61 2055 5249 3c2f 7370 616e schema URI
    .
    { NU\n+0016c870: 4c4c 2c20 4e55 4c4c 7d20 3c2f 6469 763e LL, NULL}
    \n+0016c880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ];
    .
    soap::mustU\n+0016c940: 6e64 6572 7374 616e 643c 2f61 3e3c 2f64 nderstand
    short mus\n+0016c970: 7455 6e64 6572 7374 616e 643c 2f64 6976 tUnderstand
    The soap::mu\n+0016c9a0: 7374 556e 6465 7273 7461 6e64 2066 6c61 stUnderstand fla\n+0016c9b0: 6720 6973 2073 6574 2077 6865 6e20 6120 g is set when a \n+0016c9c0: 534f 4150 2048 6561 6465 7220 656c 656d SOAP Header elem\n+0016c9d0: 656e 7420 6361 7272 6965 7320 6120 534f ent carries a SO\n+0016c9e0: 4150 2d45 4e56 3a6d 7573 7455 6e64 6572 AP-ENV:mustUnder\n+0016c9f0: 7374 616e 6420 6174 742e 2e2e 3c2f 6469 stand att...
    Definiti\n+0016ca20: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0016ca30: 2e68 3a32 3936 313c 2f64 6976 3e3c 2f64 .h:2961
    .

    Fu\n+0016ca60: 6e63 7469 6f6e 203c 636f 6465 3e3c 6120 nction soap\n+0016cae0: 5f6d 6174 6368 5f74 6167 3c2f 613e 3c2f _match_tag compares t\n+0016cb00: 776f 2074 6167 732e 2054 6865 2074 6869 wo tags. The thi\n+0016cb10: 7264 2070 6172 616d 6574 6572 206d 6179 rd parameter may\n+0016cb20: 2062 6520 6120 7061 7474 6572 6e20 7768 be a pattern wh\n+0016cb30: 6572 6520 3c63 6f64 653e 2a3c 2f63 6f64 ere * is a wildcard\n+0016cb50: 2061 6e64 203c 636f 6465 3e2d 3c2f 636f and - is a single \n+0016cb70: 6368 6172 6163 7465 7220 7769 6c64 6361 character wildca\n+0016cb80: 7264 2e20 536f 2066 6f72 2065 7861 6d70 rd. So for examp\n+0016cb90: 6c65 203c 636f 6465 3e73 6f61 705f 6d61 le soap_ma\n+0016cba0: 7463 685f 7461 6728 736f 6170 2c20 7461 tch_tag(soap, ta\n+0016cbb0: 672c 2022 6e73 3a2a 2229 3c2f 636f 6465 g, \"ns:*\") will match any\n+0016cbd0: 2065 6c65 6d65 6e74 2069 6e20 6e61 6d65 element in name\n+0016cbe0: 7370 6163 6520 3c63 6f64 653e 6e73 3c2f space ns or when no\n+0016cc00: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n+0016cc10: 7820 6973 2070 7265 7365 6e74 2069 6e20 x is present in \n+0016cc20: 7468 6520 584d 4c20 6d65 7373 6167 652e the XML message.\n+0016cc30: 3c2f 703e 0a3c 703e 5468 6520 6361 6c6c

    .

    The call\n+0016cc40: 6261 636b 2063 616e 2061 6c73 6f20 6265 back can also be\n+0016cc50: 2075 7365 6420 746f 206b 6565 7020 7472 used to keep tr\n+0016cc60: 6163 6b20 6f66 2075 6e6b 6e6f 776e 2065 ack of unknown e\n+0016cc70: 6c65 6d65 6e74 7320 696e 2061 6e20 696e lements in an in\n+0016cc80: 7465 726e 616c 2064 6174 6120 7374 7275 ternal data stru\n+0016cc90: 6374 7572 6520 7375 6368 2061 7320 6120 cture such as a \n+0016cca0: 6c69 7374 3a3c 2f70 3e0a 3c64 6976 2063 list:

    .
    \n+0016ccc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+0016ccf0: 2f73 7061 6e3e 556e 6b6e 6f77 6e20 3c2f /span>Unknown .
    {
    .<\n 0016cd20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016cd30: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    char *tag;
    .\n-0016cd80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n-0016cdb0: 203c 2f73 7061 6e3e 556e 6b6e 6f77 6e20 Unknown \n-0016cdc0: 2a6e 6578 743b 203c 2f64 6976 3e0a 3c64 *next;
    .\n-0016cde0: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    int\n-0016ce20: 206d 7969 676e 6f72 6528 3c73 7061 6e20 myignore(\n-0016ce40: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-0016ce80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016ce90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016cea0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0016ceb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-0016cef0: 723c 2f73 7061 6e3e 202a 7461 6729 203c r *tag) <\n+0016cd30: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > cha\n+0016cd50: 723c 2f73 7061 6e3e 202a 7461 673b 203c r *tag; <\n+0016cd60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0016cd90: 7374 7275 6374 203c 2f73 7061 6e3e 556e struct Un\n+0016cda0: 6b6e 6f77 6e20 2a6e 6578 743b 203c 2f64 known *next; .
    };
    .\n+0016cdd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n+0016ce00: 2f73 7061 6e3e 206d 7969 676e 6f72 6528 /span> myignore(\n+0016ce10: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+0016ce60: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+0016ce90: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , cons\n+0016ceb0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+0016cee0: 7461 6729 203c 2f64 6976 3e0a 3c64 6976 tag)
    .{<\n 0016cf00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-0016cf20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ch\n-0016cf50: 6172 3c2f 7370 616e 3e20 2a73 203d 2028 ar *s = (\n-0016cf60: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*)soap\n-0016cfe0: 5f6d 616c 6c6f 633c 2f61 3e28 3c61 2063 _malloc(soap, str\n-0016d020: 6c65 6e28 7461 6729 2b31 293b 203c 2f64 len(tag)+1); .
    st\n-0016d060: 7275 6374 203c 2f73 7061 6e3e 556e 6b6e ruct Unkn\n-0016d070: 6f77 6e20 2a75 203d 2028 3c73 7061 6e20 own *u = (\n-0016d090: 7374 7275 6374 203c 2f73 7061 6e3e 556e struct Un\n-0016d0a0: 6b6e 6f77 6e2a 293c 6120 636c 6173 733d known*)soap\n-0016d100: 5f6d 616c 6c6f 633c 2f61 3e28 3c61 2063 _malloc(soap, sizeof\n-0016d160: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct Unknown)); \n-0016d190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n-0016d1d0: 7320 2661 6d70 3b26 616d 703b 2075 2920 s && u) \n-0016d1e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    strcpy(\n-0016d220: 732c 2074 6167 293b 203c 2f64 6976 3e0a s, tag);
    .\n-0016d230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    u->tag \n-0016d250: 3d20 733b 203c 2f64 6976 3e0a 3c64 6976 = s;
    . \n-0016d270: 2020 752d 2667 743b 6e65 7874 203d 2075 u->next = u\n-0016d280: 6c69 7374 3b20 3c2f 6469 763e 0a3c 6469 list;
    . \n-0016d2a0: 2020 2075 6c69 7374 203d 2075 3b20 3c2f ulist = u; .
    } .
    }
    . \n-0016d300: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ma\n-0016d340: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
    .
    {.
    s\n-0016d390: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap;\n-0016d420: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct \n-0016d460: 556e 6b6e 6f77 6e20 2a75 6c69 7374 203d Unknown *ulist =\n-0016d470: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
    .\n-0016d490: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_init\n-0016d4f0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); .. \n-0016d600: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // so\n-0016d620: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n-0016d630: 6574 686f 6428 736f 6170 2c20 2e2e 2e29 ethod(soap, ...)\n-0016d640: 206f 7220 736f 6170 5f73 6572 7665 2873 or soap_serve(s\n-0016d650: 6f61 7029 203c 2f73 7061 6e3e 3c2f 6469 oap) .
    ... // print the li\n-0016d6a0: 7374 206f 6620 756e 6b6e 6f77 6e20 656c st of unknown el\n-0016d6b0: 656d 656e 7473 2073 746f 7265 6420 696e ements stored in\n-0016d6c0: 2075 6c69 7374 3c2f 7370 616e 3e3c 2f64 ulist.
    soa\n-0016d740: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a\n-0016d750: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    ..\n-0016d850: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_done\n-0016d8b0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    }
    .

    .... Back to t\n-0016d940: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-0016d950: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    \n-0016d980: 0a48 6f77 2074 6f20 6861 6e64 6c65 2048 .How to handle H\n-0016d990: 5454 5020 3330 3720 7465 6d70 6f72 6172 TTP 307 temporar\n-0016d9a0: 7920 7265 6469 7265 6374 3c2f 6832 3e0a y redirect

    .\n-0016d9b0: 3c70 3e54 6865 2063 6c69 656e 742d 7369

    The client-si\n-0016d9c0: 6465 2068 616e 646c 696e 6720 6f66 2048 de handling of H\n-0016d9d0: 5454 5020 3330 3720 636f 6465 2022 5465 TTP 307 code \"Te\n-0016d9e0: 6d70 6f72 6172 7920 5265 6469 7265 6374 mporary Redirect\n-0016d9f0: 2220 616e 6420 616e 7920 6f66 2074 6865 \" and any of the\n-0016da00: 2072 6564 6972 6563 7420 636f 6465 7320 redirect codes \n-0016da10: 3330 312c 2033 3032 2c20 616e 6420 3330 301, 302, and 30\n-0016da20: 3320 6172 6520 6e6f 7420 6175 746f 6d61 3 are not automa\n-0016da30: 7465 642e 2043 6c69 656e 7420 6170 706c ted. Client appl\n-0016da40: 6963 6174 696f 6e20 6465 7665 6c6f 7065 ication develope\n-0016da50: 7273 206d 6179 2077 616e 7420 746f 2063 rs may want to c\n-0016da60: 6f6e 7369 6465 7220 6164 6469 6e67 2061 onsider adding a\n-0016da70: 2066 6577 206c 696e 6573 206f 6620 636f few lines of co\n-0016da80: 6465 2074 6f20 7375 7070 6f72 7420 7265 de to support re\n-0016da90: 6469 7265 6374 732e 2049 7420 7761 7320 directs. It was \n-0016daa0: 6465 6369 6465 6420 6e6f 7420 746f 2061 decided not to a\n-0016dab0: 7574 6f6d 6174 6963 616c 6c79 2073 7570 utomatically sup\n-0016dac0: 706f 7274 2072 6564 6972 6563 7473 2066 port redirects f\n-0016dad0: 6f72 2074 6865 2066 6f6c 6c6f 7769 6e67 or the following\n-0016dae0: 2072 6561 736f 6e73 3a3c 2f70 3e0a 3c75 reasons:

    ..
  • Redirecti\n-0016db00: 6e67 2061 2073 6563 7572 6520 4854 5450 ng a secure HTTP\n-0016db10: 5320 6164 6472 6573 7320 746f 2061 206e S address to a n\n-0016db20: 6f6e 2d73 6563 7572 6520 4854 5450 2061 on-secure HTTP a\n-0016db30: 6464 7265 7373 2076 6961 2033 3037 2063 ddress via 307 c\n-0016db40: 7265 6174 6573 2061 2073 6563 7572 6974 reates a securit\n-0016db50: 7920 7675 6c6e 6572 6162 696c 6974 792e y vulnerability.\n-0016db60: 3c2f 6c69 3e0a 3c6c 693e 4379 636c 6963
  • .
  • Cyclic\n-0016db70: 2072 6564 6972 6563 7473 206d 7573 7420 redirects must \n-0016db80: 6265 2064 6574 6563 7465 6420 2865 2e67 be detected (e.g\n-0016db90: 2e20 616c 6c6f 7769 6e67 206f 6e6c 7920 . allowing only \n-0016dba0: 6120 6c69 6d69 7465 6420 6e75 6d62 6572 a limited number\n-0016dbb0: 206f 6620 7265 6469 7265 6374 206c 6576 of redirect lev\n-0016dbc0: 656c 7329 2e3c 2f6c 693e 0a3c 6c69 3e52 els).
  • .
  • R\n-0016dbd0: 6564 6972 6563 7469 6e67 2048 5454 5020 edirecting HTTP \n-0016dbe0: 504f 5354 2077 696c 6c20 7265 7375 6c74 POST will result\n-0016dbf0: 2069 6e20 7265 2d73 6572 6961 6c69 7a61 in re-serializa\n-0016dc00: 7469 6f6e 2061 6e64 2072 652d 706f 7374 tion and re-post\n-0016dc10: 206f 6620 7468 6520 656e 7469 7265 2053 of the entire S\n-0016dc20: 4f41 5020 7265 7175 6573 742e 2054 6865 OAP request. The\n-0016dc30: 2053 4f41 5020 7265 7175 6573 7420 6d65 SOAP request me\n-0016dc40: 7373 6167 6520 6d75 7374 2062 6520 7265 ssage must be re\n-0016dc50: 2d70 6f73 7465 6420 696e 2069 7473 2065 -posted in its e\n-0016dc60: 6e74 6972 6574 7920 7768 656e 2072 652d ntirety when re-\n-0016dc70: 6973 7375 696e 6720 7468 6520 534f 4150 issuing the SOAP\n-0016dc80: 206f 7065 7261 7469 6f6e 2074 6f20 6120 operation to a \n-0016dc90: 6e65 7720 6164 6472 6573 732e 3c2f 6c69 new address...

    To im\n-0016dcb0: 706c 656d 656e 7420 636c 6965 6e74 2d73 plement client-s\n-0016dcc0: 6964 6520 3330 3720 7265 6469 7265 6374 ide 307 redirect\n-0016dcd0: 2c20 6164 6420 7468 6520 666f 6c6c 6f77 , add the follow\n-0016dce0: 696e 6720 6c69 6e65 7320 6f66 2063 6f64 ing lines of cod\n-0016dcf0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n-0016dd20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016dd30: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-0016dd60: 3c2f 7370 616e 3e20 2a65 6e64 706f 696e *endpoin\n-0016dd70: 7420 3d20 4e55 4c4c 3b20 3c73 7061 6e20 t = NULL; \n-0016dd90: 2f2f 2075 7365 2064 6566 6175 6c74 2065 // use default e\n-0016dda0: 6e64 706f 696e 7420 6769 7665 6e20 696e ndpoint given in\n-0016ddb0: 2057 5344 4c20 6f72 2073 7065 6369 6679 WSDL or specify\n-0016ddc0: 206f 6e65 2068 6572 653c 2f73 7061 6e3e one here\n-0016ddd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int re\n-0016de10: 6469 7265 6374 7320 3d20 3130 3b20 2020 directs = 10; \n-0016de20: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-0016de40: 6d61 7820 7265 6469 7265 6374 2063 6f75 max redirect cou\n-0016de50: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    \n-0016de60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    whi\n-0016de90: 6c65 3c2f 7370 616e 3e20 2872 6564 6972 le (redir\n-0016dea0: 6563 7473 2d2d 2920 3c2f 6469 763e 0a3c ects--)
    .<\n+0016cf10: 3d22 6c69 6e65 223e 2020 3c73 7061 6e20 =\"line\"> char \n+0016cf40: 2a73 203d 2028 3c73 7061 6e20 636c 6173 *s = (\n+0016cf60: 6368 6172 3c2f 7370 616e 3e2a 293c 6120 char*)soap_malloc(soap, strlen(tag)+1\n+0016d010: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
  • .. \n+0016d190: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (s &&am\n+0016d1c0: 703b 2075 2920 3c2f 6469 763e 0a3c 6469 p; u)
    . \n+0016d1e0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    s\n+0016d200: 7472 6370 7928 732c 2074 6167 293b 203c trcpy(s, tag); <\n+0016d210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    u-&g\n+0016d230: 743b 7461 6720 3d20 733b 203c 2f64 6976 t;tag = s; .
    u->ne\n+0016d260: 7874 203d 2075 6c69 7374 3b20 3c2f 6469 xt = ulist; .
    ulist =\n+0016d290: 2075 3b20 3c2f 6469 763e 0a3c 6469 7620 u;
    .
    }\n+0016d2b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .<\n+0016d300: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016d310: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
    \n+0016d330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    .\n+0016d420: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+0016d440: 2f73 7061 6e3e 556e 6b6e 6f77 6e20 2a75 /span>Unknown *u\n+0016d450: 6c69 7374 203d 204e 554c 4c3b 203c 2f64 list = NULL; .
    soa\n+0016d4d0: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(&\n+0016d4e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+0016d510: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap.fignore \n+0016d5c0: 3d20 6d79 6967 6e6f 7265 3b20 3c2f 6469 = myignore; .
    ... // soap_call_ns\n+0016d610: 5f5f 7765 626d 6574 686f 6428 736f 6170 __webmethod(soap\n+0016d620: 2c20 2e2e 2e29 206f 7220 736f 6170 5f73 , ...) or soap_s\n+0016d630: 6572 7665 2873 6f61 7029 203c 2f73 7061 erve(soap)
    .
    ...\n+0016d660: 203c 7370 616e 2063 6c61 7373 3d22 636f // print \n+0016d680: 7468 6520 6c69 7374 206f 6620 756e 6b6e the list of unkn\n+0016d690: 6f77 6e20 656c 656d 656e 7473 2073 746f own elements sto\n+0016d6a0: 7265 6420 696e 2075 6c69 7374 3c2f 7370 red in ulist
    .
    soap_destroy<\n+0016d730: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+0016d760: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n+0016d770: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_e\n+0016d7e0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap);.
    soa\n+0016d890: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(&\n+0016d8a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+0016d8d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }.

    ....\n+0016d910: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+0016d920: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+0016d930: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+0016d940: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.How to ha\n+0016d970: 6e64 6c65 2048 5454 5020 3330 3720 7465 ndle HTTP 307 te\n+0016d980: 6d70 6f72 6172 7920 7265 6469 7265 6374 mporary redirect\n+0016d990: 3c2f 6832 3e0a 3c70 3e54 6865 2063 6c69 .

    The cli\n+0016d9a0: 656e 742d 7369 6465 2068 616e 646c 696e ent-side handlin\n+0016d9b0: 6720 6f66 2048 5454 5020 3330 3720 636f g of HTTP 307 co\n+0016d9c0: 6465 2022 5465 6d70 6f72 6172 7920 5265 de \"Temporary Re\n+0016d9d0: 6469 7265 6374 2220 616e 6420 616e 7920 direct\" and any \n+0016d9e0: 6f66 2074 6865 2072 6564 6972 6563 7420 of the redirect \n+0016d9f0: 636f 6465 7320 3330 312c 2033 3032 2c20 codes 301, 302, \n+0016da00: 616e 6420 3330 3320 6172 6520 6e6f 7420 and 303 are not \n+0016da10: 6175 746f 6d61 7465 642e 2043 6c69 656e automated. Clien\n+0016da20: 7420 6170 706c 6963 6174 696f 6e20 6465 t application de\n+0016da30: 7665 6c6f 7065 7273 206d 6179 2077 616e velopers may wan\n+0016da40: 7420 746f 2063 6f6e 7369 6465 7220 6164 t to consider ad\n+0016da50: 6469 6e67 2061 2066 6577 206c 696e 6573 ding a few lines\n+0016da60: 206f 6620 636f 6465 2074 6f20 7375 7070 of code to supp\n+0016da70: 6f72 7420 7265 6469 7265 6374 732e 2049 ort redirects. I\n+0016da80: 7420 7761 7320 6465 6369 6465 6420 6e6f t was decided no\n+0016da90: 7420 746f 2061 7574 6f6d 6174 6963 616c t to automatical\n+0016daa0: 6c79 2073 7570 706f 7274 2072 6564 6972 ly support redir\n+0016dab0: 6563 7473 2066 6f72 2074 6865 2066 6f6c ects for the fol\n+0016dac0: 6c6f 7769 6e67 2072 6561 736f 6e73 3a3c lowing reasons:<\n+0016dad0: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e52 6564 /p>.

      .
    • Red\n+0016dae0: 6972 6563 7469 6e67 2061 2073 6563 7572 irecting a secur\n+0016daf0: 6520 4854 5450 5320 6164 6472 6573 7320 e HTTPS address \n+0016db00: 746f 2061 206e 6f6e 2d73 6563 7572 6520 to a non-secure \n+0016db10: 4854 5450 2061 6464 7265 7373 2076 6961 HTTP address via\n+0016db20: 2033 3037 2063 7265 6174 6573 2061 2073 307 creates a s\n+0016db30: 6563 7572 6974 7920 7675 6c6e 6572 6162 ecurity vulnerab\n+0016db40: 696c 6974 792e 3c2f 6c69 3e0a 3c6c 693e ility.
    • .
    • \n+0016db50: 4379 636c 6963 2072 6564 6972 6563 7473 Cyclic redirects\n+0016db60: 206d 7573 7420 6265 2064 6574 6563 7465 must be detecte\n+0016db70: 6420 2865 2e67 2e20 616c 6c6f 7769 6e67 d (e.g. allowing\n+0016db80: 206f 6e6c 7920 6120 6c69 6d69 7465 6420 only a limited \n+0016db90: 6e75 6d62 6572 206f 6620 7265 6469 7265 number of redire\n+0016dba0: 6374 206c 6576 656c 7329 2e3c 2f6c 693e ct levels).
    • \n+0016dbb0: 0a3c 6c69 3e52 6564 6972 6563 7469 6e67 .
    • Redirecting\n+0016dbc0: 2048 5454 5020 504f 5354 2077 696c 6c20 HTTP POST will \n+0016dbd0: 7265 7375 6c74 2069 6e20 7265 2d73 6572 result in re-ser\n+0016dbe0: 6961 6c69 7a61 7469 6f6e 2061 6e64 2072 ialization and r\n+0016dbf0: 652d 706f 7374 206f 6620 7468 6520 656e e-post of the en\n+0016dc00: 7469 7265 2053 4f41 5020 7265 7175 6573 tire SOAP reques\n+0016dc10: 742e 2054 6865 2053 4f41 5020 7265 7175 t. The SOAP requ\n+0016dc20: 6573 7420 6d65 7373 6167 6520 6d75 7374 est message must\n+0016dc30: 2062 6520 7265 2d70 6f73 7465 6420 696e be re-posted in\n+0016dc40: 2069 7473 2065 6e74 6972 6574 7920 7768 its entirety wh\n+0016dc50: 656e 2072 652d 6973 7375 696e 6720 7468 en re-issuing th\n+0016dc60: 6520 534f 4150 206f 7065 7261 7469 6f6e e SOAP operation\n+0016dc70: 2074 6f20 6120 6e65 7720 6164 6472 6573 to a new addres\n+0016dc80: 732e 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 s.
    • .
    .To implement cl\n+0016dca0: 6965 6e74 2d73 6964 6520 3330 3720 7265 ient-side 307 re\n+0016dcb0: 6469 7265 6374 2c20 6164 6420 7468 6520 direct, add the \n+0016dcc0: 666f 6c6c 6f77 696e 6720 6c69 6e65 7320 following lines \n+0016dcd0: 6f66 2063 6f64 653a 3c2f 703e 0a3c 6469 of code:

    .
    const\n+0016dd20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *e\n+0016dd50: 6e64 706f 696e 7420 3d20 4e55 4c4c 3b20 ndpoint = NULL; \n+0016dd60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // use def\n+0016dd80: 6175 6c74 2065 6e64 706f 696e 7420 6769 ault endpoint gi\n+0016dd90: 7665 6e20 696e 2057 5344 4c20 6f72 2073 ven in WSDL or s\n+0016dda0: 7065 6369 6679 206f 6e65 2068 6572 653c pecify one here<\n+0016ddb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0016ddd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016dde0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int redirects = \n+0016de00: 3130 3b20 2020 2020 2020 2020 203c 7370 10; // max redire\n+0016de30: 6374 2063 6f75 6e74 203c 2f73 7061 6e3e ct count \n+0016de40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    while \n+0016de80: 2872 6564 6972 6563 7473 2d2d 2920 3c2f (redirects--) .
    {
    .<\n 0016deb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016dec0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if\n-0016df00: 2028 736f 6170 5f63 616c 6c5f 6e73 315f (soap_call_ns1_\n-0016df10: 5f6d 794d 6574 686f 6428 3c61 2063 6c61 _myMethod(soap, endpo\n-0016df50: 696e 742c 202e 2e2e 2929 203c 2f64 6976 int, ...)) .
    {
    .\n-0016df90: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-0016dfb0: 3c2f 7370 616e 3e20 2828 3c61 2063 6c61 ((soap->error\n-0016e040: 2026 6774 3b3d 2033 3031 2026 616d 703b >= 301 &\n-0016e050: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & soa\n-0016e080: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error <\n-0016e0e0: 3b3d 2033 3033 2920 7c7c 203c 6120 636c ;= 303) || soap-><\n-0016e120: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016e130: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016e140: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n-0016e150: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n-0016e160: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error == 307)
    \n-0016e180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n-0016e1a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016e1b0: 3e20 2020 2020 2065 6e64 706f 696e 7420 > endpoint \n-0016e1c0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_strd\n-0016e220: 7570 3c2f 613e 283c 6120 636c 6173 733d up(so\n-0016e250: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, s\n-0016e280: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->endpoint); // end\n-0016e300: 706f 696e 7420 6672 6f6d 2048 5454 5020 point from HTTP \n-0016e310: 3330 312c 2033 3032 2c20 3330 332c 2033 301, 302, 303, 3\n-0016e320: 3037 204c 6f63 6174 696f 6e20 6865 6164 07 Location head\n-0016e330: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
    \n-0016e340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .<\n-0016e360: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016e370: 3e20 2020 203c 7370 616e 2063 6c61 7373 > e\n-0016e390: 6c73 653c 2f73 7061 6e3e 203c 2f64 6976 lse .
    {
    .\n-0016e3c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // handle erro\n-0016e400: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    .\n-0016e410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; \n-0016e450: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } <\n-0016e470: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    else .
    {
    .\n-0016e4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-0016e520: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c73 break; // all OK no\n-0016e550: 773c 2f73 7061 6e3e 3c2f 6469 763e 0a3c w
    .<\n-0016e560: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016e570: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    }.

    .\n-0016e5b0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-0016e5c0: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-0016e5d0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .How to imp\n-0016e610: 6c65 6d65 6e74 2048 5454 5020 4745 542c lement HTTP GET,\n-0016e620: 2050 5554 2c20 616e 6420 5041 5443 4820 PUT, and PATCH \n-0016e630: 7365 7276 6963 6573 3c2f 6832 3e0a 3c70 services

    .To implement HT\n-0016e650: 5450 2047 4554 2072 6571 7565 7374 2072 TP GET request r\n-0016e660: 6573 706f 6e73 6573 2c20 6465 6669 6e65 esponses, define\n-0016e670: 2074 6865 203c 636f 6465 3e3c 6120 636c the soa\n-0016e740: 703a 3a66 6765 743c 2f61 3e3c 2f63 6f64 p::fget callback func\n-0016e760: 7469 6f6e 2e20 5468 6520 6361 6c6c 6261 tion. The callba\n-0016e770: 636b 2069 7320 7265 7175 6972 6564 2074 ck is required t\n-0016e780: 6f20 7072 6f64 7563 6520 6120 7265 7370 o produce a resp\n-0016e790: 6f6e 7365 2074 6f20 7468 6520 7265 7175 onse to the requ\n-0016e7a0: 6573 7420 696e 2074 6578 7475 616c 2066 est in textual f\n-0016e7b0: 6f72 6d2c 2073 7563 6820 6173 2061 2057 orm, such as a W\n-0016e7c0: 6562 2070 6167 6520 6f72 2061 6e20 584d eb page or an XM\n-0016e7d0: 4c20 6f72 204a 534f 4e20 7265 7370 6f6e L or JSON respon\n-0016e7e0: 7365 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 se.

    .

    You c\n-0016e7f0: 616e 2061 6c73 6f20 7573 6520 7468 6520 an also use the \n-0016e800: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_get<\n-0016e890: 2f61 3e3c 2f63 6f64 653e 2070 6c75 6769 /a> plugi\n-0016e8a0: 6e20 7768 6963 6820 6573 7365 6e74 6961 n which essentia\n-0016e8b0: 6c6c 7920 7365 7473 2074 6865 203c 636f lly sets the soap::fget<\n-0016e990: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a> callb\n-0016e9a0: 6163 6b20 616e 6420 616c 736f 206b 6565 ack and also kee\n-0016e9b0: 7073 2074 7261 636b 206f 6620 7468 6520 ps track of the \n-0016e9c0: 6e75 6d62 6572 206f 6620 4854 5450 2047 number of HTTP G\n-0016e9d0: 4554 2061 6e64 2050 4f53 5420 7265 7175 ET and POST requ\n-0016e9e0: 6573 7473 206d 6164 6520 6174 2074 6865 ests made at the\n-0016e9f0: 2073 6572 7665 7220 7369 6465 2e3c 2f70 server side..

    The followi\n-0016ea10: 6e67 2065 7861 6d70 6c65 2070 726f 6475 ng example produ\n-0016ea20: 6365 7320 6120 5765 6220 7061 6765 2075 ces a Web page u\n-0016ea30: 706f 6e20 6120 4854 5450 2047 4554 2072 pon a HTTP GET r\n-0016ea40: 6571 7565 7374 2028 652e 672e 2066 726f equest (e.g. fro\n-0016ea50: 6d20 6120 6272 6f77 7365 7229 3a3c 2f70 m a browser):.

    .{<\n-0016ead0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-0016eb00: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-0016eb40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016eb50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016eb60: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n-0016eb70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    . \n-0016ebf0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-0016ec20: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fget\n-0016ec80: 3c2f 613e 203d 203c 6120 636c 6173 733d = http_get<\n-0016ece0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n-0016ed00: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    so\n-0016ed90: 6170 5f73 6572 7665 3c2f 613e 283c 6120 ap_serve(soap); <\n-0016edd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // if<\n+0016dee0: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n+0016def0: 6c5f 6e73 315f 5f6d 794d 6574 686f 6428 l_ns1__myMethod(\n+0016df00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0016df30: 2065 6e64 706f 696e 742c 202e 2e2e 2929 endpoint, ...))\n+0016df40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    if ((\n+0016dfa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0016dfd0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+0016e020: 6f72 3c2f 613e 2026 6774 3b3d 2033 3031 or >= 301\n+0016e030: 2026 616d 703b 2661 6d70 3b20 3c61 2063 && soap->\n+0016e070: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error <= 303) ||\n+0016e0d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0016e100: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n+0016e150: 726f 723c 2f61 3e20 3d3d 2033 3037 2920 ror == 307) \n+0016e160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    end\n+0016e1a0: 706f 696e 7420 3d20 3c61 2063 6c61 7373 point = soa\n+0016e200: 705f 7374 7264 7570 3c2f 613e 283c 6120 p_strdup(soap, soap-&g\n+0016e270: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;endpo\n+0016e2c0: 696e 743c 2f61 3e29 3b20 3c73 7061 6e20 int); \n+0016e2e0: 2f2f 2065 6e64 706f 696e 7420 6672 6f6d // endpoint from\n+0016e2f0: 2048 5454 5020 3330 312c 2033 3032 2c20 HTTP 301, 302, \n+0016e300: 3330 332c 2033 3037 204c 6f63 6174 696f 303, 307 Locatio\n+0016e310: 6e20 6865 6164 6572 203c 2f73 7061 6e3e n header \n+0016e320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    else\n+0016e380: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {<\n+0016e3a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ..\n+0016e3c0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // handl\n+0016e3e0: 6520 6572 726f 7220 3c2f 7370 616e 3e3c e error <\n+0016e3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    break;
    . \n+0016e450: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    . \n+0016e470: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    else
    .
    {<\n+0016e4d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    break; // all\n+0016e530: 204f 4b20 6e6f 773c 2f73 7061 6e3e 3c2f OK now.
    }
    \n+0016e560: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .The example bel\n-0016fd60: 6f77 2070 726f 6475 6365 7320 6120 5753 ow produces a WS\n-0016fd70: 444c 2066 696c 6520 7570 6f6e 2061 2048 DL file upon a H\n-0016fd80: 5454 5020 4745 5420 7769 7468 2070 6174 TTP GET with pat\n-0016fd90: 6820 3c63 6f64 653e 3f77 7364 6c3c 2f63 h ?wsdl:

    ..<\n+0016ef50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016ef60: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    ..<\n+0016f0e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016f0f0: 3e20 2020 7c7c 203c 6120 636c 6173 733d > || soap_send\n+0016f150: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+0016f180: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "<HTML\n+0016f1b0: 2667 743b 4d79 2057 6562 2073 6572 7665 >My Web serve\n+0016f1c0: 7220 6973 206f 7065 7261 7469 6f6e 616c r is operational\n+0016f1d0: 2e26 6c74 3b2f 4854 4d4c 2667 743b 2671 .</HTML>&q\n+0016f1e0: 756f 743b 3c2f 7370 616e 3e29 3c2f 6469 uot;).
    || soap_\n+0016f260: 656e 645f 7365 6e64 3c2f 613e 283c 6120 end_send(soap))..\n+0016f390: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+0016f3b0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap_c\n+0016f410: 6c6f 7365 736f 636b 3c2f 613e 283c 6120 losesock(soap);.
    }
    .<\n+0016f470: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0016f480: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0016f490: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n+0016f4a0: 6c5f 6761 6530 3232 3230 3466 6637 3030 l_gae022204ff700\n+0016f4b0: 3464 6632 6435 6163 3965 3038 3363 6262 4df2d5ac9e083cbb\n+0016f4c0: 3562 3136 223e 3c64 6976 2063 6c61 7373 5b16\">\n+0016f570: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback to i\n+0016f590: 6d70 6c65 6d65 6e74 206c 6f67 6963 2061 mplement logic a\n+0016f5a0: 7420 7468 6520 7365 7276 6572 2d73 6964 t the server-sid\n+0016f5b0: 6520 746f 2073 6572 7665 2072 6573 706f e to serve respo\n+0016f5c0: 6e73 6573 2074 6f20 4854 5450 2047 4554 nses to HTTP GET\n+0016f5d0: 2072 6571 7565 7374 7320 6672 6f6d 2063 requests from c\n+0016f5e0: 6c69 656e 7473 2e3c 2f64 6976 3e3c 6469 lients.
    \n+0016f600: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:43\n+0016f620: 3330 3c2f 6469 763e 3c2f 6469 763e 0a3c 30
    .<\n+0016f630: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0016f640: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0016f650: 705f 5f69 6f5f 6874 6d6c 5f67 6130 3339 p__io_html_ga039\n+0016f660: 3065 3538 6264 3261 3365 6265 3666 6533 0e58bd2a3ebe6fe3\n+0016f670: 6134 3664 6530 3533 3461 3631 3422 3e3c a46de0534a614\"><\n+0016f680: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+0016f690: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_respo\n+0016f6e0: 6e73 653c 2f61 3e3c 2f64 6976 3e3c 6469 nse
    int soap_respon\n+0016f710: 7365 2873 7472 7563 7420 736f 6170 202a se(struct soap *\n+0016f720: 736f 6170 2c20 696e 7420 7374 6174 7573 soap, int status\n+0016f730: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Initia\n+0016f750: 6c69 7a65 2074 6865 2063 6f6e 7465 7874 lize the context\n+0016f760: 2066 6f72 2073 6572 7665 722d 7369 6465 for server-side\n+0016f770: 2073 656e 6469 6e67 2061 6e64 2073 656e sending and sen\n+0016f780: 6420 6120 4854 5450 2072 6573 706f 6e73 d a HTTP respons\n+0016f790: 6520 6865 6164 6572 2e3c 2f64 6976 3e3c e header.
    <\n+0016f7a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+0016f850: 705f 636c 6f73 6573 6f63 6b3c 2f61 3e3c p_closesock<\n+0016f860: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa\n+0016f880: 705f 636c 6f73 6573 6f63 6b28 7374 7275 p_closesock(stru\n+0016f890: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)
    Close the\n+0016f8c0: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti\n+0016f8d0: 6f6e 2e3c 2f64 6976 3e3c 2f64 6976 3e0a on.
    .\n+0016f8e0: 3c64 6976 2063 6c61 7373 3d22 7474 6322 <\n+0016fa30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0016faf0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n+0016fb10: 5f48 544d 4c3c 2f64 6976 3e3c 6469 7620 _HTML
    A \n+0016fb30: 7370 6563 6961 6c20 736f 6170 5f73 7461 special soap_sta\n+0016fb40: 7475 7320 6572 726f 7220 636f 6465 2074 tus error code t\n+0016fb50: 6f20 7369 676e 616c 2074 6861 7420 6120 o signal that a \n+0016fb60: 6375 7374 6f6d 2048 5454 5020 7265 7370 custom HTTP resp\n+0016fb70: 6f6e 7365 2069 7320 7072 6573 656e 7420 onse is present \n+0016fb80: 616e 6420 6e6f 2048 5454 5020 7265 7370 and no HTTP resp\n+0016fb90: 6f6e 732e 2e2e 3c2f 6469 763e 3c64 6976 ons...
    <\n+0016fbb0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:271\n+0016fbd0: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .soap_end_se\n+0016fc90: 6e64 3c2f 613e 3c2f 6469 763e 3c64 6976 nd
    \n+0016fcb0: 696e 7420 736f 6170 5f65 6e64 5f73 656e int soap_end_sen\n+0016fcc0: 6428 7374 7275 6374 2073 6f61 7020 2a73 d(struct soap *s\n+0016fcd0: 6f61 7029 3c2f 6469 763e 3c64 6976 2063 oap)
    Fin\n+0016fcf0: 616c 697a 6520 7468 6520 636f 6e74 6578 alize the contex\n+0016fd00: 7420 6166 7465 7220 7365 6e64 696e 672e t after sending.\n+0016fd10: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The examp\n+0016fd40: 6c65 2062 656c 6f77 2070 726f 6475 6365 le below produce\n+0016fd50: 7320 6120 5753 444c 2066 696c 6520 7570 s a WSDL file up\n+0016fd60: 6f6e 2061 2048 5454 5020 4745 5420 7769 on a HTTP GET wi\n+0016fd70: 7468 2070 6174 6820 3c63 6f64 653e 3f77 th path ?w\n+0016fd80: 7364 6c3c 2f63 6f64 653e 3a3c 2f70 3e0a sdl:

    .\n+0016fd90: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int htt\n+0016fe30: 705f 6765 743c 2f61 3e28 3c73 7061 6e20 p_get(\n+0016fe50: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+0016fe90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016fea0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016feb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2920 html\">soap) \n+0016fec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n 0016fee0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    F\n-0016ff10: 494c 4520 2a66 6420 3d20 4e55 4c4c 3b3c ILE *fd = NULL;<\n-0016ff20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char \n-0016ff60: 2a73 203d 2073 7472 6368 7228 3c61 2063 *s = strchr(soap->\n-0016ffa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 path, \n-00170010: 393b 3f26 2333 393b 3c2f 7370 616e 3e29 9;?')\n-00170020: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n-00170060: 2028 2173 207c 7c20 7374 7263 6d70 2873 (!s || strcmp(s\n-00170070: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00170090: 756f 743b 3f77 7364 6c26 7175 6f74 3b3c uot;?wsdl"<\n-001700a0: 2f73 7061 6e3e 2929 203c 2f64 6976 3e0a /span>))
    .\n-001700b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .\n-00170170: 2020 6664 203d 203c 6120 636c 6173 733d fd = fo\n-001701d0: 7065 6e3c 2f61 3e28 3c73 7061 6e20 636c pen("myserv\n-00170200: 6963 652e 7773 646c 2671 756f 743b 3c2f ice.wsdl", "rb"\n-00170240: 3b3c 2f73 7061 6e3e 293b 203c 7370 616e ;); // open WSDL fi\n-00170270: 6c65 2074 6f20 636f 7079 203c 2f73 7061 le to copy
    .
    if\n-001702c0: 2028 2166 6429 203c 2f64 6976 3e0a 3c64 (!fd)
    .\n-001702e0: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-00170300: 7475 726e 3c2f 7370 616e 3e20 3430 343b turn 404;\n-00170310: 203c 7370 616e 2063 6c61 7373 3d22 636f // return\n-00170330: 2048 5454 5020 6e6f 7420 666f 756e 6420 HTTP not found \n-00170340: 6572 726f 7220 3c2f 7370 616e 3e3c 2f64 error .
    s\n-00170390: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->http_conten\n-001703f0: 743c 2f61 3e20 3d20 3c73 7061 6e20 636c t = "text/x\n-00170420: 6d6c 2671 756f 743b 3c2f 7370 616e 3e3b ml";\n-00170430: 203c 7370 616e 2063 6c61 7373 3d22 636f // HTTP h\n-00170450: 6561 6465 7220 7769 7468 2074 6578 742f eader with text/\n-00170460: 786d 6c20 636f 6e74 656e 7420 3c2f 7370 xml content
    ..<\n-00170610: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00170620: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n-00170640: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while\n-00170660: 3c2f 7370 616e 3e20 2831 293c 2f64 6976 (1).
    {
    .\n-00170690: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    size_t \n-001706d0: 7220 3d20 6672 6561 6428 3c61 2063 6c61 r = fread(soap->tmpbuf, 1, size\n-00170780: 6f66 3c2f 7370 616e 3e28 3c61 2063 6c61 of(soap->tmpbuf), fd);
    .\n-00170820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (!r \n-00170860: 7c7c 203c 6120 636c 6173 733d 2263 6f64 || soap_send_raw\n-001708c0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001708f0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soa\n-00170920: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->tmpbuf, r\n-00170980: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n-001709a0: 2020 2020 3c73 7061 6e20 636c 6173 733d br\n-001709c0: 6561 6b3c 2f73 7061 6e3e 3b3c 2f64 6976 eak;.
    }
    \n-001709f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . \n-00170a20: 203c 6120 636c 6173 733d 2263 6f64 6522 fclose(fd);
    .<\n-00170a90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00170aa0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_end_send\n-00170b00: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-00170b30: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n-00170b50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00170b70: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n soap_cl\n-00170bd0: 6f73 6573 6f63 6b3c 2f61 3e28 3c61 2063 osesock(soap); FILE *fd = \n+0016ff00: 4e55 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 NULL;
    . \n+0016ff20: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *s = strch\n+0016ff50: 7228 3c61 2063 6c61 7373 3d22 636f 6465 r(soap->p\n+0016ffd0: 6174 683c 2f61 3e2c 203c 7370 616e 2063 ath, '?');
    .<\n+00170010: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00170020: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00170040: 2f73 7061 6e3e 2028 2173 207c 7c20 7374 /span> (!s || st\n+00170050: 7263 6d70 2873 2c20 3c73 7061 6e20 636c rcmp(s, "?wsdl&\n+00170080: 7175 6f74 3b3c 2f73 7061 6e3e 2929 203c quot;)) <\n+00170090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_GET\n+00170130: 5f4d 4554 484f 443c 2f61 3e3b 203c 2f64 _METHOD; .
    fd = fopen("\n+001701e0: 6d79 7365 7276 6963 652e 7773 646c 2671 myservice.wsdl&q\n+001701f0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "r\n+00170220: 6226 7175 6f74 3b3c 2f73 7061 6e3e 293b b");\n+00170230: 203c 7370 616e 2063 6c61 7373 3d22 636f // open W\n+00170250: 5344 4c20 6669 6c65 2074 6f20 636f 7079 SDL file to copy\n+00170260: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00170270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00170280: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+001702a0: 2f73 7061 6e3e 2028 2166 6429 203c 2f64 /span> (!fd) .
    return 404; // \n+00170310: 7265 7475 726e 2048 5454 5020 6e6f 7420 return HTTP not \n+00170320: 666f 756e 6420 6572 726f 7220 3c2f 7370 found error
    .
    soap-&g\n+00170380: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;http_\n+001703d0: 636f 6e74 656e 743c 2f61 3e20 3d20 3c73 content = "\n+00170400: 7465 7874 2f78 6d6c 2671 756f 743b 3c2f text/xml"; // \n+00170430: 4854 5450 2068 6561 6465 7220 7769 7468 HTTP header with\n+00170440: 2074 6578 742f 786d 6c20 636f 6e74 656e text/xml conten\n+00170450: 7420 3c2f 7370 616e 3e3c 2f64 6976 3e0a t
    .\n+00170460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n+00170490: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_re\n+001704f0: 7370 6f6e 7365 3c2f 613e 283c 6120 636c sponse(soap, SOAP\n+00170580: 5f46 494c 453c 2f61 3e29 203d 3d20 3c61 _FILE) == SOAP_OK).
    {
    \n+00170610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    while (1\n+00170650: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {<\n+00170670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t r = fread(\n+001706c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001706f0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tmp\n+00170740: 6275 663c 2f61 3e2c 2031 2c20 3c73 7061 buf, 1, sizeof(\n+00170770: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001707a0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tmp\n+001707f0: 6275 663c 2f61 3e29 2c20 6664 293b 203c buf), fd); <\n+00170800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n+00170970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break\n+001709b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    } \n+001709d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    fc\n+00170a60: 6c6f 7365 3c2f 613e 2866 6429 3b20 3c2f lose(fd); .
    soap_en\n+00170ae0: 645f 7365 6e64 3c2f 613e 283c 6120 636c d_send(soap);.
    return <\n+00170b60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00170b70: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00170b80: 705f 5f69 6f2e 6874 6d6c 2367 6130 3664 p__io.html#ga06d\n+00170b90: 3539 3039 3461 6661 3364 6636 6231 6239 59094afa3df6b1b9\n+00170ba0: 6636 6232 6262 3438 3432 3037 6322 3e73 f6b2bb484207c\">s\n+00170bb0: 6f61 705f 636c 6f73 6573 6f63 6b3c 2f61 oap_closesock(soap);
    .
    }.
    }
    .
    SOA\n-00170ce0: 505f 4745 545f 4d45 5448 4f44 3c2f 613e P_GET_METHOD\n-00170cf0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    #defin\n-00170d10: 6520 534f 4150 5f47 4554 5f4d 4554 484f e SOAP_GET_METHO\n-00170d20: 443c 2f64 6976 3e3c 6469 7620 636c 6173 D
    A soap\n-00170d40: 5f73 7461 7475 7320 6572 726f 7220 636f _status error co\n-00170d50: 6465 3a20 616e 2048 5454 5020 4745 5420 de: an HTTP GET \n-00170d60: 7265 7175 6573 7420 7761 7320 7265 6365 request was rece\n-00170d70: 6976 6564 2062 7920 7468 6520 7365 7276 ived by the serv\n-00170d80: 6963 6520 6275 7420 7468 6520 4745 5420 ice but the GET \n-00170d90: 7265 7175 6573 7420 6361 6c6c 6261 632e request callbac.\n-00170da0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De\n-00170dc0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00170dd0: 6473 6f61 7032 2e68 3a32 3339 373c 2f64 dsoap2.h:2397
    .
    SOAP_FILE
    #define \n-00170ec0: 534f 4150 5f46 494c 453c 2f64 6976 3e3c SOAP_FILE
    <\n-00170ed0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00170ee0: 223e 4120 7370 6563 6961 6c20 736f 6170 \">A special soap\n-00170ef0: 5f73 7461 7475 7320 6572 726f 7220 636f _status error co\n-00170f00: 6465 2074 6f20 7369 676e 616c 2074 6861 de to signal tha\n-00170f10: 7420 6120 6375 7374 6f6d 2066 696c 652d t a custom file-\n-00170f20: 6261 7365 6420 4854 5450 2072 6573 706f based HTTP respo\n-00170f30: 6e73 6520 6973 2070 7265 7365 6e74 2061 nse is present a\n-00170f40: 6e64 206e 6f20 482e 2e2e 3c2f 6469 763e nd no H...
    \n-00170f50: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00170f70: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00170f80: 3a32 3731 393c 2f64 6976 3e3c 2f64 6976 :2719
    .
    \n-00171050: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_sen\n-00171070: 645f 7261 7728 7374 7275 6374 2073 6f61 d_raw(struct soa\n-00171080: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-00171090: 6861 7220 2a73 2c20 7369 7a65 5f74 206e har *s, size_t n\n-001710a0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Send r\n-001710c0: 6177 2062 7974 6573 2e3c 2f64 6976 3e3c aw bytes.
    <\n-001710d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-00171120: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00171130: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-00171170: 6f61 703a 3a74 6d70 6275 663c 2f61 3e3c oap::tmpbuf<\n-00171180: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    char tm\n-001711a0: 7062 7566 5b53 4f41 505f 544d 504c 454e pbuf[SOAP_TMPLEN\n-001711b0: 5d3c 2f64 6976 3e3c 6469 7620 636c 6173 ]
    Intern\n-001711d0: 616c 2062 7566 6665 7220 746f 2068 6f6c al buffer to hol\n-001711e0: 6420 7465 6d70 6f72 6172 7920 7374 7269 d temporary stri\n-001711f0: 6e67 7320 7375 6368 2061 7320 7374 7269 ngs such as stri\n-00171200: 6e67 2072 6570 7265 7365 6e74 6174 696f ng representatio\n-00171210: 6e73 206f 6620 7072 696d 6974 6976 6520 ns of primitive \n-00171220: 7661 6c75 6573 2c2e 2e2e 3c2f 6469 763e values,...
    \n-00171230: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00171250: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00171260: 3a34 3139 393c 2f64 6976 3e3c 2f64 6976 :4199
    .
    <\n-001712d0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-001712e0: 6170 2e68 746d 6c23 6165 3565 3938 3733 ap.html#ae5e9873\n-001712f0: 3361 3433 3439 6235 6531 3436 3661 3965 3a4349b5e1466a9e\n-00171300: 3063 6363 3232 6331 3122 3e73 6f61 703a 0ccc22c11\">soap:\n-00171310: 3a68 7474 705f 636f 6e74 656e 743c 2f61 :http_content
    const\n-00171340: 2063 6861 7220 2a20 6874 7470 5f63 6f6e char * http_con\n-00171350: 7465 6e74 3c2f 6469 763e 3c64 6976 2063 tent
    Str\n-00171370: 696e 6720 7769 7468 2048 5454 5020 636f ing with HTTP co\n-00171380: 6e74 656e 7420 7479 7065 2068 6561 6465 ntent type heade\n-00171390: 7220 7661 6c75 6520 7265 6365 6976 6564 r value received\n-001713a0: 2c20 6361 6e20 616c 736f 2062 6520 6173 , can also be as\n-001713b0: 7369 676e 6564 2074 6f20 7370 6563 6966 signed to specif\n-001713c0: 7920 6120 636f 6e74 656e 7420 7479 7065 y a content type\n-001713d0: 2068 2e2e 2e3c 2f64 6976 3e3c 6469 7620 h...
    Definition:\n-00171400: 2073 7464 736f 6170 322e 683a 3239 3830 stdsoap2.h:2980\n-00171410: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    This exam\n-00171440: 706c 6520 7368 6f77 7320 686f 7720 6f6e ple shows how on\n-00171450: 6520 7072 6564 6574 6572 6d69 6e65 6420 e predetermined \n-00171460: 6669 6c65 2069 7320 7365 7276 6564 2e20 file is served. \n-00171470: 5468 6520 3c65 6d3e 3c63 6f64 653e 6773 The gs\n-00171480: 6f61 702f 7361 6d70 6c65 732f 7765 6273 oap/samples/webs\n-00171490: 6572 7665 723c 2f63 6f64 653e 3c2f 656d erver demonstrates h\n-001714b0: 6f77 2066 696c 6573 2073 686f 756c 6420 ow files should \n-001714c0: 6265 2073 6572 7665 6420 696e 2067 656e be served in gen\n-001714d0: 6572 616c 2c20 6279 2061 6464 696e 6720 eral, by adding \n-001714e0: 7468 6520 6e65 6365 7373 6172 7920 6c6f the necessary lo\n-001714f0: 6769 6320 746f 2061 6464 206d 6564 6961 gic to add media\n-00171500: 2074 7970 6573 2074 6f20 4854 5450 2068 types to HTTP h\n-00171510: 6561 6465 7273 2061 6e64 2074 6f20 7265 eaders and to re\n-00171520: 7374 7269 6374 2074 6865 2073 656c 6563 strict the selec\n-00171530: 7469 6f6e 206f 6620 6669 6c65 7320 7468 tion of files th\n-00171540: 6174 2073 686f 756c 6420 6265 2073 6572 at should be ser\n-00171550: 7665 642e 3c2f 703e 0a3c 646c 2063 6c61 ved.

    .
    Warning\n-00171580: 3c2f 6474 3e3c 6464 3e57 6865 6e20 7365
    When se\n-00171590: 7276 696e 6720 6669 6c65 7320 6173 2072 rving files as r\n-001715a0: 6573 706f 6e73 6573 2074 6f20 7265 7175 esponses to requ\n-001715b0: 6573 7473 2c20 7765 206e 6565 6420 746f ests, we need to\n-001715c0: 2062 6520 7661 7279 2063 6172 6566 756c be vary careful\n-001715d0: 2c20 6265 6361 7573 6520 7765 2064 6f6e , because we don\n-001715e0: 2774 2077 616e 7420 7265 7175 6573 7473 't want requests\n-001715f0: 2074 6f20 736e 6f6f 7020 6172 6f75 6e64 to snoop around\n-00171600: 2069 6e20 6469 7265 6374 6f72 6965 7320 in directories \n-00171610: 616e 6420 7365 7276 6520 6669 6c65 7320 and serve files \n-00171620: 7468 6174 2073 686f 756c 6420 6265 2070 that should be p\n-00171630: 726f 7465 6374 6564 2066 726f 6d20 7075 rotected from pu\n-00171640: 626c 6963 2076 6965 772e 2054 6865 7265 blic view. There\n-00171650: 666f 7265 2c20 7768 656e 2061 6464 696e fore, when addin\n-00171660: 6720 6c6f 6769 6320 746f 2073 6572 7665 g logic to serve\n-00171670: 2066 696c 6573 2c20 7765 206d 7573 7420 files, we must \n-00171680: 7265 6a65 6374 2072 6571 7565 7374 2074 reject request t\n-00171690: 6861 7420 6861 7665 203c 636f 6465 3e3c hat have <\n-001716a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001716b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001716c0: 6d6c 2361 3363 3262 6432 3832 3231 3436 ml#a3c2bd2822146\n-001716d0: 6138 6363 6361 3230 6638 6632 3137 6332 a8ccca20f8f217c2\n-001716e0: 6633 3039 2220 7469 746c 653d 2254 6865 f309\" title=\"The\n-001716f0: 2063 6c69 656e 7420 7265 7175 6573 7420 client request \n-00171700: 7061 7468 2061 7320 7265 6365 6976 6564 path as received\n-00171710: 206f 6e20 7468 6520 7365 7276 6572 2073 on the server s\n-00171720: 6964 652e 223e 736f 6170 3a3a 7061 7468 ide.\">soap::path\n-00171730: 3c2f 613e 3c2f 636f 6465 3e20 7661 6c75 valu\n-00171740: 6573 2077 6974 6820 6120 3c63 6f64 653e es with a \n-00171750: 2f3c 2f63 6f64 653e 206f 7220 6120 3c63 / or a \\ (soap:\n-00171800: 3a70 6174 683c 2f61 3e3c 2f63 6f64 653e :path\n-00171810: 2069 7320 6120 7374 7269 6e67 2077 6974 is a string wit\n-00171820: 6820 7468 6520 7061 7468 2070 6172 7420 h the path part \n-00171830: 6f66 2074 6865 2055 524c 2c20 7374 6172 of the URL, star\n-00171840: 7469 6e67 2077 6974 6820 6120 3c63 6f64 ting with a /). If \n-00171860: 7468 6573 6520 6172 6520 616c 6c6f 7765 these are allowe\n-00171870: 642c 2074 6865 6e20 7765 206d 7573 7420 d, then we must \n-00171880: 6174 206c 6561 7374 2063 6865 636b 2066 at least check f\n-00171890: 6f72 203c 636f 6465 3e2e 2e3c 2f63 6f64 or .. in the path t\n-001718b0: 6f20 6176 6f69 6420 7265 7175 6573 7420 o avoid request \n-001718c0: 6672 6f6d 2073 6e6f 6f70 696e 6720 6172 from snooping ar\n-001718d0: 6f75 6e64 2069 6e20 6869 6768 6572 2064 ound in higher d\n-001718e0: 6972 6563 746f 7269 6573 2061 6c6c 2074 irectories all t\n-001718f0: 6865 2077 6179 2075 7020 746f 2074 6865 he way up to the\n-00171900: 2072 6f6f 742e 3c2f 6464 3e3c 2f64 6c3e root.
    \n-00171910: 0a3c 703e 466f 7220 6120 6f6e 652d 7761 .

    For a one-wa\n-00171920: 7920 534f 4150 2f58 4d4c 206d 6573 7361 y SOAP/XML messa\n-00171930: 6765 2c20 796f 7520 6361 6e20 616c 736f ge, you can also\n-00171940: 2072 6574 7572 6e20 6120 534f 4150 2f58 return a SOAP/X\n-00171950: 4d4c 2072 6573 706f 6e73 653a 3c2f 703e ML response:

    \n-00171960: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ht\n-00171a00: 7470 5f67 6574 3c2f 613e 283c 7370 616e tp_get(struct <\n-00171a30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00171a40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00171a50: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-00171a60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00171a90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap_respo\n-00171b20: 6e73 653c 2f61 3e28 3c61 2063 6c61 7373 nse(s\n-00171b50: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, SOA\n-00171bb0: 505f 4f4b 3c2f 613e 293b 203c 2f64 6976 P_OK); .
    \n-00171bf0: 7265 7475 726e 3c2f 7370 616e 3e20 736f return so\n-00171c00: 6170 5f73 656e 645f 6e73 315f 5f6d 7953 ap_send_ns1__myS\n-00171c10: 656e 644d 6574 686f 6452 6573 706f 6e73 endMethodRespons\n-00171c20: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap, &\n-00171c70: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;", NULL, ... pa\n-00171c90: 7261 6d73 202e 2e2e 293b 203c 2f64 6976 rams ...); .
    }
    .

    where ns1__mySendMe\n-00171cf0: 7468 6f64 5265 7370 6f6e 7365 3c2f 636f thodResponse is a one-way\n-00171d10: 206d 6573 7361 6765 2064 6563 6c61 7265 message declare\n-00171d20: 6420 696e 2061 2069 6e74 6572 6661 6365 d in a interface\n-00171d30: 2068 6561 6465 7220 6669 6c65 2061 733a header file as:\n-00171d40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int ns1__mySendMet\n-00171da0: 686f 6452 6573 706f 6e73 6528 2e2e 2e20 hodResponse(... \n-00171db0: 7061 7261 6d73 202e 2e2e 2c20 3c73 7061 params ..., void);
    .
    \n-00171df0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-001727a0: 703e 7768 6572 652c 2066 6f72 2065 7861 p>where, for exa\n-001727b0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    \n-001727d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-00172800: 3c2f 7370 616e 3e20 7369 6770 6970 655f sigpipe_\n-00172810: 6861 6e64 6c65 283c 7370 616e 2063 6c61 handle(int x) {\n-00172840: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e3c }
    .
    <\n-00172850: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00172860: 3c70 3e41 6c74 6572 6e61 7469 7665 6c79

    Alternatively\n-00172870: 2c20 6272 6f6b 656e 2070 6970 6573 2063 , broken pipes c\n-00172880: 616e 2062 6520 6b65 7074 2073 696c 656e an be kept silen\n-00172890: 7420 6279 2073 6574 7469 6e67 3a3c 2f70 t by setting:.

    .
    <\n-00172a20: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00172a30: 6922 3e69 6e74 2073 6f63 6b65 745f 666c i\">int socket_fl\n-00172a40: 6167 733c 2f64 6976 3e3c 6469 7620 636c ags
    User\n-00172a60: 2d64 6566 696e 6162 6c65 2073 6f63 6b65 -definable socke\n-00172a70: 7420 7365 6e64 2061 6e64 2072 6563 7620 t send and recv \n-00172a80: 666c 6167 732c 2066 6f72 2065 7861 6d70 flags, for examp\n-00172a90: 6c65 2061 7373 6967 6e20 4d53 475f 4e4f le assign MSG_NO\n-00172aa0: 5349 474e 414c 2074 6f20 6469 7361 626c SIGNAL to disabl\n-00172ab0: 6520 7369 6770 6970 6520 2874 6865 2076 e sigpipe (the v\n-00172ac0: 612e 2e2e 3c2f 6469 763e 3c64 6976 2063 a...
    \n-00172ae0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00172af0: 7374 6473 6f61 7032 2e68 3a33 3335 393c stdsoap2.h:3359<\n-00172b00: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    This setti\n-00172b30: 6e67 2077 696c 6c20 6e6f 7420 6765 6e65 ng will not gene\n-00172b40: 7261 7465 2061 2053 4947 5049 5045 2062 rate a SIGPIPE b\n-00172b50: 7574 2072 6561 642f 7772 6974 6520 6f70 ut read/write op\n-00172b60: 6572 6174 696f 6e73 2072 6574 7572 6e20 erations return \n-00172b70: 3c63 6f64 653e 2353 4f41 505f 454f 463c #SOAP_EOF<\n-00172b80: 2f63 6f64 653e 2069 6e73 7465 6164 2e20 /code> instead. \n-00172b90: 4e6f 7465 2074 6861 7420 5769 6e64 6f77 Note that Window\n-00172ba0: 7320 646f 6573 206e 6f74 2073 7570 706f s does not suppo\n-00172bb0: 7274 2073 6967 6e61 6c73 2061 6e64 206c rt signals and l\n-00172bc0: 6163 6b20 7468 6520 3c63 6f64 653e 4d53 ack the MS\n-00172bd0: 475f 4e4f 5349 474e 414c 3c2f 636f 6465 G_NOSIGNAL flag.

    .

    I\n-00172bf0: 6620 7468 6520 636c 6965 6e74 2064 6f65 f the client doe\n-00172c00: 7320 6e6f 7420 636c 6f73 6520 7468 6520 s not close the \n-00172c10: 636f 6e6e 6563 7469 6f6e 2c20 7468 6520 connection, the \n-00172c20: 7365 7276 6572 2077 696c 6c20 7761 6974 server will wait\n-00172c30: 2066 6f72 6576 6572 2077 6865 6e20 6e6f forever when no\n-00172c40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::recv_tim\n-00172d00: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout \n-00172d10: 6973 2073 7065 6369 6669 6564 2c20 736f is specified, so\n-00172d20: 2062 6520 6361 7265 6675 6c20 746f 2073 be careful to s\n-00172d30: 6574 2074 696d 656f 7574 732c 2053 6565 et timeouts, See\n-00172d40: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Timeout managem\n-00172d80: 656e 7420 666f 7220 6e6f 6e2d 626c 6f63 ent for non-bloc\n-00172d90: 6b69 6e67 206f 7065 7261 7469 6f6e 733c king operations<\n-00172da0: 2f61 3e2e 2049 6e20 6164 6469 7469 6f6e /a>. In addition\n-00172db0: 2c20 6f74 6865 7220 636c 6965 6e74 7320 , other clients \n-00172dc0: 7769 6c6c 2062 6520 6465 6e69 6564 2073 will be denied s\n-00172dd0: 6572 7669 6365 2061 7320 6c6f 6e67 2061 ervice as long a\n-00172de0: 7320 6120 636c 6965 6e74 206b 6565 7073 s a client keeps\n-00172df0: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection \n-00172e00: 746f 2074 6865 2073 6572 7665 7220 6f70 to the server op\n-00172e10: 656e 2e20 546f 2070 7265 7665 6e74 2074 en. To prevent t\n-00172e20: 6869 7320 6672 6f6d 2068 6170 7065 6e69 his from happeni\n-00172e30: 6e67 2c20 7468 6520 7365 7276 6963 6520 ng, the service \n-00172e40: 7368 6f75 6c64 2062 6520 6d75 6c74 692d should be multi-\n-00172e50: 7468 7265 6164 6564 2073 7563 6820 7468 threaded such th\n-00172e60: 6174 2065 6163 6820 7468 7265 6164 2068 at each thread h\n-00172e70: 616e 646c 6573 2074 6865 2063 6c69 656e andles the clien\n-00172e80: 7420 636f 6e6e 6563 7469 6f6e 3a3c 2f70 t connection:.

    \n+00170d20: 4120 736f 6170 5f73 7461 7475 7320 6572 A soap_status er\n+00170d30: 726f 7220 636f 6465 3a20 616e 2048 5454 ror code: an HTT\n+00170d40: 5020 4745 5420 7265 7175 6573 7420 7761 P GET request wa\n+00170d50: 7320 7265 6365 6976 6564 2062 7920 7468 s received by th\n+00170d60: 6520 7365 7276 6963 6520 6275 7420 7468 e service but th\n+00170d70: 6520 4745 5420 7265 7175 6573 7420 6361 e GET request ca\n+00170d80: 6c6c 6261 632e 2e2e 3c2f 6469 763e 3c64 llbac...
    Definition:<\n+00170db0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2\n+00170dc0: 3339 373c 2f64 6976 3e3c 2f64 6976 3e0a 397
    .\n+00170dd0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n+00170e20: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    #d\n+00170ea0: 6566 696e 6520 534f 4150 5f46 494c 453c efine SOAP_FILE<\n+00170eb0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    A specia\n+00170ed0: 6c20 736f 6170 5f73 7461 7475 7320 6572 l soap_status er\n+00170ee0: 726f 7220 636f 6465 2074 6f20 7369 676e ror code to sign\n+00170ef0: 616c 2074 6861 7420 6120 6375 7374 6f6d al that a custom\n+00170f00: 2066 696c 652d 6261 7365 6420 4854 5450 file-based HTTP\n+00170f10: 2072 6573 706f 6e73 6520 6973 2070 7265 response is pre\n+00170f20: 7365 6e74 2061 6e64 206e 6f20 482e 2e2e sent and no H...\n+00170f30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00170f50: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00170f60: 6f61 7032 2e68 3a32 3731 393c 2f64 6976 oap2.h:2719
    .
    s\n+00171020: 6f61 705f 7365 6e64 5f72 6177 3c2f 613e oap_send_raw\n+00171030: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n+00171050: 6170 5f73 656e 645f 7261 7728 7374 7275 ap_send_raw(stru\n+00171060: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+00171070: 6f6e 7374 2063 6861 7220 2a73 2c20 7369 onst char *s, si\n+00171080: 7a65 5f74 206e 293c 2f64 6976 3e3c 6469 ze_t n)
    \n+001710a0: 5365 6e64 2072 6177 2062 7974 6573 2e3c Send raw bytes.<\n+001710b0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    c\n+00171180: 6861 7220 746d 7062 7566 5b53 4f41 505f har tmpbuf[SOAP_\n+00171190: 544d 504c 454e 5d3c 2f64 6976 3e3c 6469 TMPLEN]
    \n+001711b0: 496e 7465 726e 616c 2062 7566 6665 7220 Internal buffer \n+001711c0: 746f 2068 6f6c 6420 7465 6d70 6f72 6172 to hold temporar\n+001711d0: 7920 7374 7269 6e67 7320 7375 6368 2061 y strings such a\n+001711e0: 7320 7374 7269 6e67 2072 6570 7265 7365 s string represe\n+001711f0: 6e74 6174 696f 6e73 206f 6620 7072 696d ntations of prim\n+00171200: 6974 6976 6520 7661 6c75 6573 2c2e 2e2e itive values,...\n+00171210: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00171230: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00171240: 6f61 7032 2e68 3a34 3139 393c 2f64 6976 oap2.h:4199
    .
    const char * ht\n+00171330: 7470 5f63 6f6e 7465 6e74 3c2f 6469 763e tp_content
    \n+00171340: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    String with H\n+00171360: 5454 5020 636f 6e74 656e 7420 7479 7065 TTP content type\n+00171370: 2068 6561 6465 7220 7661 6c75 6520 7265 header value re\n+00171380: 6365 6976 6564 2c20 6361 6e20 616c 736f ceived, can also\n+00171390: 2062 6520 6173 7369 676e 6564 2074 6f20 be assigned to \n+001713a0: 7370 6563 6966 7920 6120 636f 6e74 656e specify a conten\n+001713b0: 7420 7479 7065 2068 2e2e 2e3c 2f64 6976 t type h...
    Definitio\n+001713e0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+001713f0: 683a 3239 3830 3c2f 6469 763e 3c2f 6469 h:2980
    .

    Thi\n+00171420: 7320 6578 616d 706c 6520 7368 6f77 7320 s example shows \n+00171430: 686f 7720 6f6e 6520 7072 6564 6574 6572 how one predeter\n+00171440: 6d69 6e65 6420 6669 6c65 2069 7320 7365 mined file is se\n+00171450: 7276 6564 2e20 5468 6520 3c65 6d3e 3c63 rved. The gsoap/sample\n+00171470: 732f 7765 6273 6572 7665 723c 2f63 6f64 s/webserver demonstr\n+00171490: 6174 6573 2068 6f77 2066 696c 6573 2073 ates how files s\n+001714a0: 686f 756c 6420 6265 2073 6572 7665 6420 hould be served \n+001714b0: 696e 2067 656e 6572 616c 2c20 6279 2061 in general, by a\n+001714c0: 6464 696e 6720 7468 6520 6e65 6365 7373 dding the necess\n+001714d0: 6172 7920 6c6f 6769 6320 746f 2061 6464 ary logic to add\n+001714e0: 206d 6564 6961 2074 7970 6573 2074 6f20 media types to \n+001714f0: 4854 5450 2068 6561 6465 7273 2061 6e64 HTTP headers and\n+00171500: 2074 6f20 7265 7374 7269 6374 2074 6865 to restrict the\n+00171510: 2073 656c 6563 7469 6f6e 206f 6620 6669 selection of fi\n+00171520: 6c65 7320 7468 6174 2073 686f 756c 6420 les that should \n+00171530: 6265 2073 6572 7665 642e 3c2f 703e 0a3c be served.

    .<\n+00171540: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class=\"sectio\n+00171550: 6e20 7761 726e 696e 6722 3e3c 6474 3e57 n warning\">
    W\n+00171560: 6172 6e69 6e67 3c2f 6474 3e3c 6464 3e57 arning
    W\n+00171570: 6865 6e20 7365 7276 696e 6720 6669 6c65 hen serving file\n+00171580: 7320 6173 2072 6573 706f 6e73 6573 2074 s as responses t\n+00171590: 6f20 7265 7175 6573 7473 2c20 7765 206e o requests, we n\n+001715a0: 6565 6420 746f 2062 6520 7661 7279 2063 eed to be vary c\n+001715b0: 6172 6566 756c 2c20 6265 6361 7573 6520 areful, because \n+001715c0: 7765 2064 6f6e 2774 2077 616e 7420 7265 we don't want re\n+001715d0: 7175 6573 7473 2074 6f20 736e 6f6f 7020 quests to snoop \n+001715e0: 6172 6f75 6e64 2069 6e20 6469 7265 6374 around in direct\n+001715f0: 6f72 6965 7320 616e 6420 7365 7276 6520 ories and serve \n+00171600: 6669 6c65 7320 7468 6174 2073 686f 756c files that shoul\n+00171610: 6420 6265 2070 726f 7465 6374 6564 2066 d be protected f\n+00171620: 726f 6d20 7075 626c 6963 2076 6965 772e rom public view.\n+00171630: 2054 6865 7265 666f 7265 2c20 7768 656e Therefore, when\n+00171640: 2061 6464 696e 6720 6c6f 6769 6320 746f adding logic to\n+00171650: 2073 6572 7665 2066 696c 6573 2c20 7765 serve files, we\n+00171660: 206d 7573 7420 7265 6a65 6374 2072 6571 must reject req\n+00171670: 7565 7374 2074 6861 7420 6861 7665 203c uest that have <\n+00171680: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+00171710: 3a3a 7061 7468 3c2f 613e 3c2f 636f 6465 ::path values with a \n+00171730: 3c63 6f64 653e 2f3c 2f63 6f64 653e 206f / o\n+00171740: 7220 6120 3c63 6f64 653e 5c3c 2f63 6f64 r a \\ (soap::path<\n+001717f0: 2f63 6f64 653e 2069 7320 6120 7374 7269 /code> is a stri\n+00171800: 6e67 2077 6974 6820 7468 6520 7061 7468 ng with the path\n+00171810: 2070 6172 7420 6f66 2074 6865 2055 524c part of the URL\n+00171820: 2c20 7374 6172 7469 6e67 2077 6974 6820 , starting with \n+00171830: 6120 3c63 6f64 653e 2f3c 2f63 6f64 653e a /\n+00171840: 292e 2049 6620 7468 6573 6520 6172 6520 ). If these are \n+00171850: 616c 6c6f 7765 642c 2074 6865 6e20 7765 allowed, then we\n+00171860: 206d 7573 7420 6174 206c 6561 7374 2063 must at least c\n+00171870: 6865 636b 2066 6f72 203c 636f 6465 3e2e heck for .\n+00171880: 2e3c 2f63 6f64 653e 2069 6e20 7468 6520 . in the \n+00171890: 7061 7468 2074 6f20 6176 6f69 6420 7265 path to avoid re\n+001718a0: 7175 6573 7420 6672 6f6d 2073 6e6f 6f70 quest from snoop\n+001718b0: 696e 6720 6172 6f75 6e64 2069 6e20 6869 ing around in hi\n+001718c0: 6768 6572 2064 6972 6563 746f 7269 6573 gher directories\n+001718d0: 2061 6c6c 2074 6865 2077 6179 2075 7020 all the way up \n+001718e0: 746f 2074 6865 2072 6f6f 742e 3c2f 6464 to the root..

    For a \n+00171900: 6f6e 652d 7761 7920 534f 4150 2f58 4d4c one-way SOAP/XML\n+00171910: 206d 6573 7361 6765 2c20 796f 7520 6361 message, you ca\n+00171920: 6e20 616c 736f 2072 6574 7572 6e20 6120 n also return a \n+00171930: 534f 4150 2f58 4d4c 2072 6573 706f 6e73 SOAP/XML respons\n+00171940: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+00171970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00171980: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int http_get\n+001719f0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+00171a40: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00171a70: 703c 2f61 3e29 203c 2f64 6976 3e0a 3c64 p)
    .\n+00171a90: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap\n+00171b00: 5f72 6573 706f 6e73 653c 2f61 3e28 3c61 _response(soap, <\n+00171b40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00171b50: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00171b60: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+00171b70: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n+00171b80: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n+00171b90: 3022 3e53 4f41 505f 4f4b 3c2f 613e 293b 0\">SOAP_OK);\n+00171ba0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return soap_send_ns\n+00171bf0: 315f 5f6d 7953 656e 644d 6574 686f 6452 1__mySendMethodR\n+00171c00: 6573 706f 6e73 6528 3c61 2063 6c61 7373 esponse(s\n+00171c30: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, ""\n+00171c60: 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c 2c20 ;, NULL, \n+00171c70: 2e2e 2e20 7061 7261 6d73 202e 2e2e 293b ... params ...);\n+00171c80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .

    whe\n+00171cc0: 7265 203c 636f 6465 3e6e 7331 5f5f 6d79 re ns1__my\n+00171cd0: 5365 6e64 4d65 7468 6f64 5265 7370 6f6e SendMethodRespon\n+00171ce0: 7365 3c2f 636f 6465 3e20 6973 2061 206f se is a o\n+00171cf0: 6e65 2d77 6179 206d 6573 7361 6765 2064 ne-way message d\n+00171d00: 6563 6c61 7265 6420 696e 2061 2069 6e74 eclared in a int\n+00171d10: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+00171d20: 6c65 2061 733a 3c2f 703e 0a3c 6469 7620 le as:

    .
    int\n+00171d70: 3c2f 7370 616e 3e20 6e73 315f 5f6d 7953 ns1__myS\n+00171d80: 656e 644d 6574 686f 6452 6573 706f 6e73 endMethodRespons\n+00171d90: 6528 2e2e 2e20 7061 7261 6d73 202e 2e2e e(... params ...\n+00171da0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void\n+00171dc0: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    .\n+00171dd0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ge\n+00171df0: 6e65 7261 7465 6420 3c65 6d3e 3c63 6f64 nerated soapClient.cpp\n+00171e10: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 6e63 inc\n+00171e20: 6c75 6465 7320 7468 6520 7365 6e64 696e ludes the sendin\n+00171e30: 672d 7369 6465 2073 7475 6220 6675 6e63 g-side stub func\n+00171e40: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 6865 tion.

    .

    The\n+00171e50: 2065 7861 6d70 6c65 7320 6162 6f76 6520 examples above \n+00171e60: 6172 6520 666f 7220 4854 5450 2047 4554 are for HTTP GET\n+00171e70: 2e20 546f 2069 6d70 6c65 6d65 6e74 2048 . To implement H\n+00171e80: 5454 5020 5055 5420 616e 6420 5041 5443 TTP PUT and PATC\n+00171e90: 4820 7365 7420 7468 6520 3c63 6f64 653e H set the \n+00171ea0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fput\n+00171f70: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap::fp\n+00172050: 6174 6368 3c2f 613e 3c2f 636f 6465 3e20 atch \n+00172060: 6361 6c6c 6261 636b 2066 756e 6374 696f callback functio\n+00172070: 6e73 206f 7220 7573 6520 7468 6520 3c63 ns or use the http_post<\n+00172110: 2f61 3e3c 2f63 6f64 653e 2070 6c75 6769 /a> plugi\n+00172120: 6e20 7768 6963 6820 6973 206d 6f72 6520 n which is more \n+00172130: 6361 7061 626c 652e 3c2f 703e 0a3c 703e capable.

    .

    \n+00172140: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+00172160: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .TCP\n+001721a0: 2061 6e64 2048 5454 5020 6b65 6570 2d61 and HTTP keep-a\n+001721b0: 6c69 7665 3c2f 6832 3e0a 3c70 3e54 6f20 live

    .

    To \n+001721c0: 6163 7469 7661 7465 2048 5454 5020 6b65 activate HTTP ke\n+001721d0: 6570 2d61 6c69 7665 2c20 7365 7420 7468 ep-alive, set th\n+001721e0: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO\n+001721f0: 5f4b 4545 5041 4c49 5645 3c2f 636f 6465 _KEEPALIVE flag for both \n+00172210: 696e 7075 7420 616e 6420 6f75 7470 7574 input and output\n+00172220: 206d 6f64 6573 2c20 7365 6520 5365 6374 modes, see Sect\n+00172230: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Run-ti\n+00172260: 6d65 2066 6c61 6773 3c2f 613e 202e 2046 me flags . F\n+00172270: 6f72 2065 7861 6d70 6c65 3c2f 703e 0a3c or example

    .<\n+00172280: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00172290: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+001722c0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    soap_i\n+001723a0: 6e69 7431 3c2f 613e 2826 616d 703b 3c61 nit1(&soap, <\n+001723e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001723f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00172400: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n+00172410: 3061 3436 3335 3733 3737 3332 6339 3132 0a4635737732c912\n+00172420: 3035 3866 6634 6462 6136 3638 6331 6232 058ff4dba668c1b2\n+00172430: 223e 534f 4150 5f49 4f5f 4b45 4550 414c \">SOAP_IO_KEEPAL\n+00172440: 4956 453c 2f61 3e29 3b20 3c2f 6469 763e IVE);
    \n+00172450: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    When \n+00172470: 6120 636c 6965 6e74 206f 7220 6120 7365 a client or a se\n+00172480: 7276 6963 6520 636f 6d6d 756e 6963 6174 rvice communicat\n+00172490: 6573 2077 6974 6820 616e 6f74 6865 7220 es with another \n+001724a0: 636c 6965 6e74 206f 7220 7365 7276 6963 client or servic\n+001724b0: 6520 7468 6174 2073 7570 706f 7274 7320 e that supports \n+001724c0: 6b65 6570 2061 6c69 7665 2c20 7468 6520 keep alive, the \n+001724d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::keep_a\n+00172590: 6c69 7665 3c2f 613e 3c2f 636f 6465 3e20 live \n+001725a0: 7661 7269 6162 6c65 2077 696c 6c20 6265 variable will be\n+001725b0: 2073 6574 2074 6f20 312c 206f 7468 6572 set to 1, other\n+001725c0: 7769 7365 2069 7420 6973 2072 6573 6574 wise it is reset\n+001725d0: 2074 6f20 3020 696e 6469 6361 7469 6e67 to 0 indicating\n+001725e0: 2074 6861 7420 7468 6520 6f74 6865 7220 that the other \n+001725f0: 7061 7274 7920 7761 6e74 7320 746f 2063 party wants to c\n+00172600: 6c6f 7365 2074 6865 2063 6f6e 6e65 6374 lose the connect\n+00172610: 696f 6e2e 2054 6865 2063 6f6e 6e65 6374 ion. The connect\n+00172620: 696f 6e20 6d61 7962 6520 7465 726d 696e ion maybe termin\n+00172630: 6174 6564 206f 6e20 6569 7468 6572 2065 ated on either e\n+00172640: 6e64 2062 6566 6f72 6520 7468 6520 636f nd before the co\n+00172650: 6d6d 756e 6963 6174 696f 6e20 636f 6d70 mmunication comp\n+00172660: 6c65 7465 642c 2066 6f72 2065 7861 6d70 leted, for examp\n+00172670: 6c65 2077 6865 6e20 7468 6520 7365 7276 le when the serv\n+00172680: 6572 206b 6565 702d 616c 6976 6520 636f er keep-alive co\n+00172690: 6e6e 6563 7469 6f6e 2068 6173 2074 696d nnection has tim\n+001726a0: 6564 206f 7574 2e20 5468 6973 206d 6179 ed out. This may\n+001726b0: 2067 656e 6572 6174 6520 6120 2242 726f generate a \"Bro\n+001726c0: 6b65 6e20 5069 7065 2220 7369 676e 616c ken Pipe\" signal\n+001726d0: 206f 6e20 556e 6978 2f4c 696e 7578 2070 on Unix/Linux p\n+001726e0: 6c61 7466 6f72 6d73 2e20 5468 6973 2073 latforms. This s\n+001726f0: 6967 6e61 6c20 6361 6e20 6265 2063 6175 ignal can be cau\n+00172700: 6768 7420 7769 7468 2061 2073 6967 6e61 ght with a signa\n+00172710: 6c20 6861 6e64 6c65 723a 3c2f 703e 0a3c l handler:

    .<\n+00172720: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00172730: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    signal(SI\n+00172750: 4750 4950 452c 2073 6967 7069 7065 5f68 GPIPE, sigpipe_h\n+00172760: 616e 646c 6529 3b3c 2f64 6976 3e0a 3c2f andle);
    .

    where, f\n+00172790: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n+001727a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    void si\n+001727f0: 6770 6970 655f 6861 6e64 6c65 283c 7370 gpipe_handle(int x) { }
    .<\n+00172830: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Alterna\n+00172850: 7469 7665 6c79 2c20 6272 6f6b 656e 2070 tively, broken p\n+00172860: 6970 6573 2063 616e 2062 6520 6b65 7074 ipes can be kept\n+00172870: 2073 696c 656e 7420 6279 2073 6574 7469 silent by setti\n+00172880: 6e67 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ng:

    .
    \n+001728b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+001728e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 socket_\n+00172930: 666c 6167 733c 2f61 3e20 3d20 4d53 475f flags = MSG_\n+00172940: 4e4f 5349 474e 414c 3b3c 2f64 6976 3e0a NOSIGNAL;
    .\n+00172950: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::s\n+001729f0: 6f63 6b65 745f 666c 6167 733c 2f61 3e3c ocket_flags<\n+00172a00: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soc\n+00172a20: 6b65 745f 666c 6167 733c 2f64 6976 3e3c ket_flags
    <\n+00172a30: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00172a40: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+00172a50: 2073 6f63 6b65 7420 7365 6e64 2061 6e64 socket send and\n+00172a60: 2072 6563 7620 666c 6167 732c 2066 6f72 recv flags, for\n+00172a70: 2065 7861 6d70 6c65 2061 7373 6967 6e20 example assign \n+00172a80: 4d53 475f 4e4f 5349 474e 414c 2074 6f20 MSG_NOSIGNAL to \n+00172a90: 6469 7361 626c 6520 7369 6770 6970 6520 disable sigpipe \n+00172aa0: 2874 6865 2076 612e 2e2e 3c2f 6469 763e (the va...
    \n+00172ab0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00172ad0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00172ae0: 3a33 3335 393c 2f64 6976 3e3c 2f64 6976 :3359
    .

    This\n+00172b10: 2073 6574 7469 6e67 2077 696c 6c20 6e6f setting will no\n+00172b20: 7420 6765 6e65 7261 7465 2061 2053 4947 t generate a SIG\n+00172b30: 5049 5045 2062 7574 2072 6561 642f 7772 PIPE but read/wr\n+00172b40: 6974 6520 6f70 6572 6174 696f 6e73 2072 ite operations r\n+00172b50: 6574 7572 6e20 3c63 6f64 653e 2353 4f41 eturn #SOA\n+00172b60: 505f 454f 463c 2f63 6f64 653e 2069 6e73 P_EOF ins\n+00172b70: 7465 6164 2e20 4e6f 7465 2074 6861 7420 tead. Note that \n+00172b80: 5769 6e64 6f77 7320 646f 6573 206e 6f74 Windows does not\n+00172b90: 2073 7570 706f 7274 2073 6967 6e61 6c73 support signals\n+00172ba0: 2061 6e64 206c 6163 6b20 7468 6520 3c63 and lack the MSG_NOSIGNAL\n+00172bc0: 3c2f 636f 6465 3e20 666c 6167 2e3c 2f70 flag..

    If the clie\n+00172be0: 6e74 2064 6f65 7320 6e6f 7420 636c 6f73 nt does not clos\n+00172bf0: 6520 7468 6520 636f 6e6e 6563 7469 6f6e e the connection\n+00172c00: 2c20 7468 6520 7365 7276 6572 2077 696c , the server wil\n+00172c10: 6c20 7761 6974 2066 6f72 6576 6572 2077 l wait forever w\n+00172c20: 6865 6e20 6e6f 203c 636f 6465 3e3c 6120 hen no soap::re\n+00172ce0: 6376 5f74 696d 656f 7574 3c2f 613e 3c2f cv_timeout is specifi\n+00172d00: 6564 2c20 736f 2062 6520 6361 7265 6675 ed, so be carefu\n+00172d10: 6c20 746f 2073 6574 2074 696d 656f 7574 l to set timeout\n+00172d20: 732c 2053 6565 2053 6563 7469 6f6e 203c s, See Section <\n+00172d30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00172d40: 663d 2269 6e64 6578 2e68 746d 6c23 7469 f=\"index.html#ti\n+00172d50: 6d65 6f75 7422 3e54 696d 656f 7574 206d meout\">Timeout m\n+00172d60: 616e 6167 656d 656e 7420 666f 7220 6e6f anagement for no\n+00172d70: 6e2d 626c 6f63 6b69 6e67 206f 7065 7261 n-blocking opera\n+00172d80: 7469 6f6e 733c 2f61 3e2e 2049 6e20 6164 tions. In ad\n+00172d90: 6469 7469 6f6e 2c20 6f74 6865 7220 636c dition, other cl\n+00172da0: 6965 6e74 7320 7769 6c6c 2062 6520 6465 ients will be de\n+00172db0: 6e69 6564 2073 6572 7669 6365 2061 7320 nied service as \n+00172dc0: 6c6f 6e67 2061 7320 6120 636c 6965 6e74 long as a client\n+00172dd0: 206b 6565 7073 2074 6865 2063 6f6e 6e65 keeps the conne\n+00172de0: 6374 696f 6e20 746f 2074 6865 2073 6572 ction to the ser\n+00172df0: 7665 7220 6f70 656e 2e20 546f 2070 7265 ver open. To pre\n+00172e00: 7665 6e74 2074 6869 7320 6672 6f6d 2068 vent this from h\n+00172e10: 6170 7065 6e69 6e67 2c20 7468 6520 7365 appening, the se\n+00172e20: 7276 6963 6520 7368 6f75 6c64 2062 6520 rvice should be \n+00172e30: 6d75 6c74 692d 7468 7265 6164 6564 2073 multi-threaded s\n+00172e40: 7563 6820 7468 6174 2065 6163 6820 7468 uch that each th\n+00172e50: 7265 6164 2068 616e 646c 6573 2074 6865 read handles the\n+00172e60: 2063 6c69 656e 7420 636f 6e6e 6563 7469 client connecti\n+00172e70: 6f6e 3a3c 2f70 3e0a 3c64 6976 2063 6c61 on:

    .
    \n+00172ea0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int main(int a\n+00172ef0: 7267 632c 203c 7370 616e 2063 6c61 7373 rgc, c\n+00172f10: 6861 723c 2f73 7061 6e3e 202a 2a61 7267 har **arg\n+00172f20: 7629 203c 2f64 6976 3e0a 3c64 6976 2063 v)
    .
    {.
    {
    .\n-00172f70: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-00172f90: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-00172fc0: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa\n-00172ff0: 703c 2f61 3e2c 202a 7473 6f61 703b 203c p, *tsoap; <\n-00173000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    T\n-00173070: 4852 4541 445f 5459 5045 3c2f 613e 2074 HREAD_TYPE t\n-00173080: 6964 3b20 3c2f 6469 763e 0a3c 6469 7620 id;
    .
    <\n-001730a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001730b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int m, s;
    \n-001730d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_i\n-00173140: 6e69 7432 3c2f 613e 2826 616d 703b 3c61 nit2(&soap, <\n-00173180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00173190: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001731a0: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n-001731b0: 3061 3436 3335 3733 3737 3332 6339 3132 0a4635737732c912\n-001731c0: 3035 3866 6634 6462 6136 3638 6331 6232 058ff4dba668c1b2\n-001731d0: 223e 534f 4150 5f49 4f5f 4b45 4550 414c \">SOAP_IO_KEEPAL\n-001731e0: 4956 453c 2f61 3e2c 203c 6120 636c 6173 IVE, SOAP\n-00173240: 5f49 4f5f 4b45 4550 414c 4956 453c 2f61 _IO_KEEPALIVE);
    .
    <\n-00173270: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00173280: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00173290: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-001732a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001732b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001732c0: 6874 6d6c 2361 3164 3761 6361 3661 6331 html#a1d7aca6ac1\n-001732d0: 6436 3233 3032 3130 3263 3137 3530 3861 d62302102c17508a\n-001732e0: 3862 3065 6330 223e 6d61 785f 6b65 6570 8b0ec0\">max_keep\n-001732f0: 5f61 6c69 7665 3c2f 613e 203d 2031 3030 _alive = 100\n-00173300: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // at mo\n-00173320: 7374 2031 3030 2063 616c 6c73 2070 6572 st 100 calls per\n-00173330: 206b 6565 702d 616c 6976 6520 7365 7373 keep-alive sess\n-00173340: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion ..\n-00173470: 2020 6d20 3d20 3c61 2063 6c61 7373 3d22 m = soap_bind<\n-001734d0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-00173500: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n-00173510: 3138 3030 302c 2042 4143 4b4c 4f47 293b 18000, BACKLOG);\n-00173520: 203c 7370 616e 2063 6c61 7373 3d22 636f // use po\n-00173540: 7274 2031 3830 3030 206f 6e20 7468 6520 rt 18000 on the \n-00173550: 6375 7272 656e 7420 6d61 6368 696e 6520 current machine \n-00173560: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00173580: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!soap_v\n-00173600: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket(\n-00173610: 6d29 2920 3c2f 6469 763e 0a3c 6469 7620 m))
    .
    {\n-00173630: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    \n-00173710: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n-00173720: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    . \n-00173740: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    fpr\n-00173760: 696e 7466 2873 7464 6572 722c 203c 7370 intf(stderr, "S\n-00173790: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n-001737a0: 2073 7563 6365 7373 6675 6c20 2564 5c6e successful %d\\n\n-001737b0: 2671 756f 743b 3c2f 7370 616e 3e2c 206d ", m\n-001737c0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    for (cou\n-00173850: 6e74 3c2f 613e 203d 2030 3b20 3c61 2063 nt = 0; count &\n-001738b0: 6774 3b3d 2030 3b20 3c61 2063 6c61 7373 gt;= 0; count++) .
    {
    \n-00173930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n-00173970: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n-001739c0: 736f 636b 6574 5f66 6c61 6773 3c2f 613e socket_flags\n-001739d0: 203d 204d 5347 5f4e 4f53 4947 4e41 4c3b = MSG_NOSIGNAL;\n-001739e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // use th\n-00173a00: 6973 203c 2f73 7061 6e3e 3c2f 6469 763e is
    \n-00173a10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n-00173a50: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n-00173aa0: 6163 6365 7074 5f66 6c61 6773 3c2f 613e accept_flags\n-00173ab0: 203d 2053 4f5f 4e4f 5349 4750 4950 453b = SO_NOSIGPIPE;\n-00173ac0: 203c 7370 616e 2063 6c61 7373 3d22 636f // or thi\n-00173ae0: 7320 746f 2070 7265 7665 6e74 2053 4947 s to prevent SIG\n-00173af0: 5049 5045 203c 2f73 7061 6e3e 3c2f 6469 PIPE .
    s = soa\n-00173b70: 705f 6163 6365 7074 3c2f 613e 2826 616d p_accept(&am\n-00173b80: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    ..
    {\n-00173c80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    f\n-00173ca0: 7072 696e 7466 2873 7464 6572 722c 203c printf(stderr, <\n-00173cb0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00173cc0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00173cd0: 3b41 6363 6570 7420 736f 636b 6574 2025 ;Accept socket %\n-00173ce0: 6420 636f 6e6e 6563 7469 6f6e 2066 726f d connection fro\n-00173cf0: 6d20 4950 2025 642e 2564 2e25 642e 2564 m IP %d.%d.%d.%d\n-00173d00: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n-00173d10: 2073 2c20 283c 7370 616e 2063 6c61 7373 s, (i\n-00173d30: 6e74 3c2f 7370 616e 3e29 283c 6120 636c nt)(soap.ip>&g\n-00173dc0: 743b 3234 2926 616d 703b 3078 4646 2c20 t;24)&0xFF, \n-00173dd0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int)(so\n-00173e20: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n-00173e70: 6970 3c2f 613e 2667 743b 2667 743b 3136 ip>>16\n-00173e80: 2926 616d 703b 3078 4646 2c20 283c 7370 )&0xFF, (int)(soap.ip>>8)&\n-00173f40: 3b30 7846 462c 2028 3c73 7061 6e20 636c ;0xFF, (int)soap.ip&\n-00173ff0: 3b30 7846 4629 3b20 3c2f 6469 763e 0a3c ;0xFF);
    .<\n-00174000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174010: 3e20 2020 2020 2074 736f 6170 203d 203c > tsoap = <\n-00174020: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00174030: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00174040: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-00174050: 6761 6234 6333 6638 6365 3830 6261 6630 gab4c3f8ce80baf0\n-00174060: 6631 6665 6338 6338 3666 3062 6235 3738 f1fec8c86f0bb578\n-00174070: 3861 223e 736f 6170 5f63 6f70 793c 2f61 8a\">soap_copy(&so\n-001740b0: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
    .\n-001740c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (!ts\n-00174100: 6f61 7029 3c2f 6469 763e 0a3c 6469 7620 oap)
    .
    \n-00174120: 2020 2020 203c 6120 636c 6173 733d 2263 soap_force_\n-00174180: 636c 6f73 6573 6f63 6b3c 2f61 3e28 2661 closesock(&a\n-00174190: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    \n-001741e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 els\n-00174200: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n-00174210: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174220: 3e20 2020 2020 2020 203c 7370 616e 2063 > while \n-00174250: 283c 6120 636c 6173 733d 2263 6f64 6522 (
    THREAD_CRE\n-001742b0: 4154 453c 2f61 3e28 2661 6d70 3b74 6964 ATE(&tid\n-001742c0: 2c20 283c 7370 616e 2063 6c61 7373 3d22 , (voi\n-001742e0: 643c 2f73 7061 6e3e 2a28 2a29 283c 7370 d*(*)(void*))process_req\n-00174320: 7565 7374 2c20 283c 7370 616e 2063 6c61 uest, (void*)ts\n-00174350: 6f61 7029 293c 2f64 6976 3e0a 3c64 6976 oap))
    . \n-00174370: 2020 2020 2020 2020 736c 6565 7028 3129 sleep(1)\n-00174380: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // faile\n-001743a0: 642c 2074 7279 2061 6761 696e 3c2f 7370 d, try again
    .
    \n-001743d0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    else if\n-00174430: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n-00174460: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.errnum) // accept fa\n-001744e0: 696c 6564 2c20 7472 7920 6167 6169 6e20 iled, try again \n-001744f0: 6166 7465 7220 3120 7365 636f 6e64 3c2f after 1 second
    . \n-00174520: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-00174540: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-001745a0: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n-001745b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001745c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001745d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001745e0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-001745f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    sleep(1)\n-00174610: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }<\n-00174630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else
    .
    {<\n-00174690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fp\n-001746b0: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, "\n-001746e0: 5365 7276 6572 2074 696d 6564 206f 7574 Server timed out\n-001746f0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e29 \\n")\n-00174700: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n-00174720: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n-00174740: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-00174750: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174760: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    .\n-00174780: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n-001747a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001747b0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-001747c0: 2f73 7061 6e3e 2030 3b20 3c2f 6469 763e /span> 0;
    \n-001747d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n-00174800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    void *p\n-00174840: 726f 6365 7373 5f72 6571 7565 7374 283c rocess_request(<\n-00174850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00174860: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *tsoap) st\n+00172f70: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap, *ts\n+00172fe0: 6f61 703b 203c 2f64 6976 3e0a 3c64 6976 oap;
    . \n+00173000: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_TYPE\n+00173060: 3c2f 613e 2074 6964 3b20 3c2f 6469 763e tid;
    \n+00173070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+001730a0: 6e74 3c2f 7370 616e 3e20 6d2c 2073 3b20 nt m, s; \n+001730b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00173120: 736f 6170 5f69 6e69 7432 3c2f 613e 2826 soap_init2(&\n+00173130: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00173160: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, SOAP_IO_\n+001731c0: 4b45 4550 414c 4956 453c 2f61 3e2c 203c KEEPALIVE, <\n+001731d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001731e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001731f0: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n+00173200: 3061 3436 3335 3733 3737 3332 6339 3132 0a4635737732c912\n+00173210: 3035 3866 6634 6462 6136 3638 6331 6232 058ff4dba668c1b2\n+00173220: 223e 534f 4150 5f49 4f5f 4b45 4550 414c \">SOAP_IO_KEEPAL\n+00173230: 4956 453c 2f61 3e29 3b20 3c2f 6469 763e IVE);
    \n+00173240: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n+00173280: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .ma\n+001732d0: 785f 6b65 6570 5f61 6c69 7665 3c2f 613e x_keep_alive\n+001732e0: 203d 2031 3030 3b20 3c73 7061 6e20 636c = 100; //\n+00173300: 2061 7420 6d6f 7374 2031 3030 2063 616c at most 100 cal\n+00173310: 6c73 2070 6572 206b 6565 702d 616c 6976 ls per keep-aliv\n+00173320: 6520 7365 7373 696f 6e20 3c2f 7370 616e e session
    .
    soap.accept_time\n+001733d0: 6f75 743c 2f61 3e20 3d20 3630 303b 203c out = 600; <\n+001733e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001733f0: 656e 7422 3e2f 2f20 6f70 7469 6f6e 616c ent\">// optional\n+00173400: 3a20 6c65 7420 7365 7276 6572 2074 696d : let server tim\n+00173410: 6520 6f75 7420 6166 7465 7220 7465 6e20 e out after ten \n+00173420: 6d69 6e75 7465 7320 6f66 2069 6e61 6374 minutes of inact\n+00173430: 6976 6974 7920 3c2f 7370 616e 3e3c 2f64 ivity .
    m = soap\n+001734b0: 5f62 696e 643c 2f61 3e28 2661 6d70 3b3c _bind(&<\n+001734c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001734d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001734e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001734f0: 4e55 4c4c 2c20 3138 3030 302c 2042 4143 NULL, 18000, BAC\n+00173500: 4b4c 4f47 293b 203c 7370 616e 2063 6c61 KLOG); // \n+00173520: 7573 6520 706f 7274 2031 3830 3030 206f use port 18000 o\n+00173530: 6e20 7468 6520 6375 7272 656e 7420 6d61 n the current ma\n+00173540: 6368 696e 6520 3c2f 7370 616e 3e3c 2f64 chine .
    if (!\n+001735e0: 736f 6170 5f76 616c 6964 5f73 6f63 6b65 soap_valid_socke\n+001735f0: 743c 2f61 3e28 6d29 2920 3c2f 6469 763e t(m))
    \n+00173600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+00173630: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print\n+00173690: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(&\n+001736a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001736d0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n+001736e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT\n+00173700: 5f46 4149 4c55 5245 293b 203c 2f64 6976 _FAILURE); .
    }
    .<\n+00173730: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00173740: 3e20 2066 7072 696e 7466 2873 7464 6572 > fprintf(stder\n+00173750: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, &\n+00173770: 7175 6f74 3b53 6f63 6b65 7420 636f 6e6e quot;Socket conn\n+00173780: 6563 7469 6f6e 2073 7563 6365 7373 6675 ection successfu\n+00173790: 6c20 2564 5c6e 2671 756f 743b 3c2f 7370 l %d\\n", m);
    .\n+001737b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    fo\n+001737e0: 723c 2f73 7061 6e3e 2028 3c61 2063 6c61 r (count = 0\n+00173840: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; count\n+00173890: 3c2f 613e 2026 6774 3b3d 2030 3b20 3c61 >= 0; count\n+001738f0: 2b2b 2920 3c2f 6469 763e 0a3c 6469 7620 ++)
    .
    {\n+00173910: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.socket_fla\n+001739b0: 6773 3c2f 613e 203d 204d 5347 5f4e 4f53 gs = MSG_NOS\n+001739c0: 4947 4e41 4c3b 203c 7370 616e 2063 6c61 IGNAL; // \n+001739e0: 7573 6520 7468 6973 203c 2f73 7061 6e3e use this \n+001739f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.accept_fla\n+00173a90: 6773 3c2f 613e 203d 2053 4f5f 4e4f 5349 gs = SO_NOSI\n+00173aa0: 4750 4950 453b 203c 7370 616e 2063 6c61 GPIPE; // \n+00173ac0: 6f72 2074 6869 7320 746f 2070 7265 7665 or this to preve\n+00173ad0: 6e74 2053 4947 5049 5045 203c 2f73 7061 nt SIGPIPE
    .
    s\n+00173b00: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_accept(&s\n+00173b90: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n+00173ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n+00173c50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00173c60: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n+00173c80: 2020 2020 2066 7072 696e 7466 2873 7464 fprintf(std\n+00173c90: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "Accept so\n+00173cc0: 636b 6574 2025 6420 636f 6e6e 6563 7469 cket %d connecti\n+00173cd0: 6f6e 2066 726f 6d20 4950 2025 642e 2564 on from IP %d.%d\n+00173ce0: 2e25 642e 2564 5c6e 2671 756f 743b 3c2f .%d.%d\\n", s, (int)\n+00173d20: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00173d50: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .ip\n+00173da0: 2667 743b 2667 743b 3234 2926 616d 703b >>24)&\n+00173db0: 3078 4646 2c20 283c 7370 616e 2063 6c61 0xFF, (int)(soap.ip>\n+00173e60: 2667 743b 3136 2926 616d 703b 3078 4646 >16)&0xFF\n+00173e70: 2c20 283c 7370 616e 2063 6c61 7373 3d22 , (int\n+00173e90: 3c2f 7370 616e 3e29 283c 6120 636c 6173 )(\n+00173ec0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.ip>>\n+00173f20: 3829 2661 6d70 3b30 7846 462c 2028 3c73 8)&0xFF, (int)soap.ip&0xFF); .
    tso\n+00174000: 6170 203d 203c 6120 636c 6173 733d 2263 ap = soap_c\n+00174060: 6f70 793c 2f61 3e28 2661 6d70 3b3c 6120 opy(&soap); <\n+001740a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!tsoap)
    \n+001740f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n+001741b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    else.
    <\n+00174210: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00174220: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (THRE\n+00174290: 4144 5f43 5245 4154 453c 2f61 3e28 2661 AD_CREATE(&a\n+001742a0: 6d70 3b74 6964 2c20 283c 7370 616e 2063 mp;tid, (void*(\n+001742d0: 2a29 283c 7370 616e 2063 6c61 7373 3d22 *)(voi\n+001742f0: 643c 2f73 7061 6e3e 2a29 2970 726f 6365 d*))proce\n+00174300: 7373 5f72 6571 7565 7374 2c20 283c 7370 ss_request, (void*)tsoap)).
    sl\n+00174360: 6565 7028 3129 3b20 3c73 7061 6e20 636c eep(1); //\n+00174380: 2066 6169 6c65 642c 2074 7279 2061 6761 failed, try aga\n+00174390: 696e 3c2f 7370 616e 3e3c 2f64 6976 3e0a in
    .\n+001743a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .\n+001743d0: 2020 2020 3c73 7061 6e20 636c 6173 733d el\n+001743f0: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se if (<\n+00174420: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00174430: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00174440: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+00174450: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00174460: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00174470: 6874 6d6c 2361 3130 6236 3664 3664 3438 html#a10b66d6d48\n+00174480: 3936 3930 6237 6430 6635 3931 6165 3236 9690b7d0f591ae26\n+00174490: 3333 6464 3133 223e 6572 726e 756d 3c2f 33dd13\">errnum) // acc\n+001744c0: 6570 7420 6661 696c 6564 2c20 7472 7920 ept failed, try \n+001744d0: 6167 6169 6e20 6166 7465 7220 3120 7365 again after 1 se\n+001744e0: 636f 6e64 3c2f 7370 616e 3e3c 2f64 6976 cond.
    {
    .\n+00174510: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_\n+00174580: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n+00174590: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+001745c0: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n+001745d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    sl\n+001745f0: 6565 7028 3129 3b3c 2f64 6976 3e0a 3c64 eep(1);
    .\n+00174610: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    . \n+00174630: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+00174650: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00174670: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n+00174690: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde\n+001746a0: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, \n+001746c0: 2671 756f 743b 5365 7276 6572 2074 696d "Server tim\n+001746d0: 6564 206f 7574 5c6e 2671 756f 743b 3c2f ed out\\n");
    .\n+00174700: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+00174720: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c2f break; .
    } .
    }
    \n+00174770: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n+001747a0: 6574 7572 6e3c 2f73 7061 6e3e 2030 3b20 eturn 0; \n+001747b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    .void *process_req\n+00174830: 7565 7374 283c 7370 616e 2063 6c61 7373 uest(v\n+00174850: 6f69 643c 2f73 7061 6e3e 202a 7473 6f61 oid *tsoa\n+00174860: 7029 203c 2f64 6976 3e0a 3c64 6976 2063 p)
    .
    {.
    {
    .\n-001748b0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-001748d0: 2f73 7061 6e3e 2a3c 6120 636c 6173 733d /span>*so\n-00174900: 6170 3c2f 613e 203d 2028 3c73 7061 6e20 ap = (\n-00174920: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap*)t\n-00174960: 736f 6170 3b3c 2f64 6976 3e0a 3c64 6976 soap;
    . \n-00174980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_DETA\n-001749e0: 4348 3c2f 613e 283c 6120 636c 6173 733d CH(THRE\n-00174a40: 4144 5f49 443c 2f61 3e29 3b20 3c2f 6469 AD_ID); .
    ((s\n-00174a80: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap*)soap)-&\n-00174af0: 6774 3b72 6563 765f 7469 6d65 6f75 7420 gt;recv_timeout \n-00174b00: 3d20 3630 3b20 3c73 7061 6e20 636c 6173 = 60; // T\n-00174b20: 696d 656f 7574 2061 6674 6572 2031 206d imeout after 1 m\n-00174b30: 696e 7574 6520 7374 616c 6c20 6f6e 2072 inute stall on r\n-00174b40: 6563 7620 3c2f 7370 616e 3e3c 2f64 6976 ecv .
    ((st\n-00174b80: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap*)soap)-&g\n-00174bf0: 743b 7365 6e64 5f74 696d 656f 7574 203d t;send_timeout =\n-00174c00: 2031 303b 203c 7370 616e 2063 6c61 7373 10; // Ti\n-00174c20: 6d65 6f75 7420 6166 7465 7220 3130 2073 meout after 10 s\n-00174c30: 6563 6f6e 6420 7374 616c 6c20 6f6e 2073 econd stall on s\n-00174c40: 656e 6420 3c2f 7370 616e 3e3c 2f64 6976 end ..\n-00174d10: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n-00174d70: 726f 793c 2f61 3e28 3c61 2063 6c61 7373 roy(s\n-00174da0: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n-00174db0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n-00174e60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-00174f10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-00174f40: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL\n-00174f50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }.
    \n-00174fd0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-00175010: 3a3a 636f 756e 743c 2f61 3e3c 2f64 6976 ::count
    ULONG64 cou\n-00175040: 6e74 3c2f 6469 763e 3c64 6976 2063 6c61 nt
    Messa\n-00175060: 6765 206c 656e 6774 6820 636f 756e 7465 ge length counte\n-00175070: 7220 7661 6c75 6520 6f66 2074 6865 206d r value of the m\n-00175080: 6573 7361 6765 2072 6563 6569 7665 6420 essage received \n-00175090: 616e 6420 636f 756e 7465 7220 7661 6c75 and counter valu\n-001750a0: 6520 6f66 2074 6865 2048 5454 5020 636f e of the HTTP co\n-001750b0: 6e74 656e 7420 6c65 6e67 7468 2068 6561 ntent length hea\n-001750c0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-001750e0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-001750f0: 7464 736f 6170 322e 683a 3432 3034 3c2f tdsoap2.h:4204
    .
    \n-001751c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int accept_f\n-001751e0: 6c61 6773 3c2f 6469 763e 3c64 6976 2063 lags
    Use\n-00175200: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n-00175210: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n-00175220: 5f53 4f43 4b45 5420 666c 6167 7320 2830 _SOCKET flags (0\n-00175230: 2062 7920 6465 6661 756c 7429 2c20 7768 by default), wh\n-00175240: 656e 206e 6f6e 7a65 726f 2073 6574 7320 en nonzero sets \n-00175250: 7468 6520 736f 6170 3a3a 736f 636b 6574 the soap::socket\n-00175260: 2066 2e2e 2e3c 2f64 6976 3e3c 6469 7620 f...
    Definition:\n-00175290: 2073 7464 736f 6170 322e 683a 3334 3533 stdsoap2.h:3453\n-001752a0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    A client \n-001752d0: 6361 6c6c 2077 696c 6c20 6175 746f 6d61 call will automa\n-001752e0: 7469 6361 6c6c 7920 6174 7465 6d70 7420 tically attempt \n-001752f0: 746f 2072 652d 6573 7461 626c 6973 6820 to re-establish \n-00175300: 6120 636f 6e6e 6563 7469 6f6e 2074 6f20 a connection to \n-00175310: 6120 7365 7276 6572 2077 6865 6e20 7468 a server when th\n-00175320: 6520 7365 7276 6572 2068 6173 2074 6572 e server has ter\n-00175330: 6d69 6e61 7465 6420 7468 6520 636f 6e6e minated the conn\n-00175340: 6563 7469 6f6e 2066 6f72 2061 6e79 2072 ection for any r\n-00175350: 6561 736f 6e2e 2054 6869 7320 7761 792c eason. This way,\n-00175360: 2061 2073 6571 7565 6e63 6520 6f66 2063 a sequence of c\n-00175370: 616c 6c73 2063 616e 2062 6520 6d61 6465 alls can be made\n-00175380: 2074 6f20 7468 6520 7365 7276 6572 2077 to the server w\n-00175390: 6869 6c65 206b 6565 7069 6e67 2074 6865 hile keeping the\n-001753a0: 2063 6f6e 6e65 6374 696f 6e20 6f70 656e connection open\n-001753b0: 2e20 436c 6965 6e74 2073 7475 6220 6675 . Client stub fu\n-001753c0: 6e63 7469 6f6e 7320 706f 6c6c 2074 6865 nctions poll the\n-001753d0: 2073 6572 7665 7220 746f 2063 6865 636b server to check\n-001753e0: 2069 6620 7468 6520 636f 6e6e 6563 7469 if the connecti\n-001753f0: 6f6e 2069 7320 7374 696c 6c20 6f70 656e on is still open\n-00175400: 2e20 5768 656e 2074 6865 2063 6f6e 6e65 . When the conne\n-00175410: 6374 696f 6e20 7761 7320 7465 726d 696e ction was termin\n-00175420: 6174 6564 2062 7920 7468 6520 7365 7276 ated by the serv\n-00175430: 6572 2c20 7468 6520 636c 6965 6e74 2077 er, the client w\n-00175440: 696c 6c20 6175 746f 6d61 7469 6361 6c6c ill automaticall\n-00175450: 7920 7265 636f 6e6e 6563 742e 203c 6272 y reconnect. .

    .

    A c\n-00175470: 6c69 656e 7420 6d61 7920 636c 6561 7220 lient may clear \n-00175480: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n-00175490: 494f 5f4b 4545 5041 4c49 5645 3c2f 636f IO_KEEPALIVE flag just be\n-001754b0: 666f 7265 2074 6865 206c 6173 7420 6361 fore the last ca\n-001754c0: 6c6c 2074 6f20 6120 7365 7276 6572 2074 ll to a server t\n-001754d0: 6f20 6c65 7420 7468 6520 7365 7276 6572 o let the server\n-001754e0: 206b 6e6f 7720 6974 2077 616e 7473 2074 know it wants t\n-001754f0: 6f20 636c 6f73 6520 7468 6520 636f 6e6e o close the conn\n-00175500: 6563 7469 6f6e 2061 6674 6572 2074 6869 ection after thi\n-00175510: 7320 6c61 7374 2063 616c 6c2e 2054 6869 s last call. Thi\n-00175520: 7320 7769 6c6c 2063 6c6f 7365 2074 6865 s will close the\n-00175530: 2073 6f63 6b65 7420 6166 7465 7220 7468 socket after th\n-00175540: 6520 6361 6c6c 2061 6e64 2061 6c73 6f20 e call and also \n-00175550: 696e 666f 726d 7320 7468 6520 7365 7276 informs the serv\n-00175560: 6572 2074 6f20 6772 6163 6566 756c 6c79 er to gracefully\n-00175570: 2063 6c6f 7365 2074 6865 2063 6f6e 6e65 close the conne\n-00175580: 6374 696f 6e2e 3c2f 703e 0a3c 703e 5468 ction.

    .

    Th\n-00175590: 6520 636c 6965 6e74 2d73 6964 6520 6361 e client-side ca\n-001755a0: 6e20 616c 736f 2073 6574 2074 6865 2054 n also set the T\n-001755b0: 4350 206b 6565 702d 616c 6976 6520 736f CP keep-alive so\n-001755c0: 636b 6574 2070 726f 7065 7274 6965 732c cket properties,\n-001755d0: 2075 7369 6e67 2074 6865 203c 636f 6465 using the soap::t\n-001756a0: 6370 5f6b 6565 705f 616c 6976 653c 2f61 cp_keep_alive flag (s\n-001756c0: 6574 2074 6f20 3120 746f 2065 6e61 626c et to 1 to enabl\n-001756d0: 6529 2c20 3c63 6f64 653e 3c61 2063 6c61 e), soap::t\n-00175780: 6370 5f6b 6565 705f 6964 6c65 3c2f 613e cp_keep_idle\n-00175790: 3c2f 636f 6465 3e20 746f 2073 6574 2074 to set t\n-001757a0: 6865 203c 636f 6465 3e54 4350 5f4b 4545 he TCP_KEE\n-001757b0: 5049 444c 453c 2f63 6f64 653e 2076 616c PIDLE val\n-001757c0: 7565 2c20 3c63 6f64 653e 3c61 2063 6c61 ue, soap::\n-00175870: 7463 705f 6b65 6570 5f69 6e74 766c 3c2f tcp_keep_intvl to set\n-00175890: 2074 6865 203c 636f 6465 3e54 4350 5f4b the TCP_K\n-001758a0: 4545 5049 4e54 564c 3c2f 636f 6465 3e20 EEPINTVL \n-001758b0: 7661 6c75 652c 2061 6e64 203c 636f 6465 value, and s\n-00175960: 6f61 703a 3a74 6370 5f6b 6565 705f 636e oap::tcp_keep_cn\n-00175970: 743c 2f61 3e3c 2f63 6f64 653e 2074 6f20 t to \n-00175980: 7365 7420 7468 6520 3c63 6f64 653e 5443 set the TC\n-00175990: 505f 4b45 4550 434e 543c 2f63 6f64 653e P_KEEPCNT\n-001759a0: 2076 616c 7565 2e3c 2f70 3e0a 3c70 3e49 value.

    .

    I\n-001759b0: 6620 6120 636c 6965 6e74 2069 7320 696e f a client is in\n-001759c0: 2074 6865 206d 6964 646c 6520 6f66 2073 the middle of s\n-001759d0: 6f61 7020 6361 6c6c 2074 6861 7420 6d69 oap call that mi\n-001759e0: 6768 7420 7461 6b65 2061 206c 6f6e 6720 ght take a long \n-001759f0: 7469 6d65 2061 6e64 2074 6865 2073 6572 time and the ser\n-00175a00: 7665 7220 676f 6573 2061 7761 792f 646f ver goes away/do\n-00175a10: 776e 2074 6865 2063 616c 6c65 7220 646f wn the caller do\n-00175a20: 6573 206e 6f74 2067 6574 2061 6e79 2066 es not get any f\n-00175a30: 6565 6462 6163 6b20 756e 7469 6c20 7468 eedback until th\n-00175a40: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::recv_ti\n-00175b00: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout\n-00175b10: 2069 7320 7265 6163 6865 642e 2045 6e61 is reached. Ena\n-00175b20: 626c 696e 6720 5443 5020 6b65 6570 2061 bling TCP keep a\n-00175b30: 6c69 7665 206f 6e20 7379 7374 656d 7320 live on systems \n-00175b40: 7468 6174 2073 7570 706f 7274 2069 7420 that support it \n-00175b50: 616c 6c6f 7773 2066 6f72 2061 2066 6173 allows for a fas\n-00175b60: 7465 7220 636f 6e6e 6563 7469 6f6e 2074 ter connection t\n-00175b70: 6561 7264 6f77 6e20 6465 7465 6374 696f eardown detectio\n-00175b80: 6e20 666f 7220 6170 706c 6963 6174 696f n for applicatio\n-00175b90: 6e73 2074 6861 7420 6e65 6564 2069 742e ns that need it.\n-00175ba0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n-00175bc0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n-00175bd0: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    <\n-00175be0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-00175bf0: 2069 643d 2263 6875 6e6b 6564 223e 3c2f id=\"chunked\">.HTTP chunked \n-00175c10: 7472 616e 7366 6572 2065 6e63 6f64 696e transfer encodin\n-00175c20: 673c 2f68 323e 0a3c 703e 4f75 7462 6f75 g

    .

    Outbou\n-00175c30: 6e64 2048 5454 5020 6d65 7373 6167 6573 nd HTTP messages\n-00175c40: 2061 7265 206e 6f74 2063 6875 6e6b 6564 are not chunked\n-00175c50: 2075 6e6c 6573 7320 7468 6520 3c63 6f64 unless the #SOAP_IO_CHUNK\n-00175c70: 3c2f 636f 6465 3e20 666c 6167 2069 7320 flag is \n-00175c80: 656e 6162 6c65 642e 2043 6875 6e6b 696e enabled. Chunkin\n-00175c90: 6720 6d61 7920 696d 7072 6f76 6520 7468 g may improve th\n-00175ca0: 6520 7370 6565 6420 6f66 206d 6573 7361 e speed of messa\n-00175cb0: 6765 2073 656e 6469 6e67 2077 6974 6820 ge sending with \n-00175cc0: 4854 5450 2c20 6265 6361 7573 6520 7468 HTTP, because th\n-00175cd0: 6520 6d65 7373 6167 6520 6c65 6e67 7468 e message length\n-00175ce0: 2064 6f65 7320 6e6f 7420 6e65 6564 2074 does not need t\n-00175cf0: 6f20 6265 2064 6574 6572 6d69 6e65 6420 o be determined \n-00175d00: 696e 2061 6476 616e 6365 2066 6f72 2074 in advance for t\n-00175d10: 6865 2048 5454 5020 636f 6e74 656e 7420 he HTTP content \n-00175d20: 6c65 6e67 7468 2068 6561 6465 722e 3c2f length header..

    .... Back to t\n-00175d50: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-00175d60: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .HTTP buffered \n-00175da0: 7365 6e64 733c 2f68 323e 0a3c 703e 5468 sends

    .

    Th\n-00175db0: 6520 656e 7469 7265 206f 7574 626f 756e e entire outboun\n-00175dc0: 6420 6d65 7373 6167 6520 6361 6e20 6265 d message can be\n-00175dd0: 2073 746f 7265 6420 696e 2061 2062 7566 stored in a buf\n-00175de0: 6665 7220 746f 2064 6574 6572 6d69 6e65 fer to determine\n-00175df0: 2074 6865 2048 5454 5020 636f 6e74 656e the HTTP conten\n-00175e00: 7420 6c65 6e67 7468 2072 6174 6865 7220 t length rather \n-00175e10: 7468 616e 2074 6865 2074 776f 2d70 6861 than the two-pha\n-00175e20: 7365 2065 6e63 6f64 696e 6720 7573 6564 se encoding used\n-00175e30: 2062 7920 6753 4f41 5020 636c 6965 6e74 by gSOAP client\n-00175e40: 2d73 6964 6520 7374 7562 2066 756e 6374 -side stub funct\n-00175e50: 696f 6e73 2061 6e64 2073 6572 7665 722d ions and server-\n-00175e60: 7369 6465 2073 6b65 6c65 746f 6e20 6675 side skeleton fu\n-00175e70: 6e63 7469 6f6e 7320 6765 6e65 7261 7465 nctions generate\n-00175e80: 6420 6279 2073 6f61 7063 7070 322c 2077 d by soapcpp2, w\n-00175e90: 6869 6368 2070 6572 666f 726d 2061 2073 hich perform a s\n-00175ea0: 6570 6172 6174 6520 7061 7373 206f 7665 eparate pass ove\n-00175eb0: 7220 7468 6520 6461 7461 2074 6f20 6465 r the data to de\n-00175ec0: 7465 726d 696e 6520 7468 6520 6c65 6e67 termine the leng\n-00175ed0: 7468 206f 6620 7468 6520 6f75 7462 6f75 th of the outbou\n-00175ee0: 6e64 206d 6573 7361 6765 2e20 5365 7474 nd message. Sett\n-00175ef0: 696e 6720 7468 6520 666c 6167 203c 636f ing the flag #SOAP_IO_STOR\n-00175f10: 453c 2f63 6f64 653e 2066 6f72 2074 6865 E for the\n-00175f20: 206f 7574 7075 7420 6d6f 6465 2077 696c output mode wil\n-00175f30: 6c20 6275 6666 6572 2074 6865 2065 6e74 l buffer the ent\n-00175f40: 6972 6520 6d65 7373 6167 652e 2054 6869 ire message. Thi\n-00175f50: 7320 6d61 7920 6f72 206d 6179 206e 6f74 s may or may not\n-00175f60: 2073 7065 6564 2075 7020 7468 6520 7472 speed up the tr\n-00175f70: 616e 736d 6973 7369 6f6e 206f 6620 6d65 ansmission of me\n-00175f80: 7373 6167 6573 2c20 6465 7065 6e64 696e ssages, dependin\n-00175f90: 6720 6f6e 2074 6865 2063 6f6e 7465 6e74 g on the content\n-00175fa0: 2c20 6275 7420 6d61 7920 7265 7175 6972 , but may requir\n-00175fb0: 6520 7369 676e 6966 6963 616e 7420 7374 e significant st\n-00175fc0: 6f72 6167 6520 7370 6163 6520 746f 2068 orage space to h\n-00175fd0: 6f6c 6420 6c61 7267 6520 6d65 7373 6167 old large messag\n-00175fe0: 6573 2074 656d 706f 7261 7269 6c79 2e3c es temporarily.<\n-00175ff0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to \n-00176010: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n-00176020: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

    .

    .HTTP au\n-00176060: 7468 656e 7469 6361 7469 6f6e 3c2f 6832 thentication.

    The followi\n-00176080: 6e67 2073 6563 7469 6f6e 7320 6578 706c ng sections expl\n-00176090: 6169 6e20 686f 7720 746f 2061 7574 6865 ain how to authe\n-001760a0: 6e74 6963 6174 6520 7769 7468 2048 5454 nticate with HTT\n-001760b0: 5020 6265 6172 6572 2c20 6261 7369 632c P bearer, basic,\n-001760c0: 2064 6967 6573 742c 2061 6e64 204e 544c digest, and NTL\n-001760d0: 4d2e 2050 726f 7879 2061 7574 6865 6e74 M. Proxy authent\n-001760e0: 6963 6174 696f 6e20 6973 2061 6c73 6f20 ication is also \n-001760f0: 636f 7665 7265 642e 3c2f 703e 0a3c 703e covered.

    .

    \n-00176100: 596f 7520 636f 756c 6420 616c 736f 2075 You could also u\n-00176110: 7365 2074 6865 2057 696e 496e 6574 2070 se the WinInet p\n-00176120: 6c75 6769 6e20 6176 6169 6c61 626c 6520 lugin available \n-00176130: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/mod_gsoap\n-00176150: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir\n-00176160: 6563 746f 7279 206f 6620 7468 6520 6753 ectory of the gS\n-00176170: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code \n-00176180: 7061 636b 6167 6520 746f 2073 696d 706c package to simpl\n-00176190: 6966 7920 496e 7465 726e 6574 2061 6363 ify Internet acc\n-001761a0: 6573 7320 666f 7220 6753 4f41 5020 636c ess for gSOAP cl\n-001761b0: 6965 6e74 2061 7070 6c69 6361 7469 6f6e ient application\n-001761c0: 7320 616e 6420 6465 616c 2077 6974 6820 s and deal with \n-001761d0: 656e 6372 7970 7469 6f6e 2c20 7072 6f78 encryption, prox\n-001761e0: 6965 732c 2061 6e64 2061 7574 6865 6e74 ies, and authent\n-001761f0: 6963 6174 696f 6e2c 2073 6565 2074 6865 ication, see the\n-00176200: 2067 534f 4150 203c 6120 6872 6566 3d22 gSOAP W\n-00176230: 696e 496e 6574 2070 6c75 6769 6e3c 2f61 inInet plugin documentation.\n-00176250: 3c2f 703e 0a3c 703e 5468 6520 6753 4f41

    .

    The gSOA\n-00176260: 5020 4355 524c 2070 6c75 6769 6e20 6361 P CURL plugin ca\n-00176270: 6e20 616c 736f 2062 6520 7573 6564 2074 n also be used t\n-00176280: 6f20 6465 7665 6c6f 7020 6753 4f41 5020 o develop gSOAP \n-00176290: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati\n-001762a0: 6f6e 7320 616e 6420 4355 524c 2069 6d70 ons and CURL imp\n-001762b0: 6c65 6d65 6e74 7320 7661 7269 6f75 7320 lements various \n-001762c0: 4854 5450 2061 7574 6865 6e74 6963 6174 HTTP authenticat\n-001762d0: 696f 6e20 6d65 7468 6f64 732c 2073 6565 ion methods, see\n-001762e0: 2074 6865 2067 534f 4150 203c 6120 6872 the gSOAP \n-00176310: 4355 524c 2070 6c75 6769 6e3c 2f61 3e20 CURL plugin \n-00176320: 646f 6375 6d65 6e74 6174 696f 6e2e 3c2f documentation..

    .... Back to t\n-00176350: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-00176360: 3c2f 613e 3c2f 703e 0a3c 6833 3e3c 6120

    .

    .HT\n-001763a0: 5450 2062 6561 7265 7220 6175 7468 656e TP bearer authen\n-001763b0: 7469 6361 7469 6f6e 3c2f 6833 3e0a 3c70 tication

    .HTTP bearer aut\n-001763d0: 6865 6e74 6963 6174 696f 6e20 6973 2065 hentication is e\n-001763e0: 6e61 626c 6564 2061 7420 7468 6520 636c nabled at the cl\n-001763f0: 6965 6e74 2d73 6964 6520 6279 2073 6574 ient-side by set\n-00176400: 7469 6e67 2074 6865 203c 636f 6465 3e3c ting the <\n-00176410: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00176420: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00176430: 6d6c 2361 3532 3133 6135 3332 3862 3434 ml#a5213a5328b44\n-00176440: 3234 3436 3839 6664 3363 3239 3337 6363 244689fd3c2937cc\n-00176450: 3862 3932 2220 7469 746c 653d 2255 7365 8b92\" title=\"Use\n-00176460: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP\n-00176470: 2061 7574 686f 7269 7a61 7469 6f6e 2062 authorization b\n-00176480: 6561 7265 7220 746f 6b65 6e20 7661 6c75 earer token valu\n-00176490: 6520 746f 2062 6520 7365 6e74 2062 7920 e to be sent by \n-001764a0: 7468 6520 636c 6965 6e74 2c20 7365 7276 the client, serv\n-001764b0: 6572 2073 6964 6520 7265 6365 6976 6573 er side receives\n-001764c0: 2074 2e2e 2e22 3e73 6f61 703a 3a62 6561 t...\">soap::bea\n-001764d0: 7265 723c 2f61 3e3c 2f63 6f64 653e 2073 rer s\n-001764e0: 7472 696e 6720 746f 2074 6865 2062 6561 tring to the bea\n-001764f0: 7265 7220 746f 6b65 6e3a 3c2f 703e 0a3c rer token:

    .<\n-00176500: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00176510: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n-00176540: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n-00176610: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .\n-001766f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. \n-00176790: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n-001767b0: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror

    \n-001767c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    els\n-001767f0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n-00176800: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00176810: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-00176830: 4f4b 3c2f 7370 616e 3e3c 2f64 6976 3e0a OK
    .\n-00176840: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    <\n-001768f0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00176900: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i\">const char * \n-00176910: 6265 6172 6572 3c2f 6469 763e 3c64 6976 bearer
    U\n-00176930: 7365 722d 6465 6669 6e61 626c 6520 4854 ser-definable HT\n-00176940: 5450 2061 7574 686f 7269 7a61 7469 6f6e TP authorization\n-00176950: 2062 6561 7265 7220 746f 6b65 6e20 7661 bearer token va\n-00176960: 6c75 6520 746f 2062 6520 7365 6e74 2062 lue to be sent b\n-00176970: 7920 7468 6520 636c 6965 6e74 2c20 7365 y the client, se\n-00176980: 7276 6572 2073 6964 6520 7265 6365 6976 rver side receiv\n-00176990: 6573 2074 2e2e 2e3c 2f64 6976 3e3c 6469 es t...
    \n-001769b0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:37\n-001769d0: 3532 3c2f 6469 763e 3c2f 6469 763e 0a3c 52
    .<\n-001769e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    .... Back t\n-00176a10: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n-00176a20: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n-00176a30: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .\n-00176a60: 4854 5450 2062 6173 6963 2061 7574 6865 HTTP basic authe\n-00176a70: 6e74 6963 6174 696f 6e3c 2f68 333e 0a3c ntication

    .<\n-00176a80: 703e 4854 5450 2062 6173 6963 2061 7574 p>HTTP basic aut\n-00176a90: 6865 6e74 6963 6174 696f 6e20 6973 2065 hentication is e\n-00176aa0: 6e61 626c 6564 2061 7420 7468 6520 636c nabled at the cl\n-00176ab0: 6965 6e74 2d73 6964 6520 6279 2073 6574 ient-side by set\n-00176ac0: 7469 6e67 2074 6865 203c 636f 6465 3e63 ting the c\n-00176ad0: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::userid<\n-00176ba0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n-00176bb0: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n-00176bc0: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::p\n-00176c80: 6173 7377 643c 2f61 3e3c 2f63 6f64 653e asswd\n-00176c90: 2073 7472 696e 6773 2074 6f20 6120 7573 strings to a us\n-00176ca0: 6572 6e61 6d65 2061 6e64 2070 6173 7377 ername and passw\n-00176cb0: 6f72 642c 2072 6573 7065 6374 6976 656c ord, respectivel\n-00176cc0: 792e 2041 2073 6572 7665 7220 6d61 7920 y. A server may \n-00176cd0: 7265 7175 6573 7420 7573 6572 2061 7574 request user aut\n-00176ce0: 6865 6e74 6963 6174 696f 6e20 616e 6420 hentication and \n-00176cf0: 6465 6e69 6573 2061 6363 6573 7320 2848 denies access (H\n-00176d00: 5454 5020 3430 3120 6572 726f 7229 2077 TTP 401 error) w\n-00176d10: 6865 6e20 7468 6520 636c 6965 6e74 2074 hen the client t\n-00176d20: 7269 6573 2074 6f20 636f 6e6e 6563 7420 ries to connect \n-00176d30: 7769 7468 6f75 7420 4854 5450 2061 7574 without HTTP aut\n-00176d40: 6865 6e74 6963 6174 696f 6e20 286f 7220 hentication (or \n-00176d50: 7769 7468 2074 6865 2077 726f 6e67 2061 with the wrong a\n-00176d60: 7574 6865 6e74 6963 6174 696f 6e20 696e uthentication in\n-00176d70: 666f 726d 6174 696f 6e29 2e3c 2f70 3e0a formation).

    .\n-00176d80: 3c70 3e42 6173 6963 2061 7574 6865 6e74

    Basic authent\n-00176d90: 6963 6174 696f 6e20 7368 6f75 6c64 206f ication should o\n-00176da0: 6e6c 7920 6265 2075 7365 6420 6f76 6572 nly be used over\n-00176db0: 2048 5454 5053 2c20 6265 6361 7573 6520 HTTPS, because \n-00176dc0: 7468 6520 6372 6564 656e 7469 616c 7320 the credentials \n-00176dd0: 6172 6520 7365 6e74 2069 6e20 7468 6520 are sent in the \n-00176de0: 636c 6561 7220 7769 7468 2048 5454 502e clear with HTTP.\n-00176df0: 2053 6565 2053 6563 7469 6f6e 203c 6120 See Section The HT\n-00176e30: 5450 2064 6967 6573 7420 6175 7468 656e TP digest authen\n-00176e40: 7469 6361 7469 6f6e 2070 6c75 6769 6e3c tication plugin<\n-00176e50: 2f61 3e20 746f 2075 7365 2074 6865 2048 /a> to use the H\n-00176e60: 5454 5020 6469 6765 7374 2070 6c75 6769 TTP digest plugi\n-00176e70: 6e20 7468 6174 2069 7320 7361 6665 2066 n that is safe f\n-00176e80: 6f72 2061 7574 6865 6e74 6963 6174 696f or authenticatio\n-00176e90: 6e20 6f76 6572 2048 5454 502e 3c2f 703e n over HTTP.

    \n-00176ea0: 0a3c 703e 4865 7265 2069 7320 616e 2065 .

    Here is an e\n-00176eb0: 7861 6d70 6c65 2063 6c69 656e 7420 636f xample client co\n-00176ec0: 6465 2066 7261 676d 656e 7420 746f 2073 de fragment to s\n-00176ed0: 6574 2074 6865 2048 5454 5020 6175 7468 et the HTTP auth\n-00176ee0: 656e 7469 6361 7469 6f6e 2075 7365 726e entication usern\n-00176ef0: 616d 6520 616e 6420 7061 7373 776f 7264 ame and password\n-00176f00: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    \n-00177020: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n-001770b0: 7573 6572 6964 3c2f 613e 203d 203c 7370 userid = "g\n-001770e0: 7565 7374 2671 756f 743b 3c2f 7370 616e uest";
    .
    soap->\n-00177140: 3c61 2063 6c61 7373 3d22 636f 6465 2220 passwd<\n-00177190: 2f61 3e20 3d20 3c73 7061 6e20 636c 6173 /a> = "visit&qu\n-001771c0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; ..<\n-00177260: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00177270: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-00177290: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    e\n-001772d0: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    \n-001772e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n-00177310: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success\n-00177320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00177370: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    \n-001773c0: 736f 6170 3a3a 7061 7373 7764 3c2f 613e soap::passwd\n-001773d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n-001773f0: 6368 6172 202a 2070 6173 7377 643c 2f64 char * passwd
    User-defin\n-00177420: 6162 6c65 2048 5454 5020 616e 6420 4e54 able HTTP and NT\n-00177430: 4c4d 2061 7574 686f 7269 7a61 7469 6f6e LM authorization\n-00177440: 2070 6173 7377 6f72 6420 7374 7269 6e67 password string\n-00177450: 2072 6571 7569 7265 6420 666f 7220 4854 required for HT\n-00177460: 5450 2062 6173 6963 2061 6e64 204e 544c TP basic and NTL\n-00177470: 4d20 6175 7468 656e 7469 632e 2e2e 3c2f M authentic...
    Defini\n-001774a0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-001774b0: 7032 2e68 3a33 3832 373c 2f64 6976 3e3c p2.h:3827
    <\n-001774c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-00177510: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00177520: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-00177560: 6f61 703a 3a75 7365 7269 643c 2f61 3e3c oap::userid<\n-00177570: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c\n-00177590: 6861 7220 2a20 7573 6572 6964 3c2f 6469 har * userid
    User-defina\n-001775c0: 626c 6520 4854 5450 2061 6e64 204e 544c ble HTTP and NTL\n-001775d0: 4d20 6175 7468 6f72 697a 6174 696f 6e20 M authorization \n-001775e0: 7573 6572 2069 6420 7374 7269 6e67 2066 user id string f\n-001775f0: 6f72 2048 5454 5020 6261 7369 6320 616e or HTTP basic an\n-00177600: 6420 4e54 4c4d 2061 7574 6865 6e74 6963 d NTLM authentic\n-00177610: 6174 696f 6e20 6279 2074 2e2e 2e3c 2f64 ation by t...
    Definit\n-00177640: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-00177650: 322e 683a 3338 3232 3c2f 6469 763e 3c2f 2.h:3822
    .

    A\n-00177680: 2063 6c69 656e 7420 534f 4150 2072 6571 client SOAP req\n-00177690: 7565 7374 2077 696c 6c20 6861 7665 2074 uest will have t\n-001776a0: 6865 2066 6f6c 6c6f 7769 6e67 2048 5454 he following HTT\n-001776b0: 5020 6865 6164 6572 3a20 3c2f 703e 3c70 P header:

    POST /XXX HT\n-001776e0: 5450 2f31 2e31 200a 486f 7374 3a20 5959 TP/1.1 .Host: YY\n-001776f0: 5920 0a55 7365 722d 4167 656e 743a 2067 Y .User-Agent: g\n-00177700: 534f 4150 2f32 2e38 200a 436f 6e74 656e SOAP/2.8 .Conten\n-00177710: 742d 5479 7065 3a20 7465 7874 2f78 6d6c t-Type: text/xml\n-00177720: 3b20 6368 6172 7365 743d 7574 662d 3820 ; charset=utf-8 \n-00177730: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a .Content-Length:\n-00177740: 205a 5a5a 200a 4175 7468 6f72 697a 6174 ZZZ .Authorizat\n-00177750: 696f 6e3a 2042 6173 6963 205a 3356 6c63 ion: Basic Z3Vlc\n-00177760: 3351 365a 3356 6c63 3351 3d20 0a3c 2f70 3Q6Z3Vlc3Q= .

    A client \n-00177780: 6d75 7374 2073 6574 2074 6865 203c 636f must set the const char* <\n-001777a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001777b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001777c0: 6d6c 2361 3265 6465 3032 3039 3564 3938 ml#a2ede02095d98\n-001777d0: 3934 3266 3463 3232 3066 6431 3762 3439 942f4c220fd17b49\n-001777e0: 3537 3033 2220 7469 746c 653d 2255 7365 5703\" title=\"Use\n-001777f0: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP\n-00177800: 2061 6e64 204e 544c 4d20 6175 7468 6f72 and NTLM author\n-00177810: 697a 6174 696f 6e20 7573 6572 2069 6420 ization user id \n-00177820: 7374 7269 6e67 2066 6f72 2048 5454 5020 string for HTTP \n-00177830: 6261 7369 6320 616e 6420 4e54 4c4d 2061 basic and NTLM a\n-00177840: 7574 6865 6e74 6963 6174 696f 6e20 6279 uthentication by\n-00177850: 2074 2e2e 2e22 3e73 6f61 703a 3a75 7365 t...\">soap::use\n-00177860: 7269 643c 2f61 3e3c 2f63 6f64 653e 2061 rid a\n-00177870: 6e64 203c 636f 6465 3e63 6f6e 7374 2063 nd const c\n-00177880: 6861 722a 203c 6120 636c 6173 733d 2265 har* soa\n-00177940: 703a 3a70 6173 7377 643c 2f61 3e3c 2f63 p::passwd strings for\n-00177960: 2065 6163 6820 6361 6c6c 2074 6861 7420 each call that \n-00177970: 7265 7175 6972 6573 2063 6c69 656e 7420 requires client \n-00177980: 6175 7468 656e 7469 6361 7469 6f6e 2e20 authentication. \n-00177990: 5468 6520 7374 7269 6e67 7320 6172 6520 The strings are \n-001779a0: 7265 7365 7420 6166 7465 7220 6561 6368 reset after each\n-001779b0: 2073 7563 6365 7373 6675 6c20 6f72 2075 successful or u\n-001779c0: 6e73 7563 6365 7373 6675 6c20 6361 6c6c nsuccessful call\n-001779d0: 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 7072 .

    .

    When pr\n-001779e0: 6573 656e 742c 2074 6865 203c 636f 6465 esent, the WWW-Authenticat\n-00177a00: 653c 2f63 6f64 653e 2048 5454 5020 6865 e HTTP he\n-00177a10: 6164 6572 2072 6574 7572 6e65 6420 6279 ader returned by\n-00177a20: 2074 6865 2073 6572 7665 7220 7769 7468 the server with\n-00177a30: 2074 6865 2061 7574 6865 6e74 6963 6174 the authenticat\n-00177a40: 696f 6e20 7265 616c 6d20 6973 2073 746f ion realm is sto\n-00177a50: 7265 6420 696e 2074 6865 2074 6865 203c red in the the <\n-00177a60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-00177b20: 703a 3a61 7574 6872 6561 6c6d 3c2f 613e p::authrealm\n-00177b30: 3c2f 636f 6465 3e20 7374 7269 6e67 2e20 string. \n-00177b40: 5468 6973 2069 7320 7573 6566 756c 2066 This is useful f\n-00177b50: 6f72 2063 6c69 656e 7473 2074 6f20 7573 or clients to us\n-00177b60: 6520 7468 6973 2064 6f6d 6169 6e20 696e e this domain in\n-00177b70: 666f 726d 6174 696f 6e20 746f 2072 6573 formation to res\n-00177b80: 706f 6e64 2074 6f20 6175 7468 656e 7469 pond to authenti\n-00177b90: 6361 7469 6f6e 2072 6571 7565 7374 732e cation requests.\n-00177ba0: 3c2f 703e 0a3c 703e 4120 7374 616e 642d

    .

    A stand-\n-00177bb0: 616c 6f6e 6520 6753 4f41 5020 5765 6220 alone gSOAP Web \n-00177bc0: 5365 7276 6963 6520 6170 706c 6963 6174 Service applicat\n-00177bd0: 696f 6e20 6361 6e20 656e 666f 7263 6520 ion can enforce \n-00177be0: 4854 5450 2061 7574 6865 6e74 6963 6174 HTTP authenticat\n-00177bf0: 696f 6e20 6f6e 2063 6c69 656e 7473 2062 ion on clients b\n-00177c00: 7920 6368 6563 6b69 6e67 2074 6865 203c y checking the <\n-00177c10: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n-00177c20: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::u\n-00177ce0: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid\n-00177cf0: 2061 6e64 203c 636f 6465 3e63 6f6e 7374 and const\n-00177d00: 2063 6861 722a 203c 6120 636c 6173 733d char* s\n-00177dc0: 6f61 703a 3a70 6173 7377 643c 2f61 3e3c oap::passwd<\n-00177dd0: 2f63 6f64 653e 2073 7472 696e 6773 2e20 /code> strings. \n-00177de0: 5468 6573 6520 7374 7269 6e67 7320 6172 These strings ar\n-00177df0: 6520 7365 7420 7768 656e 2061 2063 6c69 e set when a cli\n-00177e00: 656e 7420 7265 7175 6573 7420 636f 6e74 ent request cont\n-00177e10: 6169 6e73 2048 5454 5020 6175 7468 656e ains HTTP authen\n-00177e20: 7469 6361 7469 6f6e 2068 6561 6465 7273 tication headers\n-00177e30: 2e20 5468 6520 7374 7269 6e67 7320 7368 . The strings sh\n-00177e40: 6f75 6c64 2062 6520 6368 6563 6b65 6420 ould be checked \n-00177e50: 696e 2065 6163 6820 7365 7276 6963 6520 in each service \n-00177e60: 6d65 7468 6f64 2028 7468 6174 2072 6571 method (that req\n-00177e70: 7569 7265 7320 6175 7468 656e 7469 6361 uires authentica\n-00177e80: 7469 6f6e 2074 6f20 6578 6563 7574 6529 tion to execute)\n-00177e90: 2e3c 2f70 3e0a 3c70 3e48 6572 6520 6973 .

    .

    Here is\n-00177ea0: 2061 6e20 6578 616d 706c 6520 7365 7276 an example serv\n-00177eb0: 6963 6520 6d65 7468 6f64 2069 6d70 6c65 ice method imple\n-00177ec0: 6d65 6e74 6174 696f 6e20 7468 6174 2065 mentation that e\n-00177ed0: 6e66 6f72 6365 6420 636c 6965 6e74 2061 nforced client a\n-00177ee0: 7574 6865 6e74 6963 6174 696f 6e3a 3c2f uthentication:.

    int \n-00177f40: 6e73 5f5f 7765 626d 6574 686f 6428 3c73 ns__webmethod(struct soap *soap, ...)
    .\n+00174890: 6c69 6e65 223e 2020 3c73 7061 6e20 636c line\"> st\n+001748b0: 7275 6374 203c 2f73 7061 6e3e 2a3c 6120 ruct *soap = (\n+001748f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00174940: 2f61 3e2a 2974 736f 6170 3b3c 2f64 6976 /a>*)tsoap;.
    THREA\n+001749c0: 445f 4445 5441 4348 3c2f 613e 283c 6120 D_DETACH(THREAD_ID)\n+00174a30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ...
    soap\n+00174ca0: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap); .
    soa\n+00174d50: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap); \n+00174d90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00174e00: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); <\n+00174e40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+00174eb0: 6f61 705f 6672 6565 3c2f 613e 283c 6120 oap_free(soap); <\n+00174ef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return NULL;
    .<\n+00174f40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00174f50: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .<\n+001750b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+001750c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+001750d0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+001750e0: 3432 3034 3c2f 6469 763e 3c2f 6469 763e 4204
    \n+001750f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n+00175190: 6163 6365 7074 5f66 6c61 6773 3c2f 613e accept_flags\n+001751a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int ac\n+001751c0: 6365 7074 5f66 6c61 6773 3c2f 6469 763e cept_flags
    \n+001751d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n+001751f0: 6520 7365 7473 6f63 6b6f 7074 206c 6576 e setsockopt lev\n+00175200: 656c 2053 4f4c 5f53 4f43 4b45 5420 666c el SOL_SOCKET fl\n+00175210: 6167 7320 2830 2062 7920 6465 6661 756c ags (0 by defaul\n+00175220: 7429 2c20 7768 656e 206e 6f6e 7a65 726f t), when nonzero\n+00175230: 2073 6574 7320 7468 6520 736f 6170 3a3a sets the soap::\n+00175240: 736f 636b 6574 2066 2e2e 2e3c 2f64 6976 socket f...
    Definitio\n+00175270: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00175280: 683a 3334 3533 3c2f 6469 763e 3c2f 6469 h:3453
    .

    A c\n+001752b0: 6c69 656e 7420 6361 6c6c 2077 696c 6c20 lient call will \n+001752c0: 6175 746f 6d61 7469 6361 6c6c 7920 6174 automatically at\n+001752d0: 7465 6d70 7420 746f 2072 652d 6573 7461 tempt to re-esta\n+001752e0: 626c 6973 6820 6120 636f 6e6e 6563 7469 blish a connecti\n+001752f0: 6f6e 2074 6f20 6120 7365 7276 6572 2077 on to a server w\n+00175300: 6865 6e20 7468 6520 7365 7276 6572 2068 hen the server h\n+00175310: 6173 2074 6572 6d69 6e61 7465 6420 7468 as terminated th\n+00175320: 6520 636f 6e6e 6563 7469 6f6e 2066 6f72 e connection for\n+00175330: 2061 6e79 2072 6561 736f 6e2e 2054 6869 any reason. Thi\n+00175340: 7320 7761 792c 2061 2073 6571 7565 6e63 s way, a sequenc\n+00175350: 6520 6f66 2063 616c 6c73 2063 616e 2062 e of calls can b\n+00175360: 6520 6d61 6465 2074 6f20 7468 6520 7365 e made to the se\n+00175370: 7276 6572 2077 6869 6c65 206b 6565 7069 rver while keepi\n+00175380: 6e67 2074 6865 2063 6f6e 6e65 6374 696f ng the connectio\n+00175390: 6e20 6f70 656e 2e20 436c 6965 6e74 2073 n open. Client s\n+001753a0: 7475 6220 6675 6e63 7469 6f6e 7320 706f tub functions po\n+001753b0: 6c6c 2074 6865 2073 6572 7665 7220 746f ll the server to\n+001753c0: 2063 6865 636b 2069 6620 7468 6520 636f check if the co\n+001753d0: 6e6e 6563 7469 6f6e 2069 7320 7374 696c nnection is stil\n+001753e0: 6c20 6f70 656e 2e20 5768 656e 2074 6865 l open. When the\n+001753f0: 2063 6f6e 6e65 6374 696f 6e20 7761 7320 connection was \n+00175400: 7465 726d 696e 6174 6564 2062 7920 7468 terminated by th\n+00175410: 6520 7365 7276 6572 2c20 7468 6520 636c e server, the cl\n+00175420: 6965 6e74 2077 696c 6c20 6175 746f 6d61 ient will automa\n+00175430: 7469 6361 6c6c 7920 7265 636f 6e6e 6563 tically reconnec\n+00175440: 742e 203c 6272 2020 2f3e 0a3c 2f70 3e0a t.
    .

    .\n+00175450: 3c70 3e41 2063 6c69 656e 7420 6d61 7920

    A client may \n+00175460: 636c 6561 7220 7468 6520 3c63 6f64 653e clear the \n+00175470: 2353 4f41 505f 494f 5f4b 4545 5041 4c49 #SOAP_IO_KEEPALI\n+00175480: 5645 3c2f 636f 6465 3e20 666c 6167 206a VE flag j\n+00175490: 7573 7420 6265 666f 7265 2074 6865 206c ust before the l\n+001754a0: 6173 7420 6361 6c6c 2074 6f20 6120 7365 ast call to a se\n+001754b0: 7276 6572 2074 6f20 6c65 7420 7468 6520 rver to let the \n+001754c0: 7365 7276 6572 206b 6e6f 7720 6974 2077 server know it w\n+001754d0: 616e 7473 2074 6f20 636c 6f73 6520 7468 ants to close th\n+001754e0: 6520 636f 6e6e 6563 7469 6f6e 2061 6674 e connection aft\n+001754f0: 6572 2074 6869 7320 6c61 7374 2063 616c er this last cal\n+00175500: 6c2e 2054 6869 7320 7769 6c6c 2063 6c6f l. This will clo\n+00175510: 7365 2074 6865 2073 6f63 6b65 7420 6166 se the socket af\n+00175520: 7465 7220 7468 6520 6361 6c6c 2061 6e64 ter the call and\n+00175530: 2061 6c73 6f20 696e 666f 726d 7320 7468 also informs th\n+00175540: 6520 7365 7276 6572 2074 6f20 6772 6163 e server to grac\n+00175550: 6566 756c 6c79 2063 6c6f 7365 2074 6865 efully close the\n+00175560: 2063 6f6e 6e65 6374 696f 6e2e 3c2f 703e connection.

    \n+00175570: 0a3c 703e 5468 6520 636c 6965 6e74 2d73 .

    The client-s\n+00175580: 6964 6520 6361 6e20 616c 736f 2073 6574 ide can also set\n+00175590: 2074 6865 2054 4350 206b 6565 702d 616c the TCP keep-al\n+001755a0: 6976 6520 736f 636b 6574 2070 726f 7065 ive socket prope\n+001755b0: 7274 6965 732c 2075 7369 6e67 2074 6865 rties, using the\n+001755c0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00175680: 6f61 703a 3a74 6370 5f6b 6565 705f 616c oap::tcp_keep_al\n+00175690: 6976 653c 2f61 3e3c 2f63 6f64 653e 2066 ive f\n+001756a0: 6c61 6720 2873 6574 2074 6f20 3120 746f lag (set to 1 to\n+001756b0: 2065 6e61 626c 6529 2c20 3c63 6f64 653e enable), \n+001756c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n+00175760: 6f61 703a 3a74 6370 5f6b 6565 705f 6964 oap::tcp_keep_id\n+00175770: 6c65 3c2f 613e 3c2f 636f 6465 3e20 746f le to\n+00175780: 2073 6574 2074 6865 203c 636f 6465 3e54 set the T\n+00175790: 4350 5f4b 4545 5049 444c 453c 2f63 6f64 CP_KEEPIDLE value, \n+001757b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+00175850: 736f 6170 3a3a 7463 705f 6b65 6570 5f69 soap::tcp_keep_i\n+00175860: 6e74 766c 3c2f 613e 3c2f 636f 6465 3e20 ntvl \n+00175870: 746f 2073 6574 2074 6865 203c 636f 6465 to set the TCP_KEEPINTVL value, and\n+001758a0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::tcp_k\n+00175950: 6565 705f 636e 743c 2f61 3e3c 2f63 6f64 eep_cnt to set the TCP_KEEPCNT<\n+00175980: 2f63 6f64 653e 2076 616c 7565 2e3c 2f70 /code> value..

    If a client\n+001759a0: 2069 7320 696e 2074 6865 206d 6964 646c is in the middl\n+001759b0: 6520 6f66 2073 6f61 7020 6361 6c6c 2074 e of soap call t\n+001759c0: 6861 7420 6d69 6768 7420 7461 6b65 2061 hat might take a\n+001759d0: 206c 6f6e 6720 7469 6d65 2061 6e64 2074 long time and t\n+001759e0: 6865 2073 6572 7665 7220 676f 6573 2061 he server goes a\n+001759f0: 7761 792f 646f 776e 2074 6865 2063 616c way/down the cal\n+00175a00: 6c65 7220 646f 6573 206e 6f74 2067 6574 ler does not get\n+00175a10: 2061 6e79 2066 6565 6462 6163 6b20 756e any feedback un\n+00175a20: 7469 6c20 7468 6520 3c63 6f64 653e 3c61 til the soap::r\n+00175ae0: 6563 765f 7469 6d65 6f75 743c 2f61 3e3c ecv_timeout<\n+00175af0: 2f63 6f64 653e 2069 7320 7265 6163 6865 /code> is reache\n+00175b00: 642e 2045 6e61 626c 696e 6720 5443 5020 d. Enabling TCP \n+00175b10: 6b65 6570 2061 6c69 7665 206f 6e20 7379 keep alive on sy\n+00175b20: 7374 656d 7320 7468 6174 2073 7570 706f stems that suppo\n+00175b30: 7274 2069 7420 616c 6c6f 7773 2066 6f72 rt it allows for\n+00175b40: 2061 2066 6173 7465 7220 636f 6e6e 6563 a faster connec\n+00175b50: 7469 6f6e 2074 6561 7264 6f77 6e20 6465 tion teardown de\n+00175b60: 7465 6374 696f 6e20 666f 7220 6170 706c tection for appl\n+00175b70: 6963 6174 696f 6e73 2074 6861 7420 6e65 ications that ne\n+00175b80: 6564 2069 742e 3c2f 703e 0a3c 703e f09f ed it.

    .

    ..\n+00175b90: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B\n+00175ba0: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of \n+00175bb0: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    \n+00175bc0: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .HTTP ch\n+00175bf0: 756e 6b65 6420 7472 616e 7366 6572 2065 unked transfer e\n+00175c00: 6e63 6f64 696e 673c 2f68 323e 0a3c 703e ncoding

    .

    \n+00175c10: 4f75 7462 6f75 6e64 2048 5454 5020 6d65 Outbound HTTP me\n+00175c20: 7373 6167 6573 2061 7265 206e 6f74 2063 ssages are not c\n+00175c30: 6875 6e6b 6564 2075 6e6c 6573 7320 7468 hunked unless th\n+00175c40: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO\n+00175c50: 5f43 4855 4e4b 3c2f 636f 6465 3e20 666c _CHUNK fl\n+00175c60: 6167 2069 7320 656e 6162 6c65 642e 2043 ag is enabled. C\n+00175c70: 6875 6e6b 696e 6720 6d61 7920 696d 7072 hunking may impr\n+00175c80: 6f76 6520 7468 6520 7370 6565 6420 6f66 ove the speed of\n+00175c90: 206d 6573 7361 6765 2073 656e 6469 6e67 message sending\n+00175ca0: 2077 6974 6820 4854 5450 2c20 6265 6361 with HTTP, beca\n+00175cb0: 7573 6520 7468 6520 6d65 7373 6167 6520 use the message \n+00175cc0: 6c65 6e67 7468 2064 6f65 7320 6e6f 7420 length does not \n+00175cd0: 6e65 6564 2074 6f20 6265 2064 6574 6572 need to be deter\n+00175ce0: 6d69 6e65 6420 696e 2061 6476 616e 6365 mined in advance\n+00175cf0: 2066 6f72 2074 6865 2048 5454 5020 636f for the HTTP co\n+00175d00: 6e74 656e 7420 6c65 6e67 7468 2068 6561 ntent length hea\n+00175d10: 6465 722e 3c2f 703e 0a3c 703e f09f 949d der.

    .

    ....\n+00175d20: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+00175d30: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+00175d40: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+00175d50: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.HTTP buf\n+00175d80: 6665 7265 6420 7365 6e64 733c 2f68 323e fered sends\n+00175d90: 0a3c 703e 5468 6520 656e 7469 7265 206f .

    The entire o\n+00175da0: 7574 626f 756e 6420 6d65 7373 6167 6520 utbound message \n+00175db0: 6361 6e20 6265 2073 746f 7265 6420 696e can be stored in\n+00175dc0: 2061 2062 7566 6665 7220 746f 2064 6574 a buffer to det\n+00175dd0: 6572 6d69 6e65 2074 6865 2048 5454 5020 ermine the HTTP \n+00175de0: 636f 6e74 656e 7420 6c65 6e67 7468 2072 content length r\n+00175df0: 6174 6865 7220 7468 616e 2074 6865 2074 ather than the t\n+00175e00: 776f 2d70 6861 7365 2065 6e63 6f64 696e wo-phase encodin\n+00175e10: 6720 7573 6564 2062 7920 6753 4f41 5020 g used by gSOAP \n+00175e20: 636c 6965 6e74 2d73 6964 6520 7374 7562 client-side stub\n+00175e30: 2066 756e 6374 696f 6e73 2061 6e64 2073 functions and s\n+00175e40: 6572 7665 722d 7369 6465 2073 6b65 6c65 erver-side skele\n+00175e50: 746f 6e20 6675 6e63 7469 6f6e 7320 6765 ton functions ge\n+00175e60: 6e65 7261 7465 6420 6279 2073 6f61 7063 nerated by soapc\n+00175e70: 7070 322c 2077 6869 6368 2070 6572 666f pp2, which perfo\n+00175e80: 726d 2061 2073 6570 6172 6174 6520 7061 rm a separate pa\n+00175e90: 7373 206f 7665 7220 7468 6520 6461 7461 ss over the data\n+00175ea0: 2074 6f20 6465 7465 726d 696e 6520 7468 to determine th\n+00175eb0: 6520 6c65 6e67 7468 206f 6620 7468 6520 e length of the \n+00175ec0: 6f75 7462 6f75 6e64 206d 6573 7361 6765 outbound message\n+00175ed0: 2e20 5365 7474 696e 6720 7468 6520 666c . Setting the fl\n+00175ee0: 6167 203c 636f 6465 3e23 534f 4150 5f49 ag #SOAP_I\n+00175ef0: 4f5f 5354 4f52 453c 2f63 6f64 653e 2066 O_STORE f\n+00175f00: 6f72 2074 6865 206f 7574 7075 7420 6d6f or the output mo\n+00175f10: 6465 2077 696c 6c20 6275 6666 6572 2074 de will buffer t\n+00175f20: 6865 2065 6e74 6972 6520 6d65 7373 6167 he entire messag\n+00175f30: 652e 2054 6869 7320 6d61 7920 6f72 206d e. This may or m\n+00175f40: 6179 206e 6f74 2073 7065 6564 2075 7020 ay not speed up \n+00175f50: 7468 6520 7472 616e 736d 6973 7369 6f6e the transmission\n+00175f60: 206f 6620 6d65 7373 6167 6573 2c20 6465 of messages, de\n+00175f70: 7065 6e64 696e 6720 6f6e 2074 6865 2063 pending on the c\n+00175f80: 6f6e 7465 6e74 2c20 6275 7420 6d61 7920 ontent, but may \n+00175f90: 7265 7175 6972 6520 7369 676e 6966 6963 require signific\n+00175fa0: 616e 7420 7374 6f72 6167 6520 7370 6163 ant storage spac\n+00175fb0: 6520 746f 2068 6f6c 6420 6c61 7267 6520 e to hold large \n+00175fc0: 6d65 7373 6167 6573 2074 656d 706f 7261 messages tempora\n+00175fd0: 7269 6c79 2e3c 2f70 3e0a 3c70 3ef0 9f94 rily.

    .

    ...\n+00175fe0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n+00175ff0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n+00176000: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n+00176010: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .H\n+00176040: 5454 5020 6175 7468 656e 7469 6361 7469 TTP authenticati\n+00176050: 6f6e 3c2f 6832 3e0a 3c70 3e54 6865 2066 on

    .

    The f\n+00176060: 6f6c 6c6f 7769 6e67 2073 6563 7469 6f6e ollowing section\n+00176070: 7320 6578 706c 6169 6e20 686f 7720 746f s explain how to\n+00176080: 2061 7574 6865 6e74 6963 6174 6520 7769 authenticate wi\n+00176090: 7468 2048 5454 5020 6265 6172 6572 2c20 th HTTP bearer, \n+001760a0: 6261 7369 632c 2064 6967 6573 742c 2061 basic, digest, a\n+001760b0: 6e64 204e 544c 4d2e 2050 726f 7879 2061 nd NTLM. Proxy a\n+001760c0: 7574 6865 6e74 6963 6174 696f 6e20 6973 uthentication is\n+001760d0: 2061 6c73 6f20 636f 7665 7265 642e 3c2f also covered..

    You could \n+001760f0: 616c 736f 2075 7365 2074 6865 2057 696e also use the Win\n+00176100: 496e 6574 2070 6c75 6769 6e20 6176 6169 Inet plugin avai\n+00176110: 6c61 626c 6520 696e 2074 6865 203c 656d lable in the gsoap/mod\n+00176130: 5f67 736f 6170 3c2f 636f 6465 3e3c 2f65 _gsoap directory of \n+00176150: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source\n+00176160: 2063 6f64 6520 7061 636b 6167 6520 746f code package to\n+00176170: 2073 696d 706c 6966 7920 496e 7465 726e simplify Intern\n+00176180: 6574 2061 6363 6573 7320 666f 7220 6753 et access for gS\n+00176190: 4f41 5020 636c 6965 6e74 2061 7070 6c69 OAP client appli\n+001761a0: 6361 7469 6f6e 7320 616e 6420 6465 616c cations and deal\n+001761b0: 2077 6974 6820 656e 6372 7970 7469 6f6e with encryption\n+001761c0: 2c20 7072 6f78 6965 732c 2061 6e64 2061 , proxies, and a\n+001761d0: 7574 6865 6e74 6963 6174 696f 6e2c 2073 uthentication, s\n+001761e0: 6565 2074 6865 2067 534f 4150 203c 6120 ee the gSOAP WinInet plu\n+00176220: 6769 6e3c 2f61 3e20 646f 6375 6d65 6e74 gin document\n+00176230: 6174 696f 6e2e 3c2f 703e 0a3c 703e 5468 ation.

    .

    Th\n+00176240: 6520 6753 4f41 5020 4355 524c 2070 6c75 e gSOAP CURL plu\n+00176250: 6769 6e20 6361 6e20 616c 736f 2062 6520 gin can also be \n+00176260: 7573 6564 2074 6f20 6465 7665 6c6f 7020 used to develop \n+00176270: 6753 4f41 5020 636c 6965 6e74 2061 7070 gSOAP client app\n+00176280: 6c69 6361 7469 6f6e 7320 616e 6420 4355 lications and CU\n+00176290: 524c 2069 6d70 6c65 6d65 6e74 7320 7661 RL implements va\n+001762a0: 7269 6f75 7320 4854 5450 2061 7574 6865 rious HTTP authe\n+001762b0: 6e74 6963 6174 696f 6e20 6d65 7468 6f64 ntication method\n+001762c0: 732c 2073 6565 2074 6865 2067 534f 4150 s, see the gSOAP\n+001762d0: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f CURL plugi\n+00176300: 6e3c 2f61 3e20 646f 6375 6d65 6e74 6174 n documentat\n+00176310: 696f 6e2e 3c2f 703e 0a3c 703e f09f 949d ion.

    .

    ....\n+00176320: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+00176330: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+00176340: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+00176350: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3><\n+00176380: 2f61 3e0a 4854 5450 2062 6561 7265 7220 /a>.HTTP bearer \n+00176390: 6175 7468 656e 7469 6361 7469 6f6e 3c2f authentication.

    HTTP bear\n+001763b0: 6572 2061 7574 6865 6e74 6963 6174 696f er authenticatio\n+001763c0: 6e20 6973 2065 6e61 626c 6564 2061 7420 n is enabled at \n+001763d0: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n+001763e0: 6279 2073 6574 7469 6e67 2074 6865 203c by setting the <\n+001763f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+001764b0: 703a 3a62 6561 7265 723c 2f61 3e3c 2f63 p::bearer string to t\n+001764d0: 6865 2062 6561 7265 7220 746f 6b65 6e3a he bearer token:\n+001764e0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n+00176560: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+001765f0: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    .\n+00176600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->b\n+00176690: 6561 7265 723c 2f61 3e20 3d20 3c73 7061 earer = "..\n+001766c0: 2e26 7175 6f74 3b3c 2f73 7061 6e3e 3b20 ."; \n+001766d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so\n+00176710: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n+00176720: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa\n+00176750: 703c 2f61 3e2c 202e 2e2e 2929 3c2f 6469 p, ...)).
    ... // error\n+001767a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else.
    ... // OK<\n+00176820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00176870: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00176880: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+001768c0: 6f61 703a 3a62 6561 7265 723c 2f61 3e3c oap::bearer<\n+001768d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c\n+001768f0: 6861 7220 2a20 6265 6172 6572 3c2f 6469 har * bearer
    User-defina\n+00176920: 626c 6520 4854 5450 2061 7574 686f 7269 ble HTTP authori\n+00176930: 7a61 7469 6f6e 2062 6561 7265 7220 746f zation bearer to\n+00176940: 6b65 6e20 7661 6c75 6520 746f 2062 6520 ken value to be \n+00176950: 7365 6e74 2062 7920 7468 6520 636c 6965 sent by the clie\n+00176960: 6e74 2c20 7365 7276 6572 2073 6964 6520 nt, server side \n+00176970: 7265 6365 6976 6573 2074 2e2e 2e3c 2f64 receives t...
    Definit\n+001769a0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+001769b0: 322e 683a 3337 3532 3c2f 6469 763e 3c2f 2.h:3752
    .

    .\n+001769e0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n+001769f0: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n+00176a00: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .HTTP basic\n+00176a50: 2061 7574 6865 6e74 6963 6174 696f 6e3c authentication<\n+00176a60: 2f68 333e 0a3c 703e 4854 5450 2062 6173 /h3>.

    HTTP bas\n+00176a70: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio\n+00176a80: 6e20 6973 2065 6e61 626c 6564 2061 7420 n is enabled at \n+00176a90: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n+00176aa0: 6279 2073 6574 7469 6e67 2074 6865 203c by setting the <\n+00176ab0: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n+00176ac0: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::u\n+00176b80: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid\n+00176b90: 2061 6e64 203c 636f 6465 3e63 6f6e 7374 and const\n+00176ba0: 2063 6861 722a 203c 6120 636c 6173 733d char* s\n+00176c60: 6f61 703a 3a70 6173 7377 643c 2f61 3e3c oap::passwd<\n+00176c70: 2f63 6f64 653e 2073 7472 696e 6773 2074 /code> strings t\n+00176c80: 6f20 6120 7573 6572 6e61 6d65 2061 6e64 o a username and\n+00176c90: 2070 6173 7377 6f72 642c 2072 6573 7065 password, respe\n+00176ca0: 6374 6976 656c 792e 2041 2073 6572 7665 ctively. A serve\n+00176cb0: 7220 6d61 7920 7265 7175 6573 7420 7573 r may request us\n+00176cc0: 6572 2061 7574 6865 6e74 6963 6174 696f er authenticatio\n+00176cd0: 6e20 616e 6420 6465 6e69 6573 2061 6363 n and denies acc\n+00176ce0: 6573 7320 2848 5454 5020 3430 3120 6572 ess (HTTP 401 er\n+00176cf0: 726f 7229 2077 6865 6e20 7468 6520 636c ror) when the cl\n+00176d00: 6965 6e74 2074 7269 6573 2074 6f20 636f ient tries to co\n+00176d10: 6e6e 6563 7420 7769 7468 6f75 7420 4854 nnect without HT\n+00176d20: 5450 2061 7574 6865 6e74 6963 6174 696f TP authenticatio\n+00176d30: 6e20 286f 7220 7769 7468 2074 6865 2077 n (or with the w\n+00176d40: 726f 6e67 2061 7574 6865 6e74 6963 6174 rong authenticat\n+00176d50: 696f 6e20 696e 666f 726d 6174 696f 6e29 ion information)\n+00176d60: 2e3c 2f70 3e0a 3c70 3e42 6173 6963 2061 .

    .

    Basic a\n+00176d70: 7574 6865 6e74 6963 6174 696f 6e20 7368 uthentication sh\n+00176d80: 6f75 6c64 206f 6e6c 7920 6265 2075 7365 ould only be use\n+00176d90: 6420 6f76 6572 2048 5454 5053 2c20 6265 d over HTTPS, be\n+00176da0: 6361 7573 6520 7468 6520 6372 6564 656e cause the creden\n+00176db0: 7469 616c 7320 6172 6520 7365 6e74 2069 tials are sent i\n+00176dc0: 6e20 7468 6520 636c 6561 7220 7769 7468 n the clear with\n+00176dd0: 2048 5454 502e 2053 6565 2053 6563 7469 HTTP. See Secti\n+00176de0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on \n+00176e10: 5468 6520 4854 5450 2064 6967 6573 7420 The HTTP digest \n+00176e20: 6175 7468 656e 7469 6361 7469 6f6e 2070 authentication p\n+00176e30: 6c75 6769 6e3c 2f61 3e20 746f 2075 7365 lugin to use\n+00176e40: 2074 6865 2048 5454 5020 6469 6765 7374 the HTTP digest\n+00176e50: 2070 6c75 6769 6e20 7468 6174 2069 7320 plugin that is \n+00176e60: 7361 6665 2066 6f72 2061 7574 6865 6e74 safe for authent\n+00176e70: 6963 6174 696f 6e20 6f76 6572 2048 5454 ication over HTT\n+00176e80: 502e 3c2f 703e 0a3c 703e 4865 7265 2069 P.

    .

    Here i\n+00176e90: 7320 616e 2065 7861 6d70 6c65 2063 6c69 s an example cli\n+00176ea0: 656e 7420 636f 6465 2066 7261 676d 656e ent code fragmen\n+00176eb0: 7420 746f 2073 6574 2074 6865 2048 5454 t to set the HTT\n+00176ec0: 5020 6175 7468 656e 7469 6361 7469 6f6e P authentication\n+00176ed0: 2075 7365 726e 616d 6520 616e 6420 7061 username and pa\n+00176ee0: 7373 776f 7264 3a3c 2f70 3e0a 3c64 6976 ssword:

    .
    struct\n+00176f30: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+00176f60: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00176f90: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n+00176ff0: 736f 6170 5f6e 6577 3c2f 613e 2829 3b20 soap_new(); \n+00177000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00177040: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->userid\n+001770a0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+001770c0: 7175 6f74 3b67 7565 7374 2671 756f 743b quot;guest"\n+001770d0: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n+001770e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p\n+00177170: 6173 7377 643c 2f61 3e20 3d20 3c73 7061 asswd = "vi\n+001771a0: 7369 7426 7175 6f74 3b3c 2f73 7061 6e3e sit"\n+001771b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if (\n+001771f0: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n+00177200: 626d 6574 686f 6428 3c61 2063 6c61 7373 bmethod(s\n+00177230: 6f61 703c 2f61 3e2c 202e 2e2e 2929 3c2f oap, ...)).
    ... // error
    .
    else\n+001772c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n+001772e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001772f0: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n+00177300: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .\n+001773d0: 636f 6e73 7420 6368 6172 202a 2070 6173 const char * pas\n+001773e0: 7377 643c 2f64 6976 3e3c 6469 7620 636c swd
    User\n+00177400: 2d64 6566 696e 6162 6c65 2048 5454 5020 -definable HTTP \n+00177410: 616e 6420 4e54 4c4d 2061 7574 686f 7269 and NTLM authori\n+00177420: 7a61 7469 6f6e 2070 6173 7377 6f72 6420 zation password \n+00177430: 7374 7269 6e67 2072 6571 7569 7265 6420 string required \n+00177440: 666f 7220 4854 5450 2062 6173 6963 2061 for HTTP basic a\n+00177450: 6e64 204e 544c 4d20 6175 7468 656e 7469 nd NTLM authenti\n+00177460: 632e 2e2e 3c2f 6469 763e 3c64 6976 2063 c...
    \n+00177480: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00177490: 7374 6473 6f61 7032 2e68 3a33 3832 373c stdsoap2.h:3827<\n+001774a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    c\n+00177570: 6f6e 7374 2063 6861 7220 2a20 7573 6572 onst char * user\n+00177580: 6964 3c2f 6469 763e 3c64 6976 2063 6c61 id
    User-\n+001775a0: 6465 6669 6e61 626c 6520 4854 5450 2061 definable HTTP a\n+001775b0: 6e64 204e 544c 4d20 6175 7468 6f72 697a nd NTLM authoriz\n+001775c0: 6174 696f 6e20 7573 6572 2069 6420 7374 ation user id st\n+001775d0: 7269 6e67 2066 6f72 2048 5454 5020 6261 ring for HTTP ba\n+001775e0: 7369 6320 616e 6420 4e54 4c4d 2061 7574 sic and NTLM aut\n+001775f0: 6865 6e74 6963 6174 696f 6e20 6279 2074 hentication by t\n+00177600: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n+00177620: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00177630: 7464 736f 6170 322e 683a 3338 3232 3c2f tdsoap2.h:3822
    .

    When \n-001787b0: 7468 6520 6175 7468 656e 7469 6361 7469 the authenticati\n-001787c0: 6f6e 2066 6169 6c73 2c20 7468 6520 7365 on fails, the se\n-001787d0: 7276 6963 6520 7265 7370 6f6e 7365 2077 rvice response w\n-001787e0: 6974 6820 6120 534f 4150 2046 6175 6c74 ith a SOAP Fault\n-001787f0: 206d 6573 7361 6765 2061 6e64 2061 2048 message and a H\n-00178800: 5454 5020 6572 726f 7220 636f 6465 2022 TTP error code \"\n-00178810: 3430 3120 556e 6175 7468 6f72 697a 6564 401 Unauthorized\n-00178820: 222e 2054 6865 2048 5454 5020 6572 726f \". The HTTP erro\n-00178830: 7220 636f 6465 7320 6172 6520 6465 7363 r codes are desc\n-00178840: 7269 6265 6420 696e 2053 6563 7469 6f6e ribed in Section\n-00178850: 203c 6120 636c 6173 733d 2265 6c22 2068 Run-ti\n-00178880: 6d65 2065 7272 6f72 2063 6f64 6573 3c2f me error codes .

    .

    To r\n-001788a0: 6574 7572 6e20 6120 6e6f 6e2d 534f 4150 eturn a non-SOAP\n-001788b0: 2065 7272 6f72 2c20 7573 653a 3c2f 703e error, use:

    \n-001788c0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    .

    .... Back to t\n-001789f0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-00178a00: 3c2f 613e 3c2f 703e 0a3c 6833 3e3c 6120

    .

    .HTTP\n-00178a40: 204e 544c 4d20 6175 7468 656e 7469 6361 NTLM authentica\n-00178a50: 7469 6f6e 3c2f 6833 3e0a 3c70 3e48 5454 tion

    .

    HTT\n-00178a60: 5020 4e54 4c4d 2061 7574 6865 6e74 6963 P NTLM authentic\n-00178a70: 6174 696f 6e20 6973 2065 6e61 626c 6564 ation is enabled\n-00178a80: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s\n-00178a90: 6964 6520 6279 2069 6e73 7461 6c6c 696e ide by installin\n-00178aa0: 6720 3c63 6f64 653e 6c69 626e 746c 6d3c g libntlm<\n-00178ab0: 2f63 6f64 653e 2066 726f 6d20 3c61 2068 /code> from http://www.n\n-00178af0: 6f6e 676e 752e 6f72 672f 6c69 626e 746c ongnu.org/libntl\n-00178b00: 6d3c 2f61 3e20 616e 6420 636f 6d70 696c m and compil\n-00178b10: 696e 6720 616c 6c20 7072 6f6a 6563 7420 ing all project \n-00178b20: 736f 7572 6365 2063 6f64 6573 2077 6974 source codes wit\n-00178b30: 6820 7468 6520 636f 6d70 696c 652d 7469 h the compile-ti\n-00178b40: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W\n-00178b50: 4954 485f 4e54 4c4d 3c2f 636f 6465 3e2e ITH_NTLM.\n-00178b60: 3c2f 703e 0a3c 703e 496e 2079 6f75 7220

    .

    In your \n-00178b70: 6170 706c 6963 6174 696f 6e20 636f 6465 application code\n-00178b80: 2073 6574 2074 6865 203c 636f 6465 3e63 set the c\n-00178b90: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::userid<\n-00178c60: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n-00178c70: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n-00178c80: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::p\n-00178d40: 6173 7377 643c 2f61 3e3c 2f63 6f64 653e asswd\n-00178d50: 2073 7472 696e 6773 2074 6f20 6120 7573 strings to a us\n-00178d60: 6572 6e61 6d65 2061 6e64 2070 6173 7377 ername and passw\n-00178d70: 6f72 642e 2041 2073 6572 7665 7220 6d61 ord. A server ma\n-00178d80: 7920 7265 7175 6573 7420 4e54 4c4d 2061 y request NTLM a\n-00178d90: 7574 6865 6e74 6963 6174 696f 6e20 616e uthentication an\n-00178da0: 6420 6465 6e69 6573 2061 6363 6573 7320 d denies access \n-00178db0: 2848 5454 5020 3430 3120 6175 7468 656e (HTTP 401 authen\n-00178dc0: 7469 6361 7469 6f6e 2072 6571 7569 7265 tication require\n-00178dd0: 6420 6f72 2048 5454 5020 3430 3720 4854 d or HTTP 407 HT\n-00178de0: 5450 2070 726f 7879 2061 7574 6865 6e74 TP proxy authent\n-00178df0: 6963 6174 696f 6e20 7265 7175 6972 6564 ication required\n-00178e00: 2920 7768 656e 2074 6865 2063 6c69 656e ) when the clien\n-00178e10: 7420 7472 6965 7320 746f 2063 6f6e 6e65 t tries to conne\n-00178e20: 6374 2077 6974 686f 7574 2048 5454 5020 ct without HTTP \n-00178e30: 6175 7468 656e 7469 6361 7469 6f6e 2028 authentication (\n-00178e40: 6f72 2077 6974 6820 7468 6520 7772 6f6e or with the wron\n-00178e50: 6720 6175 7468 656e 7469 6361 7469 6f6e g authentication\n-00178e60: 2069 6e66 6f72 6d61 7469 6f6e 292e 3c2f information)..

    Here is an\n-00178e80: 2065 7861 6d70 6c65 2063 6c69 656e 7420 example client \n-00178e90: 636f 6465 2066 7261 676d 656e 7420 746f code fragment to\n-00178ea0: 2073 6574 2074 6865 204e 544c 4d20 6175 set the NTLM au\n-00178eb0: 7468 656e 7469 6361 7469 6f6e 2075 7365 thentication use\n-00178ec0: 726e 616d 6520 616e 6420 7061 7373 776f rname and passwo\n-00178ed0: 7264 3a3c 2f70 3e0a 3c64 6976 2063 6c61 rd:

    ..if (soap_call_ns_\n-001790a0: 5f77 6562 6d65 7468 6f64 283c 6120 636c _webmethod(soap, ...)\n-001790e0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    if (soap->\n-00179170: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error == 401) .
    {
    .\n-00179200: 2020 2020 3c61 2063 6c61 7373 3d22 636f
    soap<\n-00179230: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->userid = "\n-001792b0: 5a61 7068 6f64 2671 756f 743b 3c2f 7370 Zaphod";
    . \n-001792e0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->p\n-00179360: 6173 7377 643c 2f61 3e20 3d20 3c73 7061 asswd = "Be\n-00179390: 6562 6c65 6272 6f78 2671 756f 743b 3c2f eblebrox";
    .\n-001793c0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-001793e0: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-001793f0: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n-00179400: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00179430: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))

    .<\n-00179440: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00179450: 3e20 2020 2020 202e 2e2e 203c 7370 616e > ... // error\n-00179480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else
    .
    \n-001794e0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su\n-00179500: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    }
    .<\n-00179530: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00179540: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
    .
    <\n-00179550: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00179560: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n-00179570: 204e 544c 4d20 6861 6e64 7368 616b 6520 NTLM handshake \n-00179580: 6265 7477 6565 6e20 7468 6520 636c 6965 between the clie\n-00179590: 6e74 2043 2061 6e64 2073 6572 7665 7220 nt C and server \n-001795a0: 5320 6973 2070 6572 666f 726d 6564 3a20 S is performed: \n-001795b0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

    1: C  \n-001795d0: 2d2d 2667 743b 2053 2026 616d 703b 2050  --> S & P\n-001795e0: 4f53 5420 2e2e 2e20 0a20 2020 2020 2020  OST ... .       \n-001795f0: 2020 2020 2026 616d 703b 2043 6f6e 7465       & Conte\n-00179600: 6e74 2d54 7970 653a 2074 6578 742f 786d  nt-Type: text/xm\n-00179610: 6c3b 2063 6861 7273 6574 3d75 7466 2d38  l; charset=utf-8\n-00179620: 200a 0a32 3a20 4320 266c 743b 2d2d 2020   ..2: C <--  \n-00179630: 5320 2661 6d70 3b20 3430 3120 556e 6175  S & 401 Unau\n-00179640: 7468 6f72 697a 6564 200a 2020 2020 2020  thorized .      \n-00179650: 2020 2020 2020 2661 6d70 3b20 5757 572d        & WWW-\n-00179660: 4175 7468 656e 7469 6361 7465 3a20 4e54  Authenticate: NT\n-00179670: 4c4d 200a 0a33 3a20 4320 202d 2d26 6774  LM ..3: C  -->\n-00179680: 3b20 5320 2661 6d70 3b20 4745 5420 2e2e  ; S & GET ..\n-00179690: 2e20 0a20 2020 2020 2020 2020 2020 2026  . .            &\n-001796a0: 616d 703b 2041 7574 686f 7269 7a61 7469  amp; Authorizati\n-001796b0: 6f6e 3a20 4e54 4c4d 2026 6c74 3b62 6173  on: NTLM <bas\n-001796c0: 6536 342d 656e 636f 6465 6420 7479 7065  e64-encoded type\n-001796d0: 2d31 2d6d 6573 7361 6765 2667 743b 200a  -1-message> .\n-001796e0: 0a34 3a20 4320 266c 743b 2d2d 2020 5320  .4: C <--  S \n-001796f0: 2661 6d70 3b20 3430 3120 556e 6175 7468  & 401 Unauth\n-00179700: 6f72 697a 6564 200a 2020 2020 2020 2020  orized .        \n-00179710: 2020 2020 2661 6d70 3b20 5757 572d 4175      & WWW-Au\n-00179720: 7468 656e 7469 6361 7465 3a20 4e54 4c4d  thenticate: NTLM\n-00179730: 2026 6c74 3b62 6173 6536 342d 656e 636f   <base64-enco\n-00179740: 6465 6420 7479 7065 2d32 2d6d 6573 7361  ded type-2-messa\n-00179750: 6765 2667 743b 200a 0a35 3a20 4320 202d  ge> ..5: C  -\n-00179760: 2d26 6774 3b20 5320 2661 6d70 3b20 504f  -> S & PO\n-00179770: 5354 202e 2e2e 200a 2020 2020 2020 2020  ST ... .        \n-00179780: 2020 2020 2661 6d70 3b20 436f 6e74 656e      & Conten\n-00179790: 742d 5479 7065 3a20 7465 7874 2f78 6d6c  t-Type: text/xml\n-001797a0: 3b20 6368 6172 7365 743d 7574 662d 3820  ; charset=utf-8 \n-001797b0: 0a20 2020 2020 2020 2020 2020 2026 616d  .            &am\n-001797c0: 703b 2041 7574 686f 7269 7a61 7469 6f6e  p; Authorization\n-001797d0: 3a20 4e54 4c4d 2026 6c74 3b62 6173 6536  : NTLM <base6\n-001797e0: 342d 656e 636f 6465 6420 7479 7065 2d33  4-encoded type-3\n-001797f0: 2d6d 6573 7361 6765 2667 743b 200a 0a36  -message> ..6\n-00179800: 3a20 4320 266c 743b 2d2d 2020 5320 2661  : C <--  S &a\n-00179810: 6d70 3b20 3230 3020 4f4b 0a3c 2f70 7265  mp; 200 OK.

    where stage\n-00179830: 7320 3120 616e 6420 3220 696e 6469 6361 s 1 and 2 indica\n-00179840: 7465 7320 6120 636c 6965 6e74 2061 7474 tes a client att\n-00179850: 656d 7074 696e 6720 746f 2063 6f6e 6e65 empting to conne\n-00179860: 6374 2077 6974 686f 7574 2061 7574 686f ct without autho\n-00179870: 7269 7a61 7469 6f6e 2069 6e66 6f72 6d61 rization informa\n-00179880: 7469 6f6e 2c20 7768 6963 6820 6973 2074 tion, which is t\n-00179890: 6865 2066 6972 7374 206d 6574 686f 6420 he first method \n-001798a0: 6361 6c6c 2069 6e20 7468 6520 636f 6465 call in the code\n-001798b0: 2061 626f 7665 2e20 5374 6167 6520 3320 above. Stage 3 \n-001798c0: 746f 2036 2068 6170 7065 6e20 7769 7468 to 6 happen with\n-001798d0: 2074 6865 2070 726f 7065 7220 636c 6965 the proper clie\n-001798e0: 6e74 2061 7574 6865 6e74 6963 6174 696f nt authenticatio\n-001798f0: 6e20 7365 7420 7769 7468 203c 636f 6465 n set with const char* soap::useri\n-001799d0: 643c 2f61 3e3c 2f63 6f64 653e 2061 6e64 d and\n-001799e0: 203c 636f 6465 3e63 6f6e 7374 2063 6861 const cha\n-001799f0: 722a 203c 6120 636c 6173 733d 2265 6c22 r* soap:\n-00179ab0: 3a70 6173 7377 643c 2f61 3e3c 2f63 6f64 :passwd. Optionally, \n-00179ad0: 7468 6520 3c63 6f64 653e 636f 6e73 7420 the const \n-00179ae0: 6368 6172 2a20 3c61 2063 6c61 7373 3d22 char* so\n-00179ba0: 6170 3a3a 6175 7468 7265 616c 6d3c 2f61 ap::authrealm string \n-00179bc0: 7368 6f75 6c64 2062 6520 7365 7420 6173 should be set as\n-00179bd0: 2077 656c 6c20 746f 2069 6e64 6963 6174 well to indicat\n-00179be0: 6520 7468 6520 646f 6d61 696e 2061 6363 e the domain acc\n-00179bf0: 6573 7365 6420 2874 6869 7320 7374 7269 essed (this stri\n-00179c00: 6e67 2069 7320 6e6f 726d 616c 6c79 2073 ng is normally s\n-00179c10: 6574 2077 6865 6e20 7468 6520 7365 7276 et when the serv\n-00179c20: 6572 2072 6573 706f 6e64 7320 7769 7468 er responds with\n-00179c30: 2048 5454 5020 3430 3120 736f 2074 6865 HTTP 401 so the\n-00179c40: 2063 6c69 656e 7420 7265 6365 6976 6573 client receives\n-00179c50: 2074 6869 7320 7365 7276 6572 2064 6f6d this server dom\n-00179c60: 6169 6e20 696e 666f 726d 6174 696f 6e29 ain information)\n-00179c70: 2e20 4e54 4c4d 2061 7574 6865 6e74 6963 . NTLM authentic\n-00179c80: 6174 6573 2063 6f6e 6e65 6374 696f 6e73 ates connections\n-00179c90: 2c20 6e6f 7420 7265 7175 6573 7473 2e20 , not requests. \n-00179ca0: 5768 656e 2074 6865 2063 6f6e 6e65 6374 When the connect\n-00179cb0: 696f 6e20 6973 206b 6570 7420 616c 6976 ion is kept aliv\n-00179cc0: 652c 2073 7562 7365 7175 656e 7420 6d65 e, subsequent me\n-00179cd0: 7373 6167 6573 2063 616e 2062 6520 6578 ssages can be ex\n-00179ce0: 6368 616e 6765 6420 7769 7468 6f75 7420 changed without \n-00179cf0: 7265 2d61 7574 6865 6e74 6963 6174 696f re-authenticatio\n-00179d00: 6e2e 3c2f 703e 0a3c 703e 546f 2061 766f n.

    .

    To avo\n-00179d10: 6964 2074 6865 206f 7665 7268 6561 6420 id the overhead \n-00179d20: 6f66 2074 6865 2066 6972 7374 2072 656a of the first rej\n-00179d30: 6563 7465 6420 6361 6c6c 2c20 7573 653a ected call, use:\n-00179d40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n-00179dc0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n-00179e50: 7731 3c2f 613e 283c 6120 636c 6173 733d w1(SOAP_I\n-00179eb0: 4f5f 4b45 4550 414c 4956 453c 2f61 3e29 O_KEEPALIVE)\n-00179ec0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n-00179f10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00179f20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00179f30: 6874 6d6c 2361 6632 6339 6537 3736 3136 html#af2c9e77616\n-00179f40: 6331 3332 3833 3165 6266 3034 3164 3965 c132831ebf041d9e\n-00179f50: 3464 3138 6231 223e 6e74 6c6d 5f63 6861 4d18b1\">ntlm_cha\n-00179f60: 6c6c 656e 6765 3c2f 613e 203d 203c 7370 llenge = "&\n-00179f90: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    so\n-00179fe0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->userid =\n-0017a040: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0017a060: 6f74 3b5a 6170 686f 6426 7175 6f74 3b3c ot;Zaphod"<\n-0017a070: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-0017a080: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0017a090: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0017a0c0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pa\n-0017a110: 7373 7764 3c2f 613e 203d 203c 7370 616e sswd = "Bee\n-0017a140: 626c 6562 726f 7826 7175 6f74 3b3c 2f73 blebrox";
    .<\n-0017a170: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017a180: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017a190: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0017a1a0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;auth\n-0017a1f0: 7265 616c 6d3c 2f61 3e20 3d20 3c73 7061 realm = "Ur\n-0017a220: 7361 2d4d 696e 6f72 2671 756f 743b 3c2f sa-Minor";
    .\n-0017a250: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-0017a280: 735f 5f77 6562 6d65 7468 6f64 283c 6120 s__webmethod(soap, ..\n-0017a2c0: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
    .
    .\n-0017a2e0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro\n-0017a300: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n-0017a310: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0017a320: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >else<\n-0017a340: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-0017a360: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su\n-0017a380: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    co\n-0017a460: 6e73 7420 6368 6172 202a 206e 746c 6d5f nst char * ntlm_\n-0017a470: 6368 616c 6c65 6e67 653c 2f64 6976 3e3c challenge
    <\n-0017a480: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0017a490: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n-0017a4a0: 204e 544c 4d20 6175 7468 656e 7469 6361 NTLM authentica\n-0017a4b0: 7469 6f6e 2063 6861 6c6c 656e 6765 206b tion challenge k\n-0017a4c0: 6579 2073 7472 696e 672e 3c2f 6469 763e ey string.
    \n-0017a4d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-0017a4f0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-0017a500: 3a33 3837 383c 2f64 6976 3e3c 2f64 6976 :3878
    .

    When\n-0017a530: 2074 6865 2061 7574 6865 6e74 6963 6174 the authenticat\n-0017a540: 696f 6e20 6661 696c 7320 2873 7461 6765 ion fails (stage\n-0017a550: 2031 2061 6e64 2032 292c 2074 6865 2073 1 and 2), the s\n-0017a560: 6572 7669 6365 2072 6573 706f 6e73 6520 ervice response \n-0017a570: 7769 7468 2048 5454 5020 6572 726f 7220 with HTTP error \n-0017a580: 636f 6465 2022 3430 3120 556e 6175 7468 code \"401 Unauth\n-0017a590: 6f72 697a 6564 2220 616e 6420 3c63 6f64 orized\" and soap::er\n-0017a650: 726f 723c 2f61 3e3c 2f63 6f64 653e 2069 ror i\n-0017a660: 7320 7365 7420 746f 2048 5454 5020 636f s set to HTTP co\n-0017a670: 6465 2034 3031 2e3c 2f70 3e0a 3c70 3ef0 de 401.

    .

    .\n-0017a680: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-0017a690: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-0017a6a0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .HTTP p\n-0017a6f0: 726f 7879 204e 544c 4d20 6175 7468 656e roxy NTLM authen\n-0017a700: 7469 6361 7469 6f6e 3c2f 6833 3e0a 3c70 tication

    .For HTTP 407 Pr\n-0017a720: 6f78 7920 4175 7468 656e 7469 6361 7469 oxy Authenticati\n-0017a730: 6f6e 2052 6571 7569 7265 6420 7365 7420 on Required set \n-0017a740: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::p\n-0017a800: 726f 7879 5f75 7365 7269 643c 2f61 3e3c roxy_userid<\n-0017a810: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap::proxy_pas\n-0017a8e0: 7377 643c 2f61 3e3c 2f63 6f64 653e 3a3c swd:<\n-0017a8f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    struct \n-0017a940: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0017a970: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-0017a9a0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n-0017aa00: 313c 2f61 3e28 3c61 2063 6c61 7373 3d22 1(SOAP_IO\n-0017aa60: 5f4b 4545 5041 4c49 5645 3c2f 613e 293b _KEEPALIVE);\n-0017aa70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->proxy_hos\n-0017ab10: 743c 2f61 3e20 3d20 3c73 7061 6e20 636c t = "...&qu\n-0017ab40: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    soap\n-0017ab90: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_port\n-0017abf0: 203d 202e 2e2e 3b20 3c2f 6469 763e 0a3c = ...;
    .<\n-0017ac00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0017ac10: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n-0017ac40: 6e73 5f5f 7765 626d 6574 686f 6428 3c61 ns__webmethod(soap, .\n-0017ac80: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    .{<\n-0017aca0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (<\n-0017ace0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017acf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017ad00: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0017ad10: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-0017ad60: 723c 2f61 3e20 3d3d 2034 3037 2920 3c2f r == 407) .
    {
    \n-0017ad90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n-0017add0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->proxy_userid\n-0017ae30: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Zaphod&\n-0017ae60: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    soap-><\n-0017aec0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017aed0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017aee0: 6874 6d6c 2361 6437 3561 3461 6265 3131 html#ad75a4abe11\n-0017aef0: 3961 3161 3734 6132 3664 3036 3430 3166 9a1a74a26d06401f\n-0017af00: 6131 3163 3361 223e 7072 6f78 795f 7061 a11c3a\">proxy_pa\n-0017af10: 7373 7764 3c2f 613e 203d 203c 7370 616e sswd = "Bee\n-0017af40: 626c 6562 726f 7826 7175 6f74 3b3c 2f73 blebrox";
    . \n-0017af70: 2020 203c 6120 636c 6173 733d 2263 6f64 soap->\n-0017aff0: 6175 7468 7265 616c 6d3c 2f61 3e20 3d20 authrealm = \n-0017b000: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0017b020: 743b 5572 7361 2d4d 696e 6f72 2671 756f t;Ursa-Minor&quo\n-0017b030: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    if (soa\n-0017b080: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n-0017b090: 7468 6f64 283c 6120 636c 6173 733d 2263 thod(soap\n-0017b0c0: 3c2f 613e 2c20 2e2e 2e29 2920 3c2f 6469 , ...)) .
    ... <\n-0017b0f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0017b100: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent\">// error
    .
    \n-0017b130: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-0017b150: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-0017b170: 2020 2020 202e 2e2e 203c 7370 616e 2063 ... /\n-0017b190: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success\n-0017b1a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0017b1f0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    in\n-0017b270: 7420 7072 6f78 795f 706f 7274 3c2f 6469 t proxy_port
    User-defina\n-0017b2a0: 626c 6520 7072 6f78 7920 706f 7274 2077 ble proxy port w\n-0017b2b0: 6869 6368 2073 686f 756c 6420 6265 2073 hich should be s\n-0017b2c0: 6574 2074 6f20 636f 6e6e 6563 7420 7468 et to connect th\n-0017b2d0: 726f 7567 6820 616e 2048 5454 5020 7072 rough an HTTP pr\n-0017b2e0: 6f78 7920 2874 6865 2076 616c 7565 2069 oxy (the value i\n-0017b2f0: 7320 3830 3830 2062 7920 2e2e 2e3c 2f64 s 8080 by ...
    Definit\n-0017b320: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0017b330: 322e 683a 3339 3036 3c2f 6469 763e 3c2f 2.h:3906
    .
    co\n-0017b410: 6e73 7420 6368 6172 202a 2070 726f 7879 nst char * proxy\n-0017b420: 5f75 7365 7269 643c 2f64 6976 3e3c 6469 _userid
    \n-0017b440: 5573 6572 2d64 6566 696e 6162 6c65 2070 User-definable p\n-0017b450: 726f 7879 2061 7574 686f 7269 7a61 7469 roxy authorizati\n-0017b460: 6f6e 2075 7365 7220 6964 2073 7472 696e on user id strin\n-0017b470: 6720 746f 2061 7574 6865 6e74 6963 6174 g to authenticat\n-0017b480: 6520 616e 6420 636f 6e6e 6563 7420 746f e and connect to\n-0017b490: 2061 6e20 4854 5450 2070 726f 7879 2e3c an HTTP proxy.<\n-0017b4a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0017b4c0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0017b4d0: 6170 322e 683a 3339 3131 3c2f 6469 763e ap2.h:3911
    \n-0017b4e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0017b530: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    co\n-0017b5b0: 6e73 7420 6368 6172 202a 2070 726f 7879 nst char * proxy\n-0017b5c0: 5f68 6f73 743c 2f64 6976 3e3c 6469 7620 _host
    Us\n-0017b5e0: 6572 2d64 6566 696e 6162 6c65 2070 726f er-definable pro\n-0017b5f0: 7879 2068 6f73 7420 6e61 6d65 2073 7472 xy host name str\n-0017b600: 696e 6720 7768 6963 6820 7368 6f75 6c64 ing which should\n-0017b610: 2062 6520 7365 7420 746f 2063 6f6e 6e65 be set to conne\n-0017b620: 6374 2074 6872 6f75 6768 2061 6e20 4854 ct through an HT\n-0017b630: 5450 2070 726f 7879 2e3c 2f64 6976 3e3c TP proxy.
    <\n-0017b640: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-0017b650: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-0017b660: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-0017b670: 3339 3031 3c2f 6469 763e 3c2f 6469 763e 3901
    \n-0017b680: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n-0017b720: 7072 6f78 795f 7061 7373 7764 3c2f 613e proxy_passwd\n-0017b730: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n-0017b750: 6368 6172 202a 2070 726f 7879 5f70 6173 char * proxy_pas\n-0017b760: 7377 643c 2f64 6976 3e3c 6469 7620 636c swd
    User\n-0017b780: 2d64 6566 696e 6162 6c65 2070 726f 7879 -definable proxy\n-0017b790: 2061 7574 686f 7269 7a61 7469 6f6e 2070 authorization p\n-0017b7a0: 6173 7377 6f72 6420 7374 7269 6e67 2074 assword string t\n-0017b7b0: 6f20 6175 7468 656e 7469 6361 7465 2061 o authenticate a\n-0017b7c0: 6e64 2063 6f6e 6e65 6374 2074 6f20 616e nd connect to an\n-0017b7d0: 2048 5454 5020 7072 6f78 792e 3c2f 6469 HTTP proxy.
    Definiti\n-0017b800: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0017b810: 2e68 3a33 3931 363c 2f64 6976 3e3c 2f64 .h:3916
    .

    To\n-0017b840: 2061 766f 6964 2074 6865 206f 7665 7268 avoid the overh\n-0017b850: 6561 6420 6f66 2074 6865 2066 6972 7374 ead of the first\n-0017b860: 2072 656a 6563 7465 6420 6361 6c6c 2c20 rejected call, \n-0017b870: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    ..<\n-0017ba10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017ba20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017ba30: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0017ba40: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;prox\n-0017ba90: 795f 686f 7374 3c2f 613e 203d 203c 7370 y_host = ".\n-0017bac0: 2e2e 2671 756f 743b 3c2f 7370 616e 3e3b ..";\n-0017bad0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->proxy_por\n-0017bb70: 743c 2f61 3e20 3d20 2e2e 2e3b 203c 2f64 t = ...; .
    soa\n-0017bbc0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->proxy_userid<\n-0017bc20: 2f61 3e20 3d20 3c73 7061 6e20 636c 6173 /a> = "Zaphod&q\n-0017bc50: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; ..
    soap->authrealm\n-0017bde0: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Ursa-Mi\n-0017be10: 6e6f 7226 7175 6f74 3b3c 2f73 7061 6e3e nor"\n-0017be20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n-0017be70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017be80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017be90: 6874 6d6c 2361 6632 6339 6537 3736 3136 html#af2c9e77616\n-0017bea0: 6331 3332 3833 3165 6266 3034 3164 3965 c132831ebf041d9e\n-0017beb0: 3464 3138 6231 223e 6e74 6c6d 5f63 6861 4d18b1\">ntlm_cha\n-0017bec0: 6c6c 656e 6765 3c2f 613e 203d 203c 7370 llenge = "&\n-0017bef0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    if (soap\n-0017bf40: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n-0017bf50: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap<\n-0017bf80: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...)) .
    ... \n-0017bfc0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-0017bfd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else.
    ... // success
    .
    \n-0017c060: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This will\n-0017f6e0: 2072 6573 756c 7420 696e 2061 2074 696d result in a tim\n-0017f6f0: 656f 7574 2069 6620 6e6f 2064 6174 6120 eout if no data \n-0017f700: 6361 6e20 6265 2073 656e 6420 696e 2031 can be send in 1\n-0017f710: 3020 7365 636f 6e64 7320 616e 6420 6e6f 0 seconds and no\n-0017f720: 2064 6174 6120 6973 2072 6563 6569 7665 data is receive\n-0017f730: 6420 7769 7468 696e 2031 3020 7365 636f d within 10 seco\n-0017f740: 6e64 7320 6166 7465 7220 696e 6974 6961 nds after initia\n-0017f750: 7469 6e67 2061 2073 656e 6420 6f72 2072 ting a send or r\n-0017f760: 6563 6569 7665 206f 7065 7261 7469 6f6e eceive operation\n-0017f770: 206f 7665 7220 7468 6520 736f 636b 6574 over the socket\n-0017f780: 2e20 4120 7661 6c75 6520 6f66 207a 6572 . A value of zer\n-0017f790: 6f20 6469 7361 626c 6573 2074 696d 656f o disables timeo\n-0017f7a0: 7574 2c20 666f 7220 6578 616d 706c 653a ut, for example:\n-0017f7b0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n-0017f830: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n-0017f8c0: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    .\n-0017f8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->s\n-0017f960: 656e 645f 7469 6d65 6f75 743c 2f61 3e20 end_timeout \n-0017f970: 3d20 303b 203c 2f64 6976 3e0a 3c64 6976 = 0;
    .soap-&g\n-0017f9c0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;recv_\n-0017fa10: 7469 6d65 6f75 743c 2f61 3e20 3d20 303b timeout = 0;\n-0017fa20: 2020 3c2f 6469 763e 0a3c 6469 7620 636c
    .
    soap-><\n-0017fa70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017fa80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017fa90: 6874 6d6c 2361 6335 6435 6662 3932 6666 html#ac5d5fb92ff\n-0017faa0: 6664 6137 3234 6363 6233 6230 3338 6432 fda724ccb3b038d2\n-0017fab0: 6262 3233 3838 223e 7265 6376 5f74 696d bb2388\">recv_tim\n-0017fac0: 656f 7574 3c2f 613e 203d 2030 3b20 3c2f eout = 0; .

    W\n-0017faf0: 6865 6e20 6120 7469 6d65 6f75 7420 6f63 hen a timeout oc\n-0017fb00: 6375 7273 2069 6e20 7468 6520 7365 6e64 curs in the send\n-0017fb10: 206f 7220 7265 6365 6976 6520 6f70 6572 or receive oper\n-0017fb20: 6174 696f 6e73 2c20 6120 3c63 6f64 653e ations, a \n-0017fb30: 2353 4f41 505f 454f 463c 2f63 6f64 653e #SOAP_EOF\n-0017fb40: 2065 7863 6570 7469 6f6e 2077 696c 6c20 exception will \n-0017fb50: 6265 2072 6169 7365 6420 2822 656e 6420 be raised (\"end \n-0017fb60: 6f66 2066 696c 6520 6f72 206e 6f20 696e of file or no in\n-0017fb70: 7075 7422 292e 204e 6567 6174 6976 6520 put\"). Negative \n-0017fb80: 7469 6d65 6f75 7420 7661 6c75 6573 206d timeout values m\n-0017fb90: 6561 7375 7265 2074 696d 656f 7574 7320 easure timeouts \n-0017fba0: 696e 206d 6963 726f 7365 636f 6e64 732c in microseconds,\n-0017fbb0: 2066 6f72 2065 7861 6d70 6c65 3a3c 2f70 for example:.

    #define uSe\n-0017fc10: 6320 2a2d 3120 3c2f 7370 616e 3e3c 2f64 c *-1 .
    #define mSec *-\n-0017fc60: 3130 3030 203c 2f73 7061 6e3e 3c2f 6469 1000 if\n+00178010: 3c2f 7370 616e 3e20 2821 3c61 2063 6c61 (!soap->userid
    .
    || \n+001780c0: 213c 6120 636c 6173 733d 2263 6f64 6522 !soap\n+001780f0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pa\n+00178140: 7373 7764 3c2f 613e 3c2f 6469 763e 0a3c sswd
    .<\n+00178150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00178160: 3e20 2020 7c7c 2073 7472 636d 7028 3c61 > || strcmp(soap-&g\n+001781a0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;useri\n+001781f0: 643c 2f61 3e2c 203c 7370 616e 2063 6c61 d, "guest&q\n+00178220: 756f 743b 3c2f 7370 616e 3e29 3c2f 6469 uot;).
    || strcm\n+00178250: 7028 3c61 2063 6c61 7373 3d22 636f 6465 p(soap->p\n+001782d0: 6173 7377 643c 2f61 3e2c 203c 7370 616e asswd, "vis\n+00178300: 6974 2671 756f 743b 3c2f 7370 616e 3e29 it")\n+00178310: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    soap-><\n+00178380: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00178390: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001783a0: 6874 6d6c 2361 3864 6265 3537 6435 3966 html#a8dbe57d59f\n+001783b0: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7\n+001783c0: 3933 3962 6664 223e 6175 7468 7265 616c 939bfd\">authreal\n+001783d0: 6d3c 2f61 3e20 3d20 3c73 7061 6e20 636c m = "...&qu\n+00178400: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // domain real\n+00178430: 6d20 6163 6365 7373 6564 2028 6f70 7469 m accessed (opti\n+00178440: 6f6e 616c 2c20 4e55 4c4c 2074 6f20 6f6d onal, NULL to om\n+00178450: 6974 293c 2f73 7061 6e3e 3c2f 6469 763e it)
    \n+00178460: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return 4\n+001784a0: 3031 3b20 3c2f 6469 763e 0a3c 6469 7620 01;
    .
    }\n+001784c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n+001784e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001784f0: 656e 7422 3e2f 2f20 7765 626d 6574 686f ent\">// webmetho\n+00178500: 6420 6c6f 6769 633c 2f73 7061 6e3e 3c2f d logic.
    return\n+00178550: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n+001785b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }.
    <\n+00178630: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+00178640: 6170 2e68 746d 6c23 6138 6462 6535 3764 ap.html#a8dbe57d\n+00178650: 3539 6636 3833 6439 3933 3035 6134 3462 59f683d99305a44b\n+00178660: 3464 3739 3339 6266 6422 3e73 6f61 703a 4d7939bfd\">soap:\n+00178670: 3a61 7574 6872 6561 6c6d 3c2f 613e 3c2f :authrealm
    const ch\n+001786a0: 6172 202a 2061 7574 6872 6561 6c6d 3c2f ar * authrealm
    The HTTP \n+001786d0: 616e 6420 4e54 4c4d 2061 7574 686f 7269 and NTLM authori\n+001786e0: 7a61 7469 6f6e 2072 6561 6c6d 2f64 6f6d zation realm/dom\n+001786f0: 6169 6e20 7374 7269 6e67 2072 6563 6569 ain string recei\n+00178700: 7665 6420 6279 2074 6865 2063 6c69 656e ved by the clien\n+00178710: 7420 7769 7468 2074 6865 2057 5757 2d41 t with the WWW-A\n+00178720: 7574 6865 6e74 6963 6174 6520 2e2e 2e3c uthenticate ...<\n+00178730: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00178750: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00178760: 6170 322e 683a 3338 3332 3c2f 6469 763e ap2.h:3832
    \n+00178770: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    When the authen\n+001787a0: 7469 6361 7469 6f6e 2066 6169 6c73 2c20 tication fails, \n+001787b0: 7468 6520 7365 7276 6963 6520 7265 7370 the service resp\n+001787c0: 6f6e 7365 2077 6974 6820 6120 534f 4150 onse with a SOAP\n+001787d0: 2046 6175 6c74 206d 6573 7361 6765 2061 Fault message a\n+001787e0: 6e64 2061 2048 5454 5020 6572 726f 7220 nd a HTTP error \n+001787f0: 636f 6465 2022 3430 3120 556e 6175 7468 code \"401 Unauth\n+00178800: 6f72 697a 6564 222e 2054 6865 2048 5454 orized\". The HTT\n+00178810: 5020 6572 726f 7220 636f 6465 7320 6172 P error codes ar\n+00178820: 6520 6465 7363 7269 6265 6420 696e 2053 e described in S\n+00178830: 6563 7469 6f6e 203c 6120 636c 6173 733d ection \n+00178860: 5275 6e2d 7469 6d65 2065 7272 6f72 2063 Run-time error c\n+00178870: 6f64 6573 3c2f 613e 202e 3c2f 703e 0a3c odes .

    .<\n+00178880: 703e 546f 2072 6574 7572 6e20 6120 6e6f p>To return a no\n+00178890: 6e2d 534f 4150 2065 7272 6f72 2c20 7573 n-SOAP error, us\n+001788a0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+001788d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001788e0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001788f0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_send\n+00178950: 5f65 6d70 7479 5f72 6573 706f 6e73 653c _empty_response<\n+00178960: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00178990: 2f61 3e2c 2034 3031 293b 203c 2f64 6976 /a>, 401); .

    ....\n+001789c0: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+001789d0: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+001789e0: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+001789f0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.HTTP NTLM auth\n+00178a30: 656e 7469 6361 7469 6f6e 3c2f 6833 3e0a entication.\n+00178a40: 3c70 3e48 5454 5020 4e54 4c4d 2061 7574

    HTTP NTLM aut\n+00178a50: 6865 6e74 6963 6174 696f 6e20 6973 2065 hentication is e\n+00178a60: 6e61 626c 6564 2061 7420 7468 6520 636c nabled at the cl\n+00178a70: 6965 6e74 2d73 6964 6520 6279 2069 6e73 ient-side by ins\n+00178a80: 7461 6c6c 696e 6720 3c63 6f64 653e 6c69 talling li\n+00178a90: 626e 746c 6d3c 2f63 6f64 653e 2066 726f bntlm fro\n+00178aa0: 6d20 3c61 2068 7265 663d 2268 7474 703a m http:/\n+00178ad0: 2f77 7777 2e6e 6f6e 676e 752e 6f72 672f /www.nongnu.org/\n+00178ae0: 6c69 626e 746c 6d3c 2f61 3e20 616e 6420 libntlm and \n+00178af0: 636f 6d70 696c 696e 6720 616c 6c20 7072 compiling all pr\n+00178b00: 6f6a 6563 7420 736f 7572 6365 2063 6f64 oject source cod\n+00178b10: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp\n+00178b20: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_NTLM.

    .

    In\n+00178b50: 2079 6f75 7220 6170 706c 6963 6174 696f your applicatio\n+00178b60: 6e20 636f 6465 2073 6574 2074 6865 203c n code set the <\n+00178b70: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n+00178b80: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::u\n+00178c40: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid\n+00178c50: 2061 6e64 203c 636f 6465 3e63 6f6e 7374 and const\n+00178c60: 2063 6861 722a 203c 6120 636c 6173 733d char* s\n+00178d20: 6f61 703a 3a70 6173 7377 643c 2f61 3e3c oap::passwd<\n+00178d30: 2f63 6f64 653e 2073 7472 696e 6773 2074 /code> strings t\n+00178d40: 6f20 6120 7573 6572 6e61 6d65 2061 6e64 o a username and\n+00178d50: 2070 6173 7377 6f72 642e 2041 2073 6572 password. A ser\n+00178d60: 7665 7220 6d61 7920 7265 7175 6573 7420 ver may request \n+00178d70: 4e54 4c4d 2061 7574 6865 6e74 6963 6174 NTLM authenticat\n+00178d80: 696f 6e20 616e 6420 6465 6e69 6573 2061 ion and denies a\n+00178d90: 6363 6573 7320 2848 5454 5020 3430 3120 ccess (HTTP 401 \n+00178da0: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r\n+00178db0: 6571 7569 7265 6420 6f72 2048 5454 5020 equired or HTTP \n+00178dc0: 3430 3720 4854 5450 2070 726f 7879 2061 407 HTTP proxy a\n+00178dd0: 7574 6865 6e74 6963 6174 696f 6e20 7265 uthentication re\n+00178de0: 7175 6972 6564 2920 7768 656e 2074 6865 quired) when the\n+00178df0: 2063 6c69 656e 7420 7472 6965 7320 746f client tries to\n+00178e00: 2063 6f6e 6e65 6374 2077 6974 686f 7574 connect without\n+00178e10: 2048 5454 5020 6175 7468 656e 7469 6361 HTTP authentica\n+00178e20: 7469 6f6e 2028 6f72 2077 6974 6820 7468 tion (or with th\n+00178e30: 6520 7772 6f6e 6720 6175 7468 656e 7469 e wrong authenti\n+00178e40: 6361 7469 6f6e 2069 6e66 6f72 6d61 7469 cation informati\n+00178e50: 6f6e 292e 3c2f 703e 0a3c 703e 4865 7265 on).

    .

    Here\n+00178e60: 2069 7320 616e 2065 7861 6d70 6c65 2063 is an example c\n+00178e70: 6c69 656e 7420 636f 6465 2066 7261 676d lient code fragm\n+00178e80: 656e 7420 746f 2073 6574 2074 6865 204e ent to set the N\n+00178e90: 544c 4d20 6175 7468 656e 7469 6361 7469 TLM authenticati\n+00178ea0: 6f6e 2075 7365 726e 616d 6520 616e 6420 on username and \n+00178eb0: 7061 7373 776f 7264 3a3c 2f70 3e0a 3c64 password:

    .
    stru\n+00178f00: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new1(\n+00178fd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_IO_KEEPA\n+00179030: 4c49 5645 3c2f 613e 293b 203c 2f64 6976 LIVE); .
    if\n+00179070: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n+00179080: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n+00179090: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001790c0: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))
    .<\n+001790d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001790e0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if\n+00179120: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e\n+001791a0: 7272 6f72 3c2f 613e 203d 3d20 3430 3129 rror == 401)\n+001791b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap->userid = \n+00179290: 2671 756f 743b 5a61 7068 6f64 2671 756f "Zaphod&quo\n+001792a0: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    s\n+001792f0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->passwd \n+00179350: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+00179370: 756f 743b 4265 6562 6c65 6272 6f78 2671 uot;Beeblebrox&q\n+00179380: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    if (s\n+001793d0: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n+001793e0: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n+00179410: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
    ...\n+00179440: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+00179460: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00179480: 2020 203c 7370 616e 2063 6c61 7373 3d22 els\n+001794a0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n+001794b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001794c0: 3e20 2020 2020 202e 2e2e 203c 7370 616e > ... // success
    .
    }.
    }
    .<\n+00179530: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The fol\n+00179550: 6c6f 7769 6e67 204e 544c 4d20 6861 6e64 lowing NTLM hand\n+00179560: 7368 616b 6520 6265 7477 6565 6e20 7468 shake between th\n+00179570: 6520 636c 6965 6e74 2043 2061 6e64 2073 e client C and s\n+00179580: 6572 7665 7220 5320 6973 2070 6572 666f erver S is perfo\n+00179590: 726d 6564 3a20 3c2f 703e 3c70 7265 2063 rmed:

    \n+001795b0: 313a 2043 2020 2d2d 2667 743b 2053 2026  1: C  --> S &\n+001795c0: 616d 703b 2050 4f53 5420 2e2e 2e20 0a20  amp; POST ... . \n+001795d0: 2020 2020 2020 2020 2020 2026 616d 703b             &\n+001795e0: 2043 6f6e 7465 6e74 2d54 7970 653a 2074   Content-Type: t\n+001795f0: 6578 742f 786d 6c3b 2063 6861 7273 6574  ext/xml; charset\n+00179600: 3d75 7466 2d38 200a 0a32 3a20 4320 266c  =utf-8 ..2: C &l\n+00179610: 743b 2d2d 2020 5320 2661 6d70 3b20 3430  t;--  S & 40\n+00179620: 3120 556e 6175 7468 6f72 697a 6564 200a  1 Unauthorized .\n+00179630: 2020 2020 2020 2020 2020 2020 2661 6d70              &\n+00179640: 3b20 5757 572d 4175 7468 656e 7469 6361  ; WWW-Authentica\n+00179650: 7465 3a20 4e54 4c4d 200a 0a33 3a20 4320  te: NTLM ..3: C \n+00179660: 202d 2d26 6774 3b20 5320 2661 6d70 3b20   --> S & \n+00179670: 4745 5420 2e2e 2e20 0a20 2020 2020 2020  GET ... .       \n+00179680: 2020 2020 2026 616d 703b 2041 7574 686f       & Autho\n+00179690: 7269 7a61 7469 6f6e 3a20 4e54 4c4d 2026  rization: NTLM &\n+001796a0: 6c74 3b62 6173 6536 342d 656e 636f 6465  lt;base64-encode\n+001796b0: 6420 7479 7065 2d31 2d6d 6573 7361 6765  d type-1-message\n+001796c0: 2667 743b 200a 0a34 3a20 4320 266c 743b  > ..4: C <\n+001796d0: 2d2d 2020 5320 2661 6d70 3b20 3430 3120  --  S & 401 \n+001796e0: 556e 6175 7468 6f72 697a 6564 200a 2020  Unauthorized .  \n+001796f0: 2020 2020 2020 2020 2020 2661 6d70 3b20            & \n+00179700: 5757 572d 4175 7468 656e 7469 6361 7465  WWW-Authenticate\n+00179710: 3a20 4e54 4c4d 2026 6c74 3b62 6173 6536  : NTLM <base6\n+00179720: 342d 656e 636f 6465 6420 7479 7065 2d32  4-encoded type-2\n+00179730: 2d6d 6573 7361 6765 2667 743b 200a 0a35  -message> ..5\n+00179740: 3a20 4320 202d 2d26 6774 3b20 5320 2661  : C  --> S &a\n+00179750: 6d70 3b20 504f 5354 202e 2e2e 200a 2020  mp; POST ... .  \n+00179760: 2020 2020 2020 2020 2020 2661 6d70 3b20            & \n+00179770: 436f 6e74 656e 742d 5479 7065 3a20 7465  Content-Type: te\n+00179780: 7874 2f78 6d6c 3b20 6368 6172 7365 743d  xt/xml; charset=\n+00179790: 7574 662d 3820 0a20 2020 2020 2020 2020  utf-8 .         \n+001797a0: 2020 2026 616d 703b 2041 7574 686f 7269     & Authori\n+001797b0: 7a61 7469 6f6e 3a20 4e54 4c4d 2026 6c74  zation: NTLM <\n+001797c0: 3b62 6173 6536 342d 656e 636f 6465 6420  ;base64-encoded \n+001797d0: 7479 7065 2d33 2d6d 6573 7361 6765 2667  type-3-message&g\n+001797e0: 743b 200a 0a36 3a20 4320 266c 743b 2d2d  t; ..6: C <--\n+001797f0: 2020 5320 2661 6d70 3b20 3230 3020 4f4b    S & 200 OK\n+00179800: 0a3c 2f70 7265 3e3c 703e 2077 6865 7265  .

    where\n+00179810: 2073 7461 6765 7320 3120 616e 6420 3220 stages 1 and 2 \n+00179820: 696e 6469 6361 7465 7320 6120 636c 6965 indicates a clie\n+00179830: 6e74 2061 7474 656d 7074 696e 6720 746f nt attempting to\n+00179840: 2063 6f6e 6e65 6374 2077 6974 686f 7574 connect without\n+00179850: 2061 7574 686f 7269 7a61 7469 6f6e 2069 authorization i\n+00179860: 6e66 6f72 6d61 7469 6f6e 2c20 7768 6963 nformation, whic\n+00179870: 6820 6973 2074 6865 2066 6972 7374 206d h is the first m\n+00179880: 6574 686f 6420 6361 6c6c 2069 6e20 7468 ethod call in th\n+00179890: 6520 636f 6465 2061 626f 7665 2e20 5374 e code above. St\n+001798a0: 6167 6520 3320 746f 2036 2068 6170 7065 age 3 to 6 happe\n+001798b0: 6e20 7769 7468 2074 6865 2070 726f 7065 n with the prope\n+001798c0: 7220 636c 6965 6e74 2061 7574 6865 6e74 r client authent\n+001798d0: 6963 6174 696f 6e20 7365 7420 7769 7468 ication set with\n+001798e0: 203c 636f 6465 3e63 6f6e 7374 2063 6861 const cha\n+001798f0: 722a 203c 6120 636c 6173 733d 2265 6c22 r* soap:\n+001799b0: 3a75 7365 7269 643c 2f61 3e3c 2f63 6f64 :userid and con\n+001799d0: 7374 2063 6861 722a 203c 6120 636c 6173 st char* soap::passwd. Option\n+00179ab0: 616c 6c79 2c20 7468 6520 3c63 6f64 653e ally, the \n+00179ac0: 636f 6e73 7420 6368 6172 2a20 3c61 2063 const char* soap::authre\n+00179b90: 616c 6d3c 2f61 3e3c 2f63 6f64 653e 2073 alm s\n+00179ba0: 7472 696e 6720 7368 6f75 6c64 2062 6520 tring should be \n+00179bb0: 7365 7420 6173 2077 656c 6c20 746f 2069 set as well to i\n+00179bc0: 6e64 6963 6174 6520 7468 6520 646f 6d61 ndicate the doma\n+00179bd0: 696e 2061 6363 6573 7365 6420 2874 6869 in accessed (thi\n+00179be0: 7320 7374 7269 6e67 2069 7320 6e6f 726d s string is norm\n+00179bf0: 616c 6c79 2073 6574 2077 6865 6e20 7468 ally set when th\n+00179c00: 6520 7365 7276 6572 2072 6573 706f 6e64 e server respond\n+00179c10: 7320 7769 7468 2048 5454 5020 3430 3120 s with HTTP 401 \n+00179c20: 736f 2074 6865 2063 6c69 656e 7420 7265 so the client re\n+00179c30: 6365 6976 6573 2074 6869 7320 7365 7276 ceives this serv\n+00179c40: 6572 2064 6f6d 6169 6e20 696e 666f 726d er domain inform\n+00179c50: 6174 696f 6e29 2e20 4e54 4c4d 2061 7574 ation). NTLM aut\n+00179c60: 6865 6e74 6963 6174 6573 2063 6f6e 6e65 henticates conne\n+00179c70: 6374 696f 6e73 2c20 6e6f 7420 7265 7175 ctions, not requ\n+00179c80: 6573 7473 2e20 5768 656e 2074 6865 2063 ests. When the c\n+00179c90: 6f6e 6e65 6374 696f 6e20 6973 206b 6570 onnection is kep\n+00179ca0: 7420 616c 6976 652c 2073 7562 7365 7175 t alive, subsequ\n+00179cb0: 656e 7420 6d65 7373 6167 6573 2063 616e ent messages can\n+00179cc0: 2062 6520 6578 6368 616e 6765 6420 7769 be exchanged wi\n+00179cd0: 7468 6f75 7420 7265 2d61 7574 6865 6e74 thout re-authent\n+00179ce0: 6963 6174 696f 6e2e 3c2f 703e 0a3c 703e ication.

    .

    \n+00179cf0: 546f 2061 766f 6964 2074 6865 206f 7665 To avoid the ove\n+00179d00: 7268 6561 6420 6f66 2074 6865 2066 6972 rhead of the fir\n+00179d10: 7374 2072 656a 6563 7465 6420 6361 6c6c st rejected call\n+00179d20: 2c20 7573 653a 3c2f 703e 0a3c 6469 7620 , use:

    .
    .<\n+00179eb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00179ec0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+00179ef0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->nt\n+00179f40: 6c6d 5f63 6861 6c6c 656e 6765 3c2f 613e lm_challenge\n+00179f50: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+00179f70: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;";
    .
    soap->\n+00179fd0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;userid\n+0017a020: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Zaphod&\n+0017a050: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    so\n+0017a0a0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->passwd =\n+0017a100: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0017a120: 6f74 3b42 6565 626c 6562 726f 7826 7175 ot;Beeblebrox&qu\n+0017a130: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    soap\n+0017a180: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->authrealm \n+0017a1e0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0017a200: 756f 743b 5572 7361 2d4d 696e 6f72 2671 uot;Ursa-Minor&q\n+0017a210: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    \n+0017a250: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+0017a260: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n+0017a270: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    \n+0017a2b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n+0017a2e0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else.
    ... // success
    .
    \n+0017a430: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char *\n+0017a450: 206e 746c 6d5f 6368 616c 6c65 6e67 653c ntlm_challenge<\n+0017a460: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n+0017a480: 696e 6162 6c65 204e 544c 4d20 6175 7468 inable NTLM auth\n+0017a490: 656e 7469 6361 7469 6f6e 2063 6861 6c6c entication chall\n+0017a4a0: 656e 6765 206b 6579 2073 7472 696e 672e enge key string.\n+0017a4b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+0017a4d0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+0017a4e0: 6f61 7032 2e68 3a33 3837 383c 2f64 6976 oap2.h:3878
    .
    <\n+0017a510: 703e 5768 656e 2074 6865 2061 7574 6865 p>When the authe\n+0017a520: 6e74 6963 6174 696f 6e20 6661 696c 7320 ntication fails \n+0017a530: 2873 7461 6765 2031 2061 6e64 2032 292c (stage 1 and 2),\n+0017a540: 2074 6865 2073 6572 7669 6365 2072 6573 the service res\n+0017a550: 706f 6e73 6520 7769 7468 2048 5454 5020 ponse with HTTP \n+0017a560: 6572 726f 7220 636f 6465 2022 3430 3120 error code \"401 \n+0017a570: 556e 6175 7468 6f72 697a 6564 2220 616e Unauthorized\" an\n+0017a580: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d so\n+0017a630: 6170 3a3a 6572 726f 723c 2f61 3e3c 2f63 ap::error is set to H\n+0017a650: 5454 5020 636f 6465 2034 3031 2e3c 2f70 TTP code 401..

    .... Back to ta\n+0017a680: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n+0017a690: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

    .

    .\n+0017a6d0: 4854 5450 2070 726f 7879 204e 544c 4d20 HTTP proxy NTLM \n+0017a6e0: 6175 7468 656e 7469 6361 7469 6f6e 3c2f authentication.

    For HTTP \n+0017a700: 3430 3720 5072 6f78 7920 4175 7468 656e 407 Proxy Authen\n+0017a710: 7469 6361 7469 6f6e 2052 6571 7569 7265 tication Require\n+0017a720: 6420 7365 7420 7468 6520 3c63 6f64 653e d set the \n+0017a730: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n+0017a7e0: 6f61 703a 3a70 726f 7879 5f75 7365 7269 oap::proxy_useri\n+0017a7f0: 643c 2f61 3e3c 2f63 6f64 653e 2061 6e64 d and\n+0017a800: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::pro\n+0017a8c0: 7879 5f70 6173 7377 643c 2f61 3e3c 2f63 xy_passwd:

    .
    \n+0017a8f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+0017aa70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017aaa0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >pro\n+0017aaf0: 7879 5f68 6f73 743c 2f61 3e20 3d20 3c73 xy_host = "\n+0017ab20: 2e2e 2e26 7175 6f74 3b3c 2f73 7061 6e3e ..."\n+0017ab30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n+0017ab80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017ab90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017aba0: 6874 6d6c 2361 3033 3735 3534 6664 3263 html#a037554fd2c\n+0017abb0: 6635 3466 6239 6136 6435 3332 3662 3131 f54fb9a6d5326b11\n+0017abc0: 6338 6666 6130 223e 7072 6f78 795f 706f c8ffa0\">proxy_po\n+0017abd0: 7274 3c2f 613e 203d 202e 2e2e 3b20 3c2f rt = ...; .
    if (soap\n+0017ac20: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n+0017ac30: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap<\n+0017ac60: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...)) .
    {
    . \n+0017aca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (
    soap\n+0017acf0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error == 4\n+0017ad50: 3037 2920 3c2f 6469 763e 0a3c 6469 7620 07)
    .
    {\n+0017ad70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap->\n+0017adc0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_\n+0017ae10: 7573 6572 6964 3c2f 613e 203d 203c 7370 userid = "Z\n+0017ae40: 6170 686f 6426 7175 6f74 3b3c 2f73 7061 aphod";
    .
    \n+0017ae70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0017aea0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pr\n+0017aef0: 6f78 795f 7061 7373 7764 3c2f 613e 203d oxy_passwd =\n+0017af00: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0017af20: 6f74 3b42 6565 626c 6562 726f 7826 7175 ot;Beeblebrox&qu\n+0017af30: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; ..
    if (soap_call_ns_\n+0017b070: 5f77 6562 6d65 7468 6f64 283c 6120 636c _webmethod(soap, ...)\n+0017b0b0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    \n+0017b0d0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+0017b0f0: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    \n+0017b100: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    else.
    ... <\n+0017b160: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0017b170: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n+0017b180: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .\n+0017b240: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int proxy_po\n+0017b260: 7274 3c2f 6469 763e 3c64 6976 2063 6c61 rt
    User-\n+0017b280: 6465 6669 6e61 626c 6520 7072 6f78 7920 definable proxy \n+0017b290: 706f 7274 2077 6869 6368 2073 686f 756c port which shoul\n+0017b2a0: 6420 6265 2073 6574 2074 6f20 636f 6e6e d be set to conn\n+0017b2b0: 6563 7420 7468 726f 7567 6820 616e 2048 ect through an H\n+0017b2c0: 5454 5020 7072 6f78 7920 2874 6865 2076 TTP proxy (the v\n+0017b2d0: 616c 7565 2069 7320 3830 3830 2062 7920 alue is 8080 by \n+0017b2e0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n+0017b300: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+0017b310: 7464 736f 6170 322e 683a 3339 3036 3c2f tdsoap2.h:3906
    .
    \n+0017b3e0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char *\n+0017b400: 2070 726f 7879 5f75 7365 7269 643c 2f64 proxy_userid
    User-defin\n+0017b430: 6162 6c65 2070 726f 7879 2061 7574 686f able proxy autho\n+0017b440: 7269 7a61 7469 6f6e 2075 7365 7220 6964 rization user id\n+0017b450: 2073 7472 696e 6720 746f 2061 7574 6865 string to authe\n+0017b460: 6e74 6963 6174 6520 616e 6420 636f 6e6e nticate and conn\n+0017b470: 6563 7420 746f 2061 6e20 4854 5450 2070 ect to an HTTP p\n+0017b480: 726f 7879 2e3c 2f64 6976 3e3c 6469 7620 roxy.
    Definition:\n+0017b4b0: 2073 7464 736f 6170 322e 683a 3339 3131 stdsoap2.h:3911\n+0017b4c0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .\n+0017b580: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char *\n+0017b5a0: 2070 726f 7879 5f68 6f73 743c 2f64 6976 proxy_host
    User-definab\n+0017b5d0: 6c65 2070 726f 7879 2068 6f73 7420 6e61 le proxy host na\n+0017b5e0: 6d65 2073 7472 696e 6720 7768 6963 6820 me string which \n+0017b5f0: 7368 6f75 6c64 2062 6520 7365 7420 746f should be set to\n+0017b600: 2063 6f6e 6e65 6374 2074 6872 6f75 6768 connect through\n+0017b610: 2061 6e20 4854 5450 2070 726f 7879 2e3c an HTTP proxy.<\n+0017b620: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+0017b640: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+0017b650: 6170 322e 683a 3339 3031 3c2f 6469 763e ap2.h:3901
    \n+0017b660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0017b6b0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+0017b730: 636f 6e73 7420 6368 6172 202a 2070 726f const char * pro\n+0017b740: 7879 5f70 6173 7377 643c 2f64 6976 3e3c xy_passwd
    <\n+0017b750: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0017b760: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+0017b770: 2070 726f 7879 2061 7574 686f 7269 7a61 proxy authoriza\n+0017b780: 7469 6f6e 2070 6173 7377 6f72 6420 7374 tion password st\n+0017b790: 7269 6e67 2074 6f20 6175 7468 656e 7469 ring to authenti\n+0017b7a0: 6361 7465 2061 6e64 2063 6f6e 6e65 6374 cate and connect\n+0017b7b0: 2074 6f20 616e 2048 5454 5020 7072 6f78 to an HTTP prox\n+0017b7c0: 792e 3c2f 6469 763e 3c64 6976 2063 6c61 y.
    De\n+0017b7e0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+0017b7f0: 6473 6f61 7032 2e68 3a33 3931 363c 2f64 dsoap2.h:3916
    .
    \n+0017b810: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

    .\n+0017c0c0: 0a48 5454 5020 7072 6f78 7920 6261 7369 .HTTP proxy basi\n+0017c0d0: 6320 6175 7468 656e 7469 6361 7469 6f6e c authentication\n+0017c0e0: 3c2f 6833 3e0a 3c70 3e48 5454 5020 7072

    .

    HTTP pr\n+0017c0f0: 6f78 7920 6175 7468 656e 7469 6361 7469 oxy authenticati\n+0017c100: 6f6e 2028 6261 7369 6329 2069 7320 656e on (basic) is en\n+0017c110: 6162 6c65 6420 6174 2074 6865 2063 6c69 abled at the cli\n+0017c120: 656e 742d 7369 6465 2062 7920 7365 7474 ent-side by sett\n+0017c130: 696e 6720 7468 6520 3c63 6f64 653e 3c61 ing the soa\n+0017c1f0: 703a 3a70 726f 7879 5f75 7365 7269 643c p::proxy_userid<\n+0017c200: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+0017c210: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::proxy\n+0017c2d0: 5f70 6173 7377 643c 2f61 3e3c 2f63 6f64 _passwd strings to a \n+0017c2f0: 7573 6572 6e61 6d65 2061 6e64 2070 6173 username and pas\n+0017c300: 7377 6f72 642c 2072 6573 7065 6374 6976 sword, respectiv\n+0017c310: 656c 792e 2046 6f72 2065 7861 6d70 6c65 ely. For example\n+0017c320: 2c20 6120 7072 6f78 7920 7365 7276 6572 , a proxy server\n+0017c330: 206d 6179 2072 6571 7565 7374 2075 7365 may request use\n+0017c340: 7220 6175 7468 656e 7469 6361 7469 6f6e r authentication\n+0017c350: 2e20 4f74 6865 7277 6973 652c 2061 6363 . Otherwise, acc\n+0017c360: 6573 7320 6973 2064 656e 6965 6420 6279 ess is denied by\n+0017c370: 2074 6865 2070 726f 7879 2028 4854 5450 the proxy (HTTP\n+0017c380: 2034 3037 2065 7272 6f72 292e 2045 7861 407 error). Exa\n+0017c390: 6d70 6c65 2063 6c69 656e 7420 636f 6465 mple client code\n+0017c3a0: 2066 7261 676d 656e 7420 746f 2073 6574 fragment to set\n+0017c3b0: 2070 726f 7879 2073 6572 7665 722c 2075 proxy server, u\n+0017c3c0: 7365 726e 616d 652c 2061 6e64 2070 6173 sername, and pas\n+0017c3d0: 7377 6f72 643a 3c2f 703e 0a3c 6469 7620 sword:

    .
    struct \n+0017c420: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+0017c450: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+0017c480: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n+0017c4e0: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); <\n+0017c4f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+0017c530: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->proxy_host<\n+0017c590: 2f61 3e20 3d20 3c73 7061 6e20 636c 6173 /a> = "xx.xx.xx\n+0017c5c0: 2e78 7826 7175 6f74 3b3c 2f73 7061 6e3e .xx"\n+0017c5d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // IP or\n+0017c5f0: 2064 6f6d 6169 6e20 3c2f 7370 616e 3e3c domain <\n+0017c600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+0017c640: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->proxy_port<\n+0017c6a0: 2f61 3e20 3d20 3830 3830 3b20 3c2f 6469 /a> = 8080; .

    A cli\n+0017c890: 656e 7420 534f 4150 2072 6571 7565 7374 ent SOAP request\n+0017c8a0: 2077 696c 6c20 6861 7665 2074 6865 2066 will have the f\n+0017c8b0: 6f6c 6c6f 7769 6e67 2048 5454 5020 6865 ollowing HTTP he\n+0017c8c0: 6164 6572 3a20 3c2f 703e 3c70 7265 2063 ader:

    \n+0017c8e0: 504f 5354 202f 5858 5820 4854 5450 2f31  POST /XXX HTTP/1\n+0017c8f0: 2e31 200a 486f 7374 3a20 5959 5920 0a55  .1 .Host: YYY .U\n+0017c900: 7365 722d 4167 656e 743a 2067 534f 4150  ser-Agent: gSOAP\n+0017c910: 2f32 2e38 200a 436f 6e74 656e 742d 5479  /2.8 .Content-Ty\n+0017c920: 7065 3a20 7465 7874 2f78 6d6c 3b20 6368  pe: text/xml; ch\n+0017c930: 6172 7365 743d 7574 662d 3820 0a43 6f6e  arset=utf-8 .Con\n+0017c940: 7465 6e74 2d4c 656e 6774 683a 205a 5a5a  tent-Length: ZZZ\n+0017c950: 200a 5072 6f78 792d 4175 7468 6f72 697a   .Proxy-Authoriz\n+0017c960: 6174 696f 6e3a 2042 6173 6963 205a 3356  ation: Basic Z3V\n+0017c970: 6c63 3351 365a 3356 6c63 3351 3d20 0a3c  lc3Q6Z3Vlc3Q= .<\n+0017c980: 2f70 7265 3e3c 703e 2057 6865 6e20 582d  /pre>

    When X-\n+0017c990: 466f 7277 6172 6465 642d 466f 7220 6865 Forwarded-For he\n+0017c9a0: 6164 6572 7320 6172 6520 7265 7475 726e aders are return\n+0017c9b0: 6564 2062 7920 7468 6520 7072 6f78 792c ed by the proxy,\n+0017c9c0: 2074 6865 2068 6561 6465 7220 6361 6e20 the header can \n+0017c9d0: 6265 2061 6363 6573 7365 6420 696e 2074 be accessed in t\n+0017c9e0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he \n+0017ca70: 736f 6170 3a3a 7072 6f78 795f 6672 6f6d soap::proxy_from\n+0017ca80: 3c2f 613e 3c2f 636f 6465 3e20 7374 7269 stri\n+0017ca90: 6e67 2e3c 2f70 3e0a 3c70 3e54 6865 2043 ng.

    .

    The C\n+0017caa0: 4f4e 4e45 4354 206d 6574 686f 6420 6973 ONNECT method is\n+0017cab0: 2075 7365 6420 666f 7220 4854 5450 2070 used for HTTP p\n+0017cac0: 726f 7879 2061 7574 6865 6e74 6963 6174 roxy authenticat\n+0017cad0: 696f 6e3a 203c 2f70 3e3c 7072 6520 636c ion:

    C\n+0017caf0: 4f4e 4e45 4354 2073 6572 7665 722e 6578  ONNECT server.ex\n+0017cb00: 616d 706c 652e 636f 6d3a 3830 2048 5454  ample.com:80 HTT\n+0017cb10: 502f 312e 310a 3c2f 7072 653e 3c70 3e20  P/1.1.

    \n+0017cb20: 496e 2073 6f6d 6520 6361 7365 732c 2079 In some cases, y\n+0017cb30: 6f75 2077 696c 6c20 6e6f 7469 6365 2074 ou will notice t\n+0017cb40: 6861 7420 7468 6520 486f 7374 2048 5454 hat the Host HTT\n+0017cb50: 5020 6865 6164 6572 2075 7365 7320 7468 P header uses th\n+0017cb60: 6520 434f 4e4e 4543 5420 7072 6f74 6f63 e CONNECT protoc\n+0017cb70: 6f6c 3a20 3c2f 703e 3c70 7265 2063 6c61 ol:

    CO\n+0017cb90: 4e4e 4543 5420 7365 7276 6572 2e65 7861  NNECT server.exa\n+0017cba0: 6d70 6c65 2e63 6f6d 3a38 3020 4854 5450  mple.com:80 HTTP\n+0017cbb0: 2f31 2e31 200a 486f 7374 3a20 7365 7276  /1.1 .Host: serv\n+0017cbc0: 6572 2e65 7861 6d70 6c65 2e63 6f6d 3a38  er.example.com:8\n+0017cbd0: 300a 3c2f 7072 653e 3c70 3e20 f09f 949d  0.

    ....\n+0017cbe0: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+0017cbf0: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+0017cc00: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+0017cc10: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2><\n+0017cc30: 2f61 3e0a 5065 7266 6f72 6d61 6e63 6520 /a>.Performance \n+0017cc40: 696d 7072 6f76 656d 656e 7420 7469 7073 improvement tips\n+0017cc50: 3c2f 6832 3e0a 3c70 3e48 6572 6520 6172 .

    Here ar\n+0017cc60: 6520 736f 6d65 2074 6970 7320 796f 7520 e some tips you \n+0017cc70: 6361 6e20 7573 6520 746f 2073 7065 6564 can use to speed\n+0017cc80: 2075 7020 6753 4f41 502e 2054 6865 2064 up gSOAP. The d\n+0017cc90: 6566 6175 6c74 2073 6574 7469 6e67 7320 efault settings \n+0017cca0: 6172 6520 6368 6f73 656e 2074 6f20 6d61 are chosen to ma\n+0017ccb0: 7869 6d69 7a65 2070 6f72 7461 6269 6c69 ximize portabili\n+0017ccc0: 7479 2061 6e64 2063 6f6d 7061 7469 6269 ty and compatibi\n+0017ccd0: 6c69 7479 2e20 5468 6520 7365 7474 696e lity. The settin\n+0017cce0: 6773 2063 616e 2062 6520 7477 6561 6b65 gs can be tweake\n+0017ccf0: 6420 746f 206f 7074 696d 697a 6520 7468 d to optimize th\n+0017cd00: 6520 7065 7266 6f72 6d61 6e63 6520 6173 e performance as\n+0017cd10: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c75 follows:

    ..
  • Increase \n+0017cd30: 7468 6520 6275 6666 6572 2073 697a 6520 the buffer size \n+0017cd40: 3c63 6f64 653e 2353 4f41 505f 4255 464c #SOAP_BUFL\n+0017cd50: 454e 3c2f 636f 6465 3e20 6279 2063 6861 EN by cha\n+0017cd60: 6e67 696e 6720 7468 6520 3c63 6f64 653e nging the \n+0017cd70: 2353 4f41 505f 4255 464c 454e 3c2f 636f #SOAP_BUFLEN macro in gsoap/std\n+0017cda0: 736f 6170 322e 683c 2f63 6f64 653e 3c2f soap2.h. Use buffer \n+0017cdc0: 7369 7a65 2032 5e31 383d 3236 3231 3434 size 2^18=262144\n+0017cdd0: 2066 6f72 2065 7861 6d70 6c65 2e3c 2f6c for example..
  • Use HTTP \n+0017cdf0: 6b65 6570 2d61 6c69 7665 2061 7420 7468 keep-alive at th\n+0017ce00: 6520 636c 6965 6e74 2d73 6964 652c 2073 e client-side, s\n+0017ce10: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section TCP and HTT\n+0017ce50: 5020 6b65 6570 2d61 6c69 7665 3c2f 613e P keep-alive\n+0017ce60: 202c 2077 6865 6e20 7468 6520 636c 6965 , when the clie\n+0017ce70: 6e74 206e 6565 6473 2074 6f20 6d61 6b65 nt needs to make\n+0017ce80: 2061 2073 6572 6965 7320 6f66 2063 616c a series of cal\n+0017ce90: 6c73 2074 6f20 7468 6520 7361 6d65 2073 ls to the same s\n+0017cea0: 6572 7665 722e 2053 6572 7665 722d 7369 erver. Server-si\n+0017ceb0: 6465 206b 6565 702d 616c 6976 6520 7375 de keep-alive su\n+0017cec0: 7070 6f72 7420 6361 6e20 6772 6561 746c pport can greatl\n+0017ced0: 7920 696d 7072 6f76 6520 7065 7266 6f72 y improve perfor\n+0017cee0: 6d61 6e63 6520 6f66 2062 6f74 6820 636c mance of both cl\n+0017cef0: 6965 6e74 2061 6e64 2073 6572 7665 722e ient and server.\n+0017cf00: 2042 7574 2062 6520 6177 6172 6520 7468 But be aware th\n+0017cf10: 6174 2063 6c69 656e 7473 2061 6e64 2073 at clients and s\n+0017cf20: 6572 7669 6365 7320 756e 6465 7220 556e ervices under Un\n+0017cf30: 6978 2f4c 696e 7578 2072 6571 7569 7265 ix/Linux require\n+0017cf40: 2073 6967 6e61 6c20 6861 6e64 6c65 7273 signal handlers\n+0017cf50: 2074 6f20 6361 7463 6820 6472 6f70 7065 to catch droppe\n+0017cf60: 6420 636f 6e6e 6563 7469 6f6e 732e 3c2f d connections..
  • Use HTTP\n+0017cf80: 2063 6875 6e6b 6564 2074 7261 6e73 6665 chunked transfe\n+0017cf90: 7273 2c20 7365 6520 5365 6374 696f 6e20 rs, see Section \n+0017cfa0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 HTTP chu\n+0017cfd0: 6e6b 6564 2074 7261 6e73 6665 7220 656e nked transfer en\n+0017cfe0: 636f 6469 6e67 3c2f 613e 202e 3c2f 6c69 coding ..
  • Do not use\n+0017d000: 2067 7a69 7020 636f 6d70 7265 7373 696f gzip compressio\n+0017d010: 6e2c 2073 696e 6365 2074 6865 206f 7665 n, since the ove\n+0017d020: 7268 6561 6420 6f66 2063 6f6d 7072 6573 rhead of compres\n+0017d030: 7369 6f6e 2069 7320 7479 7069 6361 6c6c sion is typicall\n+0017d040: 7920 6869 6768 6572 2074 6861 6e20 7468 y higher than th\n+0017d050: 6520 6261 6e64 7769 6474 6820 6761 696e e bandwidth gain\n+0017d060: 732e 3c2f 6c69 3e0a 3c6c 693e 5365 7420 s.
  • .
  • Set \n+0017d070: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n+0017d080: 584d 4c5f 5452 4545 3c2f 636f 6465 3e20 XML_TREE \n+0017d090: 666c 6167 2074 6f20 6469 7361 626c 6520 flag to disable \n+0017d0a0: 6964 2d72 6566 206d 756c 7469 2d72 6566 id-ref multi-ref\n+0017d0b0: 206f 626a 6563 7420 7365 7269 616c 697a object serializ\n+0017d0c0: 6174 696f 6e2e 2054 6869 7320 626f 6f73 ation. This boos\n+0017d0d0: 7473 2070 6572 666f 726d 616e 6365 2073 ts performance s\n+0017d0e0: 6967 6e69 6669 6361 6e74 6c79 2061 6e64 ignificantly and\n+0017d0f0: 2077 6f72 6b73 2077 6974 6820 534f 4150 works with SOAP\n+0017d100: 2064 6f63 756d 656e 742f 6c69 7465 7261 document/litera\n+0017d110: 6c20 7374 796c 6520 2869 2e65 2e20 6e6f l style (i.e. no\n+0017d120: 2069 642d 7265 6620 6772 6170 6820 7365 id-ref graph se\n+0017d130: 7269 616c 697a 6174 696f 6e20 6173 2072 rialization as r\n+0017d140: 6571 7569 7265 6420 7769 7468 2053 4f41 equired with SOA\n+0017d150: 5020 656e 636f 6469 6e67 2073 7479 6c65 P encoding style\n+0017d160: 292e 2044 6f20 6e6f 7420 7573 6520 7468 ). Do not use th\n+0017d170: 6973 2066 6f72 2053 4f41 5020 5250 4320 is for SOAP RPC \n+0017d180: 656e 636f 6465 6420 6d65 7373 6167 696e encoded messagin\n+0017d190: 672e 3c2f 6c69 3e0a 3c6c 693e 436f 6d70 g.
  • .
  • Comp\n+0017d1a0: 696c 6520 3c65 6d3e 3c63 6f64 653e 6773 ile gs\n+0017d1b0: 6f61 702f 7374 6473 6f61 7032 2e63 3c2f oap/stdsoap2.c and <\n+0017d1d0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+0017d1e0: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp and all \n+0017d200: 6f74 6865 7220 736f 7572 6365 2063 6f64 other source cod\n+0017d210: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp\n+0017d220: 696c 6520 7469 6d65 2066 6c61 6720 3c63 ile time flag #WITH_NOIDRE\n+0017d240: 463c 2f63 6f64 653e 2074 6f20 696d 7072 F to impr\n+0017d250: 6f76 6520 7065 7266 6f72 6d61 6e63 6520 ove performance \n+0017d260: 6576 656e 2062 6574 7465 7220 6279 2070 even better by p\n+0017d270: 6572 6d61 6e65 6e74 6c79 2064 6973 6162 ermanently disab\n+0017d280: 6c69 6e67 2069 642d 7265 6620 6d75 6c74 ling id-ref mult\n+0017d290: 692d 7265 6620 6f62 6a65 6374 2073 6572 i-ref object ser\n+0017d2a0: 6961 6c69 7a61 7469 6f6e 2e20 446f 206e ialization. Do n\n+0017d2b0: 6f74 2075 7365 2074 6869 7320 666f 7220 ot use this for \n+0017d2c0: 534f 4150 2052 5043 2065 6e63 6f64 6564 SOAP RPC encoded\n+0017d2d0: 206d 6573 7361 6769 6e67 2e3c 2f6c 693e messaging.
  • \n+0017d2e0: 0a3c 6c69 3e44 6f20 6e6f 7420 7573 6520 .
  • Do not use \n+0017d2f0: 4445 4255 4720 6d6f 6465 2c20 7369 6e63 DEBUG mode, sinc\n+0017d300: 6520 7468 6520 6f76 6572 6865 6164 206f e the overhead o\n+0017d310: 6620 6c6f 6767 696e 6720 6973 2073 6967 f logging is sig\n+0017d320: 6e69 6669 6361 6e74 2e3c 2f6c 693e 0a3c nificant.
  • .<\n+0017d330: 2f75 6c3e 0a3c 703e f09f 949d 203c 6120 /ul>.

    .... Back to\n+0017d350: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+0017d360: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    <\n+0017d370: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0017d380: 2069 643d 2273 6166 6574 7922 3e3c 2f61 id=\"safety\">.Safety guards<\n+0017d3a0: 2f68 323e 0a3c 703e 5468 6520 666f 6c6c /h2>.

    The foll\n+0017d3b0: 6f77 696e 6720 7365 7474 696e 6773 2061 owing settings a\n+0017d3c0: 7265 2069 6d70 6f72 7461 6e74 2074 6f20 re important to \n+0017d3d0: 656e 7375 7265 2074 6861 7420 584d 4c20 ensure that XML \n+0017d3e0: 6d65 7373 6167 696e 6720 6973 2073 6166 messaging is saf\n+0017d3f0: 6520 6279 2064 6566 696e 696e 6720 7265 e by defining re\n+0017d400: 6173 6f6e 6162 6c65 2058 4d4c 206d 6573 asonable XML mes\n+0017d410: 7361 6765 2072 6573 7472 6963 7469 6f6e sage restriction\n+0017d420: 732e 2041 6c73 6f20 6d65 7373 6167 696e s. Also messagin\n+0017d430: 6720 7469 6d65 6f75 7473 2073 686f 756c g timeouts shoul\n+0017d440: 6420 6265 2073 6574 2061 7320 6578 706c d be set as expl\n+0017d450: 6169 6e65 6420 696e 2053 6563 7469 6f6e ained in Section\n+0017d460: 203c 6120 636c 6173 733d 2265 6c22 2068 Timeout\n+0017d490: 206d 616e 6167 656d 656e 7420 666f 7220 management for \n+0017d4a0: 6e6f 6e2d 626c 6f63 6b69 6e67 206f 7065 non-blocking ope\n+0017d4b0: 7261 7469 6f6e 733c 2f61 3e2e 3c2f 703e rations.

    \n+0017d4c0: 0a3c 703e 5468 6520 584d 4c20 7061 7273 .

    The XML pars\n+0017d4d0: 6572 2069 7320 636f 6e66 6967 7572 6564 er is configured\n+0017d4e0: 2074 6f20 7265 7374 7269 6374 2074 6865 to restrict the\n+0017d4f0: 2058 4d4c 206e 6573 7469 6e67 2064 6570 XML nesting dep\n+0017d500: 7468 206c 6576 656c 2074 6f20 3c63 6f64 th level to #SOAP_MAXLEVEL\n+0017d520: 3c2f 636f 6465 3e20 616e 6420 7265 7374 and rest\n+0017d530: 7269 6374 7320 7468 6520 7265 7065 6174 ricts the repeat\n+0017d540: 6564 206f 6363 7572 7265 6e63 6520 6f66 ed occurrence of\n+0017d550: 2065 6c65 6d65 6e74 7320 7468 6174 2061 elements that a\n+0017d560: 7265 2064 6573 6572 6961 6c69 7a65 6420 re deserialized \n+0017d570: 696e 746f 2061 7272 6179 7320 616e 6420 into arrays and \n+0017d580: 636f 6e74 6169 6e65 7273 2062 7920 3c63 containers by #SOAP_MAXOCC\n+0017d5a0: 5552 533c 2f63 6f64 653e 2e20 5468 6573 URS. Thes\n+0017d5b0: 6520 6d61 6372 6f73 2063 616e 2062 6520 e macros can be \n+0017d5c0: 6368 616e 6765 642c 2062 7574 2079 6f75 changed, but you\n+0017d5d0: 2063 616e 2061 6c73 6f20 6368 616e 6765 can also change\n+0017d5e0: 2074 6865 2066 6f6c 6c6f 7769 6e67 2063 the following c\n+0017d5f0: 6f6e 7465 7874 2061 7474 7269 6275 7465 ontext attribute\n+0017d600: 7320 6174 2072 756e 2d74 696d 652c 2065 s at run-time, e\n+0017d610: 2e67 2e20 746f 2065 6e68 616e 6365 2074 .g. to enhance t\n+0017d620: 6865 2073 6166 6574 7920 666f 7220 7370 he safety for sp\n+0017d630: 6563 6966 6963 2073 6572 7669 6365 2061 ecific service a\n+0017d640: 6e64 2f6f 7220 636c 6965 6e74 206f 7065 nd/or client ope\n+0017d650: 7261 7469 6f6e 733a 3c2f 703e 0a3c 756c rations:

    ..
  • soap::maxlev\n+0017d730: 656c 3c2f 613e 3c2f 636f 6465 3e20 7265 el re\n+0017d740: 7374 7269 6374 7320 7468 6520 584d 4c20 stricts the XML \n+0017d750: 6e65 7374 696e 6720 6465 7074 6820 6c65 nesting depth le\n+0017d760: 7665 6c2c 2077 6865 7265 2074 6865 2064 vel, where the d\n+0017d770: 6566 6175 6c74 2076 616c 7565 2069 7320 efault value is \n+0017d780: 3c63 6f64 653e 2353 4f41 505f 4d41 584c #SOAP_MAXL\n+0017d790: 4556 454c 3c2f 636f 6465 3e20 3d20 3130 EVEL = 10\n+0017d7a0: 3030 302e 3c2f 6c69 3e0a 3c6c 693e 3c63 000.
  • .
  • soap\n+0017d870: 3a3a 6d61 786f 6363 7572 733c 2f61 3e3c ::maxoccurs<\n+0017d880: 2f63 6f64 653e 2072 6573 7472 6963 7473 /code> restricts\n+0017d890: 2074 6865 206e 756d 6265 7220 6f66 2072 the number of r\n+0017d8a0: 6570 6561 7465 6420 6f63 6375 7272 656e epeated occurren\n+0017d8b0: 6365 7320 6f66 2065 6c65 6d65 6e74 7320 ces of elements \n+0017d8c0: 7468 6174 2061 7265 2064 6573 6572 6961 that are deseria\n+0017d8d0: 6c69 7a65 6420 696e 746f 2061 7272 6179 lized into array\n+0017d8e0: 7320 616e 6420 7374 7275 6374 732c 2077 s and structs, w\n+0017d8f0: 6865 7265 2074 6865 2064 6566 6175 6c74 here the default\n+0017d900: 2076 616c 7565 2069 7320 3c63 6f64 653e value is \n+0017d910: 2353 4f41 505f 4d41 584f 4343 5552 533c #SOAP_MAXOCCURS<\n+0017d920: 2f63 6f64 653e 203d 2031 3030 3030 302e /code> = 100000.\n+0017d930: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
  • .
  • \n+0017d940: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::maxleng\n+0017da00: 7468 3c2f 613e 3c2f 636f 6465 3e20 7265 th re\n+0017da10: 7374 7269 6374 7320 7468 6520 6c65 6e67 stricts the leng\n+0017da20: 7468 206f 6620 7374 7269 6e67 7320 6465 th of strings de\n+0017da30: 7365 7269 616c 697a 6564 2066 726f 6d20 serialized from \n+0017da40: 584d 4c2e 2041 207a 6572 6f20 6f72 206e XML. A zero or n\n+0017da50: 6567 6174 6976 6520 7661 6c75 6520 6973 egative value is\n+0017da60: 2075 6e72 6573 7472 6963 7465 6420 6c65 unrestricted le\n+0017da70: 6e67 7468 2e20 5768 656e 2072 6573 7472 ngth. When restr\n+0017da80: 6963 7465 642c 2074 6865 2058 4d4c 2073 icted, the XML s\n+0017da90: 6368 656d 6120 7661 6c69 6461 7469 6f6e chema validation\n+0017daa0: 206d 6178 4c65 6e67 7468 2074 616b 6573 maxLength takes\n+0017dab0: 2070 7265 6365 6465 6e63 6520 6f76 6572 precedence over\n+0017dac0: 2074 6869 7320 6c65 6e67 7468 2072 6573 this length res\n+0017dad0: 7472 6963 7469 6f6e 2e20 536f 2073 6574 triction. So set\n+0017dae0: 7469 6e67 2061 2073 6d61 6c6c 6572 2076 ting a smaller v\n+0017daf0: 616c 7565 2077 696c 6c20 6e6f 7420 696e alue will not in\n+0017db00: 7465 7266 6572 6520 7769 7468 2074 6865 terfere with the\n+0017db10: 2058 4d4c 2076 616c 6964 6174 696f 6e20 XML validation \n+0017db20: 7275 6c65 732e 2054 6865 2064 6566 6175 rules. The defau\n+0017db30: 6c74 2076 616c 7565 2069 7320 3c63 6f64 lt value is #SOAP_MAXLENGT\n+0017db50: 483c 2f63 6f64 653e 203d 2030 2e20 4e6f H = 0. No\n+0017db60: 7465 2074 6861 7420 7374 7269 6e67 206c te that string l\n+0017db70: 656e 6774 6820 6973 2065 7870 7265 7373 ength is express\n+0017db80: 6564 2069 6e20 6e75 6d62 6572 206f 6620 ed in number of \n+0017db90: 6368 6172 6163 7465 7273 2c20 6e6f 7420 characters, not \n+0017dba0: 6279 7465 732e 2053 6f20 5554 462d 3820 bytes. So UTF-8 \n+0017dbb0: 656e 636f 6469 6e67 7320 6172 6520 6e6f encodings are no\n+0017dbc0: 7420 7472 756e 6361 7465 642e 3c2f 6c69 t truncated..
  • soap::recv_m\n+0017dca0: 6178 6c65 6e67 7468 3c2f 613e 3c2f 636f axlength the maximum \n+0017dcc0: 6c65 6e67 7468 206f 6620 6d65 7373 6167 length of messag\n+0017dcd0: 6573 2072 6563 6569 7665 642c 2032 4742 es received, 2GB\n+0017dce0: 2062 7920 6465 6661 756c 742e 3c2f 6c69 by default...

    XML s\n+0017dd00: 6368 656d 6120 7661 6c69 6461 7469 6f6e chema validation\n+0017dd10: 2063 6f6e 7374 7261 696e 7473 2061 7265 constraints are\n+0017dd20: 2065 6e66 6f72 6365 6420 7769 7468 2074 enforced with t\n+0017dd30: 6865 203c 636f 6465 3e23 534f 4150 5f58 he #SOAP_X\n+0017dd40: 4d4c 5f53 5452 4943 543c 2f63 6f64 653e ML_STRICT\n+0017dd50: 2063 6f6e 7465 7874 2066 6c61 672e 2054 context flag. T\n+0017dd60: 6865 2073 6368 656d 6120 6d61 784c 656e he schema maxLen\n+0017dd70: 6774 6820 7661 6c69 6461 7469 6f6e 2063 gth validation c\n+0017dd80: 6f6e 7374 7261 696e 7420 6f76 6572 7275 onstraint overru\n+0017dd90: 6c65 7320 7468 6520 3c63 6f64 653e 3c61 les the soap::maxlength\n+0017de60: 3c2f 613e 3c2f 636f 6465 3e20 6775 6172 guar\n+0017de70: 642e 2054 6865 2073 6368 656d 6120 6d61 d. The schema ma\n+0017de80: 784f 6363 7572 7320 7661 6c69 6461 7469 xOccurs validati\n+0017de90: 6f6e 2063 6f6e 7374 7261 696e 7420 646f on constraint do\n+0017dea0: 6573 206e 6f74 206f 7665 7272 756c 6520 es not overrule \n+0017deb0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::maxoccur\n+0017df80: 733c 2f61 3e3c 2f63 6f64 653e 2067 7561 s gua\n+0017df90: 7264 2c20 736f 2061 7272 6179 7320 616e rd, so arrays an\n+0017dfa0: 6420 636f 6e74 6169 6e65 7273 2061 7265 d containers are\n+0017dfb0: 2061 6c77 6179 7320 7265 7374 7269 6374 always restrict\n+0017dfc0: 6564 2069 6e20 6c65 6e67 7468 2062 7920 ed in length by \n+0017dfd0: 7468 6973 2067 7561 7264 2e3c 2f70 3e0a this guard.

    .\n+0017dfe0: 3c70 3e4f 7468 6572 2063 6f6d 7069 6c65

    Other compile\n+0017dff0: 2d74 696d 6520 636f 6e66 6967 7572 6174 -time configurat\n+0017e000: 696f 6e20 7365 7474 696e 6773 2061 7265 ion settings are\n+0017e010: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c :

    .
      .
    • <\n+0017e020: 636f 6465 3e23 534f 4150 5f4d 4158 414c code>#SOAP_MAXAL\n+0017e030: 4c4f 4353 495a 453c 2f63 6f64 653e 2074 LOCSIZE t\n+0017e040: 6865 206d 6178 696d 756d 2073 697a 6520 he maximum size \n+0017e050: 6f66 2061 2062 6c6f 636b 206f 6620 6d65 of a block of me\n+0017e060: 6d6f 7279 2074 6861 7420 3c63 6f64 653e mory that \n+0017e070: 6d61 6c6c 6f63 3c2f 636f 6465 3e20 6361 malloc ca\n+0017e080: 6e20 616c 6c6f 6361 7465 2e3c 2f6c 693e n allocate.
    • \n+0017e090: 0a3c 6c69 3e3c 636f 6465 3e23 534f 4150 .
    • #SOAP\n+0017e0a0: 5f4d 4158 4152 5241 5953 495a 453c 2f63 _MAXARRAYSIZE the maximum\n+0017e0c0: 2061 6c6c 6f63 6174 696f 6e20 7468 7265 allocation thre\n+0017e0d0: 7368 6f6c 6420 746f 2070 7265 2d61 6c6c shold to pre-all\n+0017e0e0: 6f63 6174 6520 534f 4150 2061 7272 6179 ocate SOAP array\n+0017e0f0: 7320 696e 206d 656d 6f72 792e 3c2f 6c69 s in memory..
    • #SOA\n+0017e110: 505f 4d41 5844 494d 4553 495a 453c 2f63 P_MAXDIMESIZE the maximum\n+0017e130: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+0017e140: 2073 697a 6520 616c 6c6f 7765 6420 746f size allowed to\n+0017e150: 2072 6563 6569 7665 2e3c 2f6c 693e 0a3c receive.
    • .<\n+0017e160: 6c69 3e3c 636f 6465 3e23 534f 4150 5f4d li>#SOAP_M\n+0017e170: 4158 4549 4e54 523c 2f63 6f64 653e 206d AXEINTR m\n+0017e180: 6178 696d 756d 206e 756d 6265 7220 6f66 aximum number of\n+0017e190: 2045 494e 5452 2069 6e74 6572 7275 7074 EINTR interrupt\n+0017e1a0: 7320 746f 2069 676e 6f72 6520 7768 696c s to ignore whil\n+0017e1b0: 6520 706f 6c6c 696e 6720 6120 736f 636b e polling a sock\n+0017e1c0: 6574 2066 6f72 2070 656e 6469 6e67 2061 et for pending a\n+0017e1d0: 6374 6976 6974 792e 3c2f 6c69 3e0a 3c2f ctivity...

      .... Back to \n+0017e200: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n+0017e210: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

      .

      .Timeout manage\n+0017e250: 6d65 6e74 2066 6f72 206e 6f6e 2d62 6c6f ment for non-blo\n+0017e260: 636b 696e 6720 6f70 6572 6174 696f 6e73 cking operations\n+0017e270: 3c2f 6832 3e0a 3c70 3e53 6f63 6b65 7420

      .

      Socket \n+0017e280: 636f 6e6e 6563 742c 2061 6363 6570 742c connect, accept,\n+0017e290: 2073 656e 642c 2061 6e64 2072 6563 6569 send, and recei\n+0017e2a0: 7665 2074 696d 656f 7574 2076 616c 7565 ve timeout value\n+0017e2b0: 7320 6361 6e20 6265 2073 6574 2074 6f20 s can be set to \n+0017e2c0: 6d61 6e61 6765 2073 6f63 6b65 7420 636f manage socket co\n+0017e2d0: 6d6d 756e 6963 6174 696f 6e20 7469 6d65 mmunication time\n+0017e2e0: 6f75 7473 2e20 5468 6520 3c63 6f64 653e outs. The \n+0017e2f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co\n+0017e3b0: 6e6e 6563 745f 7469 6d65 6f75 743c 2f61 nnect_timeout, \n+0017e3d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ac\n+0017e490: 6365 7074 5f74 696d 656f 7574 3c2f 613e cept_timeout\n+0017e4a0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e3c , <\n+0017e4b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017e4c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017e4d0: 6d6c 2361 3731 3162 6233 6135 3364 6537 ml#a711bb3a53de7\n+0017e4e0: 6363 3632 3432 3965 3464 3361 3265 3062 cc62429e4d3a2e0b\n+0017e4f0: 3534 3734 2220 7469 746c 653d 2255 7365 5474\" title=\"Use\n+0017e500: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time\n+0017e510: 6f75 7420 746f 2073 656e 6420 6120 7061 out to send a pa\n+0017e520: 636b 6574 206f 6620 6461 7461 2c20 706f cket of data, po\n+0017e530: 7369 7469 7665 2074 696d 656f 7574 2076 sitive timeout v\n+0017e540: 616c 7565 7320 6172 6520 7365 636f 6e64 alues are second\n+0017e550: 732c 2e2e 2e22 3e73 6f61 703a 3a73 656e s,...\">soap::sen\n+0017e560: 645f 7469 6d65 6f75 743c 2f61 3e3c 2f63 d_timeout, soap::rec\n+0017e630: 765f 7469 6d65 6f75 743c 2f61 3e3c 2f63 v_timeout and <\n+0017e650: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017e660: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017e670: 6d6c 2361 6663 6631 6432 3336 6430 3532 ml#afcf1d236d052\n+0017e680: 3537 3931 3232 6637 3835 6437 3633 3963 579122f785d7639c\n+0017e690: 3433 6337 2220 7469 746c 653d 2255 7365 43c7\" title=\"Use\n+0017e6a0: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time\n+0017e6b0: 6f75 7420 746f 2073 656e 6420 6f72 2072 out to send or r\n+0017e6c0: 6563 6569 7665 2061 6e20 656e 7469 7265 eceive an entire\n+0017e6d0: 206d 6573 7361 6765 2c20 706f 7369 7469 message, positi\n+0017e6e0: 7665 2074 696d 656f 7574 2076 616c 7565 ve timeout value\n+0017e6f0: 7320 6172 6520 7365 636f 6e64 732c 2e2e s are seconds,..\n+0017e700: 2e22 3e73 6f61 703a 3a74 7261 6e73 6665 .\">soap::transfe\n+0017e710: 725f 7469 6d65 6f75 743c 2f61 3e3c 2f63 r_timeout context att\n+0017e730: 7269 6275 7465 7320 6f66 2074 6865 2063 ributes of the c\n+0017e740: 7572 7265 6e74 2063 6f6e 7465 7874 203c urrent context <\n+0017e750: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+0017e7b0: 2063 616e 2062 6520 7365 7420 746f 2074 can be set to t\n+0017e7c0: 6865 2061 7070 726f 7072 6961 7465 2075 he appropriate u\n+0017e7d0: 7365 722d 6465 6669 6e65 6420 736f 636b ser-defined sock\n+0017e7e0: 6574 2073 656e 642c 2072 6563 6569 7665 et send, receive\n+0017e7f0: 2c20 616e 6420 6163 6365 7074 2074 696d , and accept tim\n+0017e800: 656f 7574 2076 616c 7565 732e 2041 2070 eout values. A p\n+0017e810: 6f73 6974 6976 6520 7661 6c75 6520 6d65 ositive value me\n+0017e820: 6173 7572 6573 2074 6865 2074 696d 656f asures the timeo\n+0017e830: 7574 2069 6e20 7365 636f 6e64 732e 2041 ut in seconds. A\n+0017e840: 206e 6567 6174 6976 6520 7469 6d65 6f75 negative timeou\n+0017e850: 7420 7661 6c75 6520 6d65 6173 7572 6573 t value measures\n+0017e860: 2074 6865 2074 696d 656f 7574 2069 6e20 the timeout in \n+0017e870: 6d69 6372 6f73 6563 6f6e 6473 2028 3130 microseconds (10\n+0017e880: 5e2d 3620 7365 6329 2e3c 2f70 3e0a 3c70 ^-6 sec).

      .The soap::connect\n+0017e960: 5f74 696d 656f 7574 3c2f 613e 3c2f 636f _timeout specifies th\n+0017e980: 6520 7469 6d65 6f75 7420 666f 7220 3c63 e timeout for soap_call_ns\n+0017e9a0: 5f5f 7765 626d 6574 686f 643c 2f63 6f64 __webmethod stub function\n+0017e9c0: 2063 616c 6c73 2061 6e64 2066 6f72 2043 calls and for C\n+0017e9d0: 2b2b 2070 726f 7879 2063 6c61 7373 2063 ++ proxy class c\n+0017e9e0: 616c 6c73 2e3c 2f70 3e0a 3c70 3e54 6865 alls.

      .

      The\n+0017e9f0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+0017eab0: 6f61 703a 3a61 6363 6570 745f 7469 6d65 oap::accept_time\n+0017eac0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2073 out s\n+0017ead0: 7065 6369 6669 6573 2074 6865 2074 696d pecifies the tim\n+0017eae0: 656f 7574 2066 6f72 203c 636f 6465 3e3c eout for <\n+0017eaf0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017eb00: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0017eb10: 5f69 6f2e 6874 6d6c 2367 6165 6330 6531 _io.html#gaec0e1\n+0017eb20: 6165 6363 3264 3534 3739 6438 3039 3937 aecc2d5479d80997\n+0017eb30: 3632 6665 6234 3731 3363 3622 2074 6974 62feb4713c6\" tit\n+0017eb40: 6c65 3d22 4163 6365 7074 2061 2063 6f6e le=\"Accept a con\n+0017eb50: 6e65 6374 696f 6e20 7769 7468 2061 2063 nection with a c\n+0017eb60: 6c69 656e 742e 223e 736f 6170 5f61 6363 lient.\">soap_acc\n+0017eb70: 6570 743c 2f61 3e3c 2f63 6f64 653e 2063 ept c\n+0017eb80: 616c 6c73 2e3c 2f70 3e0a 3c70 3e54 6865 alls.

      .

      The\n+0017eb90: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+0017ec40: 6f61 703a 3a73 656e 645f 7469 6d65 6f75 oap::send_timeou\n+0017ec50: 743c 2f61 3e3c 2f63 6f64 653e 2061 6e64 t and\n+0017ec60: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::recv_tim\n+0017ed20: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout \n+0017ed30: 7370 6563 6966 7920 7468 6520 7469 6d65 specify the time\n+0017ed40: 6f75 7420 666f 7220 6e6f 6e2d 626c 6f63 out for non-bloc\n+0017ed50: 6b69 6e67 2073 6f63 6b65 7420 492f 4f20 king socket I/O \n+0017ed60: 6f70 6572 6174 696f 6e73 2e20 5468 6973 operations. This\n+0017ed70: 2069 7320 7468 6520 6d61 7869 6d75 6d20 is the maximum \n+0017ed80: 6465 6c61 7920 6f6e 2074 6865 2073 6f63 delay on the soc\n+0017ed90: 6b65 7420 6f70 6572 6174 696f 6e20 7065 ket operation pe\n+0017eda0: 726d 6974 7465 642e 3c2f 703e 0a3c 703e rmitted.

      .

      \n+0017edb0: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The so\n+0017ee70: 6170 3a3a 7472 616e 7366 6572 5f74 696d ap::transfer_tim\n+0017ee80: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout \n+0017ee90: 6973 206e 6577 2073 696e 6365 2032 2e38 is new since 2.8\n+0017eea0: 2e34 3820 616e 6420 6c69 6d69 7473 2074 .48 and limits t\n+0017eeb0: 6865 2074 696d 6520 6120 6d65 7373 6167 he time a messag\n+0017eec0: 6520 7365 6e64 2061 6e64 2061 206d 6573 e send and a mes\n+0017eed0: 7361 6765 2072 6563 6569 7665 206f 7065 sage receive ope\n+0017eee0: 7261 7469 6f6e 2063 616e 2074 616b 652e ration can take.\n+0017eef0: 2054 6869 7320 7661 6c75 6520 7368 6f75 This value shou\n+0017ef00: 6c64 2062 6520 7573 6564 2069 6e20 636f ld be used in co\n+0017ef10: 6d62 696e 6174 696f 6e20 7769 7468 203c mbination with <\n+0017ef20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0017efd0: 703a 3a73 656e 645f 7469 6d65 6f75 743c p::send_timeout<\n+0017efe0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+0017eff0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+0017f0a0: 736f 6170 3a3a 7265 6376 5f74 696d 656f soap::recv_timeo\n+0017f0b0: 7574 3c2f 613e 3c2f 636f 6465 3e20 666f ut fo\n+0017f0c0: 7220 6163 6375 7261 7465 2074 696d 656f r accurate timeo\n+0017f0d0: 7574 2063 6f6e 7472 6f6c 2e20 5468 6520 ut control. The \n+0017f0e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0017f1a0: 6170 3a3a 7265 6376 5f6d 6178 6c65 6e67 ap::recv_maxleng\n+0017f1b0: 7468 3c2f 613e 3c2f 636f 6465 3e20 7661 th va\n+0017f1c0: 6c75 6520 7768 656e 206e 6f6e 2d7a 6572 lue when non-zer\n+0017f1d0: 6f20 6c69 6d69 7473 2074 6865 206c 656e o limits the len\n+0017f1e0: 6774 6820 6f66 206d 6573 7361 6765 7320 gth of messages \n+0017f1f0: 7468 6174 2063 616e 2062 6520 7265 6365 that can be rece\n+0017f200: 6976 6564 2069 6e20 6279 7465 7320 696e ived in bytes in\n+0017f210: 2074 6f74 616c 2069 6e20 6465 636f 6d70 total in decomp\n+0017f220: 7265 7373 6564 2066 6f72 6d20 286d 6573 ressed form (mes\n+0017f230: 7361 6765 206c 656e 6774 6820 696e 636c sage length incl\n+0017f240: 7564 6573 2048 5454 5020 6865 6164 6572 udes HTTP header\n+0017f250: 7320 616e 6420 4854 5450 2063 6875 6e6b s and HTTP chunk\n+0017f260: 2073 697a 6520 6669 656c 6473 292e 2054 size fields). T\n+0017f270: 6865 2076 616c 7565 206f 6620 3c63 6f64 he value of soap::\n+0017f340: 7265 6376 5f6d 6178 6c65 6e67 7468 3c2f recv_maxlength is 2GB\n+0017f360: 2062 7920 6465 6661 756c 742e 3c2f 703e by default.

      \n+0017f370: 0a3c 703e 4578 616d 706c 653a 3c2f 703e .

      Example:

      \n+0017f380: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
      s\n+0017f3c0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+0017f430: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
      .soap-&g\n+0017f4e0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;send_\n+0017f530: 7469 6d65 6f75 743c 2f61 3e20 3d20 3130 timeout = 10\n+0017f540: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      soap-><\n+0017f590: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017f5a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017f5b0: 6874 6d6c 2361 6335 6435 6662 3932 6666 html#ac5d5fb92ff\n+0017f5c0: 6664 6137 3234 6363 6233 6230 3338 6432 fda724ccb3b038d2\n+0017f5d0: 6262 3233 3838 223e 7265 6376 5f74 696d bb2388\">recv_tim\n+0017f5e0: 656f 7574 3c2f 613e 203d 2031 303b 203c eout = 10; <\n+0017f5f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

      Thi\n+0017f6c0: 7320 7769 6c6c 2072 6573 756c 7420 696e s will result in\n+0017f6d0: 2061 2074 696d 656f 7574 2069 6620 6e6f a timeout if no\n+0017f6e0: 2064 6174 6120 6361 6e20 6265 2073 656e data can be sen\n+0017f6f0: 6420 696e 2031 3020 7365 636f 6e64 7320 d in 10 seconds \n+0017f700: 616e 6420 6e6f 2064 6174 6120 6973 2072 and no data is r\n+0017f710: 6563 6569 7665 6420 7769 7468 696e 2031 eceived within 1\n+0017f720: 3020 7365 636f 6e64 7320 6166 7465 7220 0 seconds after \n+0017f730: 696e 6974 6961 7469 6e67 2061 2073 656e initiating a sen\n+0017f740: 6420 6f72 2072 6563 6569 7665 206f 7065 d or receive ope\n+0017f750: 7261 7469 6f6e 206f 7665 7220 7468 6520 ration over the \n+0017f760: 736f 636b 6574 2e20 4120 7661 6c75 6520 socket. A value \n+0017f770: 6f66 207a 6572 6f20 6469 7361 626c 6573 of zero disables\n+0017f780: 2074 696d 656f 7574 2c20 666f 7220 6578 timeout, for ex\n+0017f790: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

      .
      struct \n+0017f7e0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+0017f810: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+0017f840: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n+0017f8a0: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); <\n+0017f8b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
      War\n-00180090: 6e69 6e67 3c2f 6474 3e3c 6464 3e4d 616e ning
      Man\n-001800a0: 7920 4c69 6e75 7820 7665 7273 696f 6e73 y Linux versions\n-001800b0: 2064 6f20 6e6f 7420 7375 7070 6f72 7420 do not support \n-001800c0: 6e6f 6e2d 626c 6f63 6b69 6e67 203c 636f non-blocking connect(). Therefore, \n-001800f0: 7365 7474 696e 6720 3c63 6f64 653e 3c61 setting soap::conn\n-001801c0: 6563 745f 7469 6d65 6f75 743c 2f61 3e3c ect_timeout<\n-001801d0: 2f63 6f64 653e 2066 6f72 206e 6f6e 2d62 /code> for non-b\n-001801e0: 6c6f 636b 696e 6720 3c63 6f64 653e 736f locking so\n-001801f0: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n-00180200: 6574 686f 643c 2f63 6f64 653e 2063 616c ethod cal\n-00180210: 6c73 206d 6179 206e 6f74 2077 6f72 6b20 ls may not work \n-00180220: 756e 6465 7220 4c69 6e75 782e 3c2f 6464 under Linux..
      .Interrupt\n-00180240: 7320 2845 494e 5452 2920 6361 6e20 6166 s (EINTR) can af\n-00180250: 6665 6374 2074 6865 2062 6c6f 636b 696e fect the blockin\n-00180260: 6720 7469 6d65 2069 6e20 492f 4f20 6f70 g time in I/O op\n-00180270: 6572 6174 696f 6e73 2e20 5468 6520 6d61 erations. The ma\n-00180280: 7869 6d75 6d20 6e75 6d62 6572 206f 6620 ximum number of \n-00180290: 4549 4e54 5220 7468 6174 2077 696c 6c20 EINTR that will \n-001802a0: 6e6f 7420 7472 6967 6765 7220 616e 2065 not trigger an e\n-001802b0: 7272 6f72 2069 7320 7365 7420 6279 203c rror is set by <\n-001802c0: 636f 6465 3e23 534f 4150 5f4d 4158 4549 code>#SOAP_MAXEI\n-001802d0: 4e54 523c 2f63 6f64 653e 2069 6e20 3c65 NTR in gsoap/st\n-001802f0: 6473 6f61 7032 2e68 3c2f 636f 6465 3e3c dsoap2.h<\n-00180300: 2f65 6d3e 2c20 7768 6963 6820 6973 2031 /em>, which is 1\n-00180310: 3020 6279 2064 6566 6175 6c74 2e20 4561 0 by default. Ea\n-00180320: 6368 2045 494e 5452 206d 6179 2069 6e63 ch EINTR may inc\n-00180330: 7265 6173 6520 7468 6520 626c 6f63 6b69 rease the blocki\n-00180340: 6e67 2074 696d 6520 6279 2075 7020 746f ng time by up to\n-00180350: 206f 6e65 2073 6563 6f6e 642c 2075 7020 one second, up \n-00180360: 746f 203c 636f 6465 3e23 534f 4150 5f4d to #SOAP_M\n-00180370: 4158 4549 4e54 523c 2f63 6f64 653e 2073 AXEINTR s\n-00180380: 6563 6f6e 6473 2074 6f74 616c 2e3c 2f64 econds total..

      .... \n-001803a0: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n-001803b0: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n-001803c0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

      ..Closing\n-00180400: 2063 6f6e 6e65 6374 696f 6e73 2062 7920 connections by \n-00180410: 666f 7263 653c 2f68 323e 0a3c 703e 546f force
  • .

    To\n-00180420: 2063 6c6f 7365 2061 2073 6f63 6b65 7420 close a socket \n-00180430: 636f 6e6e 6563 7469 6f6e 2062 7920 666f connection by fo\n-00180440: 7263 652c 2079 6f75 2063 616e 2075 7365 rce, you can use\n-00180450: 203c 636f 6465 3e73 6f61 705f 666f 7263 soap_forc\n-00180460: 655f 636c 6f73 6573 6f63 6b28 736f 6170 e_closesock(soap\n-00180470: 293c 2f63 6f64 653e 2c20 7768 6963 6820 ), which \n-00180480: 636c 6f73 6573 2074 6865 2063 6f6e 6e65 closes the conne\n-00180490: 6374 696f 6e20 7265 6761 7264 6c65 7373 ction regardless\n-001804a0: 2069 6620 6b65 6570 2d61 6c69 7665 2069 if keep-alive i\n-001804b0: 7320 6163 7469 7665 2e20 4279 2063 6f6e s active. By con\n-001804c0: 7472 6173 742c 203c 636f 6465 3e73 6f61 trast, soa\n-001804d0: 705f 636c 6f73 6573 6f63 6b28 736f 6170 p_closesock(soap\n-001804e0: 293c 2f63 6f64 653e 206f 6e6c 7920 636c ) only cl\n-001804f0: 6f73 6573 2074 6865 2063 6f6e 6e65 6374 oses the connect\n-00180500: 696f 6e20 7768 656e 206b 6565 702d 616c ion when keep-al\n-00180510: 6976 6520 6973 206e 6f74 2061 6374 6976 ive is not activ\n-00180520: 652e 3c2f 703e 0a3c 703e 546f 2066 6f72 e.

    .

    To for\n-00180530: 6365 2d63 6c6f 7365 2061 2063 6f6e 6e65 ce-close a conne\n-00180540: 6374 696f 6e20 6672 6f6d 2061 6e6f 7468 ction from anoth\n-00180550: 6572 2074 6872 6561 642c 2063 6f6d 7069 er thread, compi\n-00180560: 6c65 2073 7464 736f 6170 322e 6320 6f72 le stdsoap2.c or\n-00180570: 2073 7464 736f 6170 322e 6370 7020 616e stdsoap2.cpp an\n-00180580: 6420 796f 7572 2070 726f 6a65 6374 2073 d your project s\n-00180590: 6f75 7263 6520 636f 6465 2077 6974 6820 ource code with \n-001805a0: 3c63 6f64 653e 2357 4954 485f 5345 4c46 #WITH_SELF\n-001805b0: 5f50 4950 453c 2f63 6f64 653e 2074 6f20 _PIPE to \n-001805c0: 656e 6162 6c65 2074 6869 7320 6665 6174 enable this feat\n-001805d0: 7572 652e 2055 7365 203c 636f 6465 3e73 ure. Use s\n-001805e0: 6f61 705f 636c 6f73 655f 636f 6e6e 6563 oap_close_connec\n-001805f0: 7469 6f6e 2873 6f61 7029 3c2f 636f 6465 tion(soap) on the <\n-00180610: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00180620: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00180630: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n-00180640: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n-00180650: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n-00180660: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-00180670: 7874 2074 6861 7420 6d75 7374 2063 6c6f xt that must clo\n-00180680: 7365 2e20 596f 7520 6361 6e20 6d61 6b65 se. You can make\n-00180690: 2074 6869 7320 6361 6c6c 2066 726f 6d20 this call from \n-001806a0: 616e 6f74 6865 7220 7468 7265 6164 2061 another thread a\n-001806b0: 6e64 2070 6173 7320 7468 6520 3c63 6f64 nd pass the so\n-00180710: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n-00180720: 6e74 6578 7420 746f 2074 6869 7320 6675 ntext to this fu\n-00180730: 6e63 7469 6f6e 206f 6620 7468 6520 7468 nction of the th\n-00180740: 7265 6164 2074 6861 7420 6d75 7374 2063 read that must c\n-00180750: 6c6f 7365 2063 6f6e 6e65 6374 696f 6e73 lose connections\n-00180760: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t\n-00180780: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n-00180790: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 323e nts

    .

    \n-001807a0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Socket opt\n-001807d0: 696f 6e73 2061 6e64 2066 6c61 6773 3c2f ions and flags.

    Socket co\n-001807f0: 6d6d 756e 6963 6174 696f 6e73 2063 616e mmunications can\n-00180800: 2062 6520 636f 6e74 726f 6c6c 6564 2077 be controlled w\n-00180810: 6974 6820 736f 636b 6574 206f 7074 696f ith socket optio\n-00180820: 6e73 2061 6e64 2066 6c61 6773 2e20 5468 ns and flags. Th\n-00180830: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context flag\n-001808a0: 7320 6172 653a 3c2f 703e 0a3c 756c 3e0a s are:

    ..

    See the\n-00181010: 206f 7065 7261 7469 6e67 2073 7973 7465 operating syste\n-00181020: 6d20 6d61 6e75 616c 2070 6167 6573 206f m manual pages o\n-00181030: 6620 3c63 6f64 653e 7365 6e64 3c2f 636f f send and re\n-00181050: 6376 3c2f 636f 6465 3e20 666f 7220 3c63 cv for soap\n-00181120: 3a3a 736f 636b 6574 5f66 6c61 6773 3c2f ::socket_flags values\n-00181140: 2061 6e64 2073 6565 2074 6865 206f 7065 and see the ope\n-00181150: 7261 7469 6e67 2073 7973 7465 6d20 6d61 rating system ma\n-00181160: 6e75 616c 2070 6167 6573 206f 6620 3c63 nual pages of setsockopt for \n-00181190: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co\n-00181250: 6e6e 6563 745f 666c 6167 733c 2f61 3e3c nnect_flags<\n-00181260: 2f63 6f64 653e 2c20 3c63 6f64 653e 3c61 /code>, soap::bind\n-00181330: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags, and soap::accep\n-00181410: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags (level \n-00181430: 534f 4c5f 534f 434b 4554 3c2f 636f 6465 SOL_SOCKET) values. These\n-00181450: 203c 636f 6465 3e53 4f5f 3c2f 636f 6465 SO_ socket option \n-00181470: 666c 6167 7320 2873 6565 203c 636f 6465 flags (see setsockopt manual pages)\n-001814a0: 2063 616e 2062 6520 6269 742d 7769 7365 can be bit-wise\n-001814b0: 206f 722d 6564 2074 6f20 7365 7420 6d75 or-ed to set mu\n-001814c0: 6c74 6970 6c65 2073 6f63 6b65 7420 6f70 ltiple socket op\n-001814d0: 7469 6f6e 7320 6174 206f 6e63 652e 3c2f tions at once..

    The client\n-001814f0: 2d73 6964 6520 666c 6167 203c 636f 6465 -side flag soap::c\n-001815c0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n-001815d0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n-001815e0: 534f 5f4c 494e 4745 523c 2f63 6f64 653e SO_LINGER\n-001815f0: 2069 7320 7375 7070 6f72 7465 6420 7769 is supported wi\n-00181600: 7468 2076 616c 7565 7320 3c63 6f64 653e th values \n-00181610: 6c5f 6f6e 6f66 663c 2f63 6f64 653e 203d l_onoff =\n-00181620: 2031 2061 6e64 203c 636f 6465 3e6c 5f6c 1 and l_l\n-00181630: 696e 6765 723c 2f63 6f64 653e 203d 203c inger = <\n-00181640: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-00181700: 703a 3a6c 696e 6765 725f 7469 6d65 3c2f p::linger_time. The <\n-00181720: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-001817e0: 703a 3a6c 696e 6765 725f 7469 6d65 3c2f p::linger_time determ\n-00181800: 696e 6573 2074 6865 2077 6169 7420 7469 ines the wait ti\n-00181810: 6d65 2028 7468 6520 7469 6d65 2072 6573 me (the time res\n-00181820: 6f6c 7574 696f 6e20 6973 2073 7973 7465 olution is syste\n-00181830: 6d20 6465 7065 6e64 656e 742c 2074 686f m dependent, tho\n-00181840: 7567 6820 6163 636f 7264 696e 6720 746f ugh according to\n-00181850: 2073 6f6d 6520 6578 7065 7274 7320 6f6e some experts on\n-00181860: 6c79 207a 6572 6f20 616e 6420 6e6f 6e7a ly zero and nonz\n-00181870: 6572 6f20 7661 6c75 6573 206d 6174 7465 ero values matte\n-00181880: 7229 2e20 5468 6520 6c69 6e67 6572 206f r). The linger o\n-00181890: 7074 696f 6e20 6361 6e20 6265 2075 7365 ption can be use\n-001818a0: 6420 746f 206d 616e 6167 6520 7468 6520 d to manage the \n-001818b0: 6e75 6d62 6572 206f 6620 636f 6e6e 6563 number of connec\n-001818c0: 7469 6f6e 7320 7468 6174 2072 656d 6169 tions that remai\n-001818d0: 6e20 696e 203c 636f 6465 3e54 494d 455f n in TIME_\n-001818e0: 5741 4954 3c2f 636f 6465 3e20 7374 6174 WAIT stat\n-001818f0: 6520 6174 2074 6865 2073 6572 7665 7220 e at the server \n-00181900: 7369 6465 2e3c 2f70 3e0a 3c70 3e46 6f72 side.

    .

    For\n-00181910: 2065 7861 6d70 6c65 2c20 746f 2064 6973 example, to dis\n-00181920: 6162 6c65 2053 4947 5049 5045 2073 6967 able SIGPIPE sig\n-00181930: 6e61 6c73 206f 6e20 556e 6978 2f4c 696e nals on Unix/Lin\n-00181940: 7578 2070 6c61 7466 6f72 6d73 2075 7365 ux platforms use\n-00181950: 3a20 3c63 6f64 653e 3c61 2063 6c61 7373 : \n-00181a10: 736f 6170 3a3a 736f 636b 6574 5f66 6c61 soap::socket_fla\n-00181a20: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n-00181a30: 3c63 6f64 653e 4d53 475f 4e4f 5349 474e MSG_NOSIGN\n-00181a40: 414c 3c2f 636f 6465 3e20 616e 642f 6f72 AL and/or\n-00181a50: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-00181b10: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla\n-00181b20: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n-00181b30: 3c63 6f64 653e 534f 5f4e 4f53 4947 5049 SO_NOSIGPI\n-00181b40: 5045 3c2f 636f 6465 3e20 2869 2e65 2e20 PE (i.e. \n-00181b50: 636c 6965 6e74 2d73 6964 6520 636f 6e6e client-side conn\n-00181b60: 6563 7429 2064 6570 656e 6469 6e67 206f ect) depending o\n-00181b70: 6e20 796f 7572 2070 6c61 7466 6f72 6d2e n your platform.\n-00181b80: 3c2f 703e 0a3c 703e 5573 6520 3c63 6f64

    .

    Use soap::\n-00181c50: 6269 6e64 5f66 6c61 6773 3c2f 613e 3c2f bind_flags = SO\n-00181c70: 5f52 4555 5345 4144 4452 3c2f 636f 6465 _REUSEADDR to enable serv\n-00181c90: 6572 2d73 6964 6520 706f 7274 2072 6575 er-side port reu\n-00181ca0: 7365 2061 6e64 206c 6f63 616c 2070 6f72 se and local por\n-00181cb0: 7420 7368 6172 696e 6720 2862 7574 2062 t sharing (but b\n-00181cc0: 6520 6177 6172 6520 6f66 2074 6865 2070 e aware of the p\n-00181cd0: 6f73 7369 626c 6520 7365 6375 7269 7479 ossible security\n-00181ce0: 2069 6d70 6c69 6361 7469 6f6e 7320 7375 implications su\n-00181cf0: 6368 2061 7320 706f 7274 2068 696a 6163 ch as port hijac\n-00181d00: 6b69 6e67 292e 3c2f 703e 0a3c 703e 4e6f king).

    .

    No\n-00181d10: 7465 2074 6861 7420 796f 7520 6861 7665 te that you have\n-00181d20: 2061 6363 6573 7320 746f 2074 6865 203c access to the <\n-00181d30: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap->ma\n-00181d90: 7374 6572 3c2f 636f 6465 3e20 736f 636b ster sock\n-00181da0: 6574 2076 616c 7565 2072 6574 7572 6e65 et value returne\n-00181db0: 6420 6279 203c 636f 6465 3e3c 6120 636c d by soap\n-00181e30: 5f62 696e 643c 2f61 3e3c 2f63 6f64 653e _bind\n-00181e40: 2073 6f20 796f 7520 6361 6e20 7365 7420 so you can set \n-00181e50: 6d75 6c74 6970 6c65 2073 6f63 6b65 7420 multiple socket \n-00181e60: 6f70 7469 6f6e 7320 6279 2063 616c 6c69 options by calli\n-00181e70: 6e67 203c 636f 6465 3e73 6574 736f 636b ng setsock\n-00181e80: 6f70 743c 2f63 6f64 653e 2061 7320 666f opt as fo\n-00181e90: 6c6c 6f77 733a 3c2f 703e 0a3c 6469 7620 llows:

    .
    int\n-00181ee0: 3c2f 7370 616e 3e20 736f 636b 203d 203c sock = <\n-00181ef0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00181f00: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00181f10: 705f 5f69 6f2e 6874 6d6c 2367 6130 6139 p__io.html#ga0a9\n-00181f20: 3732 3561 3365 6462 6332 3762 3937 3435 725a3edbc27b9745\n-00181f30: 3631 3930 6665 6534 3763 6331 3822 3e73 6190fee47cc18\">s\n-00181f40: 6f61 705f 6269 6e64 3c2f 613e 283c 6120 oap_bind(soap, host,\n-00181fd0: 203c 6120 636c 6173 733d 2263 6f64 6522 port, backlog); ..
    soap->accept_ti\n+0017fe10: 6d65 6f75 743c 2f61 3e20 3d20 3130 2075 meout = 10 u\n+0017fe20: 5365 633b 203c 2f64 6976 3e0a 3c64 6976 Sec;
    .soap-&g\n+0017fe70: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;send_\n+0017fec0: 7469 6d65 6f75 743c 2f61 3e20 3d20 3230 timeout = 20\n+0017fed0: 206d 5365 633b 203c 2f64 6976 3e0a 3c64 mSec;
    .\n+0017fef0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017ff20: 2667 743b 3c61 2063 6c61 7373 3d22 636f >rec\n+0017ff70: 765f 7469 6d65 6f75 743c 2f61 3e20 3d20 v_timeout = \n+0017ff80: 3230 206d 5365 633b 203c 2f64 6976 3e0a 20 mSec;
    .\n+0017ff90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->r\n+00180020: 6563 765f 7469 6d65 6f75 743c 2f61 3e20 ecv_timeout \n+00180030: 3d20 3130 3b3c 2f64 6976 3e0a 3c2f 6469 = 10;
    .
    <\n+00180070: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning<\n+00180080: 6464 3e4d 616e 7920 4c69 6e75 7820 7665 dd>Many Linux ve\n+00180090: 7273 696f 6e73 2064 6f20 6e6f 7420 7375 rsions do not su\n+001800a0: 7070 6f72 7420 6e6f 6e2d 626c 6f63 6b69 pport non-blocki\n+001800b0: 6e67 203c 636f 6465 3e63 6f6e 6e65 6374 ng connect\n+001800c0: 2829 3c2f 636f 6465 3e2e 2054 6865 7265 (). There\n+001800d0: 666f 7265 2c20 7365 7474 696e 6720 3c63 fore, setting soap\n+001801a0: 3a3a 636f 6e6e 6563 745f 7469 6d65 6f75 ::connect_timeou\n+001801b0: 743c 2f61 3e3c 2f63 6f64 653e 2066 6f72 t for\n+001801c0: 206e 6f6e 2d62 6c6f 636b 696e 6720 3c63 non-blocking soap_call_ns\n+001801e0: 5f5f 7765 626d 6574 686f 643c 2f63 6f64 __webmethod calls may not\n+00180200: 2077 6f72 6b20 756e 6465 7220 4c69 6e75 work under Linu\n+00180210: 782e 3c2f 6464 3e0a 3c64 643e 0a49 6e74 x..
    .Int\n+00180220: 6572 7275 7074 7320 2845 494e 5452 2920 errupts (EINTR) \n+00180230: 6361 6e20 6166 6665 6374 2074 6865 2062 can affect the b\n+00180240: 6c6f 636b 696e 6720 7469 6d65 2069 6e20 locking time in \n+00180250: 492f 4f20 6f70 6572 6174 696f 6e73 2e20 I/O operations. \n+00180260: 5468 6520 6d61 7869 6d75 6d20 6e75 6d62 The maximum numb\n+00180270: 6572 206f 6620 4549 4e54 5220 7468 6174 er of EINTR that\n+00180280: 2077 696c 6c20 6e6f 7420 7472 6967 6765 will not trigge\n+00180290: 7220 616e 2065 7272 6f72 2069 7320 7365 r an error is se\n+001802a0: 7420 6279 203c 636f 6465 3e23 534f 4150 t by #SOAP\n+001802b0: 5f4d 4158 4549 4e54 523c 2f63 6f64 653e _MAXEINTR\n+001802c0: 2069 6e20 3c65 6d3e 3c63 6f64 653e 6773 in gs\n+001802d0: 6f61 702f 7374 6473 6f61 7032 2e68 3c2f oap/stdsoap2.h, whic\n+001802f0: 6820 6973 2031 3020 6279 2064 6566 6175 h is 10 by defau\n+00180300: 6c74 2e20 4561 6368 2045 494e 5452 206d lt. Each EINTR m\n+00180310: 6179 2069 6e63 7265 6173 6520 7468 6520 ay increase the \n+00180320: 626c 6f63 6b69 6e67 2074 696d 6520 6279 blocking time by\n+00180330: 2075 7020 746f 206f 6e65 2073 6563 6f6e up to one secon\n+00180340: 642c 2075 7020 746f 203c 636f 6465 3e23 d, up to #\n+00180350: 534f 4150 5f4d 4158 4549 4e54 523c 2f63 SOAP_MAXEINTR seconds tot\n+00180370: 616c 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 al.
    ..... Back to table \n+001803a0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n+001803b0: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .C\n+001803e0: 6c6f 7369 6e67 2063 6f6e 6e65 6374 696f losing connectio\n+001803f0: 6e73 2062 7920 666f 7263 653c 2f68 323e ns by force

    \n+00180400: 0a3c 703e 546f 2063 6c6f 7365 2061 2073 .

    To close a s\n+00180410: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n+00180420: 2062 7920 666f 7263 652c 2079 6f75 2063 by force, you c\n+00180430: 616e 2075 7365 203c 636f 6465 3e73 6f61 an use soa\n+00180440: 705f 666f 7263 655f 636c 6f73 6573 6f63 p_force_closesoc\n+00180450: 6b28 736f 6170 293c 2f63 6f64 653e 2c20 k(soap), \n+00180460: 7768 6963 6820 636c 6f73 6573 2074 6865 which closes the\n+00180470: 2063 6f6e 6e65 6374 696f 6e20 7265 6761 connection rega\n+00180480: 7264 6c65 7373 2069 6620 6b65 6570 2d61 rdless if keep-a\n+00180490: 6c69 7665 2069 7320 6163 7469 7665 2e20 live is active. \n+001804a0: 4279 2063 6f6e 7472 6173 742c 203c 636f By contrast, soap_closesoc\n+001804c0: 6b28 736f 6170 293c 2f63 6f64 653e 206f k(soap) o\n+001804d0: 6e6c 7920 636c 6f73 6573 2074 6865 2063 nly closes the c\n+001804e0: 6f6e 6e65 6374 696f 6e20 7768 656e 206b onnection when k\n+001804f0: 6565 702d 616c 6976 6520 6973 206e 6f74 eep-alive is not\n+00180500: 2061 6374 6976 652e 3c2f 703e 0a3c 703e active.

    .

    \n+00180510: 546f 2066 6f72 6365 2d63 6c6f 7365 2061 To force-close a\n+00180520: 2063 6f6e 6e65 6374 696f 6e20 6672 6f6d connection from\n+00180530: 2061 6e6f 7468 6572 2074 6872 6561 642c another thread,\n+00180540: 2063 6f6d 7069 6c65 2073 7464 736f 6170 compile stdsoap\n+00180550: 322e 6320 6f72 2073 7464 736f 6170 322e 2.c or stdsoap2.\n+00180560: 6370 7020 616e 6420 796f 7572 2070 726f cpp and your pro\n+00180570: 6a65 6374 2073 6f75 7263 6520 636f 6465 ject source code\n+00180580: 2077 6974 6820 3c63 6f64 653e 2357 4954 with #WIT\n+00180590: 485f 5345 4c46 5f50 4950 453c 2f63 6f64 H_SELF_PIPE to enable thi\n+001805b0: 7320 6665 6174 7572 652e 2055 7365 203c s feature. Use <\n+001805c0: 636f 6465 3e73 6f61 705f 636c 6f73 655f code>soap_close_\n+001805d0: 636f 6e6e 6563 7469 6f6e 2873 6f61 7029 connection(soap)\n+001805e0: 3c2f 636f 6465 3e20 6f6e 2074 6865 203c on the <\n+001805f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+00180650: 2063 6f6e 7465 7874 2074 6861 7420 6d75 context that mu\n+00180660: 7374 2063 6c6f 7365 2e20 596f 7520 6361 st close. You ca\n+00180670: 6e20 6d61 6b65 2074 6869 7320 6361 6c6c n make this call\n+00180680: 2066 726f 6d20 616e 6f74 6865 7220 7468 from another th\n+00180690: 7265 6164 2061 6e64 2070 6173 7320 7468 read and pass th\n+001806a0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context to t\n+00180710: 6869 7320 6675 6e63 7469 6f6e 206f 6620 his function of \n+00180720: 7468 6520 7468 7265 6164 2074 6861 7420 the thread that \n+00180730: 6d75 7374 2063 6c6f 7365 2063 6f6e 6e65 must close conne\n+00180740: 6374 696f 6e73 2e3c 2f70 3e0a 3c70 3ef0 ctions.

    .

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

    .Sock\n+001807b0: 6574 206f 7074 696f 6e73 2061 6e64 2066 et options and f\n+001807c0: 6c61 6773 3c2f 6832 3e0a 3c70 3e53 6f63 lags

    .

    Soc\n+001807d0: 6b65 7420 636f 6d6d 756e 6963 6174 696f ket communicatio\n+001807e0: 6e73 2063 616e 2062 6520 636f 6e74 726f ns can be contro\n+001807f0: 6c6c 6564 2077 6974 6820 736f 636b 6574 lled with socket\n+00180800: 206f 7074 696f 6e73 2061 6e64 2066 6c61 options and fla\n+00180810: 6773 2e20 5468 6520 3c63 6f64 653e 3c61 gs. The soap contex\n+00180880: 7420 666c 6167 7320 6172 653a 3c2f 703e t flags are:

    \n+00180890: 0a3c 756c 3e0a 3c6c 693e 3c63 6f64 653e .
      .
    • \n+001808a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so\n+00180960: 636b 6574 5f66 6c61 6773 3c2f 613e 3c2f cket_flags to set fla\n+00180980: 6773 2066 6f72 2074 6865 2073 6f63 6b65 gs for the socke\n+00180990: 7420 3c63 6f64 653e 7365 6e64 3c2f 636f t send and re\n+001809b0: 6376 3c2f 636f 6465 3e20 6361 6c6c 732e cv calls.\n+001809c0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
    • .
    • \n+001809d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co\n+00180a90: 6e6e 6563 745f 666c 6167 733c 2f61 3e3c nnect_flags<\n+00180aa0: 2f63 6f64 653e 2074 6f20 7365 7420 636c /code> to set cl\n+00180ab0: 6965 6e74 2d73 6964 6520 3c63 6f64 653e ient-side \n+00180ac0: 7365 7473 6f63 6b6f 7074 3c2f 636f 6465 setsockopt SOL_SOCK\n+00180ae0: 4554 3c2f 636f 6465 3e20 736f 636b 6574 ET socket\n+00180af0: 206f 7074 696f 6e73 2077 6865 6e20 636f options when co\n+00180b00: 6e6e 6563 7469 6e67 2e3c 2f6c 693e 0a3c nnecting.
    • .<\n+00180b10: 6c69 3e3c 636f 6465 3e3c 6120 636c 6173 li>soap::bind_flag\n+00180be0: 733c 2f61 3e3c 2f63 6f64 653e 2074 6f20 s to \n+00180bf0: 7365 7420 7365 7276 6572 2d73 6964 6520 set server-side \n+00180c00: 3c63 6f64 653e 7365 7473 6f63 6b6f 7074 setsockopt\n+00180c10: 3c2f 636f 6465 3e20 3c63 6f64 653e 534f SO\n+00180c20: 4c5f 534f 434b 4554 3c2f 636f 6465 3e20 L_SOCKET \n+00180c30: 736f 636b 6574 206f 7074 696f 6e73 2077 socket options w\n+00180c40: 6865 6e20 6578 6563 7574 696e 6720 3c63 hen executing soap_bind..\n+00180ce0: 3c6c 693e 3c63 6f64 653e 3c61 2063 6c61
    • soap::bind_v6o\n+00180db0: 6e6c 793c 2f61 3e3c 2f63 6f64 653e 2073 nly s\n+00180dc0: 6574 2074 6f20 3120 746f 2073 6574 203c et to 1 to set <\n+00180dd0: 636f 6465 3e73 6574 736f 636b 6f70 743c code>setsockopt<\n+00180de0: 2f63 6f64 653e 203c 636f 6465 3e49 5050 /code> IPP\n+00180df0: 524f 544f 5f49 5056 363c 2f63 6f64 653e ROTO_IPV6\n+00180e00: 203c 636f 6465 3e49 5056 365f 5636 4f4e IPV6_V6ON\n+00180e10: 4c59 3c2f 636f 6465 3e2e 3c2f 6c69 3e0a LY.
    • .\n+00180e20: 3c6c 693e 3c63 6f64 653e 3c61 2063 6c61
    • soap::accept_f\n+00180ef0: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+00180f00: 746f 2073 6574 2066 6c61 6773 2074 6f20 to set flags to \n+00180f10: 7468 6520 3c63 6f64 653e 7365 7473 6f63 the setsoc\n+00180f20: 6b6f 7074 3c2f 636f 6465 3e20 736f 636b kopt sock\n+00180f30: 6574 206f 7074 696f 6e73 2077 6865 6e20 et options when \n+00180f40: 6578 6563 7574 696e 6720 3c63 6f64 653e executing \n+00180f50: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ac\n+00180fd0: 6365 7074 3c2f 613e 3c2f 636f 6465 3e2e cept.\n+00180fe0: 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 3e53
    • .
    .

    S\n+00180ff0: 6565 2074 6865 206f 7065 7261 7469 6e67 ee the operating\n+00181000: 2073 7973 7465 6d20 6d61 6e75 616c 2070 system manual p\n+00181010: 6167 6573 206f 6620 3c63 6f64 653e 7365 ages of se\n+00181020: 6e64 3c2f 636f 6465 3e20 616e 6420 3c63 nd and recv \n+00181040: 666f 7220 3c63 6f64 653e 3c61 2063 6c61 for soap::socket_f\n+00181110: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+00181120: 7661 6c75 6573 2061 6e64 2073 6565 2074 values and see t\n+00181130: 6865 206f 7065 7261 7469 6e67 2073 7973 he operating sys\n+00181140: 7465 6d20 6d61 6e75 616c 2070 6167 6573 tem manual pages\n+00181150: 206f 6620 3c63 6f64 653e 7365 7473 6f63 of setsoc\n+00181160: 6b6f 7074 3c2f 636f 6465 3e20 666f 7220 kopt for \n+00181170: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00181230: 6170 3a3a 636f 6e6e 6563 745f 666c 6167 ap::connect_flag\n+00181240: 733c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 s, soap\n+00181310: 3a3a 6269 6e64 5f66 6c61 6773 3c2f 613e ::bind_flags\n+00181320: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and soap:\n+001813f0: 3a61 6363 6570 745f 666c 6167 733c 2f61 :accept_flags (level \n+00181410: 3c63 6f64 653e 534f 4c5f 534f 434b 4554 SOL_SOCKET\n+00181420: 3c2f 636f 6465 3e29 2076 616c 7565 732e ) values.\n+00181430: 2054 6865 7365 203c 636f 6465 3e53 4f5f These SO_\n+00181440: 3c2f 636f 6465 3e20 736f 636b 6574 206f socket o\n+00181450: 7074 696f 6e20 666c 6167 7320 2873 6565 ption flags (see\n+00181460: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n+00181470: 743c 2f63 6f64 653e 206d 616e 7561 6c20 t manual \n+00181480: 7061 6765 7329 2063 616e 2062 6520 6269 pages) can be bi\n+00181490: 742d 7769 7365 206f 722d 6564 2074 6f20 t-wise or-ed to \n+001814a0: 7365 7420 6d75 6c74 6970 6c65 2073 6f63 set multiple soc\n+001814b0: 6b65 7420 6f70 7469 6f6e 7320 6174 206f ket options at o\n+001814c0: 6e63 652e 3c2f 703e 0a3c 703e 5468 6520 nce.

    .

    The \n+001814d0: 636c 6965 6e74 2d73 6964 6520 666c 6167 client-side flag\n+001814e0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+001815a0: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla\n+001815b0: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n+001815c0: 3c63 6f64 653e 534f 5f4c 494e 4745 523c SO_LINGER<\n+001815d0: 2f63 6f64 653e 2069 7320 7375 7070 6f72 /code> is suppor\n+001815e0: 7465 6420 7769 7468 2076 616c 7565 7320 ted with values \n+001815f0: 3c63 6f64 653e 6c5f 6f6e 6f66 663c 2f63 l_onoff = 1 and l_linger = soap::linger_\n+001816f0: 7469 6d65 3c2f 613e 3c2f 636f 6465 3e2e time.\n+00181700: 2054 6865 203c 636f 6465 3e3c 6120 636c The soap::linger_\n+001817d0: 7469 6d65 3c2f 613e 3c2f 636f 6465 3e20 time \n+001817e0: 6465 7465 726d 696e 6573 2074 6865 2077 determines the w\n+001817f0: 6169 7420 7469 6d65 2028 7468 6520 7469 ait time (the ti\n+00181800: 6d65 2072 6573 6f6c 7574 696f 6e20 6973 me resolution is\n+00181810: 2073 7973 7465 6d20 6465 7065 6e64 656e system dependen\n+00181820: 742c 2074 686f 7567 6820 6163 636f 7264 t, though accord\n+00181830: 696e 6720 746f 2073 6f6d 6520 6578 7065 ing to some expe\n+00181840: 7274 7320 6f6e 6c79 207a 6572 6f20 616e rts only zero an\n+00181850: 6420 6e6f 6e7a 6572 6f20 7661 6c75 6573 d nonzero values\n+00181860: 206d 6174 7465 7229 2e20 5468 6520 6c69 matter). The li\n+00181870: 6e67 6572 206f 7074 696f 6e20 6361 6e20 nger option can \n+00181880: 6265 2075 7365 6420 746f 206d 616e 6167 be used to manag\n+00181890: 6520 7468 6520 6e75 6d62 6572 206f 6620 e the number of \n+001818a0: 636f 6e6e 6563 7469 6f6e 7320 7468 6174 connections that\n+001818b0: 2072 656d 6169 6e20 696e 203c 636f 6465 remain in TIME_WAIT state at the s\n+001818e0: 6572 7665 7220 7369 6465 2e3c 2f70 3e0a erver side.

    .\n+001818f0: 3c70 3e46 6f72 2065 7861 6d70 6c65 2c20

    For example, \n+00181900: 746f 2064 6973 6162 6c65 2053 4947 5049 to disable SIGPI\n+00181910: 5045 2073 6967 6e61 6c73 206f 6e20 556e PE signals on Un\n+00181920: 6978 2f4c 696e 7578 2070 6c61 7466 6f72 ix/Linux platfor\n+00181930: 6d73 2075 7365 3a20 3c63 6f64 653e 3c61 ms use: soap::sock\n+00181a00: 6574 5f66 6c61 6773 3c2f 613e 3c2f 636f et_flags = MSG_\n+00181a20: 4e4f 5349 474e 414c 3c2f 636f 6465 3e20 NOSIGNAL \n+00181a30: 616e 642f 6f72 203c 636f 6465 3e3c 6120 and/or soap::conne\n+00181b00: 6374 5f66 6c61 6773 3c2f 613e 3c2f 636f ct_flags = SO_N\n+00181b20: 4f53 4947 5049 5045 3c2f 636f 6465 3e20 OSIGPIPE \n+00181b30: 2869 2e65 2e20 636c 6965 6e74 2d73 6964 (i.e. client-sid\n+00181b40: 6520 636f 6e6e 6563 7429 2064 6570 656e e connect) depen\n+00181b50: 6469 6e67 206f 6e20 796f 7572 2070 6c61 ding on your pla\n+00181b60: 7466 6f72 6d2e 3c2f 703e 0a3c 703e 5573 tform.

    .

    Us\n+00181b70: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n+00181c30: 736f 6170 3a3a 6269 6e64 5f66 6c61 6773 soap::bind_flags\n+00181c40: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_REUSEADDR\n+00181c60: 3c2f 636f 6465 3e20 746f 2065 6e61 626c to enabl\n+00181c70: 6520 7365 7276 6572 2d73 6964 6520 706f e server-side po\n+00181c80: 7274 2072 6575 7365 2061 6e64 206c 6f63 rt reuse and loc\n+00181c90: 616c 2070 6f72 7420 7368 6172 696e 6720 al port sharing \n+00181ca0: 2862 7574 2062 6520 6177 6172 6520 6f66 (but be aware of\n+00181cb0: 2074 6865 2070 6f73 7369 626c 6520 7365 the possible se\n+00181cc0: 6375 7269 7479 2069 6d70 6c69 6361 7469 curity implicati\n+00181cd0: 6f6e 7320 7375 6368 2061 7320 706f 7274 ons such as port\n+00181ce0: 2068 696a 6163 6b69 6e67 292e 3c2f 703e hijacking).

    \n+00181cf0: 0a3c 703e 4e6f 7465 2074 6861 7420 796f .

    Note that yo\n+00181d00: 7520 6861 7665 2061 6363 6573 7320 746f u have access to\n+00181d10: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap-\n+00181d70: 2667 743b 6d61 7374 6572 3c2f 636f 6465 >master socket value r\n+00181d90: 6574 7572 6e65 6420 6279 203c 636f 6465 eturned by soap_bind<\n+00181e20: 2f63 6f64 653e 2073 6f20 796f 7520 6361 /code> so you ca\n+00181e30: 6e20 7365 7420 6d75 6c74 6970 6c65 2073 n set multiple s\n+00181e40: 6f63 6b65 7420 6f70 7469 6f6e 7320 6279 ocket options by\n+00181e50: 2063 616c 6c69 6e67 203c 636f 6465 3e73 calling s\n+00181e60: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt\n+00181e70: 2061 7320 666f 6c6c 6f77 733a 3c2f 703e as follows:

    \n+00181e80: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int so\n+00181ed0: 636b 203d 203c 6120 636c 6173 733d 2263 ck = soap_bind(soap, hos\n+00181fb0: 743c 2f61 3e2c 203c 6120 636c 6173 733d t, \n+00182000: 706f 7274 3c2f 613e 2c20 6261 636b 6c6f port, backlo\n+00182010: 6729 3b20 3c2f 6469 763e 0a3c 6469 7620 g);
    .
    if\n+00182050: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_valid_s\n+001820b0: 6f63 6b65 743c 2f61 3e28 736f 636b 2929 ocket(sock))\n+001820c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    {
    . \n-00182110: 7365 7473 6f63 6b6f 7074 2873 6f63 6b2c setsockopt(sock,\n-00182120: 202e 2e2e 2c20 2e2e 2e2c 202e 2e2e 2c20 ..., ..., ..., \n-00182130: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c64 6976 ...);
    . \n-00182150: 7365 7473 6f63 6b6f 7074 2873 6f63 6b2c setsockopt(sock,\n-00182160: 202e 2e2e 2c20 2e2e 2e2c 202e 2e2e 2c20 ..., ..., ..., \n-00182170: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c2f 6469 ...);
    .

    .... Back to t\n-001821b0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-001821c0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .Overrid\n-00182200: 696e 6720 7468 6520 686f 7374 2061 6e64 ing the host and\n-00182210: 2070 6f72 7420 746f 2063 6f6e 6e65 6374 port to connect\n-00182220: 3c2f 6832 3e0a 3c70 3e54 6f20 6f76 6572

    .

    To over\n-00182230: 7269 6465 2074 6865 2068 6f73 7420 616e ride the host an\n-00182240: 6420 706f 7274 206f 6620 7468 6520 636c d port of the cl\n-00182250: 6965 6e74 2063 6f6e 6e65 6374 696e 6720 ient connecting \n-00182260: 746f 2061 2073 6572 7665 722c 2073 6574 to a server, set\n-00182270: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-00182330: 6f61 703a 3a6f 7665 7272 6964 655f 686f oap::override_ho\n-00182340: 7374 3c2f 613e 3c2f 636f 6465 3e20 616e st an\n-00182350: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d \n-00182410: 736f 6170 3a3a 6f76 6572 7269 6465 5f70 soap::override_p\n-00182420: 6f72 743c 2f61 3e3c 2f63 6f64 653e 3a3c ort:<\n-00182430: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    soap->\n-00182490: 3c61 2063 6c61 7373 3d22 636f 6465 2220 overrid\n-001824e0: 655f 686f 7374 3c2f 613e 203d 203c 7370 e_host = "e\n-00182510: 7861 6d70 6c65 2e63 6f6d 2671 756f 743b xample.com"\n-00182520: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; /\n-00182540: 2f20 686f 7374 206e 616d 6520 6f72 2049 / host name or I\n-00182550: 5020 6164 6472 6573 7320 3c2f 7370 616e P address
    .
    soap->override_\n-00182600: 706f 7274 3c2f 613e 203d 2038 303b 2020 port = 80; \n-00182610: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-00182630: 2f2f 2070 6f72 7420 6e75 6d62 6572 2074 // port number t\n-00182640: 6f20 7573 6520 7768 656e 206f 7665 7272 o use when overr\n-00182650: 6964 696e 6720 7468 6520 6164 6472 6573 iding the addres\n-00182660: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-00182670: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00182680: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-00182690: 6874 6d6c 5f61 3136 3634 3035 3336 3961 html_a166405369a\n-001826a0: 6431 3062 6332 3062 3930 6662 3932 3835 d10bc20b90fb9285\n-001826b0: 3432 3063 6165 223e 3c64 6976 2063 6c61 420cae\">
    soap::ov\n-00182710: 6572 7269 6465 5f68 6f73 743c 2f61 3e3c erride_host<\n-00182720: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c\n-00182740: 6861 7220 2a20 6f76 6572 7269 6465 5f68 har * override_h\n-00182750: 6f73 743c 2f64 6976 3e3c 6469 7620 636c ost
    User\n-00182770: 2d64 6566 696e 6162 6c65 2073 7472 696e -definable strin\n-00182780: 6720 746f 206f 7665 7272 6964 6520 7468 g to override th\n-00182790: 6520 686f 7374 206e 616d 6520 6f72 2049 e host name or I\n-001827a0: 5020 6164 6472 6573 7320 696e 2074 6865 P address in the\n-001827b0: 2048 5454 5020 6865 6164 6572 2077 6865 HTTP header whe\n-001827c0: 6e20 636f 6e6e 6563 7469 6e67 2061 7420 n connecting at \n-001827d0: 742e 2e2e 3c2f 6469 763e 3c64 6976 2063 t...
    \n-001827f0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00182800: 7374 6473 6f61 7032 2e68 3a34 3035 343c stdsoap2.h:4054<\n-00182810: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soap::overr\n-001828c0: 6964 655f 706f 7274 3c2f 613e 3c2f 6469 ide_port
    int overri\n-001828f0: 6465 5f70 6f72 743c 2f64 6976 3e3c 6469 de_port
    \n-00182910: 5573 6572 2d64 6566 696e 6162 6c65 2070 User-definable p\n-00182920: 6f72 7420 6e75 6d62 6572 2074 6f20 6f76 ort number to ov\n-00182930: 6572 7269 6465 2074 6865 2070 6f72 7420 erride the port \n-00182940: 6164 6472 6573 7320 696e 2074 6865 2048 address in the H\n-00182950: 5454 5020 6865 6164 6572 2077 6865 6e20 TTP header when \n-00182960: 636f 6e6e 6563 7469 6e67 2061 7420 7468 connecting at th\n-00182970: 6520 636c 692e 2e2e 3c2f 6469 763e 3c64 e cli...
    Definition:<\n-001829a0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n-001829b0: 3035 393c 2f64 6976 3e3c 2f64 6976 3e0a 059
    .\n-001829c0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    .... <\n-001829e0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href=\"#\">Back \n-001829f0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont\n-00182a00: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    ..Secur\n-00182a40: 6520 5765 6220 7365 7276 6963 6573 2077 e Web services w\n-00182a50: 6974 6820 4854 5450 533c 2f68 323e 0a3c ith HTTPS.<\n-00182a60: 703e 546f 2065 6e61 626c 6520 5353 4c20 p>To enable SSL \n-00182a70: 666f 7220 7374 616e 642d 616c 6f6e 6520 for stand-alone \n-00182a80: 6753 4f41 5020 5765 6220 7365 7276 6572 gSOAP Web server\n-00182a90: 732c 2066 6972 7374 2069 6e73 7461 6c6c s, first install\n-00182aa0: 204f 7065 6e53 534c 2061 6e64 2075 7365 OpenSSL and use\n-00182ab0: 206f 7074 696f 6e20 7468 6520 636f 6d70 option the comp\n-00182ac0: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_OPENSS\n-00182ae0: 4c3c 2f63 6f64 653e 2074 6f20 636f 6d70 L to comp\n-00182af0: 696c 6520 7468 6520 736f 7572 6365 7320 ile the sources \n-00182b00: 7769 7468 2079 6f75 7220 4320 6f72 2043 with your C or C\n-00182b10: 2b2b 2063 6f6d 7069 6c65 7220 286f 7220 ++ compiler (or \n-00182b20: 7573 6520 7468 6520 636f 6d70 696c 652d use the compile-\n-00182b30: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n-00182b40: 2357 4954 485f 474e 5554 4c53 3c2f 636f #WITH_GNUTLS if you prefe\n-00182b60: 7220 474e 5554 4c53 292c 2066 6f72 2065 r GNUTLS), for e\n-00182b70: 7861 6d70 6c65 3a20 3c2f 703e 3c70 7265 xample:

    c++ -DWITH_OP\n-00182ba0: 454e 5353 4c20 2d6f 206d 7970 726f 6720 ENSSL -o myprog \n-00182bb0: 6d79 7072 6f67 2e63 7070 2073 7464 736f myprog.cpp stdso\n-00182bc0: 6170 322e 6370 7020 736f 6170 432e 6370 ap2.cpp soapC.cp\n-00182bd0: 7020 736f 6170 5365 7276 6572 2e63 7070 p soapServer.cpp\n-00182be0: 202d 6c73 736c 202d 6c63 7279 7074 6f0a -lssl -lcrypto.\n-00182bf0: 3c2f 7072 653e 3c70 3e20 5769 7468 2047

    With G\n-00182c00: 4e55 544c 533a 203c 2f70 3e3c 7072 6520 NUTLS:

     c++ -DWITH_GNU\n-00182c30: 544c 5320 2d6f 206d 7970 726f 6720 6d79  TLS -o myprog my\n-00182c40: 7072 6f67 2e63 7070 2073 7464 736f 6170  prog.cpp stdsoap\n-00182c50: 322e 6370 7020 736f 6170 432e 6370 7020  2.cpp soapC.cpp \n-00182c60: 736f 6170 5365 7276 6572 2e63 7070 202d  soapServer.cpp -\n-00182c70: 6c67 6e75 746c 7320 2d6c 6763 7279 7074  lgnutls -lgcrypt\n-00182c80: 202d 6c67 7067 2d65 7272 6f72 0a3c 2f70   -lgpg-error.

    SSL suppo\n-00182ca0: 7274 2066 6f72 2073 7461 6e64 2d61 6c6f rt for stand-alo\n-00182cb0: 6e65 2067 534f 4150 2057 6562 2073 6572 ne gSOAP Web ser\n-00182cc0: 7669 6365 7320 6973 2065 6e61 626c 6564 vices is enabled\n-00182cd0: 2062 7920 6361 6c6c 696e 6720 3c63 6f64 by calling soap_ssl_acc\n-00182d60: 6570 743c 2f61 3e3c 2f63 6f64 653e 2074 ept t\n-00182d70: 6f20 7065 7266 6f72 6d20 7468 6520 5353 o perform the SS\n-00182d80: 4c2f 544c 5320 6861 6e64 7368 616b 6520 L/TLS handshake \n-00182d90: 6166 7465 7220 3c63 6f64 653e 3c61 2063 after soap_accept\n-00182e20: 3c2f 613e 3c2f 636f 6465 3e2e 2049 6e20 . In \n-00182e30: 6164 6469 7469 6f6e 2c20 6120 6b65 7920 addition, a key \n-00182e40: 6669 6c65 2c20 6120 4341 2066 696c 6520 file, a CA file \n-00182e50: 286f 7220 7061 7468 2074 6f20 6365 7274 (or path to cert\n-00182e60: 6966 6963 6174 6573 292c 2044 4820 6669 ificates), DH fi\n-00182e70: 6c65 2028 6966 2052 5341 2069 7320 6e6f le (if RSA is no\n-00182e80: 7420 7573 6564 292c 2061 6e64 2070 6173 t used), and pas\n-00182e90: 7377 6f72 6420 6e65 6564 2074 6f20 6265 sword need to be\n-00182ea0: 2073 7570 706c 6965 642e 2049 6e73 7472 supplied. Instr\n-00182eb0: 7563 7469 6f6e 7320 6f6e 2068 6f77 2074 uctions on how t\n-00182ec0: 6f20 646f 2074 6869 7320 6361 6e20 6265 o do this can be\n-00182ed0: 2066 6f75 6e64 2069 6e20 7468 6520 4f70 found in the Op\n-00182ee0: 656e 5353 4c20 646f 6375 6d65 6e74 6174 enSSL documentat\n-00182ef0: 696f 6e20 3c61 2068 7265 663d 2268 7474 ion http://www.\n-00182f20: 6f70 656e 7373 6c2e 6f72 673c 2f61 3e2e openssl.org.\n-00182f30: 2053 6565 2061 6c73 6f20 5365 6374 696f See also Sectio\n-00182f40: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n SSL certif\n-00182f70: 6963 6174 6573 2061 6e64 206b 6579 2066 icates and key f\n-00182f80: 696c 6573 3c2f 613e 202e 3c2f 703e 0a3c iles .

    .<\n-00182f90: 703e 4c65 7427 7320 7461 6b65 2061 206c p>Let's take a l\n-00182fa0: 6f6f 6b20 6174 2061 6e20 6578 616d 706c ook at an exampl\n-00182fb0: 6520 5353 4c20 7365 6375 7265 206d 756c e SSL secure mul\n-00182fc0: 7469 2d74 6872 6561 6465 6420 7374 616e ti-threaded stan\n-00182fd0: 642d 616c 6f6e 6520 534f 4150 2057 6562 d-alone SOAP Web\n-00182fe0: 2053 6572 7669 6365 3a3c 2f70 3e0a 3c64 Service:

    .
    \n-00183030: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-00183040: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    SOAP_SO\n-001830d0: 434b 4554 3c2f 613e 206d 2c20 733b 203c CKET m, s; <\n-001830e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    T\n-00183150: 4852 4541 445f 5459 5045 3c2f 613e 2074 HREAD_TYPE t\n-00183160: 6964 3b20 3c2f 6469 763e 0a3c 6469 7620 id;
    .
    <\n-00183180: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00183190: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soa\n-00183220: 703c 2f61 3e2c 202a 7473 6f61 703b 203c p, *tsoap; <\n-00183230: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_\n-001832a0: 7373 6c5f 696e 6974 3c2f 613e 2829 3b20 ssl_init(); \n-001832b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* init Op\n-001832d0: 656e 5353 4c20 2873 6b69 7070 696e 6720 enSSL (skipping \n-001832e0: 7468 6973 206f 7220 6361 6c6c 696e 6720 this or calling \n-001832f0: 6d75 6c74 6970 6c65 2074 696d 6573 2069 multiple times i\n-00183300: 7320 4f4b 2c20 7369 6e63 6520 7468 6520 s OK, since the \n-00183310: 656e 6769 6e65 2077 696c 6c20 696e 6974 engine will init\n-00183320: 2053 534c 2061 7574 6f6d 6174 6963 616c SSL automatical\n-00183330: 6c79 2920 2a2f 3c2f 7370 616e 3e3c 2f64 ly) */.
    /*\n-00183370: 2073 6f61 705f 7373 6c5f 6e6f 696e 6974 soap_ssl_noinit\n-00183380: 2829 3b20 2a2f 3c2f 7370 616e 3e20 3c73 (); */ /* do not in\n-001833b0: 6974 204f 7065 6e53 534c 2028 6966 2053 it OpenSSL (if S\n-001833c0: 534c 2069 7320 616c 7265 6164 7920 696e SL is already in\n-001833d0: 6974 6961 6c69 7a65 6420 656c 7365 7768 itialized elsewh\n-001833e0: 6572 6520 696e 2074 6869 7320 6170 706c ere in this appl\n-001833f0: 6963 6174 696f 6e29 202a 2f3c 2f73 7061 ication) */
    .
    if\n-00183440: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (CRYPTO_thread\n-001834a0: 5f73 6574 7570 3c2f 613e 2829 2920 3c73 _setup()) /* OpenSSL t\n-001834d0: 6872 6561 6420 6d75 7465 7820 7365 7475 hread mutex setu\n-001834e0: 7020 2a2f 3c2f 7370 616e 3e3c 2f64 6976 p */.
    {
    .\n-00183520: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde\n-00183530: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, \n-00183550: 2671 756f 743b 4361 6e6e 6f74 2073 6574 "Cannot set\n-00183560: 7570 2074 6872 6561 6420 6d75 7465 785c up thread mutex\\\n-00183570: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 293b n");\n-00183580: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ex\n-001835a0: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE)\n-001835b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } <\n-001835d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap = soap_new();\n-00183680: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n-001836c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_ssl_serve\n-00183720: 725f 636f 6e74 6578 743c 2f61 3e28 3c61 r_context(soap, <\n-00183760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    \n-00183800: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00183820: 743b 7365 7276 6572 2e70 656d 2671 756f t;server.pem&quo\n-00183830: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n-00183840: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* keyfile\n-00183860: 3a20 7265 7175 6972 6564 2077 6865 6e20 : required when \n-00183870: 7365 7276 6572 206d 7573 7420 6175 7468 server must auth\n-00183880: 656e 7469 6361 7465 2074 6f20 636c 6965 enticate to clie\n-00183890: 6e74 7320 2873 6565 2053 534c 2064 6f63 nts (see SSL doc\n-001838a0: 7320 6f6e 2068 6f77 2074 6f20 6f62 7461 s on how to obta\n-001838b0: 696e 2074 6869 7320 6669 6c65 2920 2a2f in this file) */\n-001838c0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-001838d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001838e0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > "password&\n-00183910: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-00183920: 2020 2020 203c 7370 616e 2063 6c61 7373 /* pa\n-00183940: 7373 776f 7264 2074 6f20 7265 6164 2074 ssword to read t\n-00183950: 6865 206b 6579 2066 696c 6520 286e 6f74 he key file (not\n-00183960: 2075 7365 6420 7769 7468 2047 4e55 544c used with GNUTL\n-00183970: 5329 202a 2f3c 2f73 7061 6e3e 203c 2f64 S) */ .
    "cace\n-001839c0: 7274 2e70 656d 2671 756f 743b 3c2f 7370 rt.pem", \n-001839f0: 2f2a 206f 7074 696f 6e61 6c20 6361 6365 /* optional cace\n-00183a00: 7274 2066 696c 6520 746f 2073 746f 7265 rt file to store\n-00183a10: 2074 7275 7374 6564 2063 6572 7469 6669 trusted certifi\n-00183a20: 6361 7465 7320 2a2f 3c2f 7370 616e 3e20 cates */ \n-00183a30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    NUL\n-00183a50: 4c2c 2020 2020 2020 2020 2020 2020 2020 L, \n-00183a60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* optiona\n-00183a80: 6c20 6361 7061 7468 2074 6f20 6469 7265 l capath to dire\n-00183a90: 6374 6f72 7920 7769 7468 2074 7275 7374 ctory with trust\n-00183aa0: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates \n-00183ab0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00183ac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    "dh512.p\n-00183b00: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em",\n-00183b10: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n-00183b30: 4448 2066 696c 6520 6e61 6d65 206f 7220 DH file name or \n-00183b40: 4448 206b 6579 206c 656e 2062 6974 7320 DH key len bits \n-00183b50: 286d 696e 696d 756d 2069 7320 3531 322c (minimum is 512,\n-00183b60: 2065 2e67 2e20 2671 756f 743b 3531 3226 e.g. "512&\n-00183b70: 7175 6f74 3b29 2074 6f20 6765 6e65 7261 quot;) to genera\n-00183b80: 7465 2044 4820 7061 7261 6d2c 2069 6620 te DH param, if \n-00183b90: 4e55 4c4c 2075 7365 2052 5341 202a 2f3c NULL use RSA */<\n-00183ba0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00183bc0: 2020 2020 4e55 4c4c 2c20 2020 2020 2020 NULL, \n-00183bd0: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n-00183bf0: 6966 2072 616e 6466 696c 6521 3d4e 554c if randfile!=NUL\n-00183c00: 4c3a 2075 7365 2061 2066 696c 6520 7769 L: use a file wi\n-00183c10: 7468 2072 616e 646f 6d20 6461 7461 2074 th random data t\n-00183c20: 6f20 7365 6564 2072 616e 646f 6d6e 6573 o seed randomnes\n-00183c30: 7320 2a2f 3c2f 7370 616e 3e20 203c 2f64 s */ .
    NULL \n-00183c60: 2020 2020 2020 2020 2020 2020 203c 7370 /* optional s\n-00183c90: 6572 7665 7220 6964 656e 7469 6669 6361 erver identifica\n-00183ca0: 7469 6f6e 2074 6f20 656e 6162 6c65 2053 tion to enable S\n-00183cb0: 534c 2073 6573 7369 6f6e 2063 6163 6869 SL session cachi\n-00183cc0: 6e67 2074 6f20 7370 6565 6420 7570 2054 ng to speed up T\n-00183cd0: 4c53 2028 6d75 7374 2062 6520 6120 756e LS (must be a un\n-00183ce0: 6971 7565 206e 616d 6529 202a 2f3c 2f73 ique name) */
    .
    )\n-00183d10: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    so\n-00183da0: 6170 5f70 7269 6e74 5f66 6175 6c74 3c2f ap_print_fault(soap, stderr); .
    exit(E\n-00183e10: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    } .
    m = soap_b\n-00183eb0: 696e 643c 2f61 3e28 3c61 2063 6c61 7373 ind(s\n-00183ee0: 6f61 703c 2f61 3e2c 204e 554c 4c2c 2031 oap, NULL, 1\n-00183ef0: 3830 3030 2c20 4241 434b 4c4f 4729 3b20 8000, BACKLOG); \n-00183f00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* use por\n-00183f20: 7420 3138 3030 3020 2a2f 3c2f 7370 616e t 18000 */
    .
    if \n-00183f70: 2821 3c61 2063 6c61 7373 3d22 636f 6465 (!soap_valid_s\n-00183fd0: 6f63 6b65 743c 2f61 3e28 6d29 2920 3c2f ocket(m)) .
    {
    \n-00184000: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-00184070: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-00184080: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00184090: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001840a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001840b0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-001840c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXIT_\n-001840e0: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
    \n-001840f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-00184120: 2020 6670 7269 6e74 6628 7374 6465 7272 fprintf(stderr\n-00184130: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00184150: 756f 743b 536f 636b 6574 2063 6f6e 6e65 uot;Socket conne\n-00184160: 6374 696f 6e20 7375 6363 6573 7366 756c ction successful\n-00184170: 3a20 6d61 7374 6572 2073 6f63 6b65 7420 : master socket \n-00184180: 3d20 2564 5c6e 2671 756f 743b 3c2f 7370 = %d\\n", m);
    .\n-001841a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    wh\n-001841d0: 696c 653c 2f73 7061 6e3e 2028 3129 3c2f ile (1).
    {
    \n-00184200: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    s = soap_\n-00184270: 6163 6365 7074 3c2f 613e 283c 6120 636c accept(soap); .
    fprint\n-001842d0: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Sock\n-00184300: 6574 2063 6f6e 6e65 6374 696f 6e20 7375 et connection su\n-00184310: 6363 6573 7366 756c 3a20 736c 6176 6520 ccessful: slave \n-00184320: 736f 636b 6574 203d 2025 645c 6e26 7175 socket = %d\\n&qu\n-00184330: 6f74 3b3c 2f73 7061 6e3e 2c20 7329 3b20 ot;, s); \n-00184340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if\n-00184380: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap_valid_\n-001843e0: 736f 636b 6574 3c2f 613e 2873 2929 203c socket(s)) <\n-001843f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    if \n-00184450: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00184480: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n-001844d0: 726e 756d 3c2f 613e 2920 3c73 7061 6e20 rnum) \n-001844f0: 2f2a 2061 6363 6570 7420 6661 696c 6564 /* accept failed\n-00184500: 2c20 7472 7920 6167 6169 6e20 6166 7465 , try again afte\n-00184510: 7220 3120 7365 636f 6e64 202a 2f3c 2f73 r 1 second */
    .
    \n-00184540: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n-00184560: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri\n-001845c0: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st\n-00184600: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
    .\n-00184620: 2020 2020 2020 2020 736c 6565 7028 3129 sleep(1)\n-00184630: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n-00184650: 2020 3c73 7061 6e20 636c 6173 733d 226b cont\n-00184670: 696e 7565 3c2f 7370 616e 3e3b 203c 7370 inue; /* retry */
    . \n-001846c0: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    . \n-001846e0: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde\n-001846f0: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, \n-00184710: 2671 756f 743b 5365 7276 6572 2074 696d "Server tim\n-00184720: 6564 206f 7574 5c6e 2671 756f 743b 3c2f ed out\\n");
    .\n-00184750: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-00184770: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c2f break; .
    } .. \n-00184870: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n-00184890: 2f73 7061 6e3e 2028 2174 736f 6170 2920 /span> (!tsoap) \n-001848a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001848c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001848d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001848e0: 705f 5f69 6f2e 6874 6d6c 2367 6130 6361 p__io.html#ga0ca\n-001848f0: 3063 3634 6463 3736 6166 3836 3137 3935 0c64dc76af861795\n-00184900: 3661 3632 6366 3131 3764 6239 3422 3e73 6a62cf117db94\">s\n-00184910: 6f61 705f 666f 7263 655f 636c 6f73 6573 oap_force_closes\n-00184920: 6f63 6b3c 2f61 3e28 3c61 2063 6c61 7373 ock(s\n-00184950: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n-00184960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00184990: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    while\n-001849e0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (THREAD_CR\n-00184a40: 4541 5445 3c2f 613e 2826 616d 703b 7469 EATE(&ti\n-00184a50: 642c 2028 3c73 7061 6e20 636c 6173 733d d, (vo\n-00184a70: 6964 3c2f 7370 616e 3e2a 282a 2928 3c73 id*(*)(void*))&proce\n-00184ab0: 7373 5f72 6571 7565 7374 2c20 283c 7370 ss_request, (void*)tsoap)).
    slee\n-00184b10: 7028 3129 3b20 3c73 7061 6e20 636c 6173 p(1); /* f\n-00184b30: 6169 6c65 642c 2074 7279 2061 6761 696e ailed, try again\n-00184b40: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    \n-00184b50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-00184b80: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_free\n-00184be0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-00184c10: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); /* \n-00184c30: 6465 616c 6c6f 6361 7465 7320 5353 4c20 deallocates SSL \n-00184c40: 636f 6e74 6578 7420 2a2f 3c2f 7370 616e context */
    .
    CRY\n-00184cc0: 5054 4f5f 7468 7265 6164 5f63 6c65 616e PTO_thread_clean\n-00184cd0: 7570 3c2f 613e 2829 3b20 3c73 7061 6e20 up(); \n-00184cf0: 2f2a 204f 7065 6e53 534c 2074 6872 6561 /* OpenSSL threa\n-00184d00: 6420 6d75 7465 7820 636c 6561 6e75 7020 d mutex cleanup \n-00184d10: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    .\n-00184d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-00184d50: 7475 726e 3c2f 7370 616e 3e20 303b 203c turn 0; <\n-00184d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } setsockopt\n+00182100: 2873 6f63 6b2c 202e 2e2e 2c20 2e2e 2e2c (sock, ..., ...,\n+00182110: 202e 2e2e 2c20 2e2e 2e29 3b3c 2f64 6976 ..., ...);.
    setsockopt\n+00182140: 2873 6f63 6b2c 202e 2e2e 2c20 2e2e 2e2c (sock, ..., ...,\n+00182150: 202e 2e2e 2c20 2e2e 2e29 3b3c 2f64 6976 ..., ...);.

    ....\n+00182180: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+00182190: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+001821a0: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+001821b0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.O\n+001821e0: 7665 7272 6964 696e 6720 7468 6520 686f verriding the ho\n+001821f0: 7374 2061 6e64 2070 6f72 7420 746f 2063 st and port to c\n+00182200: 6f6e 6e65 6374 3c2f 6832 3e0a 3c70 3e54 onnect.

    T\n+00182210: 6f20 6f76 6572 7269 6465 2074 6865 2068 o override the h\n+00182220: 6f73 7420 616e 6420 706f 7274 206f 6620 ost and port of \n+00182230: 7468 6520 636c 6965 6e74 2063 6f6e 6e65 the client conne\n+00182240: 6374 696e 6720 746f 2061 2073 6572 7665 cting to a serve\n+00182250: 722c 2073 6574 203c 636f 6465 3e3c 6120 r, set soap::overr\n+00182320: 6964 655f 686f 7374 3c2f 613e 3c2f 636f ide_host and soap::over\n+00182400: 7269 6465 5f70 6f72 743c 2f61 3e3c 2f63 ride_port:

    .
    \n+00182430: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->o\n+001824c0: 7665 7272 6964 655f 686f 7374 3c2f 613e verride_host\n+001824d0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+001824f0: 7175 6f74 3b65 7861 6d70 6c65 2e63 6f6d quot;example.com\n+00182500: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+00182510: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00182520: 656e 7422 3e2f 2f20 686f 7374 206e 616d ent\">// host nam\n+00182530: 6520 6f72 2049 5020 6164 6472 6573 7320 e or IP address \n+00182540: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00182560: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00182590: 2667 743b 3c61 2063 6c61 7373 3d22 636f >ove\n+001825e0: 7272 6964 655f 706f 7274 3c2f 613e 203d rride_port =\n+001825f0: 2038 303b 2020 2020 2020 2020 2020 2020 80; \n+00182600: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // port nu\n+00182620: 6d62 6572 2074 6f20 7573 6520 7768 656e mber to use when\n+00182630: 206f 7665 7272 6964 696e 6720 7468 6520 overriding the \n+00182640: 6164 6472 6573 733c 2f73 7061 6e3e 3c2f address.
    c\n+00182720: 6f6e 7374 2063 6861 7220 2a20 6f76 6572 onst char * over\n+00182730: 7269 6465 5f68 6f73 743c 2f64 6976 3e3c ride_host
    <\n+00182740: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00182750: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+00182760: 2073 7472 696e 6720 746f 206f 7665 7272 string to overr\n+00182770: 6964 6520 7468 6520 686f 7374 206e 616d ide the host nam\n+00182780: 6520 6f72 2049 5020 6164 6472 6573 7320 e or IP address \n+00182790: 696e 2074 6865 2048 5454 5020 6865 6164 in the HTTP head\n+001827a0: 6572 2077 6865 6e20 636f 6e6e 6563 7469 er when connecti\n+001827b0: 6e67 2061 7420 742e 2e2e 3c2f 6469 763e ng at t...
    \n+001827c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+001827e0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+001827f0: 3a34 3035 343c 2f64 6976 3e3c 2f64 6976 :4054
    .
    <\n+00182860: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+00182870: 6170 2e68 746d 6c23 6139 3134 6463 6236 ap.html#a914dcb6\n+00182880: 6562 3036 3766 3266 6433 6134 3766 3932 eb067f2fd3a47f92\n+00182890: 3037 3235 3762 3630 3622 3e73 6f61 703a 07257b606\">soap:\n+001828a0: 3a6f 7665 7272 6964 655f 706f 7274 3c2f :override_port
    int \n+001828d0: 6f76 6572 7269 6465 5f70 6f72 743c 2f64 override_port
    User-defin\n+00182900: 6162 6c65 2070 6f72 7420 6e75 6d62 6572 able port number\n+00182910: 2074 6f20 6f76 6572 7269 6465 2074 6865 to override the\n+00182920: 2070 6f72 7420 6164 6472 6573 7320 696e port address in\n+00182930: 2074 6865 2048 5454 5020 6865 6164 6572 the HTTP header\n+00182940: 2077 6865 6e20 636f 6e6e 6563 7469 6e67 when connecting\n+00182950: 2061 7420 7468 6520 636c 692e 2e2e 3c2f at the cli...
    Defini\n+00182980: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00182990: 7032 2e68 3a34 3035 393c 2f64 6976 3e3c p2.h:4059
    <\n+001829a0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+001829c0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+001829e0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    \n+00182a20: 0a53 6563 7572 6520 5765 6220 7365 7276 .Secure Web serv\n+00182a30: 6963 6573 2077 6974 6820 4854 5450 533c ices with HTTPS<\n+00182a40: 2f68 323e 0a3c 703e 546f 2065 6e61 626c /h2>.

    To enabl\n+00182a50: 6520 5353 4c20 666f 7220 7374 616e 642d e SSL for stand-\n+00182a60: 616c 6f6e 6520 6753 4f41 5020 5765 6220 alone gSOAP Web \n+00182a70: 7365 7276 6572 732c 2066 6972 7374 2069 servers, first i\n+00182a80: 6e73 7461 6c6c 204f 7065 6e53 534c 2061 nstall OpenSSL a\n+00182a90: 6e64 2075 7365 206f 7074 696f 6e20 7468 nd use option th\n+00182aa0: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f\n+00182ab0: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n+00182ac0: 4f50 454e 5353 4c3c 2f63 6f64 653e 2074 OPENSSL t\n+00182ad0: 6f20 636f 6d70 696c 6520 7468 6520 736f o compile the so\n+00182ae0: 7572 6365 7320 7769 7468 2079 6f75 7220 urces with your \n+00182af0: 4320 6f72 2043 2b2b 2063 6f6d 7069 6c65 C or C++ compile\n+00182b00: 7220 286f 7220 7573 6520 7468 6520 636f r (or use the co\n+00182b10: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n+00182b20: 3c63 6f64 653e 2357 4954 485f 474e 5554 #WITH_GNUT\n+00182b30: 4c53 3c2f 636f 6465 3e20 6966 2079 6f75 LS if you\n+00182b40: 2070 7265 6665 7220 474e 5554 4c53 292c prefer GNUTLS),\n+00182b50: 2066 6f72 2065 7861 6d70 6c65 3a20 3c2f for example:

     c++ -DW\n+00182b80: 4954 485f 4f50 454e 5353 4c20 2d6f 206d  ITH_OPENSSL -o m\n+00182b90: 7970 726f 6720 6d79 7072 6f67 2e63 7070  yprog myprog.cpp\n+00182ba0: 2073 7464 736f 6170 322e 6370 7020 736f   stdsoap2.cpp so\n+00182bb0: 6170 432e 6370 7020 736f 6170 5365 7276  apC.cpp soapServ\n+00182bc0: 6572 2e63 7070 202d 6c73 736c 202d 6c63  er.cpp -lssl -lc\n+00182bd0: 7279 7074 6f0a 3c2f 7072 653e 3c70 3e20  rypto.

    \n+00182be0: 5769 7468 2047 4e55 544c 533a 203c 2f70 With GNUTLS:

     c++ -DWI\n+00182c10: 5448 5f47 4e55 544c 5320 2d6f 206d 7970  TH_GNUTLS -o myp\n+00182c20: 726f 6720 6d79 7072 6f67 2e63 7070 2073  rog myprog.cpp s\n+00182c30: 7464 736f 6170 322e 6370 7020 736f 6170  tdsoap2.cpp soap\n+00182c40: 432e 6370 7020 736f 6170 5365 7276 6572  C.cpp soapServer\n+00182c50: 2e63 7070 202d 6c67 6e75 746c 7320 2d6c  .cpp -lgnutls -l\n+00182c60: 6763 7279 7074 202d 6c67 7067 2d65 7272  gcrypt -lgpg-err\n+00182c70: 6f72 0a3c 2f70 7265 3e3c 703e 2053 534c  or.

    SSL\n+00182c80: 2073 7570 706f 7274 2066 6f72 2073 7461 support for sta\n+00182c90: 6e64 2d61 6c6f 6e65 2067 534f 4150 2057 nd-alone gSOAP W\n+00182ca0: 6562 2073 6572 7669 6365 7320 6973 2065 eb services is e\n+00182cb0: 6e61 626c 6564 2062 7920 6361 6c6c 696e nabled by callin\n+00182cc0: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g soap_s\n+00182d40: 736c 5f61 6363 6570 743c 2f61 3e3c 2f63 sl_accept to perform \n+00182d60: 7468 6520 5353 4c2f 544c 5320 6861 6e64 the SSL/TLS hand\n+00182d70: 7368 616b 6520 6166 7465 7220 3c63 6f64 shake after soap_\n+00182e00: 6163 6365 7074 3c2f 613e 3c2f 636f 6465 accept. In addition, \n+00182e20: 6120 6b65 7920 6669 6c65 2c20 6120 4341 a key file, a CA\n+00182e30: 2066 696c 6520 286f 7220 7061 7468 2074 file (or path t\n+00182e40: 6f20 6365 7274 6966 6963 6174 6573 292c o certificates),\n+00182e50: 2044 4820 6669 6c65 2028 6966 2052 5341 DH file (if RSA\n+00182e60: 2069 7320 6e6f 7420 7573 6564 292c 2061 is not used), a\n+00182e70: 6e64 2070 6173 7377 6f72 6420 6e65 6564 nd password need\n+00182e80: 2074 6f20 6265 2073 7570 706c 6965 642e to be supplied.\n+00182e90: 2049 6e73 7472 7563 7469 6f6e 7320 6f6e Instructions on\n+00182ea0: 2068 6f77 2074 6f20 646f 2074 6869 7320 how to do this \n+00182eb0: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can be found in \n+00182ec0: 7468 6520 4f70 656e 5353 4c20 646f 6375 the OpenSSL docu\n+00182ed0: 6d65 6e74 6174 696f 6e20 3c61 2068 7265 mentation http:\n+00182f00: 2f2f 7777 772e 6f70 656e 7373 6c2e 6f72 //www.openssl.or\n+00182f10: 673c 2f61 3e2e 2053 6565 2061 6c73 6f20 g. See also \n+00182f20: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section SSL \n+00182f50: 6365 7274 6966 6963 6174 6573 2061 6e64 certificates and\n+00182f60: 206b 6579 2066 696c 6573 3c2f 613e 202e key files .\n+00182f70: 3c2f 703e 0a3c 703e 4c65 7427 7320 7461

    .

    Let's ta\n+00182f80: 6b65 2061 206c 6f6f 6b20 6174 2061 6e20 ke a look at an \n+00182f90: 6578 616d 706c 6520 5353 4c20 7365 6375 example SSL secu\n+00182fa0: 7265 206d 756c 7469 2d74 6872 6561 6465 re multi-threade\n+00182fb0: 6420 7374 616e 642d 616c 6f6e 6520 534f d stand-alone SO\n+00182fc0: 4150 2057 6562 2053 6572 7669 6365 3a3c AP Web Service:<\n+00182fd0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n+00183020: 206d 6169 6e28 2920 3c2f 6469 763e 0a3c main()
    .<\n+00183030: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00183040: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    S\n+001830b0: 4f41 505f 534f 434b 4554 3c2f 613e 206d OAP_SOCKET m\n+001830c0: 2c20 733b 203c 2f64 6976 3e0a 3c64 6976 , s;
    . \n+001830e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_TYPE\n+00183140: 3c2f 613e 2074 6964 3b20 3c2f 6469 763e tid;

    \n+00183150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n+00183180: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n+001831b0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, *ts\n+00183210: 6f61 703b 203c 2f64 6976 3e0a 3c64 6976 oap;
    . \n+00183230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_ssl_init(); /* i\n+001832b0: 6e69 7420 4f70 656e 5353 4c20 2873 6b69 nit OpenSSL (ski\n+001832c0: 7070 696e 6720 7468 6973 206f 7220 6361 pping this or ca\n+001832d0: 6c6c 696e 6720 6d75 6c74 6970 6c65 2074 lling multiple t\n+001832e0: 696d 6573 2069 7320 4f4b 2c20 7369 6e63 imes is OK, sinc\n+001832f0: 6520 7468 6520 656e 6769 6e65 2077 696c e the engine wil\n+00183300: 6c20 696e 6974 2053 534c 2061 7574 6f6d l init SSL autom\n+00183310: 6174 6963 616c 6c79 2920 2a2f 3c2f 7370 atically) */
    .
    /* soap_ssl_\n+00183360: 6e6f 696e 6974 2829 3b20 2a2f 3c2f 7370 noinit(); */ /* do \n+00183390: 6e6f 7420 696e 6974 204f 7065 6e53 534c not init OpenSSL\n+001833a0: 2028 6966 2053 534c 2069 7320 616c 7265 (if SSL is alre\n+001833b0: 6164 7920 696e 6974 6961 6c69 7a65 6420 ady initialized \n+001833c0: 656c 7365 7768 6572 6520 696e 2074 6869 elsewhere in thi\n+001833d0: 7320 6170 706c 6963 6174 696f 6e29 202a s application) *\n+001833e0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n+001833f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00183400: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00183420: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (
    CRYPTO_\n+00183480: 7468 7265 6164 5f73 6574 7570 3c2f 613e thread_setup\n+00183490: 2829 2920 3c73 7061 6e20 636c 6173 733d ()) /* Ope\n+001834b0: 6e53 534c 2074 6872 6561 6420 6d75 7465 nSSL thread mute\n+001834c0: 7820 7365 7475 7020 2a2f 3c2f 7370 616e x setup */
    .
    {.
    fprint\n+00183510: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Cann\n+00183540: 6f74 2073 6574 7570 2074 6872 6561 6420 ot setup thread \n+00183550: 6d75 7465 785c 6e26 7175 6f74 3b3c 2f73 mutex\\n");
    .\n+00183580: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n+00183590: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .<\n+001835a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001835b0: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n+001835d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00183600: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+00183660: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n+00183680: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_ssl\n+00183700: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context<\n+00183710: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00183740: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
    . \n+00183760: 2020 3c61 2063 6c61 7373 3d22 636f 6465 SOAP_SSL_DEFA\n+001837c0: 554c 543c 2f61 3e2c 203c 2f64 6976 3e0a ULT,
    .\n+001837d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    "server.p\n+00183810: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em",\n+00183820: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* k\n+00183840: 6579 6669 6c65 3a20 7265 7175 6972 6564 eyfile: required\n+00183850: 2077 6865 6e20 7365 7276 6572 206d 7573 when server mus\n+00183860: 7420 6175 7468 656e 7469 6361 7465 2074 t authenticate t\n+00183870: 6f20 636c 6965 6e74 7320 2873 6565 2053 o clients (see S\n+00183880: 534c 2064 6f63 7320 6f6e 2068 6f77 2074 SL docs on how t\n+00183890: 6f20 6f62 7461 696e 2074 6869 7320 6669 o obtain this fi\n+001838a0: 6c65 2920 2a2f 3c2f 7370 616e 3e20 3c2f le) */ .
    "pas\n+001838f0: 7377 6f72 6426 7175 6f74 3b3c 2f73 7061 sword", /* password to \n+00183930: 7265 6164 2074 6865 206b 6579 2066 696c read the key fil\n+00183940: 6520 286e 6f74 2075 7365 6420 7769 7468 e (not used with\n+00183950: 2047 4e55 544c 5329 202a 2f3c 2f73 7061 GNUTLS) */
    .
    \n+00183980: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001839a0: 743b 6361 6365 7274 2e70 656d 2671 756f t;cacert.pem&quo\n+001839b0: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n+001839c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* optiona\n+001839e0: 6c20 6361 6365 7274 2066 696c 6520 746f l cacert file to\n+001839f0: 2073 746f 7265 2074 7275 7374 6564 2063 store trusted c\n+00183a00: 6572 7469 6669 6361 7465 7320 2a2f 3c2f ertificates */
    . \n+00183a30: 2020 204e 554c 4c2c 2020 2020 2020 2020 NULL, \n+00183a40: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* o\n+00183a60: 7074 696f 6e61 6c20 6361 7061 7468 2074 ptional capath t\n+00183a70: 6f20 6469 7265 6374 6f72 7920 7769 7468 o directory with\n+00183a80: 2074 7275 7374 6564 2063 6572 7469 6669 trusted certifi\n+00183a90: 6361 7465 7320 2a2f 3c2f 7370 616e 3e20 cates */ \n+00183aa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "d\n+00183ae0: 6835 3132 2e70 656d 2671 756f 743b 3c2f h512.pem", /* DH file na\n+00183b20: 6d65 206f 7220 4448 206b 6579 206c 656e me or DH key len\n+00183b30: 2062 6974 7320 286d 696e 696d 756d 2069 bits (minimum i\n+00183b40: 7320 3531 322c 2065 2e67 2e20 2671 756f s 512, e.g. &quo\n+00183b50: 743b 3531 3226 7175 6f74 3b29 2074 6f20 t;512") to \n+00183b60: 6765 6e65 7261 7465 2044 4820 7061 7261 generate DH para\n+00183b70: 6d2c 2069 6620 4e55 4c4c 2075 7365 2052 m, if NULL use R\n+00183b80: 5341 202a 2f3c 2f73 7061 6e3e 203c 2f64 SA */ .
    NULL, \n+00183bb0: 2020 2020 2020 2020 2020 2020 203c 7370 /* if randfil\n+00183be0: 6521 3d4e 554c 4c3a 2075 7365 2061 2066 e!=NULL: use a f\n+00183bf0: 696c 6520 7769 7468 2072 616e 646f 6d20 ile with random \n+00183c00: 6461 7461 2074 6f20 7365 6564 2072 616e data to seed ran\n+00183c10: 646f 6d6e 6573 7320 2a2f 3c2f 7370 616e domness */
    .
    \n+00183c40: 4e55 4c4c 2020 2020 2020 2020 2020 2020 NULL \n+00183c50: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* opti\n+00183c70: 6f6e 616c 2073 6572 7665 7220 6964 656e onal server iden\n+00183c80: 7469 6669 6361 7469 6f6e 2074 6f20 656e tification to en\n+00183c90: 6162 6c65 2053 534c 2073 6573 7369 6f6e able SSL session\n+00183ca0: 2063 6163 6869 6e67 2074 6f20 7370 6565 caching to spee\n+00183cb0: 6420 7570 2054 4c53 2028 6d75 7374 2062 d up TLS (must b\n+00183cc0: 6520 6120 756e 6971 7565 206e 616d 6529 e a unique name)\n+00183cd0: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    \n+00183ce0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ))
    .<\n+00183d00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00183d10: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n+00183d30: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+00183d90: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+00183dc0: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n+00183dd0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+00183df0: 6578 6974 2845 5849 545f 4641 494c 5552 exit(EXIT_FAILUR\n+00183e00: 4529 3b20 3c2f 6469 763e 0a3c 6469 7620 E);
    .
    }\n+00183e20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    m = \n+00183e40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+00183e90: 736f 6170 5f62 696e 643c 2f61 3e28 3c61 soap_bind(soap, N\n+00183ed0: 554c 4c2c 2031 3830 3030 2c20 4241 434b ULL, 18000, BACK\n+00183ee0: 4c4f 4729 3b20 3c73 7061 6e20 636c 6173 LOG); /* u\n+00183f00: 7365 2070 6f72 7420 3138 3030 3020 2a2f se port 18000 */\n+00183f10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00183f30: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!soap_v\n+00183fb0: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket(\n+00183fc0: 6d29 2920 3c2f 6469 763e 0a3c 6469 7620 m))
    .
    {\n+00183fe0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00184050: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault\n+00184060: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+00184090: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n+001840a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    exit\n+001840c0: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); \n+001840d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    fprintf(\n+00184110: 7374 6465 7272 2c20 3c73 7061 6e20 636c stderr, "Socket\n+00184140: 2063 6f6e 6e65 6374 696f 6e20 7375 6363 connection succ\n+00184150: 6573 7366 756c 3a20 6d61 7374 6572 2073 essful: master s\n+00184160: 6f63 6b65 7420 3d20 2564 5c6e 2671 756f ocket = %d\\n&quo\n+00184170: 743b 3c2f 7370 616e 3e2c 206d 293b 203c t;, m); <\n+00184180: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    while\n+001841c0: 2028 3129 3c2f 6469 763e 0a3c 6469 7620 (1)
    .
    {\n+001841e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s =\n+00184200: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_accept\n+00184260: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00184290: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+001842b0: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n+001842c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001842e0: 743b 536f 636b 6574 2063 6f6e 6e65 6374 t;Socket connect\n+001842f0: 696f 6e20 7375 6363 6573 7366 756c 3a20 ion successful: \n+00184300: 736c 6176 6520 736f 636b 6574 203d 2025 slave socket = %\n+00184310: 645c 6e26 7175 6f74 3b3c 2f73 7061 6e3e d\\n"\n+00184320: 2c20 7329 3b20 3c2f 6469 763e 0a3c 6469 , s);
    . \n+00184340: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n+00184360: 2f73 7061 6e3e 2028 213c 6120 636c 6173 /span> (!soap_\n+001843c0: 7661 6c69 645f 736f 636b 6574 3c2f 613e valid_socket\n+001843d0: 2873 2929 203c 2f64 6976 3e0a 3c64 6976 (s))
    . \n+001843f0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00184410: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so\n+00184460: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->errnum) \n+001844c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* accept \n+001844e0: 6661 696c 6564 2c20 7472 7920 6167 6169 failed, try agai\n+001844f0: 6e20 6166 7465 7220 3120 7365 636f 6e64 n after 1 second\n+00184500: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    \n+00184510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    \n+00184530: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n+001845a0: 6170 5f70 7269 6e74 5f66 6175 6c74 3c2f ap_print_fault(soap, stderr); .
    sl\n+00184610: 6565 7028 3129 3b3c 2f64 6976 3e0a 3c64 eep(1);
    .\n+00184630: 2020 2020 2020 2020 3c73 7061 6e20 636c continue; /* retr\n+00184680: 7920 2a2f 3c2f 7370 616e 3e3c 2f64 6976 y */.
    }.
    fprint\n+001846d0: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Serv\n+00184700: 6572 2074 696d 6564 206f 7574 5c6e 2671 er timed out\\n&q\n+00184710: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    break;
    .
    \n+00184780: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n+001847a0: 7473 6f61 7020 3d20 3c61 2063 6c61 7373 tsoap = soa\n+00184800: 705f 636f 7079 3c2f 613e 283c 6120 636c p_copy(soap);.
    if (!t\n+00184880: 736f 6170 2920 3c2f 6469 763e 0a3c 6469 soap)
    . \n+001848a0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_force_\n+00184900: 636c 6f73 6573 6f63 6b3c 2f61 3e28 3c61 closesock(soap);<\n+00184940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else
    .
    \n+001849a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 while<\n+001849c0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (THR\n+00184a20: 4541 445f 4352 4541 5445 3c2f 613e 2826 EAD_CREATE(&\n+00184a30: 616d 703b 7469 642c 2028 3c73 7061 6e20 amp;tid, (void*\n+00184a60: 282a 2928 3c73 7061 6e20 636c 6173 733d (*)(vo\n+00184a80: 6964 3c2f 7370 616e 3e2a 2929 2661 6d70 id*))&\n+00184a90: 3b70 726f 6365 7373 5f72 6571 7565 7374 ;process_request\n+00184aa0: 2c20 283c 7370 616e 2063 6c61 7373 3d22 , (voi\n+00184ac0: 643c 2f73 7061 6e3e 2a29 7473 6f61 7029 d*)tsoap)\n+00184ad0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    \n+00184af0: 2020 736c 6565 7028 3129 3b20 3c73 7061 sleep(1); /* failed, try\n+00184b20: 2061 6761 696e 202a 2f3c 2f73 7061 6e3e again */\n+00184b30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    soa\n+00184bc0: 705f 6672 6565 3c2f 613e 283c 6120 636c p_free(soap); /* deallocate\n+00184c20: 7320 5353 4c20 636f 6e74 6578 7420 2a2f s SSL context */\n+00184c30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00184c50: 2020 3c61 2063 6c61 7373 3d22 636f 6465 CRYPTO_thread\n+00184cb0: 5f63 6c65 616e 7570 3c2f 613e 2829 3b20 _cleanup(); \n+00184cc0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* OpenSSL\n+00184ce0: 2074 6872 6561 6420 6d75 7465 7820 636c thread mutex cl\n+00184cf0: 6561 6e75 7020 2a2f 3c2f 7370 616e 3e3c eanup */<\n+00184d00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return 0;
    .} \n+00184d60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .void *process_req\n-00184de0: 7565 7374 283c 7370 616e 2063 6c61 7373 uest(v\n-00184e00: 6f69 643c 2f73 7061 6e3e 202a 7473 6f61 oid *tsoa\n-00184e10: 7029 203c 2f64 6976 3e0a 3c64 6976 2063 p)
    .
    {.
    st\n-00184e60: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = (\n-00184ed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00184f20: 2f61 3e2a 2974 736f 6170 3b3c 2f64 6976 /a>*)tsoap;.
    THREA\n-00184fa0: 445f 4445 5441 4348 3c2f 613e 283c 6120 D_DETACH(THREAD_ID)\n-00185010: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..\n-001850f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr\n-00185160: 696e 745f 6661 756c 743c 2f61 3e28 3c61 int_fault(soap, s\n-001851a0: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .<\n-001851b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001851c0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els\n-001851e0: 653c 2f73 7061 6e3e 203c 2f64 6976 3e0a e
    .\n-001851f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-001852b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n-00185310: 726f 793c 2f61 3e28 3c61 2063 6c61 7373 roy(s\n-00185340: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n-00185350: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n-00185400: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n-001854b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001854c0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-001854e0: 7572 6e3c 2f73 7061 6e3e 204e 554c 4c3b urn NULL;\n-001854f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }.
    \n-001855f0: 696e 7420 736f 6170 5f73 736c 5f73 6572 int soap_ssl_ser\n-00185600: 7665 725f 636f 6e74 6578 7428 7374 7275 ver_context(stru\n-00185610: 6374 2073 6f61 7020 2a73 6f61 702c 2073 ct soap *soap, s\n-00185620: 6f61 705f 7373 6c5f 666c 6167 7320 666c oap_ssl_flags fl\n-00185630: 6167 732c 2063 6f6e 7374 2063 6861 7220 ags, const char \n-00185640: 2a6b 6579 6669 6c65 2c20 636f 6e73 7420 *keyfile, const \n-00185650: 6368 6172 202a 7061 7373 776f 7264 2c20 char *password, \n-00185660: 636f 6e73 7420 6368 6172 202a 6361 6669 const char *cafi\n-00185670: 6c65 2c20 636f 6e73 7420 6368 6172 202a le, const char *\n-00185680: 6361 7061 7468 2c20 636f 6e73 7420 6368 capath, const ch\n-00185690: 6172 202a 6468 6669 6c65 2c20 636f 6e73 ar *dhfile, cons\n-001856a0: 7420 6368 6172 202a 7261 6e64 6669 6c65 t char *randfile\n-001856b0: 2c20 636f 6e73 7420 6368 6172 202a 7369 , const char *si\n-001856c0: 6429 3c2f 6469 763e 3c64 6976 2063 6c61 d)
    Initi\n-001856e0: 616c 697a 6520 7468 6520 7365 7276 6572 alize the server\n-001856f0: 2d73 6964 6520 5353 4c2f 544c 5320 636f -side SSL/TLS co\n-00185700: 6e74 6578 742e 3c2f 6469 763e 3c2f 6469 ntext.
    .
    soap\n-001857c0: 5f73 736c 5f69 6e69 743c 2f61 3e3c 2f64 _ssl_init
    void soap\n-001857f0: 5f73 736c 5f69 6e69 7428 766f 6964 293c _ssl_init(void)<\n-00185800: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Initiali\n-00185820: 7a65 2074 6865 2053 534c 2f54 4c53 206c ze the SSL/TLS l\n-00185830: 6962 7261 7279 2e3c 2f64 6976 3e3c 2f64 ibrary.
    .
    .
    <\n-00185ac0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00185ad0: 6922 3e69 6e74 2043 5259 5054 4f5f 7468 i\">int CRYPTO_th\n-00185ae0: 7265 6164 5f63 6c65 616e 7570 2829 3c2f read_cleanup()
    Cleanup f\n-00185b10: 756e 6374 696f 6e20 666f 7220 4f70 656e unction for Open\n-00185b20: 5353 4c20 7665 7273 696f 6e73 2070 7269 SSL versions pri\n-00185b30: 6f72 2074 6f20 312e 312e 312e 3c2f 6469 or to 1.1.1.
    .
    soap_ssl_accep\n-00185c00: 743c 2f61 3e3c 2f64 6976 3e3c 6469 7620 t
    i\n-00185c20: 6e74 2073 6f61 705f 7373 6c5f 6163 6365 nt soap_ssl_acce\n-00185c30: 7074 2873 7472 7563 7420 736f 6170 202a pt(struct soap *\n-00185c40: 736f 6170 293c 2f64 6976 3e3c 6469 7620 soap)
    Ac\n-00185c60: 6365 7074 2053 534c 2f54 4c53 2063 6f6e cept SSL/TLS con\n-00185c70: 6e65 6374 696f 6e2e 3c2f 6469 763e 3c2f nection.
    .
    i\n-00185d60: 6e74 2043 5259 5054 4f5f 7468 7265 6164 nt CRYPTO_thread\n-00185d70: 5f73 6574 7570 2829 3c2f 6469 763e 3c64 _setup()
    Setup function \n-00185da0: 666f 7220 4f70 656e 5353 4c20 7665 7273 for OpenSSL vers\n-00185db0: 696f 6e73 2070 7269 6f72 2074 6f20 312e ions prior to 1.\n-00185dc0: 312e 3120 746f 2073 6574 206c 6f63 6b73 1.1 to set locks\n-00185dd0: 2066 6f72 206d 756c 7469 2d74 6872 6561 for multi-threa\n-00185de0: 6465 6420 5353 4c2f 544c 5320 6170 706c ded SSL/TLS appl\n-00185df0: 6963 6174 696f 2e2e 2e3c 2f64 6976 3e3c icatio...
    <\n-00185e00: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-00185e20: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soa\n-00185eb0: 705f 7373 6c5f 7365 7276 6572 5f63 6f6e p_ssl_server_con\n-00185ec0: 7465 7874 3c2f 613e 3c2f 636f 6465 3e20 text \n-00185ed0: 6675 6e63 7469 6f6e 2069 6e69 7469 616c function initial\n-00185ee0: 697a 6573 2074 6865 2073 6572 7665 722d izes the server-\n-00185ef0: 7369 6465 2053 534c 2063 6f6e 7465 7874 side SSL context\n-00185f00: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The \n-00185f10: 7365 7276 6572 2e70 656d 3c2f 636f 6465 server.pem key file \n-00185f30: 6973 2074 6865 2073 6572 7665 7227 7320 is the server's \n-00185f40: 7072 6976 6174 6520 6b65 7920 636f 6e63 private key conc\n-00185f50: 6174 656e 6174 6564 2077 6974 6820 6974 atenated with it\n-00185f60: 7320 6365 7274 6966 6963 6174 652e 2054 s certificate. T\n-00185f70: 6865 203c 656d 3e3c 636f 6465 3e63 6163 he cac\n-00185f80: 6572 742e 7065 6d3c 2f63 6f64 653e 3c2f ert.pem is used to a\n-00185fa0: 7574 6865 6e74 6963 6174 6520 636c 6965 uthenticate clie\n-00185fb0: 6e74 7320 616e 6420 636f 6e74 6169 6e73 nts and contains\n-00185fc0: 2074 6865 2063 6c69 656e 7420 6365 7274 the client cert\n-00185fd0: 6966 6963 6174 6573 2e20 416c 7465 726e ificates. Altern\n-00185fe0: 6174 6976 656c 7920 6120 6469 7265 6374 atively a direct\n-00185ff0: 6f72 7920 6e61 6d65 2063 616e 2062 6520 ory name can be \n-00186000: 7370 6563 6966 6965 642e 2054 6869 7320 specified. This \n-00186010: 6469 7265 6374 6f72 7920 6973 2061 7373 directory is ass\n-00186020: 756d 6564 2074 6f20 636f 6e74 6169 6e20 umed to contain \n-00186030: 7468 6520 6365 7274 6966 6963 6174 6573 the certificates\n-00186040: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The \n-00186050: 6468 3531 322e 7065 6d3c 2f63 6f64 653e dh512.pem\n-00186060: 3c2f 656d 3e20 6669 6c65 2073 7065 6369 file speci\n-00186070: 6669 6573 2074 6861 7420 4448 2077 696c fies that DH wil\n-00186080: 6c20 6265 2075 7365 6420 666f 7220 6b65 l be used for ke\n-00186090: 7920 6167 7265 656d 656e 7420 696e 7374 y agreement inst\n-001860a0: 6561 6420 6f66 2052 5341 2e20 4120 6e75 ead of RSA. A nu\n-001860b0: 6d65 7269 6320 7661 6c75 6520 6772 6561 meric value grea\n-001860c0: 7465 7220 7468 616e 2035 3132 2063 616e ter than 512 can\n-001860d0: 2062 6520 7072 6f76 6964 6564 2069 6e73 be provided ins\n-001860e0: 7465 6164 2061 7320 6120 7374 7269 6e67 tead as a string\n-001860f0: 2063 6f6e 7374 616e 7420 2865 2e67 2e20 constant (e.g. \n-00186100: 3c63 6f64 653e 2235 3132 223c 2f63 6f64 \"512\") to allow the\n-00186120: 2065 6e67 696e 6520 746f 2067 656e 6572 engine to gener\n-00186130: 6174 6520 7468 6520 4448 2070 6172 616d ate the DH param\n-00186140: 6574 6572 7320 6f6e 2074 6865 2066 6c79 eters on the fly\n-00186150: 2028 7468 6973 2063 616e 2074 616b 6520 (this can take \n-00186160: 6120 7768 696c 6529 2072 6174 6865 7220 a while) rather \n-00186170: 7468 616e 2072 6574 7269 6576 696e 6720 than retrieving \n-00186180: 7468 656d 2066 726f 6d20 6120 6669 6c65 them from a file\n-00186190: 2e20 5468 6520 7261 6e64 6669 6c65 2065 . The randfile e\n-001861a0: 6e74 7279 2063 616e 2062 6520 7573 6564 ntry can be used\n-001861b0: 2074 6f20 7365 6564 2074 6865 2050 524e to seed the PRN\n-001861c0: 472e 2054 6865 206c 6173 7420 656e 7472 G. The last entr\n-001861d0: 7920 656e 6162 6c65 2073 6572 7665 722d y enable server-\n-001861e0: 7369 6465 2073 6573 7369 6f6e 2063 6163 side session cac\n-001861f0: 6869 6e67 2074 6f20 7370 6565 6420 7570 hing to speed up\n-00186200: 2054 4c53 2e20 4120 756e 6971 7565 2073 TLS. A unique s\n-00186210: 6572 7665 7220 6e61 6d65 2069 7320 7265 erver name is re\n-00186220: 7175 6972 6564 2e3c 2f70 3e0a 3c70 3e59 quired.

    .

    Y\n-00186230: 6f75 2063 616e 2073 7065 6369 6679 2061 ou can specify a\n-00186240: 2063 6970 6865 7220 6c69 7374 2074 6f20 cipher list to \n-00186250: 7573 6520 7769 7468 2054 4c53 7631 2e32 use with TLSv1.2\n-00186260: 2061 6e64 2062 656c 6f77 2077 6974 6820 and below with \n-00186270: 3c63 6f64 653e 5353 4c5f 4354 585f 7365 SSL_CTX_se\n-00186280: 745f 6369 7068 6572 5f6c 6973 7428 736f t_cipher_list(so\n-00186290: 6170 2d26 6774 3b63 7478 2c20 222e 2e2e ap->ctx, \"...\n-001862a0: 2229 3c2f 636f 6465 3e20 7768 6572 6520 \") where \n-001862b0: 3c63 6f64 653e 736f 6170 2d26 6774 3b63 soap->c\n-001862c0: 7478 3c2f 636f 6465 3e20 6973 2074 6865 tx is the\n-001862d0: 2053 534c 2063 6f6e 7465 7874 2063 7265 SSL context cre\n-001862e0: 6174 6564 2062 7920 3c63 6f64 653e 3c61 ated by soap_ssl_server\n-00186380: 5f63 6f6e 7465 7874 2829 3c2f 613e 3c2f _context(). Likewise,\n-001863a0: 2075 7365 203c 636f 6465 3e53 534c 5f43 use SSL_C\n-001863b0: 5458 5f73 6574 5f63 6970 6865 7273 7569 TX_set_ciphersui\n-001863c0: 7465 7328 736f 6170 2d26 6774 3b63 7478 tes(soap->ctx\n-001863d0: 2c20 222e 2e2e 2229 3c2f 636f 6465 3e20 , \"...\") \n-001863e0: 746f 2063 6f6e 6669 6775 7265 2074 6865 to configure the\n-001863f0: 2061 7661 696c 6162 6c65 2054 4c53 7631 available TLSv1\n-00186400: 2e33 2063 6970 6865 7273 7569 7465 732e .3 ciphersuites.\n-00186410: 3c2f 703e 0a3c 703e 5765 2072 6566 6572

    .

    We refer\n-00186420: 2074 6f20 7468 6520 4f70 656e 5353 4c20 to the OpenSSL \n-00186430: 646f 6375 6d65 6e74 6174 696f 6e20 616e documentation an\n-00186440: 6420 6d61 6e75 616c 2070 6167 6573 206f d manual pages o\n-00186450: 6620 3c63 6f64 653e 5353 4c5f 4354 585f f SSL_CTX_\n-00186460: 7365 745f 6369 7068 6572 5f6c 6973 743c set_cipher_list<\n-00186470: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and SSL_CTX_set_cip\n-00186490: 6865 7273 7569 7465 733c 2f63 6f64 653e hersuites\n-001864a0: 2066 6f72 2064 6574 6169 6c73 206f 6e20 for details on \n-001864b0: 7468 6520 6c61 7465 7374 2063 6970 6865 the latest ciphe\n-001864c0: 7220 6c69 7374 7320 616e 6420 7375 6974 r lists and suit\n-001864d0: 6573 2061 7661 696c 6162 6c65 2074 6f20 es available to \n-001864e0: 7573 652e 3c2f 703e 0a3c 703e 5468 6520 use.

    .

    The \n-001864f0: 474e 5554 4c53 206d 7574 6578 206c 6f63 GNUTLS mutex loc\n-00186500: 6b20 7365 7475 7020 6973 2061 7574 6f6d k setup is autom\n-00186510: 6174 6963 616c 6c79 2070 6572 666f 726d atically perform\n-00186520: 6564 2069 6e20 7468 6520 656e 6769 6e65 ed in the engine\n-00186530: 2c20 6275 7420 6f6e 6c79 2077 6865 6e20 , but only when \n-00186540: 504f 5349 5820 7468 7265 6164 7320 6172 POSIX threads ar\n-00186550: 6520 6465 7465 6374 6564 2061 6e64 2061 e detected and a\n-00186560: 7661 696c 6162 6c65 2e3c 2f70 3e0a 3c70 vailable.

    .All OpenSSL ver\n-00186580: 7369 6f6e 7320 7072 696f 7220 746f 2031 sions prior to 1\n-00186590: 2e31 2e30 2072 6571 7569 7265 206d 7574 .1.0 require mut\n-001865a0: 6578 206c 6f63 6b73 2074 6f20 6265 2065 ex locks to be e\n-001865b0: 7870 6c69 6369 746c 7920 7365 7420 7570 xplicitly set up\n-001865c0: 2069 6e20 796f 7572 2063 6f64 6520 666f in your code fo\n-001865d0: 7220 6d75 6c74 692d 7468 7265 6164 6564 r multi-threaded\n-001865e0: 2061 7070 6c69 6361 7469 6f6e 7320 6279 applications by\n-001865f0: 2063 616c 6c69 6e67 203c 636f 6465 3e3c calling <\n-00186600: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00186610: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00186620: 5f73 736c 2e68 746d 6c23 6761 6564 6335 _ssl.html#gaedc5\n-00186630: 3164 6432 6162 3935 6364 6666 3435 3035 1dd2ab95cdff4505\n-00186640: 3736 3339 6661 6337 3061 3866 2220 7469 7639fac70a8f\" ti\n-00186650: 746c 653d 2253 6574 7570 2066 756e 6374 tle=\"Setup funct\n-00186660: 696f 6e20 666f 7220 4f70 656e 5353 4c20 ion for OpenSSL \n-00186670: 7665 7273 696f 6e73 2070 7269 6f72 2074 versions prior t\n-00186680: 6f20 312e 312e 3120 746f 2073 6574 206c o 1.1.1 to set l\n-00186690: 6f63 6b73 2066 6f72 206d 756c 7469 2d74 ocks for multi-t\n-001866a0: 6872 6561 6465 6420 5353 4c2f 544c 5320 hreaded SSL/TLS \n-001866b0: 6170 706c 6963 6174 696f 2e2e 2e22 3e43 applicatio...\">C\n-001866c0: 5259 5054 4f5f 7468 7265 6164 5f73 6574 RYPTO_thread_set\n-001866d0: 7570 2829 3c2f 613e 3c2f 636f 6465 3e20 up() \n-001866e0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and CRYPTO_th\n-00186780: 7265 6164 5f63 6c65 616e 7570 2829 3c2f read_cleanup() as was\n-001867a0: 2073 686f 776e 2069 6e20 7468 6520 636f shown in the co\n-001867b0: 6465 2061 626f 7665 2e20 4f70 656e 5353 de above. OpenSS\n-001867c0: 4c20 312e 312e 3020 616e 6420 6772 6561 L 1.1.0 and grea\n-001867d0: 7465 7220 646f 6573 206e 6f74 2072 6571 ter does not req\n-001867e0: 7569 7265 2074 6865 7365 206c 6f63 6b73 uire these locks\n-001867f0: 2074 6f20 6265 2073 6574 2075 702e 2049 to be set up. I\n-00186800: 6620 796f 7520 6172 6520 6e6f 7420 7375 f you are not su\n-00186810: 7265 2077 6869 6368 2076 6572 7369 6f6e re which version\n-00186820: 206f 6620 4f70 656e 5353 4c20 796f 7520 of OpenSSL you \n-00186830: 6d61 7920 6265 2075 7369 6e67 2077 6974 may be using wit\n-00186840: 6820 796f 7572 206d 756c 7469 2d74 6872 h your multi-thr\n-00186850: 6561 6465 6420 6170 706c 6963 6174 696f eaded applicatio\n-00186860: 6e2c 2074 6865 6e20 7365 7420 7570 2074 n, then set up t\n-00186870: 6865 206c 6f63 6b73 2e3c 2f70 3e0a 3c70 he locks.

    .For Unix and Li\n-00186890: 6e75 782c 206d 616b 6520 7375 7265 2079 nux, make sure y\n-001868a0: 6f75 2068 6176 6520 7369 676e 616c 2068 ou have signal h\n-001868b0: 616e 646c 6572 7320 7365 7420 696e 2079 andlers set in y\n-001868c0: 6f75 7220 7365 7276 6963 6520 616e 642f our service and/\n-001868d0: 6f72 2063 6c69 656e 7420 6170 706c 6963 or client applic\n-001868e0: 6174 696f 6e73 2074 6f20 6361 7463 6820 ations to catch \n-001868f0: 6272 6f6b 656e 2063 6f6e 6e65 6374 696f broken connectio\n-00186900: 6e73 2028 3c63 6f64 653e 5349 4750 4950 ns (SIGPIP\n-00186910: 453c 2f63 6f64 653e 293a 3c2f 703e 0a3c E):

    .<\n-00186920: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00186930: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    signal(SI\n-00186950: 4750 4950 452c 2073 6967 7069 7065 5f68 GPIPE, sigpipe_h\n-00186960: 616e 646c 6529 3b3c 2f64 6976 3e0a 3c2f andle);
    .

    where, f\n-00186990: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n-001869a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .
    "\n-00186c80: 7365 7276 6572 2e70 656d 2671 756f 743b server.pem"\n-00186c90: 3c2f 7370 616e 3e2c 203c 2f64 6976 3e0a ,
    .\n-00186ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    "password\n-00186ce0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-00186cf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    "ca\n-00186d30: 6365 7274 2e70 656d 2671 756f 743b 3c2f cert.pem",
    .\n-00186d60: 2020 2020 4e55 4c4c 2c20 3c2f 6469 763e NULL,
    \n-00186d70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    "dh512.p\n-00186db0: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em",\n-00186dc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    NU\n-00186de0: 4c4c 2c20 3c2f 6469 763e 0a3c 6469 7620 LL,
    .
    \n-00186e00: 204e 554c 4c29 2920 3c2f 6469 763e 0a3c NULL))
    .<\n+00184d90: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne\">vo\n+00184db0: 6964 3c2f 7370 616e 3e20 2a70 726f 6365 id *proce\n+00184dc0: 7373 5f72 6571 7565 7374 283c 7370 616e ss_request(void\n+00184df0: 202a 7473 6f61 7029 203c 2f64 6976 3e0a *tsoap)
    .\n+00184e00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct soap *soap = (stru\n+00184ed0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap*)tsoap\n+00184f10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    ..<\n+00185000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00185010: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00185030: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_ss\n+00185090: 6c5f 6163 6365 7074 3c2f 613e 283c 6120 l_accept(soap)) <\n+001850d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+00185140: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault<\n+00185150: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00185180: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    else <\n+001851d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap\n+00185240: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap); .
    soa\n+001852f0: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap); \n+00185330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001853a0: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); <\n+001853e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+00185450: 6f61 705f 6672 6565 3c2f 613e 283c 6120 oap_free(soap);.
    return\n+001854d0: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
    .\n+001854f0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    soap_ssl_server\n+001855b0: 5f63 6f6e 7465 7874 3c2f 613e 3c2f 6469 _context
    int soap_s\n+001855e0: 736c 5f73 6572 7665 725f 636f 6e74 6578 sl_server_contex\n+001855f0: 7428 7374 7275 6374 2073 6f61 7020 2a73 t(struct soap *s\n+00185600: 6f61 702c 2073 6f61 705f 7373 6c5f 666c oap, soap_ssl_fl\n+00185610: 6167 7320 666c 6167 732c 2063 6f6e 7374 ags flags, const\n+00185620: 2063 6861 7220 2a6b 6579 6669 6c65 2c20 char *keyfile, \n+00185630: 636f 6e73 7420 6368 6172 202a 7061 7373 const char *pass\n+00185640: 776f 7264 2c20 636f 6e73 7420 6368 6172 word, const char\n+00185650: 202a 6361 6669 6c65 2c20 636f 6e73 7420 *cafile, const \n+00185660: 6368 6172 202a 6361 7061 7468 2c20 636f char *capath, co\n+00185670: 6e73 7420 6368 6172 202a 6468 6669 6c65 nst char *dhfile\n+00185680: 2c20 636f 6e73 7420 6368 6172 202a 7261 , const char *ra\n+00185690: 6e64 6669 6c65 2c20 636f 6e73 7420 6368 ndfile, const ch\n+001856a0: 6172 202a 7369 6429 3c2f 6469 763e 3c64 ar *sid)
    Initialize the \n+001856d0: 7365 7276 6572 2d73 6964 6520 5353 4c2f server-side SSL/\n+001856e0: 544c 5320 636f 6e74 6578 742e 3c2f 6469 TLS context.
    .
    soap_ssl_init<\n+001857b0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    voi\n+001857d0: 6420 736f 6170 5f73 736c 5f69 6e69 7428 d soap_ssl_init(\n+001857e0: 766f 6964 293c 2f64 6976 3e3c 6469 7620 void)
    In\n+00185800: 6974 6961 6c69 7a65 2074 6865 2053 534c itialize the SSL\n+00185810: 2f54 4c53 206c 6962 7261 7279 2e3c 2f64 /TLS library.
    .
    <\n+00185890: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+001858a0: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g\n+001858b0: 6136 3364 3130 6264 6362 3262 3637 3864 a63d10bdcb2b678d\n+001858c0: 3964 3535 6361 6233 3165 3162 6461 6633 9d55cab31e1bdaf3\n+001858d0: 6522 3e53 4f41 505f 5353 4c5f 4445 4641 e\">SOAP_SSL_DEFA\n+001858e0: 554c 543c 2f61 3e3c 2f64 6976 3e3c 6469 ULT
    #define SOAP_SS\n+00185910: 4c5f 4445 4641 554c 543c 2f64 6976 3e3c L_DEFAULT
    <\n+00185920: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00185930: 223e 736f 6170 5f73 736c 5f66 6c61 6773 \">soap_ssl_flags\n+00185940: 2066 6c61 6720 7769 7468 2023 534f 4150 flag with #SOAP\n+00185950: 5f53 534c 5f52 4551 5549 5245 5f53 4552 _SSL_REQUIRE_SER\n+00185960: 5645 525f 4155 5448 454e 5449 4341 5449 VER_AUTHENTICATI\n+00185970: 4f4e 2061 6e64 2023 534f 4150 5f54 4c53 ON and #SOAP_TLS\n+00185980: 7631 2065 6e61 626c 6564 2062 7920 6465 v1 enabled by de\n+00185990: 6661 756c 743c 2f64 6976 3e3c 6469 7620 fault
    Definition:\n+001859c0: 2073 7464 736f 6170 322e 683a 3538 3236 stdsoap2.h:5826\n+001859d0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .CRYPTO_thr\n+00185a90: 6561 645f 636c 6561 6e75 703c 2f61 3e3c ead_cleanup<\n+00185aa0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int CRY\n+00185ac0: 5054 4f5f 7468 7265 6164 5f63 6c65 616e PTO_thread_clean\n+00185ad0: 7570 2829 3c2f 6469 763e 3c64 6976 2063 up()
    Cle\n+00185af0: 616e 7570 2066 756e 6374 696f 6e20 666f anup function fo\n+00185b00: 7220 4f70 656e 5353 4c20 7665 7273 696f r OpenSSL versio\n+00185b10: 6e73 2070 7269 6f72 2074 6f20 312e 312e ns prior to 1.1.\n+00185b20: 312e 3c2f 6469 763e 3c2f 6469 763e 0a3c 1.
    .<\n+00185b30: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00185b40: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+00185b50: 705f 5f73 736c 5f68 746d 6c5f 6761 3939 p__ssl_html_ga99\n+00185b60: 3030 3833 6566 6661 3564 3865 6439 3331 0083effa5d8ed931\n+00185b70: 6664 3735 6463 3236 3330 6132 6363 223e fd75dc2630a2cc\">\n+00185b80: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    soap_ssl\n+00185be0: 5f61 6363 6570 743c 2f61 3e3c 2f64 6976 _accept
    int soap_ss\n+00185c10: 6c5f 6163 6365 7074 2873 7472 7563 7420 l_accept(struct \n+00185c20: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
    Accept SSL/T\n+00185c50: 4c53 2063 6f6e 6e65 6374 696f 6e2e 3c2f LS connection.
    .
    \n+00185cd0: 3c61 2068 7265 663d 2267 726f 7570 5f5f CRYPTO_threa\n+00185d20: 645f 7365 7475 703c 2f61 3e3c 2f64 6976 d_setup
    int CRYPTO_\n+00185d50: 7468 7265 6164 5f73 6574 7570 2829 3c2f thread_setup()
    Setup fun\n+00185d80: 6374 696f 6e20 666f 7220 4f70 656e 5353 ction for OpenSS\n+00185d90: 4c20 7665 7273 696f 6e73 2070 7269 6f72 L versions prior\n+00185da0: 2074 6f20 312e 312e 3120 746f 2073 6574 to 1.1.1 to set\n+00185db0: 206c 6f63 6b73 2066 6f72 206d 756c 7469 locks for multi\n+00185dc0: 2d74 6872 6561 6465 6420 5353 4c2f 544c -threaded SSL/TL\n+00185dd0: 5320 6170 706c 6963 6174 696f 2e2e 2e3c S applicatio...<\n+00185de0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    The \n+00185e10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ssl_serv\n+00185ea0: 6572 5f63 6f6e 7465 7874 3c2f 613e 3c2f er_context function i\n+00185ec0: 6e69 7469 616c 697a 6573 2074 6865 2073 nitializes the s\n+00185ed0: 6572 7665 722d 7369 6465 2053 534c 2063 erver-side SSL c\n+00185ee0: 6f6e 7465 7874 2e20 5468 6520 3c65 6d3e ontext. The \n+00185ef0: 3c63 6f64 653e 7365 7276 6572 2e70 656d server.pem\n+00185f00: 3c2f 636f 6465 3e3c 2f65 6d3e 206b 6579 key\n+00185f10: 2066 696c 6520 6973 2074 6865 2073 6572 file is the ser\n+00185f20: 7665 7227 7320 7072 6976 6174 6520 6b65 ver's private ke\n+00185f30: 7920 636f 6e63 6174 656e 6174 6564 2077 y concatenated w\n+00185f40: 6974 6820 6974 7320 6365 7274 6966 6963 ith its certific\n+00185f50: 6174 652e 2054 6865 203c 656d 3e3c 636f ate. The cacert.pem is use\n+00185f80: 6420 746f 2061 7574 6865 6e74 6963 6174 d to authenticat\n+00185f90: 6520 636c 6965 6e74 7320 616e 6420 636f e clients and co\n+00185fa0: 6e74 6169 6e73 2074 6865 2063 6c69 656e ntains the clien\n+00185fb0: 7420 6365 7274 6966 6963 6174 6573 2e20 t certificates. \n+00185fc0: 416c 7465 726e 6174 6976 656c 7920 6120 Alternatively a \n+00185fd0: 6469 7265 6374 6f72 7920 6e61 6d65 2063 directory name c\n+00185fe0: 616e 2062 6520 7370 6563 6966 6965 642e an be specified.\n+00185ff0: 2054 6869 7320 6469 7265 6374 6f72 7920 This directory \n+00186000: 6973 2061 7373 756d 6564 2074 6f20 636f is assumed to co\n+00186010: 6e74 6169 6e20 7468 6520 6365 7274 6966 ntain the certif\n+00186020: 6963 6174 6573 2e20 5468 6520 3c65 6d3e icates. The \n+00186030: 3c63 6f64 653e 6468 3531 322e 7065 6d3c dh512.pem<\n+00186040: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+00186050: 2073 7065 6369 6669 6573 2074 6861 7420 specifies that \n+00186060: 4448 2077 696c 6c20 6265 2075 7365 6420 DH will be used \n+00186070: 666f 7220 6b65 7920 6167 7265 656d 656e for key agreemen\n+00186080: 7420 696e 7374 6561 6420 6f66 2052 5341 t instead of RSA\n+00186090: 2e20 4120 6e75 6d65 7269 6320 7661 6c75 . A numeric valu\n+001860a0: 6520 6772 6561 7465 7220 7468 616e 2035 e greater than 5\n+001860b0: 3132 2063 616e 2062 6520 7072 6f76 6964 12 can be provid\n+001860c0: 6564 2069 6e73 7465 6164 2061 7320 6120 ed instead as a \n+001860d0: 7374 7269 6e67 2063 6f6e 7374 616e 7420 string constant \n+001860e0: 2865 2e67 2e20 3c63 6f64 653e 2235 3132 (e.g. \"512\n+001860f0: 223c 2f63 6f64 653e 2920 746f 2061 6c6c \") to all\n+00186100: 6f77 2074 6865 2065 6e67 696e 6520 746f ow the engine to\n+00186110: 2067 656e 6572 6174 6520 7468 6520 4448 generate the DH\n+00186120: 2070 6172 616d 6574 6572 7320 6f6e 2074 parameters on t\n+00186130: 6865 2066 6c79 2028 7468 6973 2063 616e he fly (this can\n+00186140: 2074 616b 6520 6120 7768 696c 6529 2072 take a while) r\n+00186150: 6174 6865 7220 7468 616e 2072 6574 7269 ather than retri\n+00186160: 6576 696e 6720 7468 656d 2066 726f 6d20 eving them from \n+00186170: 6120 6669 6c65 2e20 5468 6520 7261 6e64 a file. The rand\n+00186180: 6669 6c65 2065 6e74 7279 2063 616e 2062 file entry can b\n+00186190: 6520 7573 6564 2074 6f20 7365 6564 2074 e used to seed t\n+001861a0: 6865 2050 524e 472e 2054 6865 206c 6173 he PRNG. The las\n+001861b0: 7420 656e 7472 7920 656e 6162 6c65 2073 t entry enable s\n+001861c0: 6572 7665 722d 7369 6465 2073 6573 7369 erver-side sessi\n+001861d0: 6f6e 2063 6163 6869 6e67 2074 6f20 7370 on caching to sp\n+001861e0: 6565 6420 7570 2054 4c53 2e20 4120 756e eed up TLS. A un\n+001861f0: 6971 7565 2073 6572 7665 7220 6e61 6d65 ique server name\n+00186200: 2069 7320 7265 7175 6972 6564 2e3c 2f70 is required..

    You can spe\n+00186220: 6369 6679 2061 2063 6970 6865 7220 6c69 cify a cipher li\n+00186230: 7374 2074 6f20 7573 6520 7769 7468 2054 st to use with T\n+00186240: 4c53 7631 2e32 2061 6e64 2062 656c 6f77 LSv1.2 and below\n+00186250: 2077 6974 6820 3c63 6f64 653e 5353 4c5f with SSL_\n+00186260: 4354 585f 7365 745f 6369 7068 6572 5f6c CTX_set_cipher_l\n+00186270: 6973 7428 736f 6170 2d26 6774 3b63 7478 ist(soap->ctx\n+00186280: 2c20 222e 2e2e 2229 3c2f 636f 6465 3e20 , \"...\") \n+00186290: 7768 6572 6520 3c63 6f64 653e 736f 6170 where soap\n+001862a0: 2d26 6774 3b63 7478 3c2f 636f 6465 3e20 ->ctx \n+001862b0: 6973 2074 6865 2053 534c 2063 6f6e 7465 is the SSL conte\n+001862c0: 7874 2063 7265 6174 6564 2062 7920 3c63 xt created by soap_ssl_\n+00186360: 7365 7276 6572 5f63 6f6e 7465 7874 2829 server_context()\n+00186370: 3c2f 613e 3c2f 636f 6465 3e2e 204c 696b . Lik\n+00186380: 6577 6973 652c 2075 7365 203c 636f 6465 ewise, use SSL_CTX_set_cip\n+001863a0: 6865 7273 7569 7465 7328 736f 6170 2d26 hersuites(soap-&\n+001863b0: 6774 3b63 7478 2c20 222e 2e2e 2229 3c2f gt;ctx, \"...\") to configu\n+001863d0: 7265 2074 6865 2061 7661 696c 6162 6c65 re the available\n+001863e0: 2054 4c53 7631 2e33 2063 6970 6865 7273 TLSv1.3 ciphers\n+001863f0: 7569 7465 732e 3c2f 703e 0a3c 703e 5765 uites.

    .

    We\n+00186400: 2072 6566 6572 2074 6f20 7468 6520 4f70 refer to the Op\n+00186410: 656e 5353 4c20 646f 6375 6d65 6e74 6174 enSSL documentat\n+00186420: 696f 6e20 616e 6420 6d61 6e75 616c 2070 ion and manual p\n+00186430: 6167 6573 206f 6620 3c63 6f64 653e 5353 ages of SS\n+00186440: 4c5f 4354 585f 7365 745f 6369 7068 6572 L_CTX_set_cipher\n+00186450: 5f6c 6973 743c 2f63 6f64 653e 2061 6e64 _list and\n+00186460: 203c 636f 6465 3e53 534c 5f43 5458 5f73 SSL_CTX_s\n+00186470: 6574 5f63 6970 6865 7273 7569 7465 733c et_ciphersuites<\n+00186480: 2f63 6f64 653e 2066 6f72 2064 6574 6169 /code> for detai\n+00186490: 6c73 206f 6e20 7468 6520 6c61 7465 7374 ls on the latest\n+001864a0: 2063 6970 6865 7220 6c69 7374 7320 616e cipher lists an\n+001864b0: 6420 7375 6974 6573 2061 7661 696c 6162 d suites availab\n+001864c0: 6c65 2074 6f20 7573 652e 3c2f 703e 0a3c le to use.

    .<\n+001864d0: 703e 5468 6520 474e 5554 4c53 206d 7574 p>The GNUTLS mut\n+001864e0: 6578 206c 6f63 6b20 7365 7475 7020 6973 ex lock setup is\n+001864f0: 2061 7574 6f6d 6174 6963 616c 6c79 2070 automatically p\n+00186500: 6572 666f 726d 6564 2069 6e20 7468 6520 erformed in the \n+00186510: 656e 6769 6e65 2c20 6275 7420 6f6e 6c79 engine, but only\n+00186520: 2077 6865 6e20 504f 5349 5820 7468 7265 when POSIX thre\n+00186530: 6164 7320 6172 6520 6465 7465 6374 6564 ads are detected\n+00186540: 2061 6e64 2061 7661 696c 6162 6c65 2e3c and available.<\n+00186550: 2f70 3e0a 3c70 3e41 6c6c 204f 7065 6e53 /p>.

    All OpenS\n+00186560: 534c 2076 6572 7369 6f6e 7320 7072 696f SL versions prio\n+00186570: 7220 746f 2031 2e31 2e30 2072 6571 7569 r to 1.1.0 requi\n+00186580: 7265 206d 7574 6578 206c 6f63 6b73 2074 re mutex locks t\n+00186590: 6f20 6265 2065 7870 6c69 6369 746c 7920 o be explicitly \n+001865a0: 7365 7420 7570 2069 6e20 796f 7572 2063 set up in your c\n+001865b0: 6f64 6520 666f 7220 6d75 6c74 692d 7468 ode for multi-th\n+001865c0: 7265 6164 6564 2061 7070 6c69 6361 7469 readed applicati\n+001865d0: 6f6e 7320 6279 2063 616c 6c69 6e67 203c ons by calling <\n+001865e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>CRYPTO_thre\n+001866b0: 6164 5f73 6574 7570 2829 3c2f 613e 3c2f ad_setup() and \n+001866d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 CRY\n+00186760: 5054 4f5f 7468 7265 6164 5f63 6c65 616e PTO_thread_clean\n+00186770: 7570 2829 3c2f 613e 3c2f 636f 6465 3e20 up() \n+00186780: 6173 2077 6173 2073 686f 776e 2069 6e20 as was shown in \n+00186790: 7468 6520 636f 6465 2061 626f 7665 2e20 the code above. \n+001867a0: 4f70 656e 5353 4c20 312e 312e 3020 616e OpenSSL 1.1.0 an\n+001867b0: 6420 6772 6561 7465 7220 646f 6573 206e d greater does n\n+001867c0: 6f74 2072 6571 7569 7265 2074 6865 7365 ot require these\n+001867d0: 206c 6f63 6b73 2074 6f20 6265 2073 6574 locks to be set\n+001867e0: 2075 702e 2049 6620 796f 7520 6172 6520 up. If you are \n+001867f0: 6e6f 7420 7375 7265 2077 6869 6368 2076 not sure which v\n+00186800: 6572 7369 6f6e 206f 6620 4f70 656e 5353 ersion of OpenSS\n+00186810: 4c20 796f 7520 6d61 7920 6265 2075 7369 L you may be usi\n+00186820: 6e67 2077 6974 6820 796f 7572 206d 756c ng with your mul\n+00186830: 7469 2d74 6872 6561 6465 6420 6170 706c ti-threaded appl\n+00186840: 6963 6174 696f 6e2c 2074 6865 6e20 7365 ication, then se\n+00186850: 7420 7570 2074 6865 206c 6f63 6b73 2e3c t up the locks.<\n+00186860: 2f70 3e0a 3c70 3e46 6f72 2055 6e69 7820 /p>.

    For Unix \n+00186870: 616e 6420 4c69 6e75 782c 206d 616b 6520 and Linux, make \n+00186880: 7375 7265 2079 6f75 2068 6176 6520 7369 sure you have si\n+00186890: 676e 616c 2068 616e 646c 6572 7320 7365 gnal handlers se\n+001868a0: 7420 696e 2079 6f75 7220 7365 7276 6963 t in your servic\n+001868b0: 6520 616e 642f 6f72 2063 6c69 656e 7420 e and/or client \n+001868c0: 6170 706c 6963 6174 696f 6e73 2074 6f20 applications to \n+001868d0: 6361 7463 6820 6272 6f6b 656e 2063 6f6e catch broken con\n+001868e0: 6e65 6374 696f 6e73 2028 3c63 6f64 653e nections (\n+001868f0: 5349 4750 4950 453c 2f63 6f64 653e 293a SIGPIPE):\n+00186900: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    sig\n+00186930: 6e61 6c28 5349 4750 4950 452c 2073 6967 nal(SIGPIPE, sig\n+00186940: 7069 7065 5f68 616e 646c 6529 3b3c 2f64 pipe_handle);.

    wh\n+00186970: 6572 652c 2066 6f72 2065 7861 6d70 6c65 ere, for example\n+00186980: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    void sigpipe_hand\n+001869e0: 6c65 283c 7370 616e 2063 6c61 7373 3d22 le(int\n+00186a00: 3c2f 7370 616e 3e20 7829 207b 207d 3c2f x) { }.

    B\n+00186a30: 7920 6465 6661 756c 742c 2063 6c69 656e y default, clien\n+00186a40: 7473 2061 7265 206e 6f74 2072 6571 7569 ts are not requi\n+00186a50: 7265 6420 746f 2061 7574 6865 6e74 6963 red to authentic\n+00186a60: 6174 652e 2054 6f20 7265 7175 6972 6520 ate. To require \n+00186a70: 636c 6965 6e74 2061 7574 6865 6e74 6963 client authentic\n+00186a80: 6174 696f 6e20 7573 6520 7468 6520 666f ation use the fo\n+00186a90: 6c6c 6f77 696e 673a 3c2f 703e 0a3c 6469 llowing:

    .
    i\n+00186ae0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap_\n+00186b40: 7373 6c5f 7365 7276 6572 5f63 6f6e 7465 ssl_server_conte\n+00186b50: 7874 3c2f 613e 2826 616d 703b 3c61 2063 xt(&soap, ..\n+00186c40: 2020 2020 3c73 7061 6e20 636c 6173 733d \n+00186c60: 2671 756f 743b 7365 7276 6572 2e70 656d "server.pem\n+00186c70: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n+00186c80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    "pa\n+00186cc0: 7373 776f 7264 2671 756f 743b 3c2f 7370 ssword",
    . \n+00186cf0: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n+00186d10: 756f 743b 6361 6365 7274 2e70 656d 2671 uot;cacert.pem&q\n+00186d20: 756f 743b 3c2f 7370 616e 3e2c 203c 2f64 uot;, .
    NULL, \n+00186d50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "d\n+00186d90: 6835 3132 2e70 656d 2671 756f 743b 3c2f h512.pem",
    .\n+00186dc0: 2020 2020 4e55 4c4c 2c20 3c2f 6469 763e NULL,
    \n+00186dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL)) .
    {
    .<\n 00186e10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00186e20: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    ..
    e\n-00186f00: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-00186f10: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    }.
    #define SOAP_SS\n-00187030: 4c5f 5245 5155 4952 455f 434c 4945 4e54 L_REQUIRE_CLIENT\n-00187040: 5f41 5554 4845 4e54 4943 4154 494f 4e3c _AUTHENTICATION<\n-00187050: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_ssl\n-00187070: 5f66 6c61 6773 2066 6c61 6720 666f 7220 _flags flag for \n-00187080: 7365 7276 6572 7320 746f 2072 6571 7569 servers to requi\n-00187090: 7265 2063 6c69 656e 7473 2074 6f20 6175 re clients to au\n-001870a0: 7468 656e 7469 6361 7465 2074 6f20 7365 thenticate to se\n-001870b0: 7276 6572 7320 6475 7269 6e67 2074 6865 rvers during the\n-001870c0: 2048 5454 5053 2068 616e 6473 682e 2e2e HTTPS handsh...\n-001870d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-001870f0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-00187100: 6f61 7032 2e68 3a35 3835 343c 2f64 6976 oap2.h:5854
    .
    <\n-00187130: 703e 5468 6973 2072 6571 7569 7265 7320 p>This requires \n-00187140: 6561 6368 2063 6c69 656e 7420 746f 2061 each client to a\n-00187150: 7574 6865 6e74 6963 6174 6520 7769 7468 uthenticate with\n-00187160: 2069 7473 2063 6572 7469 6669 6361 7465 its certificate\n-00187170: 2c20 696e 2061 6464 6974 696f 6e20 666f , in addition fo\n-00187180: 7220 7468 6520 7365 7276 6572 2074 6f20 r the server to \n-00187190: 6175 7468 656e 7469 6361 7465 2074 6f20 authenticate to \n-001871a0: 7468 6520 636c 6965 6e74 2e3c 2f70 3e0a the client.

    .\n-001871b0: 3c70 3e53 696e 6365 2072 656c 6561 7365

    Since release\n-001871c0: 2076 6572 7369 6f6e 2032 2e38 2e32 302c version 2.8.20,\n-001871d0: 2053 534c 2076 3320 6973 2064 6973 6162 SSL v3 is disab\n-001871e0: 6c65 642e 2054 6f20 656e 6162 6c65 2053 led. To enable S\n-001871f0: 534c 2076 3320 746f 6765 7468 6572 2077 SL v3 together w\n-00187200: 6974 6820 544c 5320 312e 3020 616e 6420 ith TLS 1.0 and \n-00187210: 6869 6768 6572 2c20 7573 6520 3c63 6f64 higher, use #SOAP_SSLv3_TL\n-00187230: 5376 313c 2f63 6f64 653e 2077 6974 6820 Sv1 with \n-00187240: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_ss\n-001872d0: 6c5f 7365 7276 6572 5f63 6f6e 7465 7874 l_server_context\n-001872e0: 3c2f 613e 3c2f 636f 6465 3e2e 2054 6f20 . To \n-001872f0: 7573 6520 544c 5320 312e 3120 616e 6420 use TLS 1.1 and \n-00187300: 312e 3220 7573 6520 3c63 6f64 653e 534f 1.2 use SO\n-00187310: 4150 5f54 4c53 7631 5f31 207c 2053 4f41 AP_TLSv1_1 | SOA\n-00187320: 505f 544c 5376 315f 323c 2f63 6f64 653e P_TLSv1_2\n-00187330: 2e20 546f 2075 7365 2054 4c53 2031 2e32 . To use TLS 1.2\n-00187340: 206f 6e6c 7920 7573 6520 3c63 6f64 653e only use \n-00187350: 2353 4f41 505f 544c 5376 315f 323c 2f63 #SOAP_TLSv1_2. To use SSL\n-00187370: 2076 3320 6f6e 6c79 2075 7365 203c 636f v3 only use #SOAP_SSLv3.

    .

    Th\n-001873a0: 6520 3c63 6f64 653e 6361 6365 7274 3c2f e cacert file and <\n-001873c0: 636f 6465 3e63 6170 6174 683c 2f63 6f64 code>capath are optional.\n-001873e0: 2045 6974 6865 7220 6f6e 6520 6361 6e20 Either one can \n-001873f0: 6265 2073 7065 6369 6669 6564 2077 6865 be specified whe\n-00187400: 6e20 636c 6965 6e74 7320 6d75 7374 2072 n clients must r\n-00187410: 756e 206f 6e20 6e6f 6e2d 7472 7573 7465 un on non-truste\n-00187420: 6420 7379 7374 656d 7320 283c 636f 6465 d systems (capath i\n-00187440: 7320 6e6f 7420 7573 6564 2077 6974 6820 s not used with \n-00187450: 474e 5554 4c53 292e 2057 6520 7761 6e74 GNUTLS). We want\n-00187460: 2074 6f20 6176 6f69 6420 7374 6f72 696e to avoid storin\n-00187470: 6720 7472 7573 7465 6420 6365 7274 6966 g trusted certif\n-00187480: 6963 6174 6573 2069 6e20 7468 6520 6465 icates in the de\n-00187490: 6661 756c 7420 6c6f 6361 7469 6f6e 206f fault location o\n-001874a0: 6e20 7468 6520 6669 6c65 2073 7973 7465 n the file syste\n-001874b0: 6d20 7768 656e 2074 6861 7420 6973 206e m when that is n\n-001874c0: 6f74 2073 6563 7572 652e 2054 6865 7265 ot secure. There\n-001874d0: 666f 7265 2c20 6120 666c 6174 203c 656d fore, a flat cacert.pe\n-001874f0: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 6669 m fi\n-00187500: 6c65 206f 7220 6469 7265 6374 6f72 7920 le or directory \n-00187510: 6361 6e20 6265 2073 7065 6369 6669 6564 can be specified\n-00187520: 2074 6f20 7374 6f72 6520 7472 7573 7465 to store truste\n-00187530: 6420 6365 7274 6966 6963 6174 6573 2e3c d certificates.<\n-00187540: 2f70 3e0a 3c70 3e54 6865 2067 534f 4150 /p>.

    The gSOAP\n-00187550: 2070 6163 6b61 6765 2069 6e63 6c75 6465 package include\n-00187560: 7320 6120 3c65 6d3e 3c63 6f64 653e 6361 s a ca\n-00187570: 6365 7274 732e 7065 6d3c 2f63 6f64 653e certs.pem\n-00187580: 3c2f 656d 3e20 6669 6c65 2077 6974 6820 file with \n-00187590: 7468 6520 6365 7274 6966 6963 6174 6573 the certificates\n-001875a0: 206f 6620 616c 6c20 6365 7274 6966 6963 of all certific\n-001875b0: 6174 6520 6175 7468 6f72 6974 6965 732e ate authorities.\n-001875c0: 2059 6f75 2063 616e 2075 7365 2074 6869 You can use thi\n-001875d0: 7320 6669 6c65 2074 6f20 7665 7269 6679 s file to verify\n-001875e0: 2074 6865 2061 7574 6865 6e74 6963 6174 the authenticat\n-001875f0: 696f 6e20 6f66 2073 6572 7665 7273 2074 ion of servers t\n-00187600: 6861 7420 7072 6f76 6964 6520 6365 7274 hat provide cert\n-00187610: 6966 6963 6174 6573 2069 7373 7565 6420 ificates issued \n-00187620: 6279 2074 6865 7365 2043 4173 2e3c 2f70 by these CAs..

    The cacert.pem, <\n-00187660: 636f 6465 3e63 6c69 656e 742e 7065 6d3c code>client.pem<\n-00187670: 2f63 6f64 653e 3c2f 656d 3e2c 2061 6e64 /code>, and\n-00187680: 203c 656d 3e3c 636f 6465 3e73 6572 7665 serve\n-00187690: 722e 7065 6d3c 2f63 6f64 653e 3c2f 656d r.pem files in the g\n-001876b0: 534f 4150 2070 6163 6b61 6765 2061 7265 SOAP package are\n-001876c0: 2065 7861 6d70 6c65 7320 6f66 2073 656c examples of sel\n-001876d0: 662d 7369 676e 6564 2063 6572 7469 6669 f-signed certifi\n-001876e0: 6361 7465 732e 2054 6865 203c 656d 3e3c cates. The <\n-001876f0: 636f 6465 3e63 6c69 656e 742e 7065 6d3c code>client.pem<\n-00187700: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-00187710: 3c65 6d3e 3c63 6f64 653e 7365 7276 6572 server\n-00187720: 2e70 656d 3c2f 636f 6465 3e3c 2f65 6d3e .pem\n-00187730: 2063 6f6e 7461 696e 2074 6865 2063 6c69 contain the cli\n-00187740: 656e 742f 7365 7276 6572 2070 7269 7661 ent/server priva\n-00187750: 7465 206b 6579 2063 6f6e 6361 7465 6e61 te key concatena\n-00187760: 7465 6420 7769 7468 2074 6865 2063 6572 ted with the cer\n-00187770: 7469 6669 6361 7465 2e20 5468 6520 6b65 tificate. The ke\n-00187780: 7966 696c 6573 2028 3c65 6d3e 3c63 6f64 yfiles (client.pem and server.pe\n-001877c0: 6d3c 2f63 6f64 653e 3c2f 656d 3e29 2061 m) a\n-001877d0: 7265 2063 7265 6174 6564 2062 7920 636f re created by co\n-001877e0: 6e63 6174 656e 6174 696e 6720 7468 6520 ncatenating the \n-001877f0: 7072 6976 6174 6520 6b65 7920 5045 4d20 private key PEM \n-00187800: 7769 7468 2074 6865 2063 6572 7469 6669 with the certifi\n-00187810: 6361 7465 2050 454d 2e20 5468 6520 6b65 cate PEM. The ke\n-00187820: 7966 696c 6520 7368 6f75 6c64 206e 6f74 yfile should not\n-00187830: 2062 6520 7368 6172 6564 2077 6974 6820 be shared with \n-00187840: 616e 7920 7061 7274 792e 2057 6974 6820 any party. With \n-00187850: 4f70 656e 5353 4c2c 2079 6f75 2063 616e OpenSSL, you can\n-00187860: 2065 6e63 7279 7074 2074 6865 206b 6579 encrypt the key\n-00187870: 6669 6c65 7320 7769 7468 2061 2070 6173 files with a pas\n-00187880: 7377 6f72 6420 746f 206f 6666 6572 2073 sword to offer s\n-00187890: 6f6d 6520 7072 6f74 6563 7469 6f6e 2061 ome protection a\n-001878a0: 6e64 2074 6865 2070 6173 7377 6f72 6420 nd the password \n-001878b0: 6973 2075 7365 6420 696e 2074 6865 2063 is used in the c\n-001878c0: 6c69 656e 742f 7365 7276 6572 2063 6f64 lient/server cod\n-001878d0: 6520 746f 2072 6561 6420 7468 6520 6b65 e to read the ke\n-001878e0: 7966 696c 652e 2047 4e55 544c 5320 646f yfile. GNUTLS do\n-001878f0: 6573 206e 6f74 2073 7570 706f 7274 2074 es not support t\n-00187900: 6869 7320 6665 6174 7572 6520 616e 6420 his feature and \n-00187910: 6361 6e6e 6f74 2065 6e63 7279 7074 206f cannot encrypt o\n-00187920: 7220 6465 6372 7970 7420 6120 6b65 7966 r decrypt a keyf\n-00187930: 696c 652e 3c2f 703e 0a3c 646c 2063 6c61 ile.

    .
    Warning\n-00187960: 3c2f 6474 3e3c 6464 3e49 7420 6973 2069
    It is i\n-00187970: 6d70 6f72 7461 6e74 2074 6861 7420 7468 mportant that th\n-00187980: 6520 3c63 6f64 653e 2357 4954 485f 4f50 e #WITH_OP\n-00187990: 454e 5353 4c3c 2f63 6f64 653e 206d 6163 ENSSL mac\n-001879a0: 726f 206d 7573 7420 6265 2063 6f6e 7369 ro must be consi\n-001879b0: 7374 656e 746c 7920 6465 6669 6e65 6420 stently defined \n-001879c0: 746f 2063 6f6d 7069 6c65 2074 6865 2073 to compile the s\n-001879d0: 6f75 7263 6573 2c20 7375 6368 2061 7320 ources, such as \n-001879e0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-001879f0: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp, soapC.cpp, <\n-00187a30: 636f 6465 3e73 6f61 7043 6c69 656e 742e code>soapClient.\n-00187a40: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp,\n-00187a50: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS\n-00187a60: 6572 7665 722e 6370 703c 2f63 6f64 653e erver.cpp\n-00187a70: 3c2f 656d 3e2c 2061 6e64 2061 6c6c 2061 , and all a\n-00187a80: 7070 6c69 6361 7469 6f6e 2073 6f75 7263 pplication sourc\n-00187a90: 6573 2074 6861 7420 696e 636c 7564 6520 es that include \n-00187aa0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-00187ab0: 7374 6473 6f61 7032 2e68 3c2f 636f 6465 stdsoap2.h or soapH.h. If the \n-00187af0: 6d61 6372 6f73 2061 7265 206e 6f74 2063 macros are not c\n-00187b00: 6f6e 7369 7374 656e 746c 7920 7573 6564 onsistently used\n-00187b10: 2c20 7468 6520 6170 706c 6963 6174 696f , the applicatio\n-00187b20: 6e20 7769 6c6c 2063 7261 7368 2064 7565 n will crash due\n-00187b30: 2074 6f20 6120 6d69 736d 6174 6368 6573 to a mismatches\n-00187b40: 2069 6e20 7468 6520 6465 636c 6172 6174 in the declarat\n-00187b50: 696f 6e20 616e 6420 6163 6365 7373 206f ion and access o\n-00187b60: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap\n-00187bc0: 3c2f 636f 6465 3e20 636f 6e74 6578 742e context.\n-00187bd0: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e 5365
    .

    Se\n-00187be0: 6520 616c 736f 2041 5049 2064 6f63 756d e also API docum\n-00187bf0: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module \n-00187c00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SSL/\n-00187c30: 544c 5320 636f 6e74 6578 7420 616e 6420 TLS context and \n-00187c40: 6675 6e63 7469 6f6e 733c 2f61 3e20 666f functions fo\n-00187c50: 7220 6d6f 7265 2064 6574 6169 6c73 206f r more details o\n-00187c60: 6e20 7468 6520 5353 4c2f 544c 5320 6675 n the SSL/TLS fu\n-00187c70: 6e63 7469 6f6e 732e 3c2f 703e 0a3c 703e nctions.

    .

    \n-00187c80: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n-00187ca0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    \n-00187ce0: 0a53 6563 7572 6520 636c 6965 6e74 7320 .Secure clients \n-00187cf0: 7769 7468 2048 5454 5053 3c2f 6832 3e0a with HTTPS

    .\n-00187d00: 3c70 3e54 6f20 7574 696c 697a 6520 4854

    To utilize HT\n-00187d10: 5450 532f 5353 4c2c 2079 6f75 206e 6565 TPS/SSL, you nee\n-00187d20: 6420 746f 2069 6e73 7461 6c6c 2074 6865 d to install the\n-00187d30: 204f 7065 6e53 534c 206c 6962 7261 7279 OpenSSL library\n-00187d40: 206f 6e20 796f 7572 2070 6c61 7466 6f72 on your platfor\n-00187d50: 6d20 6f72 2047 4e55 544c 5320 666f 7220 m or GNUTLS for \n-00187d60: 6120 6c69 6768 742d 7765 6967 6874 2053 a light-weight S\n-00187d70: 534c 2f54 4c53 206c 6962 7261 7279 2e20 SL/TLS library. \n-00187d80: 4166 7465 7220 696e 7374 616c 6c61 7469 After installati\n-00187d90: 6f6e 2c20 636f 6d70 696c 6520 616c 6c20 on, compile all \n-00187da0: 7468 6520 736f 7572 6365 7320 6f66 2079 the sources of y\n-00187db0: 6f75 7220 6170 706c 6963 6174 696f 6e20 our application \n-00187dc0: 7769 7468 2063 6f6d 7069 6c65 2d74 696d with compile-tim\n-00187dd0: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI\n-00187de0: 5448 5f4f 5045 4e53 534c 3c2f 636f 6465 TH_OPENSSL (or #WIT\n-00187e00: 485f 474e 5554 4c53 3c2f 636f 6465 3e20 H_GNUTLS \n-00187e10: 7768 656e 2075 7369 6e67 2047 4e55 544c when using GNUTL\n-00187e20: 5329 2e20 466f 7220 6578 616d 706c 6520 S). For example \n-00187e30: 6f6e 204c 696e 7578 3a20 3c2f 703e 3c70 on Linux:

    c++ -DWITH_\n-00187e60: 4f50 454e 5353 4c20 6d79 636c 6965 6e74 OPENSSL myclient\n-00187e70: 2e63 7070 2073 7464 736f 6170 2e63 7070 .cpp stdsoap.cpp\n-00187e80: 2073 6f61 7043 2e63 7070 2073 6f61 7043 soapC.cpp soapC\n-00187e90: 6c69 656e 742e 6370 7020 2d6c 7373 6c20 lient.cpp -lssl \n-00187ea0: 2d6c 6372 7970 746f 0a3c 2f70 7265 3e3c -lcrypto.
    <\n-00187eb0: 703e 206f 7220 556e 6978 3a20 3c2f 703e p> or Unix:

    \n-00187ec0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     c++ -DWIT\n-00187ee0: 485f 4f50 454e 5353 4c20 6d79 636c 6965  H_OPENSSL myclie\n-00187ef0: 6e74 2e63 7070 2073 7464 736f 6170 2e63  nt.cpp stdsoap.c\n-00187f00: 7070 2073 6f61 7043 2e63 7070 2073 6f61  pp soapC.cpp soa\n-00187f10: 7043 6c69 656e 742e 6370 7020 2d6c 786e  pClient.cpp -lxn\n-00187f20: 6574 202d 6c73 6f63 6b65 7420 2d6c 6e73  et -lsocket -lns\n-00187f30: 6c20 2d6c 7373 6c20 2d6c 6372 7970 746f  l -lssl -lcrypto\n-00187f40: 0a3c 2f70 7265 3e3c 703e 206f 7220 796f  .

    or yo\n-00187f50: 7520 6361 6e20 6164 6420 7468 6520 666f u can add the fo\n-00187f60: 6c6c 6f77 696e 6720 6c69 6e65 2074 6f20 llowing line to \n-00187f70: 3c65 6d3e 3c63 6f64 653e 736f 6170 6465 soapde\n-00187f80: 6673 2e68 3c2f 636f 6465 3e3c 2f65 6d3e fs.h\n-00187f90: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #define\n-00187fe0: 2057 4954 485f 4f50 454e 5353 4c3c 2f73 WITH_OPENSSL
    .

    B\n-00188ea0: 7920 6465 6661 756c 742c 2073 6572 7665 y default, serve\n-00188eb0: 7220 6175 7468 656e 7469 6361 7469 6f6e r authentication\n-00188ec0: 2069 7320 656e 6162 6c65 6420 616e 6420 is enabled and \n-00188ed0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6361 the ca\n-00188ee0: 6365 7274 732e 7065 6d3c 2f63 6f64 653e certs.pem\n-00188ef0: 3c2f 656d 3e20 6f72 203c 636f 6465 3e63 or c\n-00188f00: 6170 6174 683c 2f63 6f64 653e 2028 6e6f apath (no\n-00188f10: 7420 7573 6564 2077 6974 6820 474e 5554 t used with GNUT\n-00188f20: 4c53 2920 6d75 7374 2062 6520 7365 7420 LS) must be set \n-00188f30: 736f 2074 6861 7420 7468 6520 4341 2063 so that the CA c\n-00188f40: 6572 7469 6669 6361 7465 7320 6f66 2074 ertificates of t\n-00188f50: 6865 2073 6572 7665 7228 7329 2061 7265 he server(s) are\n-00188f60: 2061 6363 6573 7369 626c 6520 6174 2072 accessible at r\n-00188f70: 756e 2074 696d 652e 2054 6865 203c 656d un time. The cacerts.p\n-00188f90: 656d 3c2f 636f 6465 3e3c 2f65 6d3e 2066 em f\n-00188fa0: 696c 6520 696e 636c 7564 6564 2069 6e20 ile included in \n-00188fb0: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source\n-00188fc0: 2063 6f64 6520 7061 636b 6167 6520 636f code package co\n-00188fd0: 6e74 6169 6e73 2074 6865 2063 6572 7469 ntains the certi\n-00188fe0: 6669 6361 7465 7320 6f66 2063 6f6d 6d6f ficates of commo\n-00188ff0: 6e20 4341 732e 2054 6869 7320 6669 6c65 n CAs. This file\n-00189000: 206d 7573 7420 6265 2073 7570 706c 6965 must be supplie\n-00189010: 6420 7769 7468 2074 6865 2063 6c69 656e d with the clien\n-00189020: 742c 2069 6620 7365 7276 6572 2061 7574 t, if server aut\n-00189030: 6865 6e74 6963 6174 696f 6e20 6973 2072 hentication is r\n-00189040: 6571 7569 7265 642e 2041 6c74 6572 6e61 equired. Alterna\n-00189050: 7469 7665 6c79 2c20 796f 7520 6361 6e20 tively, you can \n-00189060: 7573 6520 7468 6520 3c65 6d3e 3c63 6f64 use the gsoap/plugin/c\n-00189080: 6163 6572 7473 2e68 3c2f 636f 6465 3e3c acerts.h<\n-00189090: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and gsoap/plugin/\n-001890b0: 6361 6365 7274 732e 633c 2f63 6f64 653e cacerts.c\n-001890c0: 3c2f 656d 3e20 636f 6465 2074 6f20 656d code to em\n-001890d0: 6265 6420 4341 2063 6572 7469 6669 6361 bed CA certifica\n-001890e0: 7465 7320 696e 2079 6f75 7220 636c 6965 tes in your clie\n-001890f0: 6e74 2063 6f64 652e 3c2f 703e 0a3c 703e nt code.

    .

    \n-00189100: 596f 7520 6361 6e20 7370 6563 6966 7920 You can specify \n-00189110: 6120 6369 7068 6572 206c 6973 7420 746f a cipher list to\n-00189120: 2075 7365 2077 6974 6820 544c 5376 312e use with TLSv1.\n-00189130: 3220 616e 6420 6265 6c6f 7720 7769 7468 2 and below with\n-00189140: 203c 636f 6465 3e53 534c 5f43 5458 5f73 SSL_CTX_s\n-00189150: 6574 5f63 6970 6865 725f 6c69 7374 2873 et_cipher_list(s\n-00189160: 6f61 702d 2667 743b 6374 782c 2022 2e2e oap->ctx, \"..\n-00189170: 2e22 293c 2f63 6f64 653e 2077 6865 7265 .\") where\n-00189180: 203c 636f 6465 3e73 6f61 702d 2667 743b soap->\n-00189190: 6374 783c 2f63 6f64 653e 2069 7320 7468 ctx is th\n-001891a0: 6520 5353 4c20 636f 6e74 6578 7420 6372 e SSL context cr\n-001891b0: 6561 7465 6420 6279 203c 636f 6465 3e3c eated by <\n-001891c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001891d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001891e0: 5f73 736c 2e68 746d 6c23 6761 3236 3963 _ssl.html#ga269c\n-001891f0: 3737 3332 6231 6364 6139 6463 3739 6462 7732b1cda9dc79db\n-00189200: 3038 6663 6266 3164 3534 3338 2220 7469 08fcbf1d5438\" ti\n-00189210: 746c 653d 2249 6e69 7469 616c 697a 6520 tle=\"Initialize \n-00189220: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n-00189230: 5353 4c2f 544c 5320 636f 6e74 6578 742e SSL/TLS context.\n-00189240: 223e 736f 6170 5f73 736c 5f63 6c69 656e \">soap_ssl_clien\n-00189250: 745f 636f 6e74 6578 7428 293c 2f61 3e3c t_context()<\n-00189260: 2f63 6f64 653e 2e20 4c69 6b65 7769 7365 /code>. Likewise\n-00189270: 2c20 7573 6520 3c63 6f64 653e 5353 4c5f , use SSL_\n-00189280: 4354 585f 7365 745f 6369 7068 6572 7375 CTX_set_ciphersu\n-00189290: 6974 6573 2873 6f61 702d 2667 743b 6374 ites(soap->ct\n-001892a0: 782c 2022 2e2e 2e22 293c 2f63 6f64 653e x, \"...\")\n-001892b0: 2074 6f20 636f 6e66 6967 7572 6520 7468 to configure th\n-001892c0: 6520 6176 6169 6c61 626c 6520 544c 5376 e available TLSv\n-001892d0: 312e 3320 6369 7068 6572 7375 6974 6573 1.3 ciphersuites\n-001892e0: 2e3c 2f70 3e0a 3c70 3e57 6520 7265 6665 .

    .

    We refe\n-001892f0: 7220 746f 2074 6865 204f 7065 6e53 534c r to the OpenSSL\n-00189300: 2064 6f63 756d 656e 7461 7469 6f6e 2061 documentation a\n-00189310: 6e64 206d 616e 7561 6c20 7061 6765 7320 nd manual pages \n-00189320: 6f66 203c 636f 6465 3e53 534c 5f43 5458 of SSL_CTX\n-00189330: 5f73 6574 5f63 6970 6865 725f 6c69 7374 _set_cipher_list\n-00189340: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and SSL_CTX_set_ci\n-00189360: 7068 6572 7375 6974 6573 3c2f 636f 6465 phersuites for details on\n-00189380: 2074 6865 206c 6174 6573 7420 6369 7068 the latest ciph\n-00189390: 6572 206c 6973 7473 2061 6e64 2073 7569 er lists and sui\n-001893a0: 7465 7320 6176 6169 6c61 626c 6520 746f tes available to\n-001893b0: 2075 7365 2e3c 2f70 3e0a 3c70 3e4f 7468 use.

    .

    Oth\n-001893c0: 6572 2063 6c69 656e 742d 7369 6465 2053 er client-side S\n-001893d0: 534c 206f 7074 696f 6e73 2061 7265 203c SL options are <\n-001893e0: 636f 6465 3e23 534f 4150 5f53 534c 5f53 code>#SOAP_SSL_S\n-001893f0: 4b49 505f 484f 5354 5f43 4845 434b 3c2f KIP_HOST_CHECK to skip th\n-00189410: 6520 686f 7374 206e 616d 6520 7665 7269 e host name veri\n-00189420: 6669 6361 7469 6f6e 2063 6865 636b 2061 fication check a\n-00189430: 6e64 203c 636f 6465 3e23 534f 4150 5f53 nd #SOAP_S\n-00189440: 534c 5f41 4c4c 4f57 5f45 5850 4952 4544 SL_ALLOW_EXPIRED\n-00189450: 5f43 4552 5449 4649 4341 5445 3c2f 636f _CERTIFICATE to allow con\n-00189470: 6e65 6374 696e 6720 746f 2061 2068 6f73 necting to a hos\n-00189480: 7420 7769 7468 2061 6e20 6578 7069 7265 t with an expire\n-00189490: 6420 6365 7274 6966 6963 6174 652e 2046 d certificate. F\n-001894a0: 6f72 2065 7861 6d70 6c65 2c3c 2f70 3e0a or example,

    .\n-001894b0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n-001894f0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap;.
    soap_ssl_i\n-001895d0: 6e69 743c 2f61 3e28 293b 203c 7370 616e nit(); /* init OpenSSL\n-00189600: 2028 736b 6970 7069 6e67 2074 6869 7320 (skipping this \n-00189610: 6f72 2063 616c 6c69 6e67 206d 756c 7469 or calling multi\n-00189620: 706c 6520 7469 6d65 7320 6973 204f 4b2c ple times is OK,\n-00189630: 2073 696e 6365 2074 6865 2065 6e67 696e since the engin\n-00189640: 6520 7769 6c6c 2069 6e69 7420 5353 4c20 e will init SSL \n-00189650: 6175 746f 6d61 7469 6361 6c6c 7929 202a automatically) *\n-00189660: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n-00189670: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00189680: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* soap_s\n-001896a0: 736c 5f6e 6f69 6e69 7428 293b 202a 2f3c sl_noinit(); */<\n-001896b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> /* \n-001896d0: 646f 206e 6f74 2069 6e69 7420 4f70 656e do not init Open\n-001896e0: 5353 4c20 2869 6620 5353 4c20 6973 2061 SSL (if SSL is a\n-001896f0: 6c72 6561 6479 2069 6e69 7469 616c 697a lready initializ\n-00189700: 6564 2065 6c73 6577 6865 7265 2069 6e20 ed elsewhere in \n-00189710: 7468 6973 2061 7070 6c69 6361 7469 6f6e this application\n-00189720: 2920 2a2f 3c2f 7370 616e 3e3c 2f64 6976 ) */.
    soap_in\n-001897a0: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap);..
    | <\n-00189a00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00189a10: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00189a20: 705f 5f73 736c 2e68 746d 6c23 6761 6137 p__ssl.html#gaa7\n-00189a30: 3863 3237 6330 3363 6364 3266 6234 3761 8c27c03ccd2fb47a\n-00189a40: 6664 6136 6238 3361 3366 6430 3163 223e fda6b83a3fd01c\">\n-00189a50: 534f 4150 5f53 534c 5f41 4c4c 4f57 5f45 SOAP_SSL_ALLOW_E\n-00189a60: 5850 4952 4544 5f43 4552 5449 4649 4341 XPIRED_CERTIFICA\n-00189a70: 5445 3c2f 613e 2c20 3c2f 6469 763e 0a3c TE,
    .<\n-00189a80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00189a90: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > &\n-00189ab0: 7175 6f74 3b63 6c69 656e 742e 7065 6d26 quot;client.pem&\n-00189ac0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-00189ad0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* ke\n-00189af0: 7966 696c 653a 2072 6571 7569 7265 6420 yfile: required \n-00189b00: 6f6e 6c79 2077 6865 6e20 636c 6965 6e74 only when client\n-00189b10: 206d 7573 7420 6175 7468 656e 7469 6361 must authentica\n-00189b20: 7465 2074 6f20 7365 7276 6572 2028 7365 te to server (se\n-00189b30: 6520 5353 4c20 646f 6373 206f 6e20 686f e SSL docs on ho\n-00189b40: 7720 746f 206f 6274 6169 6e20 7468 6973 w to obtain this\n-00189b50: 2066 696c 6529 202a 2f3c 2f73 7061 6e3e file) */\n-00189b60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    "pa\n-00189ba0: 7373 776f 7264 2671 756f 743b 3c2f 7370 ssword", /* password \n-00189be0: 746f 2072 6561 6420 7468 6520 6b65 7920 to read the key \n-00189bf0: 6669 6c65 2028 6e6f 7420 7573 6564 2077 file (not used w\n-00189c00: 6974 6820 474e 5554 4c53 2920 2a2f 3c2f ith GNUTLS) */
    . \n-00189c30: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00189c50: 6f74 3b63 6163 6572 7473 2e70 656d 2671 ot;cacerts.pem&q\n-00189c60: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n-00189c70: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* cace\n-00189c90: 7274 2066 696c 6520 746f 2073 746f 7265 rt file to store\n-00189ca0: 2074 7275 7374 6564 2063 6572 7469 6669 trusted certifi\n-00189cb0: 6361 7465 7320 286e 6565 6465 6420 746f cates (needed to\n-00189cc0: 2076 6572 6966 7920 7365 7276 6572 2920 verify server) \n-00189cd0: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    .\n-00189ce0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL, \n-00189d00: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-00189d20: 2a20 6361 7061 7468 2074 6f20 6469 7265 * capath to dire\n-00189d30: 6374 6f72 7920 7769 7468 2074 7275 7374 ctory with trust\n-00189d40: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates \n-00189d50: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00189d60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL \n-00189d80: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* if ra\n-00189da0: 6e64 6669 6c65 213d 4e55 4c4c 3a20 7573 ndfile!=NULL: us\n-00189db0: 6520 6120 6669 6c65 2077 6974 6820 7261 e a file with ra\n-00189dc0: 6e64 6f6d 2064 6174 6120 746f 2073 6565 ndom data to see\n-00189dd0: 6420 7261 6e64 6f6d 6e65 7373 202a 2f3c d randomness */<\n-00189de0: 2f73 7061 6e3e 2020 3c2f 6469 763e 0a3c /span>
    .<\n-00189df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00189e00: 3e29 2920 3c2f 6469 763e 0a3c 6469 7620 >))
    .
    {.
    soap\n-00189e90: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-00189ea0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00189ed0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-00189ee0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exit(\n-00189f00: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n-00189f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n-00189f30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_call_ns_\n-00189f50: 5f6d 796d 6574 686f 6428 2661 6d70 3b3c _mymethod(&<\n-00189f60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00189f70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00189f80: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00189f90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00189fb0: 743b 6874 7470 733a 2f2f 646f 6d61 696e t;https://domain\n-00189fc0: 2f70 6174 682f 7365 6375 7265 2e63 6769 /path/secure.cgi\n-00189fd0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-00189fe0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00189ff0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0018a000: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 ;", \n-0018a010: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c64 6976 ...);
    .SOAP_SSL_SK\n-0018a0d0: 4950 5f48 4f53 545f 4348 4543 4b3c 2f61 IP_HOST_CHECK
    #defi\n-0018a100: 6e65 2053 4f41 505f 5353 4c5f 534b 4950 ne SOAP_SSL_SKIP\n-0018a110: 5f48 4f53 545f 4348 4543 4b3c 2f64 6976 _HOST_CHECK
    soap_ssl_fla\n-0018a140: 6773 2066 6c61 6720 666f 7220 636c 6965 gs flag for clie\n-0018a150: 6e74 7320 746f 2061 6c6c 6f77 2063 6c69 nts to allow cli\n-0018a160: 656e 7473 2074 6f20 736b 6970 2063 6f6d ents to skip com\n-0018a170: 6d6f 6e20 6e61 6d65 2063 6865 636b 7320 mon name checks \n-0018a180: 6167 6169 6e73 7420 7468 6520 686f 7374 against the host\n-0018a190: 206e 616d 6520 6f66 202e 2e2e 3c2f 6469 name of ...
    Definiti\n-0018a1c0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0018a1d0: 2e68 3a35 3836 383c 2f64 6976 3e3c 2f64 .h:5868
    .
    #define SOAP_SS\n-0018a2e0: 4c5f 5245 5155 4952 455f 5345 5256 4552 L_REQUIRE_SERVER\n-0018a2f0: 5f41 5554 4845 4e54 4943 4154 494f 4e3c _AUTHENTICATION<\n-0018a300: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_ssl\n-0018a320: 5f66 6c61 6773 2066 6c61 6720 666f 7220 _flags flag for \n-0018a330: 636c 6965 6e74 7320 746f 2072 6571 7569 clients to requi\n-0018a340: 7265 2073 6572 7665 7273 2074 6f20 6175 re servers to au\n-0018a350: 7468 656e 7469 6361 7465 2074 6f20 636c thenticate to cl\n-0018a360: 6965 6e74 7320 6475 7269 6e67 2074 6865 ients during the\n-0018a370: 2048 5454 5053 2068 616e 6473 682e 2e2e HTTPS handsh...\n-0018a380: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0018a3a0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0018a3b0: 6f61 7032 2e68 3a35 3836 323c 2f64 6976 oap2.h:5862
    .
    #define SOAP_SS\n-0018a4c0: 4c5f 414c 4c4f 575f 4558 5049 5245 445f L_ALLOW_EXPIRED_\n-0018a4d0: 4345 5254 4946 4943 4154 453c 2f64 6976 CERTIFICATE
    soap_ssl_fla\n-0018a500: 6773 2066 6c61 6720 7661 6c75 6520 746f gs flag value to\n-0018a510: 2061 6c6c 6f77 2073 656c 662d 7369 676e allow self-sign\n-0018a520: 6564 2061 6e64 2065 7870 6972 6564 2063 ed and expired c\n-0018a530: 6572 7469 6669 6361 7465 7320 616e 6420 ertificates and \n-0018a540: 7468 6f73 6520 7769 7468 6f75 7420 4352 those without CR\n-0018a550: 4c20 746f 2062 6520 752e 2e2e 3c2f 6469 L to be u...
    Definiti\n-0018a580: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0018a590: 2e68 3a35 3833 323c 2f64 6976 3e3c 2f64 .h:5832
    .

    Fo\n-0018a5c0: 7220 7379 7374 656d 7320 6261 7365 6420 r systems based \n-0018a5d0: 6f6e 204d 6963 726f 736f 6674 2077 696e on Microsoft win\n-0018a5e0: 646f 7773 2c20 7468 6520 5769 6e49 6e65 dows, the WinIne\n-0018a5f0: 7420 6d6f 6475 6c65 2063 616e 2062 6520 t module can be \n-0018a600: 7573 6564 2069 6e73 7465 6164 2c20 7365 used instead, se\n-0018a610: 6520 3c63 6f64 653e 6d6f 645f 6773 6f61 e mod_gsoa\n-0018a620: 702f 6773 6f61 705f 7769 6e2f 7769 6e69 p/gsoap_win/wini\n-0018a630: 6e65 743c 2f63 6f64 653e 2e3c 2f70 3e0a net.

    .\n-0018a640: 3c70 3e53 696e 6365 2072 656c 6561 7365

    Since release\n-0018a650: 2076 6572 7369 6f6e 2032 2e38 2e32 3020 version 2.8.20 \n-0018a660: 5353 4c20 7633 2069 7320 6469 7361 626c SSL v3 is disabl\n-0018a670: 6564 2e20 546f 2065 6e61 626c 6520 5353 ed. To enable SS\n-0018a680: 4c20 7633 2074 6f67 6574 6865 7220 7769 L v3 together wi\n-0018a690: 7468 2054 4c53 2031 2e30 2061 6e64 2068 th TLS 1.0 and h\n-0018a6a0: 6967 6865 722c 2075 7365 203c 636f 6465 igher, use #SOAP_SSLv3_TLS\n-0018a6c0: 7631 3c2f 636f 6465 3e20 7769 7468 203c v1 with <\n-0018a6d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl\n-0018a760: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context<\n-0018a770: 2f61 3e3c 2f63 6f64 653e 2e20 546f 2075 /a>. To u\n-0018a780: 7365 2054 4c53 2031 2e31 2061 6e64 2031 se TLS 1.1 and 1\n-0018a790: 2e32 2075 7365 203c 636f 6465 3e53 4f41 .2 use SOA\n-0018a7a0: 505f 544c 5376 315f 3120 7c20 534f 4150 P_TLSv1_1 | SOAP\n-0018a7b0: 5f54 4c53 7631 5f32 3c2f 636f 6465 3e2e _TLSv1_2.\n-0018a7c0: 2054 6f20 7573 6520 544c 5320 312e 3220 To use TLS 1.2 \n-0018a7d0: 6f6e 6c79 2075 7365 203c 636f 6465 3e23 only use #\n-0018a7e0: 534f 4150 5f54 4c53 7631 5f32 3c2f 636f SOAP_TLSv1_2. To use SSL \n-0018a800: 7633 206f 6e6c 7920 7573 6520 3c63 6f64 v3 only use #SOAP_SSLv3.

    .

    To \n-0018a830: 6469 7361 626c 6520 7365 7276 6572 2061 disable server a\n-0018a840: 7574 6865 6e74 6963 6174 696f 6e20 666f uthentication fo\n-0018a850: 7220 7465 7374 696e 6720 7075 7270 6f73 r testing purpos\n-0018a860: 6573 2c20 7573 6520 7468 6520 666f 6c6c es, use the foll\n-0018a870: 6f77 696e 673a 3c2f 703e 0a3c 6469 7620 owing:

    .
    .\n-0018aa40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL,
    \n-0018aa60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL, .
    NULL .
    ))
    . soap_print\n+00186e80: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(&\n+00186e90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00186ec0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n+00186ed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT_F\n+00186ef0: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    .\n+00186f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    <\n+00186f80: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+00186f90: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g\n+00186fa0: 6134 6162 3565 3766 3366 6262 3030 6661 a4ab5e7f3fbb00fa\n+00186fb0: 3236 3639 6532 3965 3963 6130 3030 6431 2669e29e9ca000d1\n+00186fc0: 3222 3e53 4f41 505f 5353 4c5f 5245 5155 2\">SOAP_SSL_REQU\n+00186fd0: 4952 455f 434c 4945 4e54 5f41 5554 4845 IRE_CLIENT_AUTHE\n+00186fe0: 4e54 4943 4154 494f 4e3c 2f61 3e3c 2f64 NTICATION
    #define S\n+00187010: 4f41 505f 5353 4c5f 5245 5155 4952 455f OAP_SSL_REQUIRE_\n+00187020: 434c 4945 4e54 5f41 5554 4845 4e54 4943 CLIENT_AUTHENTIC\n+00187030: 4154 494f 4e3c 2f64 6976 3e3c 6469 7620 ATION
    so\n+00187050: 6170 5f73 736c 5f66 6c61 6773 2066 6c61 ap_ssl_flags fla\n+00187060: 6720 666f 7220 7365 7276 6572 7320 746f g for servers to\n+00187070: 2072 6571 7569 7265 2063 6c69 656e 7473 require clients\n+00187080: 2074 6f20 6175 7468 656e 7469 6361 7465 to authenticate\n+00187090: 2074 6f20 7365 7276 6572 7320 6475 7269 to servers duri\n+001870a0: 6e67 2074 6865 2048 5454 5053 2068 616e ng the HTTPS han\n+001870b0: 6473 682e 2e2e 3c2f 6469 763e 3c64 6976 dsh...
    <\n+001870d0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:585\n+001870f0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 4
    .

    This req\n+00187120: 7569 7265 7320 6561 6368 2063 6c69 656e uires each clien\n+00187130: 7420 746f 2061 7574 6865 6e74 6963 6174 t to authenticat\n+00187140: 6520 7769 7468 2069 7473 2063 6572 7469 e with its certi\n+00187150: 6669 6361 7465 2c20 696e 2061 6464 6974 ficate, in addit\n+00187160: 696f 6e20 666f 7220 7468 6520 7365 7276 ion for the serv\n+00187170: 6572 2074 6f20 6175 7468 656e 7469 6361 er to authentica\n+00187180: 7465 2074 6f20 7468 6520 636c 6965 6e74 te to the client\n+00187190: 2e3c 2f70 3e0a 3c70 3e53 696e 6365 2072 .

    .

    Since r\n+001871a0: 656c 6561 7365 2076 6572 7369 6f6e 2032 elease version 2\n+001871b0: 2e38 2e32 302c 2053 534c 2076 3320 6973 .8.20, SSL v3 is\n+001871c0: 2064 6973 6162 6c65 642e 2054 6f20 656e disabled. To en\n+001871d0: 6162 6c65 2053 534c 2076 3320 746f 6765 able SSL v3 toge\n+001871e0: 7468 6572 2077 6974 6820 544c 5320 312e ther with TLS 1.\n+001871f0: 3020 616e 6420 6869 6768 6572 2c20 7573 0 and higher, us\n+00187200: 6520 3c63 6f64 653e 2353 4f41 505f 5353 e #SOAP_SS\n+00187210: 4c76 335f 544c 5376 313c 2f63 6f64 653e Lv3_TLSv1\n+00187220: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with s\n+001872b0: 6f61 705f 7373 6c5f 7365 7276 6572 5f63 oap_ssl_server_c\n+001872c0: 6f6e 7465 7874 3c2f 613e 3c2f 636f 6465 ontext. To use TLS 1.\n+001872e0: 3120 616e 6420 312e 3220 7573 6520 3c63 1 and 1.2 use SOAP_TLSv1_1\n+00187300: 207c 2053 4f41 505f 544c 5376 315f 323c | SOAP_TLSv1_2<\n+00187310: 2f63 6f64 653e 2e20 546f 2075 7365 2054 /code>. To use T\n+00187320: 4c53 2031 2e32 206f 6e6c 7920 7573 6520 LS 1.2 only use \n+00187330: 3c63 6f64 653e 2353 4f41 505f 544c 5376 #SOAP_TLSv\n+00187340: 315f 323c 2f63 6f64 653e 2e20 546f 2075 1_2. To u\n+00187350: 7365 2053 534c 2076 3320 6f6e 6c79 2075 se SSL v3 only u\n+00187360: 7365 203c 636f 6465 3e23 534f 4150 5f53 se #SOAP_S\n+00187370: 534c 7633 3c2f 636f 6465 3e2e 3c2f 703e SLv3.

    \n+00187380: 0a3c 703e 5468 6520 3c63 6f64 653e 6361 .

    The ca\n+00187390: 6365 7274 3c2f 636f 6465 3e20 6669 6c65 cert file\n+001873a0: 2061 6e64 203c 636f 6465 3e63 6170 6174 and capat\n+001873b0: 683c 2f63 6f64 653e 2061 7265 206f 7074 h are opt\n+001873c0: 696f 6e61 6c2e 2045 6974 6865 7220 6f6e ional. Either on\n+001873d0: 6520 6361 6e20 6265 2073 7065 6369 6669 e can be specifi\n+001873e0: 6564 2077 6865 6e20 636c 6965 6e74 7320 ed when clients \n+001873f0: 6d75 7374 2072 756e 206f 6e20 6e6f 6e2d must run on non-\n+00187400: 7472 7573 7465 6420 7379 7374 656d 7320 trusted systems \n+00187410: 283c 636f 6465 3e63 6170 6174 683c 2f63 (capath is not used\n+00187430: 2077 6974 6820 474e 5554 4c53 292e 2057 with GNUTLS). W\n+00187440: 6520 7761 6e74 2074 6f20 6176 6f69 6420 e want to avoid \n+00187450: 7374 6f72 696e 6720 7472 7573 7465 6420 storing trusted \n+00187460: 6365 7274 6966 6963 6174 6573 2069 6e20 certificates in \n+00187470: 7468 6520 6465 6661 756c 7420 6c6f 6361 the default loca\n+00187480: 7469 6f6e 206f 6e20 7468 6520 6669 6c65 tion on the file\n+00187490: 2073 7973 7465 6d20 7768 656e 2074 6861 system when tha\n+001874a0: 7420 6973 206e 6f74 2073 6563 7572 652e t is not secure.\n+001874b0: 2054 6865 7265 666f 7265 2c20 6120 666c Therefore, a fl\n+001874c0: 6174 203c 656d 3e3c 636f 6465 3e63 6163 at cac\n+001874d0: 6572 742e 7065 6d3c 2f63 6f64 653e 3c2f ert.pem file or dire\n+001874f0: 6374 6f72 7920 6361 6e20 6265 2073 7065 ctory can be spe\n+00187500: 6369 6669 6564 2074 6f20 7374 6f72 6520 cified to store \n+00187510: 7472 7573 7465 6420 6365 7274 6966 6963 trusted certific\n+00187520: 6174 6573 2e3c 2f70 3e0a 3c70 3e54 6865 ates.

    .

    The\n+00187530: 2067 534f 4150 2070 6163 6b61 6765 2069 gSOAP package i\n+00187540: 6e63 6c75 6465 7320 6120 3c65 6d3e 3c63 ncludes a cacerts.pem<\n+00187560: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+00187570: 2077 6974 6820 7468 6520 6365 7274 6966 with the certif\n+00187580: 6963 6174 6573 206f 6620 616c 6c20 6365 icates of all ce\n+00187590: 7274 6966 6963 6174 6520 6175 7468 6f72 rtificate author\n+001875a0: 6974 6965 732e 2059 6f75 2063 616e 2075 ities. You can u\n+001875b0: 7365 2074 6869 7320 6669 6c65 2074 6f20 se this file to \n+001875c0: 7665 7269 6679 2074 6865 2061 7574 6865 verify the authe\n+001875d0: 6e74 6963 6174 696f 6e20 6f66 2073 6572 ntication of ser\n+001875e0: 7665 7273 2074 6861 7420 7072 6f76 6964 vers that provid\n+001875f0: 6520 6365 7274 6966 6963 6174 6573 2069 e certificates i\n+00187600: 7373 7565 6420 6279 2074 6865 7365 2043 ssued by these C\n+00187610: 4173 2e3c 2f70 3e0a 3c70 3e54 6865 203c As.

    .

    The <\n+00187620: 656d 3e3c 636f 6465 3e63 6163 6572 742e em>cacert.\n+00187630: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e2c pem,\n+00187640: 203c 656d 3e3c 636f 6465 3e63 6c69 656e clien\n+00187650: 742e 7065 6d3c 2f63 6f64 653e 3c2f 656d t.pem, and server.pem files in\n+00187690: 2074 6865 2067 534f 4150 2070 6163 6b61 the gSOAP packa\n+001876a0: 6765 2061 7265 2065 7861 6d70 6c65 7320 ge are examples \n+001876b0: 6f66 2073 656c 662d 7369 676e 6564 2063 of self-signed c\n+001876c0: 6572 7469 6669 6361 7465 732e 2054 6865 ertificates. The\n+001876d0: 203c 656d 3e3c 636f 6465 3e63 6c69 656e clien\n+001876e0: 742e 7065 6d3c 2f63 6f64 653e 3c2f 656d t.pem and \n+00187700: 7365 7276 6572 2e70 656d 3c2f 636f 6465 server.pem contain t\n+00187720: 6865 2063 6c69 656e 742f 7365 7276 6572 he client/server\n+00187730: 2070 7269 7661 7465 206b 6579 2063 6f6e private key con\n+00187740: 6361 7465 6e61 7465 6420 7769 7468 2074 catenated with t\n+00187750: 6865 2063 6572 7469 6669 6361 7465 2e20 he certificate. \n+00187760: 5468 6520 6b65 7966 696c 6573 2028 3c65 The keyfiles (client.p\n+00187780: 656d 3c2f 636f 6465 3e3c 2f65 6d3e 2061 em a\n+00187790: 6e64 203c 656d 3e3c 636f 6465 3e73 6572 nd ser\n+001877a0: 7665 722e 7065 6d3c 2f63 6f64 653e 3c2f ver.pem) are created\n+001877c0: 2062 7920 636f 6e63 6174 656e 6174 696e by concatenatin\n+001877d0: 6720 7468 6520 7072 6976 6174 6520 6b65 g the private ke\n+001877e0: 7920 5045 4d20 7769 7468 2074 6865 2063 y PEM with the c\n+001877f0: 6572 7469 6669 6361 7465 2050 454d 2e20 ertificate PEM. \n+00187800: 5468 6520 6b65 7966 696c 6520 7368 6f75 The keyfile shou\n+00187810: 6c64 206e 6f74 2062 6520 7368 6172 6564 ld not be shared\n+00187820: 2077 6974 6820 616e 7920 7061 7274 792e with any party.\n+00187830: 2057 6974 6820 4f70 656e 5353 4c2c 2079 With OpenSSL, y\n+00187840: 6f75 2063 616e 2065 6e63 7279 7074 2074 ou can encrypt t\n+00187850: 6865 206b 6579 6669 6c65 7320 7769 7468 he keyfiles with\n+00187860: 2061 2070 6173 7377 6f72 6420 746f 206f a password to o\n+00187870: 6666 6572 2073 6f6d 6520 7072 6f74 6563 ffer some protec\n+00187880: 7469 6f6e 2061 6e64 2074 6865 2070 6173 tion and the pas\n+00187890: 7377 6f72 6420 6973 2075 7365 6420 696e sword is used in\n+001878a0: 2074 6865 2063 6c69 656e 742f 7365 7276 the client/serv\n+001878b0: 6572 2063 6f64 6520 746f 2072 6561 6420 er code to read \n+001878c0: 7468 6520 6b65 7966 696c 652e 2047 4e55 the keyfile. GNU\n+001878d0: 544c 5320 646f 6573 206e 6f74 2073 7570 TLS does not sup\n+001878e0: 706f 7274 2074 6869 7320 6665 6174 7572 port this featur\n+001878f0: 6520 616e 6420 6361 6e6e 6f74 2065 6e63 e and cannot enc\n+00187900: 7279 7074 206f 7220 6465 6372 7970 7420 rypt or decrypt \n+00187910: 6120 6b65 7966 696c 652e 3c2f 703e 0a3c a keyfile.

    .<\n+00187920: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class=\"sectio\n+00187930: 6e20 7761 726e 696e 6722 3e3c 6474 3e57 n warning\">
    W\n+00187940: 6172 6e69 6e67 3c2f 6474 3e3c 6464 3e49 arning
    I\n+00187950: 7420 6973 2069 6d70 6f72 7461 6e74 2074 t is important t\n+00187960: 6861 7420 7468 6520 3c63 6f64 653e 2357 hat the #W\n+00187970: 4954 485f 4f50 454e 5353 4c3c 2f63 6f64 ITH_OPENSSL macro must be\n+00187990: 2063 6f6e 7369 7374 656e 746c 7920 6465 consistently de\n+001879a0: 6669 6e65 6420 746f 2063 6f6d 7069 6c65 fined to compile\n+001879b0: 2074 6865 2073 6f75 7263 6573 2c20 7375 the sources, su\n+001879c0: 6368 2061 7320 3c65 6d3e 3c63 6f64 653e ch as \n+001879d0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c\n+001879e0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pp, \n+001879f0: 3c65 6d3e 3c63 6f64 653e 736f 6170 432e soapC.\n+00187a00: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp,\n+00187a10: 203c 656d 3e3c 636f 6465 3e73 6f61 7043 soapC\n+00187a20: 6c69 656e 742e 6370 703c 2f63 6f64 653e lient.cpp\n+00187a30: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , soapServer.cpp<\n+00187a50: 2f63 6f64 653e 3c2f 656d 3e2c 2061 6e64 /code>, and\n+00187a60: 2061 6c6c 2061 7070 6c69 6361 7469 6f6e all application\n+00187a70: 2073 6f75 7263 6573 2074 6861 7420 696e sources that in\n+00187a80: 636c 7564 6520 3c65 6d3e 3c63 6f64 653e clude \n+00187a90: 6773 6f61 702f 7374 6473 6f61 7032 2e68 gsoap/stdsoap2.h\n+00187aa0: 3c2f 636f 6465 3e3c 2f65 6d3e 206f 7220 or \n+00187ab0: 3c65 6d3e 3c63 6f64 653e 736f 6170 482e soapH.\n+00187ac0: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2049 h. I\n+00187ad0: 6620 7468 6520 6d61 6372 6f73 2061 7265 f the macros are\n+00187ae0: 206e 6f74 2063 6f6e 7369 7374 656e 746c not consistentl\n+00187af0: 7920 7573 6564 2c20 7468 6520 6170 706c y used, the appl\n+00187b00: 6963 6174 696f 6e20 7769 6c6c 2063 7261 ication will cra\n+00187b10: 7368 2064 7565 2074 6f20 6120 6d69 736d sh due to a mism\n+00187b20: 6174 6368 6573 2069 6e20 7468 6520 6465 atches in the de\n+00187b30: 636c 6172 6174 696f 6e20 616e 6420 6163 claration and ac\n+00187b40: 6365 7373 206f 6620 7468 6520 3c63 6f64 cess of the so\n+00187ba0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n+00187bb0: 6e74 6578 742e 3c2f 6464 3e3c 2f64 6c3e ntext.
    \n+00187bc0: 0a3c 703e 5365 6520 616c 736f 2041 5049 .

    See also API\n+00187bd0: 2064 6f63 756d 656e 7461 7469 6f6e 204d documentation M\n+00187be0: 6f64 756c 6520 3c61 2063 6c61 7373 3d22 odule SSL/TLS contex\n+00187c20: 7420 616e 6420 6675 6e63 7469 6f6e 733c t and functions<\n+00187c30: 2f61 3e20 666f 7220 6d6f 7265 2064 6574 /a> for more det\n+00187c40: 6169 6c73 206f 6e20 7468 6520 5353 4c2f ails on the SSL/\n+00187c50: 544c 5320 6675 6e63 7469 6f6e 732e 3c2f TLS functions..

    .... Back to t\n+00187c80: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n+00187c90: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .Secure cl\n+00187cd0: 6965 6e74 7320 7769 7468 2048 5454 5053 ients with HTTPS\n+00187ce0: 3c2f 6832 3e0a 3c70 3e54 6f20 7574 696c

    .

    To util\n+00187cf0: 697a 6520 4854 5450 532f 5353 4c2c 2079 ize HTTPS/SSL, y\n+00187d00: 6f75 206e 6565 6420 746f 2069 6e73 7461 ou need to insta\n+00187d10: 6c6c 2074 6865 204f 7065 6e53 534c 206c ll the OpenSSL l\n+00187d20: 6962 7261 7279 206f 6e20 796f 7572 2070 ibrary on your p\n+00187d30: 6c61 7466 6f72 6d20 6f72 2047 4e55 544c latform or GNUTL\n+00187d40: 5320 666f 7220 6120 6c69 6768 742d 7765 S for a light-we\n+00187d50: 6967 6874 2053 534c 2f54 4c53 206c 6962 ight SSL/TLS lib\n+00187d60: 7261 7279 2e20 4166 7465 7220 696e 7374 rary. After inst\n+00187d70: 616c 6c61 7469 6f6e 2c20 636f 6d70 696c allation, compil\n+00187d80: 6520 616c 6c20 7468 6520 736f 7572 6365 e all the source\n+00187d90: 7320 6f66 2079 6f75 7220 6170 706c 6963 s of your applic\n+00187da0: 6174 696f 6e20 7769 7468 2063 6f6d 7069 ation with compi\n+00187db0: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_OPENSSL\n+00187dd0: 3c2f 636f 6465 3e20 286f 7220 3c63 6f64 (or #WITH_GNUTLS when using\n+00187e00: 2047 4e55 544c 5329 2e20 466f 7220 6578 GNUTLS). For ex\n+00187e10: 616d 706c 6520 6f6e 204c 696e 7578 3a20 ample on Linux: \n+00187e20: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     c++ -\n+00187e40: 4457 4954 485f 4f50 454e 5353 4c20 6d79  DWITH_OPENSSL my\n+00187e50: 636c 6965 6e74 2e63 7070 2073 7464 736f  client.cpp stdso\n+00187e60: 6170 2e63 7070 2073 6f61 7043 2e63 7070  ap.cpp soapC.cpp\n+00187e70: 2073 6f61 7043 6c69 656e 742e 6370 7020   soapClient.cpp \n+00187e80: 2d6c 7373 6c20 2d6c 6372 7970 746f 0a3c  -lssl -lcrypto.<\n+00187e90: 2f70 7265 3e3c 703e 206f 7220 556e 6978  /pre>

    or Unix\n+00187ea0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     c++\n+00187ec0: 202d 4457 4954 485f 4f50 454e 5353 4c20   -DWITH_OPENSSL \n+00187ed0: 6d79 636c 6965 6e74 2e63 7070 2073 7464  myclient.cpp std\n+00187ee0: 736f 6170 2e63 7070 2073 6f61 7043 2e63  soap.cpp soapC.c\n+00187ef0: 7070 2073 6f61 7043 6c69 656e 742e 6370  pp soapClient.cp\n+00187f00: 7020 2d6c 786e 6574 202d 6c73 6f63 6b65  p -lxnet -lsocke\n+00187f10: 7420 2d6c 6e73 6c20 2d6c 7373 6c20 2d6c  t -lnsl -lssl -l\n+00187f20: 6372 7970 746f 0a3c 2f70 7265 3e3c 703e  crypto.

    \n+00187f30: 206f 7220 796f 7520 6361 6e20 6164 6420 or you can add \n+00187f40: 7468 6520 666f 6c6c 6f77 696e 6720 6c69 the following li\n+00187f50: 6e65 2074 6f20 3c65 6d3e 3c63 6f64 653e ne to \n+00187f60: 736f 6170 6465 6673 2e68 3c2f 636f 6465 soapdefs.h:

    .
    #\n+00187fc0: 6465 6669 6e65 2057 4954 485f 4f50 454e define WITH_OPEN\n+00187fd0: 5353 4c3c 2f73 7061 6e3e 3c2f 6469 763e SSL
    \n+00187fe0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    and c\n+00188000: 6f6d 7069 6c65 2077 6974 6820 636f 6d70 ompile with comp\n+00188010: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_SOAPDE\n+00188030: 4653 5f48 3c2f 636f 6465 3e20 746f 2069 FS_H to i\n+00188040: 6e63 6c75 6465 203c 656d 3e3c 636f 6465 nclude soapdefs.h in your \n+00188070: 7072 6f6a 6563 742e 2041 6c74 6572 6e61 project. Alterna\n+00188080: 7469 7665 6c79 2c20 636f 6d70 696c 6520 tively, compile \n+00188090: 7769 7468 2047 4e55 544c 533a 203c 2f70 with GNUTLS:

     c++ -DWI\n+001880c0: 5448 5f47 4e55 544c 5320 6d79 636c 6965  TH_GNUTLS myclie\n+001880d0: 6e74 2e63 7070 2073 7464 736f 6170 2e63  nt.cpp stdsoap.c\n+001880e0: 7070 2073 6f61 7043 2e63 7070 2073 6f61  pp soapC.cpp soa\n+001880f0: 7043 6c69 656e 742e 6370 7020 2d6c 676e  pClient.cpp -lgn\n+00188100: 7574 6c73 202d 6c67 6372 7970 7420 2d6c  utls -lgcrypt -l\n+00188110: 6770 672d 6572 726f 720a 3c2f 7072 653e  gpg-error.
    \n+00188120: 3c70 3e41 2063 6c69 656e 7420 7072 6f67

    A client prog\n+00188130: 7261 6d20 7369 6d70 6c79 2075 7365 7320 ram simply uses \n+00188140: 7468 6520 7072 6566 6978 203c 656d 3e3c the prefix <\n+00188150: 636f 6465 3e68 7474 7073 3a3c 2f63 6f64 code>https: instead \n+00188170: 6f66 203c 656d 3e3c 636f 6465 3e68 7474 of htt\n+00188180: 703a 3c2f 636f 6465 3e3c 2f65 6d3e 2069 p: i\n+00188190: 6e20 7468 6520 656e 6470 6f69 6e74 2055 n the endpoint U\n+001881a0: 524c 206f 6620 6120 7365 7276 6963 6520 RL of a service \n+001881b0: 6f70 6572 6174 696f 6e20 6361 6c6c 2074 operation call t\n+001881c0: 6f20 6120 5765 6220 5365 7276 6963 6520 o a Web Service \n+001881d0: 746f 2075 7365 2065 6e63 7279 7074 6564 to use encrypted\n+001881e0: 2074 7261 6e73 6665 7273 2028 6966 2074 transfers (if t\n+001881f0: 6865 2073 6572 7669 6365 2073 7570 706f he service suppo\n+00188200: 7274 7320 4854 5450 5329 2e20 596f 7520 rts HTTPS). You \n+00188210: 6e65 6564 2074 6f20 7370 6563 6966 7920 need to specify \n+00188220: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n+00188230: 6b65 7920 6669 6c65 2061 6e64 2070 6173 key file and pas\n+00188240: 7377 6f72 6420 6f66 2074 6865 206b 6579 sword of the key\n+00188250: 6669 6c65 3a3c 2f70 3e0a 3c64 6976 2063 file:

    .
    \n+00188270: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n+00188320: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00188330: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00188340: 705f 5f73 736c 2e68 746d 6c23 6761 3537 p__ssl.html#ga57\n+00188350: 3062 3236 3261 6339 6435 3566 6335 3039 0b262ac9d55fc509\n+00188360: 6631 6635 3939 3964 6561 6131 3866 223e f1f5999deaa18f\">\n+00188370: 736f 6170 5f73 736c 5f69 6e69 743c 2f61 soap_ssl_init(); /* in\n+001883a0: 6974 204f 7065 6e53 534c 2028 736b 6970 it OpenSSL (skip\n+001883b0: 7069 6e67 2074 6869 7320 6f72 2063 616c ping this or cal\n+001883c0: 6c69 6e67 206d 756c 7469 706c 6520 7469 ling multiple ti\n+001883d0: 6d65 7320 6973 204f 4b2c 2073 696e 6365 mes is OK, since\n+001883e0: 2074 6865 2065 6e67 696e 6520 7769 6c6c the engine will\n+001883f0: 2069 6e69 7420 5353 4c20 6175 746f 6d61 init SSL automa\n+00188400: 7469 6361 6c6c 7929 202a 2f3c 2f73 7061 tically) */
    .
    /* soap_ssl_noi\n+00188450: 6e69 7428 293b 202a 2f3c 2f73 7061 6e3e nit(); */\n+00188460: 203c 7370 616e 2063 6c61 7373 3d22 636f /* do not\n+00188480: 2069 6e69 7420 4f70 656e 5353 4c20 2869 init OpenSSL (i\n+00188490: 6620 5353 4c20 6973 2061 6c72 6561 6479 f SSL is already\n+001884a0: 2069 6e69 7469 616c 697a 6564 2065 6c73 initialized els\n+001884b0: 6577 6865 7265 2069 6e20 7468 6973 2061 ewhere in this a\n+001884c0: 7070 6c69 6361 7469 6f6e 2920 2a2f 3c2f pplication) */
    .soap_init\n+00188550: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00188580: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n+001885a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_ssl_c\n+00188620: 6c69 656e 745f 636f 6e74 6578 743c 2f61 lient_context(&so\n+00188660: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
    .<\n+00188670: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00188680: 3e20 203c 6120 636c 6173 733d 2263 6f64 > SOAP_SSL_DEF\n+001886e0: 4155 4c54 3c2f 613e 2c20 3c2f 6469 763e AULT,
    \n+001886f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    "client.pe\n+00188730: 6d26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 m", \n+00188740: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n+00188760: 6b65 7966 696c 653a 2072 6571 7569 7265 keyfile: require\n+00188770: 6420 6f6e 6c79 2077 6865 6e20 636c 6965 d only when clie\n+00188780: 6e74 206d 7573 7420 6175 7468 656e 7469 nt must authenti\n+00188790: 6361 7465 2074 6f20 7365 7276 6572 2028 cate to server (\n+001887a0: 7365 6520 5353 4c20 646f 6373 206f 6e20 see SSL docs on \n+001887b0: 686f 7720 746f 206f 6274 6169 6e20 7468 how to obtain th\n+001887c0: 6973 2066 696c 6529 202a 2f3c 2f73 7061 is file) */
    .
    "\n+00188810: 7061 7373 776f 7264 2671 756f 743b 3c2f password", \n+00188830: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* passwor\n+00188850: 6420 746f 2072 6561 6420 7468 6520 6b65 d to read the ke\n+00188860: 7920 6669 6c65 2028 6e6f 7420 7573 6564 y file (not used\n+00188870: 2077 6974 6820 474e 5554 4c53 2920 2a2f with GNUTLS) */\n+00188880: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+00188890: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001888a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > &\n+001888c0: 7175 6f74 3b63 6163 6572 7473 2e70 656d quot;cacerts.pem\n+001888d0: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n+001888e0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* ca\n+00188900: 6365 7274 2066 696c 6520 746f 2073 746f cert file to sto\n+00188910: 7265 2074 7275 7374 6564 2063 6572 7469 re trusted certi\n+00188920: 6669 6361 7465 7320 286e 6565 6465 6420 ficates (needed \n+00188930: 746f 2076 6572 6966 7920 7365 7276 6572 to verify server\n+00188940: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    NULL, \n+00188970: 2020 2020 2020 2020 2020 2020 3c73 7061 /* capath to d\n+001889a0: 6972 6563 746f 7279 2077 6974 6820 7472 irectory with tr\n+001889b0: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat\n+001889c0: 6573 202a 2f3c 2f73 7061 6e3e 203c 2f64 es */ .
    NULL \n+001889f0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* if\n+00188a10: 2072 616e 6466 696c 6521 3d4e 554c 4c3a randfile!=NULL:\n+00188a20: 2075 7365 2061 2066 696c 6520 7769 7468 use a file with\n+00188a30: 2072 616e 646f 6d20 6461 7461 2074 6f20 random data to \n+00188a40: 7365 6564 2072 616e 646f 6d6e 6573 7320 seed randomness \n+00188a50: 2a2f 3c2f 7370 616e 3e20 203c 2f64 6976 */ .
    ))
    .\n+00188a90: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..
    ex\n+00188b70: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE)\n+00188b80: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } ..<\n+00188c90: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00188ca0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+00188cb0: 705f 5f73 736c 5f68 746d 6c5f 6761 3236 p__ssl_html_ga26\n+00188cc0: 3963 3737 3332 6231 6364 6139 6463 3739 9c7732b1cda9dc79\n+00188cd0: 6462 3038 6663 6266 3164 3534 3338 223e db08fcbf1d5438\">\n+00188ce0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+00188e20: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Initialize th\n+00188e40: 6520 636c 6965 6e74 2d73 6964 6520 5353 e client-side SS\n+00188e50: 4c2f 544c 5320 636f 6e74 6578 742e 3c2f L/TLS context.
    .This also assum\n-0018adb0: 6573 2074 6861 7420 7468 6520 7365 7276 es that the serv\n-0018adc0: 6572 2064 6f65 7320 6e6f 7420 7265 7175 er does not requ\n-0018add0: 6972 6520 636c 6965 6e74 7320 746f 2061 ire clients to a\n-0018ade0: 7574 6865 6e74 6963 6174 6520 2874 6865 uthenticate (the\n-0018adf0: 206b 6579 6669 6c65 2069 7320 6162 7365 keyfile is abse\n-0018ae00: 6e74 292e 3c2f 703e 0a3c 703e 4d61 6b65 nt).

    .

    Make\n-0018ae10: 2073 7572 6520 796f 7520 6861 7665 2073 sure you have s\n-0018ae20: 6967 6e61 6c20 6861 6e64 6c65 7273 2073 ignal handlers s\n-0018ae30: 6574 2069 6e20 796f 7572 2061 7070 6c69 et in your appli\n-0018ae40: 6361 7469 6f6e 2074 6f20 6361 7463 6820 cation to catch \n-0018ae50: 6272 6f6b 656e 2063 6f6e 6e65 6374 696f broken connectio\n-0018ae60: 6e73 2028 3c63 6f64 653e 5349 4750 4950 ns (SIGPIP\n-0018ae70: 453c 2f63 6f64 653e 293a 3c2f 703e 0a3c E):

    .<\n-0018ae80: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-0018ae90: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    signal(SI\n-0018aeb0: 4750 4950 452c 2073 6967 7069 7065 5f68 GPIPE, sigpipe_h\n-0018aec0: 616e 646c 6529 3b3c 2f64 6976 3e0a 3c2f andle);
    .

    where, f\n-0018aef0: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n-0018af00: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    void si\n-0018af50: 6770 6970 655f 6861 6e64 6c65 283c 7370 gpipe_handle(int x) { }
    .<\n-0018af90: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>
    Warning
    It is impo\n-0018afe0: 7274 616e 7420 7468 6174 2074 6865 203c rtant that the <\n-0018aff0: 636f 6465 3e23 5749 5448 5f4f 5045 4e53 code>#WITH_OPENS\n-0018b000: 534c 3c2f 636f 6465 3e20 6d61 6372 6f20 SL macro \n-0018b010: 6973 2063 6f6e 7369 7374 656e 746c 7920 is consistently \n-0018b020: 6465 6669 6e65 6420 746f 2063 6f6d 7069 defined to compi\n-0018b030: 6c65 2074 6865 2073 6f75 7263 6573 2c20 le the sources, \n-0018b040: 7375 6368 2061 7320 3c65 6d3e 3c63 6f64 such as gsoap/stdsoap2\n-0018b060: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-0018b070: 2c20 3c65 6d3e 3c63 6f64 653e 736f 6170 , soap\n-0018b080: 432e 6370 703c 2f63 6f64 653e 3c2f 656d C.cpp, soa\n-0018b0a0: 7043 6c69 656e 742e 6370 703c 2f63 6f64 pClient.cpp, soapServer.cp\n-0018b0d0: 703c 2f63 6f64 653e 3c2f 656d 3e2c 2061 p, a\n-0018b0e0: 6e64 2061 6c6c 2061 7070 6c69 6361 7469 nd all applicati\n-0018b0f0: 6f6e 2073 6f75 7263 6573 2074 6861 7420 on sources that \n-0018b100: 696e 636c 7564 6520 3c65 6d3e 3c63 6f64 include gsoap/stdsoap2\n-0018b120: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 206f .h o\n-0018b130: 7220 3c65 6d3e 3c63 6f64 653e 736f 6170 r soap\n-0018b140: 482e 683c 2f63 6f64 653e 3c2f 656d 3e2e H.h.\n-0018b150: 2049 6620 7468 6520 6d61 6372 6f73 2061 If the macros a\n-0018b160: 7265 206e 6f74 2063 6f6e 7369 7374 656e re not consisten\n-0018b170: 746c 7920 7573 6564 2c20 7468 6520 6170 tly used, the ap\n-0018b180: 706c 6963 6174 696f 6e20 7769 6c6c 2063 plication will c\n-0018b190: 7261 7368 2064 7565 2074 6f20 6120 6d69 rash due to a mi\n-0018b1a0: 736d 6174 6368 6573 2069 6e20 7468 6520 smatches in the \n-0018b1b0: 6465 636c 6172 6174 696f 6e20 616e 6420 declaration and \n-0018b1c0: 6163 6365 7373 206f 6620 7468 6520 3c63 access of the \n-0018b220: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n-0018b230: 636f 6e74 6578 742e 2041 6c74 6572 6e61 context. Alterna\n-0018b240: 7469 7665 6c79 2c20 7573 6520 6c69 6272 tively, use libr\n-0018b250: 6172 7920 3c62 3e3c 636f 6465 3e2d 6c67 ary -lg\n-0018b260: 736f 6170 7373 6c3c 2f63 6f64 653e 3c2f soapssl or -\n-0018b280: 6c67 736f 6170 7373 6c2b 2b3c 2f63 6f64 lgsoapssl++ and compi\n-0018b2a0: 6c65 2065 7665 7279 7468 696e 6720 656c le everything el\n-0018b2b0: 7365 2077 6974 6820 3c63 6f64 653e 2357 se with #W\n-0018b2c0: 4954 485f 4f50 454e 5353 4c3c 2f63 6f64 ITH_OPENSSL.
    .
    .Co\n-0018b2e0: 6e63 7572 7265 6e74 2063 6c69 656e 7420 ncurrent client \n-0018b2f0: 6361 6c6c 7320 7769 7468 2074 6872 6561 calls with threa\n-0018b300: 6473 2073 686f 756c 6420 7573 6520 7365 ds should use se\n-0018b310: 7061 7261 7465 203c 636f 6465 3e3c 6120 parate soap context\n-0018b380: 7320 496e 2061 6464 6974 696f 6e2c 2074 s In addition, t\n-0018b390: 6865 2074 6872 6561 6420 696e 6974 6961 he thread initia\n-0018b3a0: 6c69 7a61 7469 6f6e 2063 6f64 6520 6469 lization code di\n-0018b3b0: 7363 7573 7365 6420 696e 2053 6563 7469 scussed in Secti\n-0018b3c0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Secure Web serv\n-0018b400: 6963 6573 2077 6974 6820 4854 5450 533c ices with HTTPS<\n-0018b410: 2f61 3e20 6d75 7374 2062 6520 7573 6564 /a> must be used\n-0018b420: 2074 6f20 7072 6f70 6572 6c79 2073 6574 to properly set\n-0018b430: 7570 204f 7065 6e53 534c 2069 6e20 6120 up OpenSSL in a \n-0018b440: 6d75 6c74 692d 7468 7265 6164 6564 2063 multi-threaded c\n-0018b450: 6c69 656e 7420 6170 706c 6963 6174 696f lient applicatio\n-0018b460: 6e2e 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e n.
    .

    \n-0018b470: 5365 6520 616c 736f 2041 5049 2064 6f63 See also API doc\n-0018b480: 756d 656e 7461 7469 6f6e 204d 6f64 756c umentation Modul\n-0018b490: 6520 3c61 2063 6c61 7373 3d22 656c 2220 e SS\n-0018b4c0: 4c2f 544c 5320 636f 6e74 6578 7420 616e L/TLS context an\n-0018b4d0: 6420 6675 6e63 7469 6f6e 733c 2f61 3e20 d functions \n-0018b4e0: 666f 7220 6d6f 7265 2064 6574 6169 6c73 for more details\n-0018b4f0: 206f 6e20 7468 6520 5353 4c2f 544c 5320 on the SSL/TLS \n-0018b500: 6675 6e63 7469 6f6e 732e 3c2f 703e 0a3c functions.

    .<\n-0018b510: 703e 596f 7520 6361 6e20 616c 736f 2075 p>You can also u\n-0018b520: 7365 2074 6865 2057 696e 496e 6574 2069 se the WinInet i\n-0018b530: 6e74 6572 6661 6365 2074 6f20 6573 7461 nterface to esta\n-0018b540: 626c 6973 6820 7365 6375 7265 2048 5454 blish secure HTT\n-0018b550: 5053 2063 6f6e 6e65 6374 696f 6e73 206f PS connections o\n-0018b560: 6e20 5769 6e64 6f77 7320 6d61 6368 696e n Windows machin\n-0018b570: 6573 2c20 6176 6169 6c61 626c 6520 696e es, available in\n-0018b580: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n-0018b590: 736f 6170 2f6d 6f64 5f67 736f 6170 3c2f soap/mod_gsoap direc\n-0018b5b0: 746f 7279 206f 6620 7468 6520 6753 4f41 tory of the gSOA\n-0018b5c0: 5020 736f 7572 6365 2063 6f64 6520 7061 P source code pa\n-0018b5d0: 636b 6167 652c 2073 6565 2061 6c73 6f20 ckage, see also \n-0018b5e0: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section The WinIne\n-0018b620: 7420 706c 7567 696e 3c2f 613e 2e20 4f72 t plugin. Or\n-0018b630: 2079 6f75 2063 616e 2075 7365 2074 6865 you can use the\n-0018b640: 2043 5552 4c20 706c 7567 696e 2074 6f20 CURL plugin to \n-0018b650: 7573 6520 4355 524c 2074 6f20 6573 7461 use CURL to esta\n-0018b660: 626c 6973 6820 7365 6375 7265 2048 5454 blish secure HTT\n-0018b670: 5053 2063 6f6e 6e65 6374 696f 6e73 2c20 PS connections, \n-0018b680: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section The CURL \n-0018b6c0: 706c 7567 696e 3c2f 613e 2e3c 2f70 3e0a plugin.

    .\n-0018b6d0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n-0018b6f0: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    \n-0018b740: 0a53 534c 2061 7574 6865 6e74 6963 6174 .SSL authenticat\n-0018b750: 696f 6e20 6361 6c6c 6261 636b 733c 2f68 ion callbacks.

    The \n-0018b770: 6673 736c 6175 7468 3c2f 636f 6465 3e20 fsslauth \n-0018b780: 6361 6c6c 6261 636b 2066 756e 6374 696f callback functio\n-0018b790: 6e20 636f 6e74 726f 6c73 204f 7065 6e53 n controls OpenS\n-0018b7a0: 534c 2f47 4e55 544c 5320 6175 7468 656e SL/GNUTLS authen\n-0018b7b0: 7469 6361 7469 6f6e 2069 6e69 7469 616c tication initial\n-0018b7c0: 697a 6174 696f 6e3a 3c2f 703e 0a3c 756c ization:

    ..
  • int \n-0018b7e0: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::\n-0018b870: 6673 736c 6175 7468 3c2f 613e 2928 7374 fsslauth)(st\n-0018b880: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n-0018b890: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal\n-0018b8a0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-0018b8b0: 746f 2069 6e69 7469 616c 697a 6520 7468 to initialize th\n-0018b8c0: 6520 4f70 656e 5353 4c20 6f72 2047 4e55 e OpenSSL or GNU\n-0018b8d0: 544c 5320 636f 6e74 6578 7420 666f 7220 TLS context for \n-0018b8e0: 4854 5450 5320 636f 6e6e 6563 7469 6f6e HTTPS connection\n-0018b8f0: 7320 636f 6e66 6967 7572 6564 2077 6974 s configured wit\n-0018b900: 6820 7468 6520 7061 7261 6d65 7465 7273 h the parameters\n-0018b910: 2070 6173 7365 6420 746f 203c 636f 6465 passed to soap_ssl_cli\n-0018b9b0: 656e 745f 636f 6e74 6578 743c 2f61 3e3c ent_context<\n-0018b9c0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_ssl_ser\n-0018ba60: 7665 725f 636f 6e74 6578 743c 2f61 3e3c ver_context<\n-0018ba70: 2f63 6f64 653e 2e20 5265 7475 726e 7320 /code>. Returns \n-0018ba80: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n-0018bb70: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n-0018bb80: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-0018bb90: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap\n-0018bc30: 3a3a 6673 736c 6175 7468 3c2f 613e 3c2f ::fsslauth is s\n-0018bc50: 736c 5f61 7574 685f 696e 6974 3c2f 636f sl_auth_init.
  • ..\n-0018bc70: 3c70 3e54 6865 203c 636f 6465 3e66 7373

    The fss\n-0018bc80: 6c76 6572 6966 793c 2f63 6f64 653e 2063 lverify c\n-0018bc90: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function\n-0018bca0: 2063 6f6e 7472 6f6c 7320 4f70 656e 5353 controls OpenSS\n-0018bcb0: 4c20 7065 6572 2063 6572 7469 6669 6361 L peer certifica\n-0018bcc0: 7465 2076 6572 6966 6963 6174 696f 6e2c te verification,\n-0018bcd0: 2076 6961 2069 6e74 6572 6e61 6c6c 7920 via internally \n-0018bce0: 696e 766f 6b69 6e67 203c 636f 6465 3e53 invoking S\n-0018bcf0: 534c 5f43 5458 5f73 6574 5f76 6572 6966 SL_CTX_set_verif\n-0018bd00: 793c 2f63 6f64 653e 3a3c 2f70 3e0a 3c75 y:

    ..
  • int\n-0018bd20: 2028 736f 6170 3a3a 6673 7376 6572 6966 (soap::fssverif\n-0018bd30: 7929 2869 6e74 206f 6b2c 2058 3530 395f y)(int ok, X509_\n-0018bd40: 5354 4f52 455f 4354 5820 2a73 746f 7265 STORE_CTX *store\n-0018bd50: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal\n-0018bd60: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-0018bd70: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n-0018bd80: 206d 616e 6167 6520 7468 6520 7665 7269 manage the veri\n-0018bd90: 6669 6361 7469 6f6e 206f 6620 7468 6520 fication of the \n-0018bda0: 6365 7274 6966 6963 6174 6520 7072 6f76 certificate prov\n-0018bdb0: 6964 6564 2062 7920 6120 7065 6572 2c20 ided by a peer, \n-0018bdc0: 7375 6368 2061 7320 7468 6520 6365 7274 such as the cert\n-0018bdd0: 6966 6963 6174 6520 7072 6f76 6964 6564 ificate provided\n-0018bde0: 2062 7920 6120 7365 7276 6572 2063 6f6e by a server con\n-0018bdf0: 6e65 6374 6564 206f 7665 7220 4854 5450 nected over HTTP\n-0018be00: 5320 6f72 2074 6f20 7665 7269 6679 2074 S or to verify t\n-0018be10: 6865 2063 6572 7469 6669 6361 7465 2069 he certificate i\n-0018be20: 6e63 6c75 6465 6420 7769 7468 2061 2057 ncluded with a W\n-0018be30: 532d 5365 6375 7269 7479 206d 6573 7361 S-Security messa\n-0018be40: 6765 2e20 546f 2072 6571 7569 7265 2063 ge. To require c\n-0018be50: 6572 7469 6669 6361 7465 2076 6572 6966 ertificate verif\n-0018be60: 6963 6174 696f 6e20 6f66 2061 2073 6572 ication of a ser\n-0018be70: 7665 7220 636f 6e6e 6563 7465 6420 7669 ver connected vi\n-0018be80: 6120 4854 5450 532c 2075 7365 203c 636f a HTTPS, use soap_ssl_c\n-0018bf20: 6c69 656e 745f 636f 6e74 6578 743c 2f61 lient_context with #SOAP_SSL_RE\n-0018bf50: 5155 4952 455f 5345 5256 4552 5f41 5554 QUIRE_SERVER_AUT\n-0018bf60: 4845 4e54 4943 4154 494f 4e3c 2f63 6f64 HENTICATION. To require c\n-0018bf80: 6572 7469 6669 6361 7465 2076 6572 6966 ertificate verif\n-0018bf90: 6963 6174 696f 6e20 6f66 2061 2063 6c69 ication of a cli\n-0018bfa0: 656e 7420 636f 6e6e 6563 7465 6420 746f ent connected to\n-0018bfb0: 2061 2073 6572 7665 722c 2075 7365 203c a server, use <\n-0018bfc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl\n-0018c050: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context<\n-0018c060: 2f61 3e3c 2f63 6f64 653e 2077 6974 6820 /a> with \n-0018c070: 3c63 6f64 653e 2353 4f41 505f 5353 4c5f #SOAP_SSL_\n-0018c080: 5245 5155 4952 455f 434c 4945 4e54 5f41 REQUIRE_CLIENT_A\n-0018c090: 5554 4845 4e54 4943 4154 494f 4e3c 2f63 UTHENTICATION. The \n-0018c0b0: 6f6b 3c2f 636f 6465 3e20 7061 7261 6d65 ok parame\n-0018c0c0: 7465 7220 6f66 2074 6869 7320 6361 6c6c ter of this call\n-0018c0d0: 6261 636b 2069 6e64 6963 6174 6573 2077 back indicates w\n-0018c0e0: 6865 7468 6572 2074 6865 2076 6572 6966 hether the verif\n-0018c0f0: 6963 6174 696f 6e20 6f66 2074 6865 2063 ication of the c\n-0018c100: 6572 7469 6669 6361 7465 2069 6e20 7175 ertificate in qu\n-0018c110: 6573 7469 6f6e 2070 6173 7365 6420 283c estion passed (<\n-0018c120: 636f 6465 3e6f 6b3c 2f63 6f64 653e 203d code>ok =\n-0018c130: 3d20 3129 206f 7220 6661 696c 6564 2028 = 1) or failed (\n-0018c140: 3c63 6f64 653e 6f6b 3c2f 636f 6465 3e20 ok \n-0018c150: 3d3d 2030 2920 6173 2064 6574 6572 6d69 == 0) as determi\n-0018c160: 6e65 6420 6279 2074 6865 204f 7065 6e53 ned by the OpenS\n-0018c170: 534c 206c 6962 7261 7279 2062 6173 6564 SL library based\n-0018c180: 206f 6e20 7468 6520 3c63 6f64 653e 3c61 on the soap_ssl_client\n-0018c220: 5f63 6f6e 7465 7874 3c2f 613e 3c2f 636f _context or \n-0018c2c0: 736f 6170 5f73 736c 5f73 6572 7665 725f soap_ssl_server_\n-0018c2d0: 636f 6e74 6578 743c 2f61 3e3c 2f63 6f64 context configuration\n-0018c2f0: 2e20 4966 2074 6865 2063 616c 6c62 6163 . If the callbac\n-0018c300: 6b20 7265 7475 726e 7320 3120 7468 656e k returns 1 then\n-0018c310: 2074 6865 2068 616e 6473 6861 6b65 2069 the handshake i\n-0018c320: 7320 636f 6e74 696e 7565 6420 616e 6420 s continued and \n-0018c330: 7468 6520 636f 6e6e 6563 7469 6f6e 206d the connection m\n-0018c340: 6179 6265 2065 7374 6162 6c69 7368 6564 aybe established\n-0018c350: 2e20 546f 2072 6574 7572 6e20 3120 7768 . To return 1 wh\n-0018c360: 656e 203c 636f 6465 3e6f 6b3c 2f63 6f64 en ok == 0 requires\n-0018c380: 2072 6573 6574 7469 6e67 2074 6865 2065 resetting the e\n-0018c390: 7272 6f72 2073 7461 7465 2077 6974 6820 rror state with \n-0018c3a0: 3c63 6f64 653e 5835 3039 5f53 544f 5245 X509_STORE\n-0018c3b0: 5f43 5458 5f73 6574 5f65 7272 6f72 2873 _CTX_set_error(s\n-0018c3c0: 746f 7265 2c20 5835 3039 5f56 5f4f 4b29 tore, X509_V_OK)\n-0018c3d0: 3c2f 636f 6465 3e2e 2049 6620 7468 6520 . If the \n-0018c3e0: 6361 6c6c 6261 636b 2072 6574 7572 6e73 callback returns\n-0018c3f0: 2030 2074 6865 6e20 7468 6520 6861 6e64 0 then the hand\n-0018c400: 7368 616b 6520 6973 2069 6d6d 6564 6961 shake is immedia\n-0018c410: 7465 6c79 2074 6572 6d69 6e61 7465 6420 tely terminated \n-0018c420: 7769 7468 2022 7665 7269 6669 6361 7469 with \"verificati\n-0018c430: 6f6e 2066 6169 6c65 6422 2061 6e64 2061 on failed\" and a\n-0018c440: 2076 6572 6966 6963 6174 696f 6e20 6661 verification fa\n-0018c450: 696c 7572 6520 616c 6572 7420 6973 2073 ilure alert is s\n-0018c460: 656e 7420 746f 2074 6865 2070 6565 722e ent to the peer.\n-0018c470: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n-0018c480: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n-0018c490: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::fsslv\n-0018c560: 6572 6966 793c 2f61 3e3c 2f63 6f64 653e erify\n-0018c570: 2069 7320 3c63 6f64 653e 7373 6c5f 7665 is ssl_ve\n-0018c580: 7269 6679 5f63 616c 6c62 6163 6b3c 2f63 rify_callback or when #SOAP_SSL_ALL\n-0018c5b0: 4f57 5f45 5850 4952 4544 5f43 4552 5449 OW_EXPIRED_CERTI\n-0018c5c0: 4649 4341 5445 3c2f 636f 6465 3e20 6973 FICATE is\n-0018c5d0: 2075 7365 6420 3c63 6f64 653e 7373 6c5f used ssl_\n-0018c5e0: 7665 7269 6679 5f63 616c 6c62 6163 6b5f verify_callback_\n-0018c5f0: 616c 6c6f 775f 6578 7069 7265 645f 6365 allow_expired_ce\n-0018c600: 7274 6966 6963 6174 653c 2f63 6f64 653e rtificate\n-0018c610: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
  • ..

    \n-0018c620: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n-0018c640: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .SSL certi\n-0018c680: 6669 6361 7465 7320 616e 6420 6b65 7920 ficates and key \n-0018c690: 6669 6c65 733c 2f68 323e 0a3c 703e 5468 files

    .

    Th\n-0018c6a0: 6520 6753 4f41 5020 7061 636b 6167 6520 e gSOAP package \n-0018c6b0: 696e 636c 7564 6573 2061 203c 656d 3e3c includes a <\n-0018c6c0: 636f 6465 3e63 6163 6572 7473 2e70 656d code>cacerts.pem\n-0018c6d0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n-0018c6e0: 6520 7769 7468 2074 6865 2063 6572 7469 e with the certi\n-0018c6f0: 6669 6361 7465 7320 6f66 2061 6c6c 2063 ficates of all c\n-0018c700: 6572 7469 6669 6361 7465 2061 7574 686f ertificate autho\n-0018c710: 7269 7469 6573 2e20 596f 7520 6361 6e20 rities. You can \n-0018c720: 7573 6520 7468 6973 2066 696c 6520 746f use this file to\n-0018c730: 2076 6572 6966 7920 7468 6520 6175 7468 verify the auth\n-0018c740: 656e 7469 6361 7469 6f6e 206f 6620 7365 entication of se\n-0018c750: 7276 6572 7320 7468 6174 2070 726f 7669 rvers that provi\n-0018c760: 6465 2063 6572 7469 6669 6361 7465 7320 de certificates \n-0018c770: 6973 7375 6564 2062 7920 7468 6573 6520 issued by these \n-0018c780: 4341 732e 204a 7573 7420 7365 7420 7468 CAs. Just set th\n-0018c790: 6520 3c63 6f64 653e 6361 6669 6c65 3c2f e cafile parameter \n-0018c7b0: 746f 2074 6865 206c 6f63 6174 696f 6e20 to the location \n-0018c7c0: 6f66 2074 6869 7320 6669 6c65 206f 6e20 of this file on \n-0018c7d0: 796f 7572 2066 696c 6520 7379 7374 656d your file system\n-0018c7e0: 2e20 5468 6572 6566 6f72 652c 2077 6865 . Therefore, whe\n-0018c7f0: 6e20 796f 7520 6f62 7461 696e 2061 2063 n you obtain a c\n-0018c800: 6572 7469 6669 6361 7465 2073 6967 6e65 ertificate signe\n-0018c810: 6420 6279 2061 2074 7275 7374 6564 2043 d by a trusted C\n-0018c820: 4120 796f 7520 6361 6e20 7369 6d70 6c79 A you can simply\n-0018c830: 2075 7365 2074 6865 203c 656d 3e3c 636f use the cacerts.pem file \n-0018c860: 746f 2064 6576 656c 6f70 2063 6c69 656e to develop clien\n-0018c870: 7420 6170 706c 6963 6174 696f 6e73 2074 t applications t\n-0018c880: 6861 7420 6361 6e20 7665 7269 6679 2074 hat can verify t\n-0018c890: 6865 2061 7574 6865 6e74 6963 6974 7920 he authenticity \n-0018c8a0: 6f66 2079 6f75 7220 7365 7276 6572 2e3c of your server.<\n-0018c8b0: 2f70 3e0a 3c70 3e41 6c74 6572 6e61 7469 /p>.

    Alternati\n-0018c8c0: 7665 6c79 2c20 796f 7520 6361 6e20 7573 vely, you can us\n-0018c8d0: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the \n-0018c8e0: 6773 6f61 702f 706c 7567 696e 2f63 6163 gsoap/plugin/cac\n-0018c8f0: 6572 7473 2e68 3c2f 636f 6465 3e3c 2f65 erts.h and gsoap/plugin/ca\n-0018c920: 6365 7274 732e 633c 2f63 6f64 653e 3c2f certs.c code to embe\n-0018c940: 6420 4341 2063 6572 7469 6669 6361 7465 d CA certificate\n-0018c950: 7320 696e 2079 6f75 7220 636c 6965 6e74 s in your client\n-0018c960: 2063 6f64 652e 3c2f 703e 0a3c 703e 466f code.

    .

    Fo\n-0018c970: 7220 7379 7374 656d 7320 6261 7365 6420 r systems based \n-0018c980: 6f6e 204d 6963 726f 736f 6674 2077 696e on Microsoft win\n-0018c990: 646f 7773 2c20 7468 6520 5769 6e49 6e65 dows, the WinIne\n-0018c9a0: 7420 6d6f 6475 6c65 2063 616e 2062 6520 t module can be \n-0018c9b0: 7573 6564 2069 6e73 7465 6164 2c20 7365 used instead, se\n-0018c9c0: 6520 7468 6520 3c63 6f64 653e 5245 4144 e the READ\n-0018c9d0: 4d45 2e74 7874 3c2f 636f 6465 3e20 6c6f ME.txt lo\n-0018c9e0: 6361 7465 6420 696e 2074 6865 2067 534f cated in the gSO\n-0018c9f0: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p\n-0018ca00: 6163 6b61 6765 2075 6e64 6572 203c 636f ackage under mod_gsoap/gso\n-0018ca20: 6170 5f77 696e 2f77 696e 696e 6574 3c2f ap_win/wininet, see the g\n-0018ca40: 534f 4150 203c 6120 6872 6566 3d22 2e2e SOAP Win\n-0018ca70: 496e 6574 2070 6c75 6769 6e3c 2f61 3e20 Inet plugin \n-0018ca80: 646f 6375 6d65 6e74 6174 696f 6e2e 3c2f documentation..

    The other \n-0018caa0: 3c65 6d3e 3c63 6f64 653e 2e70 656d 3c2f .pem files\n-0018cac0: 2069 6e20 7468 6520 6753 4f41 5020 7061 in the gSOAP pa\n-0018cad0: 636b 6167 6520 6172 6520 6578 616d 706c ckage are exampl\n-0018cae0: 6573 206f 6620 7365 6c66 2d73 6967 6e65 es of self-signe\n-0018caf0: 6420 6365 7274 6966 6963 6174 6573 2066 d certificates f\n-0018cb00: 6f72 2074 6573 7469 6e67 2070 7572 706f or testing purpo\n-0018cb10: 7365 7320 283c 656d 3e3c 636f 6465 3e63 ses (c\n-0018cb20: 6163 6572 742e 7065 6d3c 2f63 6f64 653e acert.pem\n-0018cb30: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , client.pem, server.pem). The \n-0018cb80: 3c65 6d3e 3c63 6f64 653e 636c 6965 6e74 client\n-0018cb90: 2e70 656d 3c2f 636f 6465 3e3c 2f65 6d3e .pem\n-0018cba0: 2061 6e64 203c 656d 3e3c 636f 6465 3e73 and s\n-0018cbb0: 6572 7665 722e 7065 6d3c 2f63 6f64 653e erver.pem\n-0018cbc0: 3c2f 656d 3e20 636f 6e74 6169 6e20 7468 contain th\n-0018cbd0: 6520 7072 6976 6174 6520 6b65 7920 616e e private key an\n-0018cbe0: 6420 6365 7274 6966 6963 6174 6520 6f66 d certificate of\n-0018cbf0: 2074 6865 2063 6c69 656e 7420 6f72 2073 the client or s\n-0018cc00: 6572 7665 722c 2072 6573 7065 6374 6976 erver, respectiv\n-0018cc10: 656c 792e 2054 6865 206b 6579 6669 6c65 ely. The keyfile\n-0018cc20: 7320 283c 656d 3e3c 636f 6465 3e63 6c69 s (cli\n-0018cc30: 656e 742e 7065 6d3c 2f63 6f64 653e 3c2f ent.pem and server.pem) are cr\n-0018cc70: 6561 7465 6420 6279 2063 6f6e 6361 7465 eated by concate\n-0018cc80: 6e61 7469 6e67 2074 6865 2070 7269 7661 nating the priva\n-0018cc90: 7465 206b 6579 2050 454d 2077 6974 6820 te key PEM with \n-0018cca0: 7468 6520 6365 7274 6966 6963 6174 6520 the certificate \n-0018ccb0: 5045 4d2e 2054 6865 206b 6579 6669 6c65 PEM. The keyfile\n-0018ccc0: 2073 686f 756c 6420 6e6f 7420 6265 2073 should not be s\n-0018ccd0: 6861 7265 6420 7769 7468 2061 6e79 2070 hared with any p\n-0018cce0: 6172 7479 2e20 5769 7468 204f 7065 6e53 arty. With OpenS\n-0018ccf0: 534c 2c20 796f 7520 6361 6e20 656e 6372 SL, you can encr\n-0018cd00: 7970 7420 7468 6520 6b65 7966 696c 6573 ypt the keyfiles\n-0018cd10: 2077 6974 6820 6120 7061 7373 776f 7264 with a password\n-0018cd20: 2074 6f20 6f66 6665 7220 736f 6d65 2070 to offer some p\n-0018cd30: 726f 7465 6374 696f 6e20 616e 6420 7468 rotection and th\n-0018cd40: 6520 7061 7373 776f 7264 2069 7320 7573 e password is us\n-0018cd50: 6564 2069 6e20 7468 6520 636c 6965 6e74 ed in the client\n-0018cd60: 2f73 6572 7665 7220 636f 6465 2074 6f20 /server code to \n-0018cd70: 7265 6164 2074 6865 206b 6579 6669 6c65 read the keyfile\n-0018cd80: 2e20 474e 5554 4c53 2064 6f65 7320 6e6f . GNUTLS does no\n-0018cd90: 7420 7375 7070 6f72 7420 7468 6973 2066 t support this f\n-0018cda0: 6561 7475 7265 2061 6e64 2063 616e 6e6f eature and canno\n-0018cdb0: 7420 656e 6372 7970 7420 6f72 2064 6563 t encrypt or dec\n-0018cdc0: 7279 7074 2061 206b 6579 6669 6c65 2e3c rypt a keyfile.<\n-0018cdd0: 2f70 3e0a 3c70 3e59 6f75 2063 616e 2061 /p>.

    You can a\n-0018cde0: 6c73 6f20 6372 6561 7465 2079 6f75 7220 lso create your \n-0018cdf0: 6f77 6e20 7365 6c66 2d73 6967 6e65 6420 own self-signed \n-0018ce00: 6365 7274 6966 6963 6174 6573 2e20 5468 certificates. Th\n-0018ce10: 6572 6520 6973 206d 6f72 6520 7468 616e ere is more than\n-0018ce20: 206f 6e65 2077 6179 2074 6f20 6765 6e65 one way to gene\n-0018ce30: 7261 7465 2074 6865 206e 6563 6573 7361 rate the necessa\n-0018ce40: 7279 2066 696c 6573 2066 6f72 2063 6c69 ry files for cli\n-0018ce50: 656e 7473 2061 6e64 2073 6572 7665 7273 ents and servers\n-0018ce60: 2e20 5365 6520 3c61 2068 7265 663d 2268 . See http://ww\n-0018ce90: 772e 6f70 656e 7373 6c2e 6f72 673c 2f61 w.openssl.org for informatio\n-0018ceb0: 6e20 6f6e 204f 7065 6e53 534c 2061 6e64 n on OpenSSL and\n-0018cec0: 203c 6120 6872 6566 3d22 6874 7470 3a2f htt\n-0018cef0: 703a 2f2f 7369 616c 2e6f 7267 2f68 6f77 p://sial.org/how\n-0018cf00: 746f 2f6f 7065 6e73 736c 2f63 612f 3c2f to/openssl/ca/ on how to set\n-0018cf20: 7570 2061 6e64 206d 616e 6167 6520 6120 up and manage a \n-0018cf30: 6c6f 6361 6c20 4341 2061 6e64 203c 6120 local CA and http://sial.org\n-0018cf80: 2f68 6f77 746f 2f6f 7065 6e73 736c 2f73 /howto/openssl/s\n-0018cf90: 656c 662d 7369 676e 6564 3c2f 613e 206f elf-signed o\n-0018cfa0: 6e20 686f 7720 746f 2073 6574 7570 2073 n how to setup s\n-0018cfb0: 656c 662d 7369 676e 6564 2074 6573 7420 elf-signed test \n-0018cfc0: 6365 7274 6966 6963 6174 6573 2e3c 2f70 certificates..

    It is possi\n-0018cfe0: 626c 6520 746f 2063 6f6e 7665 7274 2049 ble to convert I\n-0018cff0: 4953 2d67 656e 6572 6174 6564 2063 6572 IS-generated cer\n-0018d000: 7469 6669 6361 7465 7320 746f 2050 454d tificates to PEM\n-0018d010: 2066 6f72 6d61 7420 7769 7468 2074 6865 format with the\n-0018d020: 206f 7065 6e73 736c 206c 6962 7261 7279 openssl library\n-0018d030: 2061 6e64 206f 7065 6e73 736c 2063 6f6d and openssl com\n-0018d040: 6d61 6e64 2d6c 696e 6520 746f 6f6c 3a20 mand-line tool: \n-0018d050: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

    openss\n-0018d070: 6c20 7835 3039 202d 696e 206d 7963 6572  l x509 -in mycer\n-0018d080: 742e 6365 7220 2d69 6e66 6f72 6d20 4445  t.cer -inform DE\n-0018d090: 5220 2d6f 7574 206d 7963 6572 742e 7065  R -out mycert.pe\n-0018d0a0: 6d20 2d6f 7574 666f 726d 2050 454d 0a3c  m -outform PEM.<\n-0018d0b0: 2f70 7265 3e3c 703e 2054 6869 7320 636f  /pre>

    This co\n-0018d0c0: 6e76 6572 7473 2074 6865 2043 5254 2d66 nverts the CRT-f\n-0018d0d0: 6f72 6d61 7474 6564 206d 7963 6572 742e ormatted mycert.\n-0018d0e0: 6365 7220 746f 2050 454d 2d66 6f72 6d61 cer to PEM-forma\n-0018d0f0: 7474 6564 206d 7963 6572 742e 7065 6d2e tted mycert.pem.\n-0018d100: 3c2f 703e 0a3c 703e 4865 7265 2069 7320

    .

    Here is \n-0018d110: 7468 6520 7369 6d70 6c65 7374 2077 6179 the simplest way\n-0018d120: 2074 6f20 7365 7475 7020 7365 6c66 2d73 to setup self-s\n-0018d130: 6967 6e65 6420 6365 7274 6966 6963 6174 igned certificat\n-0018d140: 6573 2e20 4669 7273 7420 796f 7520 6e65 es. First you ne\n-0018d150: 6564 2074 6f20 6372 6561 7465 2061 2070 ed to create a p\n-0018d160: 7269 7661 7465 2043 6572 7469 6669 6361 rivate Certifica\n-0018d170: 7465 2041 7574 686f 7269 7479 2028 4341 te Authority (CA\n-0018d180: 292e 2054 6865 2043 4120 6973 2075 7365 ). The CA is use\n-0018d190: 6420 696e 2053 534c 2074 6f20 7665 7269 d in SSL to veri\n-0018d1a0: 6679 2074 6865 2061 7574 6865 6e74 6963 fy the authentic\n-0018d1b0: 6974 7920 6f66 2061 2067 6976 656e 2063 ity of a given c\n-0018d1c0: 6572 7469 6669 6361 7465 2e20 5468 6520 ertificate. The \n-0018d1d0: 4341 2061 6374 7320 6173 2061 2074 7275 CA acts as a tru\n-0018d1e0: 7374 6564 2074 6869 7264 2070 6172 7479 sted third party\n-0018d1f0: 2077 686f 2068 6173 2061 7574 6865 6e74 who has authent\n-0018d200: 6963 6174 6564 2074 6865 2075 7365 7220 icated the user \n-0018d210: 6f66 2074 6865 2073 6967 6e65 6420 6365 of the signed ce\n-0018d220: 7274 6966 6963 6174 6520 6173 2062 6569 rtificate as bei\n-0018d230: 6e67 2077 686f 2074 6865 7920 7361 792e ng who they say.\n-0018d240: 2054 6865 2063 6572 7469 6669 6361 7465 The certificate\n-0018d250: 2069 7320 7369 676e 6564 2062 7920 7468 is signed by th\n-0018d260: 6520 4341 2c20 616e 6420 6966 2074 6865 e CA, and if the\n-0018d270: 2063 6c69 656e 7420 7472 7573 7473 2074 client trusts t\n-0018d280: 6865 2043 412c 2069 7420 7769 6c6c 2074 he CA, it will t\n-0018d290: 7275 7374 2079 6f75 7220 6365 7274 6966 rust your certif\n-0018d2a0: 6963 6174 652e 2046 6f72 2075 7365 2077 icate. For use w\n-0018d2b0: 6974 6869 6e20 796f 7572 206f 7267 616e ithin your organ\n-0018d2c0: 697a 6174 696f 6e2c 2061 2070 7269 7661 ization, a priva\n-0018d2d0: 7465 2043 4120 7769 6c6c 2070 726f 6261 te CA will proba\n-0018d2e0: 626c 7920 7365 7276 6520 796f 7572 206e bly serve your n\n-0018d2f0: 6565 6473 2e20 486f 7765 7665 722c 2069 eeds. However, i\n-0018d300: 6620 796f 7520 696e 7465 6e64 2075 7365 f you intend use\n-0018d310: 2079 6f75 7220 6365 7274 6966 6963 6174 your certificat\n-0018d320: 6573 2066 6f72 2061 2070 7562 6c69 6320 es for a public \n-0018d330: 7365 7276 6963 652c 2079 6f75 2073 686f service, you sho\n-0018d340: 756c 6420 7072 6f62 6162 6c79 206f 6274 uld probably obt\n-0018d350: 6169 6e20 6120 6365 7274 6966 6963 6174 ain a certificat\n-0018d360: 6520 6672 6f6d 2061 206b 6e6f 776e 2043 e from a known C\n-0018d370: 412e 2049 6e20 6164 6469 7469 6f6e 2074 A. In addition t\n-0018d380: 6f20 6964 656e 7469 6669 6361 7469 6f6e o identification\n-0018d390: 2c20 796f 7572 2063 6572 7469 6669 6361 , your certifica\n-0018d3a0: 7465 2069 7320 616c 736f 2075 7365 6420 te is also used \n-0018d3b0: 666f 7220 656e 6372 7970 7469 6f6e 2e3c for encryption.<\n-0018d3c0: 2f70 3e0a 3c70 3e43 7265 6174 696e 6720 /p>.

    Creating \n-0018d3d0: 6365 7274 6966 6963 6174 6573 2073 686f certificates sho\n-0018d3e0: 756c 6420 6265 2064 6f6e 6520 7468 726f uld be done thro\n-0018d3f0: 7567 6820 6120 4341 2074 6f20 6f62 7461 ugh a CA to obta\n-0018d400: 696e 2073 6967 6e65 6420 6365 7274 6966 in signed certif\n-0018d410: 6963 6174 6573 2e20 4275 7420 796f 7520 icates. But you \n-0018d420: 6361 6e20 6372 6561 7465 2079 6f75 7220 can create your \n-0018d430: 6f77 6e20 6365 7274 6966 6963 6174 6573 own certificates\n-0018d440: 2066 6f72 2074 6573 7469 6e67 2070 7572 for testing pur\n-0018d450: 706f 7365 7320 6173 2066 6f6c 6c6f 7773 poses as follows\n-0018d460: 2e3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e47 .

    .
      .
    • G\n-0018d470: 6f20 746f 2074 6865 204f 7065 6e53 534c o to the OpenSSL\n-0018d480: 2062 696e 2064 6972 6563 746f 7279 2028 bin directory (\n-0018d490: 3c63 6f64 653e 2f75 7372 2f6c 6f63 616c /usr/local\n-0018d4a0: 2f73 736c 3c2f 636f 6465 3e20 6279 2064 /ssl by d\n-0018d4b0: 6566 6175 6c74 2061 6e64 203c 636f 6465 efault and /System/Library\n-0018d4d0: 2f4f 7065 6e53 534c 3c2f 636f 6465 3e20 /OpenSSL \n-0018d4e0: 6f6e 204d 6163 204f 5320 5829 3c2f 6c69 on Mac OS X).
    • There shou\n-0018d500: 6c64 2062 6520 6120 6669 6c65 2063 616c ld be a file cal\n-0018d510: 6c65 6420 6f70 656e 7373 6c2e 636e 663c led openssl.cnf<\n-0018d520: 2f6c 693e 0a3c 6c69 3e43 7265 6174 6520 /li>.
    • Create \n-0018d530: 6120 6e65 7720 6469 7265 6374 6f72 7920 a new directory \n-0018d540: 696e 2079 6f75 7220 686f 6d65 2061 6363 in your home acc\n-0018d550: 6f75 6e74 2c20 652e 672e 2024 484f 4d45 ount, e.g. $HOME\n-0018d560: 2f43 412c 2061 6e64 2063 6f70 7920 7468 /CA, and copy th\n-0018d570: 6520 6f70 656e 7373 6c2e 636e 6620 6669 e openssl.cnf fi\n-0018d580: 6c65 2074 6f20 7468 6973 2064 6972 6563 le to this direc\n-0018d590: 746f 7279 3c2f 6c69 3e0a 3c6c 693e 4d6f tory
    • .
    • Mo\n-0018d5a0: 6469 6679 206f 7065 6e73 736c 2e63 6e66 dify openssl.cnf\n-0018d5b0: 2062 7920 6368 616e 6769 6e67 2074 6865 by changing the\n-0018d5c0: 2027 6469 7227 2076 616c 7565 2074 6f20 'dir' value to \n-0018d5d0: 484f 4d45 2f43 413c 2f6c 693e 0a3c 6c69 HOME/CA
    • .Copy the README\n-0018d5f0: 2e74 7874 2c20 726f 6f74 2e73 682c 2061 .txt, root.sh, a\n-0018d600: 6e64 2063 6572 742e 7368 2073 6372 6970 nd cert.sh scrip\n-0018d610: 7473 2066 726f 6d20 7468 6520 6753 4f41 ts from the gSOA\n-0018d620: 5020 736f 7572 6365 2063 6f64 6520 7061 P source code pa\n-0018d630: 636b 6167 6520 6c6f 6361 7465 6420 696e ckage located in\n-0018d640: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n-0018d650: 736f 6170 2f73 616d 706c 6573 2f73 736c soap/samples/ssl\n-0018d660: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir\n-0018d670: 6563 746f 7279 2074 6f20 484f 4d45 2f43 ectory to HOME/C\n-0018d680: 413c 2f6c 693e 0a3c 6c69 3e46 6f6c 6c6f A.
    • Follo\n-0018d690: 7720 7468 6520 5245 4144 4d45 2e74 7874 w the README.txt\n-0018d6a0: 2069 6e73 7472 7563 7469 6f6e 733c 2f6c instructions.
    .

    You \n-0018d6c0: 6e6f 7720 6861 7665 2061 2073 656c 662d now have a self-\n-0018d6d0: 7369 676e 6564 2043 4120 726f 6f74 2063 signed CA root c\n-0018d6e0: 6572 7469 6669 6361 7465 2063 6163 6572 ertificate cacer\n-0018d6f0: 742e 7065 6d20 616e 6420 6120 7365 7276 t.pem and a serv\n-0018d700: 6572 2e70 656d 2028 6f72 2063 6c69 656e er.pem (or clien\n-0018d710: 742e 7065 6d29 2063 6572 7469 6669 6361 t.pem) certifica\n-0018d720: 7465 2069 6e20 5045 4d20 666f 726d 6174 te in PEM format\n-0018d730: 2e20 5468 6520 6361 6365 7274 2e70 656d . The cacert.pem\n-0018d740: 2063 6572 7469 6669 6361 7465 2069 7320 certificate is \n-0018d750: 7573 6564 2069 6e20 7468 6520 3c63 6f64 used in the cafile \n-0018d770: 7061 7261 6d65 7465 7220 6f66 2074 6865 parameter of the\n-0018d780: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_s\n-0018d810: 736c 5f63 6c69 656e 745f 636f 6e74 6578 sl_client_contex\n-0018d820: 743c 2f61 3e3c 2f63 6f64 653e 2028 6f72 t (or\n-0018d830: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_s\n-0018d8c0: 736c 5f73 6572 7665 725f 636f 6e74 6578 sl_server_contex\n-0018d8d0: 743c 2f61 3e3c 2f63 6f64 653e 2920 6174 t) at\n-0018d8e0: 2074 6865 2063 6c69 656e 7420 286f 7220 the client (or \n-0018d8f0: 7365 7276 6572 2920 7369 6465 2074 6f20 server) side to \n-0018d900: 7665 7269 6679 2074 6865 2061 7574 6865 verify the authe\n-0018d910: 6e74 6963 6974 7920 6f66 2074 6865 2070 nticity of the p\n-0018d920: 6565 722e 2059 6f75 2063 616e 2061 6c73 eer. You can als\n-0018d930: 6f20 7072 6f76 6964 6520 6120 6361 7061 o provide a capa\n-0018d940: 7468 2070 6172 616d 6574 6572 2074 6f20 th parameter to \n-0018d950: 7468 6573 6520 7472 7573 7465 6420 6365 these trusted ce\n-0018d960: 7274 6966 6963 6174 6573 2e20 5468 6520 rtificates. The \n-0018d970: 7365 7276 6572 2e70 656d 2028 6f72 2063 server.pem (or c\n-0018d980: 6c69 656e 742e 7065 6d29 206d 7573 7420 lient.pem) must \n-0018d990: 6265 2070 726f 7669 6465 6420 7769 7468 be provided with\n-0018d9a0: 2074 6865 203c 636f 6465 3e3c 6120 636c the so\n-0018da30: 6170 5f73 736c 5f73 6572 7665 725f 636f ap_ssl_server_co\n-0018da40: 6e74 6578 743c 2f61 3e3c 2f63 6f64 653e ntext\n-0018da50: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s\n-0018da60: 6964 6520 286f 7220 3c63 6f64 653e 3c61 ide (or soap_ssl_client\n-0018db00: 5f63 6f6e 7465 7874 3c2f 613e 3c2f 636f _context at the clien\n-0018db20: 7420 7369 6465 2920 746f 6765 7468 6572 t side) together\n-0018db30: 2077 6974 6820 7468 6520 7061 7373 776f with the passwo\n-0018db40: 7264 2079 6f75 2065 6e74 6572 6564 2077 rd you entered w\n-0018db50: 6865 6e20 6765 6e65 7261 7469 6e67 2074 hen generating t\n-0018db60: 6865 2063 6572 7469 6669 6361 7465 2075 he certificate u\n-0018db70: 7369 6e67 2063 6572 742e 7368 2074 6f20 sing cert.sh to \n-0018db80: 6163 6365 7373 2074 6865 2066 696c 652e access the file.\n-0018db90: 2054 6865 7365 2063 6572 7469 6669 6361 These certifica\n-0018dba0: 7465 7320 6d75 7374 2062 6520 7072 6573 tes must be pres\n-0018dbb0: 656e 7420 746f 2067 7261 6e74 2061 7574 ent to grant aut\n-0018dbc0: 6865 6e74 6963 6174 696f 6e20 7265 7175 hentication requ\n-0018dbd0: 6573 7473 2062 7920 7065 6572 732e 2049 ests by peers. I\n-0018dbe0: 6e20 6164 6469 7469 6f6e 2c20 7468 6520 n addition, the \n-0018dbf0: 7365 7276 6572 2e70 656d 2028 616e 6420 server.pem (and \n-0018dc00: 636c 6965 6e74 2e70 656d 2920 696e 636c client.pem) incl\n-0018dc10: 7564 6520 7468 6520 686f 7374 206e 616d ude the host nam\n-0018dc20: 6520 6f66 2074 6865 206d 6163 6869 6e65 e of the machine\n-0018dc30: 206f 6e20 7768 6963 6820 7468 6520 6170 on which the ap\n-0018dc40: 706c 6963 6174 696f 6e20 7275 6e73 2028 plication runs (\n-0018dc50: 652e 672e 206c 6f63 616c 686f 7374 292c e.g. localhost),\n-0018dc60: 2073 6f20 796f 7520 6e65 6564 2074 6f20 so you need to \n-0018dc70: 6765 6e65 7261 7465 206e 6577 2063 6572 generate new cer\n-0018dc80: 7469 6669 6361 7465 7320 7768 656e 206d tificates when m\n-0018dc90: 6967 7261 7469 6e67 2061 2073 6572 7665 igrating a serve\n-0018dca0: 7220 286f 7220 636c 6965 6e74 292e 3c2f r (or client)..

    Finally, y\n-0018dcc0: 6f75 206e 6565 6420 746f 2067 656e 6572 ou need to gener\n-0018dcd0: 6174 6520 4469 6666 6965 2d48 656c 6d61 ate Diffie-Helma\n-0018dce0: 6e6e 2028 4448 2920 7061 7261 6d65 7465 nn (DH) paramete\n-0018dcf0: 7273 2066 6f72 2074 6865 2073 6572 7665 rs for the serve\n-0018dd00: 7220 6966 2079 6f75 2077 6973 6820 746f r if you wish to\n-0018dd10: 2075 7365 2044 4820 696e 7374 6561 6420 use DH instead \n-0018dd20: 6f66 2052 5341 2e20 5468 6572 6520 6172 of RSA. There ar\n-0018dd30: 6520 7477 6f20 6f70 7469 6f6e 733a 3c2f e two options:.

      .
    • Set \n-0018dd50: 7468 6520 3c63 6f64 653e 6468 6669 6c65 the dhfile\n-0018dd60: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n-0018dd70: 7220 746f 2074 6865 206e 756d 6572 6963 r to the numeric\n-0018dd80: 2044 4820 7072 696d 6520 6c65 6e67 7468 DH prime length\n-0018dd90: 2069 6e20 6269 7473 2072 6571 7569 7265 in bits require\n-0018dda0: 6420 2866 6f72 2065 7861 6d70 6c65 2022 d (for example \"\n-0018ddb0: 3130 3234 2229 2074 6f20 6c65 7420 7468 1024\") to let th\n-0018ddc0: 6520 656e 6769 6e65 2067 656e 6572 6174 e engine generat\n-0018ddd0: 6520 4448 2070 6172 616d 6574 6572 7320 e DH parameters \n-0018dde0: 6174 2069 6e69 7469 616c 697a 6174 696f at initializatio\n-0018ddf0: 6e2e 2054 6869 7320 6361 6e20 6265 2074 n. This can be t\n-0018de00: 696d 6520 636f 6e73 756d 696e 672e 3c2f ime consuming..
    • Provide \n-0018de20: 6120 6669 6c65 206e 616d 6520 666f 7220 a file name for \n-0018de30: 7468 6520 3c63 6f64 653e 6468 6669 6c65 the dhfile\n-0018de40: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n-0018de50: 7220 6f66 203c 636f 6465 3e3c 6120 636c r of so\n-0018dee0: 6170 5f73 736c 5f73 6572 7665 725f 636f ap_ssl_server_co\n-0018def0: 6e74 6578 743c 2f61 3e3c 2f63 6f64 653e ntext\n-0018df00: 2e20 5468 6520 6669 6c65 2073 686f 756c . The file shoul\n-0018df10: 6420 6265 2067 656e 6572 6174 6564 2062 d be generated b\n-0018df20: 6566 6f72 6568 616e 642e 2054 6f20 646f eforehand. To do\n-0018df30: 2073 6f20 7769 7468 2074 6865 204f 7065 so with the Ope\n-0018df40: 6e53 534c 2063 6f6d 6d61 6e64 206c 696e nSSL command lin\n-0018df50: 6520 746f 6f6c 2c20 7573 653a 203c 7072 e tool, use: openssl dhpa\n-0018df80: 7261 6d20 2d6f 7574 666f 726d 2050 454d ram -outform PEM\n-0018df90: 202d 6f75 7420 6468 2e70 656d 2035 3132 -out dh.pem 512\n-0018dfa0: 0a3c 2f70 7265 3e20 4669 6c65 203c 656d .
    File dh512.pem\n-0018dfc0: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 7320 is \n-0018dfd0: 7468 6520 6f75 7470 7574 2066 696c 6520 the output file \n-0018dfe0: 616e 6420 3531 3220 6973 2074 6865 206e and 512 is the n\n-0018dff0: 756d 6265 7220 6f66 2062 6974 7320 7573 umber of bits us\n-0018e000: 6564 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c ed...<\n-0018e010: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-0018e030: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-0018e040: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .SSL h\n-0018e070: 6172 6477 6172 6520 6163 6365 6c65 7261 ardware accelera\n-0018e080: 7469 6f6e 3c2f 6832 3e0a 3c70 3e59 6f75 tion

    .

    You\n-0018e090: 2063 616e 2073 7065 6369 6679 2061 2068 can specify a h\n-0018e0a0: 6172 6477 6172 6520 656e 6769 6e65 2074 ardware engine t\n-0018e0b0: 6f20 656e 6162 6c65 2068 6172 6477 6172 o enable hardwar\n-0018e0c0: 6520 7375 7070 6f72 7420 666f 7220 6372 e support for cr\n-0018e0d0: 7970 746f 6772 6170 6869 6320 6163 6365 yptographic acce\n-0018e0e0: 6c65 7261 7469 6f6e 2e20 5468 6973 2063 leration. This c\n-0018e0f0: 616e 2062 6520 646f 6e65 206f 6e63 6520 an be done once \n-0018e100: 696e 2061 2073 6572 7665 7220 6f72 2063 in a server or c\n-0018e110: 6c69 656e 7420 7769 7468 2074 6865 2066 lient with the f\n-0018e120: 6f6c 6c6f 7769 6e67 2073 7461 7465 6d65 ollowing stateme\n-0018e130: 6e74 733a 3c2f 703e 0a3c 6469 7620 636c nts:

    .
    <\n-0018e150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0018e160: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static const\n-0018e1a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *e\n-0018e1d0: 6e67 696e 6520 3d20 3c73 7061 6e20 636c ngine = "cswift\n-0018e200: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-0018e210: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0018e220: 656e 7422 3e2f 2a20 656e 6769 6e65 206e ent\">/* engine n\n-0018e230: 616d 6520 2a2f 3c2f 7370 616e 3e20 3c2f ame */ .
    int main\n-0018e280: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
    .
    {.
    ENGINE *\n-0018e2c0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    if (!(e = ENGINE_\n-0018e310: 6279 5f69 6428 656e 6769 6e65 2929 2920 by_id(engine))) \n-0018e320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    fpr\n-0018e340: 696e 7466 2873 7464 6572 722c 203c 7370 intf(stderr, "E\n-0018e370: 7272 6f72 2066 696e 6469 6e67 2065 6e67 rror finding eng\n-0018e380: 696e 6520 2573 5c6e 2671 756f 743b 3c2f ine %s\\n", engine); \n-0018e3a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else\n-0018e3e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!ENGINE_se\n-0018e410: 745f 6465 6661 756c 7428 652c 2045 4e47 t_default(e, ENG\n-0018e420: 494e 455f 4d45 5448 4f44 5f41 4c4c 2929 INE_METHOD_ALL))\n-0018e430: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    fp\n-0018e450: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, "\n-0018e480: 4572 726f 7220 7573 696e 6720 656e 6769 Error using engi\n-0018e490: 6e65 2025 735c 6e26 7175 6f74 3b3c 2f73 ne %s\\n", engine); <\n-0018e4b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    }
    .

    The foll\n-0018e530: 6f77 696e 6720 7461 626c 6520 6c69 7374 owing table list\n-0018e540: 7320 7468 6520 6e61 6d65 7320 6f66 2074 s the names of t\n-0018e550: 6865 2068 6172 6477 6172 6520 616e 6420 he hardware and \n-0018e560: 736f 6674 7761 7265 2065 6e67 696e 6573 software engines\n-0018e570: 3a3c 2f70 3e0a 3c74 6162 6c65 2063 6c61 :

    .

    type property\n+00153180: 2020 203c 2f74 683e 3c74 6820 636c 6173 value \n+001531b0: 2020 203c 2f74 683e 3c2f 7472 3e0a 3c74
    text d\n+00153250: 6573 6372 6962 696e 6720 7468 6520 7363 escribing the sc\n+00153260: 6865 6d61 2074 7970 6520 2020 203c 2f74 hema type
    type \n+001532d0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 an alias \n+00153300: 666f 7220 7468 6520 3c63 6f64 653e 7479 for the ty\n+00153310: 7065 2d64 6f63 756d 656e 7461 7469 6f6e pe-documentation\n+00153320: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property\n+00153330: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c2f
    ......O\n-0018e770: 7065 6e42 5344 2073 7570 706f 7274 7320 penBSD supports \n-0018e780: 6b65 726e 656c 206c 6576 656c 2063 7279 kernel level cry\n-0018e790: 7074 6f67 7261 7068 7920 2020 203c 2f74 ptography ..........\n-0018eb10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....<\n-0018ec00: 636f 6465 3e73 7572 6577 6172 653c 2f63 code>sureware ..

    .... Back to t\n-0018ec90: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-0018eca0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .\n-0018ecd0: 5353 4c20 6f6e 2057 696e 646f 7773 3c2f SSL on Windows.

    Set the f\n-0018ecf0: 756c 6c20 7061 7468 2074 6f20 3c65 6d3e ull path to \n-0018ed00: 3c63 6f64 653e 6c69 6273 736c 2e6c 6962 libssl.lib\n-0018ed10: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-0018ed20: 203c 656d 3e3c 636f 6465 3e6c 6962 6372 libcr\n-0018ed30: 7970 746f 2e6c 6962 3c2f 636f 6465 3e3c ypto.lib<\n-0018ed40: 2f65 6d3e 2075 6e64 6572 2074 6865 204d /em> under the M\n-0018ed50: 5356 432b 2b20 2250 726f 6a65 6374 7322 SVC++ \"Projects\"\n-0018ed60: 206d 656e 752c 2074 6865 6e20 6368 6f6f menu, then choo\n-0018ed70: 7365 2022 4c69 6e6b 223a 2022 4f62 6a65 se \"Link\": \"Obje\n-0018ed80: 6374 2f4d 6f64 756c 6573 222e 2050 6c65 ct/Modules\". Ple\n-0018ed90: 6173 6520 6d61 6b65 2073 7572 6520 3c65 ase make sure libssl32\n-0018edb0: 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e .dll\n-0018edc0: 2061 6e64 203c 656d 3e3c 636f 6465 3e6c and l\n-0018edd0: 6962 6561 7933 322e 646c 6c3c 2f63 6f64 ibeay32.dll can be l\n-0018edf0: 6f61 6465 6420 6279 2079 6f75 7220 6170 oaded by your ap\n-0018ee00: 706c 6963 6174 696f 6e73 2c20 7468 7573 plications, thus\n-0018ee10: 2074 6865 7920 6d75 7374 2062 6520 696e they must be in\n-0018ee20: 7374 616c 6c65 6420 7072 6f70 6572 6c79 stalled properly\n-0018ee30: 206f 6e20 7468 6520 7461 7267 6574 206d on the target m\n-0018ee40: 6163 6869 6e65 2e3c 2f70 3e0a 3c70 3e49 achine.

    .

    I\n-0018ee50: 6620 796f 7527 7265 2075 7369 6e67 2063 f you're using c\n-0018ee60: 6f6d 7069 6c61 7469 6f6e 2073 6574 7469 ompilation setti\n-0018ee70: 6e67 7320 7375 6368 2061 7320 3c63 6f64 ngs such as /MTd th\n-0018ee90: 656e 206c 696e 6b20 746f 2074 6865 2063 en link to the c\n-0018eea0: 6f72 7265 6374 203c 656d 3e3c 636f 6465 orrect libeay32MTd.lib\n-0018eec0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-0018eed0: 203c 656d 3e3c 636f 6465 3e73 736c 6561 sslea\n-0018eee0: 7933 324d 5464 2e6c 6962 3c2f 636f 6465 y32MTd.lib libraries\n-0018ef00: 2e3c 2f70 3e0a 3c70 3e41 6c74 6572 6e61 .

    .

    Alterna\n-0018ef10: 7469 7665 6c79 2c20 796f 7520 6361 6e20 tively, you can \n-0018ef20: 7573 6520 7468 6520 5769 6e49 6e65 7420 use the WinInet \n-0018ef30: 696e 7465 7266 6163 6520 666f 7220 7365 interface for se\n-0018ef40: 6375 7265 2063 6f6e 6e65 6374 696f 6e73 cure connections\n-0018ef50: 2c20 6176 6169 6c61 626c 6520 696e 2074 , available in t\n-0018ef60: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso\n-0018ef70: 6170 2f6d 6f64 5f67 736f 6170 3c2f 636f ap/mod_gsoap directo\n-0018ef90: 7279 206f 6620 7468 6520 6753 4f41 5020 ry of the gSOAP \n-0018efa0: 7061 636b 6167 652c 2073 6565 2061 6c73 package, see als\n-0018efb0: 6f20 5365 6374 696f 6e20 3c61 2063 6c61 o Section The WinI\n-0018eff0: 6e65 7420 706c 7567 696e 3c2f 613e 2e20 net plugin. \n-0018f000: 4f72 2079 6f75 2063 616e 2075 7365 2074 Or you can use t\n-0018f010: 6865 2043 5552 4c20 706c 7567 696e 2074 he CURL plugin t\n-0018f020: 6f20 7573 6520 4355 524c 2066 6f72 2073 o use CURL for s\n-0018f030: 6563 7572 6520 636f 6e6e 6563 7469 6f6e ecure connection\n-0018f040: 732c 2073 6565 2053 6563 7469 6f6e 203c s, see Section <\n-0018f050: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0018f060: 663d 2269 6e64 6578 2e68 746d 6c23 6375 f=\"index.html#cu\n-0018f070: 726c 706c 7567 696e 223e 5468 6520 4355 rlplugin\">The CU\n-0018f080: 524c 2070 6c75 6769 6e3c 2f61 3e2e 3c2f RL plugin..

    .... Back to t\n-0018f0b0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-0018f0c0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    \n-0018f0f0: 3c2f 613e 0a5a 6c69 6220 636f 6d70 7265 .Zlib compre\n-0018f100: 7373 696f 6e3c 2f68 323e 0a3c 703e 546f ssion

    .

    To\n-0018f110: 2065 6e61 626c 6520 6465 666c 6174 6520 enable deflate \n-0018f120: 616e 6420 677a 6970 2063 6f6d 7072 6573 and gzip compres\n-0018f130: 7369 6f6e 2077 6974 6820 5a6c 6962 2c20 sion with Zlib, \n-0018f140: 696e 7374 616c 6c20 5a6c 6962 2066 726f install Zlib fro\n-0018f150: 6d20 3c61 2068 7265 663d 2268 7474 703a m \n-0018f170: 6874 7470 3a2f 2f77 7777 2e7a 6c69 622e http://www.zlib.\n-0018f180: 6f72 673c 2f61 3e20 6966 206e 6f74 2061 org if not a\n-0018f190: 6c72 6561 6479 2069 6e73 7461 6c6c 6564 lready installed\n-0018f1a0: 206f 6e20 796f 7572 2073 7973 7465 6d2e on your system.\n-0018f1b0: 2043 6f6d 7069 6c65 203c 656d 3e3c 636f Compile gsoap/stdsoap\n-0018f1d0: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp (or \n-0018f1f0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c\n-0018f200: 3c2f 636f 6465 3e3c 2f65 6d3e 2920 616e ) an\n-0018f210: 6420 616c 6c20 796f 7572 2073 6f75 7263 d all your sourc\n-0018f220: 6573 2074 6861 7420 696e 636c 7564 6520 es that include \n-0018f230: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-0018f240: 7374 6473 6f61 7032 2e68 3c2f 636f 6465 stdsoap2.h or soapH.h with com\n-0018f280: 7069 6c65 2d74 696d 6520 666c 6167 203c pile-time flag <\n-0018f290: 636f 6465 3e23 5749 5448 5f47 5a49 503c code>#WITH_GZIP<\n-0018f2a0: 2f63 6f64 653e 2061 6e64 206c 696e 6b20 /code> and link \n-0018f2b0: 796f 7572 2063 6f64 6520 7769 7468 2074 your code with t\n-0018f2c0: 6865 205a 6c69 6220 6c69 6272 6172 792c he Zlib library,\n-0018f2d0: 2065 2e67 2e20 3c62 3e3c 636f 6465 3e2d e.g. -\n-0018f2e0: 6c7a 3c2f 636f 6465 3e3c 2f62 3e20 6f6e lz on\n-0018f2f0: 2055 6e69 782f 4c69 6e75 7820 706c 6174 Unix/Linux plat\n-0018f300: 666f 726d 732e 3c2f 703e 0a3c 703e 5468 forms.

    .

    Th\n-0018f310: 6520 677a 6970 2063 6f6d 7072 6573 7369 e gzip compressi\n-0018f320: 6f6e 2069 7320 6f72 7468 6f67 6f6e 616c on is orthogonal\n-0018f330: 2074 6f20 616c 6c20 7472 616e 7370 6f72 to all transpor\n-0018f340: 7420 656e 636f 6469 6e67 7320 7375 6368 t encodings such\n-0018f350: 2061 7320 4854 5450 2c20 5353 4c2c 2044 as HTTP, SSL, D\n-0018f360: 494d 452c 2061 6e64 2063 616e 2062 6520 IME, and can be \n-0018f370: 7573 6564 2077 6974 6820 6f74 6865 7220 used with other \n-0018f380: 7472 616e 7370 6f72 7420 6c61 7965 7273 transport layers\n-0018f390: 2e20 596f 7520 6361 6e20 6576 656e 2073 . You can even s\n-0018f3a0: 6176 6520 616e 6420 6c6f 6164 2063 6f6d ave and load com\n-0018f3b0: 7072 6573 7365 6420 584d 4c20 6461 7461 pressed XML data\n-0018f3c0: 2074 6f2f 6672 6f6d 2066 696c 6573 2e3c to/from files.<\n-0018f3d0: 2f70 3e0a 3c70 3e54 776f 2063 6f6d 7072 /p>.

    Two compr\n-0018f3e0: 6573 7369 6f6e 2066 6f72 6d61 7473 2061 ession formats a\n-0018f3f0: 7265 2073 7570 706f 7274 6564 2062 7920 re supported by \n-0018f400: 7468 6520 656e 6769 6e65 3a20 6465 666c the engine: defl\n-0018f410: 6174 6520 616e 6420 677a 6970 2e20 5468 ate and gzip. Th\n-0018f420: 6520 677a 6970 2066 6f72 6d61 7420 6973 e gzip format is\n-0018f430: 2075 7365 6420 6279 2064 6566 6175 6c74 used by default\n-0018f440: 2e20 5468 6520 677a 6970 2066 6f72 6d61 . The gzip forma\n-0018f450: 7420 6861 7320 7365 7665 7261 6c20 6265 t has several be\n-0018f460: 6e65 6669 7473 206f 7665 7220 6465 666c nefits over defl\n-0018f470: 6174 652e 2046 6972 7374 6c79 2c20 7468 ate. Firstly, th\n-0018f480: 6520 656e 6769 6e65 2061 7574 6f6d 6174 e engine automat\n-0018f490: 6963 616c 6c79 2064 6574 6563 7473 2067 ically detects g\n-0018f4a0: 7a69 7020 636f 6d70 7265 7373 6564 2069 zip compressed i\n-0018f4b0: 6e62 6f75 6e64 206d 6573 7361 6765 732c nbound messages,\n-0018f4c0: 2065 7665 6e20 7769 7468 6f75 7420 4854 even without HT\n-0018f4d0: 5450 2068 6561 6465 7273 2c20 6279 2063 TP headers, by c\n-0018f4e0: 6865 636b 696e 6720 666f 7220 7468 6520 hecking for the \n-0018f4f0: 7072 6573 656e 6365 206f 6620 6120 677a presence of a gz\n-0018f500: 6970 2068 6561 6465 7220 696e 2074 6865 ip header in the\n-0018f510: 206d 6573 7361 6765 2063 6f6e 7465 6e74 message content\n-0018f520: 2e20 5365 636f 6e64 6c79 2c20 677a 6970 . Secondly, gzip\n-0018f530: 2069 6e63 6c75 6465 7320 6120 4352 4333 includes a CRC3\n-0018f540: 3220 6368 6563 6b73 756d 2074 6f20 656e 2 checksum to en\n-0018f550: 7375 7265 206d 6573 7361 6765 7320 6861 sure messages ha\n-0018f560: 7665 2062 6565 6e20 636f 7272 6563 746c ve been correctl\n-0018f570: 7920 7265 6365 6976 6564 2e20 5468 6972 y received. Thir\n-0018f580: 646c 792c 2067 7a69 7020 636f 6d70 7265 dly, gzip compre\n-0018f590: 7373 6564 2063 6f6e 7465 6e74 2063 616e ssed content can\n-0018f5a0: 2062 6520 6465 636f 6d70 7265 7373 6564 be decompressed\n-0018f5b0: 2077 6974 6820 6f74 6865 7220 636f 6d70 with other comp\n-0018f5c0: 7265 7373 696f 6e20 736f 6674 7761 7265 ression software\n-0018f5d0: 2c20 736f 2079 6f75 2063 616e 2064 6563 , so you can dec\n-0018f5e0: 6f6d 7072 6573 7320 584d 4c20 6461 7461 ompress XML data\n-0018f5f0: 2073 6176 6564 2062 7920 6120 6753 4f41 saved by a gSOA\n-0018f600: 5020 6170 706c 6963 6174 696f 6e20 696e P application in\n-0018f610: 2067 7a69 7020 666f 726d 6174 2e3c 2f70 gzip format..

    Gzip compre\n-0018f630: 7373 696f 6e20 6973 2065 6e61 626c 6564 ssion is enabled\n-0018f640: 2062 7920 636f 6d70 696c 696e 6720 7468 by compiling th\n-0018f650: 6520 736f 7572 6365 7320 7769 7468 2063 e sources with c\n-0018f660: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag\n-0018f670: 203c 636f 6465 3e23 5749 5448 5f47 5a49 #WITH_GZI\n-0018f680: 503c 2f63 6f64 653e 2e20 546f 2074 7261 P. To tra\n-0018f690: 6e73 6d69 7420 677a 6970 2063 6f6d 7072 nsmit gzip compr\n-0018f6a0: 6573 7365 6420 534f 4150 2f58 4d4c 2064 essed SOAP/XML d\n-0018f6b0: 6174 612c 2073 6574 2074 6865 206f 7574 ata, set the out\n-0018f6c0: 7075 7420 6d6f 6465 2066 6c61 6773 2074 put mode flags t\n-0018f6d0: 6f20 3c63 6f64 653e 2353 4f41 505f 454e o #SOAP_EN\n-0018f6e0: 435f 5a4c 4942 3c2f 636f 6465 3e2e 2046 C_ZLIB. F\n-0018f6f0: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n-0018f700: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    soa\n-0018f780: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(&\n-0018f790: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0018f7c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-0018f830: 736f 6170 5f73 6574 5f6f 6d6f 6465 3c2f soap_set_omode(&s\n-0018f870: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, SOAP\n-0018f8d0: 5f45 4e43 5f5a 4c49 423c 2f61 3e29 3b20 _ENC_ZLIB); \n-0018f8e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // enable \n-0018f900: 5a6c 6962 2623 3339 3b73 2067 7a69 7020 Zlib's gzip \n-0018f910: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0018f930: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-0018f960: 735f 5f6d 794d 6574 686f 6428 2661 6d70 s__myMethod(&\n-0018f970: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0018f9a0: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))
    .<\n-0018f9b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0018f9c0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-0018f9e0: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    e\n-0018fa20: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    \n-0018fa30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n-0018fa60: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success\n-0018fa70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n-0018fae0: 6170 5f63 6c72 5f6f 6d6f 6465 3c2f 613e ap_clr_omode\n-0018faf0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-0018fb20: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_E\n-0018fb80: 4e43 5f5a 4c49 423c 2f61 3e29 3b20 3c73 NC_ZLIB); // disable Z\n-0018fbb0: 6c69 6226 2333 393b 7320 677a 6970 203c lib's gzip <\n-0018fbc0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .\n-0018fc20: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    SOAP_E\n-0018fc80: 4e43 5f5a 4c49 423c 2f61 3e3c 2f64 6976 NC_ZLIB
    #define SOA\n-0018fcb0: 505f 454e 435f 5a4c 4942 3c2f 6469 763e P_ENC_ZLIB
    \n-0018fcc0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    soap_mode ENC\n-0018fce0: 206f 7574 7075 7420 666c 6167 2076 616c output flag val\n-0018fcf0: 7565 2074 6f20 636f 6d70 7265 7373 206d ue to compress m\n-0018fd00: 6573 7361 6765 7320 7365 6e74 2c20 7265 essages sent, re\n-0018fd10: 7175 6972 6573 207a 6c69 6220 656e 6162 quires zlib enab\n-0018fd20: 6c65 6420 7769 7468 2063 6f6d 7069 6c65 led with compile\n-0018fd30: 2d74 696d 6520 666c 2e2e 2e3c 2f64 6976 -time fl...
    Definitio\n-0018fd60: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-0018fd70: 683a 3137 3838 3c2f 6469 763e 3c2f 6469 h:1788
    .

    Thi\n-0018fda0: 7320 7769 6c6c 2073 656e 6420 6120 636f s will send a co\n-0018fdb0: 6d70 7265 7373 6564 2053 4f41 502f 584d mpressed SOAP/XM\n-0018fdc0: 4c20 7265 7175 6573 7420 746f 2061 2073 L request to a s\n-0018fdd0: 6572 7669 6365 2c20 7072 6f76 6964 6564 ervice, provided\n-0018fde0: 2074 6861 7420 5a6c 6962 2069 7320 696e that Zlib is in\n-0018fdf0: 7374 616c 6c65 6420 616e 6420 6c69 6e6b stalled and link\n-0018fe00: 6564 2077 6974 6820 7468 6520 6170 706c ed with the appl\n-0018fe10: 6963 6174 696f 6e20 616e 6420 7468 6520 ication and the \n-0018fe20: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n-0018fe30: 6720 3c63 6f64 653e 2357 4954 485f 475a g #WITH_GZ\n-0018fe40: 4950 3c2f 636f 6465 3e20 6f70 7469 6f6e IP option\n-0018fe50: 2077 6173 2075 7365 6420 746f 2063 6f6d was used to com\n-0018fe60: 7069 6c65 2074 6865 2073 6f75 7263 6573 pile the sources\n-0018fe70: 2e20 5265 6365 6976 696e 6720 636f 6d70 . Receiving comp\n-0018fe80: 7265 7373 6564 2053 4f41 502f 584d 4c20 ressed SOAP/XML \n-0018fe90: 6f76 6572 2048 5454 5020 6569 7468 6572 over HTTP either\n-0018fea0: 2069 6e20 677a 6970 206f 7220 6465 666c in gzip or defl\n-0018feb0: 6174 6520 666f 726d 6174 7320 6973 2061 ate formats is a\n-0018fec0: 7574 6f6d 6174 6963 2e20 5468 6520 3c63 utomatic. The #SOAP_ENC_ZL\n-0018fee0: 4942 3c2f 636f 6465 3e20 666c 6167 2064 IB flag d\n-0018fef0: 6f65 7320 6e6f 7420 6861 7665 2074 6f20 oes not have to \n-0018ff00: 6265 2073 6574 2061 7420 7468 6520 7365 be set at the se\n-0018ff10: 7276 6572 2073 6964 6520 746f 2061 6363 rver side to acc\n-0018ff20: 6570 7420 636f 6d70 7265 7373 6564 206d ept compressed m\n-0018ff30: 6573 7361 6765 732e 2052 6561 6469 6e67 essages. Reading\n-0018ff40: 2061 6e64 2072 6563 6569 7669 6e67 2067 and receiving g\n-0018ff50: 7a69 7020 636f 6d70 7265 7373 6564 2053 zip compressed S\n-0018ff60: 4f41 502f 584d 4c20 7769 7468 6f75 7420 OAP/XML without \n-0018ff70: 4854 5450 2068 6561 6465 7273 2028 652e HTTP headers (e.\n-0018ff80: 672e 2077 6974 6820 6f74 6865 7220 7472 g. with other tr\n-0018ff90: 616e 7370 6f72 7420 7072 6f74 6f63 6f6c ansport protocol\n-0018ffa0: 7329 2069 7320 616c 736f 2061 7574 6f6d s) is also autom\n-0018ffb0: 6174 6963 2e3c 2f70 3e0a 3c70 3e54 6f20 atic.

    .

    To \n-0018ffc0: 636f 6e74 726f 6c20 7468 6520 6c65 7665 control the leve\n-0018ffd0: 6c20 6f66 2063 6f6d 7072 6573 7369 6f6e l of compression\n-0018ffe0: 2066 6f72 206f 7574 626f 756e 6420 6d65 for outbound me\n-0018fff0: 7373 6167 6573 2c20 796f 7520 6361 6e20 ssages, you can \n-00190000: 7365 7420 7468 6520 3c63 6f64 653e 3c61 set the soap::z_level<\n-001900d0: 2f61 3e3c 2f63 6f64 653e 2074 6f20 6120 /a> to a \n-001900e0: 7661 6c75 6520 6265 7477 6565 6e20 3120 value between 1 \n-001900f0: 616e 6420 392c 2077 6865 7265 2031 2069 and 9, where 1 i\n-00190100: 7320 7468 6520 6265 7374 2073 7065 6564 s the best speed\n-00190110: 2061 6e64 2039 2069 7320 7468 6520 6265 and 9 is the be\n-00190120: 7374 2063 6f6d 7072 6573 7369 6f6e 2028 st compression (\n-00190130: 6465 6661 756c 7420 6973 2036 292e 2046 default is 6). F\n-00190140: 6f72 2065 7861 6d70 6c65 3c2f 703e 0a3c or example

    .<\n-00190150: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00190160: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    soap\n-001901d0: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n-001901e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001901f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00190200: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-00190210: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s\n-00190280: 6f61 705f 7365 745f 6f6d 6f64 653c 2f61 oap_set_omode(&so\n-001902c0: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, SOAP_\n-00190320: 454e 435f 5a4c 4942 3c2f 613e 293b 203c ENC_ZLIB); <\n-00190330: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-00190370: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.z_level = 9\n-001903d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // best \n-001903f0: 636f 6d70 7265 7373 696f 6e20 3c2f 7370 compression
    .
    un\n-001904d0: 7369 676e 6564 2073 686f 7274 207a 5f6c signed short z_l\n-001904e0: 6576 656c 3c2f 6469 763e 3c64 6976 2063 evel
    Use\n-00190500: 722d 6465 6669 6e61 626c 6520 636f 6d70 r-definable comp\n-00190510: 7265 7373 696f 6e20 6c65 7665 6c20 666f ression level fo\n-00190520: 7220 677a 6970 2063 6f6d 7072 6573 7369 r gzip compressi\n-00190530: 6f6e 2028 303d 6e6f 6e65 2c20 313d 6661 on (0=none, 1=fa\n-00190540: 7374 2074 6f20 393d 6265 7374 2920 6465 st to 9=best) de\n-00190550: 6661 756c 7420 6c65 7665 6c20 6973 2036 fault level is 6\n-00190560: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-00190580: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-00190590: 736f 6170 322e 683a 3337 3034 3c2f 6469 soap2.h:3704
    .
    <\n-001905b0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001905c0: 3c70 3e54 6f20 7665 7269 6679 2061 6e64

    To verify and\n-001905d0: 206d 6f6e 6974 6f72 2063 6f6d 7072 6573 monitor compres\n-001905e0: 7369 6f6e 2072 6174 6573 2c20 796f 7520 sion rates, you \n-001905f0: 6361 6e20 7573 6520 7468 6520 7661 6c75 can use the valu\n-00190600: 6573 203c 636f 6465 3e3c 6120 636c 6173 es soap::z_ra\n-001906c0: 7469 6f5f 696e 3c2f 613e 3c2f 636f 6465 tio_in and soap::z_rat\n-00190790: 696f 5f6f 7574 3c2f 613e 3c2f 636f 6465 io_out. These two flo\n-001907b0: 6174 2076 616c 7565 7320 6c69 6520 6265 at values lie be\n-001907c0: 7477 6565 6e20 302e 3020 616e 6420 312e tween 0.0 and 1.\n-001907d0: 3020 616e 6420 6578 7072 6573 7320 7468 0 and express th\n-001907e0: 6520 7261 7469 6f20 6f66 2074 6865 2063 e ratio of the c\n-001907f0: 6f6d 7072 6573 7365 6420 6d65 7373 6167 ompressed messag\n-00190800: 6520 6c65 6e67 7468 206f 7665 7220 756e e length over un\n-00190810: 636f 6d70 7265 7373 6564 206d 6573 7361 compressed messa\n-00190820: 6765 206c 656e 6774 682e 3c2f 703e 0a3c ge length.

    .<\n-00190830: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00190840: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    if (soap\n-00190880: 5f63 616c 6c5f 6e73 5f5f 6d79 4d65 7468 _call_ns__myMeth\n-00190890: 6f64 2826 616d 703b 3c61 2063 6c61 7373 od(&s\n-001908c0: 6f61 703c 2f61 3e2c 202e 2e2e 2929 3c2f oap, ...))soap_print_\n+0018ab30: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n+0018ab40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0018ab50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0018ab60: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0018ab70: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n+0018ab80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXIT_FA\n+0018aba0: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .<\n+0018abb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0018abc0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    <\n+0018ac30: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+0018ac40: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g\n+0018ac50: 6135 3236 3134 3030 3764 3063 3033 3539 a52614007d0c0359\n+0018ac60: 6365 6166 3836 3538 3866 3437 3636 3162 ceaf86588f47661b\n+0018ac70: 3922 3e53 4f41 505f 5353 4c5f 4e4f 5f41 9\">SOAP_SSL_NO_A\n+0018ac80: 5554 4845 4e54 4943 4154 494f 4e3c 2f61 UTHENTICATION
    #defi\n+0018acb0: 6e65 2053 4f41 505f 5353 4c5f 4e4f 5f41 ne SOAP_SSL_NO_A\n+0018acc0: 5554 4845 4e54 4943 4154 494f 4e3c 2f64 UTHENTICATION
    soap_ssl_f\n+0018acf0: 6c61 6773 2066 6c61 6720 7661 6c75 6520 lags flag value \n+0018ad00: 746f 2064 6973 6162 6c65 2061 7574 6865 to disable authe\n+0018ad10: 6e74 6963 6174 696f 6e20 6f66 2074 6865 ntication of the\n+0018ad20: 2070 6565 723c 2f64 6976 3e3c 6469 7620 peer
    Definition:\n+0018ad50: 2073 7464 736f 6170 322e 683a 3538 3430 stdsoap2.h:5840\n+0018ad60: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    This also\n+0018ad90: 2061 7373 756d 6573 2074 6861 7420 7468 assumes that th\n+0018ada0: 6520 7365 7276 6572 2064 6f65 7320 6e6f e server does no\n+0018adb0: 7420 7265 7175 6972 6520 636c 6965 6e74 t require client\n+0018adc0: 7320 746f 2061 7574 6865 6e74 6963 6174 s to authenticat\n+0018add0: 6520 2874 6865 206b 6579 6669 6c65 2069 e (the keyfile i\n+0018ade0: 7320 6162 7365 6e74 292e 3c2f 703e 0a3c s absent).

    .<\n+0018adf0: 703e 4d61 6b65 2073 7572 6520 796f 7520 p>Make sure you \n+0018ae00: 6861 7665 2073 6967 6e61 6c20 6861 6e64 have signal hand\n+0018ae10: 6c65 7273 2073 6574 2069 6e20 796f 7572 lers set in your\n+0018ae20: 2061 7070 6c69 6361 7469 6f6e 2074 6f20 application to \n+0018ae30: 6361 7463 6820 6272 6f6b 656e 2063 6f6e catch broken con\n+0018ae40: 6e65 6374 696f 6e73 2028 3c63 6f64 653e nections (\n+0018ae50: 5349 4750 4950 453c 2f63 6f64 653e 293a SIGPIPE):\n+0018ae60: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    sig\n+0018ae90: 6e61 6c28 5349 4750 4950 452c 2073 6967 nal(SIGPIPE, sig\n+0018aea0: 7069 7065 5f68 616e 646c 6529 3b3c 2f64 pipe_handle);.

    wh\n+0018aed0: 6572 652c 2066 6f72 2065 7861 6d70 6c65 ere, for example\n+0018aee0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    void sigpipe_hand\n+0018af40: 6c65 283c 7370 616e 2063 6c61 7373 3d22 le(int\n+0018af60: 3c2f 7370 616e 3e20 7829 207b 207d 3c2f x) { }.
    Warn\n+0018afb0: 696e 673c 2f64 743e 3c64 643e 4974 2069 ing
    It i\n+0018afc0: 7320 696d 706f 7274 616e 7420 7468 6174 s important that\n+0018afd0: 2074 6865 203c 636f 6465 3e23 5749 5448 the #WITH\n+0018afe0: 5f4f 5045 4e53 534c 3c2f 636f 6465 3e20 _OPENSSL \n+0018aff0: 6d61 6372 6f20 6973 2063 6f6e 7369 7374 macro is consist\n+0018b000: 656e 746c 7920 6465 6669 6e65 6420 746f ently defined to\n+0018b010: 2063 6f6d 7069 6c65 2074 6865 2073 6f75 compile the sou\n+0018b020: 7263 6573 2c20 7375 6368 2061 7320 3c65 rces, such as gsoap/st\n+0018b040: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp, soapC.cpp, soapClient.cp\n+0018b090: 703c 2f63 6f64 653e 3c2f 656d 3e2c 203c p, <\n+0018b0a0: 656d 3e3c 636f 6465 3e73 6f61 7053 6572 em>soapSer\n+0018b0b0: 7665 722e 6370 703c 2f63 6f64 653e 3c2f ver.cpp, and all app\n+0018b0d0: 6c69 6361 7469 6f6e 2073 6f75 7263 6573 lication sources\n+0018b0e0: 2074 6861 7420 696e 636c 7564 6520 3c65 that include gsoap/st\n+0018b100: 6473 6f61 7032 2e68 3c2f 636f 6465 3e3c dsoap2.h<\n+0018b110: 2f65 6d3e 206f 7220 3c65 6d3e 3c63 6f64 /em> or soapH.h\n+0018b130: 3c2f 656d 3e2e 2049 6620 7468 6520 6d61 . If the ma\n+0018b140: 6372 6f73 2061 7265 206e 6f74 2063 6f6e cros are not con\n+0018b150: 7369 7374 656e 746c 7920 7573 6564 2c20 sistently used, \n+0018b160: 7468 6520 6170 706c 6963 6174 696f 6e20 the application \n+0018b170: 7769 6c6c 2063 7261 7368 2064 7565 2074 will crash due t\n+0018b180: 6f20 6120 6d69 736d 6174 6368 6573 2069 o a mismatches i\n+0018b190: 6e20 7468 6520 6465 636c 6172 6174 696f n the declaratio\n+0018b1a0: 6e20 616e 6420 6163 6365 7373 206f 6620 n and access of \n+0018b1b0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context. A\n+0018b220: 6c74 6572 6e61 7469 7665 6c79 2c20 7573 lternatively, us\n+0018b230: 6520 6c69 6272 6172 7920 3c62 3e3c 636f e library -lgsoapssl or <\n+0018b260: 636f 6465 3e2d 6c67 736f 6170 7373 6c2b code>-lgsoapssl+\n+0018b270: 2b3c 2f63 6f64 653e 3c2f 623e 2061 6e64 + and\n+0018b280: 2063 6f6d 7069 6c65 2065 7665 7279 7468 compile everyth\n+0018b290: 696e 6720 656c 7365 2077 6974 6820 3c63 ing else with #WITH_OPENSS\n+0018b2b0: 4c3c 2f63 6f64 653e 2e3c 2f64 643e 0a3c L.
    .<\n+0018b2c0: 6464 3e0a 436f 6e63 7572 7265 6e74 2063 dd>.Concurrent c\n+0018b2d0: 6c69 656e 7420 6361 6c6c 7320 7769 7468 lient calls with\n+0018b2e0: 2074 6872 6561 6473 2073 686f 756c 6420 threads should \n+0018b2f0: 7573 6520 7365 7061 7261 7465 203c 636f use separate s\n+0018b350: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+0018b360: 6f6e 7465 7874 7320 496e 2061 6464 6974 ontexts In addit\n+0018b370: 696f 6e2c 2074 6865 2074 6872 6561 6420 ion, the thread \n+0018b380: 696e 6974 6961 6c69 7a61 7469 6f6e 2063 initialization c\n+0018b390: 6f64 6520 6469 7363 7573 7365 6420 696e ode discussed in\n+0018b3a0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Secure We\n+0018b3e0: 6220 7365 7276 6963 6573 2077 6974 6820 b services with \n+0018b3f0: 4854 5450 533c 2f61 3e20 6d75 7374 2062 HTTPS must b\n+0018b400: 6520 7573 6564 2074 6f20 7072 6f70 6572 e used to proper\n+0018b410: 6c79 2073 6574 7570 204f 7065 6e53 534c ly setup OpenSSL\n+0018b420: 2069 6e20 6120 6d75 6c74 692d 7468 7265 in a multi-thre\n+0018b430: 6164 6564 2063 6c69 656e 7420 6170 706c aded client appl\n+0018b440: 6963 6174 696f 6e2e 3c2f 6464 3e3c 2f64 ication..

    See also A\n+0018b460: 5049 2064 6f63 756d 656e 7461 7469 6f6e PI documentation\n+0018b470: 204d 6f64 756c 6520 3c61 2063 6c61 7373 Module SSL/TLS cont\n+0018b4b0: 6578 7420 616e 6420 6675 6e63 7469 6f6e ext and function\n+0018b4c0: 733c 2f61 3e20 666f 7220 6d6f 7265 2064 s for more d\n+0018b4d0: 6574 6169 6c73 206f 6e20 7468 6520 5353 etails on the SS\n+0018b4e0: 4c2f 544c 5320 6675 6e63 7469 6f6e 732e L/TLS functions.\n+0018b4f0: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    You can \n+0018b500: 616c 736f 2075 7365 2074 6865 2057 696e also use the Win\n+0018b510: 496e 6574 2069 6e74 6572 6661 6365 2074 Inet interface t\n+0018b520: 6f20 6573 7461 626c 6973 6820 7365 6375 o establish secu\n+0018b530: 7265 2048 5454 5053 2063 6f6e 6e65 6374 re HTTPS connect\n+0018b540: 696f 6e73 206f 6e20 5769 6e64 6f77 7320 ions on Windows \n+0018b550: 6d61 6368 696e 6573 2c20 6176 6169 6c61 machines, availa\n+0018b560: 626c 6520 696e 2074 6865 203c 656d 3e3c ble in the <\n+0018b570: 636f 6465 3e67 736f 6170 2f6d 6f64 5f67 code>gsoap/mod_g\n+0018b580: 736f 6170 3c2f 636f 6465 3e3c 2f65 6d3e soap\n+0018b590: 2064 6972 6563 746f 7279 206f 6620 7468 directory of th\n+0018b5a0: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c\n+0018b5b0: 6f64 6520 7061 636b 6167 652c 2073 6565 ode package, see\n+0018b5c0: 2061 6c73 6f20 5365 6374 696f 6e20 3c61 also Section The \n+0018b600: 5769 6e49 6e65 7420 706c 7567 696e 3c2f WinInet plugin. Or you can u\n+0018b620: 7365 2074 6865 2043 5552 4c20 706c 7567 se the CURL plug\n+0018b630: 696e 2074 6f20 7573 6520 4355 524c 2074 in to use CURL t\n+0018b640: 6f20 6573 7461 626c 6973 6820 7365 6375 o establish secu\n+0018b650: 7265 2048 5454 5053 2063 6f6e 6e65 6374 re HTTPS connect\n+0018b660: 696f 6e73 2c20 7365 6520 5365 6374 696f ions, see Sectio\n+0018b670: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n The\n+0018b6a0: 2043 5552 4c20 706c 7567 696e 3c2f 613e CURL plugin\n+0018b6b0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t\n+0018b6d0: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n+0018b6e0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 323e nts

    .

    \n+0018b6f0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .SSL authe\n+0018b730: 6e74 6963 6174 696f 6e20 6361 6c6c 6261 ntication callba\n+0018b740: 636b 733c 2f68 323e 0a3c 703e 5468 6520 cks

    .

    The \n+0018b750: 3c63 6f64 653e 6673 736c 6175 7468 3c2f fsslauth callback f\n+0018b770: 756e 6374 696f 6e20 636f 6e74 726f 6c73 unction controls\n+0018b780: 204f 7065 6e53 534c 2f47 4e55 544c 5320 OpenSSL/GNUTLS \n+0018b790: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n+0018b7a0: 6e69 7469 616c 697a 6174 696f 6e3a 3c2f nitialization:.

    .

    The fsslverify callback fu\n+0018bc80: 6e63 7469 6f6e 2063 6f6e 7472 6f6c 7320 nction controls \n+0018bc90: 4f70 656e 5353 4c20 7065 6572 2063 6572 OpenSSL peer cer\n+0018bca0: 7469 6669 6361 7465 2076 6572 6966 6963 tificate verific\n+0018bcb0: 6174 696f 6e2c 2076 6961 2069 6e74 6572 ation, via inter\n+0018bcc0: 6e61 6c6c 7920 696e 766f 6b69 6e67 203c nally invoking <\n+0018bcd0: 636f 6465 3e53 534c 5f43 5458 5f73 6574 code>SSL_CTX_set\n+0018bce0: 5f76 6572 6966 793c 2f63 6f64 653e 3a3c _verify:<\n+0018bcf0: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c 636f /p>.

    . \n+0018e3a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+0018e3c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (!ENG\n+0018e3f0: 494e 455f 7365 745f 6465 6661 756c 7428 INE_set_default(\n+0018e400: 652c 2045 4e47 494e 455f 4d45 5448 4f44 e, ENGINE_METHOD\n+0018e410: 5f41 4c4c 2929 203c 2f64 6976 3e0a 3c64 _ALL))
    .\n+0018e430: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde\n+0018e440: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, \n+0018e460: 2671 756f 743b 4572 726f 7220 7573 696e "Error usin\n+0018e470: 6720 656e 6769 6e65 2025 735c 6e26 7175 g engine %s\\n&qu\n+0018e480: 6f74 3b3c 2f73 7061 6e3e 2c20 656e 6769 ot;, engi\n+0018e490: 6e65 293b 203c 2f64 6976 3e0a 3c64 6976 ne);
    . \n+0018e4b0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //.
    }.

    Th\n+0018e510: 6520 666f 6c6c 6f77 696e 6720 7461 626c e following tabl\n+0018e520: 6520 6c69 7374 7320 7468 6520 6e61 6d65 e lists the name\n+0018e530: 7320 6f66 2074 6865 2068 6172 6477 6172 s of the hardwar\n+0018e540: 6520 616e 6420 736f 6674 7761 7265 2065 e and software e\n+0018e550: 6e67 696e 6573 3a3c 2f70 3e0a 3c74 6162 ngines:

    ..

    ..\n+0018e600: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0018e620: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .<\n+0018e660: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0018e670: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0018e680: 3e54 6865 2064 6566 6175 6c74 2073 6f66 >The default sof\n+0018e690: 7477 6172 6520 656e 6769 6e65 2066 6f72 tware engine for\n+0018e6a0: 2063 7279 7074 6f67 7261 7068 6963 206f cryptographic o\n+0018e6b0: 7065 7261 7469 6f6e 7320 2020 203c 2f74 perations ....<\n+0018e7b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0018e7c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0018e7d0: 3e3c 636f 6465 3e63 7377 6966 743c 2f63 >cswift ..\n+0018e860: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+0018e910: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0018e920: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0018e930: 3e3c 636f 6465 3e61 7461 6c6c 613c 2f63 >atalla .\n+0018e9a0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+0018ea20: 4e75 726f 6e20 6163 6365 6c65 7261 7469 Nuron accelerati\n+0018ea30: 6f6e 2068 6172 6477 6172 6520 2020 203c on hardware <\n+0018ea40: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>....\n+0018eb40: 3c63 6f64 653e 6165 703c 2f63 6f64 653e aep\n+0018eb50: 2020 203c 2f74 643e 3c74 6420 636c 6173 ...\n+0018ec50: 3c2f 7461 626c 653e 0a3c 703e f09f 949d
    engine result <\n-0018e610: 2f74 683e 3c2f 7472 3e0a 3c74 7220 636c /th>
    openssl The d\n-0018e6a0: 6566 6175 6c74 2073 6f66 7477 6172 6520 efault software \n-0018e6b0: 656e 6769 6e65 2066 6f72 2063 7279 7074 engine for crypt\n-0018e6c0: 6f67 7261 7068 6963 206f 7065 7261 7469 ographic operati\n-0018e6d0: 6f6e 7320 2020 203c 2f74 643e 3c2f 7472 ons
    open\n-0018e730: 6273 645f 6465 765f 6372 7970 746f 3c2f bsd_dev_crypto
    cswift \n-0018e800: 203c 2f74 643e 3c74 6420 636c 6173 733d CryptoSw\n-0018e830: 6966 7420 6163 6365 6c65 7261 7469 6f6e ift acceleration\n-0018e840: 2068 6172 6477 6172 6520 2020 203c 2f74 hardware
    chil \n-0018e8b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 nCipher C\n-0018e8e0: 4849 4c20 6163 6365 6c65 7261 7469 6f6e HIL acceleration\n-0018e8f0: 2068 6172 6477 6172 6520 2020 203c 2f74 hardware
    atalla \n-0018e960: 203c 2f74 643e 3c74 6420 636c 6173 733d Compaq A\n-0018e990: 7461 6c6c 6120 6163 6365 6c65 7261 7469 talla accelerati\n-0018e9a0: 6f6e 2068 6172 6477 6172 6520 2020 203c on hardware <\n-0018e9b0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    nuron\n-0018ea10: 2020 203c 2f74 643e 3c74 6420 636c 6173 Nuron \n-0018ea40: 6163 6365 6c65 7261 7469 6f6e 2068 6172 acceleration har\n-0018ea50: 6477 6172 6520 2020 203c 2f74 643e 3c2f dware
    ubs\n-0018eab0: 6563 3c2f 636f 6465 3e20 2020 3c2f 7464 ec Broadcom uBSe\n-0018eaf0: 6320 6163 6365 6c65 7261 7469 6f6e 2068 c acceleration h\n-0018eb00: 6172 6477 6172 6520 2020 203c 2f74 643e ardware
    \n-0018eb60: 6165 703c 2f63 6f64 653e 2020 203c 2f74 aep Aep accelera\n-0018eba0: 7469 6f6e 2068 6172 6477 6172 6520 2020 tion hardware \n-0018ebb0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    Su\n-0018ec40: 7265 5761 7265 2061 6363 656c 6572 6174 reWare accelerat\n-0018ec50: 696f 6e20 6861 7264 7761 7265 2020 203c ion hardware <\n-0018ec60: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>
    engin\n+0018e5c0: 6520 2020 3c2f 7468 3e3c 7468 2063 6c61 e resul\n+0018e5f0: 7420 2020 203c 2f74 683e 3c2f 7472 3e0a t
    openssl\n+0018e650: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    openbsd_dev_cr\n+0018e720: 7970 746f 3c2f 636f 6465 3e20 2020 3c2f ypto OpenBSD sup\n+0018e760: 706f 7274 7320 6b65 726e 656c 206c 6576 ports kernel lev\n+0018e770: 656c 2063 7279 7074 6f67 7261 7068 7920 el cryptography \n+0018e780: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    Cr\n+0018e810: 7970 746f 5377 6966 7420 6163 6365 6c65 yptoSwift accele\n+0018e820: 7261 7469 6f6e 2068 6172 6477 6172 6520 ration hardware \n+0018e830: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    chil nCi\n+0018e8c0: 7068 6572 2043 4849 4c20 6163 6365 6c65 pher CHIL accele\n+0018e8d0: 7261 7469 6f6e 2068 6172 6477 6172 6520 ration hardware \n+0018e8e0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    Co\n+0018e970: 6d70 6171 2041 7461 6c6c 6120 6163 6365 mpaq Atalla acce\n+0018e980: 6c65 7261 7469 6f6e 2068 6172 6477 6172 leration hardwar\n+0018e990: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e
    nuron<\n+0018e9f0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    ubsec \n+0018eaa0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Broadco\n+0018ead0: 6d20 7542 5365 6320 6163 6365 6c65 7261 m uBSec accelera\n+0018eae0: 7469 6f6e 2068 6172 6477 6172 6520 2020 tion hardware \n+0018eaf0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    Aep ac\n+0018eb80: 6365 6c65 7261 7469 6f6e 2068 6172 6477 celeration hardw\n+0018eb90: 6172 6520 2020 203c 2f74 643e 3c2f 7472 are
    surew\n+0018ebf0: 6172 653c 2f63 6f64 653e 2020 203c 2f74 are SureWare acc\n+0018ec30: 656c 6572 6174 696f 6e20 6861 7264 7761 eleration hardwa\n+0018ec40: 7265 2020 203c 2f74 643e 3c2f 7472 3e0a re
    .

    ....\n+0018ec60: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+0018ec70: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+0018ec80: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+0018ec90: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.SSL on Win\n+0018ecc0: 646f 7773 3c2f 6832 3e0a 3c70 3e53 6574 dows

    .

    Set\n+0018ecd0: 2074 6865 2066 756c 6c20 7061 7468 2074 the full path t\n+0018ece0: 6f20 3c65 6d3e 3c63 6f64 653e 6c69 6273 o libs\n+0018ecf0: 736c 2e6c 6962 3c2f 636f 6465 3e3c 2f65 sl.lib and libcrypto.lib under\n+0018ed30: 2074 6865 204d 5356 432b 2b20 2250 726f the MSVC++ \"Pro\n+0018ed40: 6a65 6374 7322 206d 656e 752c 2074 6865 jects\" menu, the\n+0018ed50: 6e20 6368 6f6f 7365 2022 4c69 6e6b 223a n choose \"Link\":\n+0018ed60: 2022 4f62 6a65 6374 2f4d 6f64 756c 6573 \"Object/Modules\n+0018ed70: 222e 2050 6c65 6173 6520 6d61 6b65 2073 \". Please make s\n+0018ed80: 7572 6520 3c65 6d3e 3c63 6f64 653e 6c69 ure li\n+0018ed90: 6273 736c 3332 2e64 6c6c 3c2f 636f 6465 bssl32.dll and <\n+0018edb0: 636f 6465 3e6c 6962 6561 7933 322e 646c code>libeay32.dl\n+0018edc0: 6c3c 2f63 6f64 653e 3c2f 656d 3e20 6361 l ca\n+0018edd0: 6e20 6265 206c 6f61 6465 6420 6279 2079 n be loaded by y\n+0018ede0: 6f75 7220 6170 706c 6963 6174 696f 6e73 our applications\n+0018edf0: 2c20 7468 7573 2074 6865 7920 6d75 7374 , thus they must\n+0018ee00: 2062 6520 696e 7374 616c 6c65 6420 7072 be installed pr\n+0018ee10: 6f70 6572 6c79 206f 6e20 7468 6520 7461 operly on the ta\n+0018ee20: 7267 6574 206d 6163 6869 6e65 2e3c 2f70 rget machine..

    If you're u\n+0018ee40: 7369 6e67 2063 6f6d 7069 6c61 7469 6f6e sing compilation\n+0018ee50: 2073 6574 7469 6e67 7320 7375 6368 2061 settings such a\n+0018ee60: 7320 3c63 6f64 653e 2f4d 5464 3c2f 636f s /MTd then link to\n+0018ee80: 2074 6865 2063 6f72 7265 6374 203c 656d the correct libeay32M\n+0018eea0: 5464 2e6c 6962 3c2f 636f 6465 3e3c 2f65 Td.lib and ssleay32MTd.lib\n+0018eed0: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6962 lib\n+0018eee0: 7261 7269 6573 2e3c 2f70 3e0a 3c70 3e41 raries.

    .

    A\n+0018eef0: 6c74 6572 6e61 7469 7665 6c79 2c20 796f lternatively, yo\n+0018ef00: 7520 6361 6e20 7573 6520 7468 6520 5769 u can use the Wi\n+0018ef10: 6e49 6e65 7420 696e 7465 7266 6163 6520 nInet interface \n+0018ef20: 666f 7220 7365 6375 7265 2063 6f6e 6e65 for secure conne\n+0018ef30: 6374 696f 6e73 2c20 6176 6169 6c61 626c ctions, availabl\n+0018ef40: 6520 696e 2074 6865 203c 656d 3e3c 636f e in the gsoap/mod_gso\n+0018ef60: 6170 3c2f 636f 6465 3e3c 2f65 6d3e 2064 ap d\n+0018ef70: 6972 6563 746f 7279 206f 6620 7468 6520 irectory of the \n+0018ef80: 6753 4f41 5020 7061 636b 6167 652c 2073 gSOAP package, s\n+0018ef90: 6565 2061 6c73 6f20 5365 6374 696f 6e20 ee also Section \n+0018efa0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Th\n+0018efd0: 6520 5769 6e49 6e65 7420 706c 7567 696e e WinInet plugin\n+0018efe0: 3c2f 613e 2e20 4f72 2079 6f75 2063 616e . Or you can\n+0018eff0: 2075 7365 2074 6865 2043 5552 4c20 706c use the CURL pl\n+0018f000: 7567 696e 2074 6f20 7573 6520 4355 524c ugin to use CURL\n+0018f010: 2066 6f72 2073 6563 7572 6520 636f 6e6e for secure conn\n+0018f020: 6563 7469 6f6e 732c 2073 6565 2053 6563 ections, see Sec\n+0018f030: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion \n+0018f060: 5468 6520 4355 524c 2070 6c75 6769 6e3c The CURL plugin<\n+0018f070: 2f61 3e2e 3c2f 703e 0a3c 703e f09f 949d /a>.

    .

    ....\n+0018f080: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n+0018f090: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n+0018f0a0: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n+0018f0b0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Zlib \n+0018f0e0: 636f 6d70 7265 7373 696f 6e3c 2f68 323e compression\n+0018f0f0: 0a3c 703e 546f 2065 6e61 626c 6520 6465 .

    To enable de\n+0018f100: 666c 6174 6520 616e 6420 677a 6970 2063 flate and gzip c\n+0018f110: 6f6d 7072 6573 7369 6f6e 2077 6974 6820 ompression with \n+0018f120: 5a6c 6962 2c20 696e 7374 616c 6c20 5a6c Zlib, install Zl\n+0018f130: 6962 2066 726f 6d20 3c61 2068 7265 663d ib from http://www\n+0018f160: 2e7a 6c69 622e 6f72 673c 2f61 3e20 6966 .zlib.org if\n+0018f170: 206e 6f74 2061 6c72 6561 6479 2069 6e73 not already ins\n+0018f180: 7461 6c6c 6564 206f 6e20 796f 7572 2073 talled on your s\n+0018f190: 7973 7465 6d2e 2043 6f6d 7069 6c65 203c ystem. Compile <\n+0018f1a0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+0018f1b0: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp (or \n+0018f1d0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n+0018f1e0: 6f61 7032 2e63 3c2f 636f 6465 3e3c 2f65 oap2.c) and all your\n+0018f200: 2073 6f75 7263 6573 2074 6861 7420 696e sources that in\n+0018f210: 636c 7564 6520 3c65 6d3e 3c63 6f64 653e clude \n+0018f220: 6773 6f61 702f 7374 6473 6f61 7032 2e68 gsoap/stdsoap2.h\n+0018f230: 3c2f 636f 6465 3e3c 2f65 6d3e 206f 7220 or \n+0018f240: 3c65 6d3e 3c63 6f64 653e 736f 6170 482e soapH.\n+0018f250: 683c 2f63 6f64 653e 3c2f 656d 3e20 7769 h wi\n+0018f260: 7468 2063 6f6d 7069 6c65 2d74 696d 6520 th compile-time \n+0018f270: 666c 6167 203c 636f 6465 3e23 5749 5448 flag #WITH\n+0018f280: 5f47 5a49 503c 2f63 6f64 653e 2061 6e64 _GZIP and\n+0018f290: 206c 696e 6b20 796f 7572 2063 6f64 6520 link your code \n+0018f2a0: 7769 7468 2074 6865 205a 6c69 6220 6c69 with the Zlib li\n+0018f2b0: 6272 6172 792c 2065 2e67 2e20 3c62 3e3c brary, e.g. <\n+0018f2c0: 636f 6465 3e2d 6c7a 3c2f 636f 6465 3e3c code>-lz<\n+0018f2d0: 2f62 3e20 6f6e 2055 6e69 782f 4c69 6e75 /b> on Unix/Linu\n+0018f2e0: 7820 706c 6174 666f 726d 732e 3c2f 703e x platforms.

    \n+0018f2f0: 0a3c 703e 5468 6520 677a 6970 2063 6f6d .

    The gzip com\n+0018f300: 7072 6573 7369 6f6e 2069 7320 6f72 7468 pression is orth\n+0018f310: 6f67 6f6e 616c 2074 6f20 616c 6c20 7472 ogonal to all tr\n+0018f320: 616e 7370 6f72 7420 656e 636f 6469 6e67 ansport encoding\n+0018f330: 7320 7375 6368 2061 7320 4854 5450 2c20 s such as HTTP, \n+0018f340: 5353 4c2c 2044 494d 452c 2061 6e64 2063 SSL, DIME, and c\n+0018f350: 616e 2062 6520 7573 6564 2077 6974 6820 an be used with \n+0018f360: 6f74 6865 7220 7472 616e 7370 6f72 7420 other transport \n+0018f370: 6c61 7965 7273 2e20 596f 7520 6361 6e20 layers. You can \n+0018f380: 6576 656e 2073 6176 6520 616e 6420 6c6f even save and lo\n+0018f390: 6164 2063 6f6d 7072 6573 7365 6420 584d ad compressed XM\n+0018f3a0: 4c20 6461 7461 2074 6f2f 6672 6f6d 2066 L data to/from f\n+0018f3b0: 696c 6573 2e3c 2f70 3e0a 3c70 3e54 776f iles.

    .

    Two\n+0018f3c0: 2063 6f6d 7072 6573 7369 6f6e 2066 6f72 compression for\n+0018f3d0: 6d61 7473 2061 7265 2073 7570 706f 7274 mats are support\n+0018f3e0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n+0018f3f0: 3a20 6465 666c 6174 6520 616e 6420 677a : deflate and gz\n+0018f400: 6970 2e20 5468 6520 677a 6970 2066 6f72 ip. The gzip for\n+0018f410: 6d61 7420 6973 2075 7365 6420 6279 2064 mat is used by d\n+0018f420: 6566 6175 6c74 2e20 5468 6520 677a 6970 efault. The gzip\n+0018f430: 2066 6f72 6d61 7420 6861 7320 7365 7665 format has seve\n+0018f440: 7261 6c20 6265 6e65 6669 7473 206f 7665 ral benefits ove\n+0018f450: 7220 6465 666c 6174 652e 2046 6972 7374 r deflate. First\n+0018f460: 6c79 2c20 7468 6520 656e 6769 6e65 2061 ly, the engine a\n+0018f470: 7574 6f6d 6174 6963 616c 6c79 2064 6574 utomatically det\n+0018f480: 6563 7473 2067 7a69 7020 636f 6d70 7265 ects gzip compre\n+0018f490: 7373 6564 2069 6e62 6f75 6e64 206d 6573 ssed inbound mes\n+0018f4a0: 7361 6765 732c 2065 7665 6e20 7769 7468 sages, even with\n+0018f4b0: 6f75 7420 4854 5450 2068 6561 6465 7273 out HTTP headers\n+0018f4c0: 2c20 6279 2063 6865 636b 696e 6720 666f , by checking fo\n+0018f4d0: 7220 7468 6520 7072 6573 656e 6365 206f r the presence o\n+0018f4e0: 6620 6120 677a 6970 2068 6561 6465 7220 f a gzip header \n+0018f4f0: 696e 2074 6865 206d 6573 7361 6765 2063 in the message c\n+0018f500: 6f6e 7465 6e74 2e20 5365 636f 6e64 6c79 ontent. Secondly\n+0018f510: 2c20 677a 6970 2069 6e63 6c75 6465 7320 , gzip includes \n+0018f520: 6120 4352 4333 3220 6368 6563 6b73 756d a CRC32 checksum\n+0018f530: 2074 6f20 656e 7375 7265 206d 6573 7361 to ensure messa\n+0018f540: 6765 7320 6861 7665 2062 6565 6e20 636f ges have been co\n+0018f550: 7272 6563 746c 7920 7265 6365 6976 6564 rrectly received\n+0018f560: 2e20 5468 6972 646c 792c 2067 7a69 7020 . Thirdly, gzip \n+0018f570: 636f 6d70 7265 7373 6564 2063 6f6e 7465 compressed conte\n+0018f580: 6e74 2063 616e 2062 6520 6465 636f 6d70 nt can be decomp\n+0018f590: 7265 7373 6564 2077 6974 6820 6f74 6865 ressed with othe\n+0018f5a0: 7220 636f 6d70 7265 7373 696f 6e20 736f r compression so\n+0018f5b0: 6674 7761 7265 2c20 736f 2079 6f75 2063 ftware, so you c\n+0018f5c0: 616e 2064 6563 6f6d 7072 6573 7320 584d an decompress XM\n+0018f5d0: 4c20 6461 7461 2073 6176 6564 2062 7920 L data saved by \n+0018f5e0: 6120 6753 4f41 5020 6170 706c 6963 6174 a gSOAP applicat\n+0018f5f0: 696f 6e20 696e 2067 7a69 7020 666f 726d ion in gzip form\n+0018f600: 6174 2e3c 2f70 3e0a 3c70 3e47 7a69 7020 at.

    .

    Gzip \n+0018f610: 636f 6d70 7265 7373 696f 6e20 6973 2065 compression is e\n+0018f620: 6e61 626c 6564 2062 7920 636f 6d70 696c nabled by compil\n+0018f630: 696e 6720 7468 6520 736f 7572 6365 7320 ing the sources \n+0018f640: 7769 7468 2063 6f6d 7069 6c65 2d74 696d with compile-tim\n+0018f650: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI\n+0018f660: 5448 5f47 5a49 503c 2f63 6f64 653e 2e20 TH_GZIP. \n+0018f670: 546f 2074 7261 6e73 6d69 7420 677a 6970 To transmit gzip\n+0018f680: 2063 6f6d 7072 6573 7365 6420 534f 4150 compressed SOAP\n+0018f690: 2f58 4d4c 2064 6174 612c 2073 6574 2074 /XML data, set t\n+0018f6a0: 6865 206f 7574 7075 7420 6d6f 6465 2066 he output mode f\n+0018f6b0: 6c61 6773 2074 6f20 3c63 6f64 653e 2353 lags to #S\n+0018f6c0: 4f41 505f 454e 435f 5a4c 4942 3c2f 636f OAP_ENC_ZLIB. For example\n+0018f6e0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    soap_init\n+0018f770: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0018f7a0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n+0018f7b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0018f7c0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_o\n+0018f820: 6d6f 6465 3c2f 613e 2826 616d 703b 3c61 mode(&soap, <\n+0018f860: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0018f870: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0018f880: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n+0018f890: 6661 3632 6265 3762 6134 3662 3530 6435 fa62be7ba46b50d5\n+0018f8a0: 3836 3038 6130 3636 6634 3432 6332 6138 8608a066f442c2a8\n+0018f8b0: 223e 534f 4150 5f45 4e43 5f5a 4c49 423c \">SOAP_ENC_ZLIB<\n+0018f8c0: 2f61 3e29 3b20 3c73 7061 6e20 636c 6173 /a>); // e\n+0018f8e0: 6e61 626c 6520 5a6c 6962 2623 3339 3b73 nable Zlib's\n+0018f8f0: 2067 7a69 7020 3c2f 7370 616e 3e3c 2f64 gzip .
    \n+0018f930: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+0018f940: 6361 6c6c 5f6e 735f 5f6d 794d 6574 686f call_ns__myMetho\n+0018f950: 6428 2661 6d70 3b3c 6120 636c 6173 733d d(&so\n+0018f980: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
    ... // error
    .
    else\n+0018fa10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n+0018fa30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0018fa40: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n+0018fa50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0018fa70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0018fa80: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0018fa90: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0018faa0: 6761 3863 3238 6432 3934 3362 6565 3761 ga8c28d2943bee7a\n+0018fab0: 6135 6333 6666 6166 3332 3830 3362 3331 a5c3ffaf32803b31\n+0018fac0: 6264 223e 736f 6170 5f63 6c72 5f6f 6d6f bd\">soap_clr_omo\n+0018fad0: 6465 3c2f 613e 2826 616d 703b 3c61 2063 de(&soap, \n+0018fb60: 534f 4150 5f45 4e43 5f5a 4c49 423c 2f61 SOAP_ENC_ZLIB); // dis\n+0018fb90: 6162 6c65 205a 6c69 6226 2333 393b 7320 able Zlib's \n+0018fba0: 677a 6970 203c 2f73 7061 6e3e 3c2f 6469 gzip .<\n+0018fd70: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0018fd80: 3c70 3e54 6869 7320 7769 6c6c 2073 656e

    This will sen\n+0018fd90: 6420 6120 636f 6d70 7265 7373 6564 2053 d a compressed S\n+0018fda0: 4f41 502f 584d 4c20 7265 7175 6573 7420 OAP/XML request \n+0018fdb0: 746f 2061 2073 6572 7669 6365 2c20 7072 to a service, pr\n+0018fdc0: 6f76 6964 6564 2074 6861 7420 5a6c 6962 ovided that Zlib\n+0018fdd0: 2069 7320 696e 7374 616c 6c65 6420 616e is installed an\n+0018fde0: 6420 6c69 6e6b 6564 2077 6974 6820 7468 d linked with th\n+0018fdf0: 6520 6170 706c 6963 6174 696f 6e20 616e e application an\n+0018fe00: 6420 7468 6520 636f 6d70 696c 652d 7469 d the compile-ti\n+0018fe10: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W\n+0018fe20: 4954 485f 475a 4950 3c2f 636f 6465 3e20 ITH_GZIP \n+0018fe30: 6f70 7469 6f6e 2077 6173 2075 7365 6420 option was used \n+0018fe40: 746f 2063 6f6d 7069 6c65 2074 6865 2073 to compile the s\n+0018fe50: 6f75 7263 6573 2e20 5265 6365 6976 696e ources. Receivin\n+0018fe60: 6720 636f 6d70 7265 7373 6564 2053 4f41 g compressed SOA\n+0018fe70: 502f 584d 4c20 6f76 6572 2048 5454 5020 P/XML over HTTP \n+0018fe80: 6569 7468 6572 2069 6e20 677a 6970 206f either in gzip o\n+0018fe90: 7220 6465 666c 6174 6520 666f 726d 6174 r deflate format\n+0018fea0: 7320 6973 2061 7574 6f6d 6174 6963 2e20 s is automatic. \n+0018feb0: 5468 6520 3c63 6f64 653e 2353 4f41 505f The #SOAP_\n+0018fec0: 454e 435f 5a4c 4942 3c2f 636f 6465 3e20 ENC_ZLIB \n+0018fed0: 666c 6167 2064 6f65 7320 6e6f 7420 6861 flag does not ha\n+0018fee0: 7665 2074 6f20 6265 2073 6574 2061 7420 ve to be set at \n+0018fef0: 7468 6520 7365 7276 6572 2073 6964 6520 the server side \n+0018ff00: 746f 2061 6363 6570 7420 636f 6d70 7265 to accept compre\n+0018ff10: 7373 6564 206d 6573 7361 6765 732e 2052 ssed messages. R\n+0018ff20: 6561 6469 6e67 2061 6e64 2072 6563 6569 eading and recei\n+0018ff30: 7669 6e67 2067 7a69 7020 636f 6d70 7265 ving gzip compre\n+0018ff40: 7373 6564 2053 4f41 502f 584d 4c20 7769 ssed SOAP/XML wi\n+0018ff50: 7468 6f75 7420 4854 5450 2068 6561 6465 thout HTTP heade\n+0018ff60: 7273 2028 652e 672e 2077 6974 6820 6f74 rs (e.g. with ot\n+0018ff70: 6865 7220 7472 616e 7370 6f72 7420 7072 her transport pr\n+0018ff80: 6f74 6f63 6f6c 7329 2069 7320 616c 736f otocols) is also\n+0018ff90: 2061 7574 6f6d 6174 6963 2e3c 2f70 3e0a automatic.

    .\n+0018ffa0: 3c70 3e54 6f20 636f 6e74 726f 6c20 7468

    To control th\n+0018ffb0: 6520 6c65 7665 6c20 6f66 2063 6f6d 7072 e level of compr\n+0018ffc0: 6573 7369 6f6e 2066 6f72 206f 7574 626f ession for outbo\n+0018ffd0: 756e 6420 6d65 7373 6167 6573 2c20 796f und messages, yo\n+0018ffe0: 7520 6361 6e20 7365 7420 7468 6520 3c63 u can set the soap::z_\n+001900b0: 6c65 7665 6c3c 2f61 3e3c 2f63 6f64 653e level\n+001900c0: 2074 6f20 6120 7661 6c75 6520 6265 7477 to a value betw\n+001900d0: 6565 6e20 3120 616e 6420 392c 2077 6865 een 1 and 9, whe\n+001900e0: 7265 2031 2069 7320 7468 6520 6265 7374 re 1 is the best\n+001900f0: 2073 7065 6564 2061 6e64 2039 2069 7320 speed and 9 is \n+00190100: 7468 6520 6265 7374 2063 6f6d 7072 6573 the best compres\n+00190110: 7369 6f6e 2028 6465 6661 756c 7420 6973 sion (default is\n+00190120: 2036 292e 2046 6f72 2065 7861 6d70 6c65 6). For example\n+00190130: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    soap_init(\n+001901c0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+001901f0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+00190210: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_om\n+00190270: 6f64 653c 2f61 3e28 2661 6d70 3b3c 6120 ode(&soap, SOAP_ENC_ZLIB);
    .soap.z_level = 9; //\n+001903d0: 2062 6573 7420 636f 6d70 7265 7373 696f best compressio\n+001903e0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n+001903f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n+001904a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    unsigned sho\n+001904c0: 7274 207a 5f6c 6576 656c 3c2f 6469 763e rt z_level
    \n+001904d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n+001904f0: 6520 636f 6d70 7265 7373 696f 6e20 6c65 e compression le\n+00190500: 7665 6c20 666f 7220 677a 6970 2063 6f6d vel for gzip com\n+00190510: 7072 6573 7369 6f6e 2028 303d 6e6f 6e65 pression (0=none\n+00190520: 2c20 313d 6661 7374 2074 6f20 393d 6265 , 1=fast to 9=be\n+00190530: 7374 2920 6465 6661 756c 7420 6c65 7665 st) default leve\n+00190540: 6c20 6973 2036 2e3c 2f64 6976 3e3c 6469 l is 6.
    \n+00190560: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:37\n+00190580: 3034 3c2f 6469 763e 3c2f 6469 763e 0a3c 04
    .<\n+00190590: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    To veri\n+001905b0: 6679 2061 6e64 206d 6f6e 6974 6f72 2063 fy and monitor c\n+001905c0: 6f6d 7072 6573 7369 6f6e 2072 6174 6573 ompression rates\n+001905d0: 2c20 796f 7520 6361 6e20 7573 6520 7468 , you can use th\n+001905e0: 6520 7661 6c75 6573 203c 636f 6465 3e3c e values <\n+001905f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00190600: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00190610: 6d6c 2361 3663 6331 3561 3131 6138 3937 ml#a6cc15a11a897\n+00190620: 6364 6538 3166 3433 3033 3836 3664 6637 cde81f4303866df7\n+00190630: 3437 6163 2220 7469 746c 653d 2254 6865 47ac\" title=\"The\n+00190640: 2063 6f6d 7072 6573 7369 6f6e 2072 6174 compression rat\n+00190650: 696f 203d 2063 6f6d 7072 6573 7365 642e io = compressed.\n+00190660: 7369 7a65 2f75 6e63 6f6d 7072 6573 7365 size/uncompresse\n+00190670: 642e 7369 7a65 206f 6620 7468 6520 636f d.size of the co\n+00190680: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message\n+00190690: 2072 6563 6569 7665 642e 223e 736f 6170 received.\">soap\n+001906a0: 3a3a 7a5f 7261 7469 6f5f 696e 3c2f 613e ::z_ratio_in\n+001906b0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap:\n+00190770: 3a7a 5f72 6174 696f 5f6f 7574 3c2f 613e :z_ratio_out\n+00190780: 3c2f 636f 6465 3e2e 2054 6865 7365 2074 . These t\n+00190790: 776f 2066 6c6f 6174 2076 616c 7565 7320 wo float values \n+001907a0: 6c69 6520 6265 7477 6565 6e20 302e 3020 lie between 0.0 \n+001907b0: 616e 6420 312e 3020 616e 6420 6578 7072 and 1.0 and expr\n+001907c0: 6573 7320 7468 6520 7261 7469 6f20 6f66 ess the ratio of\n+001907d0: 2074 6865 2063 6f6d 7072 6573 7365 6420 the compressed \n+001907e0: 6d65 7373 6167 6520 6c65 6e67 7468 206f message length o\n+001907f0: 7665 7220 756e 636f 6d70 7265 7373 6564 ver uncompressed\n+00190800: 206d 6573 7361 6765 206c 656e 6774 682e message length.\n+00190810: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    if\n+00190860: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n+00190870: 6d79 4d65 7468 6f64 2826 616d 703b 3c61 myMethod(&soap, .\n+001908b0: 2e2e 2929 3c2f 6469 763e 0a3c 6469 7620 ..))
    .
    {.
    {
    .<\n-001908f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00190900: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-00190920: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error ... // error
    .
    }.
    }
    .<\n-00190960: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00190970: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    {.
    printf(\n-001909c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001909e0: 743b 436f 6d70 7265 7373 696f 6e20 7261 t;Compression ra\n-001909f0: 7469 6f3a 2025 6625 2520 2869 6e29 2025 tio: %f%% (in) %\n-00190a00: 6625 2520 286f 7574 295c 6e26 7175 6f74 f%% (out)\\n"\n-00190a10: 3b3c 2f73 7061 6e3e 2c20 3130 302a 3c61 ;, 100*soap.z_ratio_o\n-00190aa0: 7574 3c2f 613e 2c20 3130 302a 3c61 2063 ut, 100*soap.z_ratio_in<\n-00190b30: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n-00190b50: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su\n-00190b70: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    }
    .
    \n-00190c50: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    float z_rati\n-00190c70: 6f5f 696e 3c2f 6469 763e 3c64 6976 2063 o_in
    The\n-00190c90: 2063 6f6d 7072 6573 7369 6f6e 2072 6174 compression rat\n-00190ca0: 696f 203d 2063 6f6d 7072 6573 7365 642e io = compressed.\n-00190cb0: 7369 7a65 2f75 6e63 6f6d 7072 6573 7365 size/uncompresse\n-00190cc0: 642e 7369 7a65 206f 6620 7468 6520 636f d.size of the co\n-00190cd0: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message\n-00190ce0: 2072 6563 6569 7665 642e 3c2f 6469 763e received.
    \n-00190cf0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00190d10: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00190d20: 3a33 3730 393c 2f64 6976 3e3c 2f64 6976 :3709
    .
    <\n-00190d90: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-00190da0: 6170 2e68 746d 6c23 6162 3964 3061 6162 ap.html#ab9d0aab\n-00190db0: 3066 3839 6532 3130 3962 6130 3263 6134 0f89e2109ba02ca4\n-00190dc0: 3630 6332 3139 3534 3122 3e73 6f61 703a 60c219541\">soap:\n-00190dd0: 3a7a 5f72 6174 696f 5f6f 7574 3c2f 613e :z_ratio_out\n-00190de0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    float \n-00190e00: 7a5f 7261 7469 6f5f 6f75 743c 2f64 6976 z_ratio_out
    The compress\n-00190e30: 696f 6e20 7261 7469 6f20 3d20 636f 6d70 ion ratio = comp\n-00190e40: 7265 7373 6564 2e73 697a 652f 756e 636f ressed.size/unco\n-00190e50: 6d70 7265 7373 6564 2e73 697a 6520 6f66 mpressed.size of\n-00190e60: 2074 6865 2063 6f6d 7072 6573 7365 6420 the compressed \n-00190e70: 6d65 7373 6167 6520 7365 6e74 2e3c 2f64 message sent.
    Definit\n-00190ea0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-00190eb0: 322e 683a 3337 3134 3c2f 6469 763e 3c2f 2.h:3714
    .

    N\n-00190ee0: 6f74 653a 206c 6f77 6572 2072 6174 696f ote: lower ratio\n-00190ef0: 7320 6d65 616e 2068 6967 6865 7220 636f s mean higher co\n-00190f00: 6d70 7265 7373 696f 6e20 7261 7465 732e mpression rates.\n-00190f10: 3c2f 703e 0a3c 703e 436f 6d70 7265 7373

    .

    Compress\n-00190f20: 6564 2074 7261 6e73 6665 7273 2072 6571 ed transfers req\n-00190f30: 7569 7265 2062 7566 6665 7269 6e67 2074 uire buffering t\n-00190f40: 6865 2065 6e74 6972 6520 6f75 7470 7574 he entire output\n-00190f50: 206d 6573 7361 6765 2074 6f20 6465 7465 message to dete\n-00190f60: 726d 696e 6520 4854 5450 206d 6573 7361 rmine HTTP messa\n-00190f70: 6765 206c 656e 6774 682e 2054 6869 7320 ge length. This \n-00190f80: 6d65 616e 7320 7468 6174 2074 6865 203c means that the <\n-00190f90: 636f 6465 3e23 534f 4150 5f49 4f5f 5354 code>#SOAP_IO_ST\n-00190fa0: 4f52 453c 2f63 6f64 653e 2066 6c61 6720 ORE flag \n-00190fb0: 6973 2061 7574 6f6d 6174 6963 616c 6c79 is automatically\n-00190fc0: 2073 6574 2077 6865 6e20 7468 6520 3c63 set when the #SOAP_ENC_ZL\n-00190fe0: 4942 3c2f 636f 6465 3e20 666c 6167 2069 IB flag i\n-00190ff0: 7320 7365 7420 746f 2073 656e 6420 636f s set to send co\n-00191000: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message\n-00191010: 732e 2054 6865 2075 7365 206f 6620 4854 s. The use of HT\n-00191020: 5450 2063 6875 6e6b 696e 6720 7369 676e TP chunking sign\n-00191030: 6966 6963 616e 746c 7920 7265 6475 6365 ificantly reduce\n-00191040: 7320 6d65 6d6f 7279 2075 7361 6765 2061 s memory usage a\n-00191050: 6e64 206d 6179 2073 7065 6564 2075 7020 nd may speed up \n-00191060: 7468 6520 7472 616e 736d 6973 7369 6f6e the transmission\n-00191070: 206f 6620 636f 6d70 7265 7373 6564 2053 of compressed S\n-00191080: 4f41 502f 584d 4c20 6d65 7373 6167 6573 OAP/XML messages\n-00191090: 2e20 5468 6973 2069 7320 6163 636f 6d70 . This is accomp\n-001910a0: 6c69 7368 6564 2062 7920 7365 7474 696e lished by settin\n-001910b0: 6720 7468 6520 3c63 6f64 653e 2353 4f41 g the #SOA\n-001910c0: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK flag with #SOAP_ENC_ZLIB\n-001910f0: 3c2f 636f 6465 3e20 666f 7220 7468 6520 for the \n-00191100: 6f75 7470 7574 206d 6f64 652e 2048 6f77 output mode. How\n-00191110: 6576 6572 2c20 736f 6d65 2057 6562 2073 ever, some Web s\n-00191120: 6572 7665 7273 2064 6f20 6e6f 7420 6163 ervers do not ac\n-00191130: 6365 7074 2048 5454 5020 6368 756e 6b65 cept HTTP chunke\n-00191140: 6420 7265 7175 6573 7420 6d65 7373 6167 d request messag\n-00191150: 6573 2028 6576 656e 2077 6865 6e20 7468 es (even when th\n-00191160: 6579 2072 6574 7572 6e20 4854 5450 2063 ey return HTTP c\n-00191170: 6875 6e6b 6564 206d 6573 7361 6765 7321 hunked messages!\n-00191180: 292e 2053 7461 6e64 2d61 6c6f 6e65 2067 ). Stand-alone g\n-00191190: 534f 4150 2073 6572 7669 6365 7320 616c SOAP services al\n-001911a0: 7761 7973 2061 6363 6570 7420 6368 756e ways accept chun\n-001911b0: 6b65 6420 7265 7175 6573 7420 6d65 7373 ked request mess\n-001911c0: 6167 6573 2e3c 2f70 3e0a 3c70 3e54 6f20 ages.

    .

    To \n-001911d0: 7265 7374 7269 6374 2074 6865 2063 6f6d restrict the com\n-001911e0: 7072 6573 7369 6f6e 2074 6f20 7468 6520 pression to the \n-001911f0: 6465 666c 6174 6520 666f 726d 6174 206f deflate format o\n-00191200: 6e6c 792c 2063 6f6d 7069 6c65 2074 6865 nly, compile the\n-00191210: 2073 6f75 7263 6573 2077 6974 6820 7468 sources with th\n-00191220: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f\n-00191230: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n-00191240: 5a4c 4942 3c2f 636f 6465 3e2e 2054 6869 ZLIB. Thi\n-00191250: 7320 6c69 6d69 7473 2063 6f6d 7072 6573 s limits compres\n-00191260: 7369 6f6e 2061 6e64 2064 6563 6f6d 7072 sion and decompr\n-00191270: 6573 7369 6f6e 2074 6f20 7468 6520 6465 ession to the de\n-00191280: 666c 6174 6520 666f 726d 6174 2e20 4f6e flate format. On\n-00191290: 6c79 2070 6c61 696e 2061 6e64 2064 6566 ly plain and def\n-001912a0: 6c61 7465 6420 6d65 7373 6167 6573 2063 lated messages c\n-001912b0: 616e 2062 6520 6578 6368 616e 6765 642c an be exchanged,\n-001912c0: 2067 7a69 7020 6973 206e 6f74 2073 7570 gzip is not sup\n-001912d0: 706f 7274 6564 2077 6974 6820 7468 6973 ported with this\n-001912e0: 206f 7074 696f 6e2e 2052 6563 6569 7669 option. Receivi\n-001912f0: 6e67 2067 7a69 7020 636f 6d70 7265 7373 ng gzip compress\n-00191300: 6564 2063 6f6e 7465 6e74 2069 7320 6175 ed content is au\n-00191310: 746f 6d61 7469 632c 2065 7665 6e20 696e tomatic, even in\n-00191320: 2074 6865 2061 6273 656e 6365 206f 6620 the absence of \n-00191330: 4854 5450 2068 6561 6465 7273 2e20 5265 HTTP headers. Re\n-00191340: 6365 6976 696e 6720 6465 666c 6174 6520 ceiving deflate \n-00191350: 636f 6d70 7265 7373 6564 2063 6f6e 7465 compressed conte\n-00191360: 6e74 2069 7320 6e6f 7420 6175 746f 6d61 nt is not automa\n-00191370: 7469 6320 696e 2074 6865 2061 6273 656e tic in the absen\n-00191380: 6365 206f 6620 4854 5450 2068 6561 6465 ce of HTTP heade\n-00191390: 7273 2061 6e64 2072 6571 7569 7265 7320 rs and requires \n-001913a0: 7468 6520 666c 6167 203c 636f 6465 3e23 the flag #\n-001913b0: 534f 4150 5f45 4e43 5f5a 4c49 423c 2f63 SOAP_ENC_ZLIB to be set f\n-001913d0: 6f72 2074 6865 2069 6e70 7574 206d 6f64 or the input mod\n-001913e0: 6520 746f 2064 6563 6f6d 7072 6573 7320 e to decompress \n-001913f0: 6465 666c 6174 6564 2064 6174 612e 3c2f deflated data..

    <\n-00191420: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning<\n-00191430: 6464 3e49 7420 6973 2069 6d70 6f72 7461 dd>It is importa\n-00191440: 6e74 2074 6861 7420 7468 6520 3c63 6f64 nt that the #WITH_GZIP and #W\n-00191470: 4954 485f 5a4c 4942 3c2f 636f 6465 3e20 ITH_ZLIB \n-00191480: 6d61 6372 6f73 206d 7573 7420 6265 2063 macros must be c\n-00191490: 6f6e 7369 7374 656e 746c 7920 6465 6669 onsistently defi\n-001914a0: 6e65 6420 746f 2063 6f6d 7069 6c65 2074 ned to compile t\n-001914b0: 6865 2073 6f75 7263 6573 2c20 7375 6368 he sources, such\n-001914c0: 2061 7320 3c65 6d3e 3c63 6f64 653e 6773 as gs\n-001914d0: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp\n-001914e0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , soapC.cp\n-00191500: 703c 2f63 6f64 653e 3c2f 656d 3e2c 203c p, <\n-00191510: 656d 3e3c 636f 6465 3e73 6f61 7043 6c69 em>soapCli\n-00191520: 656e 742e 6370 703c 2f63 6f64 653e 3c2f ent.cpp, s\n-00191540: 6f61 7053 6572 7665 722e 6370 703c 2f63 oapServer.cpp, and a\n-00191560: 6c6c 2061 7070 6c69 6361 7469 6f6e 2073 ll application s\n-00191570: 6f75 7263 6573 2074 6861 7420 696e 636c ources that incl\n-00191580: 7564 6520 3c65 6d3e 3c63 6f64 653e 6773 ude gs\n-00191590: 6f61 702f 7374 6473 6f61 7032 2e68 3c2f oap/stdsoap2.h or soapH.h<\n-001915c0: 2f63 6f64 653e 3c2f 656d 3e2e 2049 6620 /code>. If \n-001915d0: 7468 6520 6d61 6372 6f73 2061 7265 206e the macros are n\n-001915e0: 6f74 2063 6f6e 7369 7374 656e 746c 7920 ot consistently \n-001915f0: 7573 6564 2c20 7468 6520 6170 706c 6963 used, the applic\n-00191600: 6174 696f 6e20 7769 6c6c 2063 7261 7368 ation will crash\n-00191610: 2064 7565 2074 6f20 6120 6d69 736d 6174 due to a mismat\n-00191620: 6368 6573 2069 6e20 7468 6520 6465 636c ches in the decl\n-00191630: 6172 6174 696f 6e20 616e 6420 6163 6365 aration and acce\n-00191640: 7373 206f 6620 7468 6520 3c63 6f64 653e ss of the \n-00191650: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001916a0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001916b0: 6578 742e 3c2f 6464 3e3c 2f64 6c3e 0a3c ext.
    .<\n-001916c0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-001916e0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-001916f0: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Client-side co\n-00191730: 6f6b 6965 2073 7570 706f 7274 3c2f 6832 okie support.

    Client-side\n-00191750: 2063 6f6f 6b69 6520 7375 7070 6f72 7420 cookie support \n-00191760: 6973 206f 7074 696f 6e61 6c2e 2054 6f20 is optional. To \n-00191770: 656e 6162 6c65 2063 6f6f 6b69 6520 7375 enable cookie su\n-00191780: 7070 6f72 742c 2063 6f6d 7069 6c65 2061 pport, compile a\n-00191790: 6c6c 2073 6f75 7263 6573 2077 6974 6820 ll sources with \n-001917a0: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time\n-001917b0: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT\n-001917c0: 485f 434f 4f4b 4945 533c 2f63 6f64 653e H_COOKIES\n-001917d0: 2c20 666f 7220 6578 616d 706c 653a 203c , for example: <\n-001917e0: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     c++ -D\n-00191800: 5749 5448 5f43 4f4f 4b49 4553 202d 6f20  WITH_COOKIES -o \n-00191810: 6d79 636c 6965 6e74 2073 7464 736f 6170  myclient stdsoap\n-00191820: 322e 6370 7020 736f 6170 432e 6370 7020  2.cpp soapC.cpp \n-00191830: 736f 6170 436c 6965 6e74 2e63 7070 0a3c  soapClient.cpp.<\n-00191840: 2f70 7265 3e3c 703e 206f 7220 6164 6420  /pre>

    or add \n-00191850: 7468 6520 666f 6c6c 6f77 696e 6720 6c69 the following li\n-00191860: 6e65 2074 6f20 3c65 6d3e 3c63 6f64 653e ne to \n-00191870: 7374 6473 6f61 702e 683c 2f63 6f64 653e stdsoap.h\n-00191880: 3c2f 656d 3e3a 3c2f 703e 0a3c 6469 7620 :

    .
    #d\n-001918d0: 6566 696e 6520 5749 5448 5f43 4f4f 4b49 efine WITH_COOKI\n-001918e0: 4553 3c2f 7370 616e 3e3c 2f64 6976 3e0a ES
    .\n-001918f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Client\n-00191910: 2d73 6964 6520 636f 6f6b 6965 2073 7570 -side cookie sup\n-00191920: 706f 7274 2069 7320 6675 6c6c 7920 6175 port is fully au\n-00191930: 746f 6d61 7469 632e 2053 6f20 6a75 7374 tomatic. So just\n-00191940: 2063 6f6d 7069 6c65 203c 656d 3e3c 636f compile gsoap/stdsoap\n-00191960: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp with the compi\n-00191980: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_COOKIES\n-001919a0: 3c2f 636f 6465 3e20 746f 2065 6e61 626c to enabl\n-001919b0: 6520 636f 6f6b 6965 2d62 6173 6564 2073 e cookie-based s\n-001919c0: 6573 7369 6f6e 2063 6f6e 7472 6f6c 2069 ession control i\n-001919d0: 6e20 796f 7572 2063 6c69 656e 742e 3c2f n your client..

    A cookie s\n-001919f0: 746f 7265 2077 6974 6820 636f 6f6b 6965 tore with cookie\n-00191a00: 7320 6973 206b 6570 7420 616e 6420 7265 s is kept and re\n-00191a10: 7475 726e 6564 2074 6f20 7468 6520 6170 turned to the ap\n-00191a20: 7072 6f70 7269 6174 6520 7365 7276 6572 propriate server\n-00191a30: 7320 7768 656e 2074 6865 2063 6c69 656e s when the clien\n-00191a40: 7420 636f 6e6e 6563 7473 2074 6f20 7468 t connects to th\n-00191a50: 6573 6520 7365 7276 6572 732e 2043 6f6f ese servers. Coo\n-00191a60: 6b69 6573 2061 7265 206e 6f74 2061 7574 kies are not aut\n-00191a70: 6f6d 6174 6963 616c 6c79 2073 6176 6564 omatically saved\n-00191a80: 2074 6f20 6120 6669 6c65 2062 7920 6120 to a file by a \n-00191a90: 636c 6965 6e74 2e20 416e 2065 7861 6d70 client. An examp\n-00191aa0: 6c65 2063 6f6f 6b69 6520 6669 6c65 206d le cookie file m\n-00191ab0: 616e 6167 6572 2069 7320 696e 636c 7564 anager is includ\n-00191ac0: 6564 2061 7320 616e 2065 7874 7261 7320 ed as an extras \n-00191ad0: 696e 2074 6865 2067 534f 4150 2070 6163 in the gSOAP pac\n-00191ae0: 6b61 6765 2e20 596f 7520 6361 6e20 7265 kage. You can re\n-00191af0: 6d6f 7665 2061 6c6c 2063 6f6f 6b69 6573 move all cookies\n-00191b00: 2066 726f 6d20 6120 3c63 6f64 653e 3c61 from a soap contex\n-00191b70: 7420 6279 2063 616c 6c69 6e67 203c 636f t by calling soap_free_coo\n-00191b90: 6b69 6573 2873 6f61 7029 3c2f 636f 6465 kies(soap), which also ha\n-00191bb0: 7070 656e 7320 7768 656e 2079 6f75 2063 ppens when you c\n-00191bc0: 616c 6c20 3c63 6f64 653e 736f 6170 5f64 all soap_d\n-00191bd0: 6f6e 6528 736f 6170 293c 2f63 6f64 653e one(soap)\n-00191be0: 2e3c 2f70 3e0a 3c70 3e54 6f20 6176 6f69 .

    .

    To avoi\n-00191bf0: 6420 2263 6f6f 6b69 6520 7374 6f72 6d73 d \"cookie storms\n-00191c00: 2220 6361 7573 6564 2062 7920 6d61 6c69 \" caused by mali\n-00191c10: 6369 6f75 7320 7365 7276 6572 7320 7468 cious servers th\n-00191c20: 6174 2072 6574 7572 6e20 616e 2075 6e72 at return an unr\n-00191c30: 6561 736f 6e61 626c 6520 616d 6f75 6e74 easonable amount\n-00191c40: 206f 6620 636f 6f6b 6965 732c 2067 534f of cookies, gSO\n-00191c50: 4150 2063 6c69 656e 7473 2f73 6572 7665 AP clients/serve\n-00191c60: 7273 2061 7265 206c 696d 6974 6564 2074 rs are limited t\n-00191c70: 6f20 6120 636f 6f6b 6965 2073 746f 7265 o a cookie store\n-00191c80: 2073 697a 6520 6f66 203c 636f 6465 3e3c size of <\n-00191c90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00191ca0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00191cb0: 6d6c 2361 3434 6264 3766 6338 6261 3038 ml#a44bd7fc8ba08\n-00191cc0: 6231 6465 6332 6630 3832 3939 6437 6637 b1dec2f08299d7f7\n-00191cd0: 3233 6464 2220 7469 746c 653d 2255 7365 23dd\" title=\"Use\n-00191ce0: 722d 6465 6669 6e61 626c 6520 6d61 7869 r-definable maxi\n-00191cf0: 6d75 6d20 6e75 6d62 6572 206f 6620 6163 mum number of ac\n-00191d00: 7469 7665 2063 6f6f 6b69 6573 2061 6c6c tive cookies all\n-00191d10: 6f77 6564 2074 6f20 6265 2073 6574 2077 owed to be set w\n-00191d20: 6974 6820 736f 6170 5f73 6574 5f63 6f6f ith soap_set_coo\n-00191d30: 6b69 6520 6265 666f 7265 2063 6f6f 6b69 kie before cooki\n-00191d40: 6520 2e2e 2e22 3e73 6f61 703a 3a63 6f6f e ...\">soap::coo\n-00191d50: 6b69 655f 6d61 783c 2f61 3e3c 2f63 6f64 kie_max that the user\n-00191d70: 2063 616e 2063 6861 6e67 652c 2066 6f72 can change, for\n-00191d80: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

    .
    stru\n-00191dd0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n-00191ea0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n-00191ef0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00191f00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00191f10: 6874 6d6c 2361 3434 6264 3766 6338 6261 html#a44bd7fc8ba\n-00191f20: 3038 6231 6465 6332 6630 3832 3939 6437 08b1dec2f08299d7\n-00191f30: 6637 3233 6464 223e 636f 6f6b 6965 5f6d f723dd\">cookie_m\n-00191f40: 6178 3c2f 613e 203d 2031 303b 3c2f 6469 ax = 10;.
    \n-00191fb0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-00191ff0: 3a3a 636f 6f6b 6965 5f6d 6178 3c2f 613e ::cookie_max\n-00192000: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int co\n-00192020: 6f6b 6965 5f6d 6178 3c2f 6469 763e 3c64 okie_max
    User-definable \n-00192050: 6d61 7869 6d75 6d20 6e75 6d62 6572 206f maximum number o\n-00192060: 6620 6163 7469 7665 2063 6f6f 6b69 6573 f active cookies\n-00192070: 2061 6c6c 6f77 6564 2074 6f20 6265 2073 allowed to be s\n-00192080: 6574 2077 6974 6820 736f 6170 5f73 6574 et with soap_set\n-00192090: 5f63 6f6f 6b69 6520 6265 666f 7265 2063 _cookie before c\n-001920a0: 6f6f 6b69 6520 2e2e 2e3c 2f64 6976 3e3c ookie ...
    <\n-001920b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-001920c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-001920d0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-001920e0: 3239 3733 3c2f 6469 763e 3c2f 6469 763e 2973

    \n-001920f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The c\n-00192110: 6f6f 6b69 6520 7374 6f72 6520 6973 2061 ookie store is a\n-00192120: 206c 696e 6b65 6420 6c69 7374 206f 6620 linked list of \n-00192130: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n-00192180: 705f 636f 6f6b 6965 3c2f 613e 3c2f 636f p_cookie structures p\n-001921a0: 6f69 6e74 6564 2074 6f20 6279 203c 636f ointed to by \n-00192230: 736f 6170 3a3a 636f 6f6b 6965 733c 2f61 soap::cookies.

    .Since the cooki\n-00192260: 6520 7374 6f72 6520 6973 206c 696e 6b65 e store is linke\n-00192270: 6420 746f 2074 6865 2063 7572 7265 6e74 d to the current\n-00192280: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context, and \n-001922f0: 6561 6368 2074 6872 6561 6420 6d75 7374 each thread must\n-00192300: 2075 7365 2069 7473 206f 776e 2063 6f6e use its own con\n-00192310: 7465 7874 2c20 6561 6368 2074 6872 6561 text, each threa\n-00192320: 6420 616c 736f 2068 6173 2069 7473 206f d also has its o\n-00192330: 776e 2063 6f6f 6b69 6520 7374 6f72 652e wn cookie store.\n-00192340: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n-00192360: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n-00192370: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    <\n-00192380: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-00192390: 2069 643d 2273 6572 7665 7263 6f6f 6b69 id=\"servercooki\n-001923a0: 6522 3e3c 2f61 3e0a 5365 7276 6572 2d73 e\">.Server-s\n-001923b0: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo\n-001923c0: 7274 3c2f 6832 3e0a 3c70 3e54 6869 7320 rt

    .

    This \n-001923d0: 6665 6174 7572 6520 6973 206e 6f74 2072 feature is not r\n-001923e0: 6563 6f6d 6d65 6e64 6564 2074 6f20 696d ecommended to im\n-001923f0: 706c 656d 656e 7420 7374 6174 6520 696e plement state in\n-00192400: 2073 7461 6e64 2d61 6c6f 6e65 2073 6572 stand-alone ser\n-00192410: 7665 7273 2e20 436f 6f6b 6965 7320 6d61 vers. Cookies ma\n-00192420: 7920 7265 7175 6972 6520 6120 6661 6972 y require a fair\n-00192430: 2061 6d6f 756e 7420 6f66 2070 726f 6365 amount of proce\n-00192440: 7373 696e 6720 6f76 6572 6865 6164 2061 ssing overhead a\n-00192450: 6e64 2061 7265 206e 6f74 2069 6e20 6661 nd are not in fa\n-00192460: 6374 206e 6565 6465 6420 746f 2069 6d70 ct needed to imp\n-00192470: 6c65 6d65 6e74 2073 7461 7465 6675 6c20 lement stateful \n-00192480: 7365 7276 6963 6573 2c20 7768 6963 6820 services, which \n-00192490: 6973 2074 7970 6963 616c 6c79 2070 6572 is typically per\n-001924a0: 666f 726d 6564 2077 6974 6820 7365 7373 formed with sess\n-001924b0: 696f 6e20 4944 7320 696e 2058 4d4c 2f4a ion IDs in XML/J\n-001924c0: 534f 4e20 6d65 7373 6167 6573 206f 7220 SON messages or \n-001924d0: 6279 2070 6173 7369 6e67 2074 6865 2073 by passing the s\n-001924e0: 6573 7369 6f6e 2049 4473 2076 6961 2074 ession IDs via t\n-001924f0: 6865 2055 524c 2e3c 2f70 3e0a 3c70 3e53 he URL.

    .

    S\n-00192500: 6572 7665 722d 7369 6465 2063 6f6f 6b69 erver-side cooki\n-00192510: 6520 7375 7070 6f72 7420 6973 206f 7074 e support is opt\n-00192520: 696f 6e61 6c2e 2054 6f20 656e 6162 6c65 ional. To enable\n-00192530: 2063 6f6f 6b69 6520 7375 7070 6f72 742c cookie support,\n-00192540: 2063 6f6d 7069 6c65 2061 6c6c 2073 6f75 compile all sou\n-00192550: 7263 6573 2077 6974 6820 636f 6d70 696c rces with compil\n-00192560: 652d 7469 6d65 2066 6c61 6720 3c63 6f64 e-time flag #WITH_COOKIES<\n-00192580: 2f63 6f64 653e 3a20 3c2f 703e 3c70 7265 /code>:

    c++ -DWITH_CO\n-001925b0: 4f4b 4945 5320 2d6f 206d 7973 6572 7665 OKIES -o myserve\n-001925c0: 7220 2e2e 2e0a 3c2f 7072 653e 3c70 3e20 r ....

    \n-001925d0: 5365 6520 4150 4920 646f 6375 6d65 6e74 See API document\n-001925e0: 6174 696f 6e20 4d6f 6475 6c65 203c 6120 ation Module HTT\n-00192620: 5020 636f 6f6b 6965 2066 756e 6374 696f P cookie functio\n-00192630: 6e73 3c2f 613e 2066 6f72 2074 6865 2063 ns for the c\n-00192640: 6f6f 6b69 6520 4150 4920 6675 6e63 7469 ookie API functi\n-00192650: 6f6e 732e 2053 6565 2074 6865 203c 6120 ons. See the HTTP sessi\n-00192690: 6f6e 7320 706c 7567 696e 3c2f 613e 2066 ons plugin f\n-001926a0: 6f72 2048 5454 5020 7365 7373 696f 6e20 or HTTP session \n-001926b0: 6d61 6e61 6765 6d65 6e74 2077 6974 6820 management with \n-001926c0: 636f 6f6b 6965 7320 7468 6174 2069 7320 cookies that is \n-001926d0: 7265 7175 6972 6564 2066 6f72 2073 6572 required for ser\n-001926e0: 7665 722d 7369 6465 2073 6573 7369 6f6e ver-side session\n-001926f0: 2063 6f6e 7472 6f6c 2e20 5468 6520 3c63 control. The #WITH_COOKIE\n-00192710: 533c 2f63 6f64 653e 2066 6c61 6720 6973 S flag is\n-00192720: 2075 7365 6c65 7373 2077 6974 686f 7574 useless without\n-00192730: 2073 6572 7665 722d 7369 6465 2073 6573 server-side ses\n-00192740: 7369 6f6e 206d 616e 6167 656d 656e 7420 sion management \n-00192750: 616e 6420 636f 6e74 726f 6c2e 3c2f 703e and control.

    \n-00192760: 0a3c 703e 4865 7265 2069 7320 616e 206f .

    Here is an o\n-00192770: 7665 7276 6965 7720 6f66 2074 6865 2063 verview of the c\n-00192780: 6f6f 6b69 6520 4150 4920 6675 6e63 7469 ookie API functi\n-00192790: 6f6e 733a 3c2f 703e 0a3c 756c 3e0a 3c6c ons:

    ..

    The f\n-00195250: 6f6c 6c6f 7769 6e67 2076 6172 6961 626c ollowing variabl\n-00195260: 6573 206f 6620 7468 6520 3c63 6f64 653e es of the \n-00195270: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001952c0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001952d0: 6578 7420 6172 6520 7573 6564 2074 6f20 ext are used to \n-001952e0: 6465 6669 6e65 2074 6865 2063 7572 7265 define the curre\n-001952f0: 6e74 2064 6f6d 6169 6e20 616e 6420 7061 nt domain and pa\n-00195300: 7468 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 th:

    ..

    The\n-00195640: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::coo\n-001956f0: 6b69 655f 7061 7468 3c2f 613e 3c2f 636f kie_path value is use\n-00195710: 6420 746f 2066 696c 7465 7220 636f 6f6b d to filter cook\n-00195720: 6965 7320 696e 7465 6e64 6564 2066 6f72 ies intended for\n-00195730: 2074 6869 7320 7365 7276 6963 6520 6163 this service ac\n-00195740: 636f 7264 696e 6720 746f 2074 6865 2070 cording to the p\n-00195750: 6174 6820 7072 6566 6978 2072 756c 6573 ath prefix rules\n-00195760: 206f 7574 6c69 6e65 6420 696e 2052 4643 outlined in RFC\n-00195770: 3231 3039 2e3c 2f70 3e0a 3c70 3e54 6865 2109.

    .

    The\n-00195780: 2066 6f6c 6c6f 7769 6e67 2065 7861 6d70 following examp\n-00195790: 6c65 2073 6572 7665 7220 6164 6f70 7473 le server adopts\n-001957a0: 2063 6f6f 6b69 6573 2066 6f72 2073 6573 cookies for ses\n-001957b0: 7369 6f6e 2063 6f6e 7472 6f6c 3a3c 2f70 sion control:.

    int m\n-00195810: 6169 6e28 2920 3c2f 6469 763e 0a3c 6469 ain()
    .{\n-00195830: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-00195870: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00195880: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00195890: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html\">soap <\n-001958a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001958b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001958c0: 6874 6d6c 223e 736f 6170 3c2f 613e 3b20 html\">soap; \n-001958d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int \n-00195910: 6d2c 2073 3b20 3c2f 6469 763e 0a3c 6469 m, s;
    . \n-00195930: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init<\n-00195990: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-001959c0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soa\n-00195a10: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.c\n-00195a60: 6f6f 6b69 655f 646f 6d61 696e 3c2f 613e ookie_domain\n-00195a70: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n-00195a90: 7175 6f74 3b2e 2e2e 2671 756f 743b 3c2f quot;...";
    .\n-00195ac0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.cooki\n-00195b40: 655f 7061 7468 3c2f 613e 203d 203c 7370 e_path = "/\n-00195b70: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-00195b80: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00195b90: 656e 7422 3e2f 2f20 7468 6520 7061 7468 ent\">// the path\n-00195ba0: 2077 6869 6368 2069 7320 7573 6564 2074 which is used t\n-00195bb0: 6f20 6669 6c74 6572 2f73 6574 2063 6f6f o filter/set coo\n-00195bc0: 6b69 6573 2077 6974 6820 7468 6973 2064 kies with this d\n-00195bd0: 6573 7469 6e61 7469 6f6e 203c 2f73 7061 estination
    .
    if\n-00195c20: 2028 6172 6763 2026 6c74 3b20 3229 203c (argc < 2) <\n-00195c30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    soa\n-00195cc0: 705f 6765 7465 6e76 5f63 6f6f 6b69 6573 p_getenv_cookies\n-00195cd0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); // CGI app: gr\n-00195d30: 6162 2063 6f6f 6b69 6573 2066 726f 6d20 ab cookies from \n-00195d40: 2623 3339 3b48 5454 505f 434f 4f4b 4945 'HTTP_COOKIE\n-00195d50: 2623 3339 3b20 656e 7620 7661 7220 3c2f ' env var
    . \n-00195d80: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_serve\n-00195de0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00195e10: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n-00195e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00195e30: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00195e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n-00195e90: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    m\n-00195eb0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_bind\n-00195f10: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00195f40: 703c 2f61 3e2c 204e 554c 4c2c 2061 746f p, NULL, ato\n-00195f50: 6928 6172 6776 5b31 5d29 2c20 3130 293b i(argv[1]), 10);\n-00195f60: 203c 7370 616e 2063 6c61 7373 3d22 636f // small \n-00195f80: 4241 434b 4c4f 4720 666f 7220 6974 6572 BACKLOG for iter\n-00195f90: 6174 6976 6520 7365 7276 6572 733c 2f73 ative servers
    .
    \n-00195fc0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!soap_va\n-00196040: 6c69 645f 736f 636b 6574 3c2f 613e 286d lid_socket(m\n-00196050: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n-00196070: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL\n-00196080: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . \n-001960a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 for\n-001960c0: 3c2f 7370 616e 3e20 283c 7370 616e 2063 (int i \n-001960f0: 3d20 313b 203b 2069 2b2b 2920 3c2f 6469 = 1; ; i++) .
    {
    \n-00196120: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    s = soa\n-00196190: 705f 6163 6365 7074 3c2f 613e 2826 616d p_accept(&am\n-001961a0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .. \n-001962a0: 2020 2020 2020 6578 6974 2845 5849 545f exit(EXIT_\n-001962b0: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
    \n-001962c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_se\n-00196330: 7276 653c 2f61 3e28 2661 6d70 3b3c 6120 rve(&soap); <\n-00196370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_end(\n-001963f0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00196420: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n-00196440: 2020 2020 203c 6120 636c 6173 733d 2263 soap_f\n-001964a0: 7265 655f 636f 6f6b 6965 733c 2f61 3e28 ree_cookies(\n-001964b0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-001964e0: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n-00196500: 7265 6d6f 7665 2061 6c6c 206f 6c64 2063 remove all old c\n-00196510: 6f6f 6b69 6573 2066 726f 6d20 6461 7461 ookies from data\n-00196520: 6261 7365 2073 6f20 6e6f 2069 6e74 6572 base so no inter\n-00196530: 6665 7265 6e63 6520 6f63 6375 7273 2077 ference occurs w\n-00196540: 6974 6820 7468 6520 6172 7269 7661 6c20 ith the arrival \n-00196550: 6f66 206e 6577 2063 6f6f 6b69 6573 203c of new cookies <\n-00196560: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00196580: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    . \n-001965a0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    return 0;
    .<\n-001965f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00196600: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    \n-00196650: 696e 743c 2f73 7061 6e3e 206e 735f 5f77 int ns__w\n-00196660: 6562 6d65 7468 6f64 283c 7370 616e 2063 ebmethod(s\n-00196680: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, .\n-001966f0: 2e2e 2920 3c2f 6469 763e 0a3c 6469 7620 ..)
    .
    {.
    c\n-00196740: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *cookie_value \n-00196780: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_cook\n-001967e0: 6965 5f76 616c 7565 3c2f 613e 283c 6120 ie_value(soap, "\n-00196840: 636f 6f6b 6965 5f6e 616d 6526 7175 6f74 cookie_name"\n-00196850: 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c 2c20 ;, NULL, \n-00196860: 4e55 4c4c 293b 3c2f 6469 763e 0a3c 6469 NULL);
    . \n-00196880: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!cookie_va\n-001968b0: 6c75 6529 2020 2020 2020 2020 2020 2020 lue) \n-001968c0: 2020 2020 3c73 7061 6e20 636c 6173 733d // coo\n-001968e0: 6b69 6520 7265 7475 726e 6564 2062 7920 kie returned by \n-001968f0: 636c 6965 6e74 3f20 3c2f 7370 616e 3e3c client? <\n-00196900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    cook\n-00196920: 6965 5f76 616c 7565 203d 203c 7370 616e ie_value = "ini\n-00196950: 7469 616c 5f76 616c 7565 2671 756f 743b tial_value"\n-00196960: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; /\n-00196980: 2f20 6e6f 3a20 7365 7420 696e 6974 6961 / no: set initia\n-00196990: 6c20 636f 6f6b 6965 2076 616c 7565 203c l cookie value <\n-001969a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001969c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-001969e0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00196a00: 2020 2020 2e2e 2e20 2020 2020 2020 2020 ... \n-00196a10: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00196a20: 2020 2020 3c73 7061 6e20 636c 6173 733d // yes\n-00196a40: 3a20 6d6f 6469 6679 2074 6865 2063 6f6f : modify the coo\n-00196a50: 6b69 6520 7661 6c75 6520 746f 2072 6566 kie value to ref\n-00196a60: 6c65 6374 2074 6865 206e 6577 2073 7461 lect the new sta\n-00196a70: 7465 3c2f 7370 616e 3e3c 2f64 6976 3e0a te
    .\n-00196a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_se\n-00196af0: 745f 636f 6f6b 6965 3c2f 613e 283c 6120 t_cookie(soap, "\n-00196b50: 636f 6f6b 6965 5f6e 616d 6526 7175 6f74 cookie_name"\n-00196b60: 3b3c 2f73 7061 6e3e 2c20 636f 6f6b 6965 ;, cookie\n-00196b70: 5f76 616c 7565 2c20 4e55 4c4c 2c20 4e55 _value, NULL, NU\n-00196b80: 4c4c 293b 203c 2f64 6976 3e0a 3c64 6976 LL);
    . \n-00196ba0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_co\n-00196c00: 6f6b 6965 5f65 7870 6972 653c 2f61 3e28 okie_expire(\n-00196c10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00196c40: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00196c60: 6f74 3b63 6f6f 6b69 655f 6e61 6d65 2671 ot;cookie_name&q\n-00196c70: 756f 743b 3c2f 7370 616e 3e2c 2036 302c uot;, 60,\n-00196c80: 204e 554c 4c2c 204e 554c 4c29 3b20 3c73 NULL, NULL); // cookie ex\n-00196cb0: 7069 7265 7320 696e 2036 3020 7365 636f pires in 60 seco\n-00196cc0: 6e64 7320 3c2f 7370 616e 3e3c 2f64 6976 nds .
    \n-00196d00: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; <\n+00190940: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine\">e\n+00190960: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    \n+00190970: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    p\n+001909a0: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("Compress\n+001909d0: 696f 6e20 7261 7469 6f3a 2025 6625 2520 ion ratio: %f%% \n+001909e0: 2869 6e29 2025 6625 2520 286f 7574 295c (in) %f%% (out)\\\n+001909f0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n+00190a00: 3130 302a 3c61 2063 6c61 7373 3d22 636f 100*soap<\n+00190a30: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.z_r\n+00190a80: 6174 696f 5f6f 7574 3c2f 613e 2c20 3130 atio_out, 10\n+00190a90: 302a 3c61 2063 6c61 7373 3d22 636f 6465 0*soap.z_rat\n+00190b10: 696f 5f69 6e3c 2f61 3e29 3b20 3c2f 6469 io_in); .
    ... // success
    .
    }.
    \n+00190be0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n+00190c20: 3a3a 7a5f 7261 7469 6f5f 696e 3c2f 613e ::z_ratio_in\n+00190c30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    float \n+00190c50: 7a5f 7261 7469 6f5f 696e 3c2f 6469 763e z_ratio_in
    \n+00190c60: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    The compressi\n+00190c80: 6f6e 2072 6174 696f 203d 2063 6f6d 7072 on ratio = compr\n+00190c90: 6573 7365 642e 7369 7a65 2f75 6e63 6f6d essed.size/uncom\n+00190ca0: 7072 6573 7365 642e 7369 7a65 206f 6620 pressed.size of \n+00190cb0: 7468 6520 636f 6d70 7265 7373 6564 206d the compressed m\n+00190cc0: 6573 7361 6765 2072 6563 6569 7665 642e essage received.\n+00190cd0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00190cf0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00190d00: 6f61 7032 2e68 3a33 3730 393c 2f64 6976 oap2.h:3709
    .
    \n+00190de0: 666c 6f61 7420 7a5f 7261 7469 6f5f 6f75 float z_ratio_ou\n+00190df0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    The co\n+00190e10: 6d70 7265 7373 696f 6e20 7261 7469 6f20 mpression ratio \n+00190e20: 3d20 636f 6d70 7265 7373 6564 2e73 697a = compressed.siz\n+00190e30: 652f 756e 636f 6d70 7265 7373 6564 2e73 e/uncompressed.s\n+00190e40: 697a 6520 6f66 2074 6865 2063 6f6d 7072 ize of the compr\n+00190e50: 6573 7365 6420 6d65 7373 6167 6520 7365 essed message se\n+00190e60: 6e74 2e3c 2f64 6976 3e3c 6469 7620 636c nt.
    D\n+00190e80: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00190e90: 7464 736f 6170 322e 683a 3337 3134 3c2f tdsoap2.h:3714
    .

    \n+001918f0: 436c 6965 6e74 2d73 6964 6520 636f 6f6b Client-side cook\n+00191900: 6965 2073 7570 706f 7274 2069 7320 6675 ie support is fu\n+00191910: 6c6c 7920 6175 746f 6d61 7469 632e 2053 lly automatic. S\n+00191920: 6f20 6a75 7374 2063 6f6d 7069 6c65 203c o just compile <\n+00191930: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+00191940: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp with the\n+00191960: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl\n+00191970: 6167 203c 636f 6465 3e23 5749 5448 5f43 ag #WITH_C\n+00191980: 4f4f 4b49 4553 3c2f 636f 6465 3e20 746f OOKIES to\n+00191990: 2065 6e61 626c 6520 636f 6f6b 6965 2d62 enable cookie-b\n+001919a0: 6173 6564 2073 6573 7369 6f6e 2063 6f6e ased session con\n+001919b0: 7472 6f6c 2069 6e20 796f 7572 2063 6c69 trol in your cli\n+001919c0: 656e 742e 3c2f 703e 0a3c 703e 4120 636f ent.

    .

    A co\n+001919d0: 6f6b 6965 2073 746f 7265 2077 6974 6820 okie store with \n+001919e0: 636f 6f6b 6965 7320 6973 206b 6570 7420 cookies is kept \n+001919f0: 616e 6420 7265 7475 726e 6564 2074 6f20 and returned to \n+00191a00: 7468 6520 6170 7072 6f70 7269 6174 6520 the appropriate \n+00191a10: 7365 7276 6572 7320 7768 656e 2074 6865 servers when the\n+00191a20: 2063 6c69 656e 7420 636f 6e6e 6563 7473 client connects\n+00191a30: 2074 6f20 7468 6573 6520 7365 7276 6572 to these server\n+00191a40: 732e 2043 6f6f 6b69 6573 2061 7265 206e s. Cookies are n\n+00191a50: 6f74 2061 7574 6f6d 6174 6963 616c 6c79 ot automatically\n+00191a60: 2073 6176 6564 2074 6f20 6120 6669 6c65 saved to a file\n+00191a70: 2062 7920 6120 636c 6965 6e74 2e20 416e by a client. An\n+00191a80: 2065 7861 6d70 6c65 2063 6f6f 6b69 6520 example cookie \n+00191a90: 6669 6c65 206d 616e 6167 6572 2069 7320 file manager is \n+00191aa0: 696e 636c 7564 6564 2061 7320 616e 2065 included as an e\n+00191ab0: 7874 7261 7320 696e 2074 6865 2067 534f xtras in the gSO\n+00191ac0: 4150 2070 6163 6b61 6765 2e20 596f 7520 AP package. You \n+00191ad0: 6361 6e20 7265 6d6f 7665 2061 6c6c 2063 can remove all c\n+00191ae0: 6f6f 6b69 6573 2066 726f 6d20 6120 3c63 ookies from a \n+00191b40: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+00191b50: 636f 6e74 6578 7420 6279 2063 616c 6c69 context by calli\n+00191b60: 6e67 203c 636f 6465 3e73 6f61 705f 6672 ng soap_fr\n+00191b70: 6565 5f63 6f6f 6b69 6573 2873 6f61 7029 ee_cookies(soap)\n+00191b80: 3c2f 636f 6465 3e2c 2077 6869 6368 2061 , which a\n+00191b90: 6c73 6f20 6861 7070 656e 7320 7768 656e lso happens when\n+00191ba0: 2079 6f75 2063 616c 6c20 3c63 6f64 653e you call \n+00191bb0: 736f 6170 5f64 6f6e 6528 736f 6170 293c soap_done(soap)<\n+00191bc0: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e54 /code>.

    .

    T\n+00191bd0: 6f20 6176 6f69 6420 2263 6f6f 6b69 6520 o avoid \"cookie \n+00191be0: 7374 6f72 6d73 2220 6361 7573 6564 2062 storms\" caused b\n+00191bf0: 7920 6d61 6c69 6369 6f75 7320 7365 7276 y malicious serv\n+00191c00: 6572 7320 7468 6174 2072 6574 7572 6e20 ers that return \n+00191c10: 616e 2075 6e72 6561 736f 6e61 626c 6520 an unreasonable \n+00191c20: 616d 6f75 6e74 206f 6620 636f 6f6b 6965 amount of cookie\n+00191c30: 732c 2067 534f 4150 2063 6c69 656e 7473 s, gSOAP clients\n+00191c40: 2f73 6572 7665 7273 2061 7265 206c 696d /servers are lim\n+00191c50: 6974 6564 2074 6f20 6120 636f 6f6b 6965 ited to a cookie\n+00191c60: 2073 746f 7265 2073 697a 6520 6f66 203c store size of <\n+00191c70: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+00191d30: 703a 3a63 6f6f 6b69 655f 6d61 783c 2f61 p::cookie_max that th\n+00191d50: 6520 7573 6572 2063 616e 2063 6861 6e67 e user can chang\n+00191d60: 652c 2066 6f72 2065 7861 6d70 6c65 3a3c e, for example:<\n+00191d70: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct \n+00191dc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00191df0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00191e20: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+00191e80: 3c2f 613e 2829 3b20 3c2f 6469 763e 0a3c ();
    .<\n+00191e90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00191ea0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+00191ed0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->co\n+00191f20: 6f6b 6965 5f6d 6178 3c2f 613e 203d 2031 okie_max = 1\n+00191f30: 303b 3c2f 6469 763e 0a3c 6469 7620 636c 0;
    .
    \n+00192000: 696e 7420 636f 6f6b 6965 5f6d 6178 3c2f int cookie_max
    User-defi\n+00192030: 6e61 626c 6520 6d61 7869 6d75 6d20 6e75 nable maximum nu\n+00192040: 6d62 6572 206f 6620 6163 7469 7665 2063 mber of active c\n+00192050: 6f6f 6b69 6573 2061 6c6c 6f77 6564 2074 ookies allowed t\n+00192060: 6f20 6265 2073 6574 2077 6974 6820 736f o be set with so\n+00192070: 6170 5f73 6574 5f63 6f6f 6b69 6520 6265 ap_set_cookie be\n+00192080: 666f 7265 2063 6f6f 6b69 6520 2e2e 2e3c fore cookie ...<\n+00192090: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+001920b0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+001920c0: 6170 322e 683a 3239 3733 3c2f 6469 763e ap2.h:2973
    \n+001920d0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The cookie stor\n+00192100: 6520 6973 2061 206c 696e 6b65 6420 6c69 e is a linked li\n+00192110: 7374 206f 6620 3c63 6f64 653e 3c61 2063 st of soap_cookie struct\n+00192180: 7572 6573 2070 6f69 6e74 6564 2074 6f20 ures pointed to \n+00192190: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap::cook\n+00192220: 6965 733c 2f61 3e3c 2f63 6f64 653e 2e3c ies.<\n+00192230: 2f70 3e0a 3c70 3e53 696e 6365 2074 6865 /p>.

    Since the\n+00192240: 2063 6f6f 6b69 6520 7374 6f72 6520 6973 cookie store is\n+00192250: 206c 696e 6b65 6420 746f 2074 6865 2063 linked to the c\n+00192260: 7572 7265 6e74 203c 636f 6465 3e3c 6120 urrent soap context\n+001922d0: 2c20 616e 6420 6561 6368 2074 6872 6561 , and each threa\n+001922e0: 6420 6d75 7374 2075 7365 2069 7473 206f d must use its o\n+001922f0: 776e 2063 6f6e 7465 7874 2c20 6561 6368 wn context, each\n+00192300: 2074 6872 6561 6420 616c 736f 2068 6173 thread also has\n+00192310: 2069 7473 206f 776e 2063 6f6f 6b69 6520 its own cookie \n+00192320: 7374 6f72 652e 3c2f 703e 0a3c 703e f09f store.

    .

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

    \n+00192360: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .Se\n+00192390: 7276 6572 2d73 6964 6520 636f 6f6b 6965 rver-side cookie\n+001923a0: 2073 7570 706f 7274 3c2f 6832 3e0a 3c70 support

    .This feature is\n+001923c0: 206e 6f74 2072 6563 6f6d 6d65 6e64 6564 not recommended\n+001923d0: 2074 6f20 696d 706c 656d 656e 7420 7374 to implement st\n+001923e0: 6174 6520 696e 2073 7461 6e64 2d61 6c6f ate in stand-alo\n+001923f0: 6e65 2073 6572 7665 7273 2e20 436f 6f6b ne servers. Cook\n+00192400: 6965 7320 6d61 7920 7265 7175 6972 6520 ies may require \n+00192410: 6120 6661 6972 2061 6d6f 756e 7420 6f66 a fair amount of\n+00192420: 2070 726f 6365 7373 696e 6720 6f76 6572 processing over\n+00192430: 6865 6164 2061 6e64 2061 7265 206e 6f74 head and are not\n+00192440: 2069 6e20 6661 6374 206e 6565 6465 6420 in fact needed \n+00192450: 746f 2069 6d70 6c65 6d65 6e74 2073 7461 to implement sta\n+00192460: 7465 6675 6c20 7365 7276 6963 6573 2c20 teful services, \n+00192470: 7768 6963 6820 6973 2074 7970 6963 616c which is typical\n+00192480: 6c79 2070 6572 666f 726d 6564 2077 6974 ly performed wit\n+00192490: 6820 7365 7373 696f 6e20 4944 7320 696e h session IDs in\n+001924a0: 2058 4d4c 2f4a 534f 4e20 6d65 7373 6167 XML/JSON messag\n+001924b0: 6573 206f 7220 6279 2070 6173 7369 6e67 es or by passing\n+001924c0: 2074 6865 2073 6573 7369 6f6e 2049 4473 the session IDs\n+001924d0: 2076 6961 2074 6865 2055 524c 2e3c 2f70 via the URL..

    Server-side\n+001924f0: 2063 6f6f 6b69 6520 7375 7070 6f72 7420 cookie support \n+00192500: 6973 206f 7074 696f 6e61 6c2e 2054 6f20 is optional. To \n+00192510: 656e 6162 6c65 2063 6f6f 6b69 6520 7375 enable cookie su\n+00192520: 7070 6f72 742c 2063 6f6d 7069 6c65 2061 pport, compile a\n+00192530: 6c6c 2073 6f75 7263 6573 2077 6974 6820 ll sources with \n+00192540: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n+00192550: 6720 3c63 6f64 653e 2357 4954 485f 434f g #WITH_CO\n+00192560: 4f4b 4945 533c 2f63 6f64 653e 3a20 3c2f OKIES:

     c++ -DW\n+00192590: 4954 485f 434f 4f4b 4945 5320 2d6f 206d  ITH_COOKIES -o m\n+001925a0: 7973 6572 7665 7220 2e2e 2e0a 3c2f 7072  yserver ....

    See API do\n+001925c0: 6375 6d65 6e74 6174 696f 6e20 4d6f 6475 cumentation Modu\n+001925d0: 6c65 203c 6120 636c 6173 733d 2265 6c22 le HTTP cookie f\n+00192610: 756e 6374 696f 6e73 3c2f 613e 2066 6f72 unctions for\n+00192620: 2074 6865 2063 6f6f 6b69 6520 4150 4920 the cookie API \n+00192630: 6675 6e63 7469 6f6e 732e 2053 6565 2074 functions. See t\n+00192640: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he HTTP\n+00192670: 2073 6573 7369 6f6e 7320 706c 7567 696e sessions plugin\n+00192680: 3c2f 613e 2066 6f72 2048 5454 5020 7365 for HTTP se\n+00192690: 7373 696f 6e20 6d61 6e61 6765 6d65 6e74 ssion management\n+001926a0: 2077 6974 6820 636f 6f6b 6965 7320 7468 with cookies th\n+001926b0: 6174 2069 7320 7265 7175 6972 6564 2066 at is required f\n+001926c0: 6f72 2073 6572 7665 722d 7369 6465 2073 or server-side s\n+001926d0: 6573 7369 6f6e 2063 6f6e 7472 6f6c 2e20 ession control. \n+001926e0: 5468 6520 3c63 6f64 653e 2357 4954 485f The #WITH_\n+001926f0: 434f 4f4b 4945 533c 2f63 6f64 653e 2066 COOKIES f\n+00192700: 6c61 6720 6973 2075 7365 6c65 7373 2077 lag is useless w\n+00192710: 6974 686f 7574 2073 6572 7665 722d 7369 ithout server-si\n+00192720: 6465 2073 6573 7369 6f6e 206d 616e 6167 de session manag\n+00192730: 656d 656e 7420 616e 6420 636f 6e74 726f ement and contro\n+00192740: 6c2e 3c2f 703e 0a3c 703e 4865 7265 2069 l.

    .

    Here i\n+00192750: 7320 616e 206f 7665 7276 6965 7720 6f66 s an overview of\n+00192760: 2074 6865 2063 6f6f 6b69 6520 4150 4920 the cookie API \n+00192770: 6675 6e63 7469 6f6e 733a 3c2f 703e 0a3c functions:

    .<\n+00192780: 756c 3e0a 3c6c 693e 3c63 6f64 653e 7374 ul>.
  • st\n+00192790: 7275 6374 203c 6120 636c 6173 733d 2265 ruct soap\n+001927e0: 5f63 6f6f 6b69 653c 2f61 3e20 2a73 6f61 _cookie *soa\n+001927f0: 705f 7365 745f 636f 6f6b 6965 2873 7472 p_set_cookie(str\n+00192800: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00192810: 636f 6e73 7420 6368 6172 202a 6e61 6d65 const char *name\n+00192820: 2c20 636f 6e73 7420 6368 6172 202a 7661 , const char *va\n+00192830: 6c75 652c 2063 6f6e 7374 2063 6861 7220 lue, const char \n+00192840: 2a64 6f6d 6169 6e2c 2063 6f6e 7374 2063 *domain, const c\n+00192850: 6861 7220 2a70 6174 6829 3b3c 2f63 6f64 har *path); This function\n+00192870: 2061 6464 7320 6120 636f 6f6b 6965 2074 adds a cookie t\n+00192880: 6f20 7468 6520 636f 6f6b 6965 2073 746f o the cookie sto\n+00192890: 7265 2061 7420 7468 6520 7365 7276 6572 re at the server\n+001928a0: 2073 6964 652c 2069 6620 6e6f 7420 616c side, if not al\n+001928b0: 7265 6164 7920 7468 6572 652c 2077 6974 ready there, wit\n+001928c0: 6820 7468 6520 7370 6563 6966 6965 6420 h the specified \n+001928d0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name and valu\n+001928f0: 653c 2f63 6f64 653e 2e20 5468 6520 3c63 e. The domain and path\n+00192920: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n+00192930: 7273 2063 616e 2062 6520 7370 6563 6966 rs can be specif\n+00192940: 6965 6420 6f72 2063 616e 2062 6520 4e55 ied or can be NU\n+00192950: 4c4c 2074 6f20 7573 6520 7468 6520 6375 LL to use the cu\n+00192960: 7272 656e 7420 646f 6d61 696e 2061 6e64 rrent domain and\n+00192970: 2070 6174 6820 6769 7665 6e20 6279 203c path given by <\n+00192980: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::coo\n+00192a30: 6b69 655f 646f 6d61 696e 3c2f 613e 3c2f kie_domain and \n+00192a50: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+00192af0: 736f 6170 3a3a 636f 6f6b 6965 5f70 6174 soap::cookie_pat\n+00192b00: 683c 2f61 3e3c 2f63 6f64 653e 2e20 5265 h. Re\n+00192b10: 7475 726e 7320 706f 696e 7465 7220 746f turns pointer to\n+00192b20: 2074 6865 2063 6f6f 6b69 6520 7374 7275 the cookie stru\n+00192b30: 6374 7572 6520 696e 2074 6865 2064 6174 cture in the dat\n+00192b40: 6162 6173 6520 6f72 204e 554c 4c20 7768 abase or NULL wh\n+00192b50: 656e 2061 6e20 6572 726f 7220 6f63 6375 en an error occu\n+00192b60: 7272 6564 2e3c 2f6c 693e 0a3c 6c69 3e3c rred.
  • .
  • <\n+00192b70: 636f 6465 3e69 6e74 203c 6120 636c 6173 code>int soap_\n+00192bf0: 7365 745f 636f 6f6b 6965 5f65 7870 6972 set_cookie_expir\n+00192c00: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n+00192c10: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n+00192c20: 2a6e 616d 652c 206c 6f6e 6720 6578 7069 *name, long expi\n+00192c30: 7265 2c20 636f 6e73 7420 6368 6172 202a re, const char *\n+00192c40: 646f 6d61 696e 2c20 636f 6e73 7420 6368 domain, const ch\n+00192c50: 6172 202a 7061 7468 293c 2f61 3e3b 3c2f ar *path); This funct\n+00192c70: 696f 6e20 7365 7473 2074 6865 2065 7870 ion sets the exp\n+00192c80: 6972 6174 696f 6e20 6f66 2074 6865 2073 iration of the s\n+00192c90: 7065 6369 6669 6564 2063 6f6f 6b69 6520 pecified cookie \n+00192ca0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name in seconds and\n+00192cc0: 2075 7064 6174 6573 2074 6865 2063 6f6f updates the coo\n+00192cd0: 6b69 6520 7374 6f72 6520 6174 2074 6865 kie store at the\n+00192ce0: 2073 6572 7665 7220 7369 6465 2e20 5468 server side. Th\n+00192cf0: 6520 3c63 6f64 653e 646f 6d61 696e 3c2f e domain and \n+00192d10: 7061 7468 3c2f 636f 6465 3e20 7061 7261 path para\n+00192d20: 6d65 7465 7273 2063 616e 2062 6520 7370 meters can be sp\n+00192d30: 6563 6966 6965 6420 6f72 2063 616e 2062 ecified or can b\n+00192d40: 6520 4e55 4c4c 2074 6f20 7573 6520 7468 e NULL to use th\n+00192d50: 6520 6375 7272 656e 7420 646f 6d61 696e e current domain\n+00192d60: 2061 6e64 2070 6174 6820 6769 7665 6e20 and path given \n+00192d70: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap:\n+00192e20: 3a63 6f6f 6b69 655f 646f 6d61 696e 3c2f :cookie_domain and soap::cookie\n+00192ef0: 5f70 6174 683c 2f61 3e3c 2f63 6f64 653e _path\n+00192f00: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns \n+00192f10: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK \n+00192f20: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap\n+00192fe0: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status error code..
  • in\n+00193010: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t \n+00193080: 736f 6170 5f73 6574 5f63 6f6f 6b69 655f soap_set_cookie_\n+00193090: 7365 6375 7265 2873 7472 7563 7420 736f secure(struct so\n+001930a0: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n+001930b0: 6368 6172 202a 6e61 6d65 2c20 636f 6e73 char *name, cons\n+001930c0: 7420 6368 6172 202a 646f 6d61 696e 2c20 t char *domain, \n+001930d0: 636f 6e73 7420 6368 6172 202a 7061 7468 const char *path\n+001930e0: 293c 2f61 3e3b 3c2f 636f 6465 3e20 5468 ); Th\n+001930f0: 6973 2066 756e 6374 696f 6e20 7365 7473 is function sets\n+00193100: 2074 6865 2022 7365 6375 7265 2220 7072 the \"secure\" pr\n+00193110: 6f70 6572 7479 206f 6620 7468 6520 7370 operty of the sp\n+00193120: 6563 6966 6965 6420 636f 6f6b 6965 203c ecified cookie <\n+00193130: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name\n+00193140: 2061 6e64 2075 7064 6174 6573 2074 6865 and updates the\n+00193150: 2063 6f6f 6b69 6520 7374 6f72 6520 6174 cookie store at\n+00193160: 2074 6865 2073 6572 7665 7220 7369 6465 the server side\n+00193170: 2e20 5468 6520 2273 6563 7572 6522 2070 . The \"secure\" p\n+00193180: 726f 7065 7274 7920 6d65 616e 7320 7468 roperty means th\n+00193190: 6174 2074 6869 7320 636f 6f6b 6965 2073 at this cookie s\n+001931a0: 686f 756c 6420 6265 2073 656e 7420 6279 hould be sent by\n+001931b0: 2074 6865 2063 6c69 656e 7420 746f 2074 the client to t\n+001931c0: 6865 2073 6572 7665 7220 6f6e 6c79 2077 he server only w\n+001931d0: 6865 6e20 6120 7365 6375 7265 2048 5454 hen a secure HTT\n+001931e0: 5053 2063 6f6e 6e65 6374 696f 6e20 6361 PS connection ca\n+001931f0: 6e20 6265 2065 7374 6162 6c69 7368 6564 n be established\n+00193200: 2e20 5768 656e 2048 5454 5053 2069 7320 . When HTTPS is \n+00193210: 656e 6162 6c65 6420 616c 6c20 636f 6f6b enabled all cook\n+00193220: 6965 7320 6172 6520 7365 6e74 2062 7920 ies are sent by \n+00193230: 7468 6520 7365 7276 6572 2074 6f20 7468 the server to th\n+00193240: 6520 636c 6965 6e74 2077 6974 6820 7468 e client with th\n+00193250: 6520 2273 6563 7572 6522 2070 726f 7065 e \"secure\" prope\n+00193260: 7274 7920 7365 742c 2077 6869 6368 206d rty set, which m\n+00193270: 6561 6e73 2074 6861 7420 7468 6973 2066 eans that this f\n+00193280: 756e 6374 696f 6e20 6973 2067 656e 6572 unction is gener\n+00193290: 616c 6c79 206e 6f74 206e 6565 6465 6420 ally not needed \n+001932a0: 756e 6c65 7373 2074 6865 2073 6572 7665 unless the serve\n+001932b0: 7220 6973 206e 6f74 2048 5454 5053 2d65 r is not HTTPS-e\n+001932c0: 6e61 626c 6564 2062 7574 2063 6f6f 6b69 nabled but cooki\n+001932d0: 6573 206d 7573 7420 6265 2073 6563 7572 es must be secur\n+001932e0: 652e 2054 6865 203c 636f 6465 3e64 6f6d e. The dom\n+001932f0: 6169 6e3c 2f63 6f64 653e 2061 6e64 203c ain and <\n+00193300: 636f 6465 3e70 6174 683c 2f63 6f64 653e code>path\n+00193310: 2070 6172 616d 6574 6572 7320 6361 6e20 parameters can \n+00193320: 6265 2073 7065 6369 6669 6564 206f 7220 be specified or \n+00193330: 6361 6e20 6265 204e 554c 4c20 746f 2075 can be NULL to u\n+00193340: 7365 2074 6865 2063 7572 7265 6e74 2064 se the current d\n+00193350: 6f6d 6169 6e20 616e 6420 7061 7468 2067 omain and path g\n+00193360: 6976 656e 2062 7920 3c63 6f64 653e 3c61 iven by \n+00193410: 736f 6170 3a3a 636f 6f6b 6965 5f64 6f6d soap::cookie_dom\n+00193420: 6169 6e3c 2f61 3e3c 2f63 6f64 653e 2061 ain a\n+00193430: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::c\n+001934e0: 6f6f 6b69 655f 7061 7468 3c2f 613e 3c2f ookie_path. Returns <\n+00193500: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+00193520: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+001935e0: 3c2f 636f 6465 3e20 6572 726f 7220 636f error co\n+001935f0: 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f de.
  • .
  • int soap_set_c\n+00193680: 6f6f 6b69 655f 7365 7373 696f 6e28 7374 ookie_session(st\n+00193690: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+001936a0: 2063 6f6e 7374 2063 6861 7220 2a6e 616d const char *nam\n+001936b0: 652c 2063 6f6e 7374 2063 6861 7220 2a64 e, const char *d\n+001936c0: 6f6d 6169 6e2c 2063 6f6e 7374 2063 6861 omain, const cha\n+001936d0: 7220 2a70 6174 6829 3c2f 613e 3b3c 2f63 r *path); This functi\n+001936f0: 6f6e 206d 616b 6573 2074 6865 2073 7065 on makes the spe\n+00193700: 6369 6669 6564 2063 6f6f 6b69 6520 3c63 cified cookie name \n+00193720: 6120 2273 6573 7369 6f6e 2063 6f6f 6b69 a \"session cooki\n+00193730: 6522 2061 6e64 2075 7064 6174 6573 2074 e\" and updates t\n+00193740: 6865 2063 6f6f 6b69 6520 7374 6f72 6520 he cookie store \n+00193750: 6174 2074 6865 2073 6572 7665 7220 7369 at the server si\n+00193760: 6465 2062 7920 6d61 726b 696e 6720 7468 de by marking th\n+00193770: 6520 636f 6f6b 6965 2061 7320 6120 7365 e cookie as a se\n+00193780: 7373 696f 6e20 636f 6f6b 6965 2e20 5468 ssion cookie. Th\n+00193790: 6973 206d 6561 6e73 2074 6861 7420 7468 is means that th\n+001937a0: 6520 636f 6f6b 6965 2077 696c 6c20 6265 e cookie will be\n+001937b0: 2073 656e 7420 746f 2063 6c69 656e 7473 sent to clients\n+001937c0: 2074 6861 7420 636f 6e6e 6563 7420 746f that connect to\n+001937d0: 2074 6865 2073 6572 7665 722e 2054 6869 the server. Thi\n+001937e0: 7320 6675 6e63 7469 6f6e 2069 7320 6e6f s function is no\n+001937f0: 7420 6e65 6564 6564 2077 6865 6e20 6120 t needed when a \n+00193800: 636f 6f6b 6965 2069 7320 6d6f 6469 6669 cookie is modifi\n+00193810: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with \n+00193890: 736f 6170 5f73 6574 5f63 6f6f 6b69 655f soap_set_cookie_\n+001938a0: 6578 7069 7265 3c2f 613e 3c2f 636f 6465 expire, for example, \n+001938c0: 6265 6361 7573 6520 6d6f 6469 6669 6564 because modified\n+001938d0: 2063 6f6f 6b69 6573 2061 7265 2061 6c77 cookies are alw\n+001938e0: 6179 7320 7365 6e74 2062 6163 6b20 746f ays sent back to\n+001938f0: 2074 6865 2063 6c69 656e 742e 2054 6865 the client. The\n+00193900: 203c 636f 6465 3e64 6f6d 6169 6e3c 2f63 domain and p\n+00193920: 6174 683c 2f63 6f64 653e 2070 6172 616d ath param\n+00193930: 6574 6572 7320 6361 6e20 6265 2073 7065 eters can be spe\n+00193940: 6369 6669 6564 206f 7220 6361 6e20 6265 cified or can be\n+00193950: 204e 554c 4c20 746f 2075 7365 2074 6865 NULL to use the\n+00193960: 2063 7572 7265 6e74 2064 6f6d 6169 6e20 current domain \n+00193970: 616e 6420 7061 7468 2067 6976 656e 2062 and path given b\n+00193980: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap::\n+00193a30: 636f 6f6b 6965 5f64 6f6d 6169 6e3c 2f61 cookie_domain and soap::cookie_\n+00193b00: 7061 7468 3c2f 613e 3c2f 636f 6465 3e2e path.\n+00193b10: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n+00193b20: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n+00193b30: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+00193bf0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status error code..
  • voi\n+00193c20: 6420 3c61 2063 6c61 7373 3d22 656c 2220 d soap_\n+00193c90: 636c 725f 636f 6f6b 6965 2873 7472 7563 clr_cookie(struc\n+00193ca0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n+00193cb0: 6e73 7420 6368 6172 202a 6e61 6d65 2c20 nst char *name, \n+00193cc0: 636f 6e73 7420 6368 6172 202a 646f 6d61 const char *doma\n+00193cd0: 696e 2c20 636f 6e73 7420 6368 6172 202a in, const char *\n+00193ce0: 7061 7468 293c 2f61 3e3b 3c2f 636f 6465 path); This function \n+00193d00: 6465 6c65 7465 7320 7468 6520 7370 6563 deletes the spec\n+00193d10: 6966 6965 6420 636f 6f6b 6965 203c 636f ified cookie name f\n+00193d30: 726f 6d20 7468 6520 636f 6f6b 6965 2073 rom the cookie s\n+00193d40: 746f 7265 2061 7420 7468 6520 7365 7276 tore at the serv\n+00193d50: 6572 2073 6964 652e 2054 6865 203c 636f er side. The domain\n+00193d70: 2061 6e64 203c 636f 6465 3e70 6174 683c and path<\n+00193d80: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n+00193d90: 7320 6361 6e20 6265 2073 7065 6369 6669 s can be specifi\n+00193da0: 6564 206f 7220 6361 6e20 6265 204e 554c ed or can be NUL\n+00193db0: 4c20 746f 2075 7365 2074 6865 2063 7572 L to use the cur\n+00193dc0: 7265 6e74 2064 6f6d 6169 6e20 616e 6420 rent domain and \n+00193dd0: 7061 7468 2067 6976 656e 2062 7920 3c63 path given by soap::cook\n+00193e90: 6965 5f64 6f6d 6169 6e3c 2f61 3e3c 2f63 ie_domain and <\n+00193eb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00193ec0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00193ed0: 6d6c 2361 6664 6439 3163 6531 3138 3966 ml#afdd91ce1189f\n+00193ee0: 6564 6433 3265 6266 6135 3164 6436 6564 edd32ebfa51dd6ed\n+00193ef0: 3333 6562 2220 7469 746c 653d 2255 7365 33eb\" title=\"Use\n+00193f00: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri\n+00193f10: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie\n+00193f20: 7320 7468 6520 4854 5450 2063 6f6f 6b69 s the HTTP cooki\n+00193f30: 6520 7061 7468 206f 6620 7468 6520 7275 e path of the ru\n+00193f40: 6e6e 696e 6720 7365 7276 6572 2e22 3e73 nning server.\">s\n+00193f50: 6f61 703a 3a63 6f6f 6b69 655f 7061 7468 oap::cookie_path\n+00193f60: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 6c69 ..
  • int \n+00193f80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_clr_cookie\n+00194000: 5f73 6573 7369 6f6e 2873 7472 7563 7420 _session(struct \n+00194010: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n+00194020: 7420 6368 6172 202a 6e61 6d65 2c20 636f t char *name, co\n+00194030: 6e73 7420 6368 6172 202a 646f 6d61 696e nst char *domain\n+00194040: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa\n+00194050: 7468 293c 2f61 3e3b 3c2f 636f 6465 3e20 th); \n+00194060: 5468 6973 2066 756e 6374 696f 6e20 636c This function cl\n+00194070: 6561 7273 2074 6865 2073 6573 7369 6f6e ears the session\n+00194080: 2070 726f 7065 7274 7920 6f66 2074 6865 property of the\n+00194090: 2073 7065 6369 6669 6564 2063 6f6f 6b69 specified cooki\n+001940a0: 6520 3c63 6f64 653e 6e61 6d65 3c2f 636f e name and updates \n+001940c0: 7468 6520 636f 6f6b 6965 2073 746f 7265 the cookie store\n+001940d0: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s\n+001940e0: 6964 652e 2054 6865 203c 636f 6465 3e64 ide. The d\n+001940f0: 6f6d 6169 6e3c 2f63 6f64 653e 2061 6e64 omain and\n+00194100: 203c 636f 6465 3e70 6174 683c 2f63 6f64 path parameters ca\n+00194120: 6e20 6265 2073 7065 6369 6669 6564 206f n be specified o\n+00194130: 7220 6361 6e20 6265 204e 554c 4c20 746f r can be NULL to\n+00194140: 2075 7365 2074 6865 2063 7572 7265 6e74 use the current\n+00194150: 2064 6f6d 6169 6e20 616e 6420 7061 7468 domain and path\n+00194160: 2067 6976 656e 2062 7920 3c63 6f64 653e given by \n+00194170: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::cookie_d\n+00194220: 6f6d 6169 6e3c 2f61 3e3c 2f63 6f64 653e omain\n+00194230: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap:\n+001942e0: 3a63 6f6f 6b69 655f 7061 7468 3c2f 613e :cookie_path\n+001942f0: 3c2f 636f 6465 3e2e 2052 6574 7572 6e73 . Returns\n+00194300: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+00194310: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status error \n+001943f0: 636f 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c code.
  • .
  • <\n+00194400: 636f 6465 3e73 7472 7563 7420 3c61 2063 code>struct soap_cookie *soap_cookie(\n+00194470: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00194480: 702c 2063 6f6e 7374 2063 6861 7220 2a6e p, const char *n\n+00194490: 616d 652c 2063 6f6e 7374 2063 6861 7220 ame, const char \n+001944a0: 2a64 6f6d 6169 6e2c 2063 6f6e 7374 2063 *domain, const c\n+001944b0: 6861 7220 2a70 6174 6829 3b3c 2f63 6f64 har *path); This function\n+001944d0: 2072 6574 7572 6e73 2074 6865 2063 6f6f returns the coo\n+001944e0: 6b69 6520 7374 7275 6374 7572 6520 6f66 kie structure of\n+001944f0: 2074 6865 2073 7065 6369 6669 6564 2063 the specified c\n+00194500: 6f6f 6b69 6520 3c63 6f64 653e 6e61 6d65 ookie name\n+00194510: 3c2f 636f 6465 3e20 6f72 204e 554c 4c20 or NULL \n+00194520: 7768 656e 206e 6f74 2066 6f75 6e64 2062 when not found b\n+00194530: 7920 7365 6172 6368 696e 6720 7468 6520 y searching the \n+00194540: 636f 6f6b 6965 2073 746f 7265 2061 7420 cookie store at \n+00194550: 7468 6520 7365 7276 6572 2073 6964 652e the server side.\n+00194560: 2054 6865 203c 636f 6465 3e64 6f6d 6169 The domai\n+00194570: 6e3c 2f63 6f64 653e 2061 6e64 203c 636f n and path p\n+00194590: 6172 616d 6574 6572 7320 6361 6e20 6265 arameters can be\n+001945a0: 2073 7065 6369 6669 6564 206f 7220 6361 specified or ca\n+001945b0: 6e20 6265 204e 554c 4c20 746f 2075 7365 n be NULL to use\n+001945c0: 2074 6865 2063 7572 7265 6e74 2064 6f6d the current dom\n+001945d0: 6169 6e20 616e 6420 7061 7468 2067 6976 ain and path giv\n+001945e0: 656e 2062 7920 3c63 6f64 653e 3c61 2063 en by so\n+00194690: 6170 3a3a 636f 6f6b 6965 5f64 6f6d 6169 ap::cookie_domai\n+001946a0: 6e3c 2f61 3e3c 2f63 6f64 653e 2061 6e64 n and\n+001946b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::coo\n+00194760: 6b69 655f 7061 7468 3c2f 613e 3c2f 636f kie_path.
  • .
  • const char *\n+00194790: 736f 6170 5f63 6f6f 6b69 655f 7661 6c75 soap_cookie_valu\n+001947a0: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n+001947b0: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n+001947c0: 2a6e 616d 652c 2063 6f6e 7374 2063 6861 *name, const cha\n+001947d0: 7220 2a64 6f6d 6169 6e2c 2063 6f6e 7374 r *domain, const\n+001947e0: 2063 6861 7220 2a70 6174 6829 3b3c 2f63 char *path); This functi\n+00194800: 6f6e 2072 6574 7572 6e73 2074 6865 2063 on returns the c\n+00194810: 6f6f 6b69 6520 7661 6c75 6520 6f66 2074 ookie value of t\n+00194820: 6865 2073 7065 6369 6669 6564 2063 6f6f he specified coo\n+00194830: 6b69 6520 3c63 6f64 653e 6e61 6d65 3c2f kie name or NULL wh\n+00194850: 656e 206e 6f74 2066 6f75 6e64 2062 7920 en not found by \n+00194860: 7365 6172 6368 696e 6720 7468 6520 636f searching the co\n+00194870: 6f6b 6965 2073 746f 7265 2061 7420 7468 okie store at th\n+00194880: 6520 7365 7276 6572 2073 6964 652e 2054 e server side. T\n+00194890: 6865 203c 636f 6465 3e64 6f6d 6169 6e3c he domain<\n+001948a0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and path par\n+001948c0: 616d 6574 6572 7320 6361 6e20 6265 2073 ameters can be s\n+001948d0: 7065 6369 6669 6564 206f 7220 6361 6e20 pecified or can \n+001948e0: 6265 204e 554c 4c20 746f 2075 7365 2074 be NULL to use t\n+001948f0: 6865 2063 7572 7265 6e74 2064 6f6d 6169 he current domai\n+00194900: 6e20 616e 6420 7061 7468 2067 6976 656e n and path given\n+00194910: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap\n+001949c0: 3a3a 636f 6f6b 6965 5f64 6f6d 6169 6e3c ::cookie_domain<\n+001949d0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+001949e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::cooki\n+00194a90: 655f 7061 7468 3c2f 613e 3c2f 636f 6465 e_path.
  • .
  • time_t soap_\n+00194b30: 636f 6f6b 6965 5f65 7870 6972 6528 7374 cookie_expire(st\n+00194b40: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+00194b50: 2063 6f6e 7374 2063 6861 7220 2a6e 616d const char *nam\n+00194b60: 652c 2063 6f6e 7374 2063 6861 7220 2a64 e, const char *d\n+00194b70: 6f6d 6169 6e2c 2063 6f6e 7374 2063 6861 omain, const cha\n+00194b80: 7220 2a70 6174 6829 3c2f 613e 3b3c 2f63 r *path); This functi\n+00194ba0: 6f6e 2072 6574 7572 6e73 2074 6865 2063 on returns the c\n+00194bb0: 6f6f 6b69 6520 6578 7069 7261 7469 6f6e ookie expiration\n+00194bc0: 2074 696d 6520 3c63 6f64 653e 7469 6d65 time time\n+00194bd0: 5f74 3c2f 636f 6465 3e20 6f66 2074 6865 _t of the\n+00194be0: 2073 7065 6369 6669 6564 2063 6f6f 6b69 specified cooki\n+00194bf0: 6520 3c63 6f64 653e 6e61 6d65 3c2f 636f e name or -1 when n\n+00194c10: 6f74 2066 6f75 6e64 2062 7920 7365 6172 ot found by sear\n+00194c20: 6368 696e 6720 7468 6520 636f 6f6b 6965 ching the cookie\n+00194c30: 2073 746f 7265 2061 7420 7468 6520 7365 store at the se\n+00194c40: 7276 6572 2073 6964 652e 2054 6865 203c rver side. The <\n+00194c50: 636f 6465 3e64 6f6d 6169 6e3c 2f63 6f64 code>domain and pat\n+00194c70: 683c 2f63 6f64 653e 2070 6172 616d 6574 h paramet\n+00194c80: 6572 7320 6361 6e20 6265 2073 7065 6369 ers can be speci\n+00194c90: 6669 6564 206f 7220 6361 6e20 6265 204e fied or can be N\n+00194ca0: 554c 4c20 746f 2075 7365 2074 6865 2063 ULL to use the c\n+00194cb0: 7572 7265 6e74 2064 6f6d 6169 6e20 616e urrent domain an\n+00194cc0: 6420 7061 7468 2067 6976 656e 2062 7920 d path given by \n+00194cd0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::co\n+00194d80: 6f6b 6965 5f64 6f6d 6169 6e3c 2f61 3e3c okie_domain<\n+00194d90: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap::cookie_pa\n+00194e50: 7468 3c2f 613e 3c2f 636f 6465 3e2e 3c2f th..
  • in\n+00194e70: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t soap_getenv_\n+00194f10: 636f 6f6b 6965 7328 7374 7275 6374 2073 cookies(struct s\n+00194f20: 6f61 7020 2a73 6f61 7029 3c2f 613e 3b3c oap *soap);<\n+00194f30: 2f63 6f64 653e 2054 6869 7320 6675 6e63 /code> This func\n+00194f40: 7469 6f6e 2069 6e69 7469 616c 697a 6573 tion initializes\n+00194f50: 2074 6865 2063 6f6f 6b69 6520 7374 6f72 the cookie stor\n+00194f60: 6520 6174 2074 6865 2073 6572 7665 7220 e at the server \n+00194f70: 7369 6465 2062 7920 7265 6164 696e 6720 side by reading \n+00194f80: 7468 6520 3c63 6f64 653e 4854 5450 5f43 the HTTP_C\n+00194f90: 4f4f 4b49 453c 2f63 6f64 653e 2065 6e76 OOKIE env\n+00194fa0: 6972 6f6e 6d65 6e74 2076 6172 6961 626c ironment variabl\n+00194fb0: 652e 2054 6869 7320 7072 6f76 6964 6573 e. This provides\n+00194fc0: 2061 206d 6561 6e73 2066 6f72 2061 2043 a means for a C\n+00194fd0: 4749 2061 7070 6c69 6361 7469 6f6e 2074 GI application t\n+00194fe0: 6f20 7265 6164 2063 6f6f 6b69 6573 2073 o read cookies s\n+00194ff0: 656e 7420 6279 2061 2063 6c69 656e 742e ent by a client.\n+00195000: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n+00195010: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n+00195020: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+001950e0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status error code whe\n+00195100: 6e20 7468 6520 3c63 6f64 653e 4854 5450 n the HTTP\n+00195110: 5f43 4f4f 4b49 453c 2f63 6f64 653e 2076 _COOKIE v\n+00195120: 6172 6961 626c 6520 7761 7320 6e6f 7420 ariable was not \n+00195130: 666f 756e 642e 3c2f 6c69 3e0a 3c6c 693e found.
  • .
  • \n+00195140: 3c63 6f64 653e 766f 6964 203c 6120 636c void soap_free_co\n+001951c0: 6f6b 6965 7328 7374 7275 6374 2073 6f61 okies(struct soa\n+001951d0: 7020 2a73 6f61 7029 3c2f 613e 3b3c 2f63 p *soap); This functi\n+001951f0: 6f6e 2066 7265 6573 2074 6865 2063 6f6f on frees the coo\n+00195200: 6b69 6520 7374 6f72 6520 616e 6420 6465 kie store and de\n+00195210: 6c65 7465 7320 616c 6c20 636f 6f6b 6965 letes all cookie\n+00195220: 732e 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 s.
  • ..The following v\n+00195240: 6172 6961 626c 6573 206f 6620 7468 6520 ariables of the \n+00195250: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context are us\n+001952c0: 6564 2074 6f20 6465 6669 6e65 2074 6865 ed to define the\n+001952d0: 2063 7572 7265 6e74 2064 6f6d 6169 6e20 current domain \n+001952e0: 616e 6420 7061 7468 3a3c 2f70 3e0a 3c75 and path:

    ..
  • con\n+00195300: 7374 2063 6861 7220 2a20 3c61 2063 6c61 st char * soap\n+001953b0: 3a3a 636f 6f6b 6965 5f64 6f6d 6169 6e3c ::cookie_domain<\n+001953c0: 2f61 3e3c 2f63 6f64 653e 2073 686f 756c /a> shoul\n+001953d0: 6420 6265 2073 6574 2074 6f20 7468 6520 d be set to the \n+001953e0: 646f 6d61 696e 2028 686f 7374 2920 6f66 domain (host) of\n+001953f0: 2074 6865 2073 6572 7669 6365 3c2f 6c69 the service.
  • cons\n+00195410: 7420 6368 6172 202a 203c 6120 636c 6173 t char * soap::c\n+001954c0: 6f6f 6b69 655f 7061 7468 3c2f 613e 3c2f ookie_path may be set\n+001954e0: 2074 6f20 7468 6520 6465 6661 756c 7420 to the default \n+001954f0: 7061 7468 2074 6f20 7468 6520 7365 7276 path to the serv\n+00195500: 6963 653c 2f6c 693e 0a3c 6c69 3e3c 636f ice
  • .
  • int s\n+001955d0: 6f61 703a 3a63 6f6f 6b69 655f 6d61 783c oap::cookie_max<\n+001955e0: 2f61 3e3c 2f63 6f64 653e 206d 6178 696d /a> maxim\n+001955f0: 756d 2063 6f6f 6b69 6520 6461 7461 6261 um cookie databa\n+00195600: 7365 2073 697a 6520 2864 6566 6175 6c74 se size (default\n+00195610: 3d33 3229 3c2f 6c69 3e0a 3c2f 756c 3e0a =32)
  • ..\n+00195620: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The soa\n+001956d0: 703a 3a63 6f6f 6b69 655f 7061 7468 3c2f p::cookie_path value \n+001956f0: 6973 2075 7365 6420 746f 2066 696c 7465 is used to filte\n+00195700: 7220 636f 6f6b 6965 7320 696e 7465 6e64 r cookies intend\n+00195710: 6564 2066 6f72 2074 6869 7320 7365 7276 ed for this serv\n+00195720: 6963 6520 6163 636f 7264 696e 6720 746f ice according to\n+00195730: 2074 6865 2070 6174 6820 7072 6566 6978 the path prefix\n+00195740: 2072 756c 6573 206f 7574 6c69 6e65 6420 rules outlined \n+00195750: 696e 2052 4643 3231 3039 2e3c 2f70 3e0a in RFC2109.

    .\n+00195760: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n+00195770: 2065 7861 6d70 6c65 2073 6572 7665 7220 example server \n+00195780: 6164 6f70 7473 2063 6f6f 6b69 6573 2066 adopts cookies f\n+00195790: 6f72 2073 6573 7369 6f6e 2063 6f6e 7472 or session contr\n+001957a0: 6f6c 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ol:

    .
    . \n+001958d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int m, s; .
    soap\n+00195970: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n+00195980: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00195990: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001959a0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001959b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap.cookie_doma\n+00195a50: 696e 3c2f 613e 203d 203c 7370 616e 2063 in = "...&q\n+00195a80: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    s\n+00195ad0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.cookie_path\n+00195b30: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+00195b50: 7175 6f74 3b2f 2671 756f 743b 3c2f 7370 quot;/"; // th\n+00195b80: 6520 7061 7468 2077 6869 6368 2069 7320 e path which is \n+00195b90: 7573 6564 2074 6f20 6669 6c74 6572 2f73 used to filter/s\n+00195ba0: 6574 2063 6f6f 6b69 6573 2077 6974 6820 et cookies with \n+00195bb0: 7468 6973 2064 6573 7469 6e61 7469 6f6e this destination\n+00195bc0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00195bd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00195be0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00195c00: 2f73 7061 6e3e 2028 6172 6763 2026 6c74 /span> (argc <\n+00195c10: 3b20 3229 203c 2f64 6976 3e0a 3c64 6976 ; 2)
    . \n+00195c30: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap_getenv_c\n+00195cb0: 6f6f 6b69 6573 3c2f 613e 2826 616d 703b ookies(&\n+00195cc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+00195cf0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // CGI a\n+00195d10: 7070 3a20 6772 6162 2063 6f6f 6b69 6573 pp: grab cookies\n+00195d20: 2066 726f 6d20 2623 3339 3b48 5454 505f from 'HTTP_\n+00195d30: 434f 4f4b 4945 2623 3339 3b20 656e 7620 COOKIE' env \n+00195d40: 7661 7220 3c2f 7370 616e 3e3c 2f64 6976 var .
    soap_ser\n+00195dc0: 7665 3c2f 613e 2826 616d 703b 3c61 2063 ve(&soap); .
    } .
    \n+00195e50: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    {
    .<\n+00195e80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00195e90: 3e20 2020 206d 203d 203c 6120 636c 6173 > m = soap_bi\n+00195ef0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap, NUL\n+00195f30: 4c2c 2061 746f 6928 6172 6776 5b31 5d29 L, atoi(argv[1])\n+00195f40: 2c20 3130 293b 203c 7370 616e 2063 6c61 , 10); // \n+00195f60: 736d 616c 6c20 4241 434b 4c4f 4720 666f small BACKLOG fo\n+00195f70: 7220 6974 6572 6174 6976 6520 7365 7276 r iterative serv\n+00195f80: 6572 733c 2f73 7061 6e3e 3c2f 6469 763e ers
    \n+00195f90: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+00196040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXI\n+00196060: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    for (<\n+001960b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001960c0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int i = 1; ; i++\n+001960e0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {\n+00196100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+00196120: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_accept(&s\n+001961b0: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n+001961c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (!<\n+00196200: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00196210: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00196220: 705f 5f73 6f61 702e 6874 6d6c 2367 6161 p__soap.html#gaa\n+00196230: 6165 3837 3437 6634 6364 6163 6565 3537 ae8747f4cdacee57\n+00196240: 3538 3735 6333 6132 3438 3864 3939 6322 5875c3a2488d99c\"\n+00196250: 3e73 6f61 705f 7661 6c69 645f 736f 636b >soap_valid_sock\n+00196260: 6574 3c2f 613e 2873 2929 203c 2f64 6976 et(s)) .
    exit\n+00196290: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); \n+001962a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+001962c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001962d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001962e0: 705f 5f69 6f2e 6874 6d6c 2367 6135 3164 p__io.html#ga51d\n+001962f0: 6261 3737 3036 6135 3035 3234 3062 6438 ba7706a505240bd8\n+00196300: 3933 3563 3062 3238 6534 3139 6422 3e73 935c0b28e419d\">s\n+00196310: 6f61 705f 7365 7276 653c 2f61 3e28 2661 oap_serve(&a\n+00196320: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    . \n+00196370: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_en\n+001963d0: 643c 2f61 3e28 2661 6d70 3b3c 6120 636c d(&soap);.
    \n+00196480: 736f 6170 5f66 7265 655f 636f 6f6b 6965 soap_free_cookie\n+00196490: 733c 2f61 3e28 2661 6d70 3b3c 6120 636c s(&soap); // remove all\n+001964f0: 206f 6c64 2063 6f6f 6b69 6573 2066 726f old cookies fro\n+00196500: 6d20 6461 7461 6261 7365 2073 6f20 6e6f m database so no\n+00196510: 2069 6e74 6572 6665 7265 6e63 6520 6f63 interference oc\n+00196520: 6375 7273 2077 6974 6820 7468 6520 6172 curs with the ar\n+00196530: 7269 7661 6c20 6f66 206e 6577 2063 6f6f rival of new coo\n+00196540: 6b69 6573 203c 2f73 7061 6e3e 3c2f 6469 kies .
    } .
    }
    .<\n+00196590: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001965a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+001965c0: 7572 6e3c 2f73 7061 6e3e 2030 3b20 3c2f urn 0; .
    }
    .\n+001965f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n+00196640: 206e 735f 5f77 6562 6d65 7468 6f64 283c ns__webmethod(<\n+00196650: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00196660: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001966d0: 2f61 3e2c 202e 2e2e 2920 3c2f 6469 763e /a>, ...)
    \n+001966e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+00196710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00196720: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+00196750: 3c2f 7370 616e 3e20 2a63 6f6f 6b69 655f *cookie_\n+00196760: 7661 6c75 6520 3d20 3c61 2063 6c61 7373 value = soa\n+001967c0: 705f 636f 6f6b 6965 5f76 616c 7565 3c2f p_cookie_value(soap, \n+00196820: 2671 756f 743b 636f 6f6b 6965 5f6e 616d "cookie_nam\n+00196830: 6526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 e", \n+00196840: 4e55 4c4c 2c20 4e55 4c4c 293b 3c2f 6469 NULL, NULL);.
    if (!coo\n+00196890: 6b69 655f 7661 6c75 6529 2020 2020 2020 kie_value) \n+001968a0: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n+001968c0: 2f2f 2063 6f6f 6b69 6520 7265 7475 726e // cookie return\n+001968d0: 6564 2062 7920 636c 6965 6e74 3f20 3c2f ed by client?
    . \n+00196900: 2020 636f 6f6b 6965 5f76 616c 7565 203d cookie_value =\n+00196910: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00196930: 6f74 3b69 6e69 7469 616c 5f76 616c 7565 ot;initial_value\n+00196940: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+00196950: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00196960: 656e 7422 3e2f 2f20 6e6f 3a20 7365 7420 ent\">// no: set \n+00196970: 696e 6974 6961 6c20 636f 6f6b 6965 2076 initial cookie v\n+00196980: 616c 7565 203c 2f73 7061 6e3e 3c2f 6469 alue .
    else .
    ... \n+001969f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00196a00: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n+00196a20: 2f2f 2079 6573 3a20 6d6f 6469 6679 2074 // yes: modify t\n+00196a30: 6865 2063 6f6f 6b69 6520 7661 6c75 6520 he cookie value \n+00196a40: 746f 2072 6566 6c65 6374 2074 6865 206e to reflect the n\n+00196a50: 6577 2073 7461 7465 3c2f 7370 616e 3e3c ew state<\n+00196a60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+00196ad0: 6f61 705f 7365 745f 636f 6f6b 6965 3c2f oap_set_cookie(soap, \n+00196b30: 2671 756f 743b 636f 6f6b 6965 5f6e 616d "cookie_nam\n+00196b40: 6526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 e", \n+00196b50: 636f 6f6b 6965 5f76 616c 7565 2c20 4e55 cookie_value, NU\n+00196b60: 4c4c 2c20 4e55 4c4c 293b 203c 2f64 6976 LL, NULL); .
    soap_\n+00196be0: 7365 745f 636f 6f6b 6965 5f65 7870 6972 set_cookie_expir\n+00196bf0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n+00196c20: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "cookie_\n+00196c50: 6e61 6d65 2671 756f 743b 3c2f 7370 616e name", 60, NULL, NUL\n+00196c70: 4c29 3b20 3c73 7061 6e20 636c 6173 733d L); // coo\n+00196c90: 6b69 6520 6578 7069 7265 7320 696e 2036 kie expires in 6\n+00196ca0: 3020 7365 636f 6e64 7320 3c2f 7370 616e 0 seconds
    ..}<\n 00196d70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-00196d90: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n-00196e70: 636f 6e73 7420 6368 6172 202a 2073 6f61 const char * soa\n-00196e80: 705f 636f 6f6b 6965 5f76 616c 7565 2873 p_cookie_value(s\n-00196e90: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-00196ea0: 2c20 636f 6e73 7420 6368 6172 202a 6e61 , const char *na\n-00196eb0: 6d65 2c20 636f 6e73 7420 6368 6172 202a me, const char *\n-00196ec0: 646f 6d61 696e 2c20 636f 6e73 7420 6368 domain, const ch\n-00196ed0: 6172 202a 7061 7468 293c 2f64 6976 3e3c ar *path)
    <\n-00196ee0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00196ef0: 223e 4765 7420 636f 6f6b 6965 2076 616c \">Get cookie val\n-00196f00: 7565 2e3c 2f64 6976 3e3c 2f64 6976 3e0a ue.
    .\n-00196f10: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    st\n-00196ff0: 7275 6374 2073 6f61 705f 636f 6f6b 6965 ruct soap_cookie\n-00197000: 202a 2073 6f61 705f 7365 745f 636f 6f6b * soap_set_cook\n-00197010: 6965 2873 7472 7563 7420 736f 6170 202a ie(struct soap *\n-00197020: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-00197030: 202a 6e61 6d65 2c20 636f 6e73 7420 6368 *name, const ch\n-00197040: 6172 202a 7661 6c75 652c 2063 6f6e 7374 ar *value, const\n-00197050: 2063 6861 7220 2a64 6f6d 6169 6e2c 2063 char *domain, c\n-00197060: 6f6e 7374 2063 6861 7220 2a70 6174 6829 onst char *path)\n-00197070: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Add a c\n-00197090: 6f6f 6b69 652e 3c2f 6469 763e 3c2f 6469 ookie.
    .
    soap_getenv_\n-00197160: 636f 6f6b 6965 733c 2f61 3e3c 2f64 6976 cookies
    int soap_ge\n-00197190: 7465 6e76 5f63 6f6f 6b69 6573 2873 7472 tenv_cookies(str\n-001971a0: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-001971b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Get cook\n-001971d0: 6965 7320 6672 6f6d 2074 6865 2048 5454 ies from the HTT\n-001971e0: 505f 434f 4f4b 4945 2065 6e76 6972 6f6e P_COOKIE environ\n-001971f0: 6d65 6e74 2076 6172 6961 626c 652e 3c2f ment variable.
    ..
    int \n-00197430: 736f 6170 5f73 6574 5f63 6f6f 6b69 655f soap_set_cookie_\n-00197440: 6578 7069 7265 2873 7472 7563 7420 736f expire(struct so\n-00197450: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n-00197460: 6368 6172 202a 6e61 6d65 2c20 6c6f 6e67 char *name, long\n-00197470: 206d 6178 6167 652c 2063 6f6e 7374 2063 maxage, const c\n-00197480: 6861 7220 2a64 6f6d 6169 6e2c 2063 6f6e har *domain, con\n-00197490: 7374 2063 6861 7220 2a70 6174 6829 3c2f st char *path)
    Set cooki\n-001974c0: 6520 6578 7069 7261 7469 6f6e 2e3c 2f64 e expiration.
    .
    \n-00197590: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char *\n-001975b0: 2063 6f6f 6b69 655f 646f 6d61 696e 3c2f cookie_domain
    User-defi\n-001975e0: 6e61 626c 6520 7374 7269 6e67 2074 6861 nable string tha\n-001975f0: 7420 7370 6563 6966 6965 7320 7468 6520 t specifies the \n-00197600: 4854 5450 2063 6f6f 6b69 6520 646f 6d61 HTTP cookie doma\n-00197610: 696e 206f 6620 7468 6520 7275 6e6e 696e in of the runnin\n-00197620: 6720 7365 7276 6572 2e3c 2f64 6976 3e3c g server.
    <\n-00197630: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-00197640: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-00197650: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-00197660: 3239 3639 3c2f 6469 763e 3c2f 6469 763e 2969
    \n-00197670: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n-00197710: 636f 6f6b 6965 5f70 6174 683c 2f61 3e3c cookie_path<\n-00197720: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c\n-00197740: 6861 7220 2a20 636f 6f6b 6965 5f70 6174 har * cookie_pat\n-00197750: 683c 2f64 6976 3e3c 6469 7620 636c 6173 h
    User-d\n-00197770: 6566 696e 6162 6c65 2073 7472 696e 6720 efinable string \n-00197780: 7468 6174 2073 7065 6369 6669 6573 2074 that specifies t\n-00197790: 6865 2048 5454 5020 636f 6f6b 6965 2070 he HTTP cookie p\n-001977a0: 6174 6820 6f66 2074 6865 2072 756e 6e69 ath of the runni\n-001977b0: 6e67 2073 6572 7665 722e 3c2f 6469 763e ng server.
    \n-001977c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-001977e0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-001977f0: 3a32 3937 313c 2f64 6976 3e3c 2f64 6976 :2971
    .

    ....\n-00197820: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n-00197830: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n-00197840: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n-00197850: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Conn\n-00197880: 6563 7469 6e67 2063 6c69 656e 7473 2074 ecting clients t\n-00197890: 6872 6f75 6768 2070 726f 7879 2073 6572 hrough proxy ser\n-001978a0: 7665 7273 3c2f 6832 3e0a 3c70 3e57 6865 vers.

    Whe\n-001978b0: 6e20 6120 636c 6965 6e74 206e 6565 6473 n a client needs\n-001978c0: 2074 6f20 636f 6e6e 6563 7420 746f 2061 to connect to a\n-001978d0: 2057 6562 2053 6572 7669 6365 2074 6872 Web Service thr\n-001978e0: 6f75 6768 2061 2070 726f 7879 2073 6572 ough a proxy ser\n-001978f0: 7665 722c 2073 6574 2074 6865 203c 636f ver, set the so\n-001979b0: 6170 3a3a 7072 6f78 795f 686f 7374 3c2f ap::proxy_host string\n-001979d0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::proxy_p\n-00197aa0: 6f72 743c 2f61 3e3c 2f63 6f64 653e 2069 ort i\n-00197ab0: 6e74 6567 6572 2061 7474 7269 6275 7465 nteger attribute\n-00197ac0: 7320 6f66 2074 6865 2063 7572 7265 6e74 s of the current\n-00197ad0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context to th\n-00197b40: 6520 7072 6f78 7927 7320 686f 7374 206e e proxy's host n\n-00197b50: 616d 6520 616e 6420 706f 7274 2c20 7265 ame and port, re\n-00197b60: 7370 6563 7469 7665 6c79 2e20 466f 7220 spectively. For \n-00197b70: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    .\n-00197c30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_ini\n-00197ca0: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); .
    soa\n-00197d20: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.p\n-00197d70: 726f 7879 5f68 6f73 743c 2f61 3e20 3d20 roxy_host = \n-00197d80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00197da0: 743b 7072 6f78 7968 6f73 746e 616d 6526 t;proxyhostname&\n-00197db0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; ..\n-00197e80: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-00197eb0: 735f 5f77 6562 6d65 7468 6f64 2826 616d s__webmethod(&am\n-00197ec0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, &\n-00197f10: 7175 6f74 3b68 7474 703a 2f2f 686f 7374 quot;http://host\n-00197f20: 3a70 6f72 742f 7061 7468 2671 756f 743b :port/path"\n-00197f30: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "actio\n-00197f60: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-00197f70: 2e2e 2e29 2920 3c2f 6469 763e 0a3c 6469 ...))
    . \n-00197f90: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n-00197ff0: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n-00198030: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .<\n-00198040: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00198050: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >else<\n-00198070: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00198090: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n-001980b0: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.

    Th\n-001980e0: 6520 636f 6e74 6578 7420 6174 7472 6962 e context attrib\n-001980f0: 7574 6573 203c 636f 6465 3e3c 6120 636c utes soap::prox\n-001981b0: 795f 686f 7374 3c2f 613e 3c2f 636f 6465 y_host and soap::proxy_\n-00198290: 706f 7274 3c2f 613e 3c2f 636f 6465 3e20 port \n-001982a0: 6b65 6570 2074 6865 6972 2076 616c 7565 keep their value\n-001982b0: 7320 7468 726f 7567 6820 6120 7365 7175 s through a sequ\n-001982c0: 656e 6365 206f 6620 7365 7276 6963 6520 ence of service \n-001982d0: 6f70 6572 6174 696f 6e20 6361 6c6c 732c operation calls,\n-001982e0: 2073 6f20 7468 6579 206f 6e6c 7920 6e65 so they only ne\n-001982f0: 6564 2074 6f20 6265 2073 6574 206f 6e63 ed to be set onc\n-00198300: 652e 3c2f 703e 0a3c 703e 5768 656e 2058 e.

    .

    When X\n-00198310: 2d46 6f72 7761 7264 6564 2d46 6f72 2068 -Forwarded-For h\n-00198320: 6561 6465 7273 2061 7265 2072 6574 7572 eaders are retur\n-00198330: 6e65 6420 6279 2074 6865 2070 726f 7879 ned by the proxy\n-00198340: 2c20 7468 6520 6865 6164 6572 2063 616e , the header can\n-00198350: 2062 6520 6163 6365 7373 6564 2069 6e20 be accessed in \n-00198360: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::proxy_fro\n-00198400: 6d3c 2f61 3e3c 2f63 6f64 653e 2073 7472 m str\n-00198410: 696e 672e 3c2f 703e 0a3c 703e 5365 6520 ing.

    .

    See \n-00198420: 616c 736f 2053 6563 7469 6f6e 7320 3c61 also Sections HTTP proxy bas\n-00198470: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio\n-00198480: 6e3c 2f61 3e20 616e 6420 3c61 2063 6c61 n and HTTP proxy NTL\n-001984d0: 4d20 6175 7468 656e 7469 6361 7469 6f6e M authentication\n-001984e0: 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 9f94 .

    .

    ...\n-001984f0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n-00198500: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n-00198510: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n-00198520: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Bind before co\n-00198560: 6e6e 6563 7420 616e 6420 7365 7474 696e nnect and settin\n-00198570: 6720 7468 6520 636c 6965 6e74 2069 6e74 g the client int\n-00198580: 6572 6661 6365 2061 6464 7265 7373 3c2f erface address.

    To bind t\n-001985a0: 6865 2063 6c69 656e 7420 746f 2061 2070 he client to a p\n-001985b0: 6f72 7420 6265 666f 7265 2063 6f6e 6e65 ort before conne\n-001985c0: 6374 2c20 7365 7420 7468 6520 3c63 6f64 ct, set the soap::c\n-00198680: 6c69 656e 745f 706f 7274 3c2f 613e 3c2f lient_port to a non-n\n-001986a0: 6567 6174 6976 6520 706f 7274 206e 756d egative port num\n-001986b0: 6265 723a 3c2f 703e 0a3c 6469 7620 636c ber:

    .
    <\n-001986d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001986e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n-00198730: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-00198760: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-001987c0: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); ..
    if \n-001988f0: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f77 (soap_call_ns__w\n-00198900: 6562 6d65 7468 6f64 283c 6120 636c 6173 ebmethod(\n-00198930: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "http\n-00198960: 3a2f 2f68 6f73 743a 706f 7274 2f70 6174 ://host:port/pat\n-00198970: 6826 7175 6f74 3b3c 2f73 7061 6e3e 2c20 h", \n-00198980: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001989a0: 743b 6163 7469 6f6e 2671 756f 743b 3c2f t;action", ...)) .
    ... // error
    .
    else \n-00198a40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n-00198a60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00198a70: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n-00198a80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .
    soap::clie\n-00198b30: 6e74 5f70 6f72 743c 2f61 3e3c 2f64 6976 nt_port
    int client_\n-00198b60: 706f 7274 3c2f 6469 763e 3c64 6976 2063 port
    Use\n-00198b80: 722d 6465 6669 6e61 626c 6520 636c 6965 r-definable clie\n-00198b90: 6e74 2070 6f72 7420 746f 2062 696e 6420 nt port to bind \n-00198ba0: 746f 2062 6566 6f72 6520 636f 6e6e 6563 to before connec\n-00198bb0: 7469 6e67 2074 6f20 6120 7365 7276 6572 ting to a server\n-00198bc0: 2c20 7768 656e 206e 6f6e 2d6e 6567 6174 , when non-negat\n-00198bd0: 6976 652e 3c2f 6469 763e 3c64 6976 2063 ive.
    \n-00198bf0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00198c00: 7374 6473 6f61 7032 2e68 3a33 3639 303c stdsoap2.h:3690<\n-00198c10: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    This port \n-00198c40: 6e75 6d62 6572 2069 7320 7573 6564 206f number is used o\n-00198c50: 6e6c 7920 6f6e 6365 2061 6e64 2072 6573 nly once and res\n-00198c60: 6574 2074 6f20 2d31 2028 6469 7361 626c et to -1 (disabl\n-00198c70: 6564 292e 2053 6574 2069 7420 6167 6169 ed). Set it agai\n-00198c80: 6e20 666f 7220 7468 6520 6e65 7874 2063 n for the next c\n-00198c90: 616c 6c2e 3c2f 703e 0a3c 703e 546f 2073 all.

    .

    To s\n-00198ca0: 6574 2061 2063 6c69 656e 7420 696e 7465 et a client inte\n-00198cb0: 7266 6163 6520 6164 6472 6573 7320 666f rface address fo\n-00198cc0: 7220 7468 6520 636f 6e6e 6563 7469 6f6e r the connection\n-00198cd0: 2074 6861 7420 6973 2061 6e20 4950 2061 that is an IP a\n-00198ce0: 6464 7265 7373 206f 6620 7468 6520 636c ddress of the cl\n-00198cf0: 6965 6e74 3a3c 2f70 3e0a 3c64 6976 2063 ient:

    .
    \n-00198d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-00198d40: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-00198d70: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-00198da0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-00198e00: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .
    so\n-00198e50: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->client_inter\n-00198eb0: 6661 6365 3c2f 613e 203d 203c 7370 616e face = "...\n-00198ee0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-00198ef0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00198f00: 656e 7422 3e2f 2f20 4950 2061 6464 7265 ent\">// IP addre\n-00198f10: 7373 203c 2f73 7061 6e3e 3c2f 6469 763e ss
    \n-00198f20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n-00198f50: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n-00198f60: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n-00198f70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00198fa0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00198fc0: 6f74 3b68 7474 703a 2f2f 686f 7374 3a70 ot;http://host:p\n-00198fd0: 6f72 742f 7061 7468 2671 756f 743b 3c2f ort/path", "action&\n-00199010: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2e2e quot;, ..\n-00199020: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
    .
    .\n-00199040: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro\n-00199060: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n-00199070: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00199080: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >else<\n-001990a0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-001990c0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n-001990e0: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.const char * cl\n-001991d0: 6965 6e74 5f69 6e74 6572 6661 6365 3c2f ient_interface
    User-defi\n-00199200: 6e61 626c 6520 636c 6965 6e74 2069 6e74 nable client int\n-00199210: 6572 6661 6365 2061 6464 7265 7373 2074 erface address t\n-00199220: 6f20 6f76 6572 7269 6465 2077 6865 6e20 o override when \n-00199230: 636f 6e6e 6563 7469 6e67 2074 6f20 6120 connecting to a \n-00199240: 7365 7276 6572 2c20 7768 656e 206e 6f6e server, when non\n-00199250: 2d4e 554c 4c20 2857 696e 646f 2e2e 2e3c -NULL (Windo...<\n-00199260: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-00199280: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-00199290: 6170 322e 683a 3336 3939 3c2f 6469 763e ap2.h:3699
    \n-001992a0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    This client int\n-001992d0: 6572 6661 6365 2061 6464 7265 7373 2073 erface address s\n-001992e0: 7472 696e 6720 6973 2075 7365 6420 6f6e tring is used on\n-001992f0: 6c79 206f 6e63 6520 616e 6420 7265 7365 ly once and rese\n-00199300: 7420 746f 204e 554c 4c20 2864 6973 6162 t to NULL (disab\n-00199310: 6c65 6429 2e20 5365 7420 6974 2061 6761 led). Set it aga\n-00199320: 696e 2066 6f72 2074 6865 206e 6578 7420 in for the next \n-00199330: 6361 6c6c 2e20 5468 6973 2066 6561 7475 call. This featu\n-00199340: 7265 2069 7320 6e6f 7420 6176 6169 6c61 re is not availa\n-00199350: 626c 6520 7768 656e 2063 6f6d 7069 6c69 ble when compili\n-00199360: 6e67 2074 6865 2063 6f64 6520 6f6e 2077 ng the code on w\n-00199370: 696e 646f 7773 2e3c 2f70 3e0a 3c70 3ef0 indows.

    .

    .\n-00199380: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-00199390: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-001993a0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .FastCG\n-001993e0: 493c 2f68 323e 0a3c 703e 546f 2065 6e61 I

    .

    To ena\n-001993f0: 626c 6520 4661 7374 4347 4920 7375 7070 ble FastCGI supp\n-00199400: 6f72 742c 2069 6e73 7461 6c6c 2046 6173 ort, install Fas\n-00199410: 7443 4749 2061 6e64 2063 6f6d 7069 6c65 tCGI and compile\n-00199420: 2061 6c6c 2073 6f61 7063 7070 322d 6765 all soapcpp2-ge\n-00199430: 6e65 7261 7465 6420 736f 7572 6365 2063 nerated source c\n-00199440: 6f64 6520 6669 6c65 7320 616e 6420 796f ode files and yo\n-00199450: 7572 2061 7070 6c69 6361 7469 6f6e 2073 ur application s\n-00199460: 6f75 7263 6573 2077 6974 6820 7468 6520 ources with the \n-00199470: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n-00199480: 6720 3c63 6f64 653e 2357 4954 485f 4641 g #WITH_FA\n-00199490: 5354 4347 493c 2f63 6f64 653e 206f 7220 STCGI or \n-001994a0: 6164 643a 3c2f 703e 0a3c 6469 7620 636c add:

    .
    <\n-001994c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001994d0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#def\n-001994f0: 696e 6520 5749 5448 5f46 4153 5443 4749 ine WITH_FASTCGI\n-00199500: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

    to <\n-00199530: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-00199540: 6170 322e 683c 2f63 6f64 653e 3c2f 656d ap2.h and recompile \n-00199560: 7468 6520 7072 6f6a 6563 7420 636f 6465 the project code\n-00199570: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    Warning
    Do not lin\n-001995b0: 6b20 6167 6169 6e73 7420 7468 6520 3c65 k against the gsoap/li\n-001995d0: 6267 736f 6170 2a3c 2f63 6f64 653e 3c2f bgsoap* libraries as\n-001995f0: 2074 6865 7365 2061 7265 206e 6f74 2073 these are not s\n-00199600: 7569 7461 626c 6520 666f 7220 4661 7374 uitable for Fast\n-00199610: 4347 492e 2043 6f6d 7069 6c65 203c 656d CGI. Compile gsoap/std\n-00199630: 736f 6170 322e 633c 2f63 6f64 653e 3c2f soap2.c (or gsoap/stdsoap2\n-00199660: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-00199670: 2920 696e 7374 6561 642e 3c2f 6464 3e3c ) instead.
    <\n-00199680: 2f64 6c3e 0a3c 703e f09f 949d 203c 6120 /dl>.

    .... Back to\n-001996a0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n-001996b0: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    <\n-001996c0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-001996d0: 2069 643d 226c 6561 6e22 3e3c 2f61 3e0a id=\"lean\">.\n-001996e0: 486f 7720 746f 206d 696e 696d 697a 6520 How to minimize \n-001996f0: 6170 706c 6963 6174 696f 6e20 6d65 6d6f application memo\n-00199700: 7279 2066 6f6f 7470 7269 6e74 3c2f 6832 ry footprint.

    To compile \n-00199720: 6753 4f41 5020 6170 706c 6963 6174 696f gSOAP applicatio\n-00199730: 6e73 2069 6e74 656e 6465 6420 666f 7220 ns intended for \n-00199740: 736d 616c 6c20 6d65 6d6f 7279 2064 6576 small memory dev\n-00199750: 6963 6573 2c20 796f 7520 6d61 7920 7761 ices, you may wa\n-00199760: 6e74 2074 6f20 7265 6d6f 7665 2061 6c6c nt to remove all\n-00199770: 206e 6f6e 2d65 7373 656e 7469 616c 2066 non-essential f\n-00199780: 6561 7475 7265 7320 7468 6174 2063 6f6e eatures that con\n-00199790: 7375 6d65 2070 7265 6369 6f75 7320 636f sume precious co\n-001997a0: 6465 2061 6e64 2064 6174 6120 7370 6163 de and data spac\n-001997b0: 652e 2054 6f20 646f 2074 6869 732c 2063 e. To do this, c\n-001997c0: 6f6d 7069 6c65 2074 6865 2073 6f75 7263 ompile the sourc\n-001997d0: 6520 636f 6465 2066 696c 6573 2077 6974 e code files wit\n-001997e0: 6820 7468 6520 636f 6d70 696c 652d 7469 h the compile-ti\n-001997f0: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W\n-00199800: 4954 485f 4c45 414e 3c2f 636f 6465 3e20 ITH_LEAN \n-00199810: 2869 2e65 2e20 3c63 6f64 653e 2364 6566 (i.e. #def\n-00199820: 696e 6520 5749 5448 5f4c 4541 4e3c 2f63 ine WITH_LEAN) to remove \n-00199840: 6d61 6e79 206e 6f6e 2d65 7373 656e 7469 many non-essenti\n-00199850: 616c 2066 6561 7475 7265 732e 2054 6865 al features. The\n-00199860: 2066 6561 7475 7265 7320 7468 6174 2077 features that w\n-00199870: 696c 6c20 6265 2064 6973 6162 6c65 6420 ill be disabled \n-00199880: 6172 653a 3c2f 703e 0a3c 756c 3e0a 3c6c are:

    ..

    \n-0019a1c0: 5573 6520 7468 6520 636f 6d70 696c 652d Use the compile-\n-0019a1d0: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n-0019a1e0: 2357 4954 485f 4c45 414e 4552 3c2f 636f #WITH_LEANER to make the \n-0019a200: 6578 6563 7574 6162 6c65 2065 7665 6e20 executable even \n-0019a210: 736d 616c 6c65 7220 6279 2072 656d 6f76 smaller by remov\n-0019a220: 696e 6720 4449 4d45 2061 6e64 204d 494d ing DIME and MIM\n-0019a230: 4520 6174 7461 6368 6d65 6e74 2068 616e E attachment han\n-0019a240: 646c 696e 672c 203c 636f 6465 3e23 4c4f dling, #LO\n-0019a250: 4e47 3634 3c2f 636f 6465 3e20 2836 3420 NG64 (64 \n-0019a260: 6269 7429 2073 6572 6961 6c69 7a61 7469 bit) serializati\n-0019a270: 6f6e 2c20 3c63 6f64 653e 7763 6861 725f on, wchar_\n-0019a280: 742a 3c2f 636f 6465 3e20 7365 7269 616c t* serial\n-0019a290: 697a 6174 696f 6e2c 2061 6e64 2073 7570 ization, and sup\n-0019a2a0: 706f 7274 2066 6f72 2058 4d4c 2044 4f4d port for XML DOM\n-0019a2b0: 206f 7065 7261 7469 6f6e 732e 204e 6f74 operations. Not\n-0019a2c0: 6520 7468 6174 2044 494d 452f 4d49 4d45 e that DIME/MIME\n-0019a2d0: 2061 7474 6163 686d 656e 7473 2061 7265 attachments are\n-0019a2e0: 206e 6f74 2065 7373 656e 7469 616c 2074 not essential t\n-0019a2f0: 6f20 6163 6869 6576 6520 534f 4150 2f58 o achieve SOAP/X\n-0019a300: 4d4c 2069 6e74 6572 6f70 6572 6162 696c ML interoperabil\n-0019a310: 6974 792e 2044 494d 4520 6174 7461 6368 ity. DIME attach\n-0019a320: 6d65 6e74 7320 6172 6520 6120 636f 6e76 ments are a conv\n-0019a330: 656e 6965 6e74 2077 6179 2074 6f20 6578 enient way to ex\n-0019a340: 6368 616e 6765 206e 6f6e 2d74 6578 742d change non-text-\n-0019a350: 6261 7365 6420 2869 2e65 2e20 6269 6e61 based (i.e. bina\n-0019a360: 7279 2920 636f 6e74 656e 742c 2062 7574 ry) content, but\n-0019a370: 2061 7265 206e 6f74 2072 6571 7569 7265 are not require\n-0019a380: 6420 666f 7220 6261 7369 6320 534f 4150 d for basic SOAP\n-0019a390: 2f58 4d4c 2069 6e74 6572 6f70 6572 6162 /XML interoperab\n-0019a3a0: 696c 6974 792e 2041 7474 6163 686d 656e ility. Attachmen\n-0019a3b0: 7420 7265 7175 6972 656d 656e 7473 2061 t requirements a\n-0019a3c0: 7265 2070 7265 6469 6374 6162 6c65 2e20 re predictable. \n-0019a3d0: 5468 6174 2069 732c 2061 7070 6c69 6361 That is, applica\n-0019a3e0: 7469 6f6e 7320 776f 6e27 7420 7375 6464 tions won't sudd\n-0019a3f0: 656e 6c79 2064 6563 6964 6520 746f 2075 enly decide to u\n-0019a400: 7365 2044 494d 4520 6f72 204d 494d 4520 se DIME or MIME \n-0019a410: 696e 7374 6561 6420 6f66 2058 4d4c 2074 instead of XML t\n-0019a420: 6f20 6578 6368 616e 6765 2063 6f6e 7465 o exchange conte\n-0019a430: 6e74 2e3c 2f70 3e0a 3c70 3e49 7420 6973 nt.

    .

    It is\n-0019a440: 2073 6166 6520 746f 2074 7279 2074 6f20 safe to try to \n-0019a450: 636f 6d70 696c 6520 796f 7572 2061 7070 compile your app\n-0019a460: 6c69 6361 7469 6f6e 2077 6974 6820 7468 lication with th\n-0019a470: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f\n-0019a480: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n-0019a490: 4c45 414e 3c2f 636f 6465 3e2c 2070 726f LEAN, pro\n-0019a4a0: 7669 6465 6420 7468 6174 2079 6f75 7220 vided that your \n-0019a4b0: 6170 706c 6963 6174 696f 6e20 646f 6573 application does\n-0019a4c0: 206e 6f74 2072 656c 7920 6f6e 2049 2f4f not rely on I/O\n-0019a4d0: 2074 696d 656f 7574 732e 2057 6865 6e20 timeouts. When \n-0019a4e0: 6e6f 206c 696e 6b61 6765 2065 7272 6f72 no linkage error\n-0019a4f0: 206f 6363 7572 7320 696e 2074 6865 2063 occurs in the c\n-0019a500: 6f6d 7069 6c61 7469 6f6e 2070 726f 6365 ompilation proce\n-0019a510: 7373 2c20 6974 2069 7320 7361 6665 2074 ss, it is safe t\n-0019a520: 6f20 6173 7375 6d65 2074 6861 7420 796f o assume that yo\n-0019a530: 7572 2061 7070 6c69 6361 7469 6f6e 2077 ur application w\n-0019a540: 696c 6c20 7275 6e20 6a75 7374 2066 696e ill run just fin\n-0019a550: 652e 3c2f 703e 0a3c 703e f09f 949d 203c e.

    .

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

    ..How to remove \n-0019a5c0: 7468 6520 4253 4420 736f 636b 6574 206c the BSD socket l\n-0019a5d0: 6962 7261 7279 2072 6571 7569 7265 6d65 ibrary requireme\n-0019a5e0: 6e74 3c2f 6832 3e0a 3c70 3e54 6865 203c nt

    .

    The <\n-0019a5f0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n-0019a600: 7464 736f 6170 322e 633c 2f63 6f64 653e tdsoap2.c\n-0019a610: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and gsoap/stdsoa\n-0019a630: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp libraries sho\n-0019a650: 756c 6420 6265 206c 696e 6b65 6420 7769 uld be linked wi\n-0019a660: 7468 2061 2042 5344 2073 6f63 6b65 7420 th a BSD socket \n-0019a670: 6c69 6272 6172 7920 696e 2074 6865 2070 library in the p\n-0019a680: 726f 6a65 6374 2062 7569 6c64 2e20 546f roject build. To\n-0019a690: 2072 656d 6f76 6520 7468 6520 6e65 6564 remove the need\n-0019a6a0: 2074 6f20 6c69 6e6b 2061 2073 6f63 6b65 to link a socke\n-0019a6b0: 7420 6c69 6272 6172 792c 2079 6f75 2063 t library, you c\n-0019a6c0: 616e 2063 6f6d 7069 6c65 203c 656d 3e3c an compile <\n-0019a6d0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-0019a6e0: 6170 322e 633c 2f63 6f64 653e 3c2f 656d ap2.c (for C) and gsoap/st\n-0019a710: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp (for C++)\n-0019a730: 2077 6974 6820 7468 6520 7468 6520 636f with the the co\n-0019a740: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n-0019a750: 3c63 6f64 653e 2357 4954 485f 4e4f 494f #WITH_NOIO\n-0019a760: 3c2f 636f 6465 3e20 6d61 6372 6f20 7365 macro se\n-0019a770: 7420 2869 2e65 2e20 3c63 6f64 653e 2364 t (i.e. #d\n-0019a780: 6566 696e 6520 5749 5448 5f4e 4f49 4f3c efine WITH_NOIO<\n-0019a790: 2f63 6f64 653e 292e 2054 6869 7320 7265 /code>). This re\n-0019a7a0: 6d6f 7665 7320 7468 6520 6465 7065 6e64 moves the depend\n-0019a7b0: 656e 6379 206f 6e20 7468 6520 4253 4420 ency on the BSD \n-0019a7c0: 736f 636b 6574 2041 5049 2c20 494f 2073 socket API, IO s\n-0019a7d0: 7472 6561 6d73 2c20 3c63 6f64 653e 4649 treams, FI\n-0019a7e0: 4c45 3c2f 636f 6465 3e20 7479 7065 2c20 LE type, \n-0019a7f0: 616e 6420 3c63 6f64 653e 6572 726e 6f3c and errno<\n-0019a800: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e59 /code>.

    .

    Y\n-0019a810: 6f75 2073 686f 756c 6420 6465 6669 6e65 ou should define\n-0019a820: 2063 616c 6c62 6163 6b73 2074 6f20 7265 callbacks to re\n-0019a830: 706c 6163 6520 7468 6520 6d69 7373 696e place the missin\n-0019a840: 6720 736f 636b 6574 2073 7461 636b 2e20 g socket stack. \n-0019a850: 546f 2064 6f20 736f 2c20 6164 6420 746f To do so, add to\n-0019a860: 2079 6f75 7220 636f 6465 2074 6865 2066 your code the f\n-0019a870: 6f6c 6c6f 7769 6e67 2064 6566 696e 6974 ollowing definit\n-0019a880: 696f 6e73 3a3c 2f70 3e0a 3c64 6976 2063 ions:

    .
    \n-0019a9f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* fsen\n-0019aa20: 6420 6973 2075 7365 6420 746f 2074 7261 d is used to tra\n-0019aa30: 6e73 6d69 7420 6461 7461 2069 6e20 626c nsmit data in bl\n-0019aa40: 6f63 6b73 202a 2f3c 2f73 7061 6e3e 203c ocks */ <\n-0019aa50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    /* frecv is u\n-0019ab40: 7365 6420 746f 2072 6563 6569 7665 2064 sed to receive d\n-0019ab50: 6174 6120 696e 2062 6c6f 636b 7320 2a2f ata in blocks */\n-0019ab60: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-0019ab70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019ab80: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0019abb0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .frecv = my_recv; .
    /* f\n-0019ac50: 6f70 656e 2069 7320 7573 6564 2074 6f20 open is used to \n-0019ac60: 636f 6e6e 6563 7420 2a2f 3c2f 7370 616e connect */
    .
    soap.fopen = my\n-0019ad20: 5f74 6370 5f63 6f6e 6e65 6374 3b20 3c2f _tcp_connect; .
    /* \n-0019ad60: 6663 6c6f 7365 2069 7320 7573 6564 2074 fclose is used t\n-0019ad70: 6f20 6469 7363 6f6e 6e65 6374 202a 2f3c o disconnect */<\n-0019ad80: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-0019ada0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-0019add0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fclose = my_tcp_disco\n-0019ae40: 6e6e 6563 743b 203c 2f64 6976 3e0a 3c64 nnect;
    .\n-0019ae60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* fcloses\n-0019ae80: 6f63 6b65 7420 6973 2075 7365 6420 6f6e ocket is used on\n-0019ae90: 6c79 2074 6f20 636c 6f73 6520 7468 6520 ly to close the \n-0019aea0: 6d61 7374 6572 2073 6f63 6b65 7420 696e master socket in\n-0019aeb0: 2061 2073 6572 7665 7220 7570 6f6e 2073 a server upon s\n-0019aec0: 6f61 705f 646f 6e65 2829 202a 2f3c 2f73 oap_done() */
    .soap.fclosesocke\n-0019af80: 743c 2f61 3e20 3d20 6d79 5f74 6370 5f63 t = my_tcp_c\n-0019af90: 6c6f 7365 736f 636b 6574 3b20 3c2f 6469 losesocket; .
    /* fs\n-0019afd0: 6875 7464 6f77 6e73 6f63 6b65 7420 6973 hutdownsocket is\n-0019afe0: 2075 7365 6420 6166 7465 7220 636f 6d70 used after comp\n-0019aff0: 6c65 7469 6e67 2061 2073 656e 6420 6f70 leting a send op\n-0019b000: 6572 6174 696f 6e20 746f 2073 656e 6420 eration to send \n-0019b010: 5443 5020 4649 4e20 2a2f 3c2f 7370 616e TCP FIN */
    .
    soap.fshutdownsocke\n-0019b0d0: 743c 2f61 3e20 3d20 6d79 5f74 6370 5f73 t = my_tcp_s\n-0019b0e0: 6875 7464 6f77 6e73 6f63 6b65 743b 203c hutdownsocket; <\n-0019b0f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    /*\n-0019b120: 2073 6574 7469 6e67 2066 706f 6c6c 2069 setting fpoll i\n-0019b130: 7320 6f70 7469 6f6e 616c 2c20 6c65 6176 s optional, leav\n-0019b140: 6520 6974 204e 554c 4c20 746f 206f 6d69 e it NULL to omi\n-0019b150: 7420 706f 6c6c 696e 6720 7468 6520 7365 t polling the se\n-0019b160: 7276 6572 202a 2f3c 2f73 7061 6e3e 203c rver */ <\n-0019b170: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    /* faccept is\n-0019b260: 2075 7365 6420 6f6e 6c79 2062 7920 6120 used only by a \n-0019b270: 7365 7276 6572 2061 7070 6c69 6361 7469 server applicati\n-0019b280: 6f6e 202a 2f3c 2f73 7061 6e3e 203c 2f64 on */ ..
    soap::fpoll\n-0019b410: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int(* \n-0019b430: 6670 6f6c 6c29 2873 7472 7563 7420 736f fpoll)(struct so\n-0019b440: 6170 202a 736f 6170 293c 2f64 6976 3e3c ap *soap)
    <\n-0019b450: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0019b460: 223e 4361 6c6c 6261 636b 2074 6861 7420 \">Callback that \n-0019b470: 626c 6f63 6b73 2075 6e74 696c 2061 6374 blocks until act\n-0019b480: 6976 6974 7920 6973 2064 6574 6563 7465 ivity is detecte\n-0019b490: 6420 6f6e 2074 6865 2073 6f61 703a 3a73 d on the soap::s\n-0019b4a0: 6f63 6b65 7420 6f72 2073 6f61 703a 3a6d ocket or soap::m\n-0019b4b0: 6173 7465 7220 736f 636b 6574 2c2e 2e2e aster socket,...\n-0019b4c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0019b4e0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0019b4f0: 6f61 7032 2e68 3a34 3539 343c 2f64 6976 oap2.h:4594
    .
    <\n-0019b560: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0019b570: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n-0019b5c0: 703a 3a66 636c 6f73 6573 6f63 6b65 743c p::fclosesocket<\n-0019b5d0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    .
    int(* fshutdow\n-0019b7a0: 6e73 6f63 6b65 7429 2873 7472 7563 7420 nsocket)(struct \n-0019b7b0: 736f 6170 202a 736f 6170 2c20 534f 4150 soap *soap, SOAP\n-0019b7c0: 5f53 4f43 4b45 5420 736f 636b 2c20 696e _SOCKET sock, in\n-0019b7d0: 7420 686f 7729 3c2f 6469 763e 3c64 6976 t how)
    C\n-0019b7f0: 616c 6c62 6163 6b20 7468 6174 2073 6875 allback that shu\n-0019b800: 7473 2064 6f77 6e20 6120 6769 7665 6e20 ts down a given \n-0019b810: 736f 636b 6574 2e3c 2f64 6976 3e3c 6469 socket.
    \n-0019b830: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:45\n-0019b850: 3833 3c2f 6469 763e 3c2f 6469 763e 0a3c 83
    .<\n-0019b860: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0019b870: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-0019b880: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n-0019b890: 6c5f 6761 3832 3439 6234 6332 3366 3636 l_ga8249b4c23f66\n-0019b8a0: 3264 6265 3638 3061 6430 6465 6566 3237 2dbe680ad0deef27\n-0019b8b0: 3461 6538 223e 3c64 6976 2063 6c61 7373 4ae8\">
    S\n-0019b940: 4f41 505f 534f 434b 4554 282a 2066 6163 OAP_SOCKET(* fac\n-0019b950: 6365 7074 2928 7374 7275 6374 2073 6f61 cept)(struct soa\n-0019b960: 7020 2a73 6f61 702c 2053 4f41 505f 534f p *soap, SOAP_SO\n-0019b970: 434b 4554 2073 6f63 6b2c 2073 7472 7563 CKET sock, struc\n-0019b980: 7420 736f 636b 6164 6472 202a 6164 6472 t sockaddr *addr\n-0019b990: 2c20 696e 7420 2a6c 656e 293c 2f64 6976 , int *len)
    Callback tha\n-0019b9c0: 7420 7761 6974 7320 666f 7220 616e 6420 t waits for and \n-0019b9d0: 6163 6365 7074 7320 6120 736f 636b 6574 accepts a socket\n-0019b9e0: 2063 6f6e 6e65 6374 696f 6e20 7265 7175 connection requ\n-0019b9f0: 6573 7465 6420 6279 2061 2063 6c69 656e ested by a clien\n-0019ba00: 742e 3c2f 6469 763e 3c64 6976 2063 6c61 t.
    De\n-0019ba20: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0019ba30: 6473 6f61 7032 2e68 3a34 3530 393c 2f64 dsoap2.h:4509
    .
    \n-0019ba50: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-0019cbd0: 703e 5768 656e 2063 6f6d 7069 6c69 6e67 p>When compiling\n-0019cbe0: 2074 6869 7320 696e 7465 7266 6163 6520 this interface \n-0019cbf0: 6865 6164 6572 2066 696c 6520 7769 7468 header file with\n-0019cc00: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to\n-0019cc10: 6f6c 2c20 616c 6c20 7479 7065 2064 6566 ol, all type def\n-0019cc20: 696e 6974 696f 6e73 2c20 7468 6520 7365 initions, the se\n-0019cc30: 7269 616c 697a 6572 7320 666f 7220 7468 rializers for th\n-0019cc40: 6573 6520 7479 7065 732c 2061 6e64 2074 ese types, and t\n-0019cc50: 6865 2073 7475 6220 616e 6420 736b 656c he stub and skel\n-0019cc60: 6574 6f6e 2066 756e 6374 696f 6e73 2077 eton functions w\n-0019cc70: 696c 6c20 6265 2070 6c61 6365 6420 696e ill be placed in\n-0019cc80: 2074 6869 7320 6e61 6d65 7370 6163 652e this namespace.\n-0019cc90: 2054 6865 2058 4d4c 206e 616d 6573 7061 The XML namespa\n-0019cca0: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table\n-0019ccb0: 2028 7361 7665 6420 696e 2061 203c 656d (saved in a .nsmap file) \n-0019cce0: 7769 6c6c 206e 6f74 2062 6520 706c 6163 will not be plac\n-0019ccf0: 6564 2069 6e20 7468 6520 636f 6465 206e ed in the code n\n-0019cd00: 616d 6573 7061 6365 2074 6f20 616c 6c6f amespace to allo\n-0019cd10: 7720 6974 2074 6f20 6265 206c 696e 6b65 w it to be linke\n-0019cd20: 6420 6173 2061 2067 6c6f 6261 6c20 6f62 d as a global ob\n-0019cd30: 6a65 6374 2e20 596f 7520 6361 6e20 7573 ject. You can us\n-0019cd40: 6520 3c62 3e3c 636f 6465 3e73 6f61 7063 e soapc\n-0019cd50: 7070 3220 2d6e 3c2f 636f 6465 3e3c 2f62 pp2 -n option -n \n-0019cd80: 746f 2063 7265 6174 6520 6c6f 6361 6c20 to create local \n-0019cd90: 584d 4c20 6e61 6d65 7370 6163 6520 7461 XML namespace ta\n-0019cda0: 626c 6573 2c20 7365 6520 5365 6374 696f bles, see Sectio\n-0019cdb0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n soapcpp2 optio\n-0019cdf0: 6e73 3c2f 613e 2028 6275 7420 7265 6d65 ns (but reme\n-0019ce00: 6d62 6572 2074 6861 7420 796f 7520 6578 mber that you ex\n-0019ce10: 706c 6963 6974 6c79 206e 6565 6420 746f plicitly need to\n-0019ce20: 2069 6e69 7469 616c 697a 6520 7468 6520 initialize the \n-0019ce30: 6e61 6d65 7370 6163 6573 2074 6f20 706f namespaces to po\n-0019ce40: 696e 7420 746f 2061 2074 6162 6c65 2061 int to a table a\n-0019ce50: 7420 7275 6e20 7469 6d65 2075 7369 6e67 t run time using\n-0019ce60: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set_\n-0019cf30: 6e61 6d65 7370 6163 6573 3c2f 613e 3c2f namespaces). The gene\n-0019cf50: 7261 7465 6420 6669 6c65 7320 6172 6520 rated files are \n-0019cf60: 7072 6566 6978 6564 2077 6974 6820 7468 prefixed with th\n-0019cf70: 6520 636f 6465 206e 616d 6573 7061 6365 e code namespace\n-0019cf80: 206e 616d 6520 696e 7374 6561 6420 6f66 name instead of\n-0019cf90: 2074 6865 2075 7375 616c 203c 656d 3e3c the usual <\n-0019cfa0: 636f 6465 3e73 6f61 703c 2f63 6f64 653e code>soap\n-0019cfb0: 3c2f 656d 3e20 6669 6c65 206e 616d 6520 file name \n-0019cfc0: 7072 6566 6978 2074 6f20 656e 6162 6c65 prefix to enable\n-0019cfd0: 206d 756c 7469 706c 6520 636c 6965 6e74 multiple client\n-0019cfe0: 2f73 6572 7665 7220 636f 6465 7320 746f /server codes to\n-0019cff0: 2062 6520 6275 696c 6420 696e 2074 6865 be build in the\n-0019d000: 2073 616d 6520 7072 6f6a 6563 7420 6469 same project di\n-0019d010: 7265 6374 6f72 792e 3c2f 703e 0a3c 703e rectory.

    .

    \n-0019d020: 4265 6361 7573 6520 7468 6520 534f 4150 Because the SOAP\n-0019d030: 2048 6561 6465 7220 616e 6420 4661 756c Header and Faul\n-0019d040: 7420 7365 7269 616c 697a 6572 7320 7769 t serializers wi\n-0019d050: 6c6c 2061 6c73 6f20 6265 2070 6c61 6365 ll also be place\n-0019d060: 6420 696e 2074 6865 206e 616d 6573 7061 d in the namespa\n-0019d070: 6365 2c20 7468 6579 2063 616e 6e6f 7420 ce, they cannot \n-0019d080: 6265 2063 616c 6c65 6420 6672 6f6d 2074 be called from t\n-0019d090: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso\n-0019d0a0: 6170 2f73 7464 736f 6170 322e 6370 703c ap/stdsoap2.cpp<\n-0019d0b0: 2f63 6f64 653e 3c2f 656d 3e20 7275 6e20 /code> run \n-0019d0c0: 7469 6d65 206c 6962 7261 7279 2063 6f64 time library cod\n-0019d0d0: 6520 616e 6420 6172 6520 7468 6572 6566 e and are theref\n-0019d0e0: 6f72 6520 7265 6e64 6572 6564 2075 6e75 ore rendered unu\n-0019d0f0: 7361 626c 652e 2054 6865 7265 666f 7265 sable. Therefore\n-0019d100: 2c20 7468 6573 6520 7365 7269 616c 697a , these serializ\n-0019d110: 6572 7320 6172 6520 6e6f 7420 636f 6d70 ers are not comp\n-0019d120: 696c 6564 2061 7420 616c 6c20 2865 6e66 iled at all (enf\n-0019d130: 6f72 6365 6420 7769 7468 203c 636f 6465 orced with #define WITH_NO\n-0019d150: 474c 4f42 414c 3c2f 636f 6465 3e29 2e20 GLOBAL). \n-0019d160: 546f 2061 6464 2053 4f41 5020 4865 6164 To add SOAP Head\n-0019d170: 6572 2061 6e64 2046 6175 6c74 2073 6572 er and Fault ser\n-0019d180: 6961 6c69 7a65 7273 2c20 796f 7520 6d75 ializers, you mu\n-0019d190: 7374 2063 6f6d 7069 6c65 2074 6865 6d20 st compile them \n-0019d1a0: 7365 7061 7261 7465 6c79 2061 7320 666f separately as fo\n-0019d1b0: 6c6c 6f77 732e 2046 6972 7374 2c20 6372 llows. First, cr\n-0019d1c0: 6561 7465 2061 206e 6577 2068 6561 6465 eate a new heade\n-0019d1d0: 7220 6669 6c65 203c 656d 3e3c 636f 6465 r file env.h with the SOAP\n-0019d200: 2048 6561 6465 7220 3c63 6f64 653e 3c61 Header SOAP_EN\n-0019d270: 565f 5f48 6561 6465 723c 2f61 3e3c 2f63 V__Header and SOAP Fa\n-0019d290: 756c 7420 3c63 6f64 653e 3c61 2063 6c61 ult SOAP_ENV__Fau\n-0019d300: 6c74 3c2f 613e 3c2f 636f 6465 3e20 7374 lt st\n-0019d310: 7275 6374 7572 6573 2c20 696e 636c 7564 ructures, includ\n-0019d320: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing SOAP_\n-0019d390: 454e 565f 5f44 6574 6169 6c3c 2f61 3e3c ENV__Detail<\n-0019d3a0: 2f63 6f64 653e 2069 6620 7468 6973 2073 /code> if this s\n-0019d3b0: 7472 7563 7475 7265 2063 6f6e 7461 696e tructure contain\n-0019d3c0: 7320 6d65 6d62 6572 7320 7468 6174 2061 s members that a\n-0019d3d0: 7265 2073 6572 6961 6c69 7a65 6420 6173 re serialized as\n-0019d3e0: 2066 6175 6c74 2064 6574 6169 6c73 2e20 fault details. \n-0019d3f0: 596f 7520 6361 6e20 6c65 6176 6520 7468 You can leave th\n-0019d400: 6973 2068 6561 6465 7220 6669 6c65 2065 is header file e\n-0019d410: 6d70 7479 2069 6620 796f 7520 7761 6e74 mpty if you want\n-0019d420: 2074 6f20 7573 6520 7468 6520 6465 6661 to use the defa\n-0019d430: 756c 7420 534f 4150 2048 6561 6465 7220 ult SOAP Header \n-0019d440: 616e 6420 4661 756c 742e 2048 6f77 6576 and Fault. Howev\n-0019d450: 6572 2c20 6966 2053 4f41 5020 4865 6164 er, if SOAP Head\n-0019d460: 6572 7320 6172 6520 7265 7175 6972 6564 ers are required\n-0019d470: 2074 6865 6e20 796f 7520 6361 6e6e 6f74 then you cannot\n-0019d480: 206c 6561 7665 2074 6865 203c 636f 6465 leave the SOAP\n-0019d4f0: 5f45 4e56 5f5f 4865 6164 6572 3c2f 613e _ENV__Header\n-0019d500: 3c2f 636f 6465 3e20 7374 7275 6374 7572 structur\n-0019d510: 6520 656d 7074 792e 2046 6f72 2065 7861 e empty. For exa\n-0019d520: 6d70 6c65 2c20 7468 6520 5753 2d41 6464 mple, the WS-Add\n-0019d530: 7265 7373 696e 6720 616e 6420 5753 2d53 ressing and WS-S\n-0019d540: 6563 7572 6974 7920 706c 7567 696e 7320 ecurity plugins \n-0019d550: 7265 7175 6972 6520 534f 4150 2048 6561 require SOAP Hea\n-0019d560: 6465 7273 2077 6869 6368 2063 616e 2062 ders which can b\n-0019d570: 6520 696d 706f 7274 6564 2062 7920 6164 e imported by ad\n-0019d580: 6469 6e67 203c 636f 6465 3e23 696d 706f ding #impo\n-0019d590: 7274 2022 7773 6135 2e68 223c 2f63 6f64 rt \"wsa5.h\" and #im\n-0019d5b0: 706f 7274 2022 7773 7365 2e68 223c 2f63 port \"wsse.h\", respective\n-0019d5d0: 6c79 2074 6f20 3c65 6d3e 3c63 6f64 653e ly to \n-0019d5e0: 656e 762e 683c 2f63 6f64 653e 3c2f 656d env.h. Then compile \n-0019d600: 7468 6973 2068 6561 6465 7220 6669 6c65 this header file\n-0019d610: 2077 6974 683a 203c 2f70 3e3c 7072 6520 with:

     soapcpp2 -penv\n-0019d640: 2065 6e76 2e68 0a3c 2f70 7265 3e3c 703e   env.h.

    \n-0019d650: 2054 6865 2067 656e 6572 6174 6564 203c The generated <\n-0019d660: 656d 3e3c 636f 6465 3e65 6e76 432e 6370 em>envC.cp\n-0019d670: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi\n-0019d680: 6c65 2068 6f6c 6473 2074 6865 2053 4f41 le holds the SOA\n-0019d690: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n-0019d6a0: 6c74 2073 6572 6961 6c69 7a65 7273 2061 lt serializers a\n-0019d6b0: 6e64 2079 6f75 2063 616e 206c 696e 6b20 nd you can link \n-0019d6c0: 7468 6973 2066 696c 6520 7769 7468 2079 this file with y\n-0019d6d0: 6f75 7220 636c 6965 6e74 2061 6e64 2073 our client and s\n-0019d6e0: 6572 7665 7220 6170 706c 6963 6174 696f erver applicatio\n-0019d6f0: 6e73 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ns.

    .

    .... \n-0019d700: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n-0019d710: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n-0019d720: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    .\n-0019d750: 3c2f 613e 0a48 6f77 2074 6f20 6372 6561 .How to crea\n-0019d760: 7465 2063 6c69 656e 742f 7365 7276 6572 te client/server\n-0019d770: 206c 6962 7261 7269 6573 3c2f 6832 3e0a libraries

    .\n-0019d780: 3c70 3e54 6865 2073 6f61 7063 7070 3220

    The soapcpp2 \n-0019d790: 746f 6f6c 2070 726f 6475 6365 7320 3c65 tool produces soapClie\n-0019d7b0: 6e74 4c69 622e 6370 703c 2f63 6f64 653e ntLib.cpp\n-0019d7c0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and soapServerLi\n-0019d7e0: 622e 6370 703c 2f63 6f64 653e 3c2f 656d b.cpp source code fi\n-0019d800: 6c65 7320 7468 6174 2061 7265 2073 7065 les that are spe\n-0019d810: 6369 6669 6361 6c6c 7920 696e 7465 6e64 cifically intend\n-0019d820: 6564 2066 6f72 2062 7569 6c64 696e 6720 ed for building \n-0019d830: 7374 6174 6963 206f 7220 6479 6e61 6d69 static or dynami\n-0019d840: 6320 636c 6965 6e74 2061 6e64 2073 6572 c client and ser\n-0019d850: 7665 7220 6c69 6272 6172 6965 7320 696e ver libraries in\n-0019d860: 2043 206f 7220 432b 2b2e 2054 6865 7365 C or C++. These\n-0019d870: 2066 696c 6573 2065 7870 6f72 7420 7468 files export th\n-0019d880: 6520 7374 7562 2061 6e64 2073 6b65 6c65 e stub and skele\n-0019d890: 746f 6e20 6675 6e63 7469 6f6e 732c 2062 ton functions, b\n-0019d8a0: 7574 206b 6565 7020 616c 6c20 7365 7269 ut keep all seri\n-0019d8b0: 616c 697a 6174 696f 6e20 636f 6465 2073 alization code s\n-0019d8c0: 7461 7469 632c 2074 6875 7320 6869 6464 tatic, thus hidd\n-0019d8d0: 656e 2074 6f20 6176 6f69 6420 6c69 6e6b en to avoid link\n-0019d8e0: 2073 796d 626f 6c20 636f 6e66 6c69 6374 symbol conflict\n-0019d8f0: 7320 7768 656e 2063 6f6d 6269 6e69 6e67 s when combining\n-0019d900: 206d 756c 7469 706c 6520 636c 6965 6e74 multiple client\n-0019d910: 7320 616e 6420 7365 7276 6963 6573 2069 s and services i\n-0019d920: 6e74 6f20 6f6e 6520 6578 6563 7574 6162 nto one executab\n-0019d930: 6c65 2e20 4e6f 7465 2074 6861 7420 6974 le. Note that it\n-0019d940: 2069 7320 6661 7220 7369 6d70 6c65 7220 is far simpler \n-0019d950: 746f 2075 7365 2074 6865 2077 7364 6c32 to use the wsdl2\n-0019d960: 6820 746f 6f6c 206f 6e20 6d75 6c74 6970 h tool on multip\n-0019d970: 6c65 2057 5344 4c20 6669 6c65 7320 746f le WSDL files to\n-0019d980: 2067 656e 6572 6174 6520 6120 6865 6164 generate a head\n-0019d990: 6572 2066 696c 6520 7468 6174 2063 6f6d er file that com\n-0019d9a0: 6269 6e65 7320 616c 6c20 7365 7276 6963 bines all servic\n-0019d9b0: 6520 6465 6669 6e69 7469 6f6e 732e 2048 e definitions. H\n-0019d9c0: 6f77 6576 6572 2c20 7468 6520 6170 7072 owever, the appr\n-0019d9d0: 6f61 6368 2070 7265 7365 6e74 6564 2069 oach presented i\n-0019d9e0: 6e20 7468 6973 2073 6563 7469 6f6e 2069 n this section i\n-0019d9f0: 7320 7573 6566 756c 2077 6865 6e20 6372 s useful when cr\n-0019da00: 6561 7469 6e67 2028 6479 6e61 6d69 6329 eating (dynamic)\n-0019da10: 206c 6962 7261 7269 6573 2066 6f72 2063 libraries for c\n-0019da20: 6c69 656e 7420 616e 6420 7365 7276 6572 lient and server\n-0019da30: 206f 626a 6563 7473 2c20 7375 6368 2061 objects, such a\n-0019da40: 7320 444c 4c73 2061 7320 6465 7363 7269 s DLLs as descri\n-0019da50: 6265 6420 696e 2053 6563 7469 6f6e 203c bed in Section <\n-0019da60: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0019da70: 663d 2269 6e64 6578 2e68 746d 6c23 646c f=\"index.html#dl\n-0019da80: 6c22 3e48 6f77 2074 6f20 6372 6561 7465 l\">How to create\n-0019da90: 2044 4c4c 733c 2f61 3e20 2e3c 2f70 3e0a DLLs .

    .\n-0019daa0: 3c64 6c20 636c 6173 733d 2273 6563 7469
    Not\n-0019dac0: 653c 2f64 743e 3c64 643e 4f6e 6520 6d61 e
    One ma\n-0019dad0: 6a6f 7220 6469 7361 6476 616e 7461 6765 jor disadvantage\n-0019dae0: 206f 6620 7468 6520 6170 7072 6f61 6368 of the approach\n-0019daf0: 2070 7265 7365 6e74 6564 2068 6572 6520 presented here \n-0019db00: 6973 2074 6861 7420 7468 6520 7365 7269 is that the seri\n-0019db10: 616c 697a 6572 2066 756e 6374 696f 6e73 alizer functions\n-0019db20: 2061 7265 206e 6f20 6c6f 6e67 6572 2061 are no longer a\n-0019db30: 6363 6573 7369 626c 6520 696e 2074 6865 ccessible in the\n-0019db40: 2075 7365 7227 7320 736f 7572 6365 2063 user's source c\n-0019db50: 6f64 652c 2062 6563 6175 7365 2073 6572 ode, because ser\n-0019db60: 6961 6c69 7a65 7273 2077 696c 6c20 6265 ializers will be\n-0019db70: 2063 6f6e 7665 7274 6564 2074 6f20 7374 converted to st\n-0019db80: 6174 6963 2066 756e 6374 696f 6e73 2028 atic functions (\n-0019db90: 746f 2062 6520 7573 6564 2062 7920 7468 to be used by th\n-0019dba0: 6520 6765 6e65 7261 7465 6420 7374 7562 e generated stub\n-0019dbb0: 2061 6e64 2073 6b65 6c65 746f 6e20 6675 and skeleton fu\n-0019dbc0: 6e63 7469 6f6e 7320 6f6e 6c79 292e 2046 nctions only). F\n-0019dbd0: 6f72 2065 7861 6d70 6c65 2c20 6675 6e63 or example, func\n-0019dbe0: 7469 6f6e 7320 7375 6368 2061 7320 3c63 tions such as soap_new_T, soa\n-0019dc10: 705f 6465 6661 756c 745f 543c 2f63 6f64 p_default_T, soap_w\n-0019dc30: 7269 7465 5f54 3c2f 636f 6465 3e2c 203c rite_T, <\n-0019dc40: 636f 6465 3e73 6f61 705f 7265 6164 5f54 code>soap_read_T\n-0019dc50: 3c2f 636f 6465 3e2c 203c 636f 6465 3e73 , s\n-0019dc60: 6f61 705f 7075 745f 543c 2f63 6f64 653e oap_put_T\n-0019dc70: 2c20 616e 6420 3c63 6f64 653e 736f 6170 , and soap\n-0019dc80: 5f67 6574 5f54 3c2f 636f 6465 3e20 6361 _get_T ca\n-0019dc90: 6e6e 6f74 2062 6520 7573 6564 2061 6e79 nnot be used any\n-0019dca0: 206c 6f6e 6765 722e 3c2f 6464 3e3c 2f64 longer.
    .

    Using C++ \n-0019dcc0: 6e61 6d65 7370 6163 6573 2069 7320 6120 namespaces is a \n-0019dcd0: 6265 7474 6572 2061 6c74 6572 6e61 7469 better alternati\n-0019dce0: 7665 2077 6865 6e20 6275 696c 6469 6e67 ve when building\n-0019dcf0: 2061 7070 6c69 6361 7469 6f6e 7320 696e applications in\n-0019dd00: 2043 2b2b 2074 6861 7420 636f 6d62 696e C++ that combin\n-0019dd10: 6520 6d75 6c74 6970 6c65 2063 6c69 656e e multiple clien\n-0019dd20: 7473 2061 6e64 2073 6572 7669 6365 732e ts and services.\n-0019dd30: 2054 6f20 6275 696c 6420 6d75 6c74 6970 To build multip\n-0019dd40: 6c65 206c 6962 7261 7269 6573 2c20 796f le libraries, yo\n-0019dd50: 7520 6361 6e20 6465 6669 6e65 2061 2043 u can define a C\n-0019dd60: 2b2b 206e 616d 6573 7061 6365 2069 6e20 ++ namespace in \n-0019dd70: 796f 7572 2068 6561 6465 7220 6669 6c65 your header file\n-0019dd80: 2077 6974 6820 3c62 3e3c 636f 6465 3e73 with s\n-0019dd90: 6f61 7063 7070 3220 2d71 6e61 6d65 3c2f oapcpp2 -qname option\n-0019ddb0: 203c 623e 3c63 6f64 653e 2d71 6e61 6d65 -qname\n-0019ddc0: 3c2f 636f 6465 3e3c 2f62 3e2c 2073 6565 , see\n-0019ddd0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section How to bu\n-0019de10: 696c 6420 6120 636c 6965 6e74 206f 7220 ild a client or \n-0019de20: 7365 7276 6572 2069 6e20 6120 432b 2b20 server in a C++ \n-0019de30: 636f 6465 206e 616d 6573 7061 6365 3c2f code namespace for details.<\n-0019de50: 2f70 3e0a 3c70 3e46 6f72 2043 2c20 796f /p>.

    For C, yo\n-0019de60: 7520 6361 6e20 7573 6520 3c62 3e3c 636f u can use soapcpp2 -c -\n-0019de80: 7020 6e61 6d65 3c2f 636f 6465 3e3c 2f62 p name option -p name\n-0019deb0: 3c2f 623e 2074 6f20 7265 6e61 6d65 2074 to rename t\n-0019dec0: 6865 2067 656e 6572 6174 6564 203c 656d he generated soapClien\n-0019dee0: 744c 6962 2e63 3c2f 636f 6465 3e3c 2f65 tLib.c and soapServerLib.c\n-0019df10: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 616e (an\n-0019df20: 6420 6173 736f 6369 6174 6564 2920 6669 d associated) fi\n-0019df30: 6c65 732e 2054 6865 203c 623e 3c63 6f64 les. The -p name\n-0019df50: 3c2f 623e 206f 7074 696f 6e20 7370 6563 option spec\n-0019df60: 6966 6965 7320 7468 6520 6669 6c65 203c ifies the file <\n-0019df70: 656d 3e3c 636f 6465 3e6e 616d 653c 2f63 em>name prefix\n-0019df90: 2074 6f20 7265 706c 6163 6520 7468 6520 to replace the \n-0019dfa0: 3c65 6d3e 3c63 6f64 653e 736f 6170 3c2f soap file \n-0019dfc0: 6e61 6d65 2070 7265 6669 782e 3c2f 703e name prefix.

    \n-0019dfd0: 0a3c 703e 5468 6520 656e 6769 6e65 2064 .

    The engine d\n-0019dfe0: 6f65 7320 6e6f 7420 6465 6669 6e65 2053 oes not define S\n-0019dff0: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F\n-0019e000: 6175 6c74 2073 6572 6961 6c69 7a65 7273 ault serializers\n-0019e010: 2074 6861 7420 7468 6520 656e 6769 6e65 that the engine\n-0019e020: 206e 6565 6473 2e20 5765 2074 6865 7265 needs. We there\n-0019e030: 666f 7265 2061 6464 2053 4f41 5020 4865 fore add SOAP He\n-0019e040: 6164 6572 2061 6e64 2046 6175 6c74 2073 ader and Fault s\n-0019e050: 6572 6961 6c69 7a65 7273 2c20 7768 6963 erializers, whic\n-0019e060: 6820 6172 6520 636f 6d70 696c 6564 2073 h are compiled s\n-0019e070: 6570 6172 6174 656c 7920 6173 2066 6f6c eparately as fol\n-0019e080: 6c6f 7773 2e20 4669 7273 742c 2063 7265 lows. First, cre\n-0019e090: 6174 6520 6120 6e65 7720 6865 6164 6572 ate a new header\n-0019e0a0: 2066 696c 6520 3c65 6d3e 3c63 6f64 653e file \n-0019e0b0: 656e 762e 683c 2f63 6f64 653e 3c2f 656d env.h with the SOAP \n-0019e0d0: 4865 6164 6572 203c 636f 6465 3e3c 6120 Header SOAP_ENV\n-0019e140: 5f5f 4865 6164 6572 3c2f 613e 3c2f 636f __Header and SOAP Fau\n-0019e160: 6c74 203c 636f 6465 3e3c 6120 636c 6173 lt SOAP_ENV__Faul\n-0019e1d0: 743c 2f61 3e3c 2f63 6f64 653e 2073 7472 t str\n-0019e1e0: 7563 7475 7265 732c 2069 6e63 6c75 6469 uctures, includi\n-0019e1f0: 6e67 203c 636f 6465 3e3c 6120 636c 6173 ng SOAP_E\n-0019e260: 4e56 5f5f 4465 7461 696c 3c2f 613e 3c2f NV__Detail if this st\n-0019e280: 7275 6374 7572 6520 636f 6e74 6169 6e73 ructure contains\n-0019e290: 206d 656d 6265 7273 2074 6861 7420 6172 members that ar\n-0019e2a0: 6520 7365 7269 616c 697a 6564 2061 7320 e serialized as \n-0019e2b0: 6661 756c 7420 6465 7461 696c 732e 2059 fault details. Y\n-0019e2c0: 6f75 2063 616e 206c 6561 7665 2074 6869 ou can leave thi\n-0019e2d0: 7320 6865 6164 6572 2066 696c 6520 656d s header file em\n-0019e2e0: 7074 7920 6966 2079 6f75 2077 616e 7420 pty if you want \n-0019e2f0: 746f 2075 7365 2074 6865 2064 6566 6175 to use the defau\n-0019e300: 6c74 2053 4f41 5020 4865 6164 6572 2061 lt SOAP Header a\n-0019e310: 6e64 2046 6175 6c74 2e20 486f 7765 7665 nd Fault. Howeve\n-0019e320: 722c 2069 6620 534f 4150 2048 6561 6465 r, if SOAP Heade\n-0019e330: 7273 2061 7265 2072 6571 7569 7265 6420 rs are required \n-0019e340: 7468 656e 2079 6f75 2063 616e 6e6f 7420 then you cannot \n-0019e350: 6c65 6176 6520 7468 6520 3c63 6f64 653e leave the \n-0019e360: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_\n-0019e3c0: 454e 565f 5f48 6561 6465 723c 2f61 3e3c ENV__Header<\n-0019e3d0: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure\n-0019e3e0: 2065 6d70 7479 2e20 466f 7220 6578 616d empty. For exam\n-0019e3f0: 706c 652c 2074 6865 2057 532d 4164 6472 ple, the WS-Addr\n-0019e400: 6573 7369 6e67 2061 6e64 2057 532d 5365 essing and WS-Se\n-0019e410: 6375 7269 7479 2070 6c75 6769 6e73 2072 curity plugins r\n-0019e420: 6571 7569 7265 2053 4f41 5020 4865 6164 equire SOAP Head\n-0019e430: 6572 7320 7768 6963 6820 6361 6e20 6265 ers which can be\n-0019e440: 2069 6d70 6f72 7465 6420 6279 2061 6464 imported by add\n-0019e450: 696e 6720 3c63 6f64 653e 2369 6d70 6f72 ing #impor\n-0019e460: 7420 2277 7361 352e 6822 3c2f 636f 6465 t \"wsa5.h\" and #imp\n-0019e480: 6f72 7420 2277 7373 652e 6822 3c2f 636f ort \"wsse.h\", respectivel\n-0019e4a0: 7920 746f 203c 656d 3e3c 636f 6465 3e65 y to e\n-0019e4b0: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h\n-0019e4c0: 2e20 5468 656e 2063 6f6d 7069 6c65 2074 . Then compile t\n-0019e4d0: 6869 7320 6865 6164 6572 2066 696c 6520 his header file \n-0019e4e0: 7769 7468 3a20 3c2f 703e 3c70 7265 2063 with:

    \n-0019e500: 2073 6f61 7063 7070 3220 2d70 656e 7620   soapcpp2 -penv \n-0019e510: 656e 762e 680a 3c2f 7072 653e 3c70 3e20  env.h.

    \n-0019e520: 5468 6520 6765 6e65 7261 7465 6420 3c65 The generated envC.cpp\n-0019e540: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n-0019e550: 6520 686f 6c64 7320 7468 6520 534f 4150 e holds the SOAP\n-0019e560: 2048 6561 6465 7220 616e 6420 4661 756c Header and Faul\n-0019e570: 7420 7365 7269 616c 697a 6572 7320 616e t serializers an\n-0019e580: 6420 796f 7520 6361 6e20 6372 6561 7465 d you can create\n-0019e590: 2061 2028 6479 6e61 6d69 6329 206c 6962 a (dynamic) lib\n-0019e5a0: 7261 7279 2066 6f72 2069 7420 746f 206c rary for it to l\n-0019e5b0: 696e 6b20 6974 2077 6974 6820 796f 7572 ink it with your\n-0019e5c0: 2063 6c69 656e 7420 616e 6420 7365 7276 client and serv\n-0019e5d0: 6572 2061 7070 6c69 6361 7469 6f6e 732e er applications.\n-0019e5e0: 3c2f 703e 0a3c 703e 596f 7520 7368 6f75

    .

    You shou\n-0019e5f0: 6c64 2074 6865 6e20 636f 6d70 696c 6520 ld then compile \n-0019e600: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n-0019e610: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp\n-0019e620: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6962 lib\n-0019e630: 7261 7279 2077 6974 6820 7468 6520 636f rary with the co\n-0019e640: 6d70 696c 652d 7469 6d65 203c 636f 6465 mpile-time #WITH_NONAMESPA\n-0019e660: 4345 533c 2f63 6f64 653e 2066 6c61 673a CES flag:\n-0019e670: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     c++ \n-0019e690: 2d44 5749 5448 5f4e 4f4e 414d 4553 5041  -DWITH_NONAMESPA\n-0019e6a0: 4345 5320 2d63 2073 7464 736f 6170 322e  CES -c stdsoap2.\n-0019e6b0: 6370 700a 3c2f 7072 653e 3c70 3e20 5468  cpp.

    Th\n-0019e6c0: 6973 206f 6d69 7473 2074 6865 2072 6566 is omits the ref\n-0019e6d0: 6572 656e 6365 2074 6f20 7468 6520 676c erence to the gl\n-0019e6e0: 6f62 616c 206e 616d 6573 7061 6365 7320 obal namespaces \n-0019e6f0: 7461 626c 652c 2077 6869 6368 2069 7320 table, which is \n-0019e700: 6e6f 7768 6572 6520 746f 2062 6520 6465 nowhere to be de\n-0019e710: 6669 6e65 6420 7369 6e63 6520 7765 2077 fined since we w\n-0019e720: 696c 6c20 7573 6520 584d 4c20 6e61 6d65 ill use XML name\n-0019e730: 7370 6163 6573 2066 6f72 2065 6163 6820 spaces for each \n-0019e740: 636c 6965 6e74 2f73 6572 7669 6365 2073 client/service s\n-0019e750: 6570 6172 6174 656c 792e 2054 6865 7265 eparately. There\n-0019e760: 666f 7265 2c20 796f 7520 6d75 7374 2065 fore, you must e\n-0019e770: 7870 6c69 6369 746c 7920 7365 7420 7468 xplicitly set th\n-0019e780: 6520 6e61 6d65 7370 6163 6573 2076 616c e namespaces val\n-0019e790: 7565 206f 6620 7468 6520 3c63 6f64 653e ue of the \n-0019e7a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-0019e7f0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-0019e800: 6578 7420 696e 2079 6f75 7220 636f 6465 ext in your code\n-0019e810: 2065 7665 7279 2074 696d 6520 6166 7465 every time afte\n-0019e820: 7220 696e 6974 6961 6c69 7a61 7469 6f6e r initialization\n-0019e830: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex\n-0019e8a0: 7420 7769 7468 2074 6865 203c 636f 6465 t with the soap_set_namesp\n-0019e980: 6163 6573 2873 7472 7563 7420 736f 6170 aces(struct soap\n-0019e990: 2a2c 2063 6f6e 7374 2073 7472 7563 7420 *, const struct \n-0019e9a0: 4e61 6d65 7370 6163 652a 293c 2f61 3e3c Namespace*)<\n-0019e9b0: 2f63 6f64 653e 2066 756e 6374 696f 6e2e /code> function.\n-0019e9c0: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

    .

    For exam\n-0019e9d0: 706c 652c 2073 7570 706f 7365 2077 6520 ple, suppose we \n-0019e9e0: 6861 7665 2074 776f 2063 6c69 656e 7473 have two clients\n-0019e9f0: 2064 6566 696e 6564 2069 6e20 6865 6164 defined in head\n-0019ea00: 6572 2066 696c 6573 203c 656d 3e3c 636f er files client1.h and client2.h\n-0019ea40: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5765 . We\n-0019ea50: 2066 6972 7374 2067 656e 6572 6174 6520 first generate \n-0019ea60: 7468 6520 3c65 6d3e 3c63 6f64 653e 656e the en\n-0019ea70: 7648 2e68 3c2f 636f 6465 3e3c 2f65 6d3e vH.h\n-0019ea80: 2066 696c 6520 666f 7220 7468 6520 534f file for the SO\n-0019ea90: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa\n-0019eaa0: 756c 7420 6465 6669 6e69 7469 6f6e 733a ult definitions:\n-0019eab0: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     soap\n-0019ead0: 6370 7032 202d 6320 2d70 656e 7620 656e  cpp2 -c -penv en\n-0019eae0: 762e 680a 3c2f 7072 653e 3c70 3e20 5468  v.h.

    Th\n-0019eaf0: 656e 2077 6520 6765 6e65 7261 7465 2074 en we generate t\n-0019eb00: 6865 2063 6f64 6520 666f 7220 636c 6965 he code for clie\n-0019eb10: 6e74 3120 616e 6420 636c 6965 6e74 323a nt1 and client2:\n-0019eb20: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     soap\n-0019eb40: 6370 7032 202d 6320 2d6e 202d 706d 7943  cpp2 -c -n -pmyC\n-0019eb50: 6c69 656e 7431 2063 6c69 656e 7431 2e68  lient1 client1.h\n-0019eb60: 0a20 736f 6170 6370 7032 202d 6320 2d6e  . soapcpp2 -c -n\n-0019eb70: 202d 706d 7943 6c69 656e 7432 2063 6c69   -pmyClient2 cli\n-0019eb80: 656e 7432 2e68 0a3c 2f70 7265 3e3c 703e  ent2.h.

    \n-0019eb90: 2054 6869 7320 6765 6e65 7261 7465 7320 This generates \n-0019eba0: 3c65 6d3e 3c63 6f64 653e 6d79 436c 6965 myClie\n-0019ebb0: 6e74 3143 6c69 656e 744c 6962 2e63 3c2f nt1ClientLib.c and <\n-0019ebd0: 656d 3e3c 636f 6465 3e6d 7943 6c69 656e em>myClien\n-0019ebe0: 7432 436c 6965 6e74 4c69 622e 633c 2f63 t2ClientLib.c (among\n-0019ec00: 2073 6576 6572 616c 206f 7468 6572 2066 several other f\n-0019ec10: 696c 6573 292e 2054 6865 7365 2074 776f iles). These two\n-0019ec20: 2066 696c 6573 2073 686f 756c 6420 6265 files should be\n-0019ec30: 2063 6f6d 7069 6c65 6420 616e 6420 6c69 compiled and li\n-0019ec40: 6e6b 6564 2077 6974 6820 796f 7572 2061 nked with your a\n-0019ec50: 7070 6c69 6361 7469 6f6e 2e20 5468 6520 pplication. The \n-0019ec60: 736f 7572 6365 2063 6f64 6520 6f66 2079 source code of y\n-0019ec70: 6f75 7220 6170 706c 6963 6174 696f 6e20 our application \n-0019ec80: 7368 6f75 6c64 2069 6e63 6c75 6465 2074 should include t\n-0019ec90: 6865 2067 656e 6572 6174 6564 203c 656d he generated envH.h, <\n-0019ecc0: 636f 6465 3e6d 7943 6c69 656e 7431 482e code>myClient1H.\n-0019ecd0: 683c 2f63 6f64 653e 3c2f 656d 3e2c 203c h, <\n-0019ece0: 656d 3e3c 636f 6465 3e6d 7943 6c69 656e em>myClien\n-0019ecf0: 7432 2e68 3c2f 636f 6465 3e3c 2f65 6d3e t2.h\n-0019ed00: 2066 696c 6573 2061 6e64 203c 656d 3e3c files and <\n-0019ed10: 636f 6465 3e6d 7943 6c69 656e 7431 2e6e code>myClient1.n\n-0019ed20: 736d 6170 3c2f 636f 6465 3e3c 2f65 6d3e smap\n-0019ed30: 2c20 3c65 6d3e 3c63 6f64 653e 6d79 436c , myCl\n-0019ed40: 6965 6e74 322e 6e73 6d61 703c 2f63 6f64 ient2.nsmap files:.

    #include &\n-0019edb0: 7175 6f74 3b6d 7943 6c69 656e 7431 482e quot;myClient1H.\n-0019edc0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n-0019edd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0019ede0: 656e 7422 3e2f 2f20 696e 636c 7564 6520 ent\">// include \n-0019edf0: 636c 6965 6e74 2031 2073 7475 6273 203c client 1 stubs <\n-0019ee00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0019ee20: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-0019ee30: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-0019ee40: 6465 2026 7175 6f74 3b6d 7943 6c69 656e de "myClien\n-0019ee50: 7432 482e 6826 7175 6f74 3b3c 2f73 7061 t2H.h" // incl\n-0019ee80: 7564 6520 636c 6965 6e74 2032 2073 7475 ude client 2 stu\n-0019ee90: 6273 203c 2f73 7061 6e3e 3c2f 6469 763e bs
    \n-0019eea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n-0019eed0: 6e63 6c75 6465 2026 7175 6f74 3b65 6e76 nclude "env\n-0019eee0: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h"\n-0019eef0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... //.
    #include "\n-0019ef70: 6d79 436c 6965 6e74 3148 2e6e 736d 6170 myClient1H.nsmap\n-0019ef80: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " // include c\n-0019efb0: 6c69 656e 7420 3120 6e73 6d61 7020 3c2f lient 1 nsmap
    .#includ\n-0019f000: 6520 2671 756f 743b 6d79 436c 6965 6e74 e "myClient\n-0019f010: 3248 2e6e 736d 6170 2671 756f 743b 3c2f 2H.nsmap" // i\n-0019f040: 6e63 6c75 6465 2063 6c69 656e 7420 3220 nclude client 2 \n-0019f050: 6e73 6d61 7020 3c2f 7370 616e 3e3c 2f64 nsmap
    <\n+00196de0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+00196df0: 726f 7570 5f5f 636f 6f6b 6965 732e 6874 roup__cookies.ht\n+00196e00: 6d6c 2367 6130 6464 3832 6334 6664 3762 ml#ga0dd82c4fd7b\n+00196e10: 3439 3932 3038 6432 3430 3262 3139 3561 499208d2402b195a\n+00196e20: 3138 3266 6522 3e73 6f61 705f 636f 6f6b 182fe\">soap_cook\n+00196e30: 6965 5f76 616c 7565 3c2f 613e 3c2f 6469 ie_value
    const char\n+00196e60: 202a 2073 6f61 705f 636f 6f6b 6965 5f76 * soap_cookie_v\n+00196e70: 616c 7565 2873 7472 7563 7420 736f 6170 alue(struct soap\n+00196e80: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+00196e90: 6172 202a 6e61 6d65 2c20 636f 6e73 7420 ar *name, const \n+00196ea0: 6368 6172 202a 646f 6d61 696e 2c20 636f char *domain, co\n+00196eb0: 6e73 7420 6368 6172 202a 7061 7468 293c nst char *path)<\n+00196ec0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Get cook\n+00196ee0: 6965 2076 616c 7565 2e3c 2f64 6976 3e3c ie value.
    <\n+00196ef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00196f60: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+00196f70: 726f 7570 5f5f 636f 6f6b 6965 732e 6874 roup__cookies.ht\n+00196f80: 6d6c 2367 6137 6435 6230 3538 3865 6137 ml#ga7d5b0588ea7\n+00196f90: 3633 6535 3131 3737 3266 3063 6332 3439 63e511772f0cc249\n+00196fa0: 3865 3332 3222 3e73 6f61 705f 7365 745f 8e322\">soap_set_\n+00196fb0: 636f 6f6b 6965 3c2f 613e 3c2f 6469 763e cookie
    \n+00196fc0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    struct soap_\n+00196fe0: 636f 6f6b 6965 202a 2073 6f61 705f 7365 cookie * soap_se\n+00196ff0: 745f 636f 6f6b 6965 2873 7472 7563 7420 t_cookie(struct \n+00197000: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n+00197010: 7420 6368 6172 202a 6e61 6d65 2c20 636f t char *name, co\n+00197020: 6e73 7420 6368 6172 202a 7661 6c75 652c nst char *value,\n+00197030: 2063 6f6e 7374 2063 6861 7220 2a64 6f6d const char *dom\n+00197040: 6169 6e2c 2063 6f6e 7374 2063 6861 7220 ain, const char \n+00197050: 2a70 6174 6829 3c2f 6469 763e 3c64 6976 *path)
    A\n+00197070: 6464 2061 2063 6f6f 6b69 652e 3c2f 6469 dd a cookie.
    .
    \n+001971f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    void soap_free_\n+001972e0: 636f 6f6b 6965 7328 7374 7275 6374 2073 cookies(struct s\n+001972f0: 6f61 7020 2a73 6f61 7029 3c2f 6469 763e oap *soap)
    \n+00197300: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Free cookies.\n+00197320: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .int soap_set_c\n+00197420: 6f6f 6b69 655f 6578 7069 7265 2873 7472 ookie_expire(str\n+00197430: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00197440: 636f 6e73 7420 6368 6172 202a 6e61 6d65 const char *name\n+00197450: 2c20 6c6f 6e67 206d 6178 6167 652c 2063 , long maxage, c\n+00197460: 6f6e 7374 2063 6861 7220 2a64 6f6d 6169 onst char *domai\n+00197470: 6e2c 2063 6f6e 7374 2063 6861 7220 2a70 n, const char *p\n+00197480: 6174 6829 3c2f 6469 763e 3c64 6976 2063 ath)
    Set\n+001974a0: 2063 6f6f 6b69 6520 6578 7069 7261 7469 cookie expirati\n+001974b0: 6f6e 2e3c 2f64 6976 3e3c 2f64 6976 3e0a on.
    .\n+001974c0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::c\n+00197560: 6f6f 6b69 655f 646f 6d61 696e 3c2f 613e ookie_domain\n+00197570: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n+00197590: 6368 6172 202a 2063 6f6f 6b69 655f 646f char * cookie_do\n+001975a0: 6d61 696e 3c2f 6469 763e 3c64 6976 2063 main
    Use\n+001975c0: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri\n+001975d0: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie\n+001975e0: 7320 7468 6520 4854 5450 2063 6f6f 6b69 s the HTTP cooki\n+001975f0: 6520 646f 6d61 696e 206f 6620 7468 6520 e domain of the \n+00197600: 7275 6e6e 696e 6720 7365 7276 6572 2e3c running server.<\n+00197610: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00197630: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00197640: 6170 322e 683a 3239 3639 3c2f 6469 763e ap2.h:2969
    \n+00197650: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001976a0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    c\n+00197720: 6f6e 7374 2063 6861 7220 2a20 636f 6f6b onst char * cook\n+00197730: 6965 5f70 6174 683c 2f64 6976 3e3c 6469 ie_path
    \n+00197750: 5573 6572 2d64 6566 696e 6162 6c65 2073 User-definable s\n+00197760: 7472 696e 6720 7468 6174 2073 7065 6369 tring that speci\n+00197770: 6669 6573 2074 6865 2048 5454 5020 636f fies the HTTP co\n+00197780: 6f6b 6965 2070 6174 6820 6f66 2074 6865 okie path of the\n+00197790: 2072 756e 6e69 6e67 2073 6572 7665 722e running server.\n+001977a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+001977c0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+001977d0: 6f61 7032 2e68 3a32 3937 313c 2f64 6976 oap2.h:2971
    .
    <\n+00197800: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+00197820: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+00197830: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Connecting cli\n+00197870: 656e 7473 2074 6872 6f75 6768 2070 726f ents through pro\n+00197880: 7879 2073 6572 7665 7273 3c2f 6832 3e0a xy servers

    .\n+00197890: 3c70 3e57 6865 6e20 6120 636c 6965 6e74

    When a client\n+001978a0: 206e 6565 6473 2074 6f20 636f 6e6e 6563 needs to connec\n+001978b0: 7420 746f 2061 2057 6562 2053 6572 7669 t to a Web Servi\n+001978c0: 6365 2074 6872 6f75 6768 2061 2070 726f ce through a pro\n+001978d0: 7879 2073 6572 7665 722c 2073 6574 2074 xy server, set t\n+001978e0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::proxy_\n+001979a0: 686f 7374 3c2f 613e 3c2f 636f 6465 3e20 host \n+001979b0: 7374 7269 6e67 2061 6e64 203c 636f 6465 string and soap::p\n+00197a80: 726f 7879 5f70 6f72 743c 2f61 3e3c 2f63 roxy_port integer att\n+00197aa0: 7269 6275 7465 7320 6f66 2074 6865 2063 ributes of the c\n+00197ab0: 7572 7265 6e74 203c 636f 6465 3e3c 6120 urrent soap context\n+00197b20: 2074 6f20 7468 6520 7072 6f78 7927 7320 to the proxy's \n+00197b30: 686f 7374 206e 616d 6520 616e 6420 706f host name and po\n+00197b40: 7274 2c20 7265 7370 6563 7469 7665 6c79 rt, respectively\n+00197b50: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

    struct <\n+00197bb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00197bc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00197bd0: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html\">soap <\n+00197be0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00197bf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00197c00: 6874 6d6c 223e 736f 6170 3c2f 613e 3b20 html\">soap; \n+00197c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n+00197c80: 6170 5f69 6e69 743c 2f61 3e28 2661 6d70 ap_init(&\n+00197c90: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00197cc0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    ..
    soap.proxy_port\n+00197e40: 3c2f 613e 203d 2038 3038 303b 203c 2f64 = 8080; .
    \n+00197e80: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+00197e90: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n+00197ea0: 6f64 2826 616d 703b 3c61 2063 6c61 7373 od(&s\n+00197ed0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "http:\n+00197f00: 2f2f 686f 7374 3a70 6f72 742f 7061 7468 //host:port/path\n+00197f10: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n+00197f20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00197f30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00197f40: 3b61 6374 696f 6e26 7175 6f74 3b3c 2f73 ;action", ...)) .
    soap_p\n+00197fd0: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(&\n+00197fe0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00198010: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    else .
    ... // success
    .
    \n+001980b0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This\n+00198c20: 2070 6f72 7420 6e75 6d62 6572 2069 7320 port number is \n+00198c30: 7573 6564 206f 6e6c 7920 6f6e 6365 2061 used only once a\n+00198c40: 6e64 2072 6573 6574 2074 6f20 2d31 2028 nd reset to -1 (\n+00198c50: 6469 7361 626c 6564 292e 2053 6574 2069 disabled). Set i\n+00198c60: 7420 6167 6169 6e20 666f 7220 7468 6520 t again for the \n+00198c70: 6e65 7874 2063 616c 6c2e 3c2f 703e 0a3c next call.

    .<\n+00198c80: 703e 546f 2073 6574 2061 2063 6c69 656e p>To set a clien\n+00198c90: 7420 696e 7465 7266 6163 6520 6164 6472 t interface addr\n+00198ca0: 6573 7320 666f 7220 7468 6520 636f 6e6e ess for the conn\n+00198cb0: 6563 7469 6f6e 2074 6861 7420 6973 2061 ection that is a\n+00198cc0: 6e20 4950 2061 6464 7265 7373 206f 6620 n IP address of \n+00198cd0: 7468 6520 636c 6965 6e74 3a3c 2f70 3e0a the client:

    .\n+00198ce0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+00198d20: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+00198d90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00198da0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00198db0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00198dc0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n+00198dd0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n+00198de0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n+00198df0: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    soap->\n+00198e40: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;client\n+00198e90: 5f69 6e74 6572 6661 6365 3c2f 613e 203d _interface =\n+00198ea0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00198ec0: 6f74 3b2e 2e2e 2671 756f 743b 3c2f 7370 ot;..."; // IP\n+00198ef0: 2061 6464 7265 7373 203c 2f73 7061 6e3e address \n+00198f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so\n+00198f40: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n+00198f50: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa\n+00198f80: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "http://\n+00198fb0: 686f 7374 3a70 6f72 742f 7061 7468 2671 host:port/path&q\n+00198fc0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "a\n+00198ff0: 6374 696f 6e26 7175 6f74 3b3c 2f73 7061 ction", ...))
    \n+00199010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n+00199040: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else .
    ... // success
    .
    soap::client_\n+00199180: 696e 7465 7266 6163 653c 2f61 3e3c 2f64 interface
    const cha\n+001991b0: 7220 2a20 636c 6965 6e74 5f69 6e74 6572 r * client_inter\n+001991c0: 6661 6365 3c2f 6469 763e 3c64 6976 2063 face
    Use\n+001991e0: 722d 6465 6669 6e61 626c 6520 636c 6965 r-definable clie\n+001991f0: 6e74 2069 6e74 6572 6661 6365 2061 6464 nt interface add\n+00199200: 7265 7373 2074 6f20 6f76 6572 7269 6465 ress to override\n+00199210: 2077 6865 6e20 636f 6e6e 6563 7469 6e67 when connecting\n+00199220: 2074 6f20 6120 7365 7276 6572 2c20 7768 to a server, wh\n+00199230: 656e 206e 6f6e 2d4e 554c 4c20 2857 696e en non-NULL (Win\n+00199240: 646f 2e2e 2e3c 2f64 6976 3e3c 6469 7620 do...
    Definition:\n+00199270: 2073 7464 736f 6170 322e 683a 3336 3939 stdsoap2.h:3699\n+00199280: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    This clie\n+001992b0: 6e74 2069 6e74 6572 6661 6365 2061 6464 nt interface add\n+001992c0: 7265 7373 2073 7472 696e 6720 6973 2075 ress string is u\n+001992d0: 7365 6420 6f6e 6c79 206f 6e63 6520 616e sed only once an\n+001992e0: 6420 7265 7365 7420 746f 204e 554c 4c20 d reset to NULL \n+001992f0: 2864 6973 6162 6c65 6429 2e20 5365 7420 (disabled). Set \n+00199300: 6974 2061 6761 696e 2066 6f72 2074 6865 it again for the\n+00199310: 206e 6578 7420 6361 6c6c 2e20 5468 6973 next call. This\n+00199320: 2066 6561 7475 7265 2069 7320 6e6f 7420 feature is not \n+00199330: 6176 6169 6c61 626c 6520 7768 656e 2063 available when c\n+00199340: 6f6d 7069 6c69 6e67 2074 6865 2063 6f64 ompiling the cod\n+00199350: 6520 6f6e 2077 696e 646f 7773 2e3c 2f70 e on windows..

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

    .

    .\n+001993c0: 4661 7374 4347 493c 2f68 323e 0a3c 703e FastCGI

    .

    \n+001993d0: 546f 2065 6e61 626c 6520 4661 7374 4347 To enable FastCG\n+001993e0: 4920 7375 7070 6f72 742c 2069 6e73 7461 I support, insta\n+001993f0: 6c6c 2046 6173 7443 4749 2061 6e64 2063 ll FastCGI and c\n+00199400: 6f6d 7069 6c65 2061 6c6c 2073 6f61 7063 ompile all soapc\n+00199410: 7070 322d 6765 6e65 7261 7465 6420 736f pp2-generated so\n+00199420: 7572 6365 2063 6f64 6520 6669 6c65 7320 urce code files \n+00199430: 616e 6420 796f 7572 2061 7070 6c69 6361 and your applica\n+00199440: 7469 6f6e 2073 6f75 7263 6573 2077 6974 tion sources wit\n+00199450: 6820 7468 6520 636f 6d70 696c 652d 7469 h the compile-ti\n+00199460: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W\n+00199470: 4954 485f 4641 5354 4347 493c 2f63 6f64 ITH_FASTCGI or add:

    .<\n+00199490: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001994a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #define WITH_F\n+001994e0: 4153 5443 4749 3c2f 7370 616e 3e3c 2f64 ASTCGI.

    to\n+00199510: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+00199520: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h and reco\n+00199540: 6d70 696c 6520 7468 6520 7072 6f6a 6563 mpile the projec\n+00199550: 7420 636f 6465 2e3c 2f70 3e0a 3c64 6c20 t code.

    .
    Warn\n+00199580: 696e 673c 2f64 743e 3c64 643e 446f 206e ing
    Do n\n+00199590: 6f74 206c 696e 6b20 6167 6169 6e73 7420 ot link against \n+001995a0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n+001995b0: 6f61 702f 6c69 6267 736f 6170 2a3c 2f63 oap/libgsoap* librar\n+001995d0: 6965 7320 6173 2074 6865 7365 2061 7265 ies as these are\n+001995e0: 206e 6f74 2073 7569 7461 626c 6520 666f not suitable fo\n+001995f0: 7220 4661 7374 4347 492e 2043 6f6d 7069 r FastCGI. Compi\n+00199600: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso\n+00199610: 6170 2f73 7464 736f 6170 322e 633c 2f63 ap/stdsoap2.c (or gsoap/st\n+00199640: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp) instead.\n+00199660: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e f09f
    .

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

    \n+001996a0: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .How to min\n+001996d0: 696d 697a 6520 6170 706c 6963 6174 696f imize applicatio\n+001996e0: 6e20 6d65 6d6f 7279 2066 6f6f 7470 7269 n memory footpri\n+001996f0: 6e74 3c2f 6832 3e0a 3c70 3e54 6f20 636f nt

    .

    To co\n+00199700: 6d70 696c 6520 6753 4f41 5020 6170 706c mpile gSOAP appl\n+00199710: 6963 6174 696f 6e73 2069 6e74 656e 6465 ications intende\n+00199720: 6420 666f 7220 736d 616c 6c20 6d65 6d6f d for small memo\n+00199730: 7279 2064 6576 6963 6573 2c20 796f 7520 ry devices, you \n+00199740: 6d61 7920 7761 6e74 2074 6f20 7265 6d6f may want to remo\n+00199750: 7665 2061 6c6c 206e 6f6e 2d65 7373 656e ve all non-essen\n+00199760: 7469 616c 2066 6561 7475 7265 7320 7468 tial features th\n+00199770: 6174 2063 6f6e 7375 6d65 2070 7265 6369 at consume preci\n+00199780: 6f75 7320 636f 6465 2061 6e64 2064 6174 ous code and dat\n+00199790: 6120 7370 6163 652e 2054 6f20 646f 2074 a space. To do t\n+001997a0: 6869 732c 2063 6f6d 7069 6c65 2074 6865 his, compile the\n+001997b0: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil\n+001997c0: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp\n+001997d0: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_LEAN (i.e. #define WITH_L\n+00199810: 4541 4e3c 2f63 6f64 653e 2920 746f 2072 EAN) to r\n+00199820: 656d 6f76 6520 6d61 6e79 206e 6f6e 2d65 emove many non-e\n+00199830: 7373 656e 7469 616c 2066 6561 7475 7265 ssential feature\n+00199840: 732e 2054 6865 2066 6561 7475 7265 7320 s. The features \n+00199850: 7468 6174 2077 696c 6c20 6265 2064 6973 that will be dis\n+00199860: 6162 6c65 6420 6172 653a 3c2f 703e 0a3c abled are:

    .<\n+00199870: 756c 3e0a 3c6c 693e 4e6f 2055 4450 2073 ul>.
  • No UDP s\n+00199880: 7570 706f 7274 3c2f 6c69 3e0a 3c6c 693e upport
  • .
  • \n+00199890: 4e6f 2048 5454 5020 6b65 6570 2061 6c69 No HTTP keep ali\n+001998a0: 7665 2073 7570 706f 7274 3c2f 6c69 3e0a ve support
  • .\n+001998b0: 3c6c 693e 4e6f 2048 5454 5020 6265 6172
  • No HTTP bear\n+001998c0: 6572 2c20 6261 7369 632c 2061 6e64 2064 er, basic, and d\n+001998d0: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica\n+001998e0: 7469 6f6e 3c2f 6c69 3e0a 3c6c 693e 4e6f tion
  • .
  • No\n+001998f0: 2048 5454 5020 6368 756e 6b65 6420 6f75 HTTP chunked ou\n+00199900: 7470 7574 2077 6974 6820 3c63 6f64 653e tput with \n+00199910: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK, but chunk\n+00199930: 6564 2048 5454 5020 696e 7075 7420 6973 ed HTTP input is\n+00199940: 2061 6363 6570 7465 643c 2f6c 693e 0a3c accepted
  • .<\n+00199950: 6c69 3e4e 6f20 4854 5450 2063 6f6d 7072 li>No HTTP compr\n+00199960: 6573 7365 6420 6f75 7470 7574 2077 6974 essed output wit\n+00199970: 6820 3c63 6f64 653e 2353 4f41 505f 454e h #SOAP_EN\n+00199980: 435f 5a4c 4942 3c2f 636f 6465 3e2c 2062 C_ZLIB, b\n+00199990: 7574 2063 6f6d 7072 6573 7365 6420 696e ut compressed in\n+001999a0: 7075 7420 6973 2061 6363 6570 7465 643c put is accepted<\n+001999b0: 2f6c 693e 0a3c 6c69 3e4e 6f20 6361 6e6f /li>.
  • No cano\n+001999c0: 6e69 6361 6c20 584d 4c20 6f75 7470 7574 nical XML output\n+001999d0: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA\n+001999e0: 505f 584d 4c5f 4341 4e4f 4e49 4341 4c3c P_XML_CANONICAL<\n+001999f0: 2f63 6f64 653e 3c2f 6c69 3e0a 3c6c 693e /code>
  • .
  • \n+00199a00: 4e6f 203c 636f 6465 3e3c 6120 636c 6173 No soap::connect_t\n+00199ad0: 696d 656f 7574 3c2f 613e 3c2f 636f 6465 imeout, soap::send_time\n+00199ba0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2c20 out, \n+00199bb0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::recv_time\n+00199c70: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2061 out a\n+00199c80: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soa\n+00199d40: 703a 3a74 7261 6e73 6665 725f 7469 6d65 p::transfer_time\n+00199d50: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2074 out t\n+00199d60: 696d 656f 7574 733c 2f6c 693e 0a3c 6c69 imeouts
  • .No support for \n+00199d80: 736f 636b 6574 2066 6c61 6773 2c20 6e6f socket flags, no\n+00199d90: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00199e50: 6f61 703a 3a73 6f63 6b65 745f 666c 6167 oap::socket_flag\n+00199e60: 733c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 s, soap\n+00199f30: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags<\n+00199f40: 2f61 3e3c 2f63 6f64 653e 2c20 3c63 6f64 /a>, soap::\n+0019a010: 6269 6e64 5f66 6c61 6773 3c2f 613e 3c2f bind_flags, soap::accep\n+0019a0f0: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags.
  • No s\n+0019a110: 7570 706f 7274 2066 6f72 203c 636f 6465 upport for time_t s\n+0019a130: 6572 6961 6c69 7a61 7469 6f6e 2077 6974 erialization wit\n+0019a140: 6820 7468 6520 3c63 6f64 653e 7873 645f h the xsd_\n+0019a150: 5f64 6174 6554 696d 653c 2f63 6f64 653e _dateTime\n+0019a160: 2074 7970 652c 2075 7365 2061 2073 7472 type, use a str\n+0019a170: 696e 6720 746f 2073 746f 7265 2074 6865 ing to store the\n+0019a180: 2064 6174 6520 616e 6420 7469 6d65 2069 date and time i\n+0019a190: 6e73 7465 6164 2e3c 2f6c 693e 0a3c 2f75 nstead.
  • ..

    Use the co\n+0019a1b0: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n+0019a1c0: 3c63 6f64 653e 2357 4954 485f 4c45 414e #WITH_LEAN\n+0019a1d0: 4552 3c2f 636f 6465 3e20 746f 206d 616b ER to mak\n+0019a1e0: 6520 7468 6520 6578 6563 7574 6162 6c65 e the executable\n+0019a1f0: 2065 7665 6e20 736d 616c 6c65 7220 6279 even smaller by\n+0019a200: 2072 656d 6f76 696e 6720 4449 4d45 2061 removing DIME a\n+0019a210: 6e64 204d 494d 4520 6174 7461 6368 6d65 nd MIME attachme\n+0019a220: 6e74 2068 616e 646c 696e 672c 203c 636f nt handling, #LONG64 (64 bit) seria\n+0019a250: 6c69 7a61 7469 6f6e 2c20 3c63 6f64 653e lization, \n+0019a260: 7763 6861 725f 742a 3c2f 636f 6465 3e20 wchar_t* \n+0019a270: 7365 7269 616c 697a 6174 696f 6e2c 2061 serialization, a\n+0019a280: 6e64 2073 7570 706f 7274 2066 6f72 2058 nd support for X\n+0019a290: 4d4c 2044 4f4d 206f 7065 7261 7469 6f6e ML DOM operation\n+0019a2a0: 732e 204e 6f74 6520 7468 6174 2044 494d s. Note that DIM\n+0019a2b0: 452f 4d49 4d45 2061 7474 6163 686d 656e E/MIME attachmen\n+0019a2c0: 7473 2061 7265 206e 6f74 2065 7373 656e ts are not essen\n+0019a2d0: 7469 616c 2074 6f20 6163 6869 6576 6520 tial to achieve \n+0019a2e0: 534f 4150 2f58 4d4c 2069 6e74 6572 6f70 SOAP/XML interop\n+0019a2f0: 6572 6162 696c 6974 792e 2044 494d 4520 erability. DIME \n+0019a300: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are \n+0019a310: 6120 636f 6e76 656e 6965 6e74 2077 6179 a convenient way\n+0019a320: 2074 6f20 6578 6368 616e 6765 206e 6f6e to exchange non\n+0019a330: 2d74 6578 742d 6261 7365 6420 2869 2e65 -text-based (i.e\n+0019a340: 2e20 6269 6e61 7279 2920 636f 6e74 656e . binary) conten\n+0019a350: 742c 2062 7574 2061 7265 206e 6f74 2072 t, but are not r\n+0019a360: 6571 7569 7265 6420 666f 7220 6261 7369 equired for basi\n+0019a370: 6320 534f 4150 2f58 4d4c 2069 6e74 6572 c SOAP/XML inter\n+0019a380: 6f70 6572 6162 696c 6974 792e 2041 7474 operability. Att\n+0019a390: 6163 686d 656e 7420 7265 7175 6972 656d achment requirem\n+0019a3a0: 656e 7473 2061 7265 2070 7265 6469 6374 ents are predict\n+0019a3b0: 6162 6c65 2e20 5468 6174 2069 732c 2061 able. That is, a\n+0019a3c0: 7070 6c69 6361 7469 6f6e 7320 776f 6e27 pplications won'\n+0019a3d0: 7420 7375 6464 656e 6c79 2064 6563 6964 t suddenly decid\n+0019a3e0: 6520 746f 2075 7365 2044 494d 4520 6f72 e to use DIME or\n+0019a3f0: 204d 494d 4520 696e 7374 6561 6420 6f66 MIME instead of\n+0019a400: 2058 4d4c 2074 6f20 6578 6368 616e 6765 XML to exchange\n+0019a410: 2063 6f6e 7465 6e74 2e3c 2f70 3e0a 3c70 content.

    .It is safe to t\n+0019a430: 7279 2074 6f20 636f 6d70 696c 6520 796f ry to compile yo\n+0019a440: 7572 2061 7070 6c69 6361 7469 6f6e 2077 ur application w\n+0019a450: 6974 6820 7468 6520 636f 6d70 696c 652d ith the compile-\n+0019a460: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n+0019a470: 2357 4954 485f 4c45 414e 3c2f 636f 6465 #WITH_LEAN, provided that\n+0019a490: 2079 6f75 7220 6170 706c 6963 6174 696f your applicatio\n+0019a4a0: 6e20 646f 6573 206e 6f74 2072 656c 7920 n does not rely \n+0019a4b0: 6f6e 2049 2f4f 2074 696d 656f 7574 732e on I/O timeouts.\n+0019a4c0: 2057 6865 6e20 6e6f 206c 696e 6b61 6765 When no linkage\n+0019a4d0: 2065 7272 6f72 206f 6363 7572 7320 696e error occurs in\n+0019a4e0: 2074 6865 2063 6f6d 7069 6c61 7469 6f6e the compilation\n+0019a4f0: 2070 726f 6365 7373 2c20 6974 2069 7320 process, it is \n+0019a500: 7361 6665 2074 6f20 6173 7375 6d65 2074 safe to assume t\n+0019a510: 6861 7420 796f 7572 2061 7070 6c69 6361 hat your applica\n+0019a520: 7469 6f6e 2077 696c 6c20 7275 6e20 6a75 tion will run ju\n+0019a530: 7374 2066 696e 652e 3c2f 703e 0a3c 703e st fine.

    .

    \n+0019a540: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+0019a560: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .How to r\n+0019a5a0: 656d 6f76 6520 7468 6520 4253 4420 736f emove the BSD so\n+0019a5b0: 636b 6574 206c 6962 7261 7279 2072 6571 cket library req\n+0019a5c0: 7569 7265 6d65 6e74 3c2f 6832 3e0a 3c70 uirement

    .The g\n+0019a5e0: 736f 6170 2f73 7464 736f 6170 322e 633c soap/stdsoap2.c<\n+0019a5f0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+0019a600: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+0019a610: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp librari\n+0019a630: 6573 2073 686f 756c 6420 6265 206c 696e es should be lin\n+0019a640: 6b65 6420 7769 7468 2061 2042 5344 2073 ked with a BSD s\n+0019a650: 6f63 6b65 7420 6c69 6272 6172 7920 696e ocket library in\n+0019a660: 2074 6865 2070 726f 6a65 6374 2062 7569 the project bui\n+0019a670: 6c64 2e20 546f 2072 656d 6f76 6520 7468 ld. To remove th\n+0019a680: 6520 6e65 6564 2074 6f20 6c69 6e6b 2061 e need to link a\n+0019a690: 2073 6f63 6b65 7420 6c69 6272 6172 792c socket library,\n+0019a6a0: 2079 6f75 2063 616e 2063 6f6d 7069 6c65 you can compile\n+0019a6b0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+0019a6c0: 2f73 7464 736f 6170 322e 633c 2f63 6f64 /stdsoap2.c (for C) \n+0019a6e0: 616e 6420 3c65 6d3e 3c63 6f64 653e 6773 and gs\n+0019a6f0: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp\n+0019a700: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 666f (fo\n+0019a710: 7220 432b 2b29 2077 6974 6820 7468 6520 r C++) with the \n+0019a720: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time\n+0019a730: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT\n+0019a740: 485f 4e4f 494f 3c2f 636f 6465 3e20 6d61 H_NOIO ma\n+0019a750: 6372 6f20 7365 7420 2869 2e65 2e20 3c63 cro set (i.e. #define WITH\n+0019a770: 5f4e 4f49 4f3c 2f63 6f64 653e 292e 2054 _NOIO). T\n+0019a780: 6869 7320 7265 6d6f 7665 7320 7468 6520 his removes the \n+0019a790: 6465 7065 6e64 656e 6379 206f 6e20 7468 dependency on th\n+0019a7a0: 6520 4253 4420 736f 636b 6574 2041 5049 e BSD socket API\n+0019a7b0: 2c20 494f 2073 7472 6561 6d73 2c20 3c63 , IO streams, FILE \n+0019a7d0: 7479 7065 2c20 616e 6420 3c63 6f64 653e type, and \n+0019a7e0: 6572 726e 6f3c 2f63 6f64 653e 2e3c 2f70 errno..

    You should \n+0019a800: 6465 6669 6e65 2063 616c 6c62 6163 6b73 define callbacks\n+0019a810: 2074 6f20 7265 706c 6163 6520 7468 6520 to replace the \n+0019a820: 6d69 7373 696e 6720 736f 636b 6574 2073 missing socket s\n+0019a830: 7461 636b 2e20 546f 2064 6f20 736f 2c20 tack. To do so, \n+0019a840: 6164 6420 746f 2079 6f75 7220 636f 6465 add to your code\n+0019a850: 2074 6865 2066 6f6c 6c6f 7769 6e67 2064 the following d\n+0019a860: 6566 696e 6974 696f 6e73 3a3c 2f70 3e0a efinitions:

    .\n+0019a870: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+0019a8b0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
    soap_\n+0019a990: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); \n+0019a9d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+0019aa00: 2a20 6673 656e 6420 6973 2075 7365 6420 * fsend is used \n+0019aa10: 746f 2074 7261 6e73 6d69 7420 6461 7461 to transmit data\n+0019aa20: 2069 6e20 626c 6f63 6b73 202a 2f3c 2f73 in blocks */
    .soap.fsend =\n+0019aae0: 206d 795f 7365 6e64 3b20 3c2f 6469 763e my_send;
    \n+0019aaf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* frec\n+0019ab20: 7620 6973 2075 7365 6420 746f 2072 6563 v is used to rec\n+0019ab30: 6569 7665 2064 6174 6120 696e 2062 6c6f eive data in blo\n+0019ab40: 636b 7320 2a2f 3c2f 7370 616e 3e20 3c2f cks */ ..
    /* fopen is us\n+0019ac40: 6564 2074 6f20 636f 6e6e 6563 7420 2a2f ed to connect */\n+0019ac50: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+0019ac60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019ac70: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+0019aca0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fopen = my_tcp_conne\n+0019ad10: 6374 3b20 3c2f 6469 763e 0a3c 6469 7620 ct;
    .
    /* fclose is \n+0019ad50: 7573 6564 2074 6f20 6469 7363 6f6e 6e65 used to disconne\n+0019ad60: 6374 202a 2f3c 2f73 7061 6e3e 203c 2f64 ct */ .
    soa\n+0019adb0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.fcl\n+0019ae10: 6f73 653c 2f61 3e20 3d20 6d79 5f74 6370 ose = my_tcp\n+0019ae20: 5f64 6973 636f 6e6e 6563 743b 203c 2f64 _disconnect; .
    /* f\n+0019ae60: 636c 6f73 6573 6f63 6b65 7420 6973 2075 closesocket is u\n+0019ae70: 7365 6420 6f6e 6c79 2074 6f20 636c 6f73 sed only to clos\n+0019ae80: 6520 7468 6520 6d61 7374 6572 2073 6f63 e the master soc\n+0019ae90: 6b65 7420 696e 2061 2073 6572 7665 7220 ket in a server \n+0019aea0: 7570 6f6e 2073 6f61 705f 646f 6e65 2829 upon soap_done()\n+0019aeb0: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    soap<\n+0019af00: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.fclos\n+0019af60: 6573 6f63 6b65 743c 2f61 3e20 3d20 6d79 esocket = my\n+0019af70: 5f74 6370 5f63 6c6f 7365 736f 636b 6574 _tcp_closesocket\n+0019af80: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    /* fshutdownsoc\n+0019afc0: 6b65 7420 6973 2075 7365 6420 6166 7465 ket is used afte\n+0019afd0: 7220 636f 6d70 6c65 7469 6e67 2061 2073 r completing a s\n+0019afe0: 656e 6420 6f70 6572 6174 696f 6e20 746f end operation to\n+0019aff0: 2073 656e 6420 5443 5020 4649 4e20 2a2f send TCP FIN */\n+0019b000: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+0019b010: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019b020: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+0019b050: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fshutdow\n+0019b0b0: 6e73 6f63 6b65 743c 2f61 3e20 3d20 6d79 nsocket = my\n+0019b0c0: 5f74 6370 5f73 6875 7464 6f77 6e73 6f63 _tcp_shutdownsoc\n+0019b0d0: 6b65 743b 203c 2f64 6976 3e0a 3c64 6976 ket;
    ./* setting f\n+0019b110: 706f 6c6c 2069 7320 6f70 7469 6f6e 616c poll is optional\n+0019b120: 2c20 6c65 6176 6520 6974 204e 554c 4c20 , leave it NULL \n+0019b130: 746f 206f 6d69 7420 706f 6c6c 696e 6720 to omit polling \n+0019b140: 7468 6520 7365 7276 6572 202a 2f3c 2f73 the server */
    .soap.fpoll =\n+0019b200: 206d 795f 706f 6c6c 3b20 3c2f 6469 763e my_poll;
    \n+0019b210: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* facc\n+0019b240: 6570 7420 6973 2075 7365 6420 6f6e 6c79 ept is used only\n+0019b250: 2062 7920 6120 7365 7276 6572 2061 7070 by a server app\n+0019b260: 6c69 6361 7469 6f6e 202a 2f3c 2f73 7061 lication */
    .
    soap.faccept =\n+0019b320: 206d 795f 6163 6365 7074 3b3c 2f64 6976 my_accept;.
    \n+0019b410: 696e 7428 2a20 6670 6f6c 6c29 2873 7472 int(* fpoll)(str\n+0019b420: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+0019b430: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n+0019b450: 2074 6861 7420 626c 6f63 6b73 2075 6e74 that blocks unt\n+0019b460: 696c 2061 6374 6976 6974 7920 6973 2064 il activity is d\n+0019b470: 6574 6563 7465 6420 6f6e 2074 6865 2073 etected on the s\n+0019b480: 6f61 703a 3a73 6f63 6b65 7420 6f72 2073 oap::socket or s\n+0019b490: 6f61 703a 3a6d 6173 7465 7220 736f 636b oap::master sock\n+0019b4a0: 6574 2c2e 2e2e 3c2f 6469 763e 3c64 6976 et,...
    <\n+0019b4c0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:459\n+0019b4e0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .<\n+0019b5c0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0019b5d0: 6922 3e69 6e74 282a 2066 636c 6f73 6573 i\">int(* fcloses\n+0019b5e0: 6f63 6b65 7429 2873 7472 7563 7420 736f ocket)(struct so\n+0019b5f0: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S\n+0019b600: 4f43 4b45 5420 736f 636b 293c 2f64 6976 OCKET sock)
    Callback tha\n+0019b630: 7420 636c 6f73 6573 2061 2067 6976 656e t closes a given\n+0019b640: 2073 6f63 6b65 742e 3c2f 6469 763e 3c64 socket.
    Definition:<\n+0019b670: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n+0019b680: 3537 303c 2f64 6976 3e3c 2f64 6976 3e0a 570
    .\n+0019b690: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::fshut\n+0019b750: 646f 776e 736f 636b 6574 3c2f 613e 3c2f downsocket
    int(* fs\n+0019b780: 6875 7464 6f77 6e73 6f63 6b65 7429 2873 hutdownsocket)(s\n+0019b790: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0019b7a0: 2c20 534f 4150 5f53 4f43 4b45 5420 736f , SOAP_SOCKET so\n+0019b7b0: 636b 2c20 696e 7420 686f 7729 3c2f 6469 ck, int how)
    Callback th\n+0019b7e0: 6174 2073 6875 7473 2064 6f77 6e20 6120 at shuts down a \n+0019b7f0: 6769 7665 6e20 736f 636b 6574 2e3c 2f64 given socket.
    Definit\n+0019b820: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+0019b830: 322e 683a 3435 3833 3c2f 6469 763e 3c2f 2.h:4583
    .
    \n+0019b8b0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n+0019b900: 6661 6363 6570 743c 2f61 3e3c 2f64 6976 faccept
    SOAP_SOCKET\n+0019b930: 282a 2066 6163 6365 7074 2928 7374 7275 (* faccept)(stru\n+0019b940: 6374 2073 6f61 7020 2a73 6f61 702c 2053 ct soap *soap, S\n+0019b950: 4f41 505f 534f 434b 4554 2073 6f63 6b2c OAP_SOCKET sock,\n+0019b960: 2073 7472 7563 7420 736f 636b 6164 6472 struct sockaddr\n+0019b970: 202a 6164 6472 2c20 696e 7420 2a6c 656e *addr, int *len\n+0019b980: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n+0019b9a0: 636b 2074 6861 7420 7761 6974 7320 666f ck that waits fo\n+0019b9b0: 7220 616e 6420 6163 6365 7074 7320 6120 r and accepts a \n+0019b9c0: 736f 636b 6574 2063 6f6e 6e65 6374 696f socket connectio\n+0019b9d0: 6e20 7265 7175 6573 7465 6420 6279 2061 n requested by a\n+0019b9e0: 2063 6c69 656e 742e 3c2f 6469 763e 3c64 client.
    Definition:<\n+0019ba10: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n+0019ba20: 3530 393c 2f64 6976 3e3c 2f64 6976 3e0a 509
    .\n+0019ba30: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    These \n+0019ba50: 6675 6e63 7469 6f6e 7320 7368 6f75 6c64 functions should\n+0019ba60: 2070 726f 7669 6465 2061 206d 696e 696d provide a minim\n+0019ba70: 616c 2069 6e70 7574 2f6f 7574 7075 7420 al input/output \n+0019ba80: 7374 6163 6b20 283c 636f 6465 3e3c 6120 stack (soap::frec\n+0019bb30: 763c 2f61 3e3c 2f63 6f64 653e 2061 6e64 v and\n+0019bb40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fsend\n+0019bbe0: 3c2f 636f 6465 3e29 2074 6f20 7265 6164 ) to read\n+0019bbf0: 2f77 7269 7465 2058 4d4c 2061 6e64 2073 /write XML and s\n+0019bc00: 6f63 6b65 742d 6c69 6b65 2073 7461 636b ocket-like stack\n+0019bc10: 2028 7468 6520 6f74 6865 7220 6675 6e63 (the other func\n+0019bc20: 7469 6f6e 7329 2077 6865 6e20 6465 7665 tions) when deve\n+0019bc30: 6c6f 7069 6e67 2063 6c69 656e 7420 616e loping client an\n+0019bc40: 6420 7365 7276 6572 2061 7070 6c69 6361 d server applica\n+0019bc50: 7469 6f6e 732e 3c2f 703e 0a3c 703e 5365 tions.

    .

    Se\n+0019bc60: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section Function call\n+0019bca0: 6261 636b 7320 666f 7220 6375 7374 6f6d backs for custom\n+0019bcb0: 697a 6564 2049 2f4f 2061 6e64 2048 5454 ized I/O and HTT\n+0019bcc0: 5020 6861 6e64 6c69 6e67 3c2f 613e 2066 P handling f\n+0019bcd0: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details \n+0019bce0: 6f6e 2074 6865 2075 7365 206f 6620 7468 on the use of th\n+0019bcf0: 6573 6520 6361 6c6c 6261 636b 732e 2041 ese callbacks. A\n+0019bd00: 6c6c 2063 616c 6c62 6163 6b20 6675 6e63 ll callback func\n+0019bd10: 7469 6f6e 2070 6f69 6e74 6572 7320 7368 tion pointers sh\n+0019bd20: 6f75 6c64 2062 6520 6e6f 6e2d 4e55 4c4c ould be non-NULL\n+0019bd30: 2c20 6578 6365 7074 203c 636f 6465 3e3c , except <\n+0019bd40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019bd50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0019bd60: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0019bd70: 6761 3230 3231 3061 6131 3731 3031 3962 ga20210aa171019b\n+0019bd80: 3237 6566 3138 3264 3835 3365 3264 3665 27ef182d853e2d6e\n+0019bd90: 3266 2220 7469 746c 653d 2243 616c 6c62 2f\" title=\"Callb\n+0019bda0: 6163 6b20 7468 6174 2062 6c6f 636b 7320 ack that blocks \n+0019bdb0: 756e 7469 6c20 6163 7469 7669 7479 2069 until activity i\n+0019bdc0: 7320 6465 7465 6374 6564 206f 6e20 7468 s detected on th\n+0019bdd0: 6520 736f 6170 3a3a 736f 636b 6574 206f e soap::socket o\n+0019bde0: 7220 736f 6170 3a3a 6d61 7374 6572 2073 r soap::master s\n+0019bdf0: 6f63 6b65 742c 2e2e 2e22 3e73 6f61 703a ocket,...\">soap:\n+0019be00: 3a66 706f 6c6c 3c2f 613e 3c2f 636f 6465 :fpoll.

    .

    You ca\n+0019be20: 6e6e 6f74 2075 7365 203c 636f 6465 3e3c nnot use <\n+0019be30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019be40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0019be50: 5f66 6175 6c74 2e68 746d 6c23 6761 3933 _fault.html#ga93\n+0019be60: 3161 3461 6236 6466 3235 3533 6234 3861 1a4ab6df2553b48a\n+0019be70: 3063 3237 3066 3861 3061 3838 6166 2220 0c270f8a0a88af\" \n+0019be80: 7469 746c 653d 2250 7269 6e74 2065 7272 title=\"Print err\n+0019be90: 6f72 206d 6573 7361 6765 206f 6e20 7468 or message on th\n+0019bea0: 6520 7370 6563 6966 6965 6420 6f75 7470 e specified outp\n+0019beb0: 7574 2e22 3e73 6f61 705f 7072 696e 745f ut.\">soap_print_\n+0019bec0: 6661 756c 743c 2f61 3e3c 2f63 6f64 653e fault\n+0019bed0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap_pr\n+0019bf80: 696e 745f 6661 756c 745f 6c6f 6361 7469 int_fault_locati\n+0019bf90: 6f6e 3c2f 613e 3c2f 636f 6465 3e20 746f on to\n+0019bfa0: 2070 7269 6e74 2065 7272 6f72 2064 6961 print error dia\n+0019bfb0: 676e 6f73 7469 6373 2e20 496e 7374 6561 gnostics. Instea\n+0019bfc0: 642c 2074 6865 2076 616c 7565 206f 6620 d, the value of \n+0019bfd0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n+0019c080: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error, which contai\n+0019c0a0: 6e73 2074 6865 2067 534f 4150 2065 7272 ns the gSOAP err\n+0019c0b0: 6f72 2063 6f64 652c 2063 616e 2062 6520 or code, can be \n+0019c0c0: 7573 6564 2074 6f20 6465 7465 726d 696e used to determin\n+0019c0d0: 6520 7468 6520 6361 7573 6520 6f66 2061 e the cause of a\n+0019c0e0: 2066 6175 6c74 2e3c 2f70 3e0a 3c70 3ef0 fault.

    .

    .\n+0019c0f0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n+0019c100: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n+0019c110: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .How to\n+0019c150: 2063 6f6d 6269 6e65 206d 756c 7469 706c combine multipl\n+0019c160: 6520 636c 6965 6e74 2061 6e64 2073 6572 e client and ser\n+0019c170: 7665 7220 696d 706c 656d 656e 7461 7469 ver implementati\n+0019c180: 6f6e 7320 696e 746f 206f 6e65 2065 7865 ons into one exe\n+0019c190: 6375 7461 626c 653c 2f68 323e 0a3c 703e cutable

    .

    \n+0019c1a0: 5468 6520 7773 646c 3268 2074 6f6f 6c20 The wsdl2h tool \n+0019c1b0: 6361 6e20 6265 2075 7365 6420 746f 2069 can be used to i\n+0019c1c0: 6d70 6f72 7420 6d75 6c74 6970 6c65 2057 mport multiple W\n+0019c1d0: 5344 4c73 2061 6e64 2073 6368 656d 6173 SDLs and schemas\n+0019c1e0: 2061 7420 6f6e 6365 2e20 5468 6520 7365 at once. The se\n+0019c1f0: 7276 6963 6520 6465 6669 6e69 7469 6f6e rvice definition\n+0019c200: 7320 6172 6520 636f 6d62 696e 6564 2069 s are combined i\n+0019c210: 6e20 6f6e 6520 6865 6164 6572 2066 696c n one header fil\n+0019c220: 6520 746f 2062 6520 7061 7273 6564 2062 e to be parsed b\n+0019c230: 7920 736f 6170 6370 7032 2e20 4974 2069 y soapcpp2. It i\n+0019c240: 7320 696d 706f 7274 616e 7420 746f 2061 s important to a\n+0019c250: 7373 6967 6e20 6e61 6d65 7370 6163 6520 ssign namespace \n+0019c260: 7072 6566 6978 6573 2074 6f20 6e61 6d65 prefixes to name\n+0019c270: 7370 6163 6520 5552 4973 2075 7369 6e67 space URIs using\n+0019c280: 2074 6865 203c 656d 3e3c 636f 6465 3e74 the t\n+0019c290: 7970 656d 6170 2e64 6174 3c2f 636f 6465 ypemap.dat file. Oth\n+0019c2b0: 6572 7769 7365 2c20 7773 646c 3268 2077 erwise, wsdl2h w\n+0019c2c0: 696c 6c20 6173 7369 676e 206e 616d 6573 ill assign names\n+0019c2d0: 7061 6365 2070 7265 6669 7865 7320 3c63 pace prefixes ns1, \n+0019c2f0: 3c63 6f64 653e 6e73 323c 2f63 6f64 653e ns2\n+0019c300: 2c20 616e 6420 736f 206f 6e20 746f 2074 , and so on to t\n+0019c310: 6865 2073 6572 7669 6365 206f 7065 7261 he service opera\n+0019c320: 7469 6f6e 7320 616e 6420 7363 6865 6d61 tions and schema\n+0019c330: 2074 7970 6573 2e20 5468 7573 2c20 616e types. Thus, an\n+0019c340: 7920 6368 616e 6765 2074 6f20 6120 5753 y change to a WS\n+0019c350: 444c 206f 7220 7363 6865 6d61 206d 6179 DL or schema may\n+0019c360: 2072 6573 756c 7420 696e 2061 206e 6577 result in a new\n+0019c370: 2070 7265 6669 7820 6173 7369 676e 6d65 prefix assignme\n+0019c380: 6e74 2e20 466f 7220 6d6f 7265 2064 6574 nt. For more det\n+0019c390: 6169 6c73 2c20 706c 6561 7365 2073 6565 ails, please see\n+0019c3a0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Customizing XML\n+0019c3e0: 2064 6174 6120 6269 6e64 696e 6773 2077 data bindings w\n+0019c3f0: 6974 6820 7468 6520 7479 7065 6d61 702e ith the typemap.\n+0019c400: 6461 7420 6669 6c65 3c2f 613e 202e 3c2f dat file ..

    Another ap\n+0019c420: 7072 6f61 6368 2074 6f20 636f 6d62 696e proach to combin\n+0019c430: 6520 6d75 6c74 6970 6c65 2063 6c69 656e e multiple clien\n+0019c440: 7420 616e 6420 7365 7276 6963 6520 6170 t and service ap\n+0019c450: 706c 6963 6174 696f 6e73 2069 6e74 6f20 plications into \n+0019c460: 6f6e 6520 6578 6563 7574 6162 6c65 2069 one executable i\n+0019c470: 7320 6279 2075 7369 6e67 2043 2b2b 206e s by using C++ n\n+0019c480: 616d 6573 7061 6365 7320 746f 2073 7472 amespaces to str\n+0019c490: 7563 7475 7261 6c6c 7920 7365 7061 7261 ucturally separa\n+0019c4a0: 7465 2074 6865 2064 6566 696e 6974 696f te the definitio\n+0019c4b0: 6e73 2e20 5468 6973 2069 7320 6175 746f ns. This is auto\n+0019c4c0: 6d61 7465 6420 7769 7468 203c 6120 6872 mated with <\n+0019c4e0: 623e 3c63 6f64 653e 7773 646c 3268 202d b>wsdl2h -\n+0019c4f0: 7120 6e61 6d65 3c2f 636f 6465 3e3c 2f62 q name option -q name\n+0019c520: 3c2f 623e 3c2f 613e 2e20 4f72 2062 7920 . Or by \n+0019c530: 6372 6561 7469 6e67 206c 6962 7261 7269 creating librari\n+0019c540: 6573 2069 6e20 4320 666f 7220 7468 6520 es in C for the \n+0019c550: 636c 6965 6e74 2f73 6572 7665 7220 6f62 client/server ob\n+0019c560: 6a65 6374 7320 6173 2065 7870 6c61 696e jects as explain\n+0019c570: 6564 2069 6e20 7375 6273 6571 7565 6e74 ed in subsequent\n+0019c580: 2073 6563 7469 6f6e 733c 2f70 3e0a 3c70 sections

    .Both approaches\n+0019c5a0: 2061 7265 2064 656d 6f6e 7374 7261 7465 are demonstrate\n+0019c5b0: 6420 6279 2065 7861 6d70 6c65 7320 696e d by examples in\n+0019c5c0: 2074 6865 2067 534f 4150 2073 6f75 7263 the gSOAP sourc\n+0019c5d0: 6520 636f 6465 2070 6163 6b61 6765 2c20 e code package, \n+0019c5e0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n+0019c5f0: 6f61 702f 7361 6d70 6c65 732f 6c69 6e6b oap/samples/link\n+0019c600: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 4320 (C \n+0019c610: 6f6e 6c79 2920 616e 6420 3c65 6d3e 3c63 only) and gsoap/sample\n+0019c630: 732f 6c69 6e6b 2b2b 3c2f 636f 6465 3e3c s/link++
    <\n+0019c640: 2f65 6d3e 2028 432b 2b20 7769 7468 2043 /em> (C++ with C\n+0019c650: 2b2b 206e 616d 6573 7061 6365 7329 2065 ++ namespaces) e\n+0019c660: 7861 6d70 6c65 732e 3c2f 703e 0a3c 703e xamples.

    .

    \n+0019c670: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+0019c690: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    \n+0019c6d0: 0a48 6f77 2074 6f20 6275 696c 6420 6120 .How to build a \n+0019c6e0: 636c 6965 6e74 206f 7220 7365 7276 6572 client or server\n+0019c6f0: 2069 6e20 6120 432b 2b20 636f 6465 206e in a C++ code n\n+0019c700: 616d 6573 7061 6365 3c2f 6832 3e0a 3c70 amespace

    .You can use a C\n+0019c720: 2b2b 2063 6f64 6520 6e61 6d65 7370 6163 ++ code namespac\n+0019c730: 6520 6f66 2079 6f75 7220 6368 6f69 6365 e of your choice\n+0019c740: 2069 6e20 796f 7572 2069 6e74 6572 6661 in your interfa\n+0019c750: 6365 2068 6561 6465 7220 6669 6c65 2074 ce header file t\n+0019c760: 6f20 6275 696c 6420 6120 636c 6965 6e74 o build a client\n+0019c770: 206f 7220 7365 7276 6572 2069 6e20 7468 or server in th\n+0019c780: 6174 2043 2b2b 206e 616d 6573 7061 6365 at C++ namespace\n+0019c790: 2e20 496e 2074 6869 7320 7761 792c 2079 . In this way, y\n+0019c7a0: 6f75 2063 616e 2063 7265 6174 6520 6d75 ou can create mu\n+0019c7b0: 6c74 6970 6c65 2063 6c69 656e 7473 2061 ltiple clients a\n+0019c7c0: 6e64 2073 6572 7665 7273 2074 6861 7420 nd servers that \n+0019c7d0: 6361 6e20 6265 2063 6f6d 6269 6e65 6420 can be combined \n+0019c7e0: 616e 6420 6c69 6e6b 6564 2074 6f67 6574 and linked toget\n+0019c7f0: 6865 7220 7769 7468 6f75 7420 636f 6e66 her without conf\n+0019c800: 6c69 6374 732c 2077 6869 6368 2069 7320 licts, which is \n+0019c810: 6578 706c 6169 6e65 6420 696e 206d 6f72 explained in mor\n+0019c820: 6520 6465 7461 696c 2069 6e20 7468 6520 e detail in the \n+0019c830: 6e65 7874 2073 6563 7469 6f6e 2028 7768 next section (wh\n+0019c840: 6963 6820 616c 736f 2073 686f 7773 2061 ich also shows a\n+0019c850: 6e20 6578 616d 706c 6520 636f 6d62 696e n example combin\n+0019c860: 696e 6720 7477 6f20 636c 6965 6e74 206c ing two client l\n+0019c870: 6962 7261 7269 6573 2064 6566 696e 6564 ibraries defined\n+0019c880: 2069 6e20 7477 6f20 432b 2b20 636f 6465 in two C++ code\n+0019c890: 206e 616d 6573 7061 6365 7329 2e3c 2f70 namespaces)..

    Use \n+0019c8c0: 3c63 6f64 653e 7773 646c 3268 202d 7120 wsdl2h -q \n+0019c8d0: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name \n+0019c8e0: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+0019c8f0: 2d71 206e 616d 653c 2f63 6f64 653e 3c2f -q name to genera\n+0019c910: 7465 2064 6566 696e 6974 696f 6e73 2069 te definitions i\n+0019c920: 6e20 7468 6520 432b 2b20 3c63 6f64 653e n the C++ \n+0019c930: 6e61 6d65 3c2f 636f 6465 3e20 6e61 6d65 name name\n+0019c940: 7370 6163 652e 2054 6869 7320 6f70 7469 space. This opti\n+0019c950: 6f6e 2063 616e 2061 6c73 6f20 6265 2075 on can also be u\n+0019c960: 7365 6420 696e 2063 6f6d 6269 6e61 7469 sed in combinati\n+0019c970: 6f6e 2077 6974 6820 432b 2b20 7072 6f78 on with C++ prox\n+0019c980: 7920 616e 6420 7365 7276 6572 206f 626a y and server obj\n+0019c990: 6563 7420 6765 6e65 7261 7469 6f6e 2c20 ect generation, \n+0019c9a0: 7573 696e 6720 3c62 3e3c 636f 6465 3e73 using s\n+0019c9b0: 6f61 7063 7070 3220 2d6a 3c2f 636f 6465 oapcpp2 -j option \n+0019c9d0: 3c63 6f64 653e 2d6a 3c2f 636f 6465 3e3c -j<\n+0019c9e0: 2f62 3e20 6f72 206f 7074 696f 6e20 3c62 /b> or option -i\n+0019ca00: 3c2f 623e 292e 3c2f 703e 0a3c 703e 4174 ).

    .

    At\n+0019ca10: 206d 6f73 7420 6f6e 6520 6e61 6d65 7370 most one namesp\n+0019ca20: 6163 6520 6361 6e20 6265 2064 6566 696e ace can be defin\n+0019ca30: 6564 2066 6f72 2074 6865 2065 6e74 6972 ed for the entir\n+0019ca40: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head\n+0019ca50: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap\n+0019ca60: 6370 7032 2e20 5468 6520 432b 2b20 6e61 cpp2. The C++ na\n+0019ca70: 6d65 7370 6163 6520 6d75 7374 2063 6f6d mespace must com\n+0019ca80: 706c 6574 656c 7920 656e 6361 7073 756c pletely encapsul\n+0019ca90: 6174 6520 7468 6520 656e 7469 7265 2063 ate the entire c\n+0019caa0: 6f6e 7465 6e74 7320 6f66 2074 6865 2068 ontents of the h\n+0019cab0: 6561 6465 7220 6669 6c65 3a3c 2f70 3e0a eader file:

    .\n+0019cac0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    na\n+0019cb00: 6d65 7370 6163 6520 3c2f 7370 616e 3e4e mespace N\n+0019cb10: 616d 6573 7061 6365 4e61 6d65 207b 3c2f amespaceName {.
    ... interface header file \n+0019cb70: 636f 6e74 656e 7473 202e 2e2e 203c 2f64 contents ... .
    }
    .

    When com\n+0019cbc0: 7069 6c69 6e67 2074 6869 7320 696e 7465 piling this inte\n+0019cbd0: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+0019cbe0: 6520 7769 7468 2074 6865 2073 6f61 7063 e with the soapc\n+0019cbf0: 7070 3220 746f 6f6c 2c20 616c 6c20 7479 pp2 tool, all ty\n+0019cc00: 7065 2064 6566 696e 6974 696f 6e73 2c20 pe definitions, \n+0019cc10: 7468 6520 7365 7269 616c 697a 6572 7320 the serializers \n+0019cc20: 666f 7220 7468 6573 6520 7479 7065 732c for these types,\n+0019cc30: 2061 6e64 2074 6865 2073 7475 6220 616e and the stub an\n+0019cc40: 6420 736b 656c 6574 6f6e 2066 756e 6374 d skeleton funct\n+0019cc50: 696f 6e73 2077 696c 6c20 6265 2070 6c61 ions will be pla\n+0019cc60: 6365 6420 696e 2074 6869 7320 6e61 6d65 ced in this name\n+0019cc70: 7370 6163 652e 2054 6865 2058 4d4c 206e space. The XML n\n+0019cc80: 616d 6573 7061 6365 206d 6170 7069 6e67 amespace mapping\n+0019cc90: 2074 6162 6c65 2028 7361 7665 6420 696e table (saved in\n+0019cca0: 2061 203c 656d 3e3c 636f 6465 3e2e 6e73 a .ns\n+0019ccb0: 6d61 703c 2f63 6f64 653e 3c2f 656d 3e20 map \n+0019ccc0: 6669 6c65 2920 7769 6c6c 206e 6f74 2062 file) will not b\n+0019ccd0: 6520 706c 6163 6564 2069 6e20 7468 6520 e placed in the \n+0019cce0: 636f 6465 206e 616d 6573 7061 6365 2074 code namespace t\n+0019ccf0: 6f20 616c 6c6f 7720 6974 2074 6f20 6265 o allow it to be\n+0019cd00: 206c 696e 6b65 6420 6173 2061 2067 6c6f linked as a glo\n+0019cd10: 6261 6c20 6f62 6a65 6374 2e20 596f 7520 bal object. You \n+0019cd20: 6361 6e20 7573 6520 3c62 3e3c 636f 6465 can use soapcpp2 -n option <\n+0019cd50: 623e 3c63 6f64 653e 2d6e 3c2f 636f 6465 b>-n to create \n+0019cd70: 6c6f 6361 6c20 584d 4c20 6e61 6d65 7370 local XML namesp\n+0019cd80: 6163 6520 7461 626c 6573 2c20 7365 6520 ace tables, see \n+0019cd90: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section soapcpp2\n+0019cdd0: 206f 7074 696f 6e73 3c2f 613e 2028 6275 options (bu\n+0019cde0: 7420 7265 6d65 6d62 6572 2074 6861 7420 t remember that \n+0019cdf0: 796f 7520 6578 706c 6963 6974 6c79 206e you explicitly n\n+0019ce00: 6565 6420 746f 2069 6e69 7469 616c 697a eed to initializ\n+0019ce10: 6520 7468 6520 6e61 6d65 7370 6163 6573 e the namespaces\n+0019ce20: 2074 6f20 706f 696e 7420 746f 2061 2074 to point to a t\n+0019ce30: 6162 6c65 2061 7420 7275 6e20 7469 6d65 able at run time\n+0019ce40: 2075 7369 6e67 203c 636f 6465 3e3c 6120 using soa\n+0019cf10: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces\n+0019cf20: 3c2f 613e 3c2f 636f 6465 3e29 2e20 5468 ). Th\n+0019cf30: 6520 6765 6e65 7261 7465 6420 6669 6c65 e generated file\n+0019cf40: 7320 6172 6520 7072 6566 6978 6564 2077 s are prefixed w\n+0019cf50: 6974 6820 7468 6520 636f 6465 206e 616d ith the code nam\n+0019cf60: 6573 7061 6365 206e 616d 6520 696e 7374 espace name inst\n+0019cf70: 6561 6420 6f66 2074 6865 2075 7375 616c ead of the usual\n+0019cf80: 203c 656d 3e3c 636f 6465 3e73 6f61 703c soap<\n+0019cf90: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+0019cfa0: 206e 616d 6520 7072 6566 6978 2074 6f20 name prefix to \n+0019cfb0: 656e 6162 6c65 206d 756c 7469 706c 6520 enable multiple \n+0019cfc0: 636c 6965 6e74 2f73 6572 7665 7220 636f client/server co\n+0019cfd0: 6465 7320 746f 2062 6520 6275 696c 6420 des to be build \n+0019cfe0: 696e 2074 6865 2073 616d 6520 7072 6f6a in the same proj\n+0019cff0: 6563 7420 6469 7265 6374 6f72 792e 3c2f ect directory..

    Because th\n+0019d010: 6520 534f 4150 2048 6561 6465 7220 616e e SOAP Header an\n+0019d020: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ\n+0019d030: 6572 7320 7769 6c6c 2061 6c73 6f20 6265 ers will also be\n+0019d040: 2070 6c61 6365 6420 696e 2074 6865 206e placed in the n\n+0019d050: 616d 6573 7061 6365 2c20 7468 6579 2063 amespace, they c\n+0019d060: 616e 6e6f 7420 6265 2063 616c 6c65 6420 annot be called \n+0019d070: 6672 6f6d 2074 6865 203c 656d 3e3c 636f from the gsoap/stdsoap\n+0019d090: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp run time libra\n+0019d0b0: 7279 2063 6f64 6520 616e 6420 6172 6520 ry code and are \n+0019d0c0: 7468 6572 6566 6f72 6520 7265 6e64 6572 therefore render\n+0019d0d0: 6564 2075 6e75 7361 626c 652e 2054 6865 ed unusable. The\n+0019d0e0: 7265 666f 7265 2c20 7468 6573 6520 7365 refore, these se\n+0019d0f0: 7269 616c 697a 6572 7320 6172 6520 6e6f rializers are no\n+0019d100: 7420 636f 6d70 696c 6564 2061 7420 616c t compiled at al\n+0019d110: 6c20 2865 6e66 6f72 6365 6420 7769 7468 l (enforced with\n+0019d120: 203c 636f 6465 3e23 6465 6669 6e65 2057 #define W\n+0019d130: 4954 485f 4e4f 474c 4f42 414c 3c2f 636f ITH_NOGLOBAL). To add SOA\n+0019d150: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n+0019d160: 6c74 2073 6572 6961 6c69 7a65 7273 2c20 lt serializers, \n+0019d170: 796f 7520 6d75 7374 2063 6f6d 7069 6c65 you must compile\n+0019d180: 2074 6865 6d20 7365 7061 7261 7465 6c79 them separately\n+0019d190: 2061 7320 666f 6c6c 6f77 732e 2046 6972 as follows. Fir\n+0019d1a0: 7374 2c20 6372 6561 7465 2061 206e 6577 st, create a new\n+0019d1b0: 2068 6561 6465 7220 6669 6c65 203c 656d header file env.h with th\n+0019d1e0: 6520 534f 4150 2048 6561 6465 7220 3c63 e SOAP Header S\n+0019d250: 4f41 505f 454e 565f 5f48 6561 6465 723c OAP_ENV__Header<\n+0019d260: 2f61 3e3c 2f63 6f64 653e 2061 6e64 2053 /a> and S\n+0019d270: 4f41 5020 4661 756c 7420 3c63 6f64 653e OAP Fault \n+0019d280: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_EN\n+0019d2e0: 565f 5f46 6175 6c74 3c2f 613e 3c2f 636f V__Fault structures, \n+0019d300: 696e 636c 7564 696e 6720 3c63 6f64 653e including \n+0019d310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_ENV__Detai\n+0019d380: 6c3c 2f61 3e3c 2f63 6f64 653e 2069 6620 l if \n+0019d390: 7468 6973 2073 7472 7563 7475 7265 2063 this structure c\n+0019d3a0: 6f6e 7461 696e 7320 6d65 6d62 6572 7320 ontains members \n+0019d3b0: 7468 6174 2061 7265 2073 6572 6961 6c69 that are seriali\n+0019d3c0: 7a65 6420 6173 2066 6175 6c74 2064 6574 zed as fault det\n+0019d3d0: 6169 6c73 2e20 596f 7520 6361 6e20 6c65 ails. You can le\n+0019d3e0: 6176 6520 7468 6973 2068 6561 6465 7220 ave this header \n+0019d3f0: 6669 6c65 2065 6d70 7479 2069 6620 796f file empty if yo\n+0019d400: 7520 7761 6e74 2074 6f20 7573 6520 7468 u want to use th\n+0019d410: 6520 6465 6661 756c 7420 534f 4150 2048 e default SOAP H\n+0019d420: 6561 6465 7220 616e 6420 4661 756c 742e eader and Fault.\n+0019d430: 2048 6f77 6576 6572 2c20 6966 2053 4f41 However, if SOA\n+0019d440: 5020 4865 6164 6572 7320 6172 6520 7265 P Headers are re\n+0019d450: 7175 6972 6564 2074 6865 6e20 796f 7520 quired then you \n+0019d460: 6361 6e6e 6f74 206c 6561 7665 2074 6865 cannot leave the\n+0019d470: 203c 636f 6465 3e3c 6120 636c 6173 733d SOAP_ENV__Head\n+0019d4e0: 6572 3c2f 613e 3c2f 636f 6465 3e20 7374 er st\n+0019d4f0: 7275 6374 7572 6520 656d 7074 792e 2046 ructure empty. F\n+0019d500: 6f72 2065 7861 6d70 6c65 2c20 7468 6520 or example, the \n+0019d510: 5753 2d41 6464 7265 7373 696e 6720 616e WS-Addressing an\n+0019d520: 6420 5753 2d53 6563 7572 6974 7920 706c d WS-Security pl\n+0019d530: 7567 696e 7320 7265 7175 6972 6520 534f ugins require SO\n+0019d540: 4150 2048 6561 6465 7273 2077 6869 6368 AP Headers which\n+0019d550: 2063 616e 2062 6520 696d 706f 7274 6564 can be imported\n+0019d560: 2062 7920 6164 6469 6e67 203c 636f 6465 by adding #import \"wsa5.h\n+0019d580: 223c 2f63 6f64 653e 2061 6e64 203c 636f \" and #import \"wsse\n+0019d5a0: 2e68 223c 2f63 6f64 653e 2c20 7265 7370 .h\", resp\n+0019d5b0: 6563 7469 7665 6c79 2074 6f20 3c65 6d3e ectively to \n+0019d5c0: 3c63 6f64 653e 656e 762e 683c 2f63 6f64 env.h. Then co\n+0019d5e0: 6d70 696c 6520 7468 6973 2068 6561 6465 mpile this heade\n+0019d5f0: 7220 6669 6c65 2077 6974 683a 203c 2f70 r file with:

     soapcpp2\n+0019d620: 202d 7065 6e76 2065 6e76 2e68 0a3c 2f70   -penv env.h.

    The gener\n+0019d640: 6174 6564 203c 656d 3e3c 636f 6465 3e65 ated e\n+0019d650: 6e76 432e 6370 703c 2f63 6f64 653e 3c2f nvC.cpp file holds t\n+0019d670: 6865 2053 4f41 5020 4865 6164 6572 2061 he SOAP Header a\n+0019d680: 6e64 2046 6175 6c74 2073 6572 6961 6c69 nd Fault seriali\n+0019d690: 7a65 7273 2061 6e64 2079 6f75 2063 616e zers and you can\n+0019d6a0: 206c 696e 6b20 7468 6973 2066 696c 6520 link this file \n+0019d6b0: 7769 7468 2079 6f75 7220 636c 6965 6e74 with your client\n+0019d6c0: 2061 6e64 2073 6572 7665 7220 6170 706c and server appl\n+0019d6d0: 6963 6174 696f 6e73 2e3c 2f70 3e0a 3c70 ications.

    ..... Back to table \n+0019d700: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n+0019d710: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .How t\n+0019d740: 6f20 6372 6561 7465 2063 6c69 656e 742f o create client/\n+0019d750: 7365 7276 6572 206c 6962 7261 7269 6573 server libraries\n+0019d760: 3c2f 6832 3e0a 3c70 3e54 6865 2073 6f61

    .

    The soa\n+0019d770: 7063 7070 3220 746f 6f6c 2070 726f 6475 pcpp2 tool produ\n+0019d780: 6365 7320 3c65 6d3e 3c63 6f64 653e 736f ces so\n+0019d790: 6170 436c 6965 6e74 4c69 622e 6370 703c apClientLib.cpp<\n+0019d7a0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+0019d7b0: 3c65 6d3e 3c63 6f64 653e 736f 6170 5365 soapSe\n+0019d7c0: 7276 6572 4c69 622e 6370 703c 2f63 6f64 rverLib.cpp source c\n+0019d7e0: 6f64 6520 6669 6c65 7320 7468 6174 2061 ode files that a\n+0019d7f0: 7265 2073 7065 6369 6669 6361 6c6c 7920 re specifically \n+0019d800: 696e 7465 6e64 6564 2066 6f72 2062 7569 intended for bui\n+0019d810: 6c64 696e 6720 7374 6174 6963 206f 7220 lding static or \n+0019d820: 6479 6e61 6d69 6320 636c 6965 6e74 2061 dynamic client a\n+0019d830: 6e64 2073 6572 7665 7220 6c69 6272 6172 nd server librar\n+0019d840: 6965 7320 696e 2043 206f 7220 432b 2b2e ies in C or C++.\n+0019d850: 2054 6865 7365 2066 696c 6573 2065 7870 These files exp\n+0019d860: 6f72 7420 7468 6520 7374 7562 2061 6e64 ort the stub and\n+0019d870: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi\n+0019d880: 6f6e 732c 2062 7574 206b 6565 7020 616c ons, but keep al\n+0019d890: 6c20 7365 7269 616c 697a 6174 696f 6e20 l serialization \n+0019d8a0: 636f 6465 2073 7461 7469 632c 2074 6875 code static, thu\n+0019d8b0: 7320 6869 6464 656e 2074 6f20 6176 6f69 s hidden to avoi\n+0019d8c0: 6420 6c69 6e6b 2073 796d 626f 6c20 636f d link symbol co\n+0019d8d0: 6e66 6c69 6374 7320 7768 656e 2063 6f6d nflicts when com\n+0019d8e0: 6269 6e69 6e67 206d 756c 7469 706c 6520 bining multiple \n+0019d8f0: 636c 6965 6e74 7320 616e 6420 7365 7276 clients and serv\n+0019d900: 6963 6573 2069 6e74 6f20 6f6e 6520 6578 ices into one ex\n+0019d910: 6563 7574 6162 6c65 2e20 4e6f 7465 2074 ecutable. Note t\n+0019d920: 6861 7420 6974 2069 7320 6661 7220 7369 hat it is far si\n+0019d930: 6d70 6c65 7220 746f 2075 7365 2074 6865 mpler to use the\n+0019d940: 2077 7364 6c32 6820 746f 6f6c 206f 6e20 wsdl2h tool on \n+0019d950: 6d75 6c74 6970 6c65 2057 5344 4c20 6669 multiple WSDL fi\n+0019d960: 6c65 7320 746f 2067 656e 6572 6174 6520 les to generate \n+0019d970: 6120 6865 6164 6572 2066 696c 6520 7468 a header file th\n+0019d980: 6174 2063 6f6d 6269 6e65 7320 616c 6c20 at combines all \n+0019d990: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti\n+0019d9a0: 6f6e 732e 2048 6f77 6576 6572 2c20 7468 ons. However, th\n+0019d9b0: 6520 6170 7072 6f61 6368 2070 7265 7365 e approach prese\n+0019d9c0: 6e74 6564 2069 6e20 7468 6973 2073 6563 nted in this sec\n+0019d9d0: 7469 6f6e 2069 7320 7573 6566 756c 2077 tion is useful w\n+0019d9e0: 6865 6e20 6372 6561 7469 6e67 2028 6479 hen creating (dy\n+0019d9f0: 6e61 6d69 6329 206c 6962 7261 7269 6573 namic) libraries\n+0019da00: 2066 6f72 2063 6c69 656e 7420 616e 6420 for client and \n+0019da10: 7365 7276 6572 206f 626a 6563 7473 2c20 server objects, \n+0019da20: 7375 6368 2061 7320 444c 4c73 2061 7320 such as DLLs as \n+0019da30: 6465 7363 7269 6265 6420 696e 2053 6563 described in Sec\n+0019da40: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion How to \n+0019da70: 6372 6561 7465 2044 4c4c 733c 2f61 3e20 create DLLs \n+0019da80: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    <\n+0019daa0: 6474 3e4e 6f74 653c 2f64 743e 3c64 643e dt>Note
    \n+0019dab0: 4f6e 6520 6d61 6a6f 7220 6469 7361 6476 One major disadv\n+0019dac0: 616e 7461 6765 206f 6620 7468 6520 6170 antage of the ap\n+0019dad0: 7072 6f61 6368 2070 7265 7365 6e74 6564 proach presented\n+0019dae0: 2068 6572 6520 6973 2074 6861 7420 7468 here is that th\n+0019daf0: 6520 7365 7269 616c 697a 6572 2066 756e e serializer fun\n+0019db00: 6374 696f 6e73 2061 7265 206e 6f20 6c6f ctions are no lo\n+0019db10: 6e67 6572 2061 6363 6573 7369 626c 6520 nger accessible \n+0019db20: 696e 2074 6865 2075 7365 7227 7320 736f in the user's so\n+0019db30: 7572 6365 2063 6f64 652c 2062 6563 6175 urce code, becau\n+0019db40: 7365 2073 6572 6961 6c69 7a65 7273 2077 se serializers w\n+0019db50: 696c 6c20 6265 2063 6f6e 7665 7274 6564 ill be converted\n+0019db60: 2074 6f20 7374 6174 6963 2066 756e 6374 to static funct\n+0019db70: 696f 6e73 2028 746f 2062 6520 7573 6564 ions (to be used\n+0019db80: 2062 7920 7468 6520 6765 6e65 7261 7465 by the generate\n+0019db90: 6420 7374 7562 2061 6e64 2073 6b65 6c65 d stub and skele\n+0019dba0: 746f 6e20 6675 6e63 7469 6f6e 7320 6f6e ton functions on\n+0019dbb0: 6c79 292e 2046 6f72 2065 7861 6d70 6c65 ly). For example\n+0019dbc0: 2c20 6675 6e63 7469 6f6e 7320 7375 6368 , functions such\n+0019dbd0: 2061 7320 3c63 6f64 653e 736f 6170 5f6e as soap_n\n+0019dbe0: 6577 5f54 3c2f 636f 6465 3e2c 203c 636f ew_T, soap_default_\n+0019dc00: 543c 2f63 6f64 653e 2c20 3c63 6f64 653e T, \n+0019dc10: 736f 6170 5f77 7269 7465 5f54 3c2f 636f soap_write_T, soap_\n+0019dc30: 7265 6164 5f54 3c2f 636f 6465 3e2c 203c read_T, <\n+0019dc40: 636f 6465 3e73 6f61 705f 7075 745f 543c code>soap_put_T<\n+0019dc50: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and soap_get_T cannot be us\n+0019dc80: 6564 2061 6e79 206c 6f6e 6765 722e 3c2f ed any longer.
    .

    Usin\n+0019dca0: 6720 432b 2b20 6e61 6d65 7370 6163 6573 g C++ namespaces\n+0019dcb0: 2069 7320 6120 6265 7474 6572 2061 6c74 is a better alt\n+0019dcc0: 6572 6e61 7469 7665 2077 6865 6e20 6275 ernative when bu\n+0019dcd0: 696c 6469 6e67 2061 7070 6c69 6361 7469 ilding applicati\n+0019dce0: 6f6e 7320 696e 2043 2b2b 2074 6861 7420 ons in C++ that \n+0019dcf0: 636f 6d62 696e 6520 6d75 6c74 6970 6c65 combine multiple\n+0019dd00: 2063 6c69 656e 7473 2061 6e64 2073 6572 clients and ser\n+0019dd10: 7669 6365 732e 2054 6f20 6275 696c 6420 vices. To build \n+0019dd20: 6d75 6c74 6970 6c65 206c 6962 7261 7269 multiple librari\n+0019dd30: 6573 2c20 796f 7520 6361 6e20 6465 6669 es, you can defi\n+0019dd40: 6e65 2061 2043 2b2b 206e 616d 6573 7061 ne a C++ namespa\n+0019dd50: 6365 2069 6e20 796f 7572 2068 6561 6465 ce in your heade\n+0019dd60: 7220 6669 6c65 2077 6974 6820 3c62 3e3c r file with <\n+0019dd70: 636f 6465 3e73 6f61 7063 7070 3220 2d71 code>soapcpp2 -q\n+0019dd80: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name \n+0019dd90: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+0019dda0: 2d71 6e61 6d65 3c2f 636f 6465 3e3c 2f62 -qname, see Section <\n+0019ddc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019ddd0: 663d 2269 6e64 6578 2e68 746d 6c23 636f f=\"index.html#co\n+0019dde0: 6465 6e61 6d65 7370 6163 6522 3e48 6f77 denamespace\">How\n+0019ddf0: 2074 6f20 6275 696c 6420 6120 636c 6965 to build a clie\n+0019de00: 6e74 206f 7220 7365 7276 6572 2069 6e20 nt or server in \n+0019de10: 6120 432b 2b20 636f 6465 206e 616d 6573 a C++ code names\n+0019de20: 7061 6365 3c2f 613e 2066 6f72 2064 6574 pace for det\n+0019de30: 6169 6c73 2e3c 2f70 3e0a 3c70 3e46 6f72 ails.

    .

    For\n+0019de40: 2043 2c20 796f 7520 6361 6e20 7573 6520 C, you can use \n+0019de50: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp\n+0019de60: 3220 2d63 202d 7020 6e61 6d65 3c2f 636f 2 -c -p name option <\n+0019de80: 623e 3c63 6f64 653e 2d70 206e 616d 653c b>-p name<\n+0019de90: 2f63 6f64 653e 3c2f 623e 2074 6f20 7265 /code> to re\n+0019dea0: 6e61 6d65 2074 6865 2067 656e 6572 6174 name the generat\n+0019deb0: 6564 203c 656d 3e3c 636f 6465 3e73 6f61 ed soa\n+0019dec0: 7043 6c69 656e 744c 6962 2e63 3c2f 636f pClientLib.c and soapServe\n+0019def0: 724c 6962 2e63 3c2f 636f 6465 3e3c 2f65 rLib.c (and associat\n+0019df10: 6564 2920 6669 6c65 732e 2054 6865 203c ed) files. The <\n+0019df20: 623e 3c63 6f64 653e 2d70 206e 616d 653c b>-p name<\n+0019df30: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio\n+0019df40: 6e20 7370 6563 6966 6965 7320 7468 6520 n specifies the \n+0019df50: 6669 6c65 203c 656d 3e3c 636f 6465 3e6e file n\n+0019df60: 616d 653c 2f63 6f64 653e 3c2f 656d 3e20 ame \n+0019df70: 7072 6566 6978 2074 6f20 7265 706c 6163 prefix to replac\n+0019df80: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the \n+0019df90: 736f 6170 3c2f 636f 6465 3e3c 2f65 6d3e soap\n+0019dfa0: 2066 696c 6520 6e61 6d65 2070 7265 6669 file name prefi\n+0019dfb0: 782e 3c2f 703e 0a3c 703e 5468 6520 656e x.

    .

    The en\n+0019dfc0: 6769 6e65 2064 6f65 7320 6e6f 7420 6465 gine does not de\n+0019dfd0: 6669 6e65 2053 4f41 5020 4865 6164 6572 fine SOAP Header\n+0019dfe0: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria\n+0019dff0: 6c69 7a65 7273 2074 6861 7420 7468 6520 lizers that the \n+0019e000: 656e 6769 6e65 206e 6565 6473 2e20 5765 engine needs. We\n+0019e010: 2074 6865 7265 666f 7265 2061 6464 2053 therefore add S\n+0019e020: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F\n+0019e030: 6175 6c74 2073 6572 6961 6c69 7a65 7273 ault serializers\n+0019e040: 2c20 7768 6963 6820 6172 6520 636f 6d70 , which are comp\n+0019e050: 696c 6564 2073 6570 6172 6174 656c 7920 iled separately \n+0019e060: 6173 2066 6f6c 6c6f 7773 2e20 4669 7273 as follows. Firs\n+0019e070: 742c 2063 7265 6174 6520 6120 6e65 7720 t, create a new \n+0019e080: 6865 6164 6572 2066 696c 6520 3c65 6d3e header file \n+0019e090: 3c63 6f64 653e 656e 762e 683c 2f63 6f64 env.h with the\n+0019e0b0: 2053 4f41 5020 4865 6164 6572 203c 636f SOAP Header SO\n+0019e120: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header and SO\n+0019e140: 4150 2046 6175 6c74 203c 636f 6465 3e3c AP Fault <\n+0019e150: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019e160: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+0019e170: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6661 p___e_n_v_____fa\n+0019e180: 756c 742e 6874 6d6c 2220 7469 746c 653d ult.html\" title=\n+0019e190: 2253 4f41 5020 4661 756c 7420 7374 7275 \"SOAP Fault stru\n+0019e1a0: 6374 7572 652e 223e 534f 4150 5f45 4e56 cture.\">SOAP_ENV\n+0019e1b0: 5f5f 4661 756c 743c 2f61 3e3c 2f63 6f64 __Fault structures, i\n+0019e1d0: 6e63 6c75 6469 6e67 203c 636f 6465 3e3c ncluding <\n+0019e1e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019e1f0: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+0019e200: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6465 p___e_n_v_____de\n+0019e210: 7461 696c 2e68 746d 6c22 2074 6974 6c65 tail.html\" title\n+0019e220: 3d22 534f 4150 2046 6175 6c74 2044 6574 =\"SOAP Fault Det\n+0019e230: 6169 6c20 7374 7275 6374 7572 652e 223e ail structure.\">\n+0019e240: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail\n+0019e250: 3c2f 613e 3c2f 636f 6465 3e20 6966 2074 if t\n+0019e260: 6869 7320 7374 7275 6374 7572 6520 636f his structure co\n+0019e270: 6e74 6169 6e73 206d 656d 6265 7273 2074 ntains members t\n+0019e280: 6861 7420 6172 6520 7365 7269 616c 697a hat are serializ\n+0019e290: 6564 2061 7320 6661 756c 7420 6465 7461 ed as fault deta\n+0019e2a0: 696c 732e 2059 6f75 2063 616e 206c 6561 ils. You can lea\n+0019e2b0: 7665 2074 6869 7320 6865 6164 6572 2066 ve this header f\n+0019e2c0: 696c 6520 656d 7074 7920 6966 2079 6f75 ile empty if you\n+0019e2d0: 2077 616e 7420 746f 2075 7365 2074 6865 want to use the\n+0019e2e0: 2064 6566 6175 6c74 2053 4f41 5020 4865 default SOAP He\n+0019e2f0: 6164 6572 2061 6e64 2046 6175 6c74 2e20 ader and Fault. \n+0019e300: 486f 7765 7665 722c 2069 6620 534f 4150 However, if SOAP\n+0019e310: 2048 6561 6465 7273 2061 7265 2072 6571 Headers are req\n+0019e320: 7569 7265 6420 7468 656e 2079 6f75 2063 uired then you c\n+0019e330: 616e 6e6f 7420 6c65 6176 6520 7468 6520 annot leave the \n+0019e340: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 SOAP_ENV__Heade\n+0019e3b0: 723c 2f61 3e3c 2f63 6f64 653e 2073 7472 r str\n+0019e3c0: 7563 7475 7265 2065 6d70 7479 2e20 466f ucture empty. Fo\n+0019e3d0: 7220 6578 616d 706c 652c 2074 6865 2057 r example, the W\n+0019e3e0: 532d 4164 6472 6573 7369 6e67 2061 6e64 S-Addressing and\n+0019e3f0: 2057 532d 5365 6375 7269 7479 2070 6c75 WS-Security plu\n+0019e400: 6769 6e73 2072 6571 7569 7265 2053 4f41 gins require SOA\n+0019e410: 5020 4865 6164 6572 7320 7768 6963 6820 P Headers which \n+0019e420: 6361 6e20 6265 2069 6d70 6f72 7465 6420 can be imported \n+0019e430: 6279 2061 6464 696e 6720 3c63 6f64 653e by adding \n+0019e440: 2369 6d70 6f72 7420 2277 7361 352e 6822 #import \"wsa5.h\"\n+0019e450: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and #import \"wsse.\n+0019e470: 6822 3c2f 636f 6465 3e2c 2072 6573 7065 h\", respe\n+0019e480: 6374 6976 656c 7920 746f 203c 656d 3e3c ctively to <\n+0019e490: 636f 6465 3e65 6e76 2e68 3c2f 636f 6465 code>env.h. Then com\n+0019e4b0: 7069 6c65 2074 6869 7320 6865 6164 6572 pile this header\n+0019e4c0: 2066 696c 6520 7769 7468 3a20 3c2f 703e file with:

    \n+0019e4d0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     soapcpp2 \n+0019e4f0: 2d70 656e 7620 656e 762e 680a 3c2f 7072  -penv env.h.

    The genera\n+0019e510: 7465 6420 3c65 6d3e 3c63 6f64 653e 656e ted en\n+0019e520: 7643 2e63 7070 3c2f 636f 6465 3e3c 2f65 vC.cpp file holds th\n+0019e540: 6520 534f 4150 2048 6561 6465 7220 616e e SOAP Header an\n+0019e550: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ\n+0019e560: 6572 7320 616e 6420 796f 7520 6361 6e20 ers and you can \n+0019e570: 6372 6561 7465 2061 2028 6479 6e61 6d69 create a (dynami\n+0019e580: 6329 206c 6962 7261 7279 2066 6f72 2069 c) library for i\n+0019e590: 7420 746f 206c 696e 6b20 6974 2077 6974 t to link it wit\n+0019e5a0: 6820 796f 7572 2063 6c69 656e 7420 616e h your client an\n+0019e5b0: 6420 7365 7276 6572 2061 7070 6c69 6361 d server applica\n+0019e5c0: 7469 6f6e 732e 3c2f 703e 0a3c 703e 596f tions.

    .

    Yo\n+0019e5d0: 7520 7368 6f75 6c64 2074 6865 6e20 636f u should then co\n+0019e5e0: 6d70 696c 6520 7468 6520 3c65 6d3e 3c63 mpile the gsoap/stdsoa\n+0019e600: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp library with \n+0019e620: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time\n+0019e630: 203c 636f 6465 3e23 5749 5448 5f4e 4f4e #WITH_NON\n+0019e640: 414d 4553 5041 4345 533c 2f63 6f64 653e AMESPACES\n+0019e650: 2066 6c61 673a 203c 2f70 3e3c 7072 6520 flag:

     c++ -DWITH_NON\n+0019e680: 414d 4553 5041 4345 5320 2d63 2073 7464  AMESPACES -c std\n+0019e690: 736f 6170 322e 6370 700a 3c2f 7072 653e  soap2.cpp.
    \n+0019e6a0: 3c70 3e20 5468 6973 206f 6d69 7473 2074

    This omits t\n+0019e6b0: 6865 2072 6566 6572 656e 6365 2074 6f20 he reference to \n+0019e6c0: 7468 6520 676c 6f62 616c 206e 616d 6573 the global names\n+0019e6d0: 7061 6365 7320 7461 626c 652c 2077 6869 paces table, whi\n+0019e6e0: 6368 2069 7320 6e6f 7768 6572 6520 746f ch is nowhere to\n+0019e6f0: 2062 6520 6465 6669 6e65 6420 7369 6e63 be defined sinc\n+0019e700: 6520 7765 2077 696c 6c20 7573 6520 584d e we will use XM\n+0019e710: 4c20 6e61 6d65 7370 6163 6573 2066 6f72 L namespaces for\n+0019e720: 2065 6163 6820 636c 6965 6e74 2f73 6572 each client/ser\n+0019e730: 7669 6365 2073 6570 6172 6174 656c 792e vice separately.\n+0019e740: 2054 6865 7265 666f 7265 2c20 796f 7520 Therefore, you \n+0019e750: 6d75 7374 2065 7870 6c69 6369 746c 7920 must explicitly \n+0019e760: 7365 7420 7468 6520 6e61 6d65 7370 6163 set the namespac\n+0019e770: 6573 2076 616c 7565 206f 6620 7468 6520 es value of the \n+0019e780: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context in you\n+0019e7f0: 7220 636f 6465 2065 7665 7279 2074 696d r code every tim\n+0019e800: 6520 6166 7465 7220 696e 6974 6961 6c69 e after initiali\n+0019e810: 7a61 7469 6f6e 206f 6620 7468 6520 3c63 zation of the \n+0019e870: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+0019e880: 636f 6e74 6578 7420 7769 7468 2074 6865 context with the\n+0019e890: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set_\n+0019e960: 6e61 6d65 7370 6163 6573 2873 7472 7563 namespaces(struc\n+0019e970: 7420 736f 6170 2a2c 2063 6f6e 7374 2073 t soap*, const s\n+0019e980: 7472 7563 7420 4e61 6d65 7370 6163 652a truct Namespace*\n+0019e990: 293c 2f61 3e3c 2f63 6f64 653e 2066 756e ) fun\n+0019e9a0: 6374 696f 6e2e 3c2f 703e 0a3c 703e 466f ction.

    .

    Fo\n+0019e9b0: 7220 6578 616d 706c 652c 2073 7570 706f r example, suppo\n+0019e9c0: 7365 2077 6520 6861 7665 2074 776f 2063 se we have two c\n+0019e9d0: 6c69 656e 7473 2064 6566 696e 6564 2069 lients defined i\n+0019e9e0: 6e20 6865 6164 6572 2066 696c 6573 203c n header files <\n+0019e9f0: 656d 3e3c 636f 6465 3e63 6c69 656e 7431 em>client1\n+0019ea00: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a\n+0019ea10: 6e64 203c 656d 3e3c 636f 6465 3e63 6c69 nd cli\n+0019ea20: 656e 7432 2e68 3c2f 636f 6465 3e3c 2f65 ent2.h. We first gen\n+0019ea40: 6572 6174 6520 7468 6520 3c65 6d3e 3c63 erate the envH.h file for \n+0019ea70: 7468 6520 534f 4150 2048 6561 6465 7220 the SOAP Header \n+0019ea80: 616e 6420 4661 756c 7420 6465 6669 6e69 and Fault defini\n+0019ea90: 7469 6f6e 733a 203c 2f70 3e3c 7072 6520 tions:

     soapcpp2 -c -p\n+0019eac0: 656e 7620 656e 762e 680a 3c2f 7072 653e  env env.h.
    \n+0019ead0: 3c70 3e20 5468 656e 2077 6520 6765 6e65

    Then we gene\n+0019eae0: 7261 7465 2074 6865 2063 6f64 6520 666f rate the code fo\n+0019eaf0: 7220 636c 6965 6e74 3120 616e 6420 636c r client1 and cl\n+0019eb00: 6965 6e74 323a 203c 2f70 3e3c 7072 6520 ient2:

     soapcpp2 -c -n\n+0019eb30: 202d 706d 7943 6c69 656e 7431 2063 6c69   -pmyClient1 cli\n+0019eb40: 656e 7431 2e68 0a20 736f 6170 6370 7032  ent1.h. soapcpp2\n+0019eb50: 202d 6320 2d6e 202d 706d 7943 6c69 656e   -c -n -pmyClien\n+0019eb60: 7432 2063 6c69 656e 7432 2e68 0a3c 2f70  t2 client2.h.

    This gene\n+0019eb80: 7261 7465 7320 3c65 6d3e 3c63 6f64 653e rates \n+0019eb90: 6d79 436c 6965 6e74 3143 6c69 656e 744c myClient1ClientL\n+0019eba0: 6962 2e63 3c2f 636f 6465 3e3c 2f65 6d3e ib.c\n+0019ebb0: 2061 6e64 203c 656d 3e3c 636f 6465 3e6d and m\n+0019ebc0: 7943 6c69 656e 7432 436c 6965 6e74 4c69 yClient2ClientLi\n+0019ebd0: 622e 633c 2f63 6f64 653e 3c2f 656d 3e20 b.c \n+0019ebe0: 2861 6d6f 6e67 2073 6576 6572 616c 206f (among several o\n+0019ebf0: 7468 6572 2066 696c 6573 292e 2054 6865 ther files). The\n+0019ec00: 7365 2074 776f 2066 696c 6573 2073 686f se two files sho\n+0019ec10: 756c 6420 6265 2063 6f6d 7069 6c65 6420 uld be compiled \n+0019ec20: 616e 6420 6c69 6e6b 6564 2077 6974 6820 and linked with \n+0019ec30: 796f 7572 2061 7070 6c69 6361 7469 6f6e your application\n+0019ec40: 2e20 5468 6520 736f 7572 6365 2063 6f64 . The source cod\n+0019ec50: 6520 6f66 2079 6f75 7220 6170 706c 6963 e of your applic\n+0019ec60: 6174 696f 6e20 7368 6f75 6c64 2069 6e63 ation should inc\n+0019ec70: 6c75 6465 2074 6865 2067 656e 6572 6174 lude the generat\n+0019ec80: 6564 203c 656d 3e3c 636f 6465 3e65 6e76 ed env\n+0019ec90: 482e 683c 2f63 6f64 653e 3c2f 656d 3e2c H.h,\n+0019eca0: 203c 656d 3e3c 636f 6465 3e6d 7943 6c69 myCli\n+0019ecb0: 656e 7431 482e 683c 2f63 6f64 653e 3c2f ent1H.h, m\n+0019ecd0: 7943 6c69 656e 7432 2e68 3c2f 636f 6465 yClient2.h files and\n+0019ecf0: 203c 656d 3e3c 636f 6465 3e6d 7943 6c69 myCli\n+0019ed00: 656e 7431 2e6e 736d 6170 3c2f 636f 6465 ent1.nsmap, myClient2.nsma\n+0019ed30: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi\n+0019ed40: 6c65 733a 3c2f 703e 0a3c 6469 7620 636c les:

    .
    <\n+0019ed60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019ed70: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+0019ed90: 6c75 6465 2026 7175 6f74 3b6d 7943 6c69 lude "myCli\n+0019eda0: 656e 7431 482e 6826 7175 6f74 3b3c 2f73 ent1H.h" // in\n+0019edd0: 636c 7564 6520 636c 6965 6e74 2031 2073 clude client 1 s\n+0019ede0: 7475 6273 203c 2f73 7061 6e3e 3c2f 6469 tubs .
    \n+0019ee20: 2369 6e63 6c75 6465 2026 7175 6f74 3b6d #include "m\n+0019ee30: 7943 6c69 656e 7432 482e 6826 7175 6f74 yClient2H.h"\n+0019ee40: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; /\n+0019ee60: 2f20 696e 636c 7564 6520 636c 6965 6e74 / include client\n+0019ee70: 2032 2073 7475 6273 203c 2f73 7061 6e3e 2 stubs \n+0019ee80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n+0019eec0: 6f74 3b65 6e76 482e 6826 7175 6f74 3b3c ot;envH.h"<\n+0019eed0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n+0019eef0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    #include \n+0019ef50: 2671 756f 743b 6d79 436c 6965 6e74 3148 "myClient1H\n+0019ef60: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap" // inc\n+0019ef90: 6c75 6465 2063 6c69 656e 7420 3120 6e73 lude client 1 ns\n+0019efa0: 6d61 7020 3c2f 7370 616e 3e3c 2f64 6976 map .
    #\n+0019efe0: 696e 636c 7564 6520 2671 756f 743b 6d79 include "my\n+0019eff0: 436c 6965 6e74 3248 2e6e 736d 6170 2671 Client2H.nsmap&q\n+0019f000: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; // include cli\n+0019f030: 656e 7420 3220 6e73 6d61 7020 3c2f 7370 ent 2 nsmap
    .
    .
    .\n-0019f090: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-0019f0e0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-0019f110: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n-0019f170: 5f6e 6577 3c2f 613e 2829 3b3c 2f64 6976 _new();.
    soap_\n-0019f1f0: 7365 745f 6e61 6d65 7370 6163 6573 3c2f set_namespaces(soap, myClient1_na\n-0019f240: 6d65 7370 6163 6573 293b 203c 2f64 6976 mespaces); .
    ... //\n-0019f280: 206d 616b 6520 436c 6965 6e74 2031 2069 make Client 1 i\n-0019f290: 6e76 6f63 6174 696f 6e73 3c2f 7370 616e nvocations
    .
    ... //.
    soa\n-0019f350: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces\n-0019f360: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-0019f390: 3c2f 613e 2c20 6d79 436c 6965 6e74 325f , myClient2_\n-0019f3a0: 6e61 6d65 7370 6163 6573 293b 203c 2f64 namespaces); .
    ... \n-0019f3e0: 2f2f 206d 616b 6520 436c 6965 6e74 2032 // make Client 2\n-0019f3f0: 2069 6e76 6f63 6174 696f 6e73 3c2f 7370 invocations
    .
    \n-0019f410: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    It is \n+0019f410: 696d 706f 7274 616e 7420 746f 2075 7365 important to use\n+0019f420: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp\n+0019f430: 7032 202d 6e3c 2f63 6f64 653e 3c2f 623e p2 -n\n+0019f440: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -n, \n+0019f460: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section soap\n+0019f4a0: 6370 7032 206f 7074 696f 6e73 3c2f 613e cpp2 options\n+0019f4b0: 2c20 746f 2072 656e 616d 6520 7468 6520 , to rename the \n+0019f4c0: 6e61 6d65 7370 6163 6520 7461 626c 6573 namespace tables\n+0019f4d0: 2073 6f20 7765 2063 616e 2069 6e63 6c75 so we can inclu\n+0019f4e0: 6465 2074 6865 6d20 616c 6c20 7769 7468 de them all with\n+0019f4f0: 6f75 7420 7275 6e6e 696e 6720 696e 746f out running into\n+0019f500: 2072 6564 6566 696e 6974 696f 6e73 2e3c redefinitions.<\n+0019f510: 2f70 3e0a 3c64 6c20 636c 6173 733d 2273 /p>.

    Note
    Li\n+0019f540: 6e6b 2063 6f6e 666c 6963 7473 206d 6179 nk conflicts may\n+0019f550: 2073 7469 6c6c 206f 6363 7572 2069 6e20 still occur in \n+0019f560: 7468 6520 756e 6c69 6b65 6c79 2073 6974 the unlikely sit\n+0019f570: 7561 7469 6f6e 2074 6861 7420 6964 656e uation that iden\n+0019f580: 7469 6361 6c20 7365 7276 6963 6520 6f70 tical service op\n+0019f590: 6572 6174 696f 6e20 6e61 6d65 7320 6172 eration names ar\n+0019f5a0: 6520 6465 6669 6e65 6420 696e 2074 776f e defined in two\n+0019f5b0: 206f 7220 6d6f 7265 2073 7475 6220 6f72 or more stub or\n+0019f5c0: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi\n+0019f5d0: 6f6e 7320 7768 656e 2074 6865 7365 206d ons when these m\n+0019f5e0: 6574 686f 6473 2073 6861 7265 2074 6865 ethods share the\n+0019f5f0: 2073 616d 6520 584d 4c20 6e61 6d65 7370 same XML namesp\n+0019f600: 6163 6520 7072 6566 6978 2e3c 2f64 643e ace prefix.
    \n+0019f610: 3c2f 646c 3e0a 3c70 3ef0 9f94 9d20 3c61
    .

    .... Back t\n+0019f630: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n+0019f640: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n+0019f650: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .C++ exampl\n+0019f680: 6573 3c2f 6833 3e0a 3c70 3e41 7320 616e es

    .

    As an\n+0019f690: 2065 7861 6d70 6c65 2077 6520 7769 6c6c example we will\n+0019f6a0: 2062 7569 6c64 2061 2044 656c 6179 6564 build a Delayed\n+0019f6b0: 2053 746f 636b 2051 756f 7465 2063 6c69 Stock Quote cli\n+0019f6c0: 656e 7420 6c69 6272 6172 7920 616e 6420 ent library and \n+0019f6d0: 6120 4375 7272 656e 6379 2045 7863 6861 a Currency Excha\n+0019f6e0: 6e67 6520 5261 7465 2063 6c69 656e 7420 nge Rate client \n+0019f6f0: 6c69 6272 6172 792e 3c2f 703e 0a3c 703e library.

    .

    \n+0019f700: 4669 7273 742c 2077 6520 6372 6561 7465 First, we create\n+0019f710: 2061 6e20 656d 7074 7920 6865 6164 6572 an empty header\n+0019f720: 2066 696c 6520 3c65 6d3e 3c63 6f64 653e file \n+0019f730: 656e 762e 683c 2f63 6f64 653e 3c2f 656d env.h, which may be \n+0019f750: 656d 7074 7920 6f72 2073 686f 756c 6420 empty or should \n+0019f760: 636f 6e74 6169 6e20 534f 4150 2048 6561 contain SOAP Hea\n+0019f770: 6465 7220 616e 6420 4661 756c 7420 6465 der and Fault de\n+0019f780: 6669 6e69 7469 6f6e 7320 6173 2065 7870 finitions as exp\n+0019f790: 6c61 696e 6564 2069 6e20 5365 6374 696f lained in Sectio\n+0019f7a0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n How to \n+0019f7d0: 6372 6561 7465 2063 6c69 656e 742f 7365 create client/se\n+0019f7e0: 7276 6572 206c 6962 7261 7269 6573 3c2f rver libraries, and compile \n+0019f800: 6974 2061 7320 666f 6c6c 6f77 733a 203c it as follows: <\n+0019f810: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     soapcp\n+0019f830: 7032 202d 7065 6e76 2065 6e76 2e68 0a20  p2 -penv env.h. \n+0019f840: 632b 2b20 2d63 2065 6e76 432e 6370 700a  c++ -c envC.cpp.\n+0019f850: 3c2f 7072 653e 3c70 3e20 5765 2061 6c73  

    We als\n+0019f860: 6f20 636f 6d70 696c 6520 3c65 6d3e 3c63 o compile gsoap/stdsoa\n+0019f880: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp without names\n+0019f8a0: 7061 6365 733a 203c 2f70 3e3c 7072 6520 paces:

     c++ -c -DWITH_\n+0019f8d0: 4e4f 4e41 4d45 5350 4143 4553 2073 7464  NONAMESPACES std\n+0019f8e0: 736f 6170 322e 6370 700a 3c2f 7072 653e  soap2.cpp.
    \n+0019f8f0: 3c70 3e20 4966 2079 6f75 2064 6f20 6e6f

    If you do no\n+0019f900: 7420 7573 6520 3c63 6f64 653e 2357 4954 t use #WIT\n+0019f910: 485f 4e4f 4e41 4d45 5350 4143 4553 3c2f H_NONAMESPACES then you w\n+0019f930: 696c 6c20 6765 7420 616e 2075 6e72 6573 ill get an unres\n+0019f940: 6f6c 7665 6420 6c69 6e6b 2065 7272 6f72 olved link error\n+0019f950: 2066 6f72 2074 6865 2067 6c6f 6261 6c20 for the global \n+0019f960: 3c63 6f64 653e 6e61 6d65 7370 6163 6573 namespaces\n+0019f970: 3c2f 636f 6465 3e20 7461 626c 652e 2059 table. Y\n+0019f980: 6f75 2063 616e 2064 6566 696e 6520 6120 ou can define a \n+0019f990: 6475 6d6d 7920 7461 626c 6520 746f 2061 dummy table to a\n+0019f9a0: 766f 6964 2068 6176 696e 6720 746f 2072 void having to r\n+0019f9b0: 6563 6f6d 7069 6c65 203c 656d 3e3c 636f ecompile gsoap/stdsoap\n+0019f9d0: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp.

    .

    Second\n+0019f9f0: 2c20 7765 2063 7265 6174 6520 7468 6520 , we create the \n+0019fa00: 4465 6c61 7965 6420 5374 6f63 6b20 5175 Delayed Stock Qu\n+0019fa10: 6f74 6520 6865 6164 6572 2066 696c 6520 ote header file \n+0019fa20: 7370 6563 6966 6963 6174 696f 6e2c 2077 specification, w\n+0019fa30: 6869 6368 206d 6179 2062 6520 6f62 7461 hich may be obta\n+0019fa40: 696e 6564 2075 7369 6e67 2074 6865 2057 ined using the W\n+0019fa50: 5344 4c20 696d 706f 7274 6572 2e20 4966 SDL importer. If\n+0019fa60: 2079 6f75 2077 616e 7420 746f 2075 7365 you want to use\n+0019fa70: 2043 2b2b 206e 616d 6573 7061 6365 7320 C++ namespaces \n+0019fa80: 7468 656e 2079 6f75 206e 6565 6420 746f then you need to\n+0019fa90: 206d 616e 7561 6c6c 7920 6164 6420 7468 manually add th\n+0019faa0: 6520 3c63 6f64 653e 6e61 6d65 7370 6163 e namespac\n+0019fab0: 653c 2f63 6f64 653e 2064 6563 6c61 7261 e declara\n+0019fac0: 7469 6f6e 2074 6f20 7468 6520 6765 6e65 tion to the gene\n+0019fad0: 7261 7465 6420 6865 6164 6572 2066 696c rated header fil\n+0019fae0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+0019fb10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0019fb20: 6f72 6422 3e6e 616d 6573 7061 6365 203c ord\">namespace <\n+0019fb30: 2f73 7061 6e3e 7175 6f74 6520 7b3c 2f64 /span>quote {.
    .\n-0019fb70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-0019fba0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-0019fbb0: 6365 206e 616d 653a 2053 6572 7669 6365 ce name: Service\n-0019fbc0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-0019fbd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019fbe0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-0019fc00: 7320 7365 7276 6963 6520 7374 796c 653a s service style:\n-0019fc10: 2072 7063 203c 2f73 7061 6e3e 3c2f 6469 rpc .
    //gso\n-0019fc50: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en\n-0019fc60: 636f 6469 6e67 3a20 656e 636f 6465 6420 coding: encoded \n-0019fc70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0019fc90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-0019fcb0: 2073 6572 7669 6365 206c 6f63 6174 696f service locatio\n-0019fcc0: 6e3a 2068 7474 703a 2f2f 7365 7276 6963 n: http://servic\n-0019fcd0: 6573 2e78 6d65 7468 6f64 732e 6e65 742f es.xmethods.net/\n-0019fce0: 736f 6170 203c 2f73 7061 6e3e 3c2f 6469 soap .
    //gso\n-0019fd20: 6170 206e 7320 7363 6865 6d61 206e 616d ap ns schema nam\n-0019fd30: 6573 7061 6365 3a20 7572 6e3a 786d 6574 espace: urn:xmet\n-0019fd40: 686f 6473 2d64 656c 6179 6564 2d71 756f hods-delayed-quo\n-0019fd50: 7465 7320 3c2f 7370 616e 3e3c 2f64 6976 tes .
    //gsoa\n-0019fd90: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n-0019fda0: 686f 642d 6163 7469 6f6e 3a20 6765 7451 hod-action: getQ\n-0019fdb0: 756f 7465 2026 7175 6f74 3b26 7175 6f74 uote ""\n-0019fdc0: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
    .\n-0019fdd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-0019fe00: 2f73 7061 6e3e 206e 735f 5f67 6574 5175 /span> ns__getQu\n-0019fe10: 6f74 6528 3c73 7061 6e20 636c 6173 733d ote(ch\n-0019fe30: 6172 3c2f 7370 616e 3e20 2a73 796d 626f ar *symbo\n-0019fe40: 6c2c 203c 7370 616e 2063 6c61 7373 3d22 l, flo\n-0019fe60: 6174 3c2f 7370 616e 3e20 2661 6d70 3b52 at &R\n-0019fe70: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .<\n+0019fb70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+0019fb90: 2073 6572 7669 6365 206e 616d 653a 2053 service name: S\n+0019fba0: 6572 7669 6365 203c 2f73 7061 6e3e 3c2f ervice .
    //g\n+0019fbe0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+0019fbf0: 7374 796c 653a 2072 7063 203c 2f73 7061 style: rpc
    .
    //gsoap ns serv\n+0019fc40: 6963 6520 656e 636f 6469 6e67 3a20 656e ice encoding: en\n+0019fc50: 636f 6465 6420 3c2f 7370 616e 3e3c 2f64 coded .
    //gs\n+0019fc90: 6f61 7020 6e73 2073 6572 7669 6365 206c oap ns service l\n+0019fca0: 6f63 6174 696f 6e3a 2068 7474 703a 2f2f ocation: http://\n+0019fcb0: 7365 7276 6963 6573 2e78 6d65 7468 6f64 services.xmethod\n+0019fcc0: 732e 6e65 742f 736f 6170 203c 2f73 7061 s.net/soap
    .
    //gsoap ns sche\n+0019fd10: 6d61 206e 616d 6573 7061 6365 3a20 7572 ma namespace: ur\n+0019fd20: 6e3a 786d 6574 686f 6473 2d64 656c 6179 n:xmethods-delay\n+0019fd30: 6564 2d71 756f 7465 7320 3c2f 7370 616e ed-quotes
    .
    \n+0019fd70: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+0019fd80: 6365 206d 6574 686f 642d 6163 7469 6f6e ce method-action\n+0019fd90: 3a20 6765 7451 756f 7465 2026 7175 6f74 : getQuote "\n+0019fda0: 3b26 7175 6f74 3b20 3c2f 7370 616e 3e3c ;" <\n+0019fdb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n+0019fdf0: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(char \n+0019fe20: 2a73 796d 626f 6c2c 203c 7370 616e 2063 *symbol, float \n+0019fe50: 2661 6d70 3b52 6573 756c 7429 3b20 3c2f &Result); .
    .<\n 0019fe80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019fe90: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    } // namespace \n-0019fed0: 7175 6f74 653c 2f73 7061 6e3e 3c2f 6469 quote.

    We \n-0019ff00: 7468 656e 2063 6f6d 7069 6c65 2069 7420 then compile it \n-0019ff10: 6173 2061 206c 6962 7261 7279 2061 6e64 as a library and\n-0019ff20: 2077 6520 7573 6520 6f70 7469 6f6e 203c we use option <\n-0019ff30: 623e 3c63 6f64 653e 2d6e 3c2f 636f 6465 b>-n to prefix \n-0019ff50: 7468 6520 6765 6e65 7261 7465 6420 6669 the generated fi\n-0019ff60: 6c65 7320 616e 6420 746f 2072 656e 616d les and to renam\n-0019ff70: 6520 7468 6520 6e61 6d65 7370 6163 6520 e the namespace \n-0019ff80: 7461 626c 6520 746f 2061 766f 6964 206c table to avoid l\n-0019ff90: 696e 6b20 636f 6e66 6c69 6374 7320 6c61 ink conflicts la\n-0019ffa0: 7465 723a 203c 2f70 3e3c 7072 6520 636c ter:

     \n-0019ffc0: 736f 6170 6370 7032 202d 6e20 7175 6f74  soapcpp2 -n quot\n-0019ffd0: 652e 680a 2063 2b2b 202d 6320 7175 6f74  e.h. c++ -c quot\n-0019ffe0: 6543 6c69 656e 744c 6962 2e63 7070 0a3c  eClientLib.cpp.<\n-0019fff0: 2f70 7265 3e3c 703e 2049 6620 796f 7520  /pre>

    If you \n-001a0000: 646f 6e27 7420 7761 6e74 2074 6f20 7573 don't want to us\n-001a0010: 6520 6120 432b 2b20 636f 6465 206e 616d e a C++ code nam\n-001a0020: 6573 7061 6365 2c20 796f 7520 7368 6f75 espace, you shou\n-001a0030: 6c64 2063 6f6d 7069 6c65 203c 656d 3e3c ld compile <\n-001a0040: 636f 6465 3e71 756f 7465 2e68 3c2f 636f code>quote.h \"as is\"\n-001a0060: 2077 6974 6820 6f70 7469 6f6e 203c 623e with option \n-001a0070: 3c63 6f64 653e 2d70 7175 6f74 653c 2f63 -pquote:

    soapcpp2 -n\n-001a00b0: 202d 7071 756f 7465 2071 756f 7465 2e68 -pquote quote.h\n-001a00c0: 0a20 632b 2b20 2d63 2071 756f 7465 436c . c++ -c quoteCl\n-001a00d0: 6965 6e74 4c69 622e 6370 700a 3c2f 7072 ientLib.cpp.

    Third, we \n-001a00f0: 6372 6561 7465 2074 6865 2043 7572 7265 create the Curre\n-001a0100: 6e63 7920 4578 6368 616e 6765 2052 6174 ncy Exchange Rat\n-001a0110: 6520 6865 6164 6572 2066 696c 6520 7370 e header file sp\n-001a0120: 6563 6966 6963 6174 696f 6e3a 3c2f 703e ecification:

    \n-001a0130: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    n\n-001a0170: 616d 6573 7061 6365 203c 2f73 7061 6e3e amespace \n-001a0180: 7261 7465 207b 3c2f 6469 763e 0a3c 6469 rate {
    . \n-001a01a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-001a01d0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-001a01e0: 6520 6e61 6d65 3a20 5365 7276 6963 6520 e name: Service \n-001a01f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a0210: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001a0230: 2073 6572 7669 6365 2073 7479 6c65 3a20 service style: \n-001a0240: 7270 6320 3c2f 7370 616e 3e3c 2f64 6976 rpc .
    //gsoa\n-001a0280: 7020 6e73 2073 6572 7669 6365 2065 6e63 p ns service enc\n-001a0290: 6f64 696e 673a 2065 6e63 6f64 6564 203c oding: encoded <\n-001a02a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001a02c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001a02d0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-001a02e0: 7365 7276 6963 6520 6c6f 6361 7469 6f6e service location\n-001a02f0: 3a20 6874 7470 3a2f 2f73 6572 7669 6365 : http://service\n-001a0300: 732e 786d 6574 686f 6473 2e6e 6574 2f73 s.xmethods.net/s\n-001a0310: 6f61 7020 3c2f 7370 616e 3e3c 2f64 6976 oap .
    //gsoa\n-001a0350: 7020 6e73 2073 6368 656d 6120 6e61 6d65 p ns schema name\n-001a0360: 7370 6163 653a 2075 726e 3a78 6d65 7468 space: urn:xmeth\n-001a0370: 6f64 732d 4375 7272 656e 6379 4578 6368 ods-CurrencyExch\n-001a0380: 616e 6765 203c 2f73 7061 6e3e 3c2f 6469 ange .
    //gso\n-001a03c0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n-001a03d0: 7468 6f64 2d61 6374 696f 6e3a 2067 6574 thod-action: get\n-001a03e0: 5261 7465 2026 7175 6f74 3b26 7175 6f74 Rate ""\n-001a03f0: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
    .\n-001a0400: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-001a0430: 2f73 7061 6e3e 206e 735f 5f67 6574 5261 /span> ns__getRa\n-001a0440: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(cha\n-001a0460: 723c 2f73 7061 6e3e 202a 636f 756e 7472 r *countr\n-001a0470: 7931 2c20 3c73 7061 6e20 636c 6173 733d y1, ch\n-001a0490: 6172 3c2f 7370 616e 3e20 2a63 6f75 6e74 ar *count\n-001a04a0: 7279 322c 203c 7370 616e 2063 6c61 7373 ry2, f\n-001a04c0: 6c6f 6174 3c2f 7370 616e 3e20 2661 6d70 loat &\n-001a04d0: 3b52 6573 756c 7429 3b20 3c2f 6469 763e ;Result);
    \n+0019fe90: 3e7d 203c 7370 616e 2063 6c61 7373 3d22 >} // name\n+0019feb0: 7370 6163 6520 7175 6f74 653c 2f73 7061 space quote
    .
    <\n+0019fed0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0019fee0: 3c70 3e57 6520 7468 656e 2063 6f6d 7069

    We then compi\n+0019fef0: 6c65 2069 7420 6173 2061 206c 6962 7261 le it as a libra\n+0019ff00: 7279 2061 6e64 2077 6520 7573 6520 6f70 ry and we use op\n+0019ff10: 7469 6f6e 203c 623e 3c63 6f64 653e 2d6e tion -n\n+0019ff20: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2070 to p\n+0019ff30: 7265 6669 7820 7468 6520 6765 6e65 7261 refix the genera\n+0019ff40: 7465 6420 6669 6c65 7320 616e 6420 746f ted files and to\n+0019ff50: 2072 656e 616d 6520 7468 6520 6e61 6d65 rename the name\n+0019ff60: 7370 6163 6520 7461 626c 6520 746f 2061 space table to a\n+0019ff70: 766f 6964 206c 696e 6b20 636f 6e66 6c69 void link confli\n+0019ff80: 6374 7320 6c61 7465 723a 203c 2f70 3e3c cts later:

    <\n+0019ff90: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+0019ffa0: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n+0019ffb0: 6e20 7175 6f74 652e 680a 2063 2b2b 202d n quote.h. c++ -\n+0019ffc0: 6320 7175 6f74 6543 6c69 656e 744c 6962 c quoteClientLib\n+0019ffd0: 2e63 7070 0a3c 2f70 7265 3e3c 703e 2049 .cpp.

    I\n+0019ffe0: 6620 796f 7520 646f 6e27 7420 7761 6e74 f you don't want\n+0019fff0: 2074 6f20 7573 6520 6120 432b 2b20 636f to use a C++ co\n+001a0000: 6465 206e 616d 6573 7061 6365 2c20 796f de namespace, yo\n+001a0010: 7520 7368 6f75 6c64 2063 6f6d 7069 6c65 u should compile\n+001a0020: 203c 656d 3e3c 636f 6465 3e71 756f 7465 quote\n+001a0030: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2022 .h \"\n+001a0040: 6173 2069 7322 2077 6974 6820 6f70 7469 as is\" with opti\n+001a0050: 6f6e 203c 623e 3c63 6f64 653e 2d70 7175 on -pqu\n+001a0060: 6f74 653c 2f63 6f64 653e 3c2f 623e 3a20 ote: \n+001a0070: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     soapc\n+001a0090: 7070 3220 2d6e 202d 7071 756f 7465 2071  pp2 -n -pquote q\n+001a00a0: 756f 7465 2e68 0a20 632b 2b20 2d63 2071  uote.h. c++ -c q\n+001a00b0: 756f 7465 436c 6965 6e74 4c69 622e 6370  uoteClientLib.cp\n+001a00c0: 700a 3c2f 7072 653e 3c70 3e20 5468 6972  p.

    Thir\n+001a00d0: 642c 2077 6520 6372 6561 7465 2074 6865 d, we create the\n+001a00e0: 2043 7572 7265 6e63 7920 4578 6368 616e Currency Exchan\n+001a00f0: 6765 2052 6174 6520 6865 6164 6572 2066 ge Rate header f\n+001a0100: 696c 6520 7370 6563 6966 6963 6174 696f ile specificatio\n+001a0110: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n+001a0140: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a0150: 6f72 6422 3e6e 616d 6573 7061 6365 203c ord\">namespace <\n+001a0160: 2f73 7061 6e3e 7261 7465 207b 3c2f 6469 /span>rate {.
    .<\n+001a01a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a01b0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+001a01c0: 7365 7276 6963 6520 6e61 6d65 3a20 5365 service name: Se\n+001a01d0: 7276 6963 6520 3c2f 7370 616e 3e3c 2f64 rvice .
    //gs\n+001a0210: 6f61 7020 6e73 2073 6572 7669 6365 2073 oap ns service s\n+001a0220: 7479 6c65 3a20 7270 6320 3c2f 7370 616e tyle: rpc
    .
    \n+001a0260: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+001a0270: 6365 2065 6e63 6f64 696e 673a 2065 6e63 ce encoding: enc\n+001a0280: 6f64 6564 203c 2f73 7061 6e3e 3c2f 6469 oded .
    //gso\n+001a02c0: 6170 206e 7320 7365 7276 6963 6520 6c6f ap ns service lo\n+001a02d0: 6361 7469 6f6e 3a20 6874 7470 3a2f 2f73 cation: http://s\n+001a02e0: 6572 7669 6365 732e 786d 6574 686f 6473 ervices.xmethods\n+001a02f0: 2e6e 6574 2f73 6f61 7020 3c2f 7370 616e .net/soap
    .
    \n+001a0330: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem\n+001a0340: 6120 6e61 6d65 7370 6163 653a 2075 726e a namespace: urn\n+001a0350: 3a78 6d65 7468 6f64 732d 4375 7272 656e :xmethods-Curren\n+001a0360: 6379 4578 6368 616e 6765 203c 2f73 7061 cyExchange
    .
    //gsoap ns serv\n+001a03b0: 6963 6520 6d65 7468 6f64 2d61 6374 696f ice method-actio\n+001a03c0: 6e3a 2067 6574 5261 7465 2026 7175 6f74 n: getRate "\n+001a03d0: 3b26 7175 6f74 3b20 3c2f 7370 616e 3e3c ;" <\n+001a03e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n+001a0420: 5f67 6574 5261 7465 283c 7370 616e 2063 _getRate(char *\n+001a0450: 636f 756e 7472 7931 2c20 3c73 7061 6e20 country1, char \n+001a0480: 2a63 6f75 6e74 7279 322c 203c 7370 616e *country2, float &Result); \n+001a04c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n 001a04e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    } <\n-001a0510: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001a0520: 656e 7422 3e2f 2f20 6e61 6d65 7370 6163 ent\">// namespac\n-001a0530: 6520 7261 7465 3c2f 7370 616e 3e3c 2f64 e rate.

    Si\n-001a0560: 6d69 6c61 7220 746f 2074 6865 2051 756f milar to the Quo\n-001a0570: 7465 2065 7861 6d70 6c65 2061 626f 7665 te example above\n-001a0580: 2c20 7765 2067 656e 6572 6174 6520 736f , we generate so\n-001a0590: 7572 6365 2063 6f64 6520 7573 696e 6720 urce code using \n-001a05a0: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n-001a05b0: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 746f -n to\n-001a05c0: 2070 7265 6669 7820 7468 6520 6765 6e65 prefix the gene\n-001a05d0: 7261 7465 6420 6669 6c65 7320 616e 6420 rated files and \n-001a05e0: 746f 2072 656e 616d 6520 7468 6520 6e61 to rename the na\n-001a05f0: 6d65 7370 6163 6520 7461 626c 6520 746f mespace table to\n-001a0600: 2061 766f 6964 206c 696e 6b20 636f 6e66 avoid link conf\n-001a0610: 6c69 6374 733a 203c 2f70 3e3c 7072 6520 licts:

     soapcpp2 -n ra\n-001a0640: 7465 2e68 0a3c 2f70 7265 3e3c 703e 2046  te.h.

    F\n-001a0650: 6f75 7274 682c 2077 6520 7573 6520 7468 ourth, we use th\n-001a0660: 6520 6765 6e65 7261 7465 6420 736f 7572 e generated sour\n-001a0670: 6365 2063 6f64 6520 6c69 6272 6172 6965 ce code librarie\n-001a0680: 7320 7769 7468 2074 6865 206d 6169 6e20 s with the main \n-001a0690: 7072 6f67 7261 6d2e 3c2f 703e 0a3c 6469 program.

    .
    \n-001a06e0: 2369 6e63 6c75 6465 2026 7175 6f74 3b71 #include "q\n-001a06f0: 756f 7465 482e 682e 6826 7175 6f74 3b3c uoteH.h.h"<\n-001a0700: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001a0720: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001a0730: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001a0740: 6465 2026 7175 6f74 3b72 6174 6548 2e68 de "rateH.h\n-001a0750: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n-001a0760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo\n-001a07a0: 743b 7175 6f74 652e 6e73 6d61 7026 7175 t;quote.nsmap&qu\n-001a07b0: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n-001a07c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n-001a07f0: 6e63 6c75 6465 2026 7175 6f74 3b72 6174 nclude "rat\n-001a0800: 652e 6e73 6d61 7026 7175 6f74 3b3c 2f73 e.nsmap"
    .
    .
    int main\n-001a0870: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int argc, char *argv[]) } // na\n+001a0510: 6d65 7370 6163 6520 7261 7465 3c2f 7370 mespace rate
    .
    \n+001a0530: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Compi\n-001a15c0: 6c65 2061 6e64 206c 696e 6b20 7468 6973 le and link this\n-001a15d0: 2061 7070 6c69 6361 7469 6f6e 2077 6974 application wit\n-001a15e0: 6820 3c65 6d3e 3c63 6f64 653e 7374 6473 h stds\n-001a15f0: 6f61 7032 2e6f 3c2f 636f 6465 3e3c 2f65 oap2.o, en\n-001a1610: 7643 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e vC.o\n-001a1620: 2c20 3c65 6d3e 3c63 6f64 653e 7175 6f74 , quot\n-001a1630: 6553 6572 7665 7250 726f 7879 2e6f 3c2f eServerProxy.o, and \n-001a1650: 3c65 6d3e 3c63 6f64 653e 7261 7465 5365 rateSe\n-001a1660: 7276 6572 5072 6f78 792e 6f3c 2f63 6f64 rverProxy.o.

    .

    \n-001a1680: 496e 7374 6561 6420 6f66 2074 6865 2067 Instead of the g\n-001a1690: 656e 6572 6174 6564 203c 636f 6465 3e73 enerated s\n-001a16a0: 6f61 705f 6361 6c6c 5f77 6562 6d65 7468 oap_call_webmeth\n-001a16b0: 6f64 3c2f 636f 6465 3e20 7374 7562 2066 od stub f\n-001a16c0: 756e 6374 696f 6e73 2079 6f75 2063 616e unctions you can\n-001a16d0: 2061 6c73 6f20 7573 6520 3c62 3e3c 636f also use soapcpp2 -j option\n-001a1700: 203c 623e 3c63 6f64 653e 2d6a 3c2f 636f -j or optio\n-001a1720: 6e20 3c62 3e3c 636f 6465 3e2d 693c 2f63 n -i to gene\n-001a1740: 7261 7465 2043 2b2b 2070 726f 7879 2063 rate C++ proxy c\n-001a1750: 6c61 7373 6573 2e3c 2f70 3e0a 3c70 3e54 lasses.

    .

    T\n-001a1760: 6f20 636f 6d70 696c 6520 7365 7276 6572 o compile server\n-001a1770: 2069 7320 7665 7279 2073 696d 696c 6172 is very similar\n-001a1780: 2e20 466f 7220 6578 616d 706c 652c 2061 . For example, a\n-001a1790: 7373 756d 6520 7468 6174 2077 6520 6e65 ssume that we ne\n-001a17a0: 6564 2074 6f20 696d 706c 656d 656e 7420 ed to implement \n-001a17b0: 6120 6361 6c63 756c 6174 6f72 2073 6572 a calculator ser\n-001a17c0: 7669 6365 2061 6e64 2077 6520 7761 6e74 vice and we want\n-001a17d0: 2074 6f20 6372 6561 7465 2061 206c 6962 to create a lib\n-001a17e0: 7261 7279 2066 6f72 2069 742e 3c2f 703e rary for it.

    \n-001a17f0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    n\n-001a1830: 616d 6573 7061 6365 203c 2f73 7061 6e3e amespace \n-001a1840: 6361 6c63 207b 3c2f 6469 763e 0a3c 6469 calc {
    . \n-001a1860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-001a1890: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-001a18a0: 6520 6e61 6d65 3a20 4361 6c63 203c 2f73 e name: Calc
    .
    //gsoap ns se\n-001a18f0: 7276 6963 6520 7374 796c 653a 2072 7063 rvice style: rpc\n-001a1900: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001a1910: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a1920: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-001a1940: 7320 7365 7276 6963 6520 656e 636f 6469 s service encodi\n-001a1950: 6e67 3a20 656e 636f 6465 6420 3c2f 7370 ng: encoded
    .
    //gsoap ns ser\n-001a19a0: 7669 6365 206c 6f63 6174 696f 6e3a 2068 vice location: h\n-001a19b0: 7474 703a 2f2f 7777 772e 6373 2e66 7375 ttp://www.cs.fsu\n-001a19c0: 2e65 6475 2f7e 656e 6765 6c65 6e2f 6361 .edu/~engelen/ca\n-001a19d0: 6c63 2e63 6769 203c 2f73 7061 6e3e 3c2f lc.cgi .
    //g\n-001a1a10: 736f 6170 206e 7320 7363 6865 6d61 206e soap ns schema n\n-001a1a20: 616d 6573 7061 6365 3a20 7572 6e3a 6361 amespace: urn:ca\n-001a1a30: 6c63 203c 2f73 7061 6e3e 3c2f 6469 763e lc
    \n-001a1a40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001a1a70: 3c2f 7370 616e 3e20 6e73 5f5f 6164 6428 ns__add(\n-001a1a80: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a1aa0: 3c2f 7370 616e 3e20 612c 203c 7370 616e a, double b, \n-001a1af0: 646f 7562 6c65 3c2f 7370 616e 3e20 2661 double &a\n-001a1b00: 6d70 3b72 6573 756c 7429 3b20 3c2f 6469 mp;result); .
    i\n-001a1b40: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7375 nt ns__su\n-001a1b50: 6228 3c73 7061 6e20 636c 6173 733d 226b b(doub\n-001a1b70: 6c65 3c2f 7370 616e 3e20 612c 203c 7370 le a, double b, double \n-001a1bd0: 2661 6d70 3b72 6573 756c 7429 3b20 3c2f &result); .
    int ns__\n-001a1c20: 6d75 6c28 3c73 7061 6e20 636c 6173 733d mul(do\n-001a1c40: 7562 6c65 3c2f 7370 616e 3e20 612c 203c uble a, <\n-001a1c50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a1c60: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n-001a1c70: 2f73 7061 6e3e 2062 2c20 3c73 7061 6e20 /span> b, double &result); \n-001a1cb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n-001a1cf0: 5f5f 6469 7628 3c73 7061 6e20 636c 6173 __div(\n-001a1d10: 646f 7562 6c65 3c2f 7370 616e 3e20 612c double a,\n-001a1d20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl\n-001a1d40: 653c 2f73 7061 6e3e 2062 2c20 3c73 7061 e b, double &result)\n-001a1d80: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .
    } // \n-001a1dd0: 6e61 6d65 7370 6163 6520 6361 6c63 3c2f namespace calc
    .

    We generat\n-001a1e10: 6520 636f 6465 3a20 3c2f 703e 3c70 7265 e code:

    soapcpp2 -j -\n-001a1e40: 6e20 6361 6c63 2e68 0a3c 2f70 7265 3e3c n calc.h.
    <\n-001a1e50: 703e 2048 6572 6520 7765 2075 7365 6420 p> Here we used \n-001a1e60: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n-001a1e70: 2d6a 3c2f 636f 6465 3e3c 2f62 3e20 746f -j to\n-001a1e80: 2067 656e 6572 6174 6520 6120 432b 2b20 generate a C++ \n-001a1e90: 7365 7276 6963 6520 636c 6173 7320 3c65 service class calcCalc\n-001a1eb0: 5365 7276 6963 652e 683c 2f63 6f64 653e Service.h\n-001a1ec0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and calcCalcServ\n-001a1ee0: 6963 652e 6370 703c 2f63 6f64 653e 3c2f ice.cpp. The effect \n-001a1f00: 6f66 2074 6865 203c 623e 3c63 6f64 653e of the \n-001a1f10: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -n op\n-001a1f20: 7469 6f6e 2069 7320 7468 6174 2069 7420 tion is that it \n-001a1f30: 6372 6561 7465 7320 6c6f 6361 6c20 6e61 creates local na\n-001a1f40: 6d65 7370 6163 6520 7461 626c 6573 2061 mespace tables a\n-001a1f50: 6e64 2075 7365 7320 3c65 6d3e 3c63 6f64 nd uses calc to prefix the\n-001a1f80: 2067 656e 6572 6174 6564 2066 696c 6573 generated files\n-001a1f90: 2e3c 2f70 3e0a 3c64 6976 2063 6c61 7373 .

    .
    #includ\n-001a1fe0: 6520 2671 756f 743b 6361 6c63 4361 6c63 e "calcCalc\n-001a1ff0: 5365 7276 6963 652e 6826 7175 6f74 3b3c Service.h"<\n-001a2000: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001a2020: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001a2030: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001a2040: 6465 2026 7175 6f74 3b63 616c 632e 6e73 de "calc.ns\n-001a2050: 6d61 7026 7175 6f74 3b3c 2f73 7061 6e3e map"\n+001a08e0: 6e65 223e 2020 3c73 7061 6e20 636c 6173 ne\"> \n+001a0900: 6966 3c2f 7370 616e 3e20 2861 7267 6320 if (argc \n+001a0910: 266c 743b 3d20 3129 203c 2f64 6976 3e0a <= 1)
    .\n+001a0920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+001a0950: 2020 7374 643a 3a63 6572 7220 266c 743b std::cerr <\n+001a0960: 266c 743b 203c 7370 616e 2063 6c61 7373 < "Usage: ma\n+001a0990: 696e 2074 6963 6b65 7220 5b63 7572 7265 in ticker [curre\n+001a09a0: 6e63 795d 2671 756f 743b 3c2f 7370 616e ncy]" << std::\n+001a09c0: 656e 646c 203c 2f64 6976 3e0a 3c64 6976 endl
    . \n+001a09e0: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL\n+001a09f0: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . \n+001a0a10: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    ..\n+001a0b20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    fl\n+001a0b50: 6f61 743c 2f73 7061 6e3e 2071 3b20 3c2f oat q; ...
    }.
    else <\n+001a0e30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    if (arg\n+001a0e90: 6320 2667 743b 2032 2920 3c2f 6469 763e c > 2)
    \n+001a0ea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n+001a0ec0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a0ed0: 3e20 2020 2020 203c 7370 616e 2063 6c61 > float r;\n+001a0f00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001a0f20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_\n+001a0f80: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(<\n+001a0f90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a0fa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a0fb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001a0fc0: 7261 7465 5f6e 616d 6573 7061 6365 7329 rate_namespaces)\n+001a0fd0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+001a0ff0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_call_\n+001a1020: 6e73 5f5f 6765 7452 6174 6528 3c61 2063 ns__getRate(soap, NUL\n+001a1060: 4c2c 204e 554c 4c2c 203c 7370 616e 2063 L, NULL, "us&qu\n+001a1090: 6f74 3b3c 2f73 7061 6e3e 2c20 6172 6776 ot;, argv\n+001a10a0: 5b32 5d2c 2072 2929 203c 7370 616e 2063 [2], r)) /\n+001a10c0: 2f20 6765 7420 7261 7465 2069 6e20 5553 / get rate in US\n+001a10d0: 2064 6f6c 6c61 7273 203c 2f73 7061 6e3e dollars \n+001a10e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a1100: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+001a1160: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+001a1190: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n+001a11a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+001a11c0: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+001a11e0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+001a11f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a1200: 3e20 2020 2020 2020 2071 202a 3d20 723b > q *= r;\n+001a1210: 203c 7370 616e 2063 6c61 7373 3d22 636f // conver\n+001a1230: 7420 7468 6520 7175 6f74 6520 3c2f 7370 t the quote
    .
    \n+001a1260: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    s\n+001a1280: 7464 3a3a 636f 7574 2026 6c74 3b26 6c74 td::cout <<\n+001a1290: 3b20 6172 6776 5b31 5d20 266c 743b 266c ; argv[1] <&l\n+001a12a0: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; &\n+001a12c0: 7175 6f74 3b3a 2026 7175 6f74 3b3c 2f73 quot;: " << q \n+001a12e0: 266c 743b 266c 743b 2073 7464 3a3a 656e << std::en\n+001a12f0: 646c 3b20 3c2f 6469 763e 0a3c 6469 7620 dl;
    .
    }\n+001a1310: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    soap_end(\n+001a1440: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001a1470: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_free(<\n+001a14f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a1500: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a1510: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001a1520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return 0;
    .}\n+001a1580: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Compile and lin\n+001a15b0: 6b20 7468 6973 2061 7070 6c69 6361 7469 k this applicati\n+001a15c0: 6f6e 2077 6974 6820 3c65 6d3e 3c63 6f64 on with stdsoap2.o, envC.o, quoteServerPro\n+001a1620: 7879 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e xy.o\n+001a1630: 2c20 616e 6420 3c65 6d3e 3c63 6f64 653e , and \n+001a1640: 7261 7465 5365 7276 6572 5072 6f78 792e rateServerProxy.\n+001a1650: 6f3c 2f63 6f64 653e 3c2f 656d 3e2e 3c2f o..

    Instead of\n+001a1670: 2074 6865 2067 656e 6572 6174 6564 203c the generated <\n+001a1680: 636f 6465 3e73 6f61 705f 6361 6c6c 5f77 code>soap_call_w\n+001a1690: 6562 6d65 7468 6f64 3c2f 636f 6465 3e20 ebmethod \n+001a16a0: 7374 7562 2066 756e 6374 696f 6e73 2079 stub functions y\n+001a16b0: 6f75 2063 616e 2061 6c73 6f20 7573 6520 ou can also use \n+001a16c0: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp\n+001a16d0: 3220 2d6a 3c2f 636f 6465 3e3c 2f62 3e20 2 -j \n+001a16e0: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+001a16f0: 2d6a 3c2f 636f 6465 3e3c 2f62 3e20 6f72 -j or\n+001a1700: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -i t\n+001a1720: 6f20 6765 6e65 7261 7465 2043 2b2b 2070 o generate C++ p\n+001a1730: 726f 7879 2063 6c61 7373 6573 2e3c 2f70 roxy classes..

    To compile \n+001a1750: 7365 7276 6572 2069 7320 7665 7279 2073 server is very s\n+001a1760: 696d 696c 6172 2e20 466f 7220 6578 616d imilar. For exam\n+001a1770: 706c 652c 2061 7373 756d 6520 7468 6174 ple, assume that\n+001a1780: 2077 6520 6e65 6564 2074 6f20 696d 706c we need to impl\n+001a1790: 656d 656e 7420 6120 6361 6c63 756c 6174 ement a calculat\n+001a17a0: 6f72 2073 6572 7669 6365 2061 6e64 2077 or service and w\n+001a17b0: 6520 7761 6e74 2074 6f20 6372 6561 7465 e want to create\n+001a17c0: 2061 206c 6962 7261 7279 2066 6f72 2069 a library for i\n+001a17d0: 742e 3c2f 703e 0a3c 6469 7620 636c 6173 t.

    .
    <\n+001a1800: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a1810: 6f72 6422 3e6e 616d 6573 7061 6365 203c ord\">namespace <\n+001a1820: 2f73 7061 6e3e 6361 6c63 207b 3c2f 6469 /span>calc {.
    .<\n+001a1860: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a1870: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+001a1880: 7365 7276 6963 6520 6e61 6d65 3a20 4361 service name: Ca\n+001a1890: 6c63 203c 2f73 7061 6e3e 3c2f 6469 763e lc
    \n+001a18a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+001a18d0: 206e 7320 7365 7276 6963 6520 7374 796c ns service styl\n+001a18e0: 653a 2072 7063 203c 2f73 7061 6e3e 3c2f e: rpc .
    //g\n+001a1920: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+001a1930: 656e 636f 6469 6e67 3a20 656e 636f 6465 encoding: encode\n+001a1940: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n+001a1950: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+001a1980: 6e73 2073 6572 7669 6365 206c 6f63 6174 ns service locat\n+001a1990: 696f 6e3a 2068 7474 703a 2f2f 7777 772e ion: http://www.\n+001a19a0: 6373 2e66 7375 2e65 6475 2f7e 656e 6765 cs.fsu.edu/~enge\n+001a19b0: 6c65 6e2f 6361 6c63 2e63 6769 203c 2f73 len/calc.cgi
    .
    //gsoap ns sc\n+001a1a00: 6865 6d61 206e 616d 6573 7061 6365 3a20 hema namespace: \n+001a1a10: 7572 6e3a 6361 6c63 203c 2f73 7061 6e3e urn:calc \n+001a1a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n+001a1a60: 5f5f 6164 6428 3c73 7061 6e20 636c 6173 __add(\n+001a1a80: 646f 7562 6c65 3c2f 7370 616e 3e20 612c double a,\n+001a1a90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl\n+001a1ab0: 653c 2f73 7061 6e3e 2062 2c20 3c73 7061 e b, double &result)\n+001a1af0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    int \n+001a1b30: 6e73 5f5f 7375 6228 3c73 7061 6e20 636c ns__sub(double \n+001a1b60: 612c 203c 7370 616e 2063 6c61 7373 3d22 a, dou\n+001a1b80: 626c 653c 2f73 7061 6e3e 2062 2c20 3c73 ble b, double &resul\n+001a1bc0: 7429 3b20 3c2f 6469 763e 0a3c 6469 7620 t);
    .
    int ns__mul(double a, d\n+001a1c50: 6f75 626c 653c 2f73 7061 6e3e 2062 2c20 ouble b, \n+001a1c60: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n+001a1c80: 3c2f 7370 616e 3e20 2661 6d70 3b72 6573 &res\n+001a1c90: 756c 7429 3b20 3c2f 6469 763e 0a3c 6469 ult);
    .<\n+001a1cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a1cc0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__div(double a, double b\n+001a1d30: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub\n+001a1d50: 6c65 3c2f 7370 616e 3e20 2661 6d70 3b72 le &r\n+001a1d60: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .<\n+001a1d70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a1d80: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    } // namespace \n+001a1dc0: 6361 6c63 3c2f 7370 616e 3e3c 2f64 6976 calc.

    We g\n+001a1df0: 656e 6572 6174 6520 636f 6465 3a20 3c2f enerate code:

     soapcpp\n+001a1e20: 3220 2d6a 202d 6e20 6361 6c63 2e68 0a3c  2 -j -n calc.h.<\n+001a1e30: 2f70 7265 3e3c 703e 2048 6572 6520 7765  /pre>

    Here we\n+001a1e40: 2075 7365 6420 6f70 7469 6f6e 203c 623e used option \n+001a1e50: 3c63 6f64 653e 2d6a 3c2f 636f 6465 3e3c -j<\n+001a1e60: 2f62 3e20 746f 2067 656e 6572 6174 6520 /b> to generate \n+001a1e70: 6120 432b 2b20 7365 7276 6963 6520 636c a C++ service cl\n+001a1e80: 6173 7320 3c65 6d3e 3c63 6f64 653e 6361 ass ca\n+001a1e90: 6c63 4361 6c63 5365 7276 6963 652e 683c lcCalcService.h<\n+001a1ea0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+001a1eb0: 3c65 6d3e 3c63 6f64 653e 6361 6c63 4361 calcCa\n+001a1ec0: 6c63 5365 7276 6963 652e 6370 703c 2f63 lcService.cpp. The e\n+001a1ee0: 6666 6563 7420 6f66 2074 6865 203c 623e ffect of the \n+001a1ef0: 3c63 6f64 653e 2d6e 3c2f 636f 6465 3e3c -n<\n+001a1f00: 2f62 3e20 6f70 7469 6f6e 2069 7320 7468 /b> option is th\n+001a1f10: 6174 2069 7420 6372 6561 7465 7320 6c6f at it creates lo\n+001a1f20: 6361 6c20 6e61 6d65 7370 6163 6520 7461 cal namespace ta\n+001a1f30: 626c 6573 2061 6e64 2075 7365 7320 3c65 bles and uses calc to pref\n+001a1f60: 6978 2074 6865 2067 656e 6572 6174 6564 ix the generated\n+001a1f70: 2066 696c 6573 2e3c 2f70 3e0a 3c64 6976 files.

    .
    #\n+001a1fc0: 696e 636c 7564 6520 2671 756f 743b 6361 include "ca\n+001a1fd0: 6c63 4361 6c63 5365 7276 6963 652e 6826 lcCalcService.h&\n+001a1fe0: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    \n+001a2020: 2369 6e63 6c75 6465 2026 7175 6f74 3b63 #include "c\n+001a2030: 616c 632e 6e73 6d61 7026 7175 6f74 3b3c alc.nsmap"<\n+001a2040: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n 001a2060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a2080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001a20b0: 3c2f 7370 616e 3e20 6d61 696e 2829 3c2f main()int ma\n+001a20a0: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
    .
    {.
    {
    .<\n-001a20e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a20f0: 3e20 2063 616c 633a 3a43 616c 6320 6361 > calc::Calc ca\n-001a2100: 6c63 3b20 3c2f 6469 763e 0a3c 6469 7620 lc;
    .
    .\n-001a2120: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
    .
    cal\n-001a2160: 632e 7365 7276 6528 293b 203c 7370 616e c.serve(); // calls reques\n-001a2190: 7420 6469 7370 6174 6368 6572 2074 6f20 t dispatcher to \n-001a21a0: 696e 766f 6b65 206f 6e65 206f 6620 7468 invoke one of th\n-001a21b0: 6520 6675 6e63 7469 6f6e 7320 6265 6c6f e functions belo\n-001a21c0: 7720 3c2f 7370 616e 3e3c 2f64 6976 3e0a w
    .\n-001a21d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-001a2200: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . calc::C\n+001a20e0: 616c 6320 6361 6c63 3b20 3c2f 6469 763e alc calc;
    \n+001a20f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n+001a2120: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n+001a2130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a2140: 3e20 2063 616c 632e 7365 7276 6528 293b > calc.serve();\n+001a2150: 203c 7370 616e 2063 6c61 7373 3d22 636f // calls \n+001a2170: 7265 7175 6573 7420 6469 7370 6174 6368 request dispatch\n+001a2180: 6572 2074 6f20 696e 766f 6b65 206f 6e65 er to invoke one\n+001a2190: 206f 6620 7468 6520 6675 6e63 7469 6f6e of the function\n+001a21a0: 7320 6265 6c6f 7720 3c2f 7370 616e 3e3c s below <\n+001a21b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    }
    .\n-001a2220: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    .
    in\n-001a2270: 743c 2f73 7061 6e3e 2063 616c 633a 3a43 t calc::C\n-001a2280: 616c 633a 3a61 6464 283c 7370 616e 2063 alc::add(double\n-001a22b0: 2061 2c20 3c73 7061 6e20 636c 6173 733d a, do\n-001a22d0: 7562 6c65 3c2f 7370 616e 3e20 622c 203c uble b, <\n-001a22e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a22f0: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n-001a2300: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu\n-001a2310: 6c74 293c 2f64 6976 3e0a 3c64 6976 2063 lt)
    .
    {.
    result =\n-001a2350: 2061 202b 2062 3b3c 2f64 6976 3e0a 3c64 a + b;
    .\n-001a2370: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-001a2390: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-001a23f0: 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 763e AP_OK;
    \n-001a2400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n-001a2430: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int cal\n-001a2470: 633a 3a43 616c 633a 3a73 7562 283c 7370 c::Calc::sub(double a, double \n-001a24d0: 622c 203c 7370 616e 2063 6c61 7373 3d22 b, dou\n-001a24f0: 626c 653c 2f73 7061 6e3e 2026 616d 703b ble &\n-001a2500: 7265 7375 6c74 293c 2f64 6976 3e0a 3c64 result)
    ..
    int c\n+001a2260: 616c 633a 3a43 616c 633a 3a61 6464 283c alc::Calc::add(<\n+001a2270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a2280: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n+001a2290: 2f73 7061 6e3e 2061 2c20 3c73 7061 6e20 /span> a, double b, d\n+001a22e0: 6f75 626c 653c 2f73 7061 6e3e 2026 616d ouble &am\n+001a22f0: 703b 7265 7375 6c74 293c 2f64 6976 3e0a p;result)
    .\n+001a2300: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    re\n+001a2330: 7375 6c74 203d 2061 202b 2062 3b3c 2f64 sult = a + b;.
    return \n+001a2380: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n+001a23e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    .int calc::Calc::s\n+001a2460: 7562 283c 7370 616e 2063 6c61 7373 3d22 ub(dou\n+001a2480: 626c 653c 2f73 7061 6e3e 2061 2c20 3c73 ble a, double b, double\n+001a24e0: 2026 616d 703b 7265 7375 6c74 293c 2f64 &result).
    {
    .\n-001a2520: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    resu\n-001a2540: 6c74 203d 2061 202d 2062 3b3c 2f64 6976 lt = a - b;.
    \n-001a2580: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK;.
    }
    .\n+001a2520: 2020 7265 7375 6c74 203d 2061 202d 2062 result = a - b\n+001a2530: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    ...
    .
    .\n-001a2830: 3c73 7061 6e20 636c 6173 733d 226b 6579 int calc::Calc:\n-001a2860: 3a64 6976 283c 7370 616e 2063 6c61 7373 :div(d\n-001a2880: 6f75 626c 653c 2f73 7061 6e3e 2061 2c20 ouble a, \n-001a2890: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a28b0: 3c2f 7370 616e 3e20 622c 203c 7370 616e b, double &result)<\n+001a2810: 6c69 6e65 223e 3c73 7061 6e20 636c 6173 line\">\n+001a2830: 696e 743c 2f73 7061 6e3e 2063 616c 633a int calc:\n+001a2840: 3a43 616c 633a 3a64 6976 283c 7370 616e :Calc::div(double a, \n+001a2890: 646f 7562 6c65 3c2f 7370 616e 3e20 622c double b,\n+001a28a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl\n+001a28c0: 653c 2f73 7061 6e3e 2026 616d 703b 7265 e &re\n+001a28d0: 7375 6c74 293c 2f64 6976 3e0a 3c64 6976 sult)
    .{<\n 001a28f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001a2910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    result = a /\n-001a2930: 2062 3b3c 2f64 6976 3e0a 3c64 6976 2063 b;
    ..}\n-001a29f0: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
    .
    <\n-001a2a10: 703e 5468 6520 6578 616d 706c 6520 6162 p>The example ab\n-001a2a20: 6f76 6520 7365 7276 6573 2072 6571 7565 ove serves reque\n-001a2a30: 7374 7320 6f76 6572 2073 7464 696e 2f6f sts over stdin/o\n-001a2a40: 7574 2e20 5573 6520 7468 6520 6269 6e64 ut. Use the bind\n-001a2a50: 2061 6e64 2061 6363 6570 7420 6361 6c6c and accept call\n-001a2a60: 7320 746f 2063 7265 6174 6520 6120 7374 s to create a st\n-001a2a70: 616e 642d 616c 6f6e 6520 7365 7276 6572 and-alone server\n-001a2a80: 2074 6f20 7365 7276 6963 6520 696e 626f to service inbo\n-001a2a90: 756e 6420 7265 7175 6573 7473 206f 7665 und requests ove\n-001a2aa0: 7220 736f 636b 6574 732c 2073 6565 2053 r sockets, see S\n-001a2ab0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection How to create\n-001a2af0: 2061 2073 7461 6e64 2d61 6c6f 6e65 2073 a stand-alone s\n-001a2b00: 6572 7665 723c 2f61 3e20 2e3c 2f70 3e0a erver .

    .\n-001a2b10: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n-001a2b30: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .\n-001a2b70: 4320 6578 616d 706c 6573 3c2f 6833 3e0a C examples

    .\n-001a2b80: 3c70 3e54 6869 7320 6973 2074 6865 2073

    This is the s\n-001a2b90: 616d 6520 6578 616d 706c 6520 6173 2061 ame example as a\n-001a2ba0: 626f 7665 2c20 6275 7420 7468 6520 636c bove, but the cl\n-001a2bb0: 6965 6e74 7320 6172 6520 6275 696c 6420 ients are build \n-001a2bc0: 696e 2043 2e3c 2f70 3e0a 3c70 3e57 6520 in C.

    .

    We \n-001a2bd0: 6372 6561 7465 2061 203c 656d 3e3c 636f create a env.h<\n-001a2bf0: 2f65 6d3e 2074 6861 7420 636f 6e74 6169 /em> that contai\n-001a2c00: 6e73 2074 6865 206a 6f69 6e74 2053 4f41 ns the joint SOA\n-001a2c10: 5020 4865 6164 6572 2061 6e64 2053 4f41 P Header and SOA\n-001a2c20: 5020 4661 756c 7420 6465 6669 6e69 7469 P Fault definiti\n-001a2c30: 6f6e 732e 2059 6f75 206d 6179 2068 6176 ons. You may hav\n-001a2c40: 6520 746f 2063 6f70 792d 7061 7374 6520 e to copy-paste \n-001a2c50: 7468 6573 6520 6672 6f6d 2074 6865 206f these from the o\n-001a2c60: 7468 6572 2068 6561 6465 7220 6669 6c65 ther header file\n-001a2c70: 732e 2054 6865 6e2c 2063 6f6d 7069 6c65 s. Then, compile\n-001a2c80: 2069 7420 6173 2066 6f6c 6c6f 7773 3a20 it as follows: \n-001a2c90: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     soapc\n-001a2cb0: 7070 3220 2d63 202d 7065 6e76 2065 6e76  pp2 -c -penv env\n-001a2cc0: 2e68 0a20 6363 202d 6320 656e 7643 2e63  .h. cc -c envC.c\n-001a2cd0: 0a3c 2f70 7265 3e3c 703e 2057 6520 616c  .

    We al\n-001a2ce0: 736f 2063 6f6d 7069 6c65 203c 656d 3e3c so compile <\n-001a2cf0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-001a2d00: 6170 322e 633c 2f63 6f64 653e 3c2f 656d ap2.c without namesp\n-001a2d20: 6163 6573 3a20 3c2f 703e 3c70 7265 2063 aces:

    \n-001a2d40: 2063 6320 2d63 202d 4457 4954 485f 4e4f   cc -c -DWITH_NO\n-001a2d50: 4e41 4d45 5350 4143 4553 2073 7464 736f  NAMESPACES stdso\n-001a2d60: 6170 322e 630a 3c2f 7072 653e 3c70 3e20  ap2.c.

    \n-001a2d70: 5365 636f 6e64 2c20 7765 2063 7265 6174 Second, we creat\n-001a2d80: 6520 7468 6520 4465 6c61 7965 6420 5374 e the Delayed St\n-001a2d90: 6f63 6b20 5175 6f74 6520 6865 6164 6572 ock Quote header\n-001a2da0: 2066 696c 6520 7370 6563 6966 6963 6174 file specificat\n-001a2db0: 696f 6e2c 2077 6869 6368 206d 6179 2062 ion, which may b\n-001a2dc0: 6520 6f62 7461 696e 6564 2075 7369 6e67 e obtained using\n-001a2dd0: 2074 6865 2057 5344 4c20 696d 706f 7274 the WSDL import\n-001a2de0: 6572 2e3c 2f70 3e0a 3c64 6976 2063 6c61 er.

    .
    \n-001a2e10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001a2e30: 2073 6572 7669 6365 206e 616d 653a 2053 service name: S\n-001a2e40: 6572 7669 6365 203c 2f73 7061 6e3e 3c2f ervice .
    //g\n-001a2e80: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-001a2e90: 7374 796c 653a 2072 7063 203c 2f73 7061 style: rpc
    .
    //gsoap ns serv\n-001a2ee0: 6963 6520 656e 636f 6469 6e67 3a20 656e ice encoding: en\n-001a2ef0: 636f 6465 6420 3c2f 7370 616e 3e3c 2f64 coded .
    //gs\n-001a2f30: 6f61 7020 6e73 2073 6572 7669 6365 206c oap ns service l\n-001a2f40: 6f63 6174 696f 6e3a 2068 7474 703a 2f2f ocation: http://\n-001a2f50: 7365 7276 6963 6573 2e78 6d65 7468 6f64 services.xmethod\n-001a2f60: 732e 6e65 742f 736f 6170 203c 2f73 7061 s.net/soap
    .
    //gsoap ns sche\n-001a2fb0: 6d61 206e 616d 6573 7061 6365 3a20 7572 ma namespace: ur\n-001a2fc0: 6e3a 786d 6574 686f 6473 2d64 656c 6179 n:xmethods-delay\n-001a2fd0: 6564 2d71 756f 7465 7320 3c2f 7370 616e ed-quotes
    .
    \n-001a3010: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-001a3020: 6365 206d 6574 686f 642d 6163 7469 6f6e ce method-action\n-001a3030: 3a20 6765 7451 756f 7465 2026 7175 6f74 : getQuote "\n-001a3040: 3b26 7175 6f74 3b20 3c2f 7370 616e 3e3c ;" <\n-001a3050: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n-001a3090: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(char \n-001a30c0: 2a73 796d 626f 6c2c 203c 7370 616e 2063 *symbol, float \n-001a30f0: 2a52 6573 756c 7429 3b3c 2f64 6976 3e0a *Result);
    .\n-001a3100: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    We com\n-001a3120: 7069 6c65 2069 7420 6173 2061 206c 6962 pile it as a lib\n-001a3130: 7261 7279 2061 6e64 2077 6520 7573 6520 rary and we use \n-001a3140: 6f70 7469 6f6e 7320 3c62 3e3c 636f 6465 options -n a\n-001a3160: 6e64 203c 623e 3c63 6f64 653e 2d70 7175 nd -pqu\n-001a3170: 6f74 653c 2f63 6f64 653e 3c2f 623e 2074 ote t\n-001a3180: 6f20 7072 6566 6978 2074 6865 2067 656e o prefix the gen\n-001a3190: 6572 6174 6564 2066 696c 6573 2061 6e64 erated files and\n-001a31a0: 2074 6f20 7265 6e61 6d65 2074 6865 206e to rename the n\n-001a31b0: 616d 6573 7061 6365 2074 6162 6c65 2074 amespace table t\n-001a31c0: 6f20 6176 6f69 6420 6c69 6e6b 2063 6f6e o avoid link con\n-001a31d0: 666c 6963 7473 3a20 3c2f 703e 3c70 7265 flicts:

    soapcpp2 -c -\n-001a3200: 6e20 2d70 7175 6f74 6520 7175 6f74 652e n -pquote quote.\n-001a3210: 680a 2063 6320 2d63 2071 756f 7465 436c h. cc -c quoteCl\n-001a3220: 6965 6e74 4c69 622e 630a 3c2f 7072 653e ientLib.c.\n-001a3230: 3c70 3e20 5468 6972 642c 2077 6520 6372

    Third, we cr\n-001a3240: 6561 7465 2074 6865 2043 7572 7265 6e63 eate the Currenc\n-001a3250: 7920 4578 6368 616e 6765 2052 6174 6520 y Exchange Rate \n-001a3260: 6865 6164 6572 2066 696c 6520 7370 6563 header file spec\n-001a3270: 6966 6963 6174 696f 6e3a 3c2f 703e 0a3c ification:

    .<\n-001a3280: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-001a3290: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    //g\n-001a32c0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-001a32d0: 6e61 6d65 3a20 5365 7276 6963 6520 3c2f name: Service
    .//gsoap ns s\n-001a3320: 6572 7669 6365 2073 7479 6c65 3a20 7270 ervice style: rp\n-001a3330: 6320 3c2f 7370 616e 3e3c 2f64 6976 3e0a c
    .\n-001a3340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-001a3370: 6e73 2073 6572 7669 6365 2065 6e63 6f64 ns service encod\n-001a3380: 696e 673a 2065 6e63 6f64 6564 203c 2f73 ing: encoded
    .
    //gsoap ns se\n-001a33d0: 7276 6963 6520 6c6f 6361 7469 6f6e 3a20 rvice location: \n-001a33e0: 6874 7470 3a2f 2f73 6572 7669 6365 732e http://services.\n-001a33f0: 786d 6574 686f 6473 2e6e 6574 2f73 6f61 xmethods.net/soa\n-001a3400: 7020 3c2f 7370 616e 3e3c 2f64 6976 3e0a p
    .\n-001a3410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-001a3440: 6e73 2073 6368 656d 6120 6e61 6d65 7370 ns schema namesp\n-001a3450: 6163 653a 2075 726e 3a78 6d65 7468 6f64 ace: urn:xmethod\n-001a3460: 732d 4375 7272 656e 6379 4578 6368 616e s-CurrencyExchan\n-001a3470: 6765 203c 2f73 7061 6e3e 3c2f 6469 763e ge
    \n-001a3480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-001a34b0: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n-001a34c0: 6f64 2d61 6374 696f 6e3a 2067 6574 5261 od-action: getRa\n-001a34d0: 7465 2026 7175 6f74 3b26 7175 6f74 3b20 te "" \n-001a34e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a3500: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__getRate\n-001a3530: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n-001a3550: 2f73 7061 6e3e 202a 636f 756e 7472 7931 /span> *country1\n-001a3560: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n-001a3580: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country\n-001a3590: 322c 203c 7370 616e 2063 6c61 7373 3d22 2, flo\n-001a35b0: 6174 3c2f 7370 616e 3e20 2a52 6573 756c at *Resul\n-001a35c0: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
    .
    \n-001a35d0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The exam\n+001a2a00: 706c 6520 6162 6f76 6520 7365 7276 6573 ple above serves\n+001a2a10: 2072 6571 7565 7374 7320 6f76 6572 2073 requests over s\n+001a2a20: 7464 696e 2f6f 7574 2e20 5573 6520 7468 tdin/out. Use th\n+001a2a30: 6520 6269 6e64 2061 6e64 2061 6363 6570 e bind and accep\n+001a2a40: 7420 6361 6c6c 7320 746f 2063 7265 6174 t calls to creat\n+001a2a50: 6520 6120 7374 616e 642d 616c 6f6e 6520 e a stand-alone \n+001a2a60: 7365 7276 6572 2074 6f20 7365 7276 6963 server to servic\n+001a2a70: 6520 696e 626f 756e 6420 7265 7175 6573 e inbound reques\n+001a2a80: 7473 206f 7665 7220 736f 636b 6574 732c ts over sockets,\n+001a2a90: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section How to \n+001a2ad0: 6372 6561 7465 2061 2073 7461 6e64 2d61 create a stand-a\n+001a2ae0: 6c6f 6e65 2073 6572 7665 723c 2f61 3e20 lone server \n+001a2af0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t\n+001a2b10: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n+001a2b20: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n+001a2b30: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .C examples\n+001a2b60: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6973

    .

    This is\n+001a2b70: 2074 6865 2073 616d 6520 6578 616d 706c the same exampl\n+001a2b80: 6520 6173 2061 626f 7665 2c20 6275 7420 e as above, but \n+001a2b90: 7468 6520 636c 6965 6e74 7320 6172 6520 the clients are \n+001a2ba0: 6275 696c 6420 696e 2043 2e3c 2f70 3e0a build in C.

    .\n+001a2bb0: 3c70 3e57 6520 6372 6561 7465 2061 203c

    We create a <\n+001a2bc0: 656d 3e3c 636f 6465 3e65 6e76 2e68 3c2f em>env.h that \n+001a2be0: 636f 6e74 6169 6e73 2074 6865 206a 6f69 contains the joi\n+001a2bf0: 6e74 2053 4f41 5020 4865 6164 6572 2061 nt SOAP Header a\n+001a2c00: 6e64 2053 4f41 5020 4661 756c 7420 6465 nd SOAP Fault de\n+001a2c10: 6669 6e69 7469 6f6e 732e 2059 6f75 206d finitions. You m\n+001a2c20: 6179 2068 6176 6520 746f 2063 6f70 792d ay have to copy-\n+001a2c30: 7061 7374 6520 7468 6573 6520 6672 6f6d paste these from\n+001a2c40: 2074 6865 206f 7468 6572 2068 6561 6465 the other heade\n+001a2c50: 7220 6669 6c65 732e 2054 6865 6e2c 2063 r files. Then, c\n+001a2c60: 6f6d 7069 6c65 2069 7420 6173 2066 6f6c ompile it as fol\n+001a2c70: 6c6f 7773 3a20 3c2f 703e 3c70 7265 2063 lows:

    \n+001a2c90: 2073 6f61 7063 7070 3220 2d63 202d 7065   soapcpp2 -c -pe\n+001a2ca0: 6e76 2065 6e76 2e68 0a20 6363 202d 6320  nv env.h. cc -c \n+001a2cb0: 656e 7643 2e63 0a3c 2f70 7265 3e3c 703e  envC.c.

    \n+001a2cc0: 2057 6520 616c 736f 2063 6f6d 7069 6c65 We also compile\n+001a2cd0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+001a2ce0: 2f73 7464 736f 6170 322e 633c 2f63 6f64 /stdsoap2.c without \n+001a2d00: 6e61 6d65 7370 6163 6573 3a20 3c2f 703e namespaces:

    \n+001a2d10: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     cc -c -DW\n+001a2d30: 4954 485f 4e4f 4e41 4d45 5350 4143 4553  ITH_NONAMESPACES\n+001a2d40: 2073 7464 736f 6170 322e 630a 3c2f 7072   stdsoap2.c.

    Second, we\n+001a2d60: 2063 7265 6174 6520 7468 6520 4465 6c61 create the Dela\n+001a2d70: 7965 6420 5374 6f63 6b20 5175 6f74 6520 yed Stock Quote \n+001a2d80: 6865 6164 6572 2066 696c 6520 7370 6563 header file spec\n+001a2d90: 6966 6963 6174 696f 6e2c 2077 6869 6368 ification, which\n+001a2da0: 206d 6179 2062 6520 6f62 7461 696e 6564 may be obtained\n+001a2db0: 2075 7369 6e67 2074 6865 2057 5344 4c20 using the WSDL \n+001a2dc0: 696d 706f 7274 6572 2e3c 2f70 3e0a 3c64 importer.

    .
    //gs\n+001a2e10: 6f61 7020 6e73 2073 6572 7669 6365 206e oap ns service n\n+001a2e20: 616d 653a 2053 6572 7669 6365 203c 2f73 ame: Service
    .
    //gsoap ns se\n+001a2e70: 7276 6963 6520 7374 796c 653a 2072 7063 rvice style: rpc\n+001a2e80: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001a2e90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a2ea0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+001a2ec0: 7320 7365 7276 6963 6520 656e 636f 6469 s service encodi\n+001a2ed0: 6e67 3a20 656e 636f 6465 6420 3c2f 7370 ng: encoded
    .
    //gsoap ns ser\n+001a2f20: 7669 6365 206c 6f63 6174 696f 6e3a 2068 vice location: h\n+001a2f30: 7474 703a 2f2f 7365 7276 6963 6573 2e78 ttp://services.x\n+001a2f40: 6d65 7468 6f64 732e 6e65 742f 736f 6170 methods.net/soap\n+001a2f50: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001a2f60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a2f70: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+001a2f90: 7320 7363 6865 6d61 206e 616d 6573 7061 s schema namespa\n+001a2fa0: 6365 3a20 7572 6e3a 786d 6574 686f 6473 ce: urn:xmethods\n+001a2fb0: 2d64 656c 6179 6564 2d71 756f 7465 7320 -delayed-quotes \n+001a2fc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001a2fe0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+001a3000: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n+001a3010: 6163 7469 6f6e 3a20 6765 7451 756f 7465 action: getQuote\n+001a3020: 2026 7175 6f74 3b26 7175 6f74 3b20 3c2f ""
    .int ns__getQuote(\n+001a3080: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *symbol, <\n+001a30b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a30c0: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float *Result);<\n+001a30e0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+001a3100: 5765 2063 6f6d 7069 6c65 2069 7420 6173 We compile it as\n+001a3110: 2061 206c 6962 7261 7279 2061 6e64 2077 a library and w\n+001a3120: 6520 7573 6520 6f70 7469 6f6e 7320 3c62 e use options -n\n+001a3140: 3c2f 623e 2061 6e64 203c 623e 3c63 6f64 and -pquote\n+001a3160: 3c2f 623e 2074 6f20 7072 6566 6978 2074 to prefix t\n+001a3170: 6865 2067 656e 6572 6174 6564 2066 696c he generated fil\n+001a3180: 6573 2061 6e64 2074 6f20 7265 6e61 6d65 es and to rename\n+001a3190: 2074 6865 206e 616d 6573 7061 6365 2074 the namespace t\n+001a31a0: 6162 6c65 2074 6f20 6176 6f69 6420 6c69 able to avoid li\n+001a31b0: 6e6b 2063 6f6e 666c 6963 7473 3a20 3c2f nk conflicts:

     soapcpp\n+001a31e0: 3220 2d63 202d 6e20 2d70 7175 6f74 6520  2 -c -n -pquote \n+001a31f0: 7175 6f74 652e 680a 2063 6320 2d63 2071  quote.h. cc -c q\n+001a3200: 756f 7465 436c 6965 6e74 4c69 622e 630a  uoteClientLib.c.\n+001a3210: 3c2f 7072 653e 3c70 3e20 5468 6972 642c  

    Third,\n+001a3220: 2077 6520 6372 6561 7465 2074 6865 2043 we create the C\n+001a3230: 7572 7265 6e63 7920 4578 6368 616e 6765 urrency Exchange\n+001a3240: 2052 6174 6520 6865 6164 6572 2066 696c Rate header fil\n+001a3250: 6520 7370 6563 6966 6963 6174 696f 6e3a e specification:\n+001a3260: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns se\n+001a32b0: 7276 6963 6520 6e61 6d65 3a20 5365 7276 rvice name: Serv\n+001a32c0: 6963 6520 3c2f 7370 616e 3e3c 2f64 6976 ice .
    //gsoa\n+001a3300: 7020 6e73 2073 6572 7669 6365 2073 7479 p ns service sty\n+001a3310: 6c65 3a20 7270 6320 3c2f 7370 616e 3e3c le: rpc <\n+001a3320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+001a3350: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+001a3360: 2065 6e63 6f64 696e 673a 2065 6e63 6f64 encoding: encod\n+001a3370: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    \n+001a3380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+001a33b0: 206e 7320 7365 7276 6963 6520 6c6f 6361 ns service loca\n+001a33c0: 7469 6f6e 3a20 6874 7470 3a2f 2f73 6572 tion: http://ser\n+001a33d0: 7669 6365 732e 786d 6574 686f 6473 2e6e vices.xmethods.n\n+001a33e0: 6574 2f73 6f61 7020 3c2f 7370 616e 3e3c et/soap <\n+001a33f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+001a3420: 6773 6f61 7020 6e73 2073 6368 656d 6120 gsoap ns schema \n+001a3430: 6e61 6d65 7370 6163 653a 2075 726e 3a78 namespace: urn:x\n+001a3440: 6d65 7468 6f64 732d 4375 7272 656e 6379 methods-Currency\n+001a3450: 4578 6368 616e 6765 203c 2f73 7061 6e3e Exchange \n+001a3460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001a3490: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+001a34a0: 6520 6d65 7468 6f64 2d61 6374 696f 6e3a e method-action:\n+001a34b0: 2067 6574 5261 7465 2026 7175 6f74 3b26 getRate "&\n+001a34c0: 7175 6f74 3b20 3c2f 7370 616e 3e3c 2f64 quot; .
    \n+001a3500: 696e 743c 2f73 7061 6e3e 206e 735f 5f67 int ns__g\n+001a3510: 6574 5261 7465 283c 7370 616e 2063 6c61 etRate(char *co\n+001a3540: 756e 7472 7931 2c20 3c73 7061 6e20 636c untry1, char *c\n+001a3570: 6f75 6e74 7279 322c 203c 7370 616e 2063 ountry2, float \n+001a35a0: 2a52 6573 756c 7429 3b3c 2f64 6976 3e0a *Result);
    .\n+001a35b0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    We com\n+001a35d0: 7069 6c65 2069 7420 6173 2061 206c 6962 pile it as a lib\n+001a35e0: 7261 7279 2061 6e64 2077 6520 7573 6520 rary and we use \n+001a35f0: 6f70 7469 6f6e 7320 3c62 3e3c 636f 6465 options -n a\n+001a3610: 6e64 203c 623e 3c63 6f64 653e 2d70 7261 nd -pra\n+001a3620: 7465 3c2f 636f 6465 3e3c 2f62 3e20 746f te to\n+001a3630: 2070 7265 6669 7820 7468 6520 6765 6e65 prefix the gene\n+001a3640: 7261 7465 6420 6669 6c65 7320 616e 6420 rated files and \n+001a3650: 746f 2072 656e 616d 6520 7468 6520 6e61 to rename the na\n+001a3660: 6d65 7370 6163 6520 7461 626c 6520 746f mespace table to\n+001a3670: 2061 766f 6964 206c 696e 6b20 636f 6e66 avoid link conf\n+001a3680: 6c69 6374 733a 203c 2f70 3e3c 7072 6520 licts:

     soapcpp2 -c -n\n+001a36b0: 202d 7072 6174 6520 7261 7465 2e68 0a20   -prate rate.h. \n+001a36c0: 6363 202d 6320 7261 7465 436c 6965 6e74  cc -c rateClient\n+001a36d0: 4c69 622e 630a 3c2f 7072 653e 3c70 3e20  Lib.c.

    \n+001a36e0: 5468 6520 6d61 696e 2070 726f 6772 616d The main program\n+001a36f0: 2069 733a 3c2f 703e 0a3c 6469 7620 636c is:

    .
    <\n+001a3710: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a3720: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+001a3740: 6c75 6465 2026 7175 6f74 3b71 756f 7465 lude "quote\n+001a3750: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h"\n+001a3760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n+001a37a0: 6f74 3b72 6174 6548 2e68 2671 756f 743b ot;rateH.h"\n+001a37b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001a37d0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+001a37f0: 7564 6520 2671 756f 743b 7175 6f74 652e ude "quote.\n+001a3800: 6e73 6d61 7026 7175 6f74 3b3c 2f73 7061 nsmap"
    .
    #include &\n+001a3850: 7175 6f74 3b72 6174 652e 6e73 6d61 7026 quot;rate.nsmap&\n+001a3860: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    .<\n+001a38a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a38b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main(int ar\n+001a38f0: 6763 2c20 3c73 7061 6e20 636c 6173 733d gc, ch\n+001a3910: 6172 3c2f 7370 616e 3e20 2a61 7267 765b ar *argv[\n+001a3920: 5d29 203c 2f64 6976 3e0a 3c64 6976 2063 ])
    .
    {.
    {
    .\n-001a3970: 2020 3c73 7061 6e20 636c 6173 733d 226b if (argc <\n-001a39a0: 3d20 3129 203c 2f64 6976 3e0a 3c64 6976 = 1)
    . \n-001a39c0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    fp\n-001a39e0: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, "\n-001a3a10: 5573 6167 653a 206d 6169 6e20 7469 636b Usage: main tick\n-001a3a20: 6572 205b 6375 7272 656e 6379 5d5c 6e26 er [currency]\\n&\n-001a3a30: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); <\n-001a3a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    exit\n-001a3a60: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); \n-001a3a70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    st\n-001a3ac0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-001a3b30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a3b40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001a3b50: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001a3b60: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001a3b70: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001a3b80: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001a3b90: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    <\n-001a3bb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a3bc0: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float q;
    .\n-001a3be0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-001a3cc0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_call\n-001a3cf0: 5f6e 735f 5f67 6574 5175 6f74 6528 3c61 _ns__getQuote(soap, N\n-001a3d30: 554c 4c2c 204e 554c 4c2c 2061 7267 765b ULL, NULL, argv[\n-001a3d40: 315d 2c20 2661 6d70 3b71 2929 203c 7370 1], &q)) // get quote \n-001a3d70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a3d90: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n-001a3df0: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std\n-001a3e30: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . \n-001a3e50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-001a3e70: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-001a3e90: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-001a3eb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (argc > 2\n-001a3ee0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {\n-001a3f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001a3f20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a3f30: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001a3f40: 705f 5f6e 616d 6573 7061 6365 2e68 746d p__namespace.htm\n-001a3f50: 6c23 6761 3565 6339 3133 6163 6363 3730 l#ga5ec913accc70\n-001a3f60: 3563 6361 3332 3936 6162 3735 6261 6539 5cca3296ab75bae9\n-001a3f70: 3535 6135 223e 736f 6170 5f73 6574 5f6e 55a5\">soap_set_n\n-001a3f80: 616d 6573 7061 6365 733c 2f61 3e28 3c61 amespaces(soap, r\n-001a3fc0: 6174 655f 6e61 6d65 7370 6163 6573 293b ate_namespaces);\n-001a3fd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a3ff0: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n-001a4010: 2f73 7061 6e3e 2072 3b20 3c2f 6469 763e /span> r;
    \n-001a4020: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (so\n-001a4060: 6170 5f63 616c 6c5f 6e73 5f5f 6765 7452 ap_call_ns__getR\n-001a4070: 6174 6528 3c61 2063 6c61 7373 3d22 636f ate(soap<\n-001a40a0: 2f61 3e2c 204e 554c 4c2c 204e 554c 4c2c /a>, NULL, NULL,\n-001a40b0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001a40d0: 6f74 3b75 7326 7175 6f74 3b3c 2f73 7061 ot;us", argv[2], &am\n-001a40f0: 703b 7229 2920 3c73 7061 6e20 636c 6173 p;r)) // g\n-001a4110: 6574 2072 6174 6520 696e 2055 5320 646f et rate in US do\n-001a4120: 6c6c 6172 7320 3c2f 7370 616e 3e3c 2f64 llars ..
    <\n-001a4210: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a4220: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n-001a4250: 2020 2020 2020 7120 2a3d 2072 3b20 3c73 q *= r; // convert t\n-001a4280: 6865 2071 756f 7465 203c 2f73 7061 6e3e he quote \n-001a4290: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } <\n-001a42b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    prin\n-001a42d0: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n-001a42f0: 7175 6f74 3b25 733a 2025 6620 5c6e 2671 quot;%s: %f \\n&q\n-001a4300: 756f 743b 3c2f 7370 616e 3e2c 2061 7267 uot;, arg\n-001a4310: 765b 315d 2c20 7129 3b20 3c2f 6469 763e v[1], q);
    \n-001a4320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-001a4350: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n-001a43b0: 726f 793c 2f61 3e28 3c61 2063 6c61 7373 roy(s\n-001a43e0: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n-001a43f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-001a44b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_free\n-001a4510: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001a4540: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n-001a4560: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001a4580: 6e3c 2f73 7061 6e3e 2030 3b20 3c2f 6469 n 0; .
    }
    .

    Compile a\n-001a45d0: 6e64 206c 696e 6b20 7468 6973 2061 7070 nd link this app\n-001a45e0: 6c69 6361 7469 6f6e 2077 6974 6820 3c65 lication with stdsoap2\n-001a4600: 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .o, \n-001a4610: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e6f envC.o\n-001a4620: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , quoteCli\n-001a4640: 656e 744c 6962 2e6f 3c2f 636f 6465 3e3c entLib.o<\n-001a4650: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and rateClientLi\n-001a4670: 622e 6f3c 2f63 6f64 653e 3c2f 656d 3e2e b.o.\n-001a4680: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n-001a46a0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n-001a46b0: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n-001a46c0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-001a46d0: 2069 643d 2265 7861 6d70 6c65 3135 223e id=\"example15\">\n-001a46e0: 3c2f 613e 0a48 6f77 2074 6f20 6368 6169 .How to chai\n-001a46f0: 6e20 4320 7365 7276 6963 6573 2074 6f20 n C services to \n-001a4700: 6163 6365 7074 206d 6573 7361 6765 7320 accept messages \n-001a4710: 6f6e 2074 6865 2073 616d 6520 706f 7274 on the same port\n-001a4720: 3c2f 6833 3e0a 3c70 3e57 6865 6e20 636f

    .

    When co\n-001a4730: 6d62 696e 696e 6720 6d75 6c74 6970 6c65 mbining multiple\n-001a4740: 2073 6572 7669 6365 7320 696e 746f 206f services into o\n-001a4750: 6e65 2061 7070 6c69 6361 7469 6f6e 2c20 ne application, \n-001a4760: 796f 7520 6361 6e20 7275 6e20 7773 646c you can run wsdl\n-001a4770: 3268 206f 6e20 6d75 6c74 6970 6c65 2057 2h on multiple W\n-001a4780: 5344 4c73 2074 6f20 6765 6e65 7261 7465 SDLs to generate\n-001a4790: 2074 6865 2073 696e 676c 6520 616c 6c2d the single all-\n-001a47a0: 696e 636c 7573 6976 6520 7365 7276 6963 inclusive servic\n-001a47b0: 6520 6465 6669 6e69 7469 6f6e 7320 696e e definitions in\n-001a47c0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-001a47d0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n-001a47e0: 2e20 5468 6973 2068 6561 6465 7220 6669 . This header fi\n-001a47f0: 6c65 2069 7320 7468 656e 2070 726f 6365 le is then proce\n-001a4800: 7373 6564 2077 6974 6820 736f 6170 6370 ssed with soapcp\n-001a4810: 7032 2074 6f20 6765 6e65 7261 7465 2073 p2 to generate s\n-001a4820: 6b65 6c65 746f 6e20 6675 6e63 7469 6f6e keleton function\n-001a4830: 7320 696e 2043 2e3c 2f70 3e0a 3c70 3e57 s in C.

    .

    W\n-001a4840: 6861 7420 6966 2077 6520 6765 6e65 7261 hat if we genera\n-001a4850: 7465 206d 756c 7469 706c 6520 7365 7276 te multiple serv\n-001a4860: 6963 6573 2c20 6561 6368 2066 726f 6d20 ices, each from \n-001a4870: 6120 5753 444c 2073 6570 6172 6174 656c a WSDL separatel\n-001a4880: 792c 2061 6e64 2077 616e 7420 746f 2064 y, and want to d\n-001a4890: 6570 6c6f 7920 7468 656d 206f 6e20 7468 eploy them on th\n-001a48a0: 6520 7361 6d65 2070 6f72 743f 2054 6869 e same port? Thi\n-001a48b0: 7320 7265 7175 6972 6573 206c 6973 7465 s requires liste\n-001a48c0: 6e69 6e67 2074 6f20 7468 6520 7361 6d65 ning to the same\n-001a48d0: 2070 6f72 7420 616e 6420 7468 656e 2063 port and then c\n-001a48e0: 6861 696e 696e 6720 7468 6520 7365 7276 haining the serv\n-001a48f0: 6963 6520 6469 7370 6174 6368 6573 2073 ice dispatches s\n-001a4900: 6f20 7468 6174 2065 6163 6820 7365 7276 o that each serv\n-001a4910: 6963 6520 6361 6e20 7365 7276 6520 6120 ice can serve a \n-001a4920: 7265 7175 6573 742e 3c2f 703e 0a3c 703e request.

    .

    \n-001a4930: 4669 7273 7420 7765 2063 7265 6174 6520 First we create \n-001a4940: 6120 3c65 6d3e 3c63 6f64 653e 656e 762e a env.\n-001a4950: 683c 2f63 6f64 653e 3c2f 656d 3e20 7468 h th\n-001a4960: 6174 2063 6f6e 7461 696e 7320 7468 6520 at contains the \n-001a4970: 6a6f 696e 7420 534f 4150 2048 6561 6465 joint SOAP Heade\n-001a4980: 7220 616e 6420 534f 4150 2046 6175 6c74 r and SOAP Fault\n-001a4990: 2064 6566 696e 6974 696f 6e73 2c20 666f definitions, fo\n-001a49a0: 7220 6578 616d 706c 6520 6279 2063 6f70 r example by cop\n-001a49b0: 792d 7061 7374 696e 6720 7468 6573 6520 y-pasting these \n-001a49c0: 6672 6f6d 2074 6865 206f 7468 6572 2068 from the other h\n-001a49d0: 6561 6465 7220 6669 6c65 7320 6765 6e65 eader files gene\n-001a49e0: 7261 7465 6420 6279 2077 7364 6c32 682e rated by wsdl2h.\n-001a49f0: 204f 7220 7468 6973 2066 696c 6520 6973 Or this file is\n-001a4a00: 2065 6d70 7479 2069 6620 6e6f 2073 7065 empty if no spe\n-001a4a10: 6369 616c 697a 6564 2053 4f41 5020 4865 cialized SOAP He\n-001a4a20: 6164 6572 7320 616e 6420 4661 756c 7473 aders and Faults\n-001a4a30: 2061 7265 2075 7365 642e 2057 6520 636f are used. We co\n-001a4a40: 6d70 696c 6520 6974 2061 7320 666f 6c6c mpile it as foll\n-001a4a50: 6f77 733a 203c 2f70 3e3c 7072 6520 636c ows:

     \n-001a4a70: 736f 6170 6370 7032 202d 6320 2d70 656e  soapcpp2 -c -pen\n-001a4a80: 7620 656e 762e 680a 2063 6320 2d63 2065  v env.h. cc -c e\n-001a4a90: 6e76 432e 630a 3c2f 7072 653e 3c70 3e20  nvC.c.

    \n-001a4aa0: 5765 2061 6c73 6f20 636f 6d70 696c 6520 We also compile \n-001a4ab0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-001a4ac0: 7374 6473 6f61 7032 2e63 3c2f 636f 6465 stdsoap2.c without n\n-001a4ae0: 616d 6573 7061 6365 733a 203c 2f70 3e3c amespaces:

    <\n-001a4af0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-001a4b00: 656e 7422 3e20 6363 202d 6320 2d44 5749 ent\"> cc -c -DWI\n-001a4b10: 5448 5f4e 4f4e 414d 4553 5041 4345 5320 TH_NONAMESPACES \n-001a4b20: 7374 6473 6f61 7032 2e63 0a3c 2f70 7265 stdsoap2.c.

    Say for exa\n-001a4b40: 6d70 6c65 2074 6861 7420 7765 2068 6176 mple that we hav\n-001a4b50: 6520 6120 7365 7276 6963 6520 6465 6669 e a service defi\n-001a4b60: 6e69 7469 6f6e 2069 6e20 3c65 6d3e 3c63 nition in quote.h. We comp\n-001a4b90: 696c 6520 6974 2061 7320 6120 6c69 6272 ile it as a libr\n-001a4ba0: 6172 7920 616e 6420 7765 2075 7365 206f ary and we use o\n-001a4bb0: 7074 696f 6e73 203c 623e 3c63 6f64 653e ptions \n-001a4bc0: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 616e -n an\n-001a4bd0: 6420 3c62 3e3c 636f 6465 3e2d 7071 756f d -pquo\n-001a4be0: 7465 3c2f 636f 6465 3e3c 2f62 3e20 746f te to\n-001a4bf0: 2070 7265 6669 7820 7468 6520 6765 6e65 prefix the gene\n-001a4c00: 7261 7465 6420 6669 6c65 7320 616e 6420 rated files and \n-001a4c10: 746f 2072 656e 616d 6520 7468 6520 6e61 to rename the na\n-001a4c20: 6d65 7370 6163 6520 7461 626c 6520 746f mespace table to\n-001a4c30: 2061 766f 6964 206c 696e 6b20 636f 6e66 avoid link conf\n-001a4c40: 6c69 6374 733a 203c 2f70 3e3c 7072 6520 licts:

     soapcpp2 -c -n\n-001a4c70: 202d 7071 756f 7465 2071 756f 7465 2e68   -pquote quote.h\n-001a4c80: 0a20 6363 202d 6320 7175 6f74 6543 6c69  . cc -c quoteCli\n-001a4c90: 656e 744c 6962 2e63 0a3c 2f70 7265 3e3c  entLib.c.
    <\n-001a4ca0: 703e 2057 6520 646f 2074 6865 2073 616d p> We do the sam\n-001a4cb0: 6520 666f 7220 6120 7365 7276 6963 6520 e for a service \n-001a4cc0: 6465 6669 6e69 7469 6f6e 2069 6e20 3c65 definition in rate.h
    :

    \n-001a4cf0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     soapcpp2 \n-001a4d10: 2d63 202d 6e20 2d70 7261 7465 2072 6174  -c -n -prate rat\n-001a4d20: 652e 680a 2063 6320 2d63 2072 6174 6543  e.h. cc -c rateC\n-001a4d30: 6c69 656e 744c 6962 2e63 0a3c 2f70 7265  lientLib.c.

    To serve bo\n-001a4d50: 7468 2074 6865 2071 756f 7465 2061 6e64 th the quote and\n-001a4d60: 2072 6174 6520 7365 7276 6963 6573 206f rate services o\n-001a4d70: 6e20 7468 6520 7361 6d65 2070 6f72 742c n the same port,\n-001a4d80: 2077 6520 6368 6169 6e20 7468 6520 7365 we chain the se\n-001a4d90: 7276 6963 6520 6469 7370 6174 6368 6572 rvice dispatcher\n-001a4da0: 7320 6173 2066 6f6c 6c6f 7773 3a3c 2f70 s as follows:.

    #include &q\n-001a4e00: 756f 743b 7175 6f74 6548 2e68 2671 756f uot;quoteH.h&quo\n-001a4e10: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001a4e20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n-001a4e50: 636c 7564 6520 2671 756f 743b 7261 7465 clude "rate\n-001a4e60: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h"\n-001a4e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n-001a4eb0: 6f74 3b71 756f 7465 2e6e 736d 6170 2671 ot;quote.nsmap&q\n-001a4ec0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    #\n-001a4f00: 696e 636c 7564 6520 2671 756f 743b 7261 include "ra\n-001a4f10: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
    . <\n-001a4f40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-001a4f70: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-001a4fe0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a4ff0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001a5000: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001a5010: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001a5020: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001a5030: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001a5040: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    if\n-001a5080: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_valid_s\n-001a50e0: 6f63 6b65 743c 2f61 3e28 3c61 2063 6c61 ocket(soap_b\n-001a5140: 696e 643c 2f61 3e28 3c61 2063 6c61 7373 ind(s\n-001a5170: 6f61 703c 2f61 3e2c 204e 554c 4c2c 2038 oap, NULL, 8\n-001a5180: 3038 302c 2031 3029 2929 203c 7370 616e 080, 10))) // small BACKLO\n-001a51b0: 4720 666f 7220 6974 6572 6174 6976 6520 G for iterative \n-001a51c0: 7365 7276 6572 733c 2f73 7061 6e3e 3c2f servers if (arg\n+001a3980: 6320 266c 743b 3d20 3129 203c 2f64 6976 c <= 1) .
    {
    .\n+001a39c0: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde\n+001a39d0: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, \n+001a39f0: 2671 756f 743b 5573 6167 653a 206d 6169 "Usage: mai\n+001a3a00: 6e20 7469 636b 6572 205b 6375 7272 656e n ticker [curren\n+001a3a10: 6379 5d5c 6e26 7175 6f74 3b3c 2f73 7061 cy]\\n");
    . \n+001a3a40: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL\n+001a3a50: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . \n+001a3a70: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .\n+001a3b80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    f\n+001a3bb0: 6c6f 6174 3c2f 7370 616e 3e20 713b 203c loat q; <\n+001a3bc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_namesp\n+001a3c40: 6163 6573 3c2f 613e 283c 6120 636c 6173 aces(\n+001a3c70: 736f 6170 3c2f 613e 2c20 7175 6f74 655f soap, quote_\n+001a3c80: 6e61 6d65 7370 6163 6573 293b 203c 2f64 namespaces); ..
    <\n+001a4020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a4030: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n+001a4050: 5f5f 6765 7452 6174 6528 3c61 2063 6c61 __getRate(soap, NULL,\n+001a4090: 204e 554c 4c2c 203c 7370 616e 2063 6c61 NULL, "us"\n+001a40c0: 3b3c 2f73 7061 6e3e 2c20 6172 6776 5b32 ;, argv[2\n+001a40d0: 5d2c 2026 616d 703b 7229 2920 3c73 7061 ], &r)) // get rate in\n+001a4100: 2055 5320 646f 6c6c 6172 7320 3c2f 7370 US dollars
    .
    \n+001a4130: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n+001a4190: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std\n+001a41d0: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . \n+001a41f0: 2020 2020 203c 7370 616e 2063 6c61 7373 e\n+001a4210: 6c73 653c 2f73 7061 6e3e 203c 2f64 6976 lse .
    q *=\n+001a4240: 2072 3b20 3c73 7061 6e20 636c 6173 733d r; // con\n+001a4260: 7665 7274 2074 6865 2071 756f 7465 203c vert the quote <\n+001a4270: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a4290: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    . \n+001a42b0: 2020 7072 696e 7466 283c 7370 616e 2063 printf("%s: %\n+001a42e0: 6620 5c6e 2671 756f 743b 3c2f 7370 616e f \\n", argv[1], q); \n+001a4300: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    soa\n+001a4390: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap);<\n+001a43d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+001a4440: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap);.
    soa\n+001a44f0: 705f 6672 6565 3c2f 613e 283c 6120 636c p_free(soap);.
    return 0\n+001a4570: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }.

    Com\n+001a45b0: 7069 6c65 2061 6e64 206c 696e 6b20 7468 pile and link th\n+001a45c0: 6973 2061 7070 6c69 6361 7469 6f6e 2077 is application w\n+001a45d0: 6974 6820 3c65 6d3e 3c63 6f64 653e 7374 ith st\n+001a45e0: 6473 6f61 7032 2e6f 3c2f 636f 6465 3e3c dsoap2.o<\n+001a45f0: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n+001a4600: 656e 7643 2e6f 3c2f 636f 6465 3e3c 2f65 envC.o, qu\n+001a4620: 6f74 6543 6c69 656e 744c 6962 2e6f 3c2f oteClientLib.o, and \n+001a4640: 3c65 6d3e 3c63 6f64 653e 7261 7465 436c rateCl\n+001a4650: 6965 6e74 4c69 622e 6f3c 2f63 6f64 653e ientLib.o\n+001a4660: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e f09f .

    .

    ..\n+001a4670: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B\n+001a4680: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of \n+001a4690: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    \n+001a46a0: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    .How t\n+001a46d0: 6f20 6368 6169 6e20 4320 7365 7276 6963 o chain C servic\n+001a46e0: 6573 2074 6f20 6163 6365 7074 206d 6573 es to accept mes\n+001a46f0: 7361 6765 7320 6f6e 2074 6865 2073 616d sages on the sam\n+001a4700: 6520 706f 7274 3c2f 6833 3e0a 3c70 3e57 e port

    .

    W\n+001a4710: 6865 6e20 636f 6d62 696e 696e 6720 6d75 hen combining mu\n+001a4720: 6c74 6970 6c65 2073 6572 7669 6365 7320 ltiple services \n+001a4730: 696e 746f 206f 6e65 2061 7070 6c69 6361 into one applica\n+001a4740: 7469 6f6e 2c20 796f 7520 6361 6e20 7275 tion, you can ru\n+001a4750: 6e20 7773 646c 3268 206f 6e20 6d75 6c74 n wsdl2h on mult\n+001a4760: 6970 6c65 2057 5344 4c73 2074 6f20 6765 iple WSDLs to ge\n+001a4770: 6e65 7261 7465 2074 6865 2073 696e 676c nerate the singl\n+001a4780: 6520 616c 6c2d 696e 636c 7573 6976 6520 e all-inclusive \n+001a4790: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti\n+001a47a0: 6f6e 7320 696e 7465 7266 6163 6520 6865 ons interface he\n+001a47b0: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n+001a47c0: 6170 6370 7032 2e20 5468 6973 2068 6561 apcpp2. This hea\n+001a47d0: 6465 7220 6669 6c65 2069 7320 7468 656e der file is then\n+001a47e0: 2070 726f 6365 7373 6564 2077 6974 6820 processed with \n+001a47f0: 736f 6170 6370 7032 2074 6f20 6765 6e65 soapcpp2 to gene\n+001a4800: 7261 7465 2073 6b65 6c65 746f 6e20 6675 rate skeleton fu\n+001a4810: 6e63 7469 6f6e 7320 696e 2043 2e3c 2f70 nctions in C..

    What if we \n+001a4830: 6765 6e65 7261 7465 206d 756c 7469 706c generate multipl\n+001a4840: 6520 7365 7276 6963 6573 2c20 6561 6368 e services, each\n+001a4850: 2066 726f 6d20 6120 5753 444c 2073 6570 from a WSDL sep\n+001a4860: 6172 6174 656c 792c 2061 6e64 2077 616e arately, and wan\n+001a4870: 7420 746f 2064 6570 6c6f 7920 7468 656d t to deploy them\n+001a4880: 206f 6e20 7468 6520 7361 6d65 2070 6f72 on the same por\n+001a4890: 743f 2054 6869 7320 7265 7175 6972 6573 t? This requires\n+001a48a0: 206c 6973 7465 6e69 6e67 2074 6f20 7468 listening to th\n+001a48b0: 6520 7361 6d65 2070 6f72 7420 616e 6420 e same port and \n+001a48c0: 7468 656e 2063 6861 696e 696e 6720 7468 then chaining th\n+001a48d0: 6520 7365 7276 6963 6520 6469 7370 6174 e service dispat\n+001a48e0: 6368 6573 2073 6f20 7468 6174 2065 6163 ches so that eac\n+001a48f0: 6820 7365 7276 6963 6520 6361 6e20 7365 h service can se\n+001a4900: 7276 6520 6120 7265 7175 6573 742e 3c2f rve a request..

    First we c\n+001a4920: 7265 6174 6520 6120 3c65 6d3e 3c63 6f64 reate a env.h that contain\n+001a4950: 7320 7468 6520 6a6f 696e 7420 534f 4150 s the joint SOAP\n+001a4960: 2048 6561 6465 7220 616e 6420 534f 4150 Header and SOAP\n+001a4970: 2046 6175 6c74 2064 6566 696e 6974 696f Fault definitio\n+001a4980: 6e73 2c20 666f 7220 6578 616d 706c 6520 ns, for example \n+001a4990: 6279 2063 6f70 792d 7061 7374 696e 6720 by copy-pasting \n+001a49a0: 7468 6573 6520 6672 6f6d 2074 6865 206f these from the o\n+001a49b0: 7468 6572 2068 6561 6465 7220 6669 6c65 ther header file\n+001a49c0: 7320 6765 6e65 7261 7465 6420 6279 2077 s generated by w\n+001a49d0: 7364 6c32 682e 204f 7220 7468 6973 2066 sdl2h. Or this f\n+001a49e0: 696c 6520 6973 2065 6d70 7479 2069 6620 ile is empty if \n+001a49f0: 6e6f 2073 7065 6369 616c 697a 6564 2053 no specialized S\n+001a4a00: 4f41 5020 4865 6164 6572 7320 616e 6420 OAP Headers and \n+001a4a10: 4661 756c 7473 2061 7265 2075 7365 642e Faults are used.\n+001a4a20: 2057 6520 636f 6d70 696c 6520 6974 2061 We compile it a\n+001a4a30: 7320 666f 6c6c 6f77 733a 203c 2f70 3e3c s follows:

    <\n+001a4a40: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+001a4a50: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n+001a4a60: 6320 2d70 656e 7620 656e 762e 680a 2063 c -penv env.h. c\n+001a4a70: 6320 2d63 2065 6e76 432e 630a 3c2f 7072 c -c envC.c.

    We also co\n+001a4a90: 6d70 696c 6520 3c65 6d3e 3c63 6f64 653e mpile \n+001a4aa0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c\n+001a4ab0: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 6974 wit\n+001a4ac0: 686f 7574 206e 616d 6573 7061 6365 733a hout namespaces:\n+001a4ad0: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     cc -\n+001a4af0: 6320 2d44 5749 5448 5f4e 4f4e 414d 4553  c -DWITH_NONAMES\n+001a4b00: 5041 4345 5320 7374 6473 6f61 7032 2e63  PACES stdsoap2.c\n+001a4b10: 0a3c 2f70 7265 3e3c 703e 2053 6179 2066  .

    Say f\n+001a4b20: 6f72 2065 7861 6d70 6c65 2074 6861 7420 or example that \n+001a4b30: 7765 2068 6176 6520 6120 7365 7276 6963 we have a servic\n+001a4b40: 6520 6465 6669 6e69 7469 6f6e 2069 6e20 e definition in \n+001a4b50: 3c65 6d3e 3c63 6f64 653e 7175 6f74 652e quote.\n+001a4b60: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2057 h. W\n+001a4b70: 6520 636f 6d70 696c 6520 6974 2061 7320 e compile it as \n+001a4b80: 6120 6c69 6272 6172 7920 616e 6420 7765 a library and we\n+001a4b90: 2075 7365 206f 7074 696f 6e73 203c 623e use options \n+001a4ba0: 3c63 6f64 653e 2d6e 3c2f 636f 6465 3e3c -n<\n+001a4bb0: 2f62 3e20 616e 6420 3c62 3e3c 636f 6465 /b> and -pquote<\n+001a4bd0: 2f62 3e20 746f 2070 7265 6669 7820 7468 /b> to prefix th\n+001a4be0: 6520 6765 6e65 7261 7465 6420 6669 6c65 e generated file\n+001a4bf0: 7320 616e 6420 746f 2072 656e 616d 6520 s and to rename \n+001a4c00: 7468 6520 6e61 6d65 7370 6163 6520 7461 the namespace ta\n+001a4c10: 626c 6520 746f 2061 766f 6964 206c 696e ble to avoid lin\n+001a4c20: 6b20 636f 6e66 6c69 6374 733a 203c 2f70 k conflicts:

     soapcpp2\n+001a4c50: 202d 6320 2d6e 202d 7071 756f 7465 2071   -c -n -pquote q\n+001a4c60: 756f 7465 2e68 0a20 6363 202d 6320 7175  uote.h. cc -c qu\n+001a4c70: 6f74 6543 6c69 656e 744c 6962 2e63 0a3c  oteClientLib.c.<\n+001a4c80: 2f70 7265 3e3c 703e 2057 6520 646f 2074  /pre>

    We do t\n+001a4c90: 6865 2073 616d 6520 666f 7220 6120 7365 he same for a se\n+001a4ca0: 7276 6963 6520 6465 6669 6e69 7469 6f6e rvice definition\n+001a4cb0: 2069 6e20 3c65 6d3e 3c63 6f64 653e 7261 in ra\n+001a4cc0: 7465 2e68 3c2f 636f 6465 3e3c 2f65 6d3e te.h\n+001a4cd0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     soa\n+001a4cf0: 7063 7070 3220 2d63 202d 6e20 2d70 7261  pcpp2 -c -n -pra\n+001a4d00: 7465 2072 6174 652e 680a 2063 6320 2d63  te rate.h. cc -c\n+001a4d10: 2072 6174 6543 6c69 656e 744c 6962 2e63   rateClientLib.c\n+001a4d20: 0a3c 2f70 7265 3e3c 703e 2054 6f20 7365  .

    To se\n+001a4d30: 7276 6520 626f 7468 2074 6865 2071 756f rve both the quo\n+001a4d40: 7465 2061 6e64 2072 6174 6520 7365 7276 te and rate serv\n+001a4d50: 6963 6573 206f 6e20 7468 6520 7361 6d65 ices on the same\n+001a4d60: 2070 6f72 742c 2077 6520 6368 6169 6e20 port, we chain \n+001a4d70: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp\n+001a4d80: 6174 6368 6572 7320 6173 2066 6f6c 6c6f atchers as follo\n+001a4d90: 7773 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ws:

    .
    \n+001a4dc0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+001a4de0: 7564 6520 2671 756f 743b 7175 6f74 6548 ude "quoteH\n+001a4df0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n+001a4e00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo\n+001a4e40: 743b 7261 7465 482e 6826 7175 6f74 3b3c t;rateH.h"<\n+001a4e50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001a4e70: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001a4e80: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+001a4e90: 6465 2026 7175 6f74 3b71 756f 7465 2e6e de "quote.n\n+001a4ea0: 736d 6170 2671 756f 743b 3c2f 7370 616e smap"
    .
    #include &q\n+001a4ef0: 756f 743b 7261 7465 2e6e 736d 6170 2671 uot;rate.nsmap&q\n+001a4f00: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .struct soap *soap = soap_n\n+001a5020: 6577 3c2f 613e 2829 3b20 3c2f 6469 763e ew();
    \n+001a5030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n+001a5060: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_v\n+001a50c0: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket(\n+001a50d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+001a5120: 736f 6170 5f62 696e 643c 2f61 3e28 3c61 soap_bind(soap, N\n+001a5160: 554c 4c2c 2038 3038 302c 2031 3029 2929 ULL, 8080, 10)))\n+001a5170: 203c 7370 616e 2063 6c61 7373 3d22 636f // small \n+001a5190: 4241 434b 4c4f 4720 666f 7220 6974 6572 BACKLOG for iter\n+001a51a0: 6174 6976 6520 7365 7276 6572 733c 2f73 ative servers
    .
    {.
    {
    .<\n-001a51f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a5200: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > whi\n-001a5220: 6c65 3c2f 7370 616e 3e20 2831 293c 2f64 le (1).
    {
    .\n-001a5250: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n-001a53a0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-001a53c0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_begi\n-001a5440: 6e5f 7365 7276 653c 2f61 3e28 3c61 2063 n_serve(soap)) .
    {.
    <\n-001a54c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a54d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001a54e0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-001a54f0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-001a5500: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-001a5510: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-001a5520: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so\n-001a5550: 6170 3c2f 613e 2c20 7374 6465 7272 293b ap, stderr);\n-001a5560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a5580: 2020 3c73 7061 6e20 636c 6173 733d 226b cont\n-001a55a0: 696e 7565 3c2f 7370 616e 3e3b 3c2f 6469 inue;.
    }.
    soap_set_names\n-001a5650: 7061 6365 733c 2f61 3e28 3c61 2063 6c61 paces(soap, quote\n-001a5690: 5f6e 616d 6573 7061 6365 7329 3b3c 2f64 _namespaces);.
    if \n-001a56e0: 2871 756f 7465 5f73 6572 7665 5f72 6571 (quote_serve_req\n-001a56f0: 7565 7374 283c 6120 636c 6173 733d 2263 uest(soap\n-001a5720: 3c2f 613e 2920 3d3d 203c 6120 636c 6173 ) == SOA\n-001a5780: 505f 4e4f 5f4d 4554 484f 443c 2f61 3e29 P_NO_METHOD)\n-001a5790: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a57b0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a57d0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_se\n-001a5830: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces\n-001a5840: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a5870: 2c20 7261 7465 5f6e 616d 6573 7061 6365 , rate_namespace\n-001a5880: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    \n-001a58a0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-001a58c0: 3c2f 7370 616e 3e20 2872 6174 655f 7365 (rate_se\n-001a58d0: 7276 655f 7265 7175 6573 7428 3c61 2063 rve_request(soap)).
    \n-001a5930: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-001a5980: 736f 6170 5f73 656e 645f 6661 756c 743c soap_send_fault<\n-001a5990: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001a59c0: 2f61 3e29 3b20 3c73 7061 6e20 636c 6173 /a>); // s\n-001a59e0: 656e 6420 6661 756c 7420 746f 2063 6c69 end fault to cli\n-001a59f0: 656e 7420 3c2f 7370 616e 3e3c 2f64 6976 ent .
    } .
    else\n-001a5a60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n-001a5ab0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error) .
    {.
    <\n-001a5b50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a5b60: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001a5b70: 705f 5f69 6f2e 6874 6d6c 2367 6162 3033 p__io.html#gab03\n-001a5b80: 6537 6132 6332 3630 3530 3034 6337 6637 e7a2c2605004c7f7\n-001a5b90: 3462 6532 3737 3338 6363 3632 3922 3e73 4be27738cc629\">s\n-001a5ba0: 6f61 705f 7365 6e64 5f66 6175 6c74 3c2f oap_send_fault(soap); // se\n-001a5c00: 6e64 2066 6175 6c74 2074 6f20 636c 6965 nd fault to clie\n-001a5c10: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    \n-001a5c20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    \n-001a5c40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .<\n-001a5c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a5c70: 3e20 2020 203c 7370 616e 2063 6c61 7373 > e\n-001a5c90: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if (\n-001a5cc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220
    soap-\n-001a5cf0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n-001a5d40: 6e75 6d3c 2f61 3e29 203c 7370 616e 2063 num) /\n-001a5d60: 2f20 6163 6365 7074 2066 6169 6c65 642c / accept failed,\n-001a5d70: 2074 7279 2061 6761 696e 2061 6674 6572 try again after\n-001a5d80: 2031 2073 6563 6f6e 643c 2f73 7061 6e3e 1 second\n-001a5d90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    \n-001a5e20: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault\n-001a5e30: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001a5e60: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n-001a5e70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    sl\n-001a5e90: 6565 7028 3129 3b3c 2f64 6976 3e0a 3c64 eep(1);
    .\n-001a5eb0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . \n-001a5ed0: 2020 203c 7370 616e 2063 6c61 7373 3d22 els\n-001a5ef0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n-001a5f00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a5f10: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n-001a5f30: 2020 2020 2066 7072 696e 7466 2873 7464 fprintf(std\n-001a5f40: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "server ti\n-001a5f70: 6d65 6420 6f75 745c 6e26 7175 6f74 3b3c med out\\n"<\n-001a5f80: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    .\n-001a5f90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; \n-001a5fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    \n-001a6060: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy\n-001a6070: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a60a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-001a60c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    }\n+001a51e0: 226c 696e 6522 3e20 203c 7370 616e 2063 \"line\"> while \n+001a5210: 2831 293c 2f64 6976 3e0a 3c64 6976 2063 (1)
    .
    {<\n+001a5230: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    \n+001a55b0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    \n+001a55d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_set\n+001a5630: 5f6e 616d 6573 7061 6365 733c 2f61 3e28 _namespaces(\n+001a5640: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a5670: 2071 756f 7465 5f6e 616d 6573 7061 6365 quote_namespace\n+001a5680: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    \n+001a56a0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (quote_ser\n+001a56d0: 7665 5f72 6571 7565 7374 283c 6120 636c ve_request(soap) == <\n+001a5710: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a5720: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a5730: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+001a5740: 6162 3063 3539 3539 6563 3462 3735 3039 ab0c5959ec4b7509\n+001a5750: 6365 3438 6439 6132 3963 3836 3031 6661 ce48d9a29c8601fa\n+001a5760: 6422 3e53 4f41 505f 4e4f 5f4d 4554 484f d\">SOAP_NO_METHO\n+001a5770: 443c 2f61 3e29 203c 2f64 6976 3e0a 3c64 D)
    .\n+001a5790: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    .\n+001a57b0: 2020 2020 2020 2020 3c61 2063 6c61 7373 s\n+001a5810: 6f61 705f 7365 745f 6e61 6d65 7370 6163 oap_set_namespac\n+001a5820: 6573 3c2f 613e 283c 6120 636c 6173 733d es(so\n+001a5850: 6170 3c2f 613e 2c20 7261 7465 5f6e 616d ap, rate_nam\n+001a5860: 6573 7061 6365 7329 3b3c 2f64 6976 3e0a espaces);
    .\n+001a5870: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (r\n+001a58b0: 6174 655f 7365 7276 655f 7265 7175 6573 ate_serve_reques\n+001a58c0: 7428 3c61 2063 6c61 7373 3d22 636f 6465 t(soap))
    ..
    \n+001a5a00: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    \n+001a5a20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+001a5a40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap->\n+001a5aa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error)
    .
    \n+001a5b10: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n+001a5b30: 2020 2020 203c 6120 636c 6173 733d 2263 soap_send_f\n+001a5b90: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+001a5bc0: 736f 6170 3c2f 613e 293b 203c 7370 616e soap); // send fault t\n+001a5bf0: 6f20 636c 6965 6e74 203c 2f73 7061 6e3e o client \n+001a5c00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }\n+001a5c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    else\n+001a5c80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n+001a5cd0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->errnum) <\n+001a5d30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a5d40: 656e 7422 3e2f 2f20 6163 6365 7074 2066 ent\">// accept f\n+001a5d50: 6169 6c65 642c 2074 7279 2061 6761 696e ailed, try again\n+001a5d60: 2061 6674 6572 2031 2073 6563 6f6e 643c after 1 second<\n+001a5d70: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a5d90: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n+001a5db0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print\n+001a5e10: 5f66 6175 6c74 3c2f 613e 283c 6120 636c _fault(soap, stde\n+001a5e50: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    . \n+001a5e70: 2020 2020 736c 6565 7028 3129 3b3c 2f64 sleep(1);.
    } .
    else.
    {.
    fprin\n+001a5f20: 7466 2873 7464 6572 722c 203c 7370 616e tf(stderr, "ser\n+001a5f50: 7665 7220 7469 6d65 6420 6f75 745c 6e26 ver timed out\\n&\n+001a5f60: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); <\n+001a5f70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    break;
    . \n+001a5fd0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    ..\n+001a6090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n+001a6140: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .}\n 001a6170: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-001a6190: 0a3c 6469 7620 636c 6173 733d 226c 696e ..

    This chain\n-001a63c0: 696e 6720 6361 6e20 6265 2061 7262 6974 ing can be arbit\n-001a63d0: 7261 7269 6c79 2064 6565 702e 2057 6865 rarily deep. Whe\n-001a63e0: 6e20 7468 6520 7072 6576 696f 7573 2072 n the previous r\n-001a63f0: 6571 7565 7374 2066 6169 6c73 2077 6974 equest fails wit\n-001a6400: 6820 6120 3c63 6f64 653e 2353 4f41 505f h a #SOAP_\n-001a6410: 4e4f 5f4d 4554 484f 443c 2f63 6f64 653e NO_METHOD\n-001a6420: 2074 6865 6e20 6e65 7874 2072 6571 7565 then next reque\n-001a6430: 7374 2064 6973 7061 7463 6865 7220 6361 st dispatcher ca\n-001a6440: 6e20 6265 2074 7269 6564 2e3c 2f70 3e0a n be tried.

    .\n-001a6450: 3c70 3e54 6865 2073 6572 7665 7220 7368

    The server sh\n-001a6460: 6f75 6c64 2061 6c73 6f20 6465 6669 6e65 ould also define\n-001a6470: 2074 6865 2073 6572 7669 6365 206f 7065 the service ope\n-001a6480: 7261 7469 6f6e 733a 3c2f 703e 0a3c 6469 rations:

    .
    i\n-001a64d0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6765 nt ns__ge\n-001a64e0: 7451 756f 7465 283c 7370 616e 2063 6c61 tQuote(str\n-001a6500: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, char *symbol, float *Result); so\n+001a61e0: 6170 5f64 6573 7472 6f79 3c2f 613e 283c ap_destroy(<\n+001a61f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a6200: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a6210: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001a6220: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s\n+001a6290: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); .

    This\n+001a63a0: 2063 6861 696e 696e 6720 6361 6e20 6265 chaining can be\n+001a63b0: 2061 7262 6974 7261 7269 6c79 2064 6565 arbitrarily dee\n+001a63c0: 702e 2057 6865 6e20 7468 6520 7072 6576 p. When the prev\n+001a63d0: 696f 7573 2072 6571 7565 7374 2066 6169 ious request fai\n+001a63e0: 6c73 2077 6974 6820 6120 3c63 6f64 653e ls with a \n+001a63f0: 2353 4f41 505f 4e4f 5f4d 4554 484f 443c #SOAP_NO_METHOD<\n+001a6400: 2f63 6f64 653e 2074 6865 6e20 6e65 7874 /code> then next\n+001a6410: 2072 6571 7565 7374 2064 6973 7061 7463 request dispatc\n+001a6420: 6865 7220 6361 6e20 6265 2074 7269 6564 her can be tried\n+001a6430: 2e3c 2f70 3e0a 3c70 3e54 6865 2073 6572 .

    .

    The ser\n+001a6440: 7665 7220 7368 6f75 6c64 2061 6c73 6f20 ver should also \n+001a6450: 6465 6669 6e65 2074 6865 2073 6572 7669 define the servi\n+001a6460: 6365 206f 7065 7261 7469 6f6e 733a 3c2f ce operations:.

    int \n+001a64c0: 6e73 5f5f 6765 7451 756f 7465 283c 7370 ns__getQuote(struct\n+001a64f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001a6520: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, cha\n+001a6570: 723c 2f73 7061 6e3e 202a 7379 6d62 6f6c r *symbol\n+001a6580: 2c20 3c73 7061 6e20 636c 6173 733d 226b , floa\n+001a65a0: 743c 2f73 7061 6e3e 202a 5265 7375 6c74 t *Result\n+001a65b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    {.
    {
    .\n-001a6600: 2020 2a52 6573 756c 7420 3d20 2e2e 2e20 *Result = ... \n-001a6610: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .}\n+001a65e0: 6c69 6e65 223e 2020 2a52 6573 756c 7420 line\"> *Result \n+001a65f0: 3d20 2e2e 2e20 3b20 3c2f 6469 763e 0a3c = ... ;
    .<\n+001a6600: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a6610: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+001a6630: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n+001a6690: 4f41 505f 4f4b 3c2f 613e 3b20 3c2f 6469 OAP_OK; .
    }
    .\n 001a66d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    in\n-001a6720: 743c 2f73 7061 6e3e 206e 735f 5f67 6574 t ns__get\n-001a6730: 5261 7465 283c 7370 616e 2063 6c61 7373 Rate(struc\n-001a6750: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001a6780: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, char\n-001a67e0: 202a 636f 756e 7472 7931 2c20 3c73 7061 *country1, char *country2, float *Result); int n\n+001a6710: 735f 5f67 6574 5261 7465 283c 7370 616e s__getRate(struct <\n+001a6740: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a6750: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a6760: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001a6770: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a67a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001a67c0: 2f73 7061 6e3e 202a 636f 756e 7472 7931 /span> *country1\n+001a67d0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n+001a67f0: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country\n+001a6800: 322c 203c 7370 616e 2063 6c61 7373 3d22 2, flo\n+001a6820: 6174 3c2f 7370 616e 3e20 2a52 6573 756c at *Resul\n+001a6830: 7429 3b20 3c2f 6469 763e 0a3c 6469 7620 t);
    .
    {.
    {
    .<\n-001a6870: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a6880: 3e20 202a 5265 7375 6c74 203d 202e 2e2e > *Result = ...\n-001a6890: 203b 203c 2f64 6976 3e0a 3c64 6976 2063 ;
    ..\n-001a6950: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n-001a6970: 703e 486f 7765 7665 722c 2074 6865 2077 p>However, the w\n-001a6980: 6869 6c65 206c 6f6f 7020 6974 6572 6174 hile loop iterat\n-001a6990: 6573 2066 6f72 2065 6163 6820 6e65 7720 es for each new \n-001a69a0: 636f 6e6e 6563 7469 6f6e 2074 6861 7420 connection that \n-001a69b0: 6973 2065 7374 6162 6c69 7368 6564 2077 is established w\n-001a69c0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_accept and do\n-001a6a60: 6573 206e 6f74 2061 6c6c 6f77 2066 6f72 es not allow for\n-001a6a70: 2048 5454 5020 6b65 6570 2d61 6c69 7665 HTTP keep-alive\n-001a6a80: 2063 6f6e 6e65 6374 696f 6e73 2074 6f20 connections to \n-001a6a90: 7065 7273 6973 742e 2046 6f72 206f 7572 persist. For our\n-001a6aa0: 2066 696e 616c 2069 6d70 726f 7665 6d65 final improveme\n-001a6ab0: 6e74 2077 6520 7761 6e74 2074 6f20 7375 nt we want to su\n-001a6ac0: 7070 6f72 7420 4854 5450 206b 6565 702d pport HTTP keep-\n-001a6ad0: 616c 6976 6520 636f 6e6e 6563 7469 6f6e alive connection\n-001a6ae0: 7320 7468 6174 2072 6571 7569 7265 206c s that require l\n-001a6af0: 6f6f 7069 6e67 206f 7665 7220 7468 6520 ooping over the \n-001a6b00: 7365 7276 6963 6520 6469 7370 6174 6368 service dispatch\n-001a6b10: 6573 2075 6e74 696c 2074 6865 2063 6f6e es until the con\n-001a6b20: 6e65 6374 696f 6e20 636c 6f73 6573 206f nection closes o\n-001a6b30: 6e20 6569 7468 6572 2065 6e64 2c20 6166 n either end, af\n-001a6b40: 7465 7220 7768 6963 6820 7765 2072 6573 ter which we res\n-001a6b50: 756d 6520 7468 6520 6f75 7465 7220 6c6f ume the outer lo\n-001a6b60: 6f70 2e20 5468 6520 7265 7375 6c74 696e op. The resultin\n-001a6b70: 6720 636f 6465 2069 7320 7665 7279 2063 g code is very c\n-001a6b80: 6c6f 7365 2074 6f20 7468 6520 736f 6170 lose to the soap\n-001a6b90: 6370 7032 2d67 656e 6572 6174 6564 203c cpp2-generated <\n-001a6ba0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_serve code a\n-001a6c30: 6e64 2074 6865 203c 636f 6465 3e73 6572 nd the ser\n-001a6c40: 7665 3c2f 636f 6465 3e20 7365 7276 6963 ve servic\n-001a6c50: 6520 636c 6173 7320 6d65 7468 6f64 732c e class methods,\n-001a6c60: 2077 6974 6820 7468 6520 6164 6469 7469 with the additi\n-001a6c70: 6f6e 206f 6620 7468 6520 6368 6169 6e20 on of the chain \n-001a6c80: 6f66 2073 6572 7669 6365 2064 6973 7061 of service dispa\n-001a6c90: 7463 6865 7320 696e 2074 6865 206c 6f6f tches in the loo\n-001a6ca0: 7020 626f 6479 3a3c 2f70 3e0a 3c64 6976 p body:

    .
    #\n-001a6cf0: 696e 636c 7564 6520 2671 756f 743b 7175 include "qu\n-001a6d00: 6f74 6548 2e68 2671 756f 743b 3c2f 7370 oteH.h"
    .
    #include \n-001a6d50: 2671 756f 743b 7261 7465 482e 6826 7175 "rateH.h&qu\n-001a6d60: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n-001a6d70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n-001a6da0: 6e63 6c75 6465 2026 7175 6f74 3b71 756f nclude "quo\n-001a6db0: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
    .#includ\n-001a6e00: 6520 2671 756f 743b 7261 7465 2e6e 736d e "rate.nsm\n-001a6e10: 6170 2671 756f 743b 3c2f 7370 616e 3e3c ap"<\n+001a6860: 226c 696e 6522 3e20 202a 5265 7375 6c74 \"line\"> *Result\n+001a6870: 203d 202e 2e2e 203b 203c 2f64 6976 3e0a = ... ;
    .\n+001a6880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+001a68b0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+001a6910: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .

    However,\n+001a6960: 2074 6865 2077 6869 6c65 206c 6f6f 7020 the while loop \n+001a6970: 6974 6572 6174 6573 2066 6f72 2065 6163 iterates for eac\n+001a6980: 6820 6e65 7720 636f 6e6e 6563 7469 6f6e h new connection\n+001a6990: 2074 6861 7420 6973 2065 7374 6162 6c69 that is establi\n+001a69a0: 7368 6564 2077 6974 6820 3c63 6f64 653e shed with \n+001a69b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ac\n+001a6a30: 6365 7074 3c2f 613e 3c2f 636f 6465 3e20 cept \n+001a6a40: 616e 6420 646f 6573 206e 6f74 2061 6c6c and does not all\n+001a6a50: 6f77 2066 6f72 2048 5454 5020 6b65 6570 ow for HTTP keep\n+001a6a60: 2d61 6c69 7665 2063 6f6e 6e65 6374 696f -alive connectio\n+001a6a70: 6e73 2074 6f20 7065 7273 6973 742e 2046 ns to persist. F\n+001a6a80: 6f72 206f 7572 2066 696e 616c 2069 6d70 or our final imp\n+001a6a90: 726f 7665 6d65 6e74 2077 6520 7761 6e74 rovement we want\n+001a6aa0: 2074 6f20 7375 7070 6f72 7420 4854 5450 to support HTTP\n+001a6ab0: 206b 6565 702d 616c 6976 6520 636f 6e6e keep-alive conn\n+001a6ac0: 6563 7469 6f6e 7320 7468 6174 2072 6571 ections that req\n+001a6ad0: 7569 7265 206c 6f6f 7069 6e67 206f 7665 uire looping ove\n+001a6ae0: 7220 7468 6520 7365 7276 6963 6520 6469 r the service di\n+001a6af0: 7370 6174 6368 6573 2075 6e74 696c 2074 spatches until t\n+001a6b00: 6865 2063 6f6e 6e65 6374 696f 6e20 636c he connection cl\n+001a6b10: 6f73 6573 206f 6e20 6569 7468 6572 2065 oses on either e\n+001a6b20: 6e64 2c20 6166 7465 7220 7768 6963 6820 nd, after which \n+001a6b30: 7765 2072 6573 756d 6520 7468 6520 6f75 we resume the ou\n+001a6b40: 7465 7220 6c6f 6f70 2e20 5468 6520 7265 ter loop. The re\n+001a6b50: 7375 6c74 696e 6720 636f 6465 2069 7320 sulting code is \n+001a6b60: 7665 7279 2063 6c6f 7365 2074 6f20 7468 very close to th\n+001a6b70: 6520 736f 6170 6370 7032 2d67 656e 6572 e soapcpp2-gener\n+001a6b80: 6174 6564 203c 636f 6465 3e3c 6120 636c ated soap_s\n+001a6c00: 6572 7665 3c2f 613e 3c2f 636f 6465 3e20 erve \n+001a6c10: 636f 6465 2061 6e64 2074 6865 203c 636f code and the serve \n+001a6c30: 7365 7276 6963 6520 636c 6173 7320 6d65 service class me\n+001a6c40: 7468 6f64 732c 2077 6974 6820 7468 6520 thods, with the \n+001a6c50: 6164 6469 7469 6f6e 206f 6620 7468 6520 addition of the \n+001a6c60: 6368 6169 6e20 6f66 2073 6572 7669 6365 chain of service\n+001a6c70: 2064 6973 7061 7463 6865 7320 696e 2074 dispatches in t\n+001a6c80: 6865 206c 6f6f 7020 626f 6479 3a3c 2f70 he loop body:.

    #include &q\n+001a6ce0: 756f 743b 7175 6f74 6548 2e68 2671 756f uot;quoteH.h&quo\n+001a6cf0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n+001a6d00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+001a6d30: 636c 7564 6520 2671 756f 743b 7261 7465 clude "rate\n+001a6d40: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h"\n+001a6d50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n+001a6d90: 6f74 3b71 756f 7465 2e6e 736d 6170 2671 ot;quote.nsmap&q\n+001a6da0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    #\n+001a6de0: 696e 636c 7564 6520 2671 756f 743b 7261 include "ra\n+001a6df0: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
    . <\n 001a6e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-001a6e40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-001a6e70: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-001a6ea0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001a6ed0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-001a6f30: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); ..<\n+001a6e30: 3d22 6c69 6e65 223e 3c73 7061 6e20 636c =\"line\">st\n+001a6e50: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+001a6ec0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a6ed0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a6ee0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001a6ef0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n+001a6f00: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n+001a6f10: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n+001a6f20: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    if\n+001a6f60: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_valid_s\n+001a6fc0: 6f63 6b65 743c 2f61 3e28 3c61 2063 6c61 ocket(soap_b\n+001a7020: 696e 643c 2f61 3e28 3c61 2063 6c61 7373 ind(s\n+001a7050: 6f61 703c 2f61 3e2c 204e 554c 4c2c 2038 oap, NULL, 8\n+001a7060: 3038 302c 2031 3029 2929 203c 7370 616e 080, 10))) // small BACKLO\n+001a7090: 4720 666f 7220 6974 6572 6174 6976 6520 G for iterative \n+001a70a0: 7365 7276 6572 733c 2f73 7061 6e3e 3c2f servers.
    {
    .<\n 001a70d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a70e0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    while (1)
    .\n-001a7140: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-001a7160: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_vali\n-001a71e0: 645f 736f 636b 6574 3c2f 613e 283c 6120 d_socket(soa\n-001a7240: 705f 6163 6365 7074 3c2f 613e 283c 6120 p_accept(soap)))<\n-001a7280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    soap->\n-001a72f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 keep_al\n-001a7340: 6976 653c 2f61 3e20 3d20 3c61 2063 6c61 ive = soap->max_keep_\n-001a73d0: 616c 6976 653c 2f61 3e20 2b20 313b 203c alive + 1; <\n-001a73e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001a73f0: 656e 7422 3e2f 2f20 6d61 7820 6b65 6570 ent\">// max keep\n-001a7400: 2d61 6c69 7665 2069 7465 7261 7469 6f6e -alive iteration\n-001a7410: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-001a7420: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a7430: 3e20 2020 2020 203c 7370 616e 2063 6c61 > do
    \n-001a7460: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    \n-001a7480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (\n-001a74c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a74f0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ke\n-001a7540: 6570 5f61 6c69 7665 3c2f 613e 2026 6774 ep_alive >\n-001a7550: 3b20 3029 2026 616d 703b 2661 6d70 3b20 ; 0) && \n-001a7560: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a7590: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ma\n-001a75e0: 785f 6b65 6570 5f61 6c69 7665 3c2f 613e x_keep_alive\n-001a75f0: 2026 6774 3b20 3029 293c 2f64 6976 3e0a > 0))
    .\n-001a7600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->\n-001a7650: 3c61 2063 6c61 7373 3d22 636f 6465 2220 keep_al\n-001a76a0: 6976 653c 2f61 3e2d 2d3b 3c2f 6469 763e ive--;
    \n-001a76b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. \n-001a77a0: 2020 2020 2020 207b 3c2f 6469 763e 0a3c {
    .<\n-001a77b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a77c0: 3e20 2020 2020 2020 2020 203c 7370 616e > if (\n-001a77f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001a7820: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n-001a7870: 6f72 3c2f 613e 2026 6774 3b3d 203c 6120 or >= SOAP_STOP) \n-001a78e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // if a pl\n-001a7900: 7567 696e 2068 6173 2073 6572 7665 6420 ugin has served \n-001a7910: 7468 6520 7265 7175 6573 743c 2f73 7061 the request
    .
    \n-001a7940: 2020 2020 2020 203c 7370 616e 2063 6c61 continue\n-001a7970: 3b20 2020 2020 2020 2020 2020 2020 2020 ; \n-001a7980: 2020 2020 3c73 7061 6e20 636c 6173 733d // the\n-001a79a0: 6e20 636f 6e74 696e 7565 2077 6974 6820 n continue with \n-001a79b0: 7468 6520 6e65 7874 2072 6571 7565 7374 the next request\n-001a79c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a79e0: 2020 2020 2020 2020 2020 3c73 7061 6e20 break\n-001a7a10: 3b20 2020 2020 2020 2020 2020 2020 2020 ; \n-001a7a20: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001a7a40: 2f20 616e 2065 7272 6f72 206f 6363 7572 / an error occur\n-001a7a50: 7265 643c 2f73 7061 6e3e 3c2f 6469 763e red
    \n-001a7a60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }.
    soap_set_nam\n-001a7b00: 6573 7061 6365 733c 2f61 3e28 3c61 2063 espaces(soap, quo\n-001a7b40: 7465 5f6e 616d 6573 7061 6365 7329 3b3c te_namespaces);<\n-001a7b50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001a7b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (quote_serve\n-001a7ba0: 5f72 6571 7565 7374 283c 6120 636c 6173 _request(\n-001a7bd0: 736f 6170 3c2f 613e 2920 3d3d 203c 6120 soap) == SOAP_NO_METHOD<\n-001a7c40: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    . \n-001a7c60: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    .\n-001a7c80: 2020 2020 2020 2020 2020 3c61 2063 6c61 soap_set_namesp\n-001a7cf0: 6163 6573 3c2f 613e 283c 6120 636c 6173 aces(\n-001a7d20: 736f 6170 3c2f 613e 2c20 7261 7465 5f6e soap, rate_n\n-001a7d30: 616d 6573 7061 6365 7329 3b3c 2f64 6976 amespaces);.
    if (rate_serve_re\n-001a7d90: 7175 6573 7428 3c61 2063 6c61 7373 3d22 quest(soa\n-001a7dc0: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
    .\n-001a7de0: 2020 2020 2020 2020 2020 2020 3c61 2063 soap\n-001a7e40: 5f73 656e 645f 6661 756c 743c 2f61 3e28 _send_fault(\n-001a7e50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-001a7e80: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // send \n-001a7ea0: 6661 756c 7420 746f 2063 6c69 656e 7420 fault to client \n-001a7eb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a7ed0: 2020 2020 2020 2020 7d20 3c2f 6469 763e }
    \n-001a7ee0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    else\n-001a7f20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n-001a7f70: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error) .
    {\n-001a7ff0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a8010: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_send_fau\n-001a8070: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so\n-001a80a0: 6170 3c2f 613e 293b 203c 7370 616e 2063 ap); /\n-001a80c0: 2f20 7365 6e64 2066 6175 6c74 2074 6f20 / send fault to \n-001a80d0: 636c 6965 6e74 203c 2f73 7061 6e3e 3c2f client .
    }\n-001a8100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n-001a81c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    s\n-001a8230: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); .
    } <\n-001a8290: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a82a0: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (so\n-001a82e0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->keep_alive);
    .
    \n-001a8360: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    <\n-001a8380: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a8390: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else i\n-001a83c0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->errnum) // acce\n-001a8470: 7074 2066 6169 6c65 642c 2074 7279 2061 pt failed, try a\n-001a8480: 6761 696e 2061 6674 6572 2031 2073 6563 gain after 1 sec\n-001a8490: 6f6e 643c 2f73 7061 6e3e 3c2f 6469 763e ond
    \n-001a84a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n-001a84c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a84d0: 3e20 2020 2020 203c 6120 636c 6173 733d > soap_p\n-001a8530: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-001a8540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a8550: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a8560: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001a8570: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-001a8580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    sleep(1)\n-001a85a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    } \n-001a85c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else
    .
    {\n-001a8620: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    f\n-001a8640: 7072 696e 7466 2873 7464 6572 722c 203c printf(stderr, <\n-001a8650: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001a8660: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-001a8670: 3b73 6572 7665 7220 7469 6d65 6420 6f75 ;server timed ou\n-001a8680: 745c 6e26 7175 6f74 3b3c 2f73 7061 6e3e t\\n"\n-001a8690: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-001a86b0: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n-001a86d0: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    \n-001a86e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .<\n-001a8700: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a8710: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_d\n-001a8770: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .
    s\n-001a8820: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); .
    }
    \n+001a70e0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > whi\n+001a7100: 6c65 3c2f 7370 616e 3e20 2831 293c 2f64 le (1).
    {
    .\n+001a7130: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n+001a7280: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+001a72a0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->k\n+001a7320: 6565 705f 616c 6976 653c 2f61 3e20 3d20 eep_alive = \n+001a7330: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001a7360: 2667 743b 3c61 2063 6c61 7373 3d22 636f >max\n+001a73b0: 5f6b 6565 705f 616c 6976 653c 2f61 3e20 _keep_alive \n+001a73c0: 2b20 313b 203c 7370 616e 2063 6c61 7373 + 1; // ma\n+001a73e0: 7820 6b65 6570 2d61 6c69 7665 2069 7465 x keep-alive ite\n+001a73f0: 7261 7469 6f6e 733c 2f73 7061 6e3e 3c2f rations.
    do\n+001a7440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {\n+001a7460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a7480: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if ((so\n+001a74d0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->keep_alive > 0) &\n+001a7540: 2661 6d70 3b20 283c 6120 636c 6173 733d & (so\n+001a7570: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->max_keep_ali\n+001a75d0: 7665 3c2f 613e 2026 6774 3b20 3029 293c ve > 0))<\n+001a75e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+001a7600: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->k\n+001a7680: 6565 705f 616c 6976 653c 2f61 3e2d 2d3b eep_alive--;\n+001a7690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a76b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_begin\n+001a7730: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap)).
    {.
    \n+001a77b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n+001a7800: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error >\n+001a7860: 3b3d 203c 6120 636c 6173 733d 2263 6f64 ;= SOAP_STOP\n+001a78c0: 3c2f 613e 2920 3c73 7061 6e20 636c 6173 ) // i\n+001a78e0: 6620 6120 706c 7567 696e 2068 6173 2073 f a plugin has s\n+001a78f0: 6572 7665 6420 7468 6520 7265 7175 6573 erved the reques\n+001a7900: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
    .<\n+001a7910: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a7920: 3e20 2020 2020 2020 2020 2020 203c 7370 > continue<\n+001a7950: 2f73 7061 6e3e 3b20 2020 2020 2020 2020 /span>; \n+001a7960: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n+001a7980: 2f2f 2074 6865 6e20 636f 6e74 696e 7565 // then continue\n+001a7990: 2077 6974 6820 7468 6520 6e65 7874 2072 with the next r\n+001a79a0: 6571 7565 7374 3c2f 7370 616e 3e3c 2f64 equest.
    \n+001a79d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n+001a79f0: 2f73 7061 6e3e 3b20 2020 2020 2020 2020 /span>; \n+001a7a00: 2020 2020 2020 2020 2020 2020 2020 203c <\n+001a7a10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a7a20: 656e 7422 3e2f 2f20 616e 2065 7272 6f72 ent\">// an error\n+001a7a30: 206f 6363 7572 7265 643c 2f73 7061 6e3e occurred\n+001a7a40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a7a60: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .. \n+001a7b50: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+001a7b70: 6966 3c2f 7370 616e 3e20 2871 756f 7465 if (quote\n+001a7b80: 5f73 6572 7665 5f72 6571 7565 7374 283c _serve_request(<\n+001a7b90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a7ba0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a7bb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2920 html\">soap) \n+001a7bc0: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == SOAP_NO_M\n+001a7c20: 4554 484f 443c 2f61 3e29 203c 2f64 6976 ETHOD) .
    {.
    \n+001a7c70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_\n+001a7cd0: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(<\n+001a7ce0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a7cf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a7d00: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001a7d10: 7261 7465 5f6e 616d 6573 7061 6365 7329 rate_namespaces)\n+001a7d20: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n+001a7d40: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n+001a7d60: 3c2f 7370 616e 3e20 2872 6174 655f 7365 (rate_se\n+001a7d70: 7276 655f 7265 7175 6573 7428 3c61 2063 rve_request(soap)).
    \n+001a7dd0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_send_faul\n+001a7e30: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n+001a7e60: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); //\n+001a7e80: 2073 656e 6420 6661 756c 7420 746f 2063 send fault to c\n+001a7e90: 6c69 656e 7420 3c2f 7370 616e 3e3c 2f64 lient .
    } \n+001a7ec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a7ee0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+001a7f00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap->\n+001a7f60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error)
    .
    \n+001a7fd0: 2020 2020 207b 3c2f 6469 763e 0a3c 6469 {
    . \n+001a7ff0: 2020 2020 2020 2020 203c 6120 636c 6173
    soap_se\n+001a8050: 6e64 5f66 6175 6c74 3c2f 613e 283c 6120 nd_fault(soap); <\n+001a8090: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a80a0: 656e 7422 3e2f 2f20 7365 6e64 2066 6175 ent\">// send fau\n+001a80b0: 6c74 2074 6f20 636c 6965 6e74 203c 2f73 lt to client
    .
    \n+001a80e0: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    . \n+001a8100: 2020 2020 2020 203c 6120 636c 6173 733d soap\n+001a8160: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap); <\n+001a81a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+001a81c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .\n+001a8330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .<\n+001a8350: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a8360: 3e20 2020 203c 7370 616e 2063 6c61 7373 > e\n+001a8380: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if (\n+001a83b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001a83e0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+001a8430: 6e75 6d3c 2f61 3e29 203c 7370 616e 2063 num) /\n+001a8450: 2f20 6163 6365 7074 2066 6169 6c65 642c / accept failed,\n+001a8460: 2074 7279 2061 6761 696e 2061 6674 6572 try again after\n+001a8470: 2031 2073 6563 6f6e 643c 2f73 7061 6e3e 1 second\n+001a8480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    \n+001a8510: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault\n+001a8520: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a8550: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n+001a8560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    sl\n+001a8580: 6565 7028 3129 3b3c 2f64 6976 3e0a 3c64 eep(1);
    .\n+001a85a0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . \n+001a85c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 els\n+001a85e0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n+001a85f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a8600: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n+001a8620: 2020 2020 2066 7072 696e 7466 2873 7464 fprintf(std\n+001a8630: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "server ti\n+001a8660: 6d65 6420 6f75 745c 6e26 7175 6f74 3b3c med out\\n"<\n+001a8670: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    .\n+001a8680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; \n+001a86c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    \n+001a8750: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy\n+001a8760: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a8790: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+001a87b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    }\n+001a8860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n 001a8880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    .soap_end(\n-001a89c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-001a89f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-001a8a60: 736f 6170 5f66 7265 653c 2f61 3e28 3c61 soap_free(soap);<\n-001a8aa0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001a8ac0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n-001a8ae0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .How to cr\n-001a8b20: 6561 7465 2044 4c4c 733c 2f68 323e 0a3c eate DLLs

    .<\n-001a8b30: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-001a8b50: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-001a8b60: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .Cre\n-001a8b90: 6174 696e 6720 7468 6520 6261 7365 2073 ating the base s\n-001a8ba0: 7464 736f 6170 322e 646c 6c3c 2f68 333e tdsoap2.dll

    \n-001a8bb0: 0a3c 703e 5468 6520 656e 6769 6e65 2064 .

    The engine d\n-001a8bc0: 6f65 7320 6e6f 7420 6465 6669 6e65 2053 oes not define S\n-001a8bd0: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F\n-001a8be0: 6175 6c74 2073 6572 6961 6c69 7a65 7273 ault serializers\n-001a8bf0: 2074 6861 7420 7468 6520 656e 6769 6e65 that the engine\n-001a8c00: 206e 6565 6473 2077 6865 6e20 696e 7374 needs when inst\n-001a8c10: 616c 6c65 6420 6173 2061 206c 6962 7261 alled as a libra\n-001a8c20: 7279 2e20 5765 2074 6865 7265 666f 7265 ry. We therefore\n-001a8c30: 2061 6464 2053 4f41 5020 4865 6164 6572 add SOAP Header\n-001a8c40: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria\n-001a8c50: 6c69 7a65 7273 2c20 7768 6963 6820 6172 lizers, which ar\n-001a8c60: 6520 636f 6d70 696c 6564 2073 6570 6172 e compiled separ\n-001a8c70: 6174 656c 7920 6173 2066 6f6c 6c6f 7773 ately as follows\n-001a8c80: 2e20 4669 7273 742c 2063 7265 6174 6520 . First, create \n-001a8c90: 6120 6e65 7720 6865 6164 6572 2066 696c a new header fil\n-001a8ca0: 6520 3c65 6d3e 3c63 6f64 653e 656e 762e e env.\n-001a8cb0: 683c 2f63 6f64 653e 3c2f 656d 3e20 7769 h wi\n-001a8cc0: 7468 2074 6865 2053 4f41 5020 4865 6164 th the SOAP Head\n-001a8cd0: 6572 203c 636f 6465 3e3c 6120 636c 6173 er SOAP_ENV__He\n-001a8d40: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n-001a8d50: 616e 6420 534f 4150 2046 6175 6c74 203c and SOAP Fault <\n-001a8d60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SO\n-001a8dc0: 4150 5f45 4e56 5f5f 4661 756c 743c 2f61 AP_ENV__Fault structu\n-001a8de0: 7265 732c 2069 6e63 6c75 6469 6e67 203c res, including <\n-001a8df0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SOAP_ENV__\n-001a8e60: 4465 7461 696c 3c2f 613e 3c2f 636f 6465 Detail if this struct\n-001a8e80: 7572 6520 636f 6e74 6169 6e73 206d 656d ure contains mem\n-001a8e90: 6265 7273 2074 6861 7420 6172 6520 7365 bers that are se\n-001a8ea0: 7269 616c 697a 6564 2061 7320 6661 756c rialized as faul\n-001a8eb0: 7420 6465 7461 696c 732e 2059 6f75 2063 t details. You c\n-001a8ec0: 616e 206c 6561 7665 2074 6869 7320 6865 an leave this he\n-001a8ed0: 6164 6572 2066 696c 6520 656d 7074 7920 ader file empty \n-001a8ee0: 6966 2079 6f75 2077 616e 7420 746f 2075 if you want to u\n-001a8ef0: 7365 2074 6865 2064 6566 6175 6c74 2053 se the default S\n-001a8f00: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F\n-001a8f10: 6175 6c74 2e20 486f 7765 7665 722c 2069 ault. However, i\n-001a8f20: 6620 534f 4150 2048 6561 6465 7273 2061 f SOAP Headers a\n-001a8f30: 7265 2072 6571 7569 7265 6420 7468 656e re required then\n-001a8f40: 2079 6f75 2063 616e 6e6f 7420 6c65 6176 you cannot leav\n-001a8f50: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the SOAP_ENV_\n-001a8fc0: 5f48 6561 6465 723c 2f61 3e3c 2f63 6f64 _Header structure emp\n-001a8fe0: 7479 2e20 466f 7220 6578 616d 706c 652c ty. For example,\n-001a8ff0: 2074 6865 2057 532d 4164 6472 6573 7369 the WS-Addressi\n-001a9000: 6e67 2061 6e64 2057 532d 5365 6375 7269 ng and WS-Securi\n-001a9010: 7479 2070 6c75 6769 6e73 2072 6571 7569 ty plugins requi\n-001a9020: 7265 2053 4f41 5020 4865 6164 6572 7320 re SOAP Headers \n-001a9030: 7768 6963 6820 6361 6e20 6265 2069 6d70 which can be imp\n-001a9040: 6f72 7465 6420 6279 2061 6464 696e 6720 orted by adding \n-001a9050: 3c63 6f64 653e 2369 6d70 6f72 7420 2277 #import \"w\n-001a9060: 7361 352e 6822 3c2f 636f 6465 3e20 616e sa5.h\" an\n-001a9070: 6420 3c63 6f64 653e 2369 6d70 6f72 7420 d #import \n-001a9080: 2277 7373 652e 6822 3c2f 636f 6465 3e2c \"wsse.h\",\n-001a9090: 2072 6573 7065 6374 6976 656c 7920 746f respectively to\n-001a90a0: 203c 656d 3e3c 636f 6465 3e65 6e76 2e68 env.h\n-001a90b0: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5468 . Th\n-001a90c0: 656e 2063 6f6d 7069 6c65 2074 6869 7320 en compile this \n-001a90d0: 6865 6164 6572 2066 696c 6520 7769 7468 header file with\n-001a90e0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     soa\n-001a9100: 7063 7070 3220 2d70 656e 7620 656e 762e  pcpp2 -penv env.\n-001a9110: 680a 3c2f 7072 653e 3c70 3e20 5468 6520  h.

    The \n-001a9120: 6765 6e65 7261 7465 6420 3c65 6d3e 3c63 generated envC.cpp file ho\n-001a9150: 6c64 7320 7468 6520 534f 4150 2048 6561 lds the SOAP Hea\n-001a9160: 6465 7220 616e 6420 4661 756c 7420 7365 der and Fault se\n-001a9170: 7269 616c 697a 6572 732e 2057 6520 6361 rializers. We ca\n-001a9180: 6e20 6569 7468 6572 2063 7265 6174 6520 n either create \n-001a9190: 6120 7365 7061 7261 7465 203c 656d 3e3c a separate <\n-001a91a0: 636f 6465 3e65 6e76 432e 646c 6c3c 2f63 code>envC.dll DLL fo\n-001a91c0: 7220 7468 6973 2074 6861 7420 616c 6c20 r this that all \n-001a91d0: 636c 6965 6e74 7320 616e 6420 7365 7276 clients and serv\n-001a91e0: 6963 6520 6170 706c 6963 6174 696f 6e73 ice applications\n-001a91f0: 2077 696c 6c20 7573 652c 206f 7220 636f will use, or co\n-001a9200: 6d62 696e 6520 3c65 6d3e 3c63 6f64 653e mbine \n-001a9210: 656e 7643 2e63 7070 3c2f 636f 6465 3e3c envC.cpp<\n-001a9220: 2f65 6d3e 2077 6974 6820 7468 6520 3c65 /em> with the stdsoap2\n-001a9240: 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e .dll\n-001a9250: 2077 6520 6372 6561 7465 2c20 7768 6963 we create, whic\n-001a9260: 6820 7765 2077 696c 6c20 6578 706c 6169 h we will explai\n-001a9270: 6e20 6675 7274 6865 722e 3c2f 703e 0a3c n further.

    .<\n-001a9280: 703e 5468 6520 6e65 7874 2073 7465 7020 p>The next step \n-001a9290: 6973 2074 6f20 6372 6561 7465 203c 656d is to create stdsoap2.\n-001a92b0: 646c 6c3c 2f63 6f64 653e 3c2f 656d 3e20 dll \n-001a92c0: 7768 6963 6820 636f 6e73 6973 7473 206f which consists o\n-001a92d0: 6620 7468 6520 6669 6c65 203c 656d 3e3c f the file <\n-001a92e0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-001a92f0: 6170 322e 6370 703c 2f63 6f64 653e 3c2f ap2.cpp and envC.cpp and optio\n-001a9330: 6e61 6c6c 7920 7468 6520 706c 7567 696e nally the plugin\n-001a9340: 7320 796f 7520 7761 6e74 2074 6f20 7573 s you want to us\n-001a9350: 6520 7375 6368 2061 7320 3c65 6d3e 3c63 e such as wsseapi.cpp<\n-001a9370: 2f63 6f64 653e 3c2f 656d 3e20 2877 6520 /code> (we \n-001a9380: 6e65 6564 2074 6f20 7265 6e61 6d65 2061 need to rename a\n-001a9390: 6c6c 203c 656d 3e3c 636f 6465 3e2e 633c ll .c<\n-001a93a0: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n-001a93b0: 7320 746f 203c 656d 3e3c 636f 6465 3e2e s to .\n-001a93c0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n-001a93d0: 6669 6c65 7320 746f 2061 766f 6964 2069 files to avoid i\n-001a93e0: 7373 7565 7320 7769 7468 204d 5356 432b ssues with MSVC+\n-001a93f0: 2b29 2e20 5468 6973 2044 4c4c 2063 6f6e +). This DLL con\n-001a9400: 7461 696e 7320 616c 6c20 636f 6d6d 6f6e tains all common\n-001a9410: 2066 756e 6374 696f 6e73 206e 6565 6465 functions neede\n-001a9420: 6420 666f 7220 616c 6c20 6f74 6865 7220 d for all other \n-001a9430: 636c 6965 6e74 7320 616e 6420 7365 7276 clients and serv\n-001a9440: 6572 7320 6261 7365 6420 6f6e 2067 534f ers based on gSO\n-001a9450: 4150 2e20 436f 6d70 696c 6520 3c65 6d3e AP. Compile \n-001a9460: 3c63 6f64 653e 656e 7643 2e63 7070 3c2f envC.cpp and <\n-001a9480: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n-001a9490: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp into stdsoap2.\n-001a94c0: 646c 6c3c 2f63 6f64 653e 3c2f 656d 3e20 dll
    \n-001a94d0: 7573 696e 6720 7468 6520 636f 6d70 696c using the compil\n-001a94e0: 6572 206f 7074 696f 6e20 3c63 6f64 653e er option \n-001a94f0: 2f44 3c2f 636f 6465 3e20 3c63 6f64 653e /D \n-001a9500: 2357 4954 485f 4e4f 4e41 4d45 5350 4143 #WITH_NONAMESPAC\n-001a9510: 4553 3c2f 636f 6465 3e20 616e 6420 7468 ES and th\n-001a9520: 6520 4d53 5643 2050 7265 2d50 726f 6365 e MSVC Pre-Proce\n-001a9530: 7373 6f72 2064 6566 696e 6974 696f 6e73 ssor definitions\n-001a9540: 203c 636f 6465 3e53 4f41 505f 464d 4143 SOAP_FMAC\n-001a9550: 313d 5f5f 6465 636c 7370 6563 2864 6c6c 1=__declspec(dll\n-001a9560: 6578 706f 7274 293c 2f63 6f64 653e 2c20 export), \n-001a9570: 3c63 6f64 653e 534f 4150 5f46 4d41 4333 SOAP_FMAC3\n-001a9580: 3d5f 5f64 6563 6c73 7065 6328 646c 6c65 =__declspec(dlle\n-001a9590: 7870 6f72 7429 3c2f 636f 6465 3e2c 2061 xport), a\n-001a95a0: 6e64 2074 6865 203c 636f 6465 3e23 534f nd the #SO\n-001a95b0: 4150 5f53 5444 5f45 5850 4f52 5453 3c2f AP_STD_EXPORTS macro set \n-001a95d0: 6173 2073 686f 776e 2062 656c 6f77 2066 as shown below f\n-001a95e0: 726f 6d20 7468 6520 4d53 5643 2063 6f6d rom the MSVC com\n-001a95f0: 6d61 6e64 2070 726f 6d70 743a 203c 2f70 mand prompt:
    C:> cl\n-001a9620: 202f 6320 2f49 2e20 2f45 4873 6320 2f44   /c /I. /EHsc /D\n-001a9630: 5749 5448 5f4e 4f4e 414d 4553 5041 4345  WITH_NONAMESPACE\n-001a9640: 5320 2f44 534f 4150 5f46 4d41 4331 3d5f  S /DSOAP_FMAC1=_\n-001a9650: 5f64 6563 6c73 7065 6328 646c 6c65 7870  _declspec(dllexp\n-001a9660: 6f72 7429 202f 4453 4f41 505f 464d 4143  ort) /DSOAP_FMAC\n-001a9670: 333d 5f5f 6465 636c 7370 6563 2864 6c6c  3=__declspec(dll\n-001a9680: 6578 706f 7274 2920 2f44 534f 4150 5f53  export) /DSOAP_S\n-001a9690: 5444 5f45 5850 4f52 5453 2065 6e76 432e  TD_EXPORTS envC.\n-001a96a0: 6370 7020 7374 6473 6f61 7032 2e63 7070  cpp stdsoap2.cpp\n-001a96b0: 0a43 3a26 6774 3b20 6c69 6e6b 202f 4c49  .C:> link /LI\n-001a96c0: 4250 4154 4820 7773 325f 3332 2e6c 6962  BPATH ws2_32.lib\n-001a96d0: 202f 4f55 543a 6d79 6773 6f61 702e 646c   /OUT:mygsoap.dl\n-001a96e0: 6c20 2f44 4c4c 2065 6e76 432e 6f62 6a20  l /DLL envC.obj \n-001a96f0: 7374 6473 6f61 7032 2e6f 626a 0a3c 2f70  stdsoap2.obj.

    Note: as \n-001a9710: 6f66 2067 534f 4150 2032 2e38 2e33 3020 of gSOAP 2.8.30 \n-001a9720: 616e 6420 6c61 7465 722c 2074 6865 2044 and later, the D\n-001a9730: 4c4c 2065 7870 6f72 7420 6d61 6372 6f73 LL export macros\n-001a9740: 2073 686f 776e 2068 6572 6520 6172 6520 shown here are \n-001a9750: 616c 6c20 7365 7420 7769 7468 206f 6e65 all set with one\n-001a9760: 2070 7265 2d70 726f 6365 7373 6f72 2064 pre-processor d\n-001a9770: 6566 696e 6974 696f 6e20 3c63 6f64 653e efinition \n-001a9780: 2353 4f41 505f 5354 445f 4558 504f 5254 #SOAP_STD_EXPORT\n-001a9790: 533c 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 S.

    .Alternatively, \n-001a97b0: 796f 7520 6361 6e20 636f 6d70 696c 6520 you can compile \n-001a97c0: 7769 7468 203c 636f 6465 3e2f 443c 2f63 with /D #WITH\n-001a97e0: 5f53 4f41 5044 4546 535f 483c 2f63 6f64 _SOAPDEFS_H and put the m\n-001a9800: 6163 726f 2064 6566 696e 6974 696f 6e73 acro definitions\n-001a9810: 2069 6e20 3c65 6d3e 3c63 6f64 653e 736f in so\n-001a9820: 6170 6465 6673 2e68 3c2f 636f 6465 3e3c apdefs.h<\n-001a9830: 2f65 6d3e 2e20 5468 6973 2065 7870 6f72 /em>. This expor\n-001a9840: 7473 2061 6c6c 2066 756e 6374 696f 6e73 ts all functions\n-001a9850: 2077 6869 6368 2061 7265 2070 7265 6365 which are prece\n-001a9860: 6465 6420 6279 2074 6865 206d 6163 726f ded by the macro\n-001a9870: 203c 636f 6465 3e23 534f 4150 5f46 4d41 #SOAP_FMA\n-001a9880: 4331 3c2f 636f 6465 3e20 696e 2074 6865 C1 in the\n-001a9890: 203c 656d 3e3c 636f 6465 3e73 6f61 7063 soapc\n-001a98a0: 7070 322e 6370 703c 2f63 6f64 653e 3c2f pp2.cpp source file \n-001a98c0: 616e 6420 6d61 6372 6f20 3c63 6f64 653e and macro \n-001a98d0: 2353 4f41 505f 464d 4143 333c 2f63 6f64 #SOAP_FMAC3 in the envC.cpp source \n-001a9910: 6669 6c65 2e3c 2f70 3e0a 3c70 3e46 696e file.

    .

    Fin\n-001a9920: 616c 6c79 2c20 6e6f 7465 2074 6861 7420 ally, note that \n-001a9930: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source\n-001a9940: 2063 6f64 6520 7061 636b 6167 6520 636f code package co\n-001a9950: 6e74 6169 6e73 2061 206c 6f74 206f 6620 ntains a lot of \n-001a9960: 3c65 6d3e 3c63 6f64 653e 2e63 3c2f 636f .c source \n-001a9980: 636f 6465 2066 696c 6573 2e20 4d69 7869 code files. Mixi\n-001a9990: 6e67 2043 2077 6974 6820 432b 2b20 6669 ng C with C++ fi\n-001a99a0: 6c65 7320 6973 206e 6f74 2072 6563 6f6d les is not recom\n-001a99b0: 6d65 6e64 6564 2077 6974 6820 5669 7375 mended with Visu\n-001a99c0: 616c 2053 7475 6469 6f20 616e 6420 7769 al Studio and wi\n-001a99d0: 6c6c 206c 6561 6420 746f 2072 756e 2d74 ll lead to run-t\n-001a99e0: 696d 6520 6572 726f 7273 2077 6865 6e20 ime errors when \n-001a99f0: 6275 696c 6469 6e67 2044 4c4c 732e 2054 building DLLs. T\n-001a9a00: 6865 7265 666f 7265 2c20 616c 7761 7973 herefore, always\n-001a9a10: 2072 656e 616d 6520 3c65 6d3e 3c63 6f64 rename .c\n-001a9a30: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil\n-001a9a40: 6573 2074 6f20 3c65 6d3e 3c63 6f64 653e es to \n-001a9a50: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-001a9a60: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil\n-001a9a70: 6573 2077 6865 6e20 6372 6561 7469 6e67 es when creating\n-001a9a80: 2044 4c4c 732e 3c2f 703e 0a3c 703e f09f DLLs.

    .

    ..\n-001a9a90: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B\n-001a9aa0: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of \n-001a9ab0: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    \n-001a9ac0: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    \n-001a9af0: 0a43 7265 6174 696e 6720 636c 6965 6e74 .Creating client\n-001a9b00: 2061 6e64 2073 6572 7665 7220 444c 4c73 and server DLLs\n-001a9b10: 3c2f 6833 3e0a 3c70 3e43 6f6d 7069 6c65

    .

    Compile\n-001a9b20: 2074 6865 203c 656d 3e3c 636f 6465 3e73 the s\n-001a9b30: 6f61 7043 6c69 656e 744c 6962 2e63 7070 oapClientLib.cpp\n-001a9b40: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-001a9b50: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS\n-001a9b60: 6572 7665 724c 6962 2e63 7070 3c2f 636f erverLib.cpp sources\n-001a9b80: 2061 7320 444c 4c73 2062 7920 7573 696e as DLLs by usin\n-001a9b90: 6720 7468 6520 4d53 5643 2050 7265 2d50 g the MSVC Pre-P\n-001a9ba0: 726f 6365 7373 6f72 2064 6566 696e 6974 rocessor definit\n-001a9bb0: 696f 6e73 203c 636f 6465 3e53 4f41 505f ions SOAP_\n-001a9bc0: 464d 4143 353d 5f5f 6465 636c 7370 6563 FMAC5=__declspec\n-001a9bd0: 2864 6c6c 6578 706f 7274 293c 2f63 6f64 (dllexport) and SOA\n-001a9bf0: 505f 434d 4143 3d5f 5f64 6563 6c73 7065 P_CMAC=__declspe\n-001a9c00: 6328 646c 6c65 7870 6f72 7429 3c2f 636f c(dllexport), and by usin\n-001a9c20: 6720 7468 6520 432b 2b20 636f 6d70 696c g the C++ compil\n-001a9c30: 6572 206f 7074 696f 6e20 3c63 6f64 653e er option \n-001a9c40: 2f44 3c2f 636f 6465 3e20 3c63 6f64 653e /D \n-001a9c50: 2357 4954 485f 4e4f 4e41 4d45 5350 4143 #WITH_NONAMESPAC\n-001a9c60: 4553 3c2f 636f 6465 3e2e 2041 6c6c 206f ES. All o\n-001a9c70: 6620 7468 6573 6520 6d61 6372 6f73 2061 f these macros a\n-001a9c80: 7265 2073 6574 2061 7320 6120 7368 6f72 re set as a shor\n-001a9c90: 7468 616e 6420 7769 7468 206f 6e65 2070 thand with one p\n-001a9ca0: 7265 2d70 726f 6365 7373 6f72 2064 6566 re-processor def\n-001a9cb0: 696e 6974 696f 6e20 3c63 6f64 653e 2353 inition #S\n-001a9cc0: 4f41 505f 5354 445f 4558 504f 5254 533c OAP_STD_EXPORTS<\n-001a9cd0: 2f63 6f64 653e 2028 7265 7175 6972 6573 /code> (requires\n-001a9ce0: 2067 534f 4150 2032 2e38 2e33 3020 6f72 gSOAP 2.8.30 or\n-001a9cf0: 206c 6174 6572 292e 3c2f 703e 0a3c 703e later).

    .

    \n-001a9d00: 5468 6973 2044 4c4c 206c 696e 6b73 2074 This DLL links t\n-001a9d10: 6f20 3c65 6d3e 3c63 6f64 653e 7374 6473 o stds\n-001a9d20: 6f61 7032 2e64 6c6c 3c2f 636f 6465 3e3c oap2.dll<\n-001a9d30: 2f65 6d3e 2077 6520 6372 6561 7465 6420 /em> we created \n-001a9d40: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Creating the \n-001a9d80: 6261 7365 2073 7464 736f 6170 322e 646c base stdsoap2.dl\n-001a9d90: 6c3c 2f61 3e2e 3c2f 703e 0a3c 703e 546f l.

    .

    To\n-001a9da0: 2063 7265 6174 6520 6d75 6c74 6970 6c65 create multiple\n-001a9db0: 2044 4c4c 7320 696e 2074 6865 2073 616d DLLs in the sam\n-001a9dc0: 6520 7072 6f6a 6563 7420 6469 7265 6374 e project direct\n-001a9dd0: 6f72 792c 2079 6f75 2073 686f 756c 6420 ory, you should \n-001a9de0: 7573 6520 3c62 3e3c 636f 6465 3e73 6f61 use soa\n-001a9df0: 7063 7070 3220 2d70 206e 616d 653c 2f63 pcpp2 -p name option \n-001a9e10: 3c62 3e3c 636f 6465 3e2d 7020 6e61 6d65 -p name\n-001a9e20: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2072 to r\n-001a9e30: 656e 616d 6520 7468 6520 6765 6e65 7261 ename the genera\n-001a9e40: 7465 6420 3c65 6d3e 3c63 6f64 653e 736f ted so\n-001a9e50: 6170 436c 6965 6e74 4c69 622e 6370 703c apClientLib.cpp<\n-001a9e60: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-001a9e70: 3c65 6d3e 3c63 6f64 653e 736f 6170 5365 soapSe\n-001a9e80: 7276 6572 4c69 622e 6370 703c 2f63 6f64 rverLib.cpp (and ass\n-001a9ea0: 6f63 6961 7465 6429 2066 696c 6573 2e20 ociated) files. \n-001a9eb0: 5468 6520 3c62 3e3c 636f 6465 3e2d 7020 The -p \n-001a9ec0: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name \n-001a9ed0: 6f70 7469 6f6e 2073 7065 6369 6669 6573 option specifies\n-001a9ee0: 2061 203c 656d 3e3c 636f 6465 3e6e 616d a nam\n-001a9ef0: 653c 2f63 6f64 653e 3c2f 656d 3e20 7072 e pr\n-001a9f00: 6566 6978 2074 6f20 7265 706c 6163 6520 efix to replace \n-001a9f10: 7468 6520 3c65 6d3e 3c63 6f64 653e 736f the so\n-001a9f20: 6170 3c2f 636f 6465 3e3c 2f65 6d3e 2066 ap f\n-001a9f30: 696c 6520 6e61 6d65 2070 7265 6669 782e ile name prefix.\n-001a9f40: 2041 6e6f 7468 6572 2077 6179 2069 7320 Another way is \n-001a9f50: 746f 2075 7365 2043 2b2b 206e 616d 6573 to use C++ names\n-001a9f60: 7061 6365 7320 7769 7468 203c 623e 3c63 paces with soapcpp2 -q \n-001a9f80: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name \n-001a9f90: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n-001a9fa0: 2d71 206e 616d 653c 2f63 6f64 653e 3c2f -q name, if the inter\n-001a9fc0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-001a9fd0: 2069 6e70 7574 2074 6f20 736f 6170 6370 input to soapcp\n-001a9fe0: 7032 2064 6f65 7320 6e6f 7420 616c 7265 p2 does not alre\n-001a9ff0: 6164 7920 6465 636c 6172 6520 6120 432b ady declare a C+\n-001aa000: 2b20 6e61 6d65 7370 6163 652e 2041 2063 + namespace. A c\n-001aa010: 6c65 616e 2073 6570 6172 6174 696f 6e20 lean separation \n-001aa020: 6f66 206c 6962 7261 7269 6573 2063 616e of libraries can\n-001aa030: 2061 6c73 6f20 6265 2061 6368 6965 7665 also be achieve\n-001aa040: 6420 7769 7468 2043 2b2b 206e 616d 6573 d with C++ names\n-001aa050: 7061 6365 732c 2073 6565 2053 6563 7469 paces, see Secti\n-001aa060: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on How to build a \n-001aa0a0: 636c 6965 6e74 206f 7220 7365 7276 6572 client or server\n-001aa0b0: 2069 6e20 6120 432b 2b20 636f 6465 206e in a C++ code n\n-001aa0c0: 616d 6573 7061 6365 3c2f 613e 202e 3c2f amespace ..

    Unless you\n-001aa0e0: 2075 7365 2074 6865 2063 6c69 656e 7420 use the client \n-001aa0f0: 7072 6f78 7920 616e 6420 7365 7276 6572 proxy and server\n-001aa100: 206f 626a 6563 7420 636c 6173 7365 7320 object classes \n-001aa110: 283c 656d 3e3c 636f 6465 3e73 6f61 7058 (soapX\n-001aa120: 595a 5072 6f78 792e 683c 2f63 6f64 653e YZProxy.h\n-001aa130: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and soapXYZServi\n-001aa150: 6365 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ce.h\n-001aa160: 292c 2061 6c6c 2063 6c69 656e 7420 616e ), all client an\n-001aa170: 6420 7365 7276 6572 2061 7070 6c69 6361 d server applica\n-001aa180: 7469 6f6e 7320 6d75 7374 2065 7870 6c69 tions must expli\n-001aa190: 6369 746c 7920 7365 7420 7468 6520 6e61 citly set the na\n-001aa1a0: 6d65 7370 6163 6573 2076 616c 7565 206f mespaces value o\n-001aa1b0: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap\n-001aa210: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n-001aa220: 7769 7468 3a3c 2f70 3e0a 3c64 6976 2063 with:

    .
    \n-001aa240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_se\n-001aa2b0: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces\n-001aa2c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001aa2f0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , namespa\n-001aa350: 6365 733c 2f61 3e29 3b3c 2f64 6976 3e0a ces);
    .\n-001aa360: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where \n-001aa380: 7468 6520 3c63 6f64 653e 6e61 6d65 7370 the namesp\n-001aa390: 6163 6573 5b5d 3c2f 636f 6465 3e20 7461 aces[] ta\n-001aa3a0: 626c 6520 7368 6f75 6c64 2062 6520 6465 ble should be de\n-001aa3b0: 6669 6e65 6420 696e 2074 6865 2063 6c69 fined in the cli\n-001aa3c0: 656e 742f 7365 7276 6572 2073 6f75 7263 ent/server sourc\n-001aa3d0: 652e 2054 6865 7365 2074 6162 6c65 7320 e. These tables \n-001aa3e0: 6172 6520 6765 6e65 7261 7465 6420 696e are generated in\n-001aa3f0: 2074 6865 203c 656d 3e3c 636f 6465 3e2e the .\n-001aa400: 6e73 6d61 703c 2f63 6f64 653e 3c2f 656d nsmap files. The tab\n-001aa420: 6c65 7320 6172 6520 7265 6e61 6d65 6420 les are renamed \n-001aa430: 666f 7220 636f 6e76 656e 6965 6e63 6520 for convenience \n-001aa440: 7573 696e 6720 3c62 3e3c 636f 6465 3e73 using s\n-001aa450: 6f61 7063 7070 3220 2d6e 3c2f 636f 6465 oapcpp2 -n option \n-001aa470: 3c63 6f64 653e 2d6e 3c2f 636f 6465 3e3c -n<\n-001aa480: 2f62 3e2c 2073 6565 2053 6563 7469 6f6e /b>, see Section\n-001aa490: 203c 6120 636c 6173 733d 2265 6c22 2068 soapcpp2 option\n-001aa4d0: 733c 2f61 3e20 2e3c 2f70 3e0a 3c70 3ef0 s .

    .

    .\n-001aa4e0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-001aa4f0: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-001aa500: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .How to \n-001aa540: 6275 696c 6420 6d6f 6475 6c65 7320 616e build modules an\n-001aa550: 6420 6c69 6272 6172 6965 7320 7769 7468 d libraries with\n-001aa560: 2074 6865 2023 6d6f 6475 6c65 2064 6972 the #module dir\n-001aa570: 6563 7469 7665 3c2f 6832 3e0a 3c70 3e54 ective

    .

    T\n-001aa580: 6865 203c 636f 6465 3e23 6d6f 6475 6c65 he #module\n-001aa590: 3c2f 636f 6465 3e20 6469 7265 6374 6976 directiv\n-001aa5a0: 6520 6973 2075 7365 6420 746f 2062 7569 e is used to bui\n-001aa5b0: 6c64 206d 6f64 756c 6573 2077 6974 6820 ld modules with \n-001aa5c0: 736f 6170 6370 7032 2e20 4120 6c69 6272 soapcpp2. A libr\n-001aa5d0: 6172 7920 6361 6e20 6265 2062 7569 6c74 ary can be built\n-001aa5e0: 2066 726f 6d20 6120 6d6f 6475 6c65 2061 from a module a\n-001aa5f0: 6e64 206c 696e 6b65 6420 7769 7468 206d nd linked with m\n-001aa600: 756c 7469 706c 6520 5765 6220 7365 7276 ultiple Web serv\n-001aa610: 6963 6573 2061 7070 6c69 6361 7469 6f6e ices application\n-001aa620: 732e 2054 6865 2064 6972 6563 7469 7665 s. The directive\n-001aa630: 2073 686f 756c 6420 6170 7065 6172 2061 should appear a\n-001aa640: 7420 7468 6520 746f 7020 6f66 2074 6865 t the top of the\n-001aa650: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-001aa660: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n-001aa670: 7070 3220 616e 6420 6861 7320 7468 6520 pp2 and has the \n-001aa680: 666f 6c6c 6f77 696e 6720 666f 726d 6174 following format\n-001aa690: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n-001aa6c0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001aa6d0: 726f 6365 7373 6f72 223e 236d 6f64 756c rocessor\">#modul\n-001aa6e0: 6520 2671 756f 743b 6e61 6d65 2671 756f e "name&quo\n-001aa6f0: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    \n-001aa700: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    and.

    #module &q\n-001aa770: 756f 743b 6e61 6d65 2671 756f 743b 3c2f uot;name" "full\n-001aa790: 6e61 6d65 2671 756f 743b 3c2f 6469 763e name"
    \n-001aa7a0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    where\n-001aa7c0: 2074 6865 203c 636f 6465 3e6e 616d 653c the name<\n-001aa7d0: 2f63 6f64 653e 206d 7573 7420 6265 2061 /code> must be a\n-001aa7e0: 2075 6e69 7175 6520 7368 6f72 7420 6e61 unique short na\n-001aa7f0: 6d65 2066 6f72 2074 6865 206d 6f64 756c me for the modul\n-001aa800: 652e 2054 6865 206e 616d 6520 6973 2063 e. The name is c\n-001aa810: 6173 6520 696e 7365 6e73 6974 6976 6520 ase insensitive \n-001aa820: 616e 6420 6d75 7374 206e 6f74 2065 7863 and must not exc\n-001aa830: 6565 6420 3420 6368 6172 6163 7465 7273 eed 4 characters\n-001aa840: 2069 6e20 6c65 6e67 7468 2e20 5468 6520 in length. The \n-001aa850: 3c63 6f64 653e 6675 6c6c 6e61 6d65 3c2f fullname, when pres\n-001aa870: 656e 742c 2072 6570 7265 7365 6e74 7320 ent, represents \n-001aa880: 7468 6520 6675 6c6c 206e 616d 6520 6f66 the full name of\n-001aa890: 2074 6865 206d 6f64 756c 6520 616e 6420 the module and \n-001aa8a0: 6973 2075 7365 6420 746f 2070 7265 6669 is used to prefi\n-001aa8b0: 7820 7468 6520 6675 6e63 7469 6f6e 206e x the function n\n-001aa8c0: 616d 6573 206f 6620 7468 6520 6765 6e65 ames of the gene\n-001aa8d0: 7261 7465 6420 7365 7269 616c 697a 6572 rated serializer\n-001aa8e0: 7320 7265 706c 6163 696e 6720 7468 6520 s replacing the \n-001aa8f0: 7573 7561 6c20 3c63 6f64 653e 736f 6170 usual soap\n-001aa900: 3c2f 636f 6465 3e20 7072 6566 6978 2e20 prefix. \n-001aa910: 4966 2061 6273 656e 742c 2074 6865 2073 If absent, the s\n-001aa920: 686f 7274 206e 616d 6520 6973 2075 7365 hort name is use\n-001aa930: 6420 746f 2070 7265 6669 7820 7468 6520 d to prefix the \n-001aa940: 6675 6e63 7469 6f6e 206e 616d 6573 206f function names o\n-001aa950: 6620 7468 6520 7365 7269 616c 697a 6572 f the serializer\n-001aa960: 732e 3c2f 703e 0a3c 703e 5468 6520 7265 s.

    .

    The re\n-001aa970: 7374 206f 6620 7468 6520 636f 6e74 656e st of the conten\n-001aa980: 7420 6f66 2074 6865 2069 6e74 6572 6661 t of the interfa\n-001aa990: 6365 2068 6561 6465 7220 6669 6c65 2069 ce header file i\n-001aa9a0: 6e63 6c75 6465 7320 7479 7065 2064 6563 ncludes type dec\n-001aa9b0: 6c61 7261 7469 6f6e 7320 616e 6420 6f70 larations and op\n-001aa9c0: 7469 6f6e 616c 6c79 2074 6865 2064 6563 tionally the dec\n-001aa9d0: 6c61 7261 7469 6f6e 7320 6f66 2073 6572 larations of ser\n-001aa9e0: 7669 6365 206f 7065 7261 7469 6f6e 7320 vice operations \n-001aa9f0: 616e 6420 534f 4150 2048 6561 6465 7273 and SOAP Headers\n-001aaa00: 2061 6e64 2046 6175 6c74 7320 7468 6174 and Faults that\n-001aaa10: 2061 7265 2075 6e69 7665 7273 616c 6c79 are universally\n-001aaa20: 2075 7365 6420 6279 2053 4f41 5020 7365 used by SOAP se\n-001aaa30: 7276 6963 6573 2c20 7768 656e 2061 7070 rvices, when app\n-001aaa40: 6c69 6361 626c 652e 2057 6865 6e20 7468 licable. When th\n-001aaa50: 6520 736f 6170 6370 7032 2074 6f6f 6c20 e soapcpp2 tool \n-001aaa60: 7072 6f63 6573 7365 7320 7468 6520 6865 processes the he\n-001aaa70: 6164 6572 2066 696c 6520 6d6f 6475 6c65 ader file module\n-001aaa80: 2c20 6974 2077 696c 6c20 6765 6e65 7261 , it will genera\n-001aaa90: 7465 2074 6865 2073 6f75 7263 6520 636f te the source co\n-001aaaa0: 6465 7320 666f 7220 6120 6c69 6272 6172 des for a librar\n-001aaab0: 792e 2054 6865 2057 6562 2073 6572 7669 y. The Web servi\n-001aaac0: 6365 7320 6170 706c 6963 6174 696f 6e20 ces application \n-001aaad0: 7468 6174 2075 7365 7320 7468 6520 6c69 that uses the li\n-001aaae0: 6272 6172 7920 7368 6f75 6c64 2075 7365 brary should use\n-001aaaf0: 2061 2068 6561 6465 7220 6669 6c65 2074 a header file t\n-001aab00: 6861 7420 696d 706f 7274 7320 7468 6520 hat imports the \n-001aab10: 6d6f 6475 6c65 2077 6974 6820 7468 6520 module with the \n-001aab20: 3c63 6f64 653e 2369 6d70 6f72 743c 2f63 #import directive, \n-001aab40: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

    \n-001aab50: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    /\n-001aab90: 2a20 436f 6e74 656e 7473 206f 6620 6669 * Contents of fi\n-001aaba0: 6c65 2026 7175 6f74 3b6d 6f64 756c 652e le "module.\n-001aabb0: 6826 7175 6f74 3b20 2a2f 3c2f 7370 616e h" */
    .
    #module &q\n-001aac00: 756f 743b 7465 7374 2671 756f 743b 3c2f uot;test"
    . <\n-001aac30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-001aac60: 2074 7970 6573 2061 6e64 2074 7970 6564 types and typed\n-001aac70: 6566 7320 6265 636f 6d65 206d 6f64 756c efs become modul\n-001aac80: 652d 7370 6563 6966 6963 3c2f 7370 616e e-specific
    .
    \n-001aacc0: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef <\n-001aacd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001aace0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001aacf0: 705f 5f73 6f61 702e 6874 6d6c 2367 6137 p__soap.html#ga7\n-001aad00: 3862 3336 6335 3633 3665 6235 3238 3364 8b36c5636eb5283d\n-001aad10: 3635 3162 3639 6438 3638 3463 3661 6522 651b69d8684c6ae\"\n-001aad20: 3e4c 4f4e 4736 343c 2f61 3e20 7873 645f >LONG64 xsd_\n-001aad30: 5f6c 6f6e 673b 3c2f 6469 763e 0a3c 6469 _long;
    .<\n-001aad50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001aad60: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char*;
    . \n-001aad90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-001aadc0: 2f20 6120 6d6f 6475 6c65 2d73 7065 6369 / a module-speci\n-001aadd0: 6669 6320 7374 7275 6374 3c2f 7370 616e fic struct
    .
    \n-001aae10: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n-001aae20: 5f5f 5320 3c2f 6469 763e 0a3c 6469 7620 __S
    .
    {.
    ... <\n-001aae60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001aae70: 656e 7422 3e2f 2f20 6d65 6d62 6572 733c ent\">// members<\n-001aae80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-001aaea0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n-001aaec0: 703e 5468 6520 3c65 6d3e 3c63 6f64 653e p>The \n-001aaed0: 6d6f 6475 6c65 2e68 3c2f 636f 6465 3e3c module.h<\n-001aaee0: 2f65 6d3e 2064 6174 6120 6269 6e64 696e /em> data bindin\n-001aaef0: 6720 696e 7465 7266 6163 6520 6865 6164 g interface head\n-001aaf00: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap\n-001aaf10: 6370 7032 2064 6563 6c61 7265 7320 6d6f cpp2 declares mo\n-001aaf20: 6475 6c65 2d73 7065 6369 6669 6320 7365 dule-specific se\n-001aaf30: 7269 616c 697a 6162 6c65 2074 7970 6573 rializable types\n-001aaf40: 203c 636f 6465 3e4c 4f4e 4736 343c 2f63 LONG64, xsd_\n-001aaf60: 5f6c 6f6e 673c 2f63 6f64 653e 2c20 3c63 _long, char*\n-001aaf80: 2c20 616e 6420 6120 3c63 6f64 653e 7374 , and a st\n-001aaf90: 7275 6374 206e 735f 5f53 3c2f 636f 6465 ruct ns__S. The module na\n-001aafb0: 6d65 2069 7320 2274 6573 7422 2c20 736f me is \"test\", so\n-001aafc0: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to\n-001aafd0: 6f6c 2070 726f 6475 6365 7320 6120 3c65 ol produces a testC.cp\n-001aaff0: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi\n-001ab000: 6c65 2077 6974 6820 7468 6520 584d 4c20 le with the XML \n-001ab010: 7365 7269 616c 697a 6572 7320 666f 7220 serializers for \n-001ab020: 7468 6573 6520 7479 7065 732e 2054 6865 these types. The\n-001ab030: 203c 656d 3e3c 636f 6465 3e74 6573 7443 testC\n-001ab040: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-001ab050: 2064 6174 6120 6269 6e64 696e 6720 696d data binding im\n-001ab060: 706c 656d 656e 7461 7469 6f6e 2073 6f75 plementation sou\n-001ab070: 7263 6520 636f 6465 2063 616e 2062 6520 rce code can be \n-001ab080: 7365 7061 7261 7465 6c79 2063 6f6d 7069 separately compi\n-001ab090: 6c65 6420 616e 6420 6c69 6e6b 6564 2077 led and linked w\n-001ab0a0: 6974 6820 616e 2061 7070 6c69 6361 7469 ith an applicati\n-001ab0b0: 6f6e 2e20 4966 2073 6572 7669 6365 206f on. If service o\n-001ab0c0: 7065 7261 7469 6f6e 7320 6172 6520 6465 perations are de\n-001ab0d0: 636c 6172 6564 2069 6e20 7468 6520 696e clared in the in\n-001ab0e0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-001ab0f0: 696c 6520 6173 2066 756e 6374 696f 6e20 ile as function \n-001ab100: 7072 6f74 6f74 7970 6573 2c20 7765 2061 prototypes, we a\n-001ab110: 6c73 6f20 6765 7420 3c65 6d3e 3c63 6f64 lso get testClient.cpp\n-001ab130: 3c2f 636f 6465 3e3c 2f65 6d3e 2063 6c69 cli\n-001ab140: 656e 7420 7374 7562 2066 756e 6374 696f ent stub functio\n-001ab150: 6e73 2061 6e64 203c 656d 3e3c 636f 6465 ns and testServer.cpp<\n-001ab170: 2f63 6f64 653e 3c2f 656d 3e20 7365 7276 /code> serv\n-001ab180: 6572 2073 6b65 6c65 746f 6e20 6675 6e63 er skeleton func\n-001ab190: 7469 6f6e 732e 3c2f 703e 0a3c 703e 5468 tions.

    .

    Th\n-001ab1a0: 6572 6520 6172 6520 736f 6d65 206c 696d ere are some lim\n-001ab1b0: 6974 6174 696f 6e73 2066 6f72 206d 6f64 itations for mod\n-001ab1c0: 756c 6520 696d 706f 7274 733a 3c2f 703e ule imports:

    \n-001ab1d0: 0a3c 756c 3e0a 3c6c 693e 4120 6d6f 6475 .
      .
    • A modu\n-001ab1e0: 6c65 206d 7573 7420 6265 2069 6d70 6f72 le must be impor\n-001ab1f0: 7465 6420 696e 746f 2061 6e6f 7468 6572 ted into another\n-001ab200: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-001ab210: 7220 746f 2075 7365 2074 6865 206d 6f64 r to use the mod\n-001ab220: 756c 6527 7320 7479 7065 2064 6566 696e ule's type defin\n-001ab230: 6974 696f 6e73 2e3c 2f6c 693e 0a3c 6c69 itions.
    • .When multiple m\n-001ab250: 6f64 756c 6573 2061 7265 2069 6d70 6f72 odules are impor\n-001ab260: 7465 642c 2074 6865 2074 7970 6573 2074 ted, the types t\n-001ab270: 6861 7420 7468 6579 2064 6563 6c61 7265 hat they declare\n-001ab280: 206d 7573 7420 6265 2064 6563 6c61 7265 must be declare\n-001ab290: 6420 696e 206f 6e65 206d 6f64 756c 6520 d in one module \n-001ab2a0: 6f6e 6c79 2074 6f20 6176 6f69 6420 6e61 only to avoid na\n-001ab2b0: 6d65 2063 6c61 7368 6573 2061 6e64 206c me clashes and l\n-001ab2c0: 696e 6b20 6572 726f 7273 2e20 596f 7520 ink errors. You \n-001ab2d0: 6361 6e6e 6f74 2063 7265 6174 6520 7477 cannot create tw\n-001ab2e0: 6f20 6d6f 6475 6c65 7320 7468 6174 2064 o modules that d\n-001ab2f0: 6563 6c61 7265 206f 7220 7573 6520 7468 eclare or use th\n-001ab300: 6520 7361 6d65 2074 7970 6520 616e 6420 e same type and \n-001ab310: 696d 706f 7274 2074 6865 7365 206d 6f64 import these mod\n-001ab320: 756c 6573 2073 6570 6172 6174 656c 7920 ules separately \n-001ab330: 696e 746f 2061 6e6f 7468 6572 2068 6561 into another hea\n-001ab340: 6465 7220 6669 6c65 2e20 5768 656e 2075 der file. When u\n-001ab350: 7369 6e67 206d 6f64 756c 6573 2c20 636f sing modules, co\n-001ab360: 6e73 6964 6572 2063 7265 6174 696e 6720 nsider creating \n-001ab370: 6120 6d6f 6475 6c65 2068 6965 7261 7263 a module hierarc\n-001ab380: 6879 2073 7563 6820 7468 6174 2074 7970 hy such that typ\n-001ab390: 6573 2061 7265 2064 6563 6c61 7265 6420 es are declared \n-001ab3a0: 6f6e 6c79 206f 6e63 6520 616e 6420 6279 only once and by\n-001ab3b0: 206f 6e6c 7920 6f6e 6520 6d6f 6475 6c65 only one module\n-001ab3c0: 2077 6865 6e20 7468 6573 6520 6d6f 6475 when these modu\n-001ab3d0: 6c65 7320 6d75 7374 2062 6520 6c69 6e6b les must be link\n-001ab3e0: 6564 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c ed..
    .<\n-001ab3f0: 703e 5769 7468 206d 6f64 756c 6573 2c20 p>With modules, \n-001ab400: 7468 6520 736f 7572 6365 2063 6f64 6520 the source code \n-001ab410: 7365 7269 616c 697a 6572 7320 666f 7220 serializers for \n-001ab420: 7468 6520 7479 7065 7320 6465 6669 6e65 the types define\n-001ab430: 6420 696e 2074 6865 206d 6f64 756c 6573 d in the modules\n-001ab440: 2061 7265 2067 656e 6572 6174 6564 2077 are generated w\n-001ab450: 6974 6820 736f 6170 6370 7032 2073 6570 ith soapcpp2 sep\n-001ab460: 6172 6174 656c 792e 2046 6f72 2065 7861 arately. For exa\n-001ab470: 6d70 6c65 2c20 6173 7375 6d65 2074 6861 mple, assume tha\n-001ab480: 7420 7765 2068 6176 6520 6120 6d6f 6475 t we have a modu\n-001ab490: 6c65 203c 656d 3e3c 636f 6465 3e6d 6f64 le mod\n-001ab4a0: 756c 652e 683c 2f63 6f64 653e 3c2f 656d ule.h:

    .
    <\n-001ab4e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001ab4f0: 656e 7422 3e2f 2a20 436f 6e74 656e 7473 ent\">/* Contents\n-001ab500: 206f 6620 6669 6c65 2026 7175 6f74 3b6d of file "m\n-001ab510: 6f64 756c 652e 6826 7175 6f74 3b20 2a2f odule.h" */\n-001ab520: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001ab540: 3c73 7061 6e20 636c 6173 733d 2270 7265 #modu\n-001ab560: 6c65 2026 7175 6f74 3b74 6573 7426 7175 le "test&qu\n-001ab570: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n+001a8890: 6522 3e3c 6120 636c 6173 733d 2263 6f64 e\">soap_des\n+001a88f0: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy(\n+001a8920: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); ..<\n+001a89e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a89f0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_free<\n+001a8a50: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001a8a80: 2f61 3e29 3b3c 2f64 6976 3e0a 3c2f 6469 /a>);
    .

    .... Back to t\n+001a8ac0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n+001a8ad0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .How\n+001a8b00: 2074 6f20 6372 6561 7465 2044 4c4c 733c to create DLLs<\n+001a8b10: 2f68 323e 0a3c 703e f09f 949d 203c 6120 /h2>.

    .... Back to\n+001a8b30: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+001a8b40: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+001a8b50: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001a8b60: 2069 643d 2262 6173 6564 6c6c 223e 3c2f id=\"basedll\">.Creating the \n+001a8b80: 6261 7365 2073 7464 736f 6170 322e 646c base stdsoap2.dl\n+001a8b90: 6c3c 2f68 333e 0a3c 703e 5468 6520 656e l

    .

    The en\n+001a8ba0: 6769 6e65 2064 6f65 7320 6e6f 7420 6465 gine does not de\n+001a8bb0: 6669 6e65 2053 4f41 5020 4865 6164 6572 fine SOAP Header\n+001a8bc0: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria\n+001a8bd0: 6c69 7a65 7273 2074 6861 7420 7468 6520 lizers that the \n+001a8be0: 656e 6769 6e65 206e 6565 6473 2077 6865 engine needs whe\n+001a8bf0: 6e20 696e 7374 616c 6c65 6420 6173 2061 n installed as a\n+001a8c00: 206c 6962 7261 7279 2e20 5765 2074 6865 library. We the\n+001a8c10: 7265 666f 7265 2061 6464 2053 4f41 5020 refore add SOAP \n+001a8c20: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n+001a8c30: 2073 6572 6961 6c69 7a65 7273 2c20 7768 serializers, wh\n+001a8c40: 6963 6820 6172 6520 636f 6d70 696c 6564 ich are compiled\n+001a8c50: 2073 6570 6172 6174 656c 7920 6173 2066 separately as f\n+001a8c60: 6f6c 6c6f 7773 2e20 4669 7273 742c 2063 ollows. First, c\n+001a8c70: 7265 6174 6520 6120 6e65 7720 6865 6164 reate a new head\n+001a8c80: 6572 2066 696c 6520 3c65 6d3e 3c63 6f64 er file env.h with the SOA\n+001a8cb0: 5020 4865 6164 6572 203c 636f 6465 3e3c P Header <\n+001a8cc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001a8cd0: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+001a8ce0: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n+001a8cf0: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n+001a8d00: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n+001a8d10: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n+001a8d20: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header and SOAP F\n+001a8d40: 6175 6c74 203c 636f 6465 3e3c 6120 636c ault SOAP_ENV__Fa\n+001a8db0: 756c 743c 2f61 3e3c 2f63 6f64 653e 2073 ult s\n+001a8dc0: 7472 7563 7475 7265 732c 2069 6e63 6c75 tructures, inclu\n+001a8dd0: 6469 6e67 203c 636f 6465 3e3c 6120 636c ding SOAP\n+001a8e40: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail\n+001a8e50: 3c2f 636f 6465 3e20 6966 2074 6869 7320 if this \n+001a8e60: 7374 7275 6374 7572 6520 636f 6e74 6169 structure contai\n+001a8e70: 6e73 206d 656d 6265 7273 2074 6861 7420 ns members that \n+001a8e80: 6172 6520 7365 7269 616c 697a 6564 2061 are serialized a\n+001a8e90: 7320 6661 756c 7420 6465 7461 696c 732e s fault details.\n+001a8ea0: 2059 6f75 2063 616e 206c 6561 7665 2074 You can leave t\n+001a8eb0: 6869 7320 6865 6164 6572 2066 696c 6520 his header file \n+001a8ec0: 656d 7074 7920 6966 2079 6f75 2077 616e empty if you wan\n+001a8ed0: 7420 746f 2075 7365 2074 6865 2064 6566 t to use the def\n+001a8ee0: 6175 6c74 2053 4f41 5020 4865 6164 6572 ault SOAP Header\n+001a8ef0: 2061 6e64 2046 6175 6c74 2e20 486f 7765 and Fault. Howe\n+001a8f00: 7665 722c 2069 6620 534f 4150 2048 6561 ver, if SOAP Hea\n+001a8f10: 6465 7273 2061 7265 2072 6571 7569 7265 ders are require\n+001a8f20: 6420 7468 656e 2079 6f75 2063 616e 6e6f d then you canno\n+001a8f30: 7420 6c65 6176 6520 7468 6520 3c63 6f64 t leave the SOA\n+001a8fa0: 505f 454e 565f 5f48 6561 6465 723c 2f61 P_ENV__Header structu\n+001a8fc0: 7265 2065 6d70 7479 2e20 466f 7220 6578 re empty. For ex\n+001a8fd0: 616d 706c 652c 2074 6865 2057 532d 4164 ample, the WS-Ad\n+001a8fe0: 6472 6573 7369 6e67 2061 6e64 2057 532d dressing and WS-\n+001a8ff0: 5365 6375 7269 7479 2070 6c75 6769 6e73 Security plugins\n+001a9000: 2072 6571 7569 7265 2053 4f41 5020 4865 require SOAP He\n+001a9010: 6164 6572 7320 7768 6963 6820 6361 6e20 aders which can \n+001a9020: 6265 2069 6d70 6f72 7465 6420 6279 2061 be imported by a\n+001a9030: 6464 696e 6720 3c63 6f64 653e 2369 6d70 dding #imp\n+001a9040: 6f72 7420 2277 7361 352e 6822 3c2f 636f ort \"wsa5.h\" and #i\n+001a9060: 6d70 6f72 7420 2277 7373 652e 6822 3c2f mport \"wsse.h\", respectiv\n+001a9080: 656c 7920 746f 203c 656d 3e3c 636f 6465 ely to env.h. Then compile\n+001a90b0: 2074 6869 7320 6865 6164 6572 2066 696c this header fil\n+001a90c0: 6520 7769 7468 3a20 3c2f 703e 3c70 7265 e with:

    soapcpp2 -pen\n+001a90f0: 7620 656e 762e 680a 3c2f 7072 653e 3c70 v env.h.
    The generated \n+001a9110: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e63 envC.c\n+001a9120: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2066 pp f\n+001a9130: 696c 6520 686f 6c64 7320 7468 6520 534f ile holds the SO\n+001a9140: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa\n+001a9150: 756c 7420 7365 7269 616c 697a 6572 732e ult serializers.\n+001a9160: 2057 6520 6361 6e20 6569 7468 6572 2063 We can either c\n+001a9170: 7265 6174 6520 6120 7365 7061 7261 7465 reate a separate\n+001a9180: 203c 656d 3e3c 636f 6465 3e65 6e76 432e envC.\n+001a9190: 646c 6c3c 2f63 6f64 653e 3c2f 656d 3e20 dll \n+001a91a0: 444c 4c20 666f 7220 7468 6973 2074 6861 DLL for this tha\n+001a91b0: 7420 616c 6c20 636c 6965 6e74 7320 616e t all clients an\n+001a91c0: 6420 7365 7276 6963 6520 6170 706c 6963 d service applic\n+001a91d0: 6174 696f 6e73 2077 696c 6c20 7573 652c ations will use,\n+001a91e0: 206f 7220 636f 6d62 696e 6520 3c65 6d3e or combine \n+001a91f0: 3c63 6f64 653e 656e 7643 2e63 7070 3c2f envC.cpp with \n+001a9210: 7468 6520 3c65 6d3e 3c63 6f64 653e 7374 the st\n+001a9220: 6473 6f61 7032 2e64 6c6c 3c2f 636f 6465 dsoap2.dll we create\n+001a9240: 2c20 7768 6963 6820 7765 2077 696c 6c20 , which we will \n+001a9250: 6578 706c 6169 6e20 6675 7274 6865 722e explain further.\n+001a9260: 3c2f 703e 0a3c 703e 5468 6520 6e65 7874

    .

    The next\n+001a9270: 2073 7465 7020 6973 2074 6f20 6372 6561 step is to crea\n+001a9280: 7465 203c 656d 3e3c 636f 6465 3e73 7464 te std\n+001a9290: 736f 6170 322e 646c 6c3c 2f63 6f64 653e soap2.dll\n+001a92a0: 3c2f 656d 3e20 7768 6963 6820 636f 6e73 which cons\n+001a92b0: 6973 7473 206f 6620 7468 6520 6669 6c65 ists of the file\n+001a92c0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+001a92d0: 2f73 7464 736f 6170 322e 6370 703c 2f63 /stdsoap2.cpp and envC.cpp\n+001a9300: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n+001a9310: 206f 7074 696f 6e61 6c6c 7920 7468 6520 optionally the \n+001a9320: 706c 7567 696e 7320 796f 7520 7761 6e74 plugins you want\n+001a9330: 2074 6f20 7573 6520 7375 6368 2061 7320 to use such as \n+001a9340: 3c65 6d3e 3c63 6f64 653e 7773 7365 6170 wsseap\n+001a9350: 692e 6370 703c 2f63 6f64 653e 3c2f 656d i.cpp (we need to re\n+001a9370: 6e61 6d65 2061 6c6c 203c 656d 3e3c 636f name all .c files to <\n+001a93a0: 636f 6465 3e2e 6370 703c 2f63 6f64 653e code>.cpp\n+001a93b0: 3c2f 656d 3e20 6669 6c65 7320 746f 2061 files to a\n+001a93c0: 766f 6964 2069 7373 7565 7320 7769 7468 void issues with\n+001a93d0: 204d 5356 432b 2b29 2e20 5468 6973 2044 MSVC++). This D\n+001a93e0: 4c4c 2063 6f6e 7461 696e 7320 616c 6c20 LL contains all \n+001a93f0: 636f 6d6d 6f6e 2066 756e 6374 696f 6e73 common functions\n+001a9400: 206e 6565 6465 6420 666f 7220 616c 6c20 needed for all \n+001a9410: 6f74 6865 7220 636c 6965 6e74 7320 616e other clients an\n+001a9420: 6420 7365 7276 6572 7320 6261 7365 6420 d servers based \n+001a9430: 6f6e 2067 534f 4150 2e20 436f 6d70 696c on gSOAP. Compil\n+001a9440: 6520 3c65 6d3e 3c63 6f64 653e 656e 7643 e envC\n+001a9450: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+001a9460: 2061 6e64 203c 656d 3e3c 636f 6465 3e67 and g\n+001a9470: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp\n+001a9480: 703c 2f63 6f64 653e 3c2f 656d 3e20 696e p in\n+001a9490: 746f 203c 656d 3e3c 636f 6465 3e73 7464 to std\n+001a94a0: 736f 6170 322e 646c 6c3c 2f63 6f64 653e soap2.dll\n+001a94b0: 3c2f 656d 3e20 7573 696e 6720 7468 6520 using the \n+001a94c0: 636f 6d70 696c 6572 206f 7074 696f 6e20 compiler option \n+001a94d0: 3c63 6f64 653e 2f44 3c2f 636f 6465 3e20 /D \n+001a94e0: 3c63 6f64 653e 2357 4954 485f 4e4f 4e41 #WITH_NONA\n+001a94f0: 4d45 5350 4143 4553 3c2f 636f 6465 3e20 MESPACES \n+001a9500: 616e 6420 7468 6520 4d53 5643 2050 7265 and the MSVC Pre\n+001a9510: 2d50 726f 6365 7373 6f72 2064 6566 696e -Processor defin\n+001a9520: 6974 696f 6e73 203c 636f 6465 3e53 4f41 itions SOA\n+001a9530: 505f 464d 4143 313d 5f5f 6465 636c 7370 P_FMAC1=__declsp\n+001a9540: 6563 2864 6c6c 6578 706f 7274 293c 2f63 ec(dllexport), SOAP\n+001a9560: 5f46 4d41 4333 3d5f 5f64 6563 6c73 7065 _FMAC3=__declspe\n+001a9570: 6328 646c 6c65 7870 6f72 7429 3c2f 636f c(dllexport), and the #SOAP_STD_EXP\n+001a95a0: 4f52 5453 3c2f 636f 6465 3e20 6d61 6372 ORTS macr\n+001a95b0: 6f20 7365 7420 6173 2073 686f 776e 2062 o set as shown b\n+001a95c0: 656c 6f77 2066 726f 6d20 7468 6520 4d53 elow from the MS\n+001a95d0: 5643 2063 6f6d 6d61 6e64 2070 726f 6d70 VC command promp\n+001a95e0: 743a 203c 2f70 3e3c 7072 6520 636c 6173 t:

    C:&\n+001a9600: 6774 3b20 636c 202f 6320 2f49 2e20 2f45  gt; cl /c /I. /E\n+001a9610: 4873 6320 2f44 5749 5448 5f4e 4f4e 414d  Hsc /DWITH_NONAM\n+001a9620: 4553 5041 4345 5320 2f44 534f 4150 5f46  ESPACES /DSOAP_F\n+001a9630: 4d41 4331 3d5f 5f64 6563 6c73 7065 6328  MAC1=__declspec(\n+001a9640: 646c 6c65 7870 6f72 7429 202f 4453 4f41  dllexport) /DSOA\n+001a9650: 505f 464d 4143 333d 5f5f 6465 636c 7370  P_FMAC3=__declsp\n+001a9660: 6563 2864 6c6c 6578 706f 7274 2920 2f44  ec(dllexport) /D\n+001a9670: 534f 4150 5f53 5444 5f45 5850 4f52 5453  SOAP_STD_EXPORTS\n+001a9680: 2065 6e76 432e 6370 7020 7374 6473 6f61   envC.cpp stdsoa\n+001a9690: 7032 2e63 7070 0a43 3a26 6774 3b20 6c69  p2.cpp.C:> li\n+001a96a0: 6e6b 202f 4c49 4250 4154 4820 7773 325f  nk /LIBPATH ws2_\n+001a96b0: 3332 2e6c 6962 202f 4f55 543a 6d79 6773  32.lib /OUT:mygs\n+001a96c0: 6f61 702e 646c 6c20 2f44 4c4c 2065 6e76  oap.dll /DLL env\n+001a96d0: 432e 6f62 6a20 7374 6473 6f61 7032 2e6f  C.obj stdsoap2.o\n+001a96e0: 626a 0a3c 2f70 7265 3e3c 703e 204e 6f74  bj.

    Not\n+001a96f0: 653a 2061 7320 6f66 2067 534f 4150 2032 e: as of gSOAP 2\n+001a9700: 2e38 2e33 3020 616e 6420 6c61 7465 722c .8.30 and later,\n+001a9710: 2074 6865 2044 4c4c 2065 7870 6f72 7420 the DLL export \n+001a9720: 6d61 6372 6f73 2073 686f 776e 2068 6572 macros shown her\n+001a9730: 6520 6172 6520 616c 6c20 7365 7420 7769 e are all set wi\n+001a9740: 7468 206f 6e65 2070 7265 2d70 726f 6365 th one pre-proce\n+001a9750: 7373 6f72 2064 6566 696e 6974 696f 6e20 ssor definition \n+001a9760: 3c63 6f64 653e 2353 4f41 505f 5354 445f #SOAP_STD_\n+001a9770: 4558 504f 5254 533c 2f63 6f64 653e 2e3c EXPORTS.<\n+001a9780: 2f70 3e0a 3c70 3e41 6c74 6572 6e61 7469 /p>.

    Alternati\n+001a9790: 7665 6c79 2c20 796f 7520 6361 6e20 636f vely, you can co\n+001a97a0: 6d70 696c 6520 7769 7468 203c 636f 6465 mpile with /D #WITH_SOAPDEFS_\n+001a97d0: 483c 2f63 6f64 653e 2061 6e64 2070 7574 H and put\n+001a97e0: 2074 6865 206d 6163 726f 2064 6566 696e the macro defin\n+001a97f0: 6974 696f 6e73 2069 6e20 3c65 6d3e 3c63 itions in soapdefs.h. This\n+001a9820: 2065 7870 6f72 7473 2061 6c6c 2066 756e exports all fun\n+001a9830: 6374 696f 6e73 2077 6869 6368 2061 7265 ctions which are\n+001a9840: 2070 7265 6365 6465 6420 6279 2074 6865 preceded by the\n+001a9850: 206d 6163 726f 203c 636f 6465 3e23 534f macro #SO\n+001a9860: 4150 5f46 4d41 4331 3c2f 636f 6465 3e20 AP_FMAC1 \n+001a9870: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the soapcpp2.cpp source\n+001a98a0: 2066 696c 6520 616e 6420 6d61 6372 6f20 file and macro \n+001a98b0: 3c63 6f64 653e 2353 4f41 505f 464d 4143 #SOAP_FMAC\n+001a98c0: 333c 2f63 6f64 653e 2069 6e20 7468 6520 3 in the \n+001a98d0: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e63 envC.c\n+001a98e0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2073 pp s\n+001a98f0: 6f75 7263 6520 6669 6c65 2e3c 2f70 3e0a ource file.

    .\n+001a9900: 3c70 3e46 696e 616c 6c79 2c20 6e6f 7465

    Finally, note\n+001a9910: 2074 6861 7420 7468 6520 6753 4f41 5020 that the gSOAP \n+001a9920: 736f 7572 6365 2063 6f64 6520 7061 636b source code pack\n+001a9930: 6167 6520 636f 6e74 6169 6e73 2061 206c age contains a l\n+001a9940: 6f74 206f 6620 3c65 6d3e 3c63 6f64 653e ot of \n+001a9950: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2073 .c s\n+001a9960: 6f75 7263 6520 636f 6465 2066 696c 6573 ource code files\n+001a9970: 2e20 4d69 7869 6e67 2043 2077 6974 6820 . Mixing C with \n+001a9980: 432b 2b20 6669 6c65 7320 6973 206e 6f74 C++ files is not\n+001a9990: 2072 6563 6f6d 6d65 6e64 6564 2077 6974 recommended wit\n+001a99a0: 6820 5669 7375 616c 2053 7475 6469 6f20 h Visual Studio \n+001a99b0: 616e 6420 7769 6c6c 206c 6561 6420 746f and will lead to\n+001a99c0: 2072 756e 2d74 696d 6520 6572 726f 7273 run-time errors\n+001a99d0: 2077 6865 6e20 6275 696c 6469 6e67 2044 when building D\n+001a99e0: 4c4c 732e 2054 6865 7265 666f 7265 2c20 LLs. Therefore, \n+001a99f0: 616c 7761 7973 2072 656e 616d 6520 3c65 always rename .c source co\n+001a9a20: 6465 2066 696c 6573 2074 6f20 3c65 6d3e de files to \n+001a9a30: 3c63 6f64 653e 2e63 7070 3c2f 636f 6465 .cpp source co\n+001a9a50: 6465 2066 696c 6573 2077 6865 6e20 6372 de files when cr\n+001a9a60: 6561 7469 6e67 2044 4c4c 732e 3c2f 703e eating DLLs.

    \n+001a9a70: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab\n+001a9a90: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Creating \n+001a9ae0: 636c 6965 6e74 2061 6e64 2073 6572 7665 client and serve\n+001a9af0: 7220 444c 4c73 3c2f 6833 3e0a 3c70 3e43 r DLLs

    .

    C\n+001a9b00: 6f6d 7069 6c65 2074 6865 203c 656d 3e3c ompile the <\n+001a9b10: 636f 6465 3e73 6f61 7043 6c69 656e 744c code>soapClientL\n+001a9b20: 6962 2e63 7070 3c2f 636f 6465 3e3c 2f65 ib.cpp and soapServerLib.c\n+001a9b50: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2073 pp s\n+001a9b60: 6f75 7263 6573 2061 7320 444c 4c73 2062 ources as DLLs b\n+001a9b70: 7920 7573 696e 6720 7468 6520 4d53 5643 y using the MSVC\n+001a9b80: 2050 7265 2d50 726f 6365 7373 6f72 2064 Pre-Processor d\n+001a9b90: 6566 696e 6974 696f 6e73 203c 636f 6465 efinitions SOAP_FMAC5=__de\n+001a9bb0: 636c 7370 6563 2864 6c6c 6578 706f 7274 clspec(dllexport\n+001a9bc0: 293c 2f63 6f64 653e 2061 6e64 203c 636f ) and SOAP_CMAC=__d\n+001a9be0: 6563 6c73 7065 6328 646c 6c65 7870 6f72 eclspec(dllexpor\n+001a9bf0: 7429 3c2f 636f 6465 3e2c 2061 6e64 2062 t), and b\n+001a9c00: 7920 7573 696e 6720 7468 6520 432b 2b20 y using the C++ \n+001a9c10: 636f 6d70 696c 6572 206f 7074 696f 6e20 compiler option \n+001a9c20: 3c63 6f64 653e 2f44 3c2f 636f 6465 3e20 /D \n+001a9c30: 3c63 6f64 653e 2357 4954 485f 4e4f 4e41 #WITH_NONA\n+001a9c40: 4d45 5350 4143 4553 3c2f 636f 6465 3e2e MESPACES.\n+001a9c50: 2041 6c6c 206f 6620 7468 6573 6520 6d61 All of these ma\n+001a9c60: 6372 6f73 2061 7265 2073 6574 2061 7320 cros are set as \n+001a9c70: 6120 7368 6f72 7468 616e 6420 7769 7468 a shorthand with\n+001a9c80: 206f 6e65 2070 7265 2d70 726f 6365 7373 one pre-process\n+001a9c90: 6f72 2064 6566 696e 6974 696f 6e20 3c63 or definition #SOAP_STD_EX\n+001a9cb0: 504f 5254 533c 2f63 6f64 653e 2028 7265 PORTS (re\n+001a9cc0: 7175 6972 6573 2067 534f 4150 2032 2e38 quires gSOAP 2.8\n+001a9cd0: 2e33 3020 6f72 206c 6174 6572 292e 3c2f .30 or later)..

    This DLL l\n+001a9cf0: 696e 6b73 2074 6f20 3c65 6d3e 3c63 6f64 inks to stdsoap2.dll we cr\n+001a9d20: 6561 7465 6420 696e 2053 6563 7469 6f6e eated in Section\n+001a9d30: 203c 6120 636c 6173 733d 2265 6c22 2068 Creatin\n+001a9d60: 6720 7468 6520 6261 7365 2073 7464 736f g the base stdso\n+001a9d70: 6170 322e 646c 6c3c 2f61 3e2e 3c2f 703e ap2.dll.

    \n+001a9d80: 0a3c 703e 546f 2063 7265 6174 6520 6d75 .

    To create mu\n+001a9d90: 6c74 6970 6c65 2044 4c4c 7320 696e 2074 ltiple DLLs in t\n+001a9da0: 6865 2073 616d 6520 7072 6f6a 6563 7420 he same project \n+001a9db0: 6469 7265 6374 6f72 792c 2079 6f75 2073 directory, you s\n+001a9dc0: 686f 756c 6420 7573 6520 3c62 3e3c 636f hould use soapcpp2 -p n\n+001a9de0: 616d 653c 2f63 6f64 653e 3c2f 623e 206f ame o\n+001a9df0: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n+001a9e00: 7020 6e61 6d65 3c2f 636f 6465 3e3c 2f62 p name to rename the \n+001a9e20: 6765 6e65 7261 7465 6420 3c65 6d3e 3c63 generated soapClientLi\n+001a9e40: 622e 6370 703c 2f63 6f64 653e 3c2f 656d b.cpp and \n+001a9e60: 736f 6170 5365 7276 6572 4c69 622e 6370 soapServerLib.cp\n+001a9e70: 703c 2f63 6f64 653e 3c2f 656d 3e20 2861 p (a\n+001a9e80: 6e64 2061 7373 6f63 6961 7465 6429 2066 nd associated) f\n+001a9e90: 696c 6573 2e20 5468 6520 3c62 3e3c 636f iles. The -p name option spe\n+001a9ec0: 6369 6669 6573 2061 203c 656d 3e3c 636f cifies a name prefix to re\n+001a9ef0: 706c 6163 6520 7468 6520 3c65 6d3e 3c63 place the soap<\n+001a9f10: 2f65 6d3e 2066 696c 6520 6e61 6d65 2070 /em> file name p\n+001a9f20: 7265 6669 782e 2041 6e6f 7468 6572 2077 refix. Another w\n+001a9f30: 6179 2069 7320 746f 2075 7365 2043 2b2b ay is to use C++\n+001a9f40: 206e 616d 6573 7061 6365 7320 7769 7468 namespaces with\n+001a9f50: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp\n+001a9f60: 7032 202d 7120 6e61 6d65 3c2f 636f 6465 p2 -q name option \n+001a9f80: 3c63 6f64 653e 2d71 206e 616d 653c 2f63 -q name, if the\n+001a9fa0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+001a9fb0: 7220 6669 6c65 2069 6e70 7574 2074 6f20 r file input to \n+001a9fc0: 736f 6170 6370 7032 2064 6f65 7320 6e6f soapcpp2 does no\n+001a9fd0: 7420 616c 7265 6164 7920 6465 636c 6172 t already declar\n+001a9fe0: 6520 6120 432b 2b20 6e61 6d65 7370 6163 e a C++ namespac\n+001a9ff0: 652e 2041 2063 6c65 616e 2073 6570 6172 e. A clean separ\n+001aa000: 6174 696f 6e20 6f66 206c 6962 7261 7269 ation of librari\n+001aa010: 6573 2063 616e 2061 6c73 6f20 6265 2061 es can also be a\n+001aa020: 6368 6965 7665 6420 7769 7468 2043 2b2b chieved with C++\n+001aa030: 206e 616d 6573 7061 6365 732c 2073 6565 namespaces, see\n+001aa040: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section How to bu\n+001aa080: 696c 6420 6120 636c 6965 6e74 206f 7220 ild a client or \n+001aa090: 7365 7276 6572 2069 6e20 6120 432b 2b20 server in a C++ \n+001aa0a0: 636f 6465 206e 616d 6573 7061 6365 3c2f code namespace .

    .

    Unle\n+001aa0c0: 7373 2079 6f75 2075 7365 2074 6865 2063 ss you use the c\n+001aa0d0: 6c69 656e 7420 7072 6f78 7920 616e 6420 lient proxy and \n+001aa0e0: 7365 7276 6572 206f 626a 6563 7420 636c server object cl\n+001aa0f0: 6173 7365 7320 283c 656d 3e3c 636f 6465 asses (soapXYZProxy.h<\n+001aa110: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+001aa120: 3c65 6d3e 3c63 6f64 653e 736f 6170 5859 soapXY\n+001aa130: 5a53 6572 7669 6365 2e68 3c2f 636f 6465 ZService.h), all cli\n+001aa150: 656e 7420 616e 6420 7365 7276 6572 2061 ent and server a\n+001aa160: 7070 6c69 6361 7469 6f6e 7320 6d75 7374 pplications must\n+001aa170: 2065 7870 6c69 6369 746c 7920 7365 7420 explicitly set \n+001aa180: 7468 6520 6e61 6d65 7370 6163 6573 2076 the namespaces v\n+001aa190: 616c 7565 206f 6620 7468 6520 3c63 6f64 alue of the so\n+001aa1f0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n+001aa200: 6e74 6578 7420 7769 7468 3a3c 2f70 3e0a ntext with:

    .\n+001aa210: 3c64 6976 2063 6c61 7373 3d22 6672 6167

    \n+001aa360: 7768 6572 6520 7468 6520 3c63 6f64 653e where the \n+001aa370: 6e61 6d65 7370 6163 6573 5b5d 3c2f 636f namespaces[] table should\n+001aa390: 2062 6520 6465 6669 6e65 6420 696e 2074 be defined in t\n+001aa3a0: 6865 2063 6c69 656e 742f 7365 7276 6572 he client/server\n+001aa3b0: 2073 6f75 7263 652e 2054 6865 7365 2074 source. These t\n+001aa3c0: 6162 6c65 7320 6172 6520 6765 6e65 7261 ables are genera\n+001aa3d0: 7465 6420 696e 2074 6865 203c 656d 3e3c ted in the <\n+001aa3e0: 636f 6465 3e2e 6e73 6d61 703c 2f63 6f64 code>.nsmap files. T\n+001aa400: 6865 2074 6162 6c65 7320 6172 6520 7265 he tables are re\n+001aa410: 6e61 6d65 6420 666f 7220 636f 6e76 656e named for conven\n+001aa420: 6965 6e63 6520 7573 696e 6720 3c62 3e3c ience using <\n+001aa430: 636f 6465 3e73 6f61 7063 7070 3220 2d6e code>soapcpp2 -n\n+001aa440: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+001aa450: 6f6e 203c 623e 3c63 6f64 653e 2d6e 3c2f on -n, see S\n+001aa470: 6563 7469 6f6e 203c 6120 636c 6173 733d ection soapcpp2 \n+001aa4b0: 6f70 7469 6f6e 733c 2f61 3e20 2e3c 2f70 options ..

    .... Back to ta\n+001aa4e0: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n+001aa4f0: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

    .

    .H\n+001aa520: 6f77 2074 6f20 6275 696c 6420 6d6f 6475 ow to build modu\n+001aa530: 6c65 7320 616e 6420 6c69 6272 6172 6965 les and librarie\n+001aa540: 7320 7769 7468 2074 6865 2023 6d6f 6475 s with the #modu\n+001aa550: 6c65 2064 6972 6563 7469 7665 3c2f 6832 le directive.

    The #\n+001aa570: 6d6f 6475 6c65 3c2f 636f 6465 3e20 6469 module di\n+001aa580: 7265 6374 6976 6520 6973 2075 7365 6420 rective is used \n+001aa590: 746f 2062 7569 6c64 206d 6f64 756c 6573 to build modules\n+001aa5a0: 2077 6974 6820 736f 6170 6370 7032 2e20 with soapcpp2. \n+001aa5b0: 4120 6c69 6272 6172 7920 6361 6e20 6265 A library can be\n+001aa5c0: 2062 7569 6c74 2066 726f 6d20 6120 6d6f built from a mo\n+001aa5d0: 6475 6c65 2061 6e64 206c 696e 6b65 6420 dule and linked \n+001aa5e0: 7769 7468 206d 756c 7469 706c 6520 5765 with multiple We\n+001aa5f0: 6220 7365 7276 6963 6573 2061 7070 6c69 b services appli\n+001aa600: 6361 7469 6f6e 732e 2054 6865 2064 6972 cations. The dir\n+001aa610: 6563 7469 7665 2073 686f 756c 6420 6170 ective should ap\n+001aa620: 7065 6172 2061 7420 7468 6520 746f 7020 pear at the top \n+001aa630: 6f66 2074 6865 2069 6e74 6572 6661 6365 of the interface\n+001aa640: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n+001aa650: 2073 6f61 7063 7070 3220 616e 6420 6861 soapcpp2 and ha\n+001aa660: 7320 7468 6520 666f 6c6c 6f77 696e 6720 s the following \n+001aa670: 666f 726d 6174 733a 3c2f 703e 0a3c 6469 formats:

    .
    \n+001aa6c0: 236d 6f64 756c 6520 2671 756f 743b 6e61 #module "na\n+001aa6d0: 6d65 2671 756f 743b 3c2f 7370 616e 3e20 me" \n+001aa6e0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    and

    .
    <\n+001aa720: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001aa730: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#mod\n+001aa750: 756c 6520 2671 756f 743b 6e61 6d65 2671 ule "name&q\n+001aa760: 756f 743b 3c2f 7370 616e 3e20 2671 756f uot; &quo\n+001aa770: 743b 6675 6c6c 6e61 6d65 2671 756f 743b t;fullname"\n+001aa780: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    where the name mus\n+001aa7c0: 7420 6265 2061 2075 6e69 7175 6520 7368 t be a unique sh\n+001aa7d0: 6f72 7420 6e61 6d65 2066 6f72 2074 6865 ort name for the\n+001aa7e0: 206d 6f64 756c 652e 2054 6865 206e 616d module. The nam\n+001aa7f0: 6520 6973 2063 6173 6520 696e 7365 6e73 e is case insens\n+001aa800: 6974 6976 6520 616e 6420 6d75 7374 206e itive and must n\n+001aa810: 6f74 2065 7863 6565 6420 3420 6368 6172 ot exceed 4 char\n+001aa820: 6163 7465 7273 2069 6e20 6c65 6e67 7468 acters in length\n+001aa830: 2e20 5468 6520 3c63 6f64 653e 6675 6c6c . The full\n+001aa840: 6e61 6d65 3c2f 636f 6465 3e2c 2077 6865 name, whe\n+001aa850: 6e20 7072 6573 656e 742c 2072 6570 7265 n present, repre\n+001aa860: 7365 6e74 7320 7468 6520 6675 6c6c 206e sents the full n\n+001aa870: 616d 6520 6f66 2074 6865 206d 6f64 756c ame of the modul\n+001aa880: 6520 616e 6420 6973 2075 7365 6420 746f e and is used to\n+001aa890: 2070 7265 6669 7820 7468 6520 6675 6e63 prefix the func\n+001aa8a0: 7469 6f6e 206e 616d 6573 206f 6620 7468 tion names of th\n+001aa8b0: 6520 6765 6e65 7261 7465 6420 7365 7269 e generated seri\n+001aa8c0: 616c 697a 6572 7320 7265 706c 6163 696e alizers replacin\n+001aa8d0: 6720 7468 6520 7573 7561 6c20 3c63 6f64 g the usual soap pr\n+001aa8f0: 6566 6978 2e20 4966 2061 6273 656e 742c efix. If absent,\n+001aa900: 2074 6865 2073 686f 7274 206e 616d 6520 the short name \n+001aa910: 6973 2075 7365 6420 746f 2070 7265 6669 is used to prefi\n+001aa920: 7820 7468 6520 6675 6e63 7469 6f6e 206e x the function n\n+001aa930: 616d 6573 206f 6620 7468 6520 7365 7269 ames of the seri\n+001aa940: 616c 697a 6572 732e 3c2f 703e 0a3c 703e alizers.

    .

    \n+001aa950: 5468 6520 7265 7374 206f 6620 7468 6520 The rest of the \n+001aa960: 636f 6e74 656e 7420 6f66 2074 6865 2069 content of the i\n+001aa970: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+001aa980: 6669 6c65 2069 6e63 6c75 6465 7320 7479 file includes ty\n+001aa990: 7065 2064 6563 6c61 7261 7469 6f6e 7320 pe declarations \n+001aa9a0: 616e 6420 6f70 7469 6f6e 616c 6c79 2074 and optionally t\n+001aa9b0: 6865 2064 6563 6c61 7261 7469 6f6e 7320 he declarations \n+001aa9c0: 6f66 2073 6572 7669 6365 206f 7065 7261 of service opera\n+001aa9d0: 7469 6f6e 7320 616e 6420 534f 4150 2048 tions and SOAP H\n+001aa9e0: 6561 6465 7273 2061 6e64 2046 6175 6c74 eaders and Fault\n+001aa9f0: 7320 7468 6174 2061 7265 2075 6e69 7665 s that are unive\n+001aaa00: 7273 616c 6c79 2075 7365 6420 6279 2053 rsally used by S\n+001aaa10: 4f41 5020 7365 7276 6963 6573 2c20 7768 OAP services, wh\n+001aaa20: 656e 2061 7070 6c69 6361 626c 652e 2057 en applicable. W\n+001aaa30: 6865 6e20 7468 6520 736f 6170 6370 7032 hen the soapcpp2\n+001aaa40: 2074 6f6f 6c20 7072 6f63 6573 7365 7320 tool processes \n+001aaa50: 7468 6520 6865 6164 6572 2066 696c 6520 the header file \n+001aaa60: 6d6f 6475 6c65 2c20 6974 2077 696c 6c20 module, it will \n+001aaa70: 6765 6e65 7261 7465 2074 6865 2073 6f75 generate the sou\n+001aaa80: 7263 6520 636f 6465 7320 666f 7220 6120 rce codes for a \n+001aaa90: 6c69 6272 6172 792e 2054 6865 2057 6562 library. The Web\n+001aaaa0: 2073 6572 7669 6365 7320 6170 706c 6963 services applic\n+001aaab0: 6174 696f 6e20 7468 6174 2075 7365 7320 ation that uses \n+001aaac0: 7468 6520 6c69 6272 6172 7920 7368 6f75 the library shou\n+001aaad0: 6c64 2075 7365 2061 2068 6561 6465 7220 ld use a header \n+001aaae0: 6669 6c65 2074 6861 7420 696d 706f 7274 file that import\n+001aaaf0: 7320 7468 6520 6d6f 6475 6c65 2077 6974 s the module wit\n+001aab00: 6820 7468 6520 3c63 6f64 653e 2369 6d70 h the #imp\n+001aab10: 6f72 743c 2f63 6f64 653e 2064 6972 6563 ort direc\n+001aab20: 7469 7665 2c20 666f 7220 6578 616d 706c tive, for exampl\n+001aab30: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+001aab60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001aab70: 656e 7422 3e2f 2a20 436f 6e74 656e 7473 ent\">/* Contents\n+001aab80: 206f 6620 6669 6c65 2026 7175 6f74 3b6d of file "m\n+001aab90: 6f64 756c 652e 6826 7175 6f74 3b20 2a2f odule.h" */\n+001aaba0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+001aabb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001aabc0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#mod\n+001aabe0: 756c 6520 2671 756f 743b 7465 7374 2671 ule "test&q\n+001aabf0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .// types and\n+001aac50: 2074 7970 6564 6566 7320 6265 636f 6d65 typedefs become\n+001aac60: 206d 6f64 756c 652d 7370 6563 6966 6963 module-specific\n+001aac70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001aac90: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef LONG64 xsd__long;.
    c\n+001aad50: 6861 723c 2f73 7061 6e3e 2a3b 3c2f 6469 har*;.
    .<\n+001aad90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001aada0: 656e 7422 3e2f 2f20 6120 6d6f 6475 6c65 ent\">// a module\n+001aadb0: 2d73 7065 6369 6669 6320 7374 7275 6374 -specific struct\n+001aadc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001aade0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__S
    \n+001aae10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    \n+001aae40: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // me\n+001aae60: 6d62 6572 733c 2f73 7061 6e3e 3c2f 6469 mbers.
    };
    .

    The \n+001aaeb0: 3c63 6f64 653e 6d6f 6475 6c65 2e68 3c2f module.h data \n+001aaed0: 6269 6e64 696e 6720 696e 7465 7266 6163 binding interfac\n+001aaee0: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n+001aaef0: 7220 736f 6170 6370 7032 2064 6563 6c61 r soapcpp2 decla\n+001aaf00: 7265 7320 6d6f 6475 6c65 2d73 7065 6369 res module-speci\n+001aaf10: 6669 6320 7365 7269 616c 697a 6162 6c65 fic serializable\n+001aaf20: 2074 7970 6573 203c 636f 6465 3e4c 4f4e types LON\n+001aaf30: 4736 343c 2f63 6f64 653e 2c20 3c63 6f64 G64, xsd__long, char*<\n+001aaf60: 2f63 6f64 653e 2c20 616e 6420 6120 3c63 /code>, and a struct ns__S\n+001aaf80: 3c2f 636f 6465 3e2e 2054 6865 206d 6f64 . The mod\n+001aaf90: 756c 6520 6e61 6d65 2069 7320 2274 6573 ule name is \"tes\n+001aafa0: 7422 2c20 736f 2074 6865 2073 6f61 7063 t\", so the soapc\n+001aafb0: 7070 3220 746f 6f6c 2070 726f 6475 6365 pp2 tool produce\n+001aafc0: 7320 6120 3c65 6d3e 3c63 6f64 653e 7465 s a te\n+001aafd0: 7374 432e 6370 703c 2f63 6f64 653e 3c2f stC.cpp file with th\n+001aaff0: 6520 584d 4c20 7365 7269 616c 697a 6572 e XML serializer\n+001ab000: 7320 666f 7220 7468 6573 6520 7479 7065 s for these type\n+001ab010: 732e 2054 6865 203c 656d 3e3c 636f 6465 s. The testC.cpp data bind\n+001ab040: 696e 6720 696d 706c 656d 656e 7461 7469 ing implementati\n+001ab050: 6f6e 2073 6f75 7263 6520 636f 6465 2063 on source code c\n+001ab060: 616e 2062 6520 7365 7061 7261 7465 6c79 an be separately\n+001ab070: 2063 6f6d 7069 6c65 6420 616e 6420 6c69 compiled and li\n+001ab080: 6e6b 6564 2077 6974 6820 616e 2061 7070 nked with an app\n+001ab090: 6c69 6361 7469 6f6e 2e20 4966 2073 6572 lication. If ser\n+001ab0a0: 7669 6365 206f 7065 7261 7469 6f6e 7320 vice operations \n+001ab0b0: 6172 6520 6465 636c 6172 6564 2069 6e20 are declared in \n+001ab0c0: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n+001ab0d0: 6164 6572 2066 696c 6520 6173 2066 756e ader file as fun\n+001ab0e0: 6374 696f 6e20 7072 6f74 6f74 7970 6573 ction prototypes\n+001ab0f0: 2c20 7765 2061 6c73 6f20 6765 7420 3c65 , we also get testClie\n+001ab110: 6e74 2e63 7070 3c2f 636f 6465 3e3c 2f65 nt.cpp client stub f\n+001ab130: 756e 6374 696f 6e73 2061 6e64 203c 656d unctions and testServe\n+001ab150: 722e 6370 703c 2f63 6f64 653e 3c2f 656d r.cpp server skeleto\n+001ab170: 6e20 6675 6e63 7469 6f6e 732e 3c2f 703e n functions.

    \n+001ab180: 0a3c 703e 5468 6572 6520 6172 6520 736f .

    There are so\n+001ab190: 6d65 206c 696d 6974 6174 696f 6e73 2066 me limitations f\n+001ab1a0: 6f72 206d 6f64 756c 6520 696d 706f 7274 or module import\n+001ab1b0: 733a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s:

    .
      .
    • \n+001ab1c0: 4120 6d6f 6475 6c65 206d 7573 7420 6265 A module must be\n+001ab1d0: 2069 6d70 6f72 7465 6420 696e 746f 2061 imported into a\n+001ab1e0: 6e6f 7468 6572 2069 6e74 6572 6661 6365 nother interface\n+001ab1f0: 2068 6561 6465 7220 746f 2075 7365 2074 header to use t\n+001ab200: 6865 206d 6f64 756c 6527 7320 7479 7065 he module's type\n+001ab210: 2064 6566 696e 6974 696f 6e73 2e3c 2f6c definitions..
    • When mult\n+001ab230: 6970 6c65 206d 6f64 756c 6573 2061 7265 iple modules are\n+001ab240: 2069 6d70 6f72 7465 642c 2074 6865 2074 imported, the t\n+001ab250: 7970 6573 2074 6861 7420 7468 6579 2064 ypes that they d\n+001ab260: 6563 6c61 7265 206d 7573 7420 6265 2064 eclare must be d\n+001ab270: 6563 6c61 7265 6420 696e 206f 6e65 206d eclared in one m\n+001ab280: 6f64 756c 6520 6f6e 6c79 2074 6f20 6176 odule only to av\n+001ab290: 6f69 6420 6e61 6d65 2063 6c61 7368 6573 oid name clashes\n+001ab2a0: 2061 6e64 206c 696e 6b20 6572 726f 7273 and link errors\n+001ab2b0: 2e20 596f 7520 6361 6e6e 6f74 2063 7265 . You cannot cre\n+001ab2c0: 6174 6520 7477 6f20 6d6f 6475 6c65 7320 ate two modules \n+001ab2d0: 7468 6174 2064 6563 6c61 7265 206f 7220 that declare or \n+001ab2e0: 7573 6520 7468 6520 7361 6d65 2074 7970 use the same typ\n+001ab2f0: 6520 616e 6420 696d 706f 7274 2074 6865 e and import the\n+001ab300: 7365 206d 6f64 756c 6573 2073 6570 6172 se modules separ\n+001ab310: 6174 656c 7920 696e 746f 2061 6e6f 7468 ately into anoth\n+001ab320: 6572 2068 6561 6465 7220 6669 6c65 2e20 er header file. \n+001ab330: 5768 656e 2075 7369 6e67 206d 6f64 756c When using modul\n+001ab340: 6573 2c20 636f 6e73 6964 6572 2063 7265 es, consider cre\n+001ab350: 6174 696e 6720 6120 6d6f 6475 6c65 2068 ating a module h\n+001ab360: 6965 7261 7263 6879 2073 7563 6820 7468 ierarchy such th\n+001ab370: 6174 2074 7970 6573 2061 7265 2064 6563 at types are dec\n+001ab380: 6c61 7265 6420 6f6e 6c79 206f 6e63 6520 lared only once \n+001ab390: 616e 6420 6279 206f 6e6c 7920 6f6e 6520 and by only one \n+001ab3a0: 6d6f 6475 6c65 2077 6865 6e20 7468 6573 module when thes\n+001ab3b0: 6520 6d6f 6475 6c65 7320 6d75 7374 2062 e modules must b\n+001ab3c0: 6520 6c69 6e6b 6564 2e3c 2f6c 693e 0a3c e linked.
    • .<\n+001ab3d0: 2f75 6c3e 0a3c 703e 5769 7468 206d 6f64 /ul>.

      With mod\n+001ab3e0: 756c 6573 2c20 7468 6520 736f 7572 6365 ules, the source\n+001ab3f0: 2063 6f64 6520 7365 7269 616c 697a 6572 code serializer\n+001ab400: 7320 666f 7220 7468 6520 7479 7065 7320 s for the types \n+001ab410: 6465 6669 6e65 6420 696e 2074 6865 206d defined in the m\n+001ab420: 6f64 756c 6573 2061 7265 2067 656e 6572 odules are gener\n+001ab430: 6174 6564 2077 6974 6820 736f 6170 6370 ated with soapcp\n+001ab440: 7032 2073 6570 6172 6174 656c 792e 2046 p2 separately. F\n+001ab450: 6f72 2065 7861 6d70 6c65 2c20 6173 7375 or example, assu\n+001ab460: 6d65 2074 6861 7420 7765 2068 6176 6520 me that we have \n+001ab470: 6120 6d6f 6475 6c65 203c 656d 3e3c 636f a module module.h:

      .
      /* Co\n+001ab4e0: 6e74 656e 7473 206f 6620 6669 6c65 2026 ntents of file &\n+001ab4f0: 7175 6f74 3b6d 6f64 756c 652e 6826 7175 quot;module.h&qu\n+001ab500: 6f74 3b20 2a2f 3c2f 7370 616e 3e3c 2f64 ot; */.
      #module "t\n+001ab550: 6573 7426 7175 6f74 3b3c 2f73 7061 6e3e est"\n+001ab560: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n 001ab580: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      struct ns__S
      .{\n-001ab5f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      char *name;
      .\n-001ab640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      \n-001ab670: 696e 743c 2f73 7061 6e3e 2061 6d6f 756e int amoun\n-001ab680: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
      .
      };.

      an\n-001ab6c0: 6420 6120 6865 6164 6572 2066 696c 6520 d a header file \n-001ab6d0: 3c65 6d3e 3c63 6f64 653e 6578 616d 706c exampl\n-001ab6e0: 652e 683c 2f63 6f64 653e 3c2f 656d 3e20 e.h \n-001ab6f0: 7468 6174 2075 7365 7320 6974 3a3c 2f70 that uses it:.

      \n-001ab740: 2f2a 2043 6f6e 7465 6e74 7320 6f66 2066 /* Contents of f\n-001ab750: 696c 6520 2671 756f 743b 6578 616d 706c ile "exampl\n-001ab760: 652e 6826 7175 6f74 3b20 2a2f 3c2f 7370 e.h" */
      .
      #import &\n-001ab7b0: 7175 6f74 3b6d 6f64 756c 652e 6826 7175 quot;module.h&qu\n-001ab7c0: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
      \n+001ab590: 6522 3e3c 7370 616e 2063 6c61 7373 3d22 e\">struct \n+001ab5b0: 3c2f 7370 616e 3e6e 735f 5f53 3c2f 6469 ns__S.
      {
      . \n+001ab5f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n+001ab610: 723c 2f73 7061 6e3e 202a 6e61 6d65 3b3c r *name;<\n+001ab620: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      int\n+001ab660: 2061 6d6f 756e 743b 3c2f 6469 763e 0a3c amount;
      .<\n+001ab670: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ab680: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
      .
    \n+001ab690: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The module\n-001ab910: 2069 7320 636f 6d70 696c 6564 2061 7320 is compiled as \n-001ab920: 666f 6c6c 6f77 733a 203c 2f70 3e3c 7072 follows:

    soapcpp2 modu\n-001ab950: 6c65 312e 680a 3c2f 7072 653e 3c70 3e20 le1.h.

    \n-001ab960: 5468 6973 2067 656e 6572 6174 6573 2074 This generates t\n-001ab970: 6865 2066 696c 6573 203c 656d 3e3c 636f he files testStub.h, <\n-001ab9a0: 636f 6465 3e74 6573 7448 2e68 3c2f 636f code>testH.h, and testC.cp\n-001ab9d0: 703c 2f63 6f64 653e 3c2f 656d 3e20 7769 p wi\n-001ab9e0: 7468 2073 6572 6961 6c69 7a65 7273 2066 th serializers f\n-001ab9f0: 6f72 203c 636f 6465 3e73 7472 7563 7420 or struct \n-001aba00: 6e73 5f5f 533c 2f63 6f64 653e 2062 7574 ns__S but\n-001aba10: 2061 6c73 6f20 666f 7220 3c63 6f64 653e also for \n-001aba20: 6368 6172 2a3c 2f63 6f64 653e 2061 6e64 char* and\n-001aba30: 203c 636f 6465 3e69 6e74 3c2f 636f 6465 int.

    .

    Runnin\n-001aba50: 6720 736f 6170 6370 7032 206f 6e20 3c65 g soapcpp2 on example.\n-001aba70: 683c 2f63 6f64 653e 3c2f 656d 3e20 696d h im\n-001aba80: 706f 7274 7320 7468 6520 6d6f 6475 6c65 ports the module\n-001aba90: 2064 6566 696e 6974 696f 6e73 2c20 6275 definitions, bu\n-001abaa0: 7420 646f 6573 206e 6f74 2067 656e 6572 t does not gener\n-001abab0: 6174 6520 7365 7269 616c 697a 6572 7320 ate serializers \n-001abac0: 666f 7220 3c63 6f64 653e 7374 7275 6374 for struct\n-001abad0: 206e 735f 5f53 3c2f 636f 6465 3e2c 203c ns__S, <\n-001abae0: 636f 6465 3e63 6861 722a 3c2f 636f 6465 code>char* and int<\n-001abb00: 2f63 6f64 653e 2073 696e 6365 2074 6865 /code> since the\n-001abb10: 7365 2061 7265 2064 6566 696e 6564 2062 se are defined b\n-001abb20: 7920 3c65 6d3e 3c63 6f64 653e 6d6f 6475 y modu\n-001abb30: 6c65 2e68 3c2f 636f 6465 3e3c 2f65 6d3e le.h\n-001abb40: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    soap\n-001abb60: 6370 7032 202d 434c 2065 7861 6d70 6c65  cpp2 -CL example\n-001abb70: 2e68 0a3c 2f70 7265 3e3c 703e 2041 6e20  .h.

    An \n-001abb80: 6578 616d 706c 6520 636c 6965 6e74 2061 example client a\n-001abb90: 7070 6c69 6361 7469 6f6e 2074 6861 7420 pplication that \n-001abba0: 6361 6c6c 7320 7468 6520 636c 6965 6e74 calls the client\n-001abbb0: 2073 7475 6220 6675 6e63 7469 6f6e 3a3c stub function:<\n-001abbc0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #include \n-001abc10: 2671 756f 743b 736f 6170 482e 6826 7175 "soapH.h&qu\n-001abc20: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n-001abc30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n-001abc60: 6e63 6c75 6465 2026 7175 6f74 3b6e 732e nclude "ns.\n-001abc70: 6e73 6d61 7026 7175 6f74 3b3c 2f73 7061 nsmap"
    .
    .
    i\n-001abcd0: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main()\n+001ab7e0: 6522 3e3c 7370 616e 2063 6c61 7373 3d22 e\">int\n+001ab800: 3c2f 7370 616e 3e20 6e73 5f5f 7765 626d ns__webm\n+001ab810: 6574 686f 6428 3c73 7061 6e20 636c 6173 ethod(cons\n+001ab830: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001ab860: 636f 6465 2c20 3c73 7061 6e20 636c 6173 code, stru\n+001ab880: 6374 3c2f 7370 616e 3e20 6e73 5f5f 5320 ct ns__S \n+001ab890: 2a72 6563 6f72 642c 203c 7370 616e 2063 *record, int *r\n+001ab8c0: 6573 756c 7429 3b20 2020 203c 2f64 6976 esult); .

    The \n+001ab8f0: 6d6f 6475 6c65 2069 7320 636f 6d70 696c module is compil\n+001ab900: 6564 2061 7320 666f 6c6c 6f77 733a 203c ed as follows: <\n+001ab910: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

    soapcpp\n+001ab930: 3220 6d6f 6475 6c65 312e 680a 3c2f 7072  2 module1.h.

    This gener\n+001ab950: 6174 6573 2074 6865 2066 696c 6573 203c ates the files <\n+001ab960: 656d 3e3c 636f 6465 3e74 6573 7453 7475 em>testStu\n+001ab970: 622e 683c 2f63 6f64 653e 3c2f 656d 3e2c b.h,\n+001ab980: 203c 656d 3e3c 636f 6465 3e74 6573 7448 testH\n+001ab990: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .h, \n+001ab9a0: 616e 6420 3c65 6d3e 3c63 6f64 653e 7465 and te\n+001ab9b0: 7374 432e 6370 703c 2f63 6f64 653e 3c2f stC.cpp with seriali\n+001ab9d0: 7a65 7273 2066 6f72 203c 636f 6465 3e73 zers for s\n+001ab9e0: 7472 7563 7420 6e73 5f5f 533c 2f63 6f64 truct ns__S but also for \n+001aba00: 3c63 6f64 653e 6368 6172 2a3c 2f63 6f64 char* and int\n+001aba20: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

    .

    \n+001aba30: 5275 6e6e 696e 6720 736f 6170 6370 7032 Running soapcpp2\n+001aba40: 206f 6e20 3c65 6d3e 3c63 6f64 653e 6578 on ex\n+001aba50: 616d 706c 652e 683c 2f63 6f64 653e 3c2f ample.h imports the \n+001aba70: 6d6f 6475 6c65 2064 6566 696e 6974 696f module definitio\n+001aba80: 6e73 2c20 6275 7420 646f 6573 206e 6f74 ns, but does not\n+001aba90: 2067 656e 6572 6174 6520 7365 7269 616c generate serial\n+001abaa0: 697a 6572 7320 666f 7220 3c63 6f64 653e izers for \n+001abab0: 7374 7275 6374 206e 735f 5f53 3c2f 636f struct ns__S, char*\n+001abad0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and int sin\n+001abaf0: 6365 2074 6865 7365 2061 7265 2064 6566 ce these are def\n+001abb00: 696e 6564 2062 7920 3c65 6d3e 3c63 6f64 ined by module.h:

    soapcpp2 -CL e\n+001abb50: 7861 6d70 6c65 2e68 0a3c 2f70 7265 3e3c xample.h.
    <\n+001abb60: 703e 2041 6e20 6578 616d 706c 6520 636c p> An example cl\n+001abb70: 6965 6e74 2061 7070 6c69 6361 7469 6f6e ient application\n+001abb80: 2074 6861 7420 6361 6c6c 7320 7468 6520 that calls the \n+001abb90: 636c 6965 6e74 2073 7475 6220 6675 6e63 client stub func\n+001abba0: 7469 6f6e 3a3c 2f70 3e0a 3c64 6976 2063 tion:

    .
    \n+001abbc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+001abbf0: 636c 7564 6520 2671 756f 743b 736f 6170 clude "soap\n+001abc00: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h"\n+001abc10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n+001abc50: 6f74 3b6e 732e 6e73 6d61 7026 7175 6f74 ot;ns.nsmap"\n+001abc60: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001abc70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001abc80: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n+001abcc0: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{\n 001abce0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001abd00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    struct n\n-001abe40: 735f 5f53 2073 3b3c 2f64 6976 3e0a 3c64 s__S s;
    .\n-001abe60: 2020 736f 6170 5f64 6566 6175 6c74 5f6e soap_default_n\n-001abe70: 735f 5f53 283c 6120 636c 6173 733d 2263 s__S(soap\n-001abea0: 3c2f 613e 2c20 2661 6d70 3b73 293b 3c2f , &s);.
    s.name \n-001abed0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_strd\n-001abf30: 7570 3c2f 613e 283c 6120 636c 6173 733d up(so\n-001abf60: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "name&q\n-001abf90: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    s.amount\n-001abfc0: 203d 2031 3234 3b3c 2f64 6976 3e0a 3c64 = 124;
    .\n-001abfe0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-001ac000: 2f73 7061 6e3e 206e 3b3c 2f64 6976 3e0a /span> n;
    .\n-001ac010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-001ac040: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-001ac050: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n-001ac060: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001ac090: 2c20 656e 6470 6f69 6e74 2c20 4e55 4c4c , endpoint, NULL\n-001ac0a0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-001ac0c0: 756f 743b 636f 6465 2671 756f 743b 3c2f uot;code", &s, &\n-001ac0e0: 616d 703b 6e29 293c 2f64 6976 3e0a 3c64 amp;n))
    .\n-001ac100: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n-001ac160: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std\n-001ac1a0: 6572 7229 3b3c 2f64 6976 3e0a 3c64 6976 err);
    . \n-001ac1c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n-001ac200: 2020 7072 696e 7466 283c 7370 616e 2063 printf("OK n \n-001ac230: 3d20 2564 5c6e 2671 756f 743b 3c2f 7370 = %d\\n", n);
    .<\n-001ac250: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ac260: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des\n-001ac2c0: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy(\n-001ac2f0: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n-001ac300: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n-001ac3b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ac3c0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_fre\n-001ac420: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n-001ac450: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-001ac470: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n-001ac490: 703e 5765 2063 6f6d 7069 6c65 2074 6869 p>We compile thi\n-001ac4a0: 7320 6578 616d 706c 6520 6173 2066 6f6c s example as fol\n-001ac4b0: 6c6f 7773 3a20 3c2f 703e 3c70 7265 2063 lows:

    \n-001ac4d0: 632b 2b20 2d6f 2065 7861 6d70 6c65 2065  c++ -o example e\n-001ac4e0: 7861 6d70 6c65 2e63 7070 2074 6573 7443  xample.cpp testC\n-001ac4f0: 2e63 7070 2073 6f61 7043 2e63 7070 2073  .cpp soapC.cpp s\n-001ac500: 6f61 7043 6c69 656e 742e 6370 7020 7374  oapClient.cpp st\n-001ac510: 6473 6f61 7032 2e63 7070 0a3c 2f70 7265  dsoap2.cpp.

    Modules may\n-001ac530: 2068 656c 7020 746f 2064 6566 696e 6520 help to define \n-001ac540: 6120 6d6f 6475 6c61 7220 6869 6572 6172 a modular hierar\n-001ac550: 6368 7920 6f66 206c 6962 7261 7269 6573 chy of libraries\n-001ac560: 2077 6974 6820 7265 7573 6162 6c65 2073 with reusable s\n-001ac570: 6572 6961 6c69 7a61 626c 6520 7479 7065 erializable type\n-001ac580: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

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

    .\n-001ac5e0: 3c2f 613e 0a50 6c75 6769 6e73 2c20 6d6f .Plugins, mo\n-001ac5f0: 6475 6c65 732c 2061 6e64 2065 7874 656e dules, and exten\n-001ac600: 7369 6f6e 733c 2f68 323e 0a3c 703e 506c sions.

    Pl\n-001ac610: 7567 696e 7320 6f66 6665 7220 6120 636f ugins offer a co\n-001ac620: 6e76 656e 6965 6e74 2065 7874 656e 7369 nvenient extensi\n-001ac630: 6f6e 206d 6563 6861 6e69 736d 2066 6f72 on mechanism for\n-001ac640: 2074 6865 2067 534f 4150 2074 6f6f 6c6b the gSOAP toolk\n-001ac650: 6974 2062 7920 6578 7465 6e64 696e 6720 it by extending \n-001ac660: 7468 6520 6361 7061 6269 6c69 7469 6573 the capabilities\n-001ac670: 206f 6620 6974 7320 656e 6769 6e65 2e20 of its engine. \n-001ac680: 5768 656e 2074 6865 2070 6c75 6769 6e20 When the plugin \n-001ac690: 7265 6769 7374 6572 7320 7769 7468 2074 registers with t\n-001ac6a0: 6865 2067 534f 4150 2065 6e67 696e 652c he gSOAP engine,\n-001ac6b0: 2069 7420 6861 7320 6675 6c6c 2061 6363 it has full acc\n-001ac6c0: 6573 7320 746f 2074 6865 2072 756e 2d74 ess to the run-t\n-001ac6d0: 696d 6520 7365 7474 696e 6773 2061 6e64 ime settings and\n-001ac6e0: 2074 6865 2065 6e67 696e 6527 7320 6675 the engine's fu\n-001ac6f0: 6e63 7469 6f6e 2063 616c 6c62 6163 6b73 nction callbacks\n-001ac700: 2e20 5570 6f6e 2072 6567 6973 7472 792c . Upon registry,\n-001ac710: 2074 6865 2070 6c75 6769 6e27 7320 6c6f the plugin's lo\n-001ac720: 6361 6c20 6461 7461 2069 7320 6173 736f cal data is asso\n-001ac730: 6369 6174 6564 2077 6974 6820 7468 6520 ciated with the \n-001ac740: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context. By ov\n-001ac7b0: 6572 7269 6469 6e67 2074 6865 2063 616c erriding the cal\n-001ac7c0: 6c62 6163 6b73 2077 6974 6820 7468 6520 lbacks with the \n-001ac7d0: 706c 7567 696e 2773 2063 616c 6c62 6163 plugin's callbac\n-001ac7e0: 6b73 2c20 7468 6520 706c 7567 696e 2065 ks, the plugin e\n-001ac7f0: 7874 656e 6473 206f 7220 6d6f 6469 6669 xtends or modifi\n-001ac800: 6573 2074 6865 2065 6e67 696e 6527 7320 es the engine's \n-001ac810: 6361 7061 6269 6c69 7469 6573 2e20 5468 capabilities. Th\n-001ac820: 6520 6c6f 6361 6c20 706c 7567 696e 2064 e local plugin d\n-001ac830: 6174 6120 6361 6e20 6265 2061 6363 6573 ata can be acces\n-001ac840: 7365 6420 7468 726f 7567 6820 6120 6c6f sed through a lo\n-001ac850: 6f6b 7570 2066 756e 6374 696f 6e2c 2075 okup function, u\n-001ac860: 7375 616c 6c79 2069 6e76 6f6b 6564 2077 sually invoked w\n-001ac870: 6974 6869 6e20 6120 6361 6c6c 6261 636b ithin a callback\n-001ac880: 2066 756e 6374 696f 6e20 746f 2061 6363 function to acc\n-001ac890: 6573 7320 7468 6520 706c 7567 696e 2064 ess the plugin d\n-001ac8a0: 6174 612e 2054 6865 2072 6567 6973 7472 ata. The registr\n-001ac8b0: 7920 616e 6420 6c6f 6f6b 7570 2066 756e y and lookup fun\n-001ac8c0: 6374 696f 6e73 2061 7265 3a3c 2f70 3e0a ctions are:

    .\n-001ac8d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .int soap_regis\n-001acc50: 7465 725f 706c 7567 696e 5f61 7267 2873 ter_plugin_arg(s\n-001acc60: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001acc70: 2c20 696e 7428 2a66 6372 6561 7465 2928 , int(*fcreate)(\n-001acc80: 7374 7275 6374 2073 6f61 7020 2a2c 2073 struct soap *, s\n-001acc90: 7472 7563 7420 736f 6170 5f70 6c75 6769 truct soap_plugi\n-001acca0: 6e20 2a2c 2076 6f69 6420 2a29 2c20 766f n *, void *), vo\n-001accb0: 6964 202a 6172 6729 3c2f 6469 763e 3c64 id *arg)
    Register a plug\n-001acce0: 696e 2077 6974 6820 616e 2061 7267 756d in with an argum\n-001accf0: 656e 742e 3c2f 6469 763e 3c2f 6469 763e ent.
    \n-001acd00: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
    <\n-001acd30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001acd40: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-001acd60: 2f73 7061 6e3e 2a20 736f 6170 5f6c 6f6f /span>* soap_loo\n-001acd70: 6b75 705f 706c 7567 696e 283c 7370 616e kup_plugin(struct <\n-001acda0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001acdb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001acdc0: 6874 6d6c 223e 736f 6170 3c2f 613e 2a2c html\">soap*,\n-001acdd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-001ace10: 6172 3c2f 7370 616e 3e2a 293b 3c2f 6469 ar*);.

    The\n-001ace40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_copy<\n-001acf00: 2f63 6f64 653e 2066 756e 6374 696f 6e20 /code> function \n-001acf10: 7265 7475 726e 7320 6120 6e65 7720 6479 returns a new dy\n-001acf20: 6e61 6d69 6361 6c6c 7920 616c 6c6f 6361 namically alloca\n-001acf30: 7465 6420 3c63 6f64 653e 3c61 2063 6c61 ted soap context th\n-001acfa0: 6174 2069 7320 6120 636f 7079 206f 6620 at is a copy of \n-001acfb0: 616e 6f74 6865 722c 2073 7563 6820 7468 another, such th\n-001acfc0: 6174 206e 6f20 6461 7461 2069 7320 7368 at no data is sh\n-001acfd0: 6172 6564 2062 6574 7765 656e 2074 6865 ared between the\n-001acfe0: 2063 6f70 7920 616e 6420 7468 6520 6f72 copy and the or\n-001acff0: 6967 696e 616c 2063 6f6e 7465 7874 2e20 iginal context. \n-001ad000: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soap_copy functi\n-001ad0d0: 6f6e 2069 6e76 6f6b 6573 2074 6865 2063 on invokes the c\n-001ad0e0: 6f70 7920 6675 6e63 7469 6f6e 7320 6f66 opy functions of\n-001ad0f0: 2074 6865 2072 6567 6973 7465 7265 6420 the registered \n-001ad100: 706c 7567 696e 7320 746f 2063 6f70 7920 plugins to copy \n-001ad110: 7468 6520 706c 7567 696e 7327 206c 6f63 the plugins' loc\n-001ad120: 616c 2064 6174 612e 2054 6865 203c 636f al data. The soap_done\n-001ad200: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n-001ad210: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_free<\n-001ad2c0: 2f61 3e3c 2f63 6f64 653e 2066 756e 6374 /a> funct\n-001ad2d0: 696f 6e73 2064 652d 7265 6769 7374 6572 ions de-register\n-001ad2e0: 7320 616c 6c20 706c 7567 696e 2e3c 2f70 s all plugin..

    The follow \n-001ad300: 6578 616d 706c 6520 6f76 6572 7269 6465 example override\n-001ad310: 7320 7468 6520 7365 6e64 2061 6e64 2072 s the send and r\n-001ad320: 6563 6569 7665 2063 616c 6c62 6163 6b73 eceive callbacks\n-001ad330: 2074 6f20 636f 7079 2061 6c6c 206d 6573 to copy all mes\n-001ad340: 7361 6765 7320 7468 6174 2061 7265 2073 sages that are s\n-001ad350: 656e 7420 616e 6420 7265 6365 6976 6564 ent and received\n-001ad360: 2074 6f20 7468 6520 7465 726d 696e 616c to the terminal\n-001ad370: 2028 7374 6465 7272 292e 3c2f 703e 0a3c (stderr).

    .<\n-001ad380: 703e 4669 7273 742c 2077 6520 7772 6974 p>First, we writ\n-001ad390: 6520 6120 6865 6164 6572 2066 696c 6520 e a header file \n-001ad3a0: 3c65 6d3e 3c63 6f64 653e 706c 7567 696e plugin\n-001ad3b0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2074 .h t\n-001ad3c0: 6f20 6465 6669 6e65 2074 6865 206c 6f63 o define the loc\n-001ad3d0: 616c 2070 6c75 6769 6e20 6461 7461 2073 al plugin data s\n-001ad3e0: 7472 7563 7475 7265 2873 2920 616e 6420 tructure(s) and \n-001ad3f0: 7765 2064 6566 696e 6520 6120 676c 6f62 we define a glob\n-001ad400: 616c 206e 616d 6520 746f 2069 6465 6e74 al name to ident\n-001ad410: 6966 7920 7468 6520 706c 7567 696e 3a3c ify the plugin:<\n-001ad420: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    \n-001ad4c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #d\n-001ad4f0: 6566 696e 6520 504c 5547 494e 5f49 4420 efine PLUGIN_ID \n-001ad500: 2671 756f 743b 504c 5547 494e 2d31 2e30 "PLUGIN-1.0\n-001ad510: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " // some name\n-001ad540: 2074 6f20 6964 656e 7469 6679 2070 6c75 to identify plu\n-001ad550: 6769 6e20 3c2f 7370 616e 3e3c 2f64 6976 gin struct <\n+001abd20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001abd30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001abd40: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001abd50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001abd80: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+001abde0: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . \n+001abe00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct ns__S s;.
    soap_def\n+001abe50: 6175 6c74 5f6e 735f 5f53 283c 6120 636c ault_ns__S(soap, &\n+001abe90: 3b73 293b 3c2f 6469 763e 0a3c 6469 7620 ;s);
    .
    s\n+001abeb0: 2e6e 616d 6520 3d20 3c61 2063 6c61 7373 .name = soa\n+001abf10: 705f 7374 7264 7570 3c2f 613e 283c 6120 p_strdup(soap, "\n+001abf70: 6e61 6d65 2671 756f 743b 3c2f 7370 616e name");
    .
    s.\n+001abfa0: 616d 6f75 6e74 203d 2031 3234 3b3c 2f64 amount = 124;.
    int n;<\n+001abff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (s\n+001ac030: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n+001ac040: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n+001ac070: 6170 3c2f 613e 2c20 656e 6470 6f69 6e74 ap, endpoint\n+001ac080: 2c20 4e55 4c4c 2c20 3c73 7061 6e20 636c , NULL, "code&q\n+001ac0b0: 756f 743b 3c2f 7370 616e 3e2c 2026 616d uot;, &am\n+001ac0c0: 703b 732c 2026 616d 703b 6e29 293c 2f64 p;s, &n)).
    soa\n+001ac140: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(soap, stderr);.
    \n+001ac1c0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    printf(<\n+001ac1f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001ac200: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001ac210: 3b4f 4b20 6e20 3d20 2564 5c6e 2671 756f ;OK n = %d\\n&quo\n+001ac220: 743b 3c2f 7370 616e 3e2c 206e 293b 3c2f t;, n);.
    so\n+001ac2a0: 6170 5f64 6573 7472 6f79 3c2f 613e 283c ap_destroy(<\n+001ac2b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001ac2c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001ac2d0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001ac2e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001ac350: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap);.
    so\n+001ac400: 6170 5f66 7265 653c 2f61 3e28 3c61 2063 ap_free(soap);.
    }
    .

    We compi\n+001ac480: 6c65 2074 6869 7320 6578 616d 706c 6520 le this example \n+001ac490: 6173 2066 6f6c 6c6f 7773 3a20 3c2f 703e as follows:

    \n+001ac4a0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    c++ -o exa\n+001ac4c0: 6d70 6c65 2065 7861 6d70 6c65 2e63 7070  mple example.cpp\n+001ac4d0: 2074 6573 7443 2e63 7070 2073 6f61 7043   testC.cpp soapC\n+001ac4e0: 2e63 7070 2073 6f61 7043 6c69 656e 742e  .cpp soapClient.\n+001ac4f0: 6370 7020 7374 6473 6f61 7032 2e63 7070  cpp stdsoap2.cpp\n+001ac500: 0a3c 2f70 7265 3e3c 703e 204d 6f64 756c  .

    Modul\n+001ac510: 6573 206d 6179 2068 656c 7020 746f 2064 es may help to d\n+001ac520: 6566 696e 6520 6120 6d6f 6475 6c61 7220 efine a modular \n+001ac530: 6869 6572 6172 6368 7920 6f66 206c 6962 hierarchy of lib\n+001ac540: 7261 7269 6573 2077 6974 6820 7265 7573 raries with reus\n+001ac550: 6162 6c65 2073 6572 6961 6c69 7a61 626c able serializabl\n+001ac560: 6520 7479 7065 732e 3c2f 703e 0a3c 703e e types.

    .

    \n+001ac570: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+001ac590: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Plugi\n+001ac5d0: 6e73 2c20 6d6f 6475 6c65 732c 2061 6e64 ns, modules, and\n+001ac5e0: 2065 7874 656e 7369 6f6e 733c 2f68 323e extensions

    \n+001ac5f0: 0a3c 703e 506c 7567 696e 7320 6f66 6665 .

    Plugins offe\n+001ac600: 7220 6120 636f 6e76 656e 6965 6e74 2065 r a convenient e\n+001ac610: 7874 656e 7369 6f6e 206d 6563 6861 6e69 xtension mechani\n+001ac620: 736d 2066 6f72 2074 6865 2067 534f 4150 sm for the gSOAP\n+001ac630: 2074 6f6f 6c6b 6974 2062 7920 6578 7465 toolkit by exte\n+001ac640: 6e64 696e 6720 7468 6520 6361 7061 6269 nding the capabi\n+001ac650: 6c69 7469 6573 206f 6620 6974 7320 656e lities of its en\n+001ac660: 6769 6e65 2e20 5768 656e 2074 6865 2070 gine. When the p\n+001ac670: 6c75 6769 6e20 7265 6769 7374 6572 7320 lugin registers \n+001ac680: 7769 7468 2074 6865 2067 534f 4150 2065 with the gSOAP e\n+001ac690: 6e67 696e 652c 2069 7420 6861 7320 6675 ngine, it has fu\n+001ac6a0: 6c6c 2061 6363 6573 7320 746f 2074 6865 ll access to the\n+001ac6b0: 2072 756e 2d74 696d 6520 7365 7474 696e run-time settin\n+001ac6c0: 6773 2061 6e64 2074 6865 2065 6e67 696e gs and the engin\n+001ac6d0: 6527 7320 6675 6e63 7469 6f6e 2063 616c e's function cal\n+001ac6e0: 6c62 6163 6b73 2e20 5570 6f6e 2072 6567 lbacks. Upon reg\n+001ac6f0: 6973 7472 792c 2074 6865 2070 6c75 6769 istry, the plugi\n+001ac700: 6e27 7320 6c6f 6361 6c20 6461 7461 2069 n's local data i\n+001ac710: 7320 6173 736f 6369 6174 6564 2077 6974 s associated wit\n+001ac720: 6820 7468 6520 3c63 6f64 653e 3c61 2063 h the soap\n+001ac780: 3c2f 636f 6465 3e20 636f 6e74 6578 742e context.\n+001ac790: 2042 7920 6f76 6572 7269 6469 6e67 2074 By overriding t\n+001ac7a0: 6865 2063 616c 6c62 6163 6b73 2077 6974 he callbacks wit\n+001ac7b0: 6820 7468 6520 706c 7567 696e 2773 2063 h the plugin's c\n+001ac7c0: 616c 6c62 6163 6b73 2c20 7468 6520 706c allbacks, the pl\n+001ac7d0: 7567 696e 2065 7874 656e 6473 206f 7220 ugin extends or \n+001ac7e0: 6d6f 6469 6669 6573 2074 6865 2065 6e67 modifies the eng\n+001ac7f0: 696e 6527 7320 6361 7061 6269 6c69 7469 ine's capabiliti\n+001ac800: 6573 2e20 5468 6520 6c6f 6361 6c20 706c es. The local pl\n+001ac810: 7567 696e 2064 6174 6120 6361 6e20 6265 ugin data can be\n+001ac820: 2061 6363 6573 7365 6420 7468 726f 7567 accessed throug\n+001ac830: 6820 6120 6c6f 6f6b 7570 2066 756e 6374 h a lookup funct\n+001ac840: 696f 6e2c 2075 7375 616c 6c79 2069 6e76 ion, usually inv\n+001ac850: 6f6b 6564 2077 6974 6869 6e20 6120 6361 oked within a ca\n+001ac860: 6c6c 6261 636b 2066 756e 6374 696f 6e20 llback function \n+001ac870: 746f 2061 6363 6573 7320 7468 6520 706c to access the pl\n+001ac880: 7567 696e 2064 6174 612e 2054 6865 2072 ugin data. The r\n+001ac890: 6567 6973 7472 7920 616e 6420 6c6f 6f6b egistry and look\n+001ac8a0: 7570 2066 756e 6374 696f 6e73 2061 7265 up functions are\n+001ac8b0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int soap_regi\n+001ac960: 7374 6572 5f70 6c75 6769 6e5f 6172 673c ster_plugin_arg<\n+001ac970: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(struct\n+001ac990: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001ac9c0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001ac9f0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, int (\n+001aca20: 2a66 6372 6561 7465 2928 3c73 7061 6e20 *fcreate)(\n+001aca40: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+001aca80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001aca90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001acaa0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001acab0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap_plugin \n+001acae0: 2a70 2c20 3c73 7061 6e20 636c 6173 733d *p, vo\n+001acb00: 6964 3c2f 7370 616e 3e20 2a61 7267 292c id *arg),\n+001acb10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+001acb30: 2f73 7061 6e3e 202a 6172 6729 3c2f 6469 /span> *arg).
    soap_register_\n+001acc00: 706c 7567 696e 5f61 7267 3c2f 613e 3c2f plugin_arg
    int soap\n+001acc30: 5f72 6567 6973 7465 725f 706c 7567 696e _register_plugin\n+001acc40: 5f61 7267 2873 7472 7563 7420 736f 6170 _arg(struct soap\n+001acc50: 202a 736f 6170 2c20 696e 7428 2a66 6372 *soap, int(*fcr\n+001acc60: 6561 7465 2928 7374 7275 6374 2073 6f61 eate)(struct soa\n+001acc70: 7020 2a2c 2073 7472 7563 7420 736f 6170 p *, struct soap\n+001acc80: 5f70 6c75 6769 6e20 2a2c 2076 6f69 6420 _plugin *, void \n+001acc90: 2a29 2c20 766f 6964 202a 6172 6729 3c2f *), void *arg)
    Register \n+001accc0: 6120 706c 7567 696e 2077 6974 6820 616e a plugin with an\n+001accd0: 2061 7267 756d 656e 742e 3c2f 6469 763e argument.
    \n+001acce0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    <\n+001acd00: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001acd10: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    void* so\n+001acd50: 6170 5f6c 6f6f 6b75 705f 706c 7567 696e ap_lookup_plugin\n+001acd60: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001acdb0: 3c2f 613e 2a2c 203c 7370 616e 2063 6c61 *, con\n+001acdd0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char*\n+001ace00: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    <\n+001ace10: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001ace20: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The soap_cop\n+001acee0: 793c 2f61 3e3c 2f63 6f64 653e 2066 756e y fun\n+001acef0: 6374 696f 6e20 7265 7475 726e 7320 6120 ction returns a \n+001acf00: 6e65 7720 6479 6e61 6d69 6361 6c6c 7920 new dynamically \n+001acf10: 616c 6c6f 6361 7465 6420 3c63 6f64 653e allocated \n+001acf20: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+001acf70: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+001acf80: 6578 7420 7468 6174 2069 7320 6120 636f ext that is a co\n+001acf90: 7079 206f 6620 616e 6f74 6865 722c 2073 py of another, s\n+001acfa0: 7563 6820 7468 6174 206e 6f20 6461 7461 uch that no data\n+001acfb0: 2069 7320 7368 6172 6564 2062 6574 7765 is shared betwe\n+001acfc0: 656e 2074 6865 2063 6f70 7920 616e 6420 en the copy and \n+001acfd0: 7468 6520 6f72 6967 696e 616c 2063 6f6e the original con\n+001acfe0: 7465 7874 2e20 5468 6520 3c63 6f64 653e text. The \n+001acff0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_\n+001ad0a0: 636f 7079 3c2f 613e 3c2f 636f 6465 3e20 copy \n+001ad0b0: 6675 6e63 7469 6f6e 2069 6e76 6f6b 6573 function invokes\n+001ad0c0: 2074 6865 2063 6f70 7920 6675 6e63 7469 the copy functi\n+001ad0d0: 6f6e 7320 6f66 2074 6865 2072 6567 6973 ons of the regis\n+001ad0e0: 7465 7265 6420 706c 7567 696e 7320 746f tered plugins to\n+001ad0f0: 2063 6f70 7920 7468 6520 706c 7567 696e copy the plugin\n+001ad100: 7327 206c 6f63 616c 2064 6174 612e 2054 s' local data. T\n+001ad110: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soa\n+001ad1e0: 705f 646f 6e65 3c2f 613e 3c2f 636f 6465 p_done and soap\n+001ad2a0: 5f66 7265 653c 2f61 3e3c 2f63 6f64 653e _free\n+001ad2b0: 2066 756e 6374 696f 6e73 2064 652d 7265 functions de-re\n+001ad2c0: 6769 7374 6572 7320 616c 6c20 706c 7567 gisters all plug\n+001ad2d0: 696e 2e3c 2f70 3e0a 3c70 3e54 6865 2066 in.

    .

    The f\n+001ad2e0: 6f6c 6c6f 7720 6578 616d 706c 6520 6f76 ollow example ov\n+001ad2f0: 6572 7269 6465 7320 7468 6520 7365 6e64 errides the send\n+001ad300: 2061 6e64 2072 6563 6569 7665 2063 616c and receive cal\n+001ad310: 6c62 6163 6b73 2074 6f20 636f 7079 2061 lbacks to copy a\n+001ad320: 6c6c 206d 6573 7361 6765 7320 7468 6174 ll messages that\n+001ad330: 2061 7265 2073 656e 7420 616e 6420 7265 are sent and re\n+001ad340: 6365 6976 6564 2074 6f20 7468 6520 7465 ceived to the te\n+001ad350: 726d 696e 616c 2028 7374 6465 7272 292e rminal (stderr).\n+001ad360: 3c2f 703e 0a3c 703e 4669 7273 742c 2077

    .

    First, w\n+001ad370: 6520 7772 6974 6520 6120 6865 6164 6572 e write a header\n+001ad380: 2066 696c 6520 3c65 6d3e 3c63 6f64 653e file \n+001ad390: 706c 7567 696e 2e68 3c2f 636f 6465 3e3c plugin.h<\n+001ad3a0: 2f65 6d3e 2074 6f20 6465 6669 6e65 2074 /em> to define t\n+001ad3b0: 6865 206c 6f63 616c 2070 6c75 6769 6e20 he local plugin \n+001ad3c0: 6461 7461 2073 7472 7563 7475 7265 2873 data structure(s\n+001ad3d0: 2920 616e 6420 7765 2064 6566 696e 6520 ) and we define \n+001ad3e0: 6120 676c 6f62 616c 206e 616d 6520 746f a global name to\n+001ad3f0: 2069 6465 6e74 6966 7920 7468 6520 706c identify the pl\n+001ad400: 7567 696e 3a3c 2f70 3e0a 3c64 6976 2063 ugin:

    .
    \n+001ad420: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+001ad450: 636c 7564 6520 2671 756f 743b 3c61 2063 clude "stdsoap2.h" \n+001ad4a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #define PLUG\n+001ad4e0: 494e 5f49 4420 2671 756f 743b 504c 5547 IN_ID "PLUG\n+001ad4f0: 494e 2d31 2e30 2671 756f 743b 3c2f 7370 IN-1.0" // som\n+001ad520: 6520 6e61 6d65 2074 6f20 6964 656e 7469 e name to identi\n+001ad530: 6679 2070 6c75 6769 6e20 3c2f 7370 616e fy plugin
    .
    .
    .struct plugin_data // local plu\n-001ad5e0: 6769 6e20 6461 7461 203c 2f73 7061 6e3e gin data \n+001ad570: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne\">struct\n+001ad590: 203c 2f73 7061 6e3e 706c 7567 696e 5f64 plugin_d\n+001ad5a0: 6174 6120 3c73 7061 6e20 636c 6173 733d ata // loc\n+001ad5c0: 616c 2070 6c75 6769 6e20 6461 7461 203c al plugin data <\n+001ad5d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .{\n 001ad5f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001ad610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int (*fsend\n-001ad630: 2928 3c73 7061 6e20 636c 6173 733d 226b )(struct <\n-001ad650: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-001ad680: 703c 2f61 3e2a 2c20 3c73 7061 6e20 636c p*, co\n-001ad6a0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001ad6d0: 2a2c 2073 697a 655f 7429 3b20 3c73 7061 *, size_t); // to save and\n-001ad700: 2075 7365 2073 656e 6420 6361 6c6c 6261 use send callba\n-001ad710: 636b 203c 2f73 7061 6e3e 3c2f 6469 763e ck
    \n-001ad720: 0a3c 6469 7620 636c 6173 733d 226c 696e ..};\n-001ad880: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int p\n-001ad8c0: 6c75 6769 6e28 3c73 7061 6e20 636c 6173 lugin(stru\n-001ad8e0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, struct \n-001ad970: 736f 6170 5f70 6c75 6769 6e20 2a70 6c75 soap_plugin *plu\n-001ad980: 6769 6e2c 203c 7370 616e 2063 6c61 7373 gin, v\n-001ad9a0: 6f69 643c 2f73 7061 6e3e 202a 6172 6729 oid *arg)\n-001ad9b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n-001ad9e0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    s\n-001ada10: 7464 736f 6170 322e 683c 2f61 3e3c 2f64 tdsoap2.h
    This file \n-001ada40: 6465 6669 6e65 7320 7468 6520 636f 6d6d defines the comm\n-001ada50: 6f6e 206d 6163 726f 732c 2074 7970 6573 on macros, types\n-001ada60: 2061 6e64 2066 756e 6374 696f 6e73 206f and functions o\n-001ada70: 6620 7468 6520 6753 4f41 5020 4150 4920 f the gSOAP API \n-001ada80: 6772 6f75 7065 6420 6279 206d 6f64 756c grouped by modul\n-001ada90: 6573 3c2f 6469 763e 3c2f 6469 763e 0a3c es
    .<\n-001adaa0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Then, w\n-001adac0: 6520 7772 6974 6520 7468 6520 706c 7567 e write the plug\n-001adad0: 696e 2072 6567 6973 7472 7920 6675 6e63 in registry func\n-001adae0: 7469 6f6e 2061 6e64 2074 6865 2063 616c tion and the cal\n-001adaf0: 6c62 6163 6b73 3a3c 2f70 3e0a 3c64 6976 lbacks:

    .
    #\n-001adb40: 696e 636c 7564 6520 2671 756f 743b 706c include "pl\n-001adb50: 7567 696e 2e68 2671 756f 743b 3c2f 7370 ugin.h"
    .
    .
    sta\n-001adbb0: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic const char plugin_id[] \n-001adc10: 3d20 504c 5547 494e 5f49 443b 203c 7370 = PLUGIN_ID; // the plugin\n-001adc40: 2069 6420 3c2f 7370 616e 3e3c 2f64 6976 id .
    static\n-001adc80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int plu\n-001adcb0: 6769 6e5f 696e 6974 283c 7370 616e 2063 gin_init(s\n-001adcd0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001add40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001add50: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct plugin_data *\n-001add70: 6461 7461 293b 203c 2f64 6976 3e0a 3c64 data);
    .\n-001add90: 3c73 7061 6e20 636c 6173 733d 226b 6579 static in\n-001addd0: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_\n-001adde0: 636f 7079 283c 7370 616e 2063 6c61 7373 copy(struc\n-001ade00: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001ade30: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, struct s\n-001ade90: 6f61 705f 706c 7567 696e 202a 6473 742c oap_plugin *dst,\n-001adea0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap_plugin\n-001aded0: 202a 7372 6329 3b20 3c2f 6469 763e 0a3c *src);
    .<\n-001adee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001adef0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static v\n-001adf30: 6f69 643c 2f73 7061 6e3e 2070 6c75 6769 oid plugi\n-001adf40: 6e5f 6465 6c65 7465 283c 7370 616e 2063 n_delete(s\n-001adf60: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001adfd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001adfe0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap_plugin *\n-001ae000: 7029 3b20 3c2f 6469 763e 0a3c 6469 7620 p);
    .
    static\n-001ae040: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int plugin_sen\n-001ae070: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa\n-001ae0c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001ae0f0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, co\n-001ae110: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001ae140: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *buf, si\n-001ae1b0: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e29 ze_t len)\n-001ae1c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    static <\n-001ae200: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ae210: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n-001ae220: 2f73 7061 6e3e 2070 6c75 6769 6e5f 7265 /span> plugin_re\n-001ae230: 6376 283c 7370 616e 2063 6c61 7373 3d22 cv(struct<\n-001ae250: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-001ae280: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-001ae2b0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, char *\n-001ae2e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf\n-001ae330: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size\n-001ae350: 5f74 3c2f 7370 616e 3e20 6c65 6e29 3b20 _t len); \n+001ad600: 733d 226c 696e 6522 3e20 2069 6e74 2028 s=\"line\"> int (\n+001ad610: 2a66 7365 6e64 2928 3c73 7061 6e20 636c *fsend)(st\n+001ad630: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap*, const\n+001ad690: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001ad6b0: 2f73 7061 6e3e 2a2c 2073 697a 655f 7429 /span>*, size_t)\n+001ad6c0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // to sa\n+001ad6e0: 7665 2061 6e64 2075 7365 2073 656e 6420 ve and use send \n+001ad6f0: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback \n+001ad700: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_\n+001ad720: 7420 282a 3c61 2063 6c61 7373 3d22 636f t (*frecv\n+001ad780: 3c2f 613e 2928 3c73 7061 6e20 636c 6173 )(stru\n+001ad7a0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap*, char*, size_t); // to save an\n+001ad830: 6420 7573 6520 7265 6376 2063 616c 6c62 d use recv callb\n+001ad840: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack .
    };
    .\n+001ad880: 3c73 7061 6e20 636c 6173 733d 226b 6579 int plugin(struct \n+001ad8d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001ad900: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001ad930: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi\n+001ad960: 6e20 2a70 6c75 6769 6e2c 203c 7370 616e n *plugin, void\n+001ad990: 202a 6172 6729 3b3c 2f64 6976 3e0a 3c64 *arg);
    ..

    T\n+001adaa0: 6865 6e2c 2077 6520 7772 6974 6520 7468 hen, we write th\n+001adab0: 6520 706c 7567 696e 2072 6567 6973 7472 e plugin registr\n+001adac0: 7920 6675 6e63 7469 6f6e 2061 6e64 2074 y function and t\n+001adad0: 6865 2063 616c 6c62 6163 6b73 3a3c 2f70 he callbacks:.

    \n+001adb50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    static\n+001adba0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n+001adbe0: 6172 3c2f 7370 616e 3e20 706c 7567 696e ar plugin\n+001adbf0: 5f69 645b 5d20 3d20 504c 5547 494e 5f49 _id[] = PLUGIN_I\n+001adc00: 443b 203c 7370 616e 2063 6c61 7373 3d22 D; // the \n+001adc20: 706c 7567 696e 2069 6420 3c2f 7370 616e plugin id
    .
    \n+001adc60: 7374 6174 6963 3c2f 7370 616e 3e20 3c73 static int plugin_init(<\n+001adca0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001adcb0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001add20: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, struc\n+001add40: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_\n+001add50: 6461 7461 202a 6461 7461 293b 203c 2f64 data *data); .
    stat\n+001add90: 6963 3c2f 7370 616e 3e20 3c73 7061 6e20 ic int p\n+001addc0: 6c75 6769 6e5f 636f 7079 283c 7370 616e lugin_copy(struct <\n+001addf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001ade00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001ade10: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001ade20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001ade50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap_plugin\n+001ade80: 202a 6473 742c 203c 7370 616e 2063 6c61 *dst, str\n+001adea0: 7563 743c 2f73 7061 6e3e 2073 6f61 705f uct soap_\n+001adeb0: 706c 7567 696e 202a 7372 6329 3b20 3c2f plugin *src); .
    sta\n+001adef0: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic void\n+001adf20: 2070 6c75 6769 6e5f 6465 6c65 7465 283c plugin_delete(<\n+001adf30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001adf40: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001adfb0: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, struc\n+001adfd0: 743c 2f73 7061 6e3e 2073 6f61 705f 706c t soap_pl\n+001adfe0: 7567 696e 202a 7029 3b20 3c2f 6469 763e ugin *p);
    \n+001adff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    static<\n+001ae020: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int plug\n+001ae050: 696e 5f73 656e 6428 3c73 7061 6e20 636c in_send(st\n+001ae070: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n+001ae100: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001ae120: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *buf, size_t len);
    .<\n+001ae1b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ae1c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static s\n+001ae200: 697a 655f 743c 2f73 7061 6e3e 2070 6c75 ize_t plu\n+001ae210: 6769 6e5f 7265 6376 283c 7370 616e 2063 gin_recv(s\n+001ae230: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001ae2a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ae2b0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *b\n+001ae310: 7566 3c2f 613e 2c20 3c73 7061 6e20 636c uf, size_t \n+001ae340: 6c65 6e29 3b20 3c2f 6469 763e 0a3c 6469 len);
    . \n 001ae360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001ae380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // the \n-001ae3b0: 7265 6769 7374 7279 2066 756e 6374 696f registry functio\n-001ae3c0: 6e3a 203c 2f73 7061 6e3e 3c2f 6469 763e n:
    \n-001ae3d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001ae400: 3c2f 7370 616e 3e20 706c 7567 696e 283c plugin(<\n-001ae410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ae420: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-001ae490: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, struc\n-001ae4b0: 743c 2f73 7061 6e3e 2073 6f61 705f 706c t soap_pl\n-001ae4c0: 7567 696e 202a 702c 203c 7370 616e 2063 ugin *p, void *\n-001ae4f0: 6172 6729 203c 2f64 6976 3e0a 3c64 6976 arg)
    .{<\n-001ae510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    p->\n-001ae530: 6964 203d 2070 6c75 6769 6e5f 6964 3b20 id = plugin_id; \n-001ae540: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    p->\n-001ae560: 3b64 6174 6120 3d20 283c 7370 616e 2063 ;data = (void*)\n-001ae590: 6d61 6c6c 6f63 283c 7370 616e 2063 6c61 malloc(siz\n-001ae5b0: 656f 663c 2f73 7061 6e3e 283c 7370 616e eof(struct p\n-001ae5e0: 6c75 6769 6e5f 6461 7461 2929 3b20 3c2f lugin_data)); .
    p->f\n-001ae610: 636f 7079 203d 2070 6c75 6769 6e5f 636f copy = plugin_co\n-001ae620: 7079 3b20 3c73 7061 6e20 636c 6173 733d py; /* opt\n-001ae640: 696f 6e61 6c3a 2077 6865 6e20 7365 7420 ional: when set \n-001ae650: 7468 6520 706c 7567 696e 206d 7573 7420 the plugin must \n-001ae660: 636f 7079 2069 7473 206c 6f63 616c 2064 copy its local d\n-001ae670: 6174 6120 2a2f 3c2f 7370 616e 3e3c 2f64 ata */.
    p->fd\n-001ae6a0: 656c 6574 6520 3d20 706c 7567 696e 5f64 elete = plugin_d\n-001ae6b0: 656c 6574 653b 203c 2f64 6976 3e0a 3c64 elete;
    .\n-001ae6d0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (p->dat\n-001ae700: 6129 203c 2f64 6976 3e0a 3c64 6976 2063 a)
    .
    {<\n-001ae720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if \n-001ae760: 2870 6c75 6769 6e5f 696e 6974 283c 6120 (plugin_init(soap, (<\n-001ae7a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ae7b0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct plugin_data*)\n-001ae7d0: 702d 2667 743b 6461 7461 2929 203c 2f64 p->data)) .
    {.
    free(p\n-001ae820: 2d26 6774 3b64 6174 6129 3b20 3c73 7061 ->data); // error: coul\n-001ae850: 6420 6e6f 7420 696e 6974 203c 2f73 7061 d not init
    .
    \n-001ae880: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001ae8a0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001ae900: 505f 454f 4d3c 2f61 3e3b 203c 7370 616e P_EOM; // return error\n-001ae930: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001ae940: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ae950: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    .\n-001ae970: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    ..\n-001aea30: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    stati\n-001aea80: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c int pl\n-001aeab0: 7567 696e 5f69 6e69 7428 3c73 7061 6e20 ugin_init(\n-001aead0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001aeb10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001aeb20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001aeb30: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001aeb40: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data \n-001aeb70: 2a64 6174 6129 203c 2f64 6976 3e0a 3c64 *data)
    ./\n+001ae390: 2f20 7468 6520 7265 6769 7374 7279 2066 / the registry f\n+001ae3a0: 756e 6374 696f 6e3a 203c 2f73 7061 6e3e unction: \n+001ae3b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int pl\n+001ae3f0: 7567 696e 283c 7370 616e 2063 6c61 7373 ugin(struc\n+001ae410: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+001ae440: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, struct s\n+001ae4a0: 6f61 705f 706c 7567 696e 202a 702c 203c oap_plugin *p, <\n+001ae4b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ae4c0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *arg) .
    {
    . \n+001ae510: 702d 2667 743b 6964 203d 2070 6c75 6769 p->id = plugi\n+001ae520: 6e5f 6964 3b20 3c2f 6469 763e 0a3c 6469 n_id;
    . \n+001ae540: 2070 2d26 6774 3b64 6174 6120 3d20 283c p->data = (<\n+001ae550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ae560: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void*)malloc(sizeof\n+001ae5a0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct plugin_data\n+001ae5d0: 2929 3b20 3c2f 6469 763e 0a3c 6469 7620 ));
    .
    p\n+001ae5f0: 2d26 6774 3b66 636f 7079 203d 2070 6c75 ->fcopy = plu\n+001ae600: 6769 6e5f 636f 7079 3b20 3c73 7061 6e20 gin_copy; \n+001ae620: 2f2a 206f 7074 696f 6e61 6c3a 2077 6865 /* optional: whe\n+001ae630: 6e20 7365 7420 7468 6520 706c 7567 696e n set the plugin\n+001ae640: 206d 7573 7420 636f 7079 2069 7473 206c must copy its l\n+001ae650: 6f63 616c 2064 6174 6120 2a2f 3c2f 7370 ocal data */
    .
    p-\n+001ae680: 2667 743b 6664 656c 6574 6520 3d20 706c >fdelete = pl\n+001ae690: 7567 696e 5f64 656c 6574 653b 203c 2f64 ugin_delete; .
    if (p-&\n+001ae6e0: 6774 3b64 6174 6129 203c 2f64 6976 3e0a gt;data)
    .\n+001ae6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+001ae720: 2020 3c73 7061 6e20 636c 6173 733d 226b if (plugin_in\n+001ae750: 6974 283c 6120 636c 6173 733d 2263 6f64 it(soap, (struc\n+001ae7a0: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_\n+001ae7b0: 6461 7461 2a29 702d 2667 743b 6461 7461 data*)p->data\n+001ae7c0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n+001ae7e0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n+001ae800: 6672 6565 2870 2d26 6774 3b64 6174 6129 free(p->data)\n+001ae810: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // error\n+001ae830: 3a20 636f 756c 6420 6e6f 7420 696e 6974 : could not init\n+001ae840: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001ae850: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ae860: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return <\n+001ae890: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001ae8a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001ae8b0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+001ae8c0: 6139 6664 3633 3730 3736 6166 6364 3333 a9fd637076afcd33\n+001ae8d0: 3034 3031 6632 6364 3061 3731 6665 3732 0401f2cd0a71fe72\n+001ae8e0: 3922 3e53 4f41 505f 454f 4d3c 2f61 3e3b 9\">SOAP_EOM
    ;\n+001ae8f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // return\n+001ae910: 2065 7272 6f72 203c 2f73 7061 6e3e 3c2f error .
    } .
    }
    .\n+001ae960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+001ae990: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+001ae9f0: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .<\n+001aea20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001aea30: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    static <\n+001aea70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001aea80: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int plugin_init(\n+001aeaa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001aeaf0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001aeb20: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , stru\n+001aeb40: 6374 3c2f 7370 616e 3e20 706c 7567 696e ct plugin\n+001aeb50: 5f64 6174 6120 2a64 6174 6129 203c 2f64 _data *data) .
    {
    .\n-001aeb90: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    data\n-001aebb0: 2d26 6774 3b66 7365 6e64 203d 203c 6120 ->fsend = soap->\n-001aebf0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;fsend; // save\n-001aec70: 206f 6c64 2072 6563 7620 6361 6c6c 6261 old recv callba\n-001aec80: 636b 203c 2f73 7061 6e3e 3c2f 6469 763e ck
    \n-001aec90: 0a3c 6469 7620 636c 6173 733d 226c 696e ...
    soap->\n-001aeed0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 frecv\n-001aef30: 203d 2070 6c75 6769 6e5f 7265 6376 3b20 = plugin_recv; \n-001aef40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // replace\n-001aef60: 2072 6563 7620 6361 6c6c 6261 636b 2077 recv callback w\n-001aef70: 6974 6820 6e65 7720 3c2f 7370 616e 3e3c ith new <\n-001aef80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    } soap->fs\n+001aec30: 656e 643c 2f61 3e3b 203c 7370 616e 2063 end; /\n+001aec50: 2f20 7361 7665 206f 6c64 2072 6563 7620 / save old recv \n+001aec60: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback \n+001aec70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    data-\n+001aec90: 2667 743b 6672 6563 7620 3d20 3c61 2063 >frecv = soap->\n+001aecd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 frecv\n+001aed30: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // save \n+001aed50: 6f6c 6420 7365 6e64 2063 616c 6c62 6163 old send callbac\n+001aed60: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    .\n+001aed70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n+001aedb0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->f\n+001aee10: 7365 6e64 3c2f 613e 203d 2070 6c75 6769 send = plugi\n+001aee20: 6e5f 7365 6e64 3b20 3c73 7061 6e20 636c n_send; //\n+001aee40: 2072 6570 6c61 6365 2073 656e 6420 6361 replace send ca\n+001aee50: 6c6c 6261 636b 2077 6974 6820 6e65 7720 llback with new \n+001aee60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001aee80: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->fre\n+001aef10: 6376 3c2f 613e 203d 2070 6c75 6769 6e5f cv = plugin_\n+001aef20: 7265 6376 3b20 3c73 7061 6e20 636c 6173 recv; // r\n+001aef40: 6570 6c61 6365 2072 6563 7620 6361 6c6c eplace recv call\n+001aef50: 6261 636b 2077 6974 6820 6e65 7720 3c2f back with new
    . \n+001aef80: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001aefa0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n+001af000: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    .\n+001af010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .<\n-001af060: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001af070: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// copy p\n-001af090: 6c75 6769 6e20 6461 7461 2c20 6361 6c6c lugin data, call\n-001af0a0: 6564 2062 7920 736f 6170 5f63 6f70 7928 ed by soap_copy(\n-001af0b0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .<\n-001af0c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001af0d0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// This i\n-001af0f0: 7320 696d 706f 7274 616e 743a 2077 6520 s important: we \n-001af100: 6e65 6564 2061 2064 6565 7020 636f 7079 need a deep copy\n-001af110: 2074 6f20 6176 6f69 6420 6461 7461 2073 to avoid data s\n-001af120: 6861 7269 6e67 2062 7920 7477 6f20 636f haring by two co\n-001af130: 6e74 6578 7473 203c 2f73 7061 6e3e 3c2f ntexts .
    sta\n-001af170: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic int \n-001af1a0: 706c 7567 696e 5f63 6f70 7928 3c73 7061 plugin_copy(struct \n-001af1d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001af200: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001af230: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi\n-001af260: 6e20 2a64 7374 2c20 3c73 7061 6e20 636c n *dst, st\n-001af280: 7275 6374 3c2f 7370 616e 3e20 736f 6170 ruct soap\n-001af290: 5f70 6c75 6769 6e20 2a73 7263 2920 3c2f _plugin *src) // \n+001af070: 636f 7079 2070 6c75 6769 6e20 6461 7461 copy plugin data\n+001af080: 2c20 6361 6c6c 6564 2062 7920 736f 6170 , called by soap\n+001af090: 5f63 6f70 7928 293c 2f73 7061 6e3e 3c2f _copy().
    // \n+001af0d0: 5468 6973 2069 7320 696d 706f 7274 616e This is importan\n+001af0e0: 743a 2077 6520 6e65 6564 2061 2064 6565 t: we need a dee\n+001af0f0: 7020 636f 7079 2074 6f20 6176 6f69 6420 p copy to avoid \n+001af100: 6461 7461 2073 6861 7269 6e67 2062 7920 data sharing by \n+001af110: 7477 6f20 636f 6e74 6578 7473 203c 2f73 two contexts
    .
    static\n+001af160: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int plugin_cop\n+001af190: 7928 3c73 7061 6e20 636c 6173 733d 226b y(struct soa\n+001af1e0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001af210: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, st\n+001af230: 7275 6374 3c2f 7370 616e 3e20 736f 6170 ruct soap\n+001af240: 5f70 6c75 6769 6e20 2a64 7374 2c20 3c73 _plugin *dst, struct soap_plugin *s\n+001af280: 7263 2920 3c2f 6469 763e 0a3c 6469 7620 rc)
    .
    {.
    {
    .<\n-001af2c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001af2d0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-001af2f0: 2f73 7061 6e3e 2028 2128 6473 742d 2667 /span> (!(dst-&g\n-001af300: 743b 6461 7461 203d 2028 3c73 7061 6e20 t;data = (\n-001af320: 7374 7275 6374 3c2f 7370 616e 3e20 706c struct pl\n-001af330: 7567 696e 5f64 6174 612a 296d 616c 6c6f ugin_data*)mallo\n-001af340: 6328 3c73 7061 6e20 636c 6173 733d 226b c(sizeof(stru\n-001af380: 6374 3c2f 7370 616e 3e20 706c 7567 696e ct plugin\n-001af390: 5f64 6174 6129 2929 2920 3c2f 6469 763e _data))))
    \n-001af3a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return <\n-001af3e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001af3f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001af400: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-001af410: 6139 6664 3633 3730 3736 6166 6364 3333 a9fd637076afcd33\n-001af420: 3034 3031 6632 6364 3061 3731 6665 3732 0401f2cd0a71fe72\n-001af430: 3922 3e53 4f41 505f 454f 4d3c 2f61 3e3b 9\">SOAP_EOM;\n-001af440: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    *dst\n-001af460: 2d26 6774 3b64 6174 6120 3d20 2a73 7263 ->data = *src\n-001af470: 2d26 6774 3b64 6174 613b 203c 2f64 6976 ->data; .
    \n-001af4b0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; <\n-001af520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+001af2b0: 226c 696e 6522 3e20 203c 7370 616e 2063 \"line\"> if (!(\n+001af2e0: 6473 742d 2667 743b 6461 7461 203d 2028 dst->data = (\n+001af2f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data*\n+001af320: 296d 616c 6c6f 6328 3c73 7061 6e20 636c )malloc(si\n+001af340: 7a65 6f66 3c2f 7370 616e 3e28 3c73 7061 zeof(struct \n+001af370: 706c 7567 696e 5f64 6174 6129 2929 2920 plugin_data)))) \n+001af380: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n+001af440: 2020 2a64 7374 2d26 6774 3b64 6174 6120 *dst->data \n+001af450: 3d20 2a73 7263 2d26 6774 3b64 6174 613b = *src->data;\n+001af460: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..} \n+001af520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n 001af540: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    // plugin del\n-001af590: 6574 696f 6e2c 2063 616c 6c65 6420 6279 etion, called by\n-001af5a0: 2073 6f61 705f 646f 6e65 2829 203c 2f73 soap_done()
    .
    static\n-001af5f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n-001af610: 2f73 7061 6e3e 2070 6c75 6769 6e5f 6465 /span> plugin_de\n-001af620: 6c65 7465 283c 7370 616e 2063 6c61 7373 lete(struc\n-001af640: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001af670: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, struct s\n-001af6d0: 6f61 705f 706c 7567 696e 202a 7029 203c oap_plugin *p) <\n+001af550: 6522 3e3c 7370 616e 2063 6c61 7373 3d22 e\">// plug\n+001af570: 696e 2064 656c 6574 696f 6e2c 2063 616c in deletion, cal\n+001af580: 6c65 6420 6279 2073 6f61 705f 646f 6e65 led by soap_done\n+001af590: 2829 203c 2f73 7061 6e3e 3c2f 6469 763e ()
    \n+001af5a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    static<\n+001af5d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> void plu\n+001af600: 6769 6e5f 6465 6c65 7465 283c 7370 616e gin_delete(struct <\n+001af630: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001af640: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001af650: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001af660: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001af690: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap_plugin\n+001af6c0: 202a 7029 203c 2f64 6976 3e0a 3c64 6976 *p)
    .{<\n 001af6e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001af700: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    free(p->d\n-001af720: 6174 6129 3b20 3c73 7061 6e20 636c 6173 ata); // f\n-001af740: 7265 6520 616c 6c6f 6361 7465 6420 706c ree allocated pl\n-001af750: 7567 696e 2064 6174 6120 3c2f 7370 616e ugin data
    .
    } free(p\n+001af700: 2d26 6774 3b64 6174 6129 3b20 3c73 7061 ->data); // free alloca\n+001af730: 7465 6420 706c 7567 696e 2064 6174 6120 ted plugin data \n+001af740: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001af760: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    .<\n-001af7b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001af7c0: 656e 7422 3e2f 2f20 7468 6520 6e65 7720 ent\">// the new \n-001af7d0: 7365 6e64 2063 616c 6c62 6163 6b20 3c2f send callback
    .static int<\n-001af840: 2f73 7061 6e3e 2070 6c75 6769 6e5f 7365 /span> plugin_se\n-001af850: 6e64 283c 7370 616e 2063 6c61 7373 3d22 nd(struct<\n-001af870: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-001af8a0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-001af8d0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n-001af8f0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *buf<\n-001af970: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, s\n-001af990: 697a 655f 743c 2f73 7061 6e3e 206c 656e ize_t len\n-001af9a0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str\n-001af9f0: 7563 7420 3c2f 7370 616e 3e70 6c75 6769 uct plugi\n-001afa00: 6e5f 6461 7461 202a 6461 7461 203d 2028 n_data *data = (\n-001afa10: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data*\n-001afa40: 2973 6f61 705f 6c6f 6f6b 7570 5f70 6c75 )soap_lookup_plu\n-001afa50: 6769 6e28 3c61 2063 6c61 7373 3d22 636f gin(soap<\n-001afa80: 2f61 3e2c 2070 6c75 6769 6e5f 6964 293b /a>, plugin_id);\n-001afa90: 203c 7370 616e 2063 6c61 7373 3d22 636f // fetch \n-001afab0: 706c 7567 696e 2623 3339 3b73 206c 6f63 plugin's loc\n-001afac0: 616c 2064 6174 6120 3c2f 7370 616e 3e3c al data <\n-001afad0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fwrite\n-001afaf0: 2862 7566 2c20 6c65 6e2c 2031 2c20 7374 (buf, len, 1, st\n-001afb00: 6465 7272 293b 203c 7370 616e 2063 6c61 derr); // \n-001afb20: 7772 6974 6520 6d65 7373 6167 6520 746f write message to\n-001afb30: 2073 7464 6572 7220 3c2f 7370 616e 3e3c stderr <\n-001afb40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return data->fsend\n-001afb90: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001afbc0: 2c20 6275 662c 206c 656e 293b 203c 7370 , buf, len); // pass data \n-001afbf0: 6f6e 2074 6f20 6f6c 6420 7365 6e64 2063 on to old send c\n-001afc00: 616c 6c62 6163 6b20 3c2f 7370 616e 3e3c allback <\n-001afc10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+001af790: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine\">// th\n+001af7b0: 6520 6e65 7720 7365 6e64 2063 616c 6c62 e new send callb\n+001af7c0: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack .
    static\n+001af800: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int plu\n+001af830: 6769 6e5f 7365 6e64 283c 7370 616e 2063 gin_send(s\n+001af850: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001af8c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001af8d0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001af900: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *buf, size_t len)
    .<\n+001af990: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001af9a0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct plugin_data *da\n+001af9f0: 7461 203d 2028 3c73 7061 6e20 636c 6173 ta = (stru\n+001afa10: 6374 203c 2f73 7061 6e3e 706c 7567 696e ct plugin\n+001afa20: 5f64 6174 612a 2973 6f61 705f 6c6f 6f6b _data*)soap_look\n+001afa30: 7570 5f70 6c75 6769 6e28 3c61 2063 6c61 up_plugin(soap, plugi\n+001afa70: 6e5f 6964 293b 203c 7370 616e 2063 6c61 n_id); // \n+001afa90: 6665 7463 6820 706c 7567 696e 2623 3339 fetch plugin'\n+001afaa0: 3b73 206c 6f63 616c 2064 6174 6120 3c2f ;s local data
    . \n+001afad0: 6677 7269 7465 2862 7566 2c20 6c65 6e2c fwrite(buf, len,\n+001afae0: 2031 2c20 7374 6465 7272 293b 203c 7370 1, stderr); // write mess\n+001afb10: 6167 6520 746f 2073 7464 6572 7220 3c2f age to stderr
    . \n+001afb40: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001afb60: 3c2f 7370 616e 3e20 6461 7461 2d26 6774 data->\n+001afb70: 3b66 7365 6e64 283c 6120 636c 6173 733d ;fsend(so\n+001afba0: 6170 3c2f 613e 2c20 6275 662c 206c 656e ap, buf, len\n+001afbb0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // pass\n+001afbd0: 2064 6174 6120 6f6e 2074 6f20 6f6c 6420 data on to old \n+001afbe0: 7365 6e64 2063 616c 6c62 6163 6b20 3c2f send callback
    .} \n+001afc10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n 001afc30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    // the new re\n-001afc80: 6365 6976 6520 6361 6c6c 6261 636b 203c ceive callback <\n-001afc90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001afcb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001afcc0: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord\">static siz\n-001afcf0: 655f 743c 2f73 7061 6e3e 2070 6c75 6769 e_t plugi\n-001afd00: 6e5f 7265 6376 283c 7370 616e 2063 6c61 n_recv(str\n-001afd20: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, char *buf, size_t\n-001afde0: 206c 656e 2920 3c2f 6469 763e 0a3c 6469 len)
    .{\n-001afe00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct p\n-001afe40: 6c75 6769 6e5f 6461 7461 202a 6461 7461 lugin_data *data\n-001afe50: 203d 2028 3c73 7061 6e20 636c 6173 733d = (struct\n-001afe70: 203c 2f73 7061 6e3e 706c 7567 696e 5f64 plugin_d\n-001afe80: 6174 612a 2973 6f61 705f 6c6f 6f6b 7570 ata*)soap_lookup\n-001afe90: 5f70 6c75 6769 6e28 3c61 2063 6c61 7373 _plugin(s\n-001afec0: 6f61 703c 2f61 3e2c 2070 6c75 6769 6e5f oap, plugin_\n-001afed0: 6964 293b 203c 7370 616e 2063 6c61 7373 id); // fe\n-001afef0: 7463 6820 706c 7567 696e 2623 3339 3b73 tch plugin's\n-001aff00: 206c 6f63 616c 2064 6174 6120 3c2f 7370 local data
    .
    size_t res = data\n-001aff60: 2d26 6774 3b66 7265 6376 283c 6120 636c ->frecv(soap, buf,\n-001affa0: 206c 656e 293b 203c 7370 616e 2063 6c61 len); // \n-001affc0: 6765 7420 6461 7461 2066 726f 6d20 6f6c get data from ol\n-001affd0: 6420 7265 6376 2063 616c 6c62 6163 6b20 d recv callback \n-001affe0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001b0000: 2020 6677 7269 7465 2862 7566 2c20 7265 fwrite(buf, re\n-001b0010: 732c 2031 2c20 7374 6465 7272 293b 203c s, 1, stderr); <\n-001b0020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return res;
    .\n-001b0080: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    \n-001b00f0: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_EOM<\n-001b0140: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    #de\n-001b0160: 6669 6e65 2053 4f41 505f 454f 4d3c 2f64 fine SOAP_EOM
    A soap_sta\n-001b0190: 7475 7320 6572 726f 7220 636f 6465 3a20 tus error code: \n-001b01a0: 6f75 7420 6f66 206d 656d 6f72 792e 3c2f out of memory.
    Defini\n-001b01d0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-001b01e0: 7032 2e68 3a32 3337 313c 2f64 6976 3e3c p2.h:2371
    <\n-001b01f0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001b0210: 4974 2069 7320 7468 6520 7265 7370 6f6e It is the respon\n-001b0220: 7369 6269 6c69 7479 206f 6620 7468 6520 sibility of the \n-001b0230: 706c 7567 696e 2074 6f20 6861 6e64 6c65 plugin to handle\n-001b0240: 2072 6567 6973 7472 7920 2869 6e69 7429 registry (init)\n-001b0250: 2c20 636f 7079 2c20 616e 6420 6465 6c65 , copy, and dele\n-001b0260: 7469 6f6e 206f 6620 7468 6520 706c 7567 tion of the plug\n-001b0270: 696e 2064 6174 6120 616e 6420 7265 7365 in data and rese\n-001b0280: 7420 6361 6c6c 6261 636b 732e 3c2f 703e t callbacks.

    \n-001b0290: 0a3c 703e 5468 6520 3c63 6f64 653e 6664 .

    The fd\n-001b02a0: 656c 6574 653c 2f63 6f64 653e 2063 616c elete cal\n-001b02b0: 6c62 6163 6b20 6f66 203c 636f 6465 3e73 lback of s\n-001b02c0: 7472 7563 7420 736f 6170 5f70 6c75 6769 truct soap_plugi\n-001b02d0: 6e3c 2f63 6f64 653e 206d 7573 7420 6265 n must be\n-001b02e0: 2073 6574 2074 6f20 6465 2d72 6567 6973 set to de-regis\n-001b02f0: 7465 7220 7468 6520 706c 7567 696e 2061 ter the plugin a\n-001b0300: 6e64 206c 6574 2069 7420 6465 6c65 7465 nd let it delete\n-001b0310: 2069 7473 2072 6573 6f75 7263 6573 2e3c its resources.<\n-001b0320: 2f70 3e0a 3c70 3e41 2070 6c75 6769 6e20 /p>.

    A plugin \n-001b0330: 6973 2063 6f70 6965 6420 616c 6f6e 6720 is copied along \n-001b0340: 7769 7468 2069 7473 2063 6f72 7265 7370 with its corresp\n-001b0350: 6f6e 6469 6e67 203c 636f 6465 3e3c 6120 onding soap context\n-001b03c0: 2077 6974 6820 7468 6520 3c63 6f64 653e with the \n-001b03d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_\n-001b0480: 636f 7079 3c2f 613e 3c2f 636f 6465 3e20 copy \n-001b0490: 6361 6c6c 2e20 5468 6973 2066 756e 6374 call. This funct\n-001b04a0: 696f 6e20 636f 7069 6573 2061 203c 636f ion copies a s\n-001b0500: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n-001b0510: 6f6e 7465 7874 2061 6e64 2074 6865 2063 ontext and the c\n-001b0520: 6861 696e 206f 6620 706c 7567 696e 732e hain of plugins.\n-001b0530: 2049 7420 6973 2075 7020 746f 2074 6865 It is up to the\n-001b0540: 2070 6c75 6769 6e20 696d 706c 656d 656e plugin implemen\n-001b0550: 7461 7469 6f6e 2074 6f20 7368 6172 6520 tation to share \n-001b0560: 7468 6520 706c 7567 696e 2064 6174 6120 the plugin data \n-001b0570: 6f72 206e 6f74 2061 7320 666f 6c6c 6f77 or not as follow\n-001b0580: 733a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s:

    .
      .
    • \n-001b0590: 6966 2074 6865 203c 636f 6465 3e66 636f if the fco\n-001b05a0: 7079 2829 3c2f 636f 6465 3e20 6361 6c6c py() call\n-001b05b0: 6261 636b 2069 7320 7365 7420 6279 2074 back is set by t\n-001b05c0: 6865 2070 6c75 6769 6e20 696e 6974 6961 he plugin initia\n-001b05d0: 6c69 7a61 7469 6f6e 2c20 7468 6973 2063 lization, this c\n-001b05e0: 616c 6c62 6163 6b20 7769 6c6c 2062 6520 allback will be \n-001b05f0: 6361 6c6c 6564 2074 6f20 616c 6c6f 7720 called to allow \n-001b0600: 7468 6520 706c 7567 696e 2074 6f20 636f the plugin to co\n-001b0610: 7079 2069 7473 206c 6f63 616c 2064 6174 py its local dat\n-001b0620: 6120 7570 6f6e 2061 203c 636f 6465 3e3c a upon a <\n-001b0630: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001b0640: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001b0650: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-001b0660: 6234 6333 6638 6365 3830 6261 6630 6631 b4c3f8ce80baf0f1\n-001b0670: 6665 6338 6338 3666 3062 6235 3738 3861 fec8c86f0bb5788a\n-001b0680: 2220 7469 746c 653d 2241 6c6c 6f63 6174 \" title=\"Allocat\n-001b0690: 6520 616e 6420 696e 6974 6961 6c69 7a65 e and initialize\n-001b06a0: 2061 206e 6577 2073 6f61 7020 636f 6e74 a new soap cont\n-001b06b0: 6578 7420 6173 2061 2063 6f70 7920 6f66 ext as a copy of\n-001b06c0: 2074 6865 2067 6976 656e 2073 6f61 7020 the given soap \n-001b06d0: 636f 6e74 6578 742e 223e 736f 6170 5f63 context.\">soap_c\n-001b06e0: 6f70 793c 2f61 3e3c 2f63 6f64 653e 2063 opy c\n-001b06f0: 616c 6c2e 2057 6865 6e20 3c63 6f64 653e all. When \n-001b0700: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_done or soap_free<\n-001b0890: 2f63 6f64 653e 2069 7320 6361 6c6c 6564 /code> is called\n-001b08a0: 206f 6e20 7468 6973 203c 636f 6465 3e3c on this <\n-001b08b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001b08c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001b08d0: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n-001b08e0: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n-001b08f0: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n-001b0900: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-001b0910: 7874 2063 6f70 792c 2074 6865 203c 636f xt copy, the fdelete() callback is \n-001b0940: 6361 6c6c 6564 2066 6f72 2064 6561 6c6c called for deall\n-001b0950: 6f63 6174 696f 6e20 616e 6420 636c 6561 ocation and clea\n-001b0960: 6e75 7020 6f66 2074 6865 206c 6f63 616c nup of the local\n-001b0970: 2064 6174 612e 3c2f 6c69 3e0a 3c6c 693e data.
    • .
    • \n-001b0980: 6966 2074 6865 203c 636f 6465 3e66 636f if the fco\n-001b0990: 7079 2829 3c2f 636f 6465 3e20 6361 6c6c py() call\n-001b09a0: 6261 636b 2069 7320 6e6f 7420 7365 742c back is not set,\n-001b09b0: 2074 6865 6e20 7468 6520 706c 7567 696e then the plugin\n-001b09c0: 2064 6174 6120 7769 6c6c 2062 6520 7368 data will be sh\n-001b09d0: 6172 6564 2028 692e 652e 2074 6865 2064 ared (i.e. the d\n-001b09e0: 6174 6120 706f 696e 7465 7220 706f 696e ata pointer poin\n-001b09f0: 7473 2074 6f20 7468 6520 7361 6d65 2061 ts to the same a\n-001b0a00: 6464 7265 7373 292e 2054 6865 203c 636f ddress). The fdelete() callback wil\n-001b0a30: 6c20 6e6f 7420 6265 2063 616c 6c65 6420 l not be called \n-001b0a40: 7570 6f6e 2061 203c 636f 6465 3e3c 6120 upon a soap_done on a copy \n-001b0b30: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the soap context\n-001b0ba0: 202e 2054 6865 203c 636f 6465 3e66 6465 . The fde\n-001b0bb0: 6c65 7465 2829 3c2f 636f 6465 3e20 6361 lete() ca\n-001b0bc0: 6c6c 6261 636b 2077 696c 6c20 6265 2063 llback will be c\n-001b0bd0: 616c 6c65 6420 666f 7220 7468 6520 6f72 alled for the or\n-001b0be0: 6967 696e 616c 203c 636f 6465 3e3c 6120 iginal soap context\n-001b0c50: 2077 6974 6820 7768 6963 6820 7468 6520 with which the \n-001b0c60: 706c 7567 696e 2077 6173 2072 6567 6973 plugin was regis\n-001b0c70: 7465 7265 642e 3c2f 6c69 3e0a 3c2f 756c tered.
    • ..

      The example\n-001b0c90: 2070 6c75 6769 6e20 7368 6f75 6c64 2062 plugin should b\n-001b0ca0: 6520 7573 6564 2061 7320 666f 6c6c 6f77 e used as follow\n-001b0cb0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

      .
      <\n-001b0ce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b0cf0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-001b0d60: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-001b0dc0: 6e65 773c 2f61 3e28 293b 203c 2f64 6976 new(); .
      soap_reg\n-001b0e40: 6973 7465 725f 706c 7567 696e 3c2f 613e ister_plugin\n-001b0e50: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001b0e80: 2c20 706c 7567 696e 293b 203c 2f64 6976 , plugin); .

      To p\n-001b0eb0: 6173 7320 6120 3c63 6f64 653e 766f 6964 ass a void\n-001b0ec0: 2a3c 2f63 6f64 653e 2061 7267 756d 656e * argumen\n-001b0ed0: 7420 746f 2074 6865 2070 6c75 6769 6e27 t to the plugin'\n-001b0ee0: 7320 7265 6769 7374 7279 2066 756e 6374 s registry funct\n-001b0ef0: 696f 6e20 7573 653a 3c2f 703e 0a3c 6469 ion use:

      .
      struc\n-001b0f40: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-001b0f70: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new();\n-001b1010: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .\n-001b10e0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

      Addit\n-001b1100: 696f 6e61 6c20 646f 6375 6d65 6e74 6174 ional documentat\n-001b1110: 696f 6e20 666f 7220 7468 6520 6772 6f77 ion for the grow\n-001b1120: 696e 6720 6e75 6d62 6572 206f 6620 6753 ing number of gS\n-001b1130: 4f41 5020 706c 7567 696e 7320 6361 6e20 OAP plugins can \n-001b1140: 6265 2066 6f75 6e64 2061 7420 3c61 2068 be found at https://www.ge\n-001b1180: 6e69 7669 612e 636f 6d2f 646f 633c 2f61 nivia.com/doc. A number of e\n-001b11a0: 7861 6d70 6c65 2070 6c75 6769 6e73 2061 xample plugins a\n-001b11b0: 7265 2069 6e63 6c75 6465 6420 696e 2074 re included in t\n-001b11c0: 6865 2067 534f 4150 2073 6f75 7263 6520 he gSOAP source \n-001b11d0: 636f 6465 2070 6163 6b61 6765 2773 203c code package's <\n-001b11e0: 656d 3e3c 636f 6465 3e67 736f 6170 2f70 em>gsoap/p\n-001b11f0: 6c75 6769 6e3c 2f63 6f64 653e 3c2f 656d lugin directory. Som\n-001b1210: 6520 6f66 2074 6865 7365 2070 6c75 6769 e of these plugi\n-001b1220: 6e73 2061 7265 2064 6973 6375 7373 6564 ns are discussed\n-001b1230: 2069 6e20 7468 6520 6e65 7874 2073 6563 in the next sec\n-001b1240: 7469 6f6e 732e 3c2f 703e 0a3c 703e 5365 tions.

      .

      Se\n-001b1250: 6520 616c 736f 2041 5049 2064 6f63 756d e also API docum\n-001b1260: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module \n-001b1270: 3c61 2063 6c61 7373 3d22 656c 2220 6872 P\n-001b12a0: 6c75 6769 6e73 2061 6e64 2070 6c75 6769 lugins and plugi\n-001b12b0: 6e20 7265 6769 7374 7279 2066 756e 6374 n registry funct\n-001b12c0: 696f 6e73 3c2f 613e 202e 3c2f 703e 0a3c ions .

      .<\n-001b12d0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-001b12f0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-001b1300: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

      .

      .DOM API\n-001b1330: 206f 7665 7276 6965 773c 2f68 333e 0a3c overview

      .<\n-001b1340: 703e 5468 6520 444f 4d20 4150 4920 6973 p>The DOM API is\n-001b1350: 206e 6f74 2061 2070 6c75 6769 6e2c 2062 not a plugin, b\n-001b1360: 7574 2061 6e20 6578 7465 6e73 696f 6e20 ut an extension \n-001b1370: 7468 6174 2070 726f 7669 6465 7320 6120 that provides a \n-001b1380: 444f 4d20 4150 4920 6173 2061 2073 6570 DOM API as a sep\n-001b1390: 6172 6174 6520 736f 7572 6365 2063 6f64 arate source cod\n-001b13a0: 6520 6669 6c65 2074 6f20 636f 6d70 696c e file to compil\n-001b13b0: 6520 616e 6420 6c69 6e6b 2077 6974 6820 e and link with \n-001b13c0: 6753 4f41 5020 6170 706c 6963 6174 696f gSOAP applicatio\n-001b13d0: 6e73 2074 6f20 656e 6162 6c65 6420 7468 ns to enabled th\n-001b13e0: 6520 6753 4f41 5020 444f 4d2e 2058 4d4c e gSOAP DOM. XML\n-001b13f0: 2044 4f4d 2070 726f 6365 7373 696e 6720 DOM processing \n-001b1400: 6973 206f 7074 696f 6e61 6c2c 2061 6e64 is optional, and\n-001b1410: 2065 6e61 626c 6564 2077 6974 6820 3c61 enabled with wsdl2\n-001b1440: 6820 2d64 3c2f 636f 6465 3e3c 2f62 3e20 h -d \n-001b1450: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n-001b1460: 2d64 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 -d to generate DO\n-001b1480: 4d20 7374 7275 6374 7572 6573 2066 6f72 M structures for\n-001b1490: 203c 656d 3e3c 636f 6465 3e78 7364 3a61 xsd:a\n-001b14a0: 6e79 5479 7065 3c2f 636f 6465 3e3c 2f65 nyType, xs\n-001b14c0: 643a 616e 793c 2f63 6f64 653e 3c2f 656d d:any, and xsd:anyAttribut\n-001b14f0: 653c 2f63 6f64 653e 3c2f 656d 3e20 7363 e
      sc\n-001b1500: 6865 6d61 2063 6f6d 706f 6e65 6e74 732c hema components,\n-001b1510: 2077 6869 6368 2061 7265 2065 6e61 626c which are enabl\n-001b1520: 6564 2077 6974 6820 3c63 6f64 653e 2369 ed with #i\n-001b1530: 6d70 6f72 7420 2264 6f6d 2e68 223c 2f63 mport \"dom.h\" in an inter\n-001b1550: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-001b1560: 2066 6f72 2073 6f61 7063 7070 322e 2054 for soapcpp2. T\n-001b1570: 6869 7320 696d 706f 7274 7320 3c65 6d3e his imports \n-001b1580: 3c63 6f64 653e 6773 6f61 702f 696d 706f gsoap/impo\n-001b1590: 7274 2f64 6f6d 2e68 3c2f 636f 6465 3e3c rt/dom.h<\n-001b15a0: 2f65 6d3e 2e20 5468 656e 2063 6f6d 7069 /em>. Then compi\n-001b15b0: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso\n-001b15c0: 6170 2f64 6f6d 2e63 3c2f 636f 6465 3e3c ap/dom.c<\n-001b15d0: 2f65 6d3e 2066 6f72 2043 206f 7220 3c65 /em> for C or gsoap/do\n-001b15f0: 6d2e 6370 703c 2f63 6f64 653e 3c2f 656d m.cpp for C++ with y\n-001b1610: 6f75 7220 6170 706c 6963 6174 696f 6e2e our application.\n-001b1620: 3c2f 703e 0a3c 703e 546f 2075 7365 2074

      .

      To use t\n-001b1630: 6865 2044 4f4d 2041 5049 2077 6974 6820 he DOM API with \n-001b1640: 5765 6220 7365 7276 6963 6573 2c20 6164 Web services, ad\n-001b1650: 6420 3c63 6f64 653e 2369 6d70 6f72 7420 d #import \n-001b1660: 2264 6f6d 2e68 223c 2f63 6f64 653e 2074 \"dom.h\" t\n-001b1670: 6f20 7468 6520 696e 7465 7266 6163 6520 o the interface \n-001b1680: 6865 6164 6572 2066 696c 6520 6f72 2075 header file or u\n-001b1690: 7365 203c 6120 6872 6566 3d22 2377 7364 se \n-001b16b0: 7773 646c 3268 202d 643c 2f63 6f64 653e wsdl2h -d\n-001b16c0: 3c2f 623e 206f 7074 696f 6e20 3c62 3e3c option <\n-001b16d0: 636f 6465 3e2d 643c 2f63 6f64 653e 3c2f code>-d:

      .
      #\n-001b1730: 696d 706f 7274 2026 7175 6f74 3b64 6f6d import "dom\n-001b1740: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n-001b1750: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n-001b1770: 5468 6973 2064 6563 6c61 7265 7320 3c63 This declares xsd__anyType\n-001b1790: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and xsd__anyAttrib\n-001b17b0: 7574 653c 2f63 6f64 653e 2074 7970 6573 ute types\n-001b17c0: 2e3c 2f70 3e0a 3c70 3e41 2044 4f4d 2065 .

      .

      A DOM e\n-001b17d0: 6c65 6d65 6e74 206e 6f64 6520 6973 2073 lement node is s\n-001b17e0: 6572 6961 6c69 7a65 6420 7769 7468 2074 erialized with t\n-001b17f0: 6865 203c 636f 6465 3e78 7364 5f5f 616e he xsd__an\n-001b1800: 7954 7970 653c 2f63 6f64 653e 2073 6572 yType ser\n-001b1810: 6961 6c69 7a61 626c 6520 7479 7065 2e20 ializable type. \n-001b1820: 5468 6520 756e 6465 726c 7969 6e67 2069 The underlying i\n-001b1830: 6d70 6c65 6d65 6e74 6174 696f 6e20 7479 mplementation ty\n-001b1840: 7065 206f 6620 3c63 6f64 653e 7873 645f pe of xsd_\n-001b1850: 5f61 6e79 5479 7065 3c2f 636f 6465 3e20 _anyType \n-001b1860: 6973 203c 636f 6465 3e73 6f61 705f 646f is soap_do\n-001b1870: 6d5f 656c 656d 656e 743c 2f63 6f64 653e m_element\n-001b1880: 2e20 4f6e 6520 6f72 206d 6f72 6520 444f . One or more DO\n-001b1890: 4d20 6174 7472 6962 7574 6520 6e6f 6465 M attribute node\n-001b18a0: 7320 6172 6520 7365 7269 616c 697a 6564 s are serialized\n-001b18b0: 2077 6974 6820 7468 6520 3c63 6f64 653e with the \n-001b18c0: 7873 645f 5f61 6e79 4174 7472 6962 7574 xsd__anyAttribut\n-001b18d0: 653c 2f63 6f64 653e 2073 6572 6961 6c69 e seriali\n-001b18e0: 7a61 626c 6520 7479 7065 2e20 5468 6520 zable type. The \n-001b18f0: 756e 6465 726c 7969 6e67 2069 6d70 6c65 underlying imple\n-001b1900: 6d65 6e74 6174 696f 6e20 7479 7065 206f mentation type o\n-001b1910: 6620 3c63 6f64 653e 7873 645f 5f61 6e79 f xsd__any\n-001b1920: 4174 7472 6962 7574 653c 2f63 6f64 653e Attribute\n-001b1930: 2069 7320 3c63 6f64 653e 736f 6170 5f64 is soap_d\n-001b1940: 6f6d 5f61 7474 7269 6275 7465 3c2f 636f om_attribute, which is a \n-001b1960: 6c69 6e6b 6564 206c 6973 742e 3c2f 703e linked list.

      \n-001b1970: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
      #import &quo\n-001b19c0: 743b 646f 6d2e 6826 7175 6f74 3b3c 2f73 t;dom.h" // im\n-001b19f0: 706f 7274 7320 7873 645f 5f61 6e79 5479 ports xsd__anyTy\n-001b1a00: 7065 2061 7320 6120 444f 4d20 6e6f 6465 pe as a DOM node\n-001b1a10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .// the \n+001afc60: 6e65 7720 7265 6365 6976 6520 6361 6c6c new receive call\n+001afc70: 6261 636b 203c 2f73 7061 6e3e 3c2f 6469 back .
      stati\n+001afcb0: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c size_t\n+001afce0: 2070 6c75 6769 6e5f 7265 6376 283c 7370 plugin_recv(struct\n+001afd10: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001afd40: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, cha\n+001afd90: 723c 2f73 7061 6e3e 202a 6275 662c 203c r *buf, <\n+001afda0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001afdb0: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+001afdc0: 2f73 7061 6e3e 206c 656e 2920 3c2f 6469 /span> len) .
      {
      . \n+001afe00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct plugin_data\n+001afe30: 202a 6461 7461 203d 2028 3c73 7061 6e20 *data = (\n+001afe50: 7374 7275 6374 203c 2f73 7061 6e3e 706c struct pl\n+001afe60: 7567 696e 5f64 6174 612a 2973 6f61 705f ugin_data*)soap_\n+001afe70: 6c6f 6f6b 7570 5f70 6c75 6769 6e28 3c61 lookup_plugin(soap
      , p\n+001afeb0: 6c75 6769 6e5f 6964 293b 203c 7370 616e lugin_id); // fetch plugin\n+001afee0: 2623 3339 3b73 206c 6f63 616c 2064 6174 's local dat\n+001afef0: 6120 3c2f 7370 616e 3e3c 2f64 6976 3e0a a
      .\n+001aff00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      si\n+001aff30: 7a65 5f74 3c2f 7370 616e 3e20 7265 7320 ze_t res \n+001aff40: 3d20 6461 7461 2d26 6774 3b66 7265 6376 = data->frecv\n+001aff50: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001aff80: 2c20 6275 662c 206c 656e 293b 203c 7370 , buf, len); // get data f\n+001affb0: 726f 6d20 6f6c 6420 7265 6376 2063 616c rom old recv cal\n+001affc0: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
      fwrite(b\n+001afff0: 7566 2c20 7265 732c 2031 2c20 7374 6465 uf, res, 1, stde\n+001b0000: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
      . \n+001b0020: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001b0040: 3c2f 7370 616e 3e20 7265 733b 203c 2f64 res; .
      }
      .<\n+001b0130: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+001b0140: 6922 3e23 6465 6669 6e65 2053 4f41 505f i\">#define SOAP_\n+001b0150: 454f 4d3c 2f64 6976 3e3c 6469 7620 636c EOM
      A so\n+001b0170: 6170 5f73 7461 7475 7320 6572 726f 7220 ap_status error \n+001b0180: 636f 6465 3a20 6f75 7420 6f66 206d 656d code: out of mem\n+001b0190: 6f72 792e 3c2f 6469 763e 3c64 6976 2063 ory.
      \n+001b01b0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+001b01c0: 7374 6473 6f61 7032 2e68 3a32 3337 313c stdsoap2.h:2371<\n+001b01d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
      .

      It is the \n+001b0200: 7265 7370 6f6e 7369 6269 6c69 7479 206f responsibility o\n+001b0210: 6620 7468 6520 706c 7567 696e 2074 6f20 f the plugin to \n+001b0220: 6861 6e64 6c65 2072 6567 6973 7472 7920 handle registry \n+001b0230: 2869 6e69 7429 2c20 636f 7079 2c20 616e (init), copy, an\n+001b0240: 6420 6465 6c65 7469 6f6e 206f 6620 7468 d deletion of th\n+001b0250: 6520 706c 7567 696e 2064 6174 6120 616e e plugin data an\n+001b0260: 6420 7265 7365 7420 6361 6c6c 6261 636b d reset callback\n+001b0270: 732e 3c2f 703e 0a3c 703e 5468 6520 3c63 s.

      .

      The fdelete callback of <\n+001b02a0: 636f 6465 3e73 7472 7563 7420 736f 6170 code>struct soap\n+001b02b0: 5f70 6c75 6769 6e3c 2f63 6f64 653e 206d _plugin m\n+001b02c0: 7573 7420 6265 2073 6574 2074 6f20 6465 ust be set to de\n+001b02d0: 2d72 6567 6973 7465 7220 7468 6520 706c -register the pl\n+001b02e0: 7567 696e 2061 6e64 206c 6574 2069 7420 ugin and let it \n+001b02f0: 6465 6c65 7465 2069 7473 2072 6573 6f75 delete its resou\n+001b0300: 7263 6573 2e3c 2f70 3e0a 3c70 3e41 2070 rces.

      .

      A p\n+001b0310: 6c75 6769 6e20 6973 2063 6f70 6965 6420 lugin is copied \n+001b0320: 616c 6f6e 6720 7769 7468 2069 7473 2063 along with its c\n+001b0330: 6f72 7265 7370 6f6e 6469 6e67 203c 636f orresponding s\n+001b0390: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+001b03a0: 6f6e 7465 7874 2077 6974 6820 7468 6520 ontext with the \n+001b03b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_copy call. This\n+001b0480: 2066 756e 6374 696f 6e20 636f 7069 6573 function copies\n+001b0490: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap context and\n+001b0500: 2074 6865 2063 6861 696e 206f 6620 706c the chain of pl\n+001b0510: 7567 696e 732e 2049 7420 6973 2075 7020 ugins. It is up \n+001b0520: 746f 2074 6865 2070 6c75 6769 6e20 696d to the plugin im\n+001b0530: 706c 656d 656e 7461 7469 6f6e 2074 6f20 plementation to \n+001b0540: 7368 6172 6520 7468 6520 706c 7567 696e share the plugin\n+001b0550: 2064 6174 6120 6f72 206e 6f74 2061 7320 data or not as \n+001b0560: 666f 6c6c 6f77 733a 3c2f 703e 0a3c 756c follows:

      ..
    • if the fcopy() callback is se\n+001b05a0: 7420 6279 2074 6865 2070 6c75 6769 6e20 t by the plugin \n+001b05b0: 696e 6974 6961 6c69 7a61 7469 6f6e 2c20 initialization, \n+001b05c0: 7468 6973 2063 616c 6c62 6163 6b20 7769 this callback wi\n+001b05d0: 6c6c 2062 6520 6361 6c6c 6564 2074 6f20 ll be called to \n+001b05e0: 616c 6c6f 7720 7468 6520 706c 7567 696e allow the plugin\n+001b05f0: 2074 6f20 636f 7079 2069 7473 206c 6f63 to copy its loc\n+001b0600: 616c 2064 6174 6120 7570 6f6e 2061 203c al data upon a <\n+001b0610: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+001b06c0: 736f 6170 5f63 6f70 793c 2f61 3e3c 2f63 soap_copy call. When \n+001b06e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n+001b07b0: 6f6e 653c 2f61 3e3c 2f63 6f64 653e 206f one o\n+001b07c0: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_fre\n+001b0870: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is \n+001b0880: 6361 6c6c 6564 206f 6e20 7468 6973 203c called on this <\n+001b0890: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+001b08f0: 2063 6f6e 7465 7874 2063 6f70 792c 2074 context copy, t\n+001b0900: 6865 203c 636f 6465 3e66 6465 6c65 7465 he fdelete\n+001b0910: 2829 3c2f 636f 6465 3e20 6361 6c6c 6261 () callba\n+001b0920: 636b 2069 7320 6361 6c6c 6564 2066 6f72 ck is called for\n+001b0930: 2064 6561 6c6c 6f63 6174 696f 6e20 616e deallocation an\n+001b0940: 6420 636c 6561 6e75 7020 6f66 2074 6865 d cleanup of the\n+001b0950: 206c 6f63 616c 2064 6174 612e 3c2f 6c69 local data..
    • if the fcopy() callback is no\n+001b0990: 7420 7365 742c 2074 6865 6e20 7468 6520 t set, then the \n+001b09a0: 706c 7567 696e 2064 6174 6120 7769 6c6c plugin data will\n+001b09b0: 2062 6520 7368 6172 6564 2028 692e 652e be shared (i.e.\n+001b09c0: 2074 6865 2064 6174 6120 706f 696e 7465 the data pointe\n+001b09d0: 7220 706f 696e 7473 2074 6f20 7468 6520 r points to the \n+001b09e0: 7361 6d65 2061 6464 7265 7373 292e 2054 same address). T\n+001b09f0: 6865 203c 636f 6465 3e66 6465 6c65 7465 he fdelete\n+001b0a00: 2829 3c2f 636f 6465 3e20 6361 6c6c 6261 () callba\n+001b0a10: 636b 2077 696c 6c20 6e6f 7420 6265 2063 ck will not be c\n+001b0a20: 616c 6c65 6420 7570 6f6e 2061 203c 636f alled upon a soap_done\n+001b0b00: 3c2f 613e 3c2f 636f 6465 3e20 6f6e 2061 on a\n+001b0b10: 2063 6f70 7920 6f66 2074 6865 203c 636f copy of the s\n+001b0b70: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+001b0b80: 6f6e 7465 7874 202e 2054 6865 203c 636f ontext . The fdelete() callback wil\n+001b0bb0: 6c20 6265 2063 616c 6c65 6420 666f 7220 l be called for \n+001b0bc0: 7468 6520 6f72 6967 696e 616c 203c 636f the original s\n+001b0c20: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+001b0c30: 6f6e 7465 7874 2077 6974 6820 7768 6963 ontext with whic\n+001b0c40: 6820 7468 6520 706c 7567 696e 2077 6173 h the plugin was\n+001b0c50: 2072 6567 6973 7465 7265 642e 3c2f 6c69 registered..
    .

    The e\n+001b0c70: 7861 6d70 6c65 2070 6c75 6769 6e20 7368 xample plugin sh\n+001b0c80: 6f75 6c64 2062 6520 7573 6564 2061 7320 ould be used as \n+001b0c90: 666f 6c6c 6f77 733a 3c2f 703e 0a3c 6469 follows:

    .
    struc\n+001b0ce0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n+001b0d10: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new();\n+001b0db0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    <\n+001b0e90: 703e 546f 2070 6173 7320 6120 3c63 6f64 p>To pass a void* a\n+001b0eb0: 7267 756d 656e 7420 746f 2074 6865 2070 rgument to the p\n+001b0ec0: 6c75 6769 6e27 7320 7265 6769 7374 7279 lugin's registry\n+001b0ed0: 2066 756e 6374 696f 6e20 7573 653a 3c2f function use:.
    struct <\n+001b0f30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b0f40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b0f50: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001b0f60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001b0f90: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+001b0ff0: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n+001b1010: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_registe\n+001b1070: 725f 706c 7567 696e 5f61 7267 3c2f 613e r_plugin_arg\n+001b1080: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b10b0: 2c20 706c 7567 696e 2c20 6172 6729 3b20 , plugin, arg); \n+001b10c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Additional docu\n+001b10f0: 6d65 6e74 6174 696f 6e20 666f 7220 7468 mentation for th\n+001b1100: 6520 6772 6f77 696e 6720 6e75 6d62 6572 e growing number\n+001b1110: 206f 6620 6753 4f41 5020 706c 7567 696e of gSOAP plugin\n+001b1120: 7320 6361 6e20 6265 2066 6f75 6e64 2061 s can be found a\n+001b1130: 7420 3c61 2068 7265 663d 2268 7474 7073 t https://\n+001b1160: 7777 772e 6765 6e69 7669 612e 636f 6d2f www.genivia.com/\n+001b1170: 646f 633c 2f61 3e2e 2041 206e 756d 6265 doc. A numbe\n+001b1180: 7220 6f66 2065 7861 6d70 6c65 2070 6c75 r of example plu\n+001b1190: 6769 6e73 2061 7265 2069 6e63 6c75 6465 gins are include\n+001b11a0: 6420 696e 2074 6865 2067 534f 4150 2073 d in the gSOAP s\n+001b11b0: 6f75 7263 6520 636f 6465 2070 6163 6b61 ource code packa\n+001b11c0: 6765 2773 203c 656d 3e3c 636f 6465 3e67 ge's g\n+001b11d0: 736f 6170 2f70 6c75 6769 6e3c 2f63 6f64 soap/plugin director\n+001b11f0: 792e 2053 6f6d 6520 6f66 2074 6865 7365 y. Some of these\n+001b1200: 2070 6c75 6769 6e73 2061 7265 2064 6973 plugins are dis\n+001b1210: 6375 7373 6564 2069 6e20 7468 6520 6e65 cussed in the ne\n+001b1220: 7874 2073 6563 7469 6f6e 732e 3c2f 703e xt sections.

    \n+001b1230: 0a3c 703e 5365 6520 616c 736f 2041 5049 .

    See also API\n+001b1240: 2064 6f63 756d 656e 7461 7469 6f6e 204d documentation M\n+001b1250: 6f64 756c 6520 3c61 2063 6c61 7373 3d22 odule Plugins and\n+001b1290: 2070 6c75 6769 6e20 7265 6769 7374 7279 plugin registry\n+001b12a0: 2066 756e 6374 696f 6e73 3c2f 613e 202e functions .\n+001b12b0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+001b12d0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+001b12e0: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+001b12f0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001b1300: 2069 643d 2264 6f6d 223e 3c2f 613e 0a44 id=\"dom\">.D\n+001b1310: 4f4d 2041 5049 206f 7665 7276 6965 773c OM API overview<\n+001b1320: 2f68 333e 0a3c 703e 5468 6520 444f 4d20 /h3>.

    The DOM \n+001b1330: 4150 4920 6973 206e 6f74 2061 2070 6c75 API is not a plu\n+001b1340: 6769 6e2c 2062 7574 2061 6e20 6578 7465 gin, but an exte\n+001b1350: 6e73 696f 6e20 7468 6174 2070 726f 7669 nsion that provi\n+001b1360: 6465 7320 6120 444f 4d20 4150 4920 6173 des a DOM API as\n+001b1370: 2061 2073 6570 6172 6174 6520 736f 7572 a separate sour\n+001b1380: 6365 2063 6f64 6520 6669 6c65 2074 6f20 ce code file to \n+001b1390: 636f 6d70 696c 6520 616e 6420 6c69 6e6b compile and link\n+001b13a0: 2077 6974 6820 6753 4f41 5020 6170 706c with gSOAP appl\n+001b13b0: 6963 6174 696f 6e73 2074 6f20 656e 6162 ications to enab\n+001b13c0: 6c65 6420 7468 6520 6753 4f41 5020 444f led the gSOAP DO\n+001b13d0: 4d2e 2058 4d4c 2044 4f4d 2070 726f 6365 M. XML DOM proce\n+001b13e0: 7373 696e 6720 6973 206f 7074 696f 6e61 ssing is optiona\n+001b13f0: 6c2c 2061 6e64 2065 6e61 626c 6564 2077 l, and enabled w\n+001b1400: 6974 6820 3c61 2068 7265 663d 2223 7773 ith wsdl2h -d option \n+001b1440: 3c63 6f64 653e 2d64 3c2f 636f 6465 3e3c -d<\n+001b1450: 2f62 3e3c 2f61 3e20 746f 2067 656e 6572 /b> to gener\n+001b1460: 6174 6520 444f 4d20 7374 7275 6374 7572 ate DOM structur\n+001b1470: 6573 2066 6f72 203c 656d 3e3c 636f 6465 es for xsd:anyType, xsd:any, and xsd:anyAt\n+001b14d0: 7472 6962 7574 653c 2f63 6f64 653e 3c2f tribute schema compo\n+001b14f0: 6e65 6e74 732c 2077 6869 6368 2061 7265 nents, which are\n+001b1500: 2065 6e61 626c 6564 2077 6974 6820 3c63 enabled with #import \"dom\n+001b1520: 2e68 223c 2f63 6f64 653e 2069 6e20 616e .h\" in an\n+001b1530: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+001b1540: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+001b1550: 7070 322e 2054 6869 7320 696d 706f 7274 pp2. This import\n+001b1560: 7320 3c65 6d3e 3c63 6f64 653e 6773 6f61 s gsoa\n+001b1570: 702f 696d 706f 7274 2f64 6f6d 2e68 3c2f p/import/dom.h. Then\n+001b1590: 2063 6f6d 7069 6c65 203c 656d 3e3c 636f compile gsoap/dom.c for C\n+001b15c0: 206f 7220 3c65 6d3e 3c63 6f64 653e 6773 or gs\n+001b15d0: 6f61 702f 646f 6d2e 6370 703c 2f63 6f64 oap/dom.cpp for C++ \n+001b15f0: 7769 7468 2079 6f75 7220 6170 706c 6963 with your applic\n+001b1600: 6174 696f 6e2e 3c2f 703e 0a3c 703e 546f ation.

    .

    To\n+001b1610: 2075 7365 2074 6865 2044 4f4d 2041 5049 use the DOM API\n+001b1620: 2077 6974 6820 5765 6220 7365 7276 6963 with Web servic\n+001b1630: 6573 2c20 6164 6420 3c63 6f64 653e 2369 es, add #i\n+001b1640: 6d70 6f72 7420 2264 6f6d 2e68 223c 2f63 mport \"dom.h\" to the inte\n+001b1660: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+001b1670: 6520 6f72 2075 7365 203c 6120 6872 6566 e or use \n+001b1690: 3c63 6f64 653e 7773 646c 3268 202d 643c wsdl2h -d<\n+001b16a0: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio\n+001b16b0: 6e20 3c62 3e3c 636f 6465 3e2d 643c 2f63 n -d:.

    #import &qu\n+001b1720: 6f74 3b64 6f6d 2e68 2671 756f 743b 3c2f ot;dom.h"
    .

    This decla\n+001b1760: 7265 7320 3c63 6f64 653e 7873 645f 5f61 res xsd__a\n+001b1770: 6e79 5479 7065 3c2f 636f 6465 3e20 616e nyType an\n+001b1780: 6420 3c63 6f64 653e 7873 645f 5f61 6e79 d xsd__any\n+001b1790: 4174 7472 6962 7574 653c 2f63 6f64 653e Attribute\n+001b17a0: 2074 7970 6573 2e3c 2f70 3e0a 3c70 3e41 types.

    .

    A\n+001b17b0: 2044 4f4d 2065 6c65 6d65 6e74 206e 6f64 DOM element nod\n+001b17c0: 6520 6973 2073 6572 6961 6c69 7a65 6420 e is serialized \n+001b17d0: 7769 7468 2074 6865 203c 636f 6465 3e78 with the x\n+001b17e0: 7364 5f5f 616e 7954 7970 653c 2f63 6f64 sd__anyType serializable \n+001b1800: 7479 7065 2e20 5468 6520 756e 6465 726c type. The underl\n+001b1810: 7969 6e67 2069 6d70 6c65 6d65 6e74 6174 ying implementat\n+001b1820: 696f 6e20 7479 7065 206f 6620 3c63 6f64 ion type of xsd__anyType is s\n+001b1850: 6f61 705f 646f 6d5f 656c 656d 656e 743c oap_dom_element<\n+001b1860: 2f63 6f64 653e 2e20 4f6e 6520 6f72 206d /code>. One or m\n+001b1870: 6f72 6520 444f 4d20 6174 7472 6962 7574 ore DOM attribut\n+001b1880: 6520 6e6f 6465 7320 6172 6520 7365 7269 e nodes are seri\n+001b1890: 616c 697a 6564 2077 6974 6820 7468 6520 alized with the \n+001b18a0: 3c63 6f64 653e 7873 645f 5f61 6e79 4174 xsd__anyAt\n+001b18b0: 7472 6962 7574 653c 2f63 6f64 653e 2073 tribute s\n+001b18c0: 6572 6961 6c69 7a61 626c 6520 7479 7065 erializable type\n+001b18d0: 2e20 5468 6520 756e 6465 726c 7969 6e67 . The underlying\n+001b18e0: 2069 6d70 6c65 6d65 6e74 6174 696f 6e20 implementation \n+001b18f0: 7479 7065 206f 6620 3c63 6f64 653e 7873 type of xs\n+001b1900: 645f 5f61 6e79 4174 7472 6962 7574 653c d__anyAttribute<\n+001b1910: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n+001b1920: 736f 6170 5f64 6f6d 5f61 7474 7269 6275 soap_dom_attribu\n+001b1930: 7465 3c2f 636f 6465 3e2c 2077 6869 6368 te, which\n+001b1940: 2069 7320 6120 6c69 6e6b 6564 206c 6973 is a linked lis\n+001b1950: 742e 3c2f 703e 0a3c 6469 7620 636c 6173 t.

    .
    <\n+001b1980: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001b1990: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor\">#impor\n+001b19a0: 7420 2671 756f 743b 646f 6d2e 6826 7175 t "dom.h&qu\n+001b19b0: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; // imports xsd_\n+001b19e0: 5f61 6e79 5479 7065 2061 7320 6120 444f _anyType as a DO\n+001b19f0: 4d20 6e6f 6465 3c2f 7370 616e 3e3c 2f64 M node.
    .\n-001b1a30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001b1a60: 636c 6173 7320 3c2f 7370 616e 3e6e 735f class ns_\n-001b1a70: 5f64 6174 6120 3a20 3c73 7061 6e20 636c _data : pu\n-001b1a90: 626c 6963 3c2f 7370 616e 3e20 7873 645f blic xsd_\n-001b1aa0: 5f61 6e79 5479 7065 3c2f 6469 763e 0a3c _anyType
    .<\n-001b1ab0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b1ac0: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n-001b1ae0: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
    .\n-001b1b00: 2020 2020 7873 645f 5f61 6e79 5479 7065 xsd__anyType\n-001b1b10: 2a20 666f 6f3b 2020 2020 2020 2020 2020 * foo; \n-001b1b20: 2020 2020 2020 3c73 7061 6e20 636c 6173 // S\n-001b1b40: 746f 7265 2026 6c74 3b66 6f6f 2667 743b tore <foo>\n-001b1b50: 2065 6c65 6d65 6e74 2069 6e20 444f 4d20 element in DOM \n-001b1b60: 736f 6170 5f64 6f6d 5f65 6c65 6d65 6e74 soap_dom_element\n-001b1b70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64

    .\n-001b1b90: 2020 2020 7873 645f 5f61 6e79 5479 7065 xsd__anyType\n-001b1ba0: 205f 5f61 6e79 3b20 2020 2020 2020 2020 __any; \n-001b1bb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 // S\n-001b1bd0: 746f 7265 2061 6e79 2065 6c65 6d65 6e74 tore any element\n-001b1be0: 2063 6f6e 7465 6e74 2069 6e20 444f 4d20 content in DOM \n-001b1bf0: 736f 6170 5f64 6f6d 5f65 6c65 6d65 6e74 soap_dom_element\n-001b1c00: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001b1c20: 2020 4020 7873 645f 5f61 6e79 4174 7472 @ xsd__anyAttr\n-001b1c30: 6962 7574 6520 5f5f 616e 7941 7474 7269 ibute __anyAttri\n-001b1c40: 6275 7465 3b20 3c73 7061 6e20 636c 6173 bute; // S\n-001b1c60: 746f 7265 2061 6e79 4174 7472 6962 7574 tore anyAttribut\n-001b1c70: 6520 636f 6e74 656e 7420 696e 2044 4f4d e content in DOM\n-001b1c80: 2073 6f61 705f 646f 6d5f 6174 7472 6962 soap_dom_attrib\n-001b1c90: 7574 6520 6c69 6e6b 6564 206e 6f64 6520 ute linked node \n-001b1ca0: 7374 7275 6374 7572 653c 2f73 7061 6e3e structure\n-001b1cb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };.

    To m\n-001b1cf0: 616e 6970 756c 6174 6520 7468 6520 444f anipulate the DO\n-001b1d00: 4d20 656c 656d 656e 7473 2061 6e64 2061 M elements and a\n-001b1d10: 7474 7269 6275 7465 7320 7765 2075 7365 ttributes we use\n-001b1d20: 2074 6865 2044 4f4d 2041 5049 2066 756e the DOM API fun\n-001b1d30: 6374 696f 6e73 2064 6f63 756d 656e 7465 ctions documente\n-001b1d40: 6420 696e 2074 6865 2067 534f 4150 203c d in the gSOAP <\n-001b1d50: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 646f a href=\"../../do\n-001b1d60: 6d2f 6874 6d6c 2f69 6e64 6578 2e68 746d m/html/index.htm\n-001b1d70: 6c22 3e58 4d4c 2044 4f4d 2041 5049 2064 l\">XML DOM API d\n-001b1d80: 6f63 756d 656e 7461 7469 6f6e 3c2f 613e ocumentation\n-001b1d90: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t\n-001b1db0: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n-001b1dc0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n-001b1dd0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .The me\n-001b1e00: 7373 6167 6520 6c6f 6767 696e 6720 706c ssage logging pl\n-001b1e10: 7567 696e 3c2f 6833 3e0a 3c70 3e54 6865 ugin

    .

    The\n-001b1e20: 206d 6573 7361 6765 203c 636f 6465 3e3c message <\n-001b1e30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001b1e40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001b1e50: 5f64 6562 7567 2e68 746d 6c23 6761 6336 _debug.html#gac6\n-001b1e60: 3337 3934 3564 3038 3639 6439 3161 3462 37945d0869d91a4b\n-001b1e70: 3030 6463 3164 6461 6365 6435 3337 2220 00dc1ddaced537\" \n-001b1e80: 7469 746c 653d 2254 6865 206c 6f67 6769 title=\"The loggi\n-001b1e90: 6e67 2070 6c75 6769 6e20 7265 6769 7374 ng plugin regist\n-001b1ea0: 7261 7469 6f6e 2066 756e 6374 696f 6e2e ration function.\n-001b1eb0: 223e 6c6f 6767 696e 673c 2f61 3e3c 2f63 \">logging plugin can \n-001b1ed0: 6265 2075 7365 6420 746f 2073 656c 6563 be used to selec\n-001b1ee0: 7469 7665 6c79 206c 6f67 2069 6e62 6f75 tively log inbou\n-001b1ef0: 6e64 2061 6e64 206f 7574 626f 756e 6420 nd and outbound \n-001b1f00: 6d65 7373 6167 6573 2074 6f20 6120 6669 messages to a fi\n-001b1f10: 6c65 206f 7220 7374 7265 616d 2e20 4974 le or stream. It\n-001b1f20: 2061 6c73 6f20 6b65 6570 7320 6163 6365 also keeps acce\n-001b1f30: 7373 2073 7461 7469 7374 6963 7320 746f ss statistics to\n-001b1f40: 206c 6f67 2074 6865 2074 6f74 616c 206e log the total n\n-001b1f50: 756d 6265 7220 6f66 2062 7974 6573 2073 umber of bytes s\n-001b1f60: 656e 7420 616e 6420 7265 6365 6976 6564 ent and received\n-001b1f70: 2e3c 2f70 3e0a 3c70 3e54 6f20 7573 6520 .

    .

    To use \n-001b1f80: 7468 6520 706c 7567 696e 2c20 636f 6d70 the plugin, comp\n-001b1f90: 696c 6520 616e 6420 6c69 6e6b 2079 6f75 ile and link you\n-001b1fa0: 7220 6170 706c 6963 6174 696f 6e20 7769 r application wi\n-001b1fb0: 7468 203c 656d 3e3c 636f 6465 3e6c 6f67 th log\n-001b1fc0: 6769 6e67 2e63 3c2f 636f 6465 3e3c 2f65 ging.c located in th\n-001b1fe0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n-001b1ff0: 702f 706c 7567 696e 3c2f 636f 6465 3e3c p/plugin<\n-001b2000: 2f65 6d3e 2064 6972 6563 746f 7279 206f /em> directory o\n-001b2010: 6620 7468 6520 6753 4f41 5020 7061 636b f the gSOAP pack\n-001b2020: 6167 652e 2054 6f20 656e 6162 6c65 2074 age. To enable t\n-001b2030: 6865 2070 6c75 6769 6e20 696e 2079 6f75 he plugin in you\n-001b2040: 7220 636f 6465 2c20 7265 6769 7374 6572 r code, register\n-001b2050: 2074 6865 2070 6c75 6769 6e20 616e 6420 the plugin and \n-001b2060: 7365 7420 7468 6520 7374 7265 616d 7320 set the streams \n-001b2070: 6173 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a as follows:

    .\n-001b2080: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n-001b20d0: 743b 6c6f 6767 696e 672e 6826 7175 6f74 t;logging.h"\n-001b20e0: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    .\n+001b1a30: 3c73 7061 6e20 636c 6173 733d 226b 6579 class ns__data : public xsd__anyType.
    { p\n+001b1ac0: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    xsd__a\n+001b1af0: 6e79 5479 7065 2a20 666f 6f3b 2020 2020 nyType* foo; \n+001b1b00: 2020 2020 2020 2020 2020 2020 3c73 7061 // Store <f\n+001b1b30: 6f6f 2667 743b 2065 6c65 6d65 6e74 2069 oo> element i\n+001b1b40: 6e20 444f 4d20 736f 6170 5f64 6f6d 5f65 n DOM soap_dom_e\n+001b1b50: 6c65 6d65 6e74 3c2f 7370 616e 3e3c 2f64 lement.
    xsd__a\n+001b1b80: 6e79 5479 7065 205f 5f61 6e79 3b20 2020 nyType __any; \n+001b1b90: 2020 2020 2020 2020 2020 2020 3c73 7061 // Store any e\n+001b1bc0: 6c65 6d65 6e74 2063 6f6e 7465 6e74 2069 lement content i\n+001b1bd0: 6e20 444f 4d20 736f 6170 5f64 6f6d 5f65 n DOM soap_dom_e\n+001b1be0: 6c65 6d65 6e74 3c2f 7370 616e 3e3c 2f64 lement.
    @ xsd__a\n+001b1c10: 6e79 4174 7472 6962 7574 6520 5f5f 616e nyAttribute __an\n+001b1c20: 7941 7474 7269 6275 7465 3b20 3c73 7061 yAttribute; // Store anyAt\n+001b1c50: 7472 6962 7574 6520 636f 6e74 656e 7420 tribute content \n+001b1c60: 696e 2044 4f4d 2073 6f61 705f 646f 6d5f in DOM soap_dom_\n+001b1c70: 6174 7472 6962 7574 6520 6c69 6e6b 6564 attribute linked\n+001b1c80: 206e 6f64 6520 7374 7275 6374 7572 653c node structure<\n+001b1c90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+001b1cb0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+001b1cd0: 703e 546f 206d 616e 6970 756c 6174 6520 p>To manipulate \n+001b1ce0: 7468 6520 444f 4d20 656c 656d 656e 7473 the DOM elements\n+001b1cf0: 2061 6e64 2061 7474 7269 6275 7465 7320 and attributes \n+001b1d00: 7765 2075 7365 2074 6865 2044 4f4d 2041 we use the DOM A\n+001b1d10: 5049 2066 756e 6374 696f 6e73 2064 6f63 PI functions doc\n+001b1d20: 756d 656e 7465 6420 696e 2074 6865 2067 umented in the g\n+001b1d30: 534f 4150 203c 6120 6872 6566 3d22 2e2e SOAP XML DOM\n+001b1d60: 2041 5049 2064 6f63 756d 656e 7461 7469 API documentati\n+001b1d70: 6f6e 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 on.

    .

    .\n+001b1d80: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n+001b1d90: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n+001b1da0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .\n+001b1de0: 5468 6520 6d65 7373 6167 6520 6c6f 6767 The message logg\n+001b1df0: 696e 6720 706c 7567 696e 3c2f 6833 3e0a ing plugin

    .\n+001b1e00: 3c70 3e54 6865 206d 6573 7361 6765 203c

    The message <\n+001b1e10: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>logging<\n+001b1ea0: 2f61 3e3c 2f63 6f64 653e 2070 6c75 6769 /a> plugi\n+001b1eb0: 6e20 6361 6e20 6265 2075 7365 6420 746f n can be used to\n+001b1ec0: 2073 656c 6563 7469 7665 6c79 206c 6f67 selectively log\n+001b1ed0: 2069 6e62 6f75 6e64 2061 6e64 206f 7574 inbound and out\n+001b1ee0: 626f 756e 6420 6d65 7373 6167 6573 2074 bound messages t\n+001b1ef0: 6f20 6120 6669 6c65 206f 7220 7374 7265 o a file or stre\n+001b1f00: 616d 2e20 4974 2061 6c73 6f20 6b65 6570 am. It also keep\n+001b1f10: 7320 6163 6365 7373 2073 7461 7469 7374 s access statist\n+001b1f20: 6963 7320 746f 206c 6f67 2074 6865 2074 ics to log the t\n+001b1f30: 6f74 616c 206e 756d 6265 7220 6f66 2062 otal number of b\n+001b1f40: 7974 6573 2073 656e 7420 616e 6420 7265 ytes sent and re\n+001b1f50: 6365 6976 6564 2e3c 2f70 3e0a 3c70 3e54 ceived.

    .

    T\n+001b1f60: 6f20 7573 6520 7468 6520 706c 7567 696e o use the plugin\n+001b1f70: 2c20 636f 6d70 696c 6520 616e 6420 6c69 , compile and li\n+001b1f80: 6e6b 2079 6f75 7220 6170 706c 6963 6174 nk your applicat\n+001b1f90: 696f 6e20 7769 7468 203c 656d 3e3c 636f ion with logging.c located\n+001b1fc0: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/plugin direc\n+001b1ff0: 746f 7279 206f 6620 7468 6520 6753 4f41 tory of the gSOA\n+001b2000: 5020 7061 636b 6167 652e 2054 6f20 656e P package. To en\n+001b2010: 6162 6c65 2074 6865 2070 6c75 6769 6e20 able the plugin \n+001b2020: 696e 2079 6f75 7220 636f 6465 2c20 7265 in your code, re\n+001b2030: 6769 7374 6572 2074 6865 2070 6c75 6769 gister the plugi\n+001b2040: 6e20 616e 6420 7365 7420 7468 6520 7374 n and set the st\n+001b2050: 7265 616d 7320 6173 2066 6f6c 6c6f 7773 reams as follows\n+001b2060: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ\n+001b20b0: 6520 2671 756f 743b 6c6f 6767 696e 672e e "logging.\n+001b20c0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n+001b20d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n 001b20f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    struct \n-001b2140: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001b2170: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001b21a0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n-001b2200: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
    .\n-001b2220: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n-001b2240: 3c2f 7370 616e 3e20 6279 7465 735f 696e bytes_in\n-001b2250: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    size_t bytes_out; .
    if (\n-001b2330: 736f 6170 5f72 6567 6973 7465 725f 706c soap_register_pl\n-001b2340: 7567 696e 3c2f 613e 283c 6120 636c 6173 ugin(\n-001b2370: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, log\n-001b23d0: 6769 6e67 3c2f 613e 2929 203c 2f64 6976 ging)) .
    ... \n-001b2410: 2f2f 2066 6169 6c65 6420 746f 2072 6567 // failed to reg\n-001b2420: 6973 7465 7220 3c2f 7370 616e 3e3c 2f64 ister .
    ... \n-001b2460: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    .\n-001b2470: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_set_lo\n-001b24e0: 6767 696e 675f 696e 626f 756e 643c 2f61 gging_inbound(soap, stdout); ..
    ... // process me\n-001b2630: 7373 6167 6573 3c2f 7370 616e 3e3c 2f64 ssages.
    soap_se\n-001b26b0: 745f 6c6f 6767 696e 675f 696e 626f 756e t_logging_inboun\n-001b26c0: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa\n-001b26f0: 703c 2f61 3e2c 204e 554c 4c29 3b20 3c73 p, NULL); // disable l\n-001b2720: 6f67 6769 6e67 203c 2f73 7061 6e3e 3c2f ogging .
    soap_s\n-001b27a0: 6574 5f6c 6f67 6769 6e67 5f6f 7574 626f et_logging_outbo\n-001b27b0: 756e 643c 2f61 3e28 3c61 2063 6c61 7373 und(s\n-001b27e0: 6f61 703c 2f61 3e2c 204e 554c 4c29 3b20 oap, NULL); \n-001b27f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // disable\n-001b2810: 206c 6f67 6769 6e67 203c 2f73 7061 6e3e logging \n-001b2820: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    ... \n-001b2910: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n-001b2930: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n-001b29f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n-001b2ac0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_se\n-001b2ae0: 745f 6c6f 6767 696e 675f 6f75 7462 6f75 t_logging_outbou\n-001b2af0: 6e64 2873 7472 7563 7420 736f 6170 202a nd(struct soap *\n-001b2b00: 736f 6170 2c20 4649 4c45 202a 6664 293c soap, FILE *fd)<\n-001b2b10: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Specify \n-001b2b30: 6f75 7462 6f75 6e64 206d 6573 7361 6765 outbound message\n-001b2b40: 206c 6f67 6769 6e67 2077 6974 6820 7468 logging with th\n-001b2b50: 6520 6c6f 6767 696e 6720 706c 7567 696e e logging plugin\n-001b2b60: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .void soap_reset\n-001b2c60: 5f6c 6f67 6769 6e67 5f73 7461 7473 2873 _logging_stats(s\n-001b2c70: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001b2c80: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Reset \n-001b2ca0: 6d65 7373 6167 696e 6720 7374 6174 6973 messaging statis\n-001b2cb0: 7469 6373 2077 6974 6820 7468 6520 6c6f tics with the lo\n-001b2cc0: 6767 696e 6720 706c 7567 696e 2e3c 2f64 gging plugin.
    .
    soap_logg\n-001b2d90: 696e 675f 7374 6174 733c 2f61 3e3c 2f64 ing_stats
    void soap\n-001b2dc0: 5f6c 6f67 6769 6e67 5f73 7461 7473 2873 _logging_stats(s\n-001b2dd0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001b2de0: 2c20 7369 7a65 5f74 202a 7365 6e74 2c20 , size_t *sent, \n-001b2df0: 7369 7a65 5f74 202a 7265 6376 293c 2f64 size_t *recv)
    Collect me\n-001b2e20: 7373 6167 696e 6720 7374 6174 6973 7469 ssaging statisti\n-001b2e30: 6373 2077 6974 6820 7468 6520 6c6f 6767 cs with the logg\n-001b2e40: 696e 6720 706c 7567 696e 2e3c 2f64 6976 ing plugin.
    .
    <\n-001b2ec0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-001b2ed0: 726f 7570 5f5f 6465 6275 672e 6874 6d6c roup__debug.html\n-001b2ee0: 2367 6161 3034 6233 6236 3363 3862 6134 #gaa04b3b63c8ba4\n-001b2ef0: 3764 6135 3637 3366 6261 6665 3338 3565 7da5673fbafe385e\n-001b2f00: 3961 6422 3e73 6f61 705f 7365 745f 6c6f 9ad\">soap_set_lo\n-001b2f10: 6767 696e 675f 696e 626f 756e 643c 2f61 gging_inbound
    void \n-001b2f40: 736f 6170 5f73 6574 5f6c 6f67 6769 6e67 soap_set_logging\n-001b2f50: 5f69 6e62 6f75 6e64 2873 7472 7563 7420 _inbound(struct \n-001b2f60: 736f 6170 202a 736f 6170 2c20 4649 4c45 soap *soap, FILE\n-001b2f70: 202a 6664 293c 2f64 6976 3e3c 6469 7620 *fd)
    Sp\n-001b2f90: 6563 6966 7920 696e 626f 756e 6420 6d65 ecify inbound me\n-001b2fa0: 7373 6167 6520 6c6f 6767 696e 6720 7769 ssage logging wi\n-001b2fb0: 7468 2074 6865 206c 6f67 6769 6e67 2070 th the logging p\n-001b2fc0: 6c75 6769 6e2e 3c2f 6469 763e 3c2f 6469 lugin.
    .
    \n-001b3080: 6c6f 6767 696e 673c 2f61 3e3c 2f64 6976 logging
    int logging\n-001b30b0: 2873 7472 7563 7420 736f 6170 202a 2c20 (struct soap *, \n-001b30c0: 7374 7275 6374 2073 6f61 705f 706c 7567 struct soap_plug\n-001b30d0: 696e 202a 2c20 766f 6964 202a 293c 2f64 in *, void *)
    The loggin\n-001b3100: 6720 706c 7567 696e 2072 6567 6973 7472 g plugin registr\n-001b3110: 6174 696f 6e20 6675 6e63 7469 6f6e 2e3c ation function.<\n-001b3120: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    If you use\n-001b3150: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_copy<\n-001b3210: 2f63 6f64 653e 2074 6f20 636f 7079 2074 /code> to copy t\n-001b3220: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context wit\n-001b3290: 6820 7468 6520 706c 7567 696e 2c20 7468 h the plugin, th\n-001b32a0: 6520 706c 7567 696e 2773 2073 7461 7465 e plugin's state\n-001b32b0: 2077 696c 6c20 6265 2073 6861 7265 6420 will be shared \n-001b32c0: 6279 2074 6865 2063 6f70 792e 2054 6865 by the copy. The\n-001b32d0: 2070 6c75 6769 6e20 6973 2074 6872 6561 plugin is threa\n-001b32e0: 642d 7361 6665 2c20 6275 7420 646f 6573 d-safe, but does\n-001b32f0: 206e 6f74 2075 7365 2061 206c 6f63 6b20 not use a lock \n-001b3300: 746f 2070 726f 7465 6374 2074 6865 2069 to protect the i\n-001b3310: 6e74 6572 6e61 6c20 7374 6174 6973 7469 nternal statisti\n-001b3320: 6373 2063 6f75 6e74 6572 7320 746f 2065 cs counters to e\n-001b3330: 6e73 7572 6520 7468 6520 7370 6565 6420 nsure the speed \n-001b3340: 6f66 206d 6573 7361 6769 6e67 2069 7320 of messaging is \n-001b3350: 6e6f 7420 636f 6d70 726f 6d69 7365 642c not compromised,\n-001b3360: 206d 6561 6e69 6e67 2074 6861 7420 796f meaning that yo\n-001b3370: 7520 7368 6f75 6c64 206e 6f74 2066 756c u should not ful\n-001b3380: 6c79 2072 656c 7920 6f6e 2074 6865 2073 ly rely on the s\n-001b3390: 7461 7469 7374 6963 7320 746f 2062 6520 tatistics to be \n-001b33a0: 3130 3025 2061 6363 7572 6174 6520 666f 100% accurate fo\n-001b33b0: 7220 6d75 6c74 692d 7468 7265 6164 6564 r multi-threaded\n-001b33c0: 2073 6572 7669 6365 732e 3c2f 703e 0a3c services.

    .<\n-001b33d0: 703e 5365 6520 616c 736f 203c 636f 6465 p>See also logging<\n-001b3470: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3ef0 /code>.

    .

    .\n-001b3480: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-001b3490: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-001b34a0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .RESTful serve\n-001b34f0: 722d 7369 6465 2041 5049 2077 6974 6820 r-side API with \n-001b3500: 7468 6520 4854 5450 2047 4554 2070 6c75 the HTTP GET plu\n-001b3510: 6769 6e3c 2f68 333e 0a3c 703e 5365 7276 gin

    .

    Serv\n-001b3520: 6572 2d73 6964 6520 7573 6520 6f66 2052 er-side use of R\n-001b3530: 4553 5466 756c 2048 5454 5020 4745 5420 ESTful HTTP GET \n-001b3540: 6f70 6572 6174 696f 6e73 2069 7320 7375 operations is su\n-001b3550: 7070 6f72 7465 6420 7769 7468 2074 6865 pported with the\n-001b3560: 203c 636f 6465 3e3c 6120 636c 6173 733d http_get\n-001b35f0: 3c2f 613e 3c2f 636f 6465 3e20 4854 5450 HTTP\n-001b3600: 2047 4554 2070 6c75 6769 6e20 3c65 6d3e GET plugin \n-001b3610: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug\n-001b3620: 696e 2f68 7474 7067 6574 2e63 3c2f 636f in/httpget.c.

    .The HTTP GET pl\n-001b3650: 7567 696e 2061 6c6c 6f77 7320 796f 7572 ugin allows your\n-001b3660: 2073 6572 7665 7220 746f 2068 616e 646c server to handl\n-001b3670: 6520 5245 5354 6675 6c20 4854 5450 2047 e RESTful HTTP G\n-001b3680: 4554 2072 6571 7565 7374 7320 616e 6420 ET requests and \n-001b3690: 6174 2074 6865 2073 616d 6520 7469 6d65 at the same time\n-001b36a0: 2073 7469 6c6c 2073 6572 7665 2053 4f41 still serve SOA\n-001b36b0: 502d 6261 7365 6420 504f 5354 2072 6571 P-based POST req\n-001b36c0: 7565 7374 732e 2054 6865 2070 6c75 6769 uests. The plugi\n-001b36d0: 6e20 7072 6f76 6964 6573 2073 7570 706f n provides suppo\n-001b36e0: 7274 2074 6f20 636c 6965 6e74 2061 7070 rt to client app\n-001b36f0: 6c69 6361 7469 6f6e 7320 746f 2069 7373 lications to iss\n-001b3700: 7565 2048 5454 5020 4745 5420 6f70 6572 ue HTTP GET oper\n-001b3710: 6174 696f 6e73 2074 6f20 6120 7365 7276 ations to a serv\n-001b3720: 6572 2e3c 2f70 3e0a 3c70 3e4e 6f74 6520 er.

    .

    Note \n-001b3730: 7468 6174 2048 5454 5020 4745 5420 7265 that HTTP GET re\n-001b3740: 7175 6573 7473 2063 616e 2061 6c73 6f20 quests can also \n-001b3750: 6265 2068 616e 646c 6564 2061 7420 7468 be handled at th\n-001b3760: 6520 7365 7276 6572 2073 6964 6520 7769 e server side wi\n-001b3770: 7468 2074 6865 203c 636f 6465 3e3c 6120 th the s\n-001b3840: 6f61 703a 3a66 6765 743c 2f61 3e3c 2f63 oap::fget callback, s\n-001b3860: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Function cal\n-001b38a0: 6c62 6163 6b73 2066 6f72 2063 7573 746f lbacks for custo\n-001b38b0: 6d69 7a65 6420 492f 4f20 616e 6420 4854 mized I/O and HT\n-001b38c0: 5450 2068 616e 646c 696e 673c 2f61 3e20 TP handling \n-001b38d0: 2e20 486f 7765 7665 722c 2074 6865 2048 . However, the H\n-001b38e0: 5454 5020 4745 5420 706c 7567 696e 2061 TTP GET plugin a\n-001b38f0: 6c73 6f20 6b65 6570 7320 7374 6174 6973 lso keeps statis\n-001b3900: 7469 6373 206f 6e20 7468 6520 6e75 6d62 tics on the numb\n-001b3910: 6572 206f 6620 7375 6363 6573 7366 756c er of successful\n-001b3920: 2050 4f53 5420 616e 6420 4745 5420 6578 POST and GET ex\n-001b3930: 6368 616e 6765 7320 616e 6420 6661 696c changes and fail\n-001b3940: 6564 206f 7065 7261 7469 6f6e 7320 2848 ed operations (H\n-001b3950: 5454 5020 6661 756c 7473 2c20 534f 4150 TTP faults, SOAP\n-001b3960: 2046 6175 6c74 732c 2065 7463 2e29 2e20 Faults, etc.). \n-001b3970: 4974 2061 6c73 6f20 6b65 6570 7320 6869 It also keeps hi\n-001b3980: 7420 6869 7374 6f67 7261 6d73 2061 6363 t histograms acc\n-001b3990: 756d 756c 6174 6564 2066 6f72 2075 7020 umulated for up \n-001b39a0: 746f 2061 2079 6561 7220 6f66 2072 756e to a year of run\n-001b39b0: 6e69 6e67 2074 696d 652e 3c2f 703e 0a3c ning time.

    .<\n-001b39c0: 703e 546f 2075 7365 2074 6865 203c 636f p>To use the http_get\n-001b3a60: 3c2f 636f 6465 3e20 706c 7567 696e 2c20 plugin, \n-001b3a70: 636f 6d70 696c 6520 616e 6420 6c69 6e6b compile and link\n-001b3a80: 2079 6f75 7220 6170 706c 6963 6174 696f your applicatio\n-001b3a90: 6e20 7769 7468 203c 656d 3e3c 636f 6465 n with httpget.c located i\n-001b3ac0: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n-001b3ad0: 6773 6f61 702f 706c 7567 696e 3c2f 636f gsoap/plugin directo\n-001b3af0: 7279 206f 6620 7468 6520 6753 4f41 5020 ry of the gSOAP \n-001b3b00: 7061 636b 6167 652e 2054 6f20 656e 6162 package. To enab\n-001b3b10: 6c65 2074 6865 2070 6c75 6769 6e20 696e le the plugin in\n-001b3b20: 2079 6f75 7220 636f 6465 2c20 7265 6769 your code, regi\n-001b3b30: 7374 6572 2074 6865 2070 6c75 6769 6e20 ster the plugin \n-001b3b40: 7769 7468 2079 6f75 7220 4854 5450 2047 with your HTTP G\n-001b3b50: 4554 2068 616e 646c 6572 2066 756e 6374 ET handler funct\n-001b3b60: 696f 6e20 6173 2066 6f6c 6c6f 7773 3a3c ion as follows:<\n-001b3b70: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    #include \n-001b3bc0: 2671 756f 743b 6874 7470 6765 742e 6826 "httpget.h&\n-001b3bd0: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;struct <\n+001b2120: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+001b2150: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001b2180: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n+001b21e0: 6170 5f6e 6577 3c2f 613e 2829 3b3c 2f64 ap_new();.
    \n+001b2220: 7369 7a65 5f74 3c2f 7370 616e 3e20 6279 size_t by\n+001b2230: 7465 735f 696e 3b20 3c2f 6469 763e 0a3c tes_in;
    .<\n+001b2240: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b2250: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >size_\n+001b2270: 743c 2f73 7061 6e3e 2062 7974 6573 5f6f t bytes_o\n+001b2280: 7574 3b20 3c2f 6469 763e 0a3c 6469 7620 ut;
    .
    if\n+001b22c0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_regis\n+001b2320: 7465 725f 706c 7567 696e 3c2f 613e 283c ter_plugin(<\n+001b2330: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b2340: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b2350: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001b2360: 3c61 2063 6c61 7373 3d22 636f 6465 2220 logging))\n+001b23c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... \n+001b23e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // failed \n+001b2400: 746f 2072 6567 6973 7465 7220 3c2f 7370 to register
    .
    ... \n+001b2430: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n+001b2450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>....\n+001b25f0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // proc\n+001b2610: 6573 7320 6d65 7373 6167 6573 3c2f 7370 ess messages
    .
    s\n+001b2690: 6f61 705f 7365 745f 6c6f 6767 696e 675f oap_set_logging_\n+001b26a0: 696e 626f 756e 643c 2f61 3e28 3c61 2063 inbound(soap, NUL\n+001b26e0: 4c29 3b20 3c73 7061 6e20 636c 6173 733d L); // dis\n+001b2700: 6162 6c65 206c 6f67 6769 6e67 203c 2f73 able logging
    .
    \n+001b2780: 736f 6170 5f73 6574 5f6c 6f67 6769 6e67 soap_set_logging\n+001b2790: 5f6f 7574 626f 756e 643c 2f61 3e28 3c61 _outbound(soap, N\n+001b27d0: 554c 4c29 3b20 3c73 7061 6e20 636c 6173 ULL); // d\n+001b27f0: 6973 6162 6c65 206c 6f67 6769 6e67 203c isable logging <\n+001b2800: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001b2820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b2830: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b2840: 705f 5f64 6562 7567 2e68 746d 6c23 6761 p__debug.html#ga\n+001b2850: 3632 3862 6663 3462 3761 3662 6134 6265 628bfc4b7a6ba4be\n+001b2860: 6632 3362 6561 3437 3837 6566 3566 3564 f23bea4787ef5f5d\n+001b2870: 223e 736f 6170 5f6c 6f67 6769 6e67 5f73 \">soap_logging_s\n+001b2880: 7461 7473 3c2f 613e 283c 6120 636c 6173 tats(\n+001b28b0: 736f 6170 3c2f 613e 2c20 2661 6d70 3b62 soap, &b\n+001b28c0: 7974 6573 5f6f 7574 2c20 2661 6d70 3b62 ytes_out, &b\n+001b28d0: 7974 6573 5f69 6e29 3b3c 2f64 6976 3e0a ytes_in);
    .\n+001b28e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //
    .soap_reset_logg\n+001b2990: 696e 675f 7374 6174 733c 2f61 3e28 3c61 ing_stats(soap);<\n+001b29d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_logg\n+001b2a90: 696e 675f 6f75 7462 6f75 6e64 3c2f 613e ing_outbound\n+001b2aa0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s\n+001b2ac0: 6f61 705f 7365 745f 6c6f 6767 696e 675f oap_set_logging_\n+001b2ad0: 6f75 7462 6f75 6e64 2873 7472 7563 7420 outbound(struct \n+001b2ae0: 736f 6170 202a 736f 6170 2c20 4649 4c45 soap *soap, FILE\n+001b2af0: 202a 6664 293c 2f64 6976 3e3c 6469 7620 *fd)
    Sp\n+001b2b10: 6563 6966 7920 6f75 7462 6f75 6e64 206d ecify outbound m\n+001b2b20: 6573 7361 6765 206c 6f67 6769 6e67 2077 essage logging w\n+001b2b30: 6974 6820 7468 6520 6c6f 6767 696e 6720 ith the logging \n+001b2b40: 706c 7567 696e 2e3c 2f64 6976 3e3c 2f64 plugin.
    .
    soap_reset_logg\n+001b2c10: 696e 675f 7374 6174 733c 2f61 3e3c 2f64 ing_stats
    void soap\n+001b2c40: 5f72 6573 6574 5f6c 6f67 6769 6e67 5f73 _reset_logging_s\n+001b2c50: 7461 7473 2873 7472 7563 7420 736f 6170 tats(struct soap\n+001b2c60: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    \n+001b2c80: 5265 7365 7420 6d65 7373 6167 696e 6720 Reset messaging \n+001b2c90: 7374 6174 6973 7469 6373 2077 6974 6820 statistics with \n+001b2ca0: 7468 6520 6c6f 6767 696e 6720 706c 7567 the logging plug\n+001b2cb0: 696e 2e3c 2f64 6976 3e3c 2f64 6976 3e0a in.
    .\n+001b2cc0: 3c64 6976 2063 6c61 7373 3d22 7474 6322 .void soap_set_l\n+001b2f30: 6f67 6769 6e67 5f69 6e62 6f75 6e64 2873 ogging_inbound(s\n+001b2f40: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+001b2f50: 2c20 4649 4c45 202a 6664 293c 2f64 6976 , FILE *fd)
    Specify inbo\n+001b2f80: 756e 6420 6d65 7373 6167 6520 6c6f 6767 und message logg\n+001b2f90: 696e 6720 7769 7468 2074 6865 206c 6f67 ing with the log\n+001b2fa0: 6769 6e67 2070 6c75 6769 6e2e 3c2f 6469 ging plugin.
    .
    \n+001b3020: 3c61 2068 7265 663d 2267 726f 7570 5f5f logging
    .

    If y\n+001b3130: 6f75 2075 7365 203c 636f 6465 3e3c 6120 ou use soap_cop\n+001b31f0: 793c 2f61 3e3c 2f63 6f64 653e 2074 6f20 y to \n+001b3200: 636f 7079 2074 6865 203c 636f 6465 3e3c copy the <\n+001b3210: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001b3220: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+001b3230: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n+001b3240: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n+001b3250: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n+001b3260: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n+001b3270: 7874 2077 6974 6820 7468 6520 706c 7567 xt with the plug\n+001b3280: 696e 2c20 7468 6520 706c 7567 696e 2773 in, the plugin's\n+001b3290: 2073 7461 7465 2077 696c 6c20 6265 2073 state will be s\n+001b32a0: 6861 7265 6420 6279 2074 6865 2063 6f70 hared by the cop\n+001b32b0: 792e 2054 6865 2070 6c75 6769 6e20 6973 y. The plugin is\n+001b32c0: 2074 6872 6561 642d 7361 6665 2c20 6275 thread-safe, bu\n+001b32d0: 7420 646f 6573 206e 6f74 2075 7365 2061 t does not use a\n+001b32e0: 206c 6f63 6b20 746f 2070 726f 7465 6374 lock to protect\n+001b32f0: 2074 6865 2069 6e74 6572 6e61 6c20 7374 the internal st\n+001b3300: 6174 6973 7469 6373 2063 6f75 6e74 6572 atistics counter\n+001b3310: 7320 746f 2065 6e73 7572 6520 7468 6520 s to ensure the \n+001b3320: 7370 6565 6420 6f66 206d 6573 7361 6769 speed of messagi\n+001b3330: 6e67 2069 7320 6e6f 7420 636f 6d70 726f ng is not compro\n+001b3340: 6d69 7365 642c 206d 6561 6e69 6e67 2074 mised, meaning t\n+001b3350: 6861 7420 796f 7520 7368 6f75 6c64 206e hat you should n\n+001b3360: 6f74 2066 756c 6c79 2072 656c 7920 6f6e ot fully rely on\n+001b3370: 2074 6865 2073 7461 7469 7374 6963 7320 the statistics \n+001b3380: 746f 2062 6520 3130 3025 2061 6363 7572 to be 100% accur\n+001b3390: 6174 6520 666f 7220 6d75 6c74 692d 7468 ate for multi-th\n+001b33a0: 7265 6164 6564 2073 6572 7669 6365 732e readed services.\n+001b33b0: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

    .

    See also\n+001b33c0: 203c 636f 6465 3e3c 6120 636c 6173 733d loggin\n+001b3450: 673c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 g..

    .... Back to ta\n+001b3480: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n+001b3490: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

    .

    .RESTful\n+001b34d0: 2073 6572 7665 722d 7369 6465 2041 5049 server-side API\n+001b34e0: 2077 6974 6820 7468 6520 4854 5450 2047 with the HTTP G\n+001b34f0: 4554 2070 6c75 6769 6e3c 2f68 333e 0a3c ET plugin

    .<\n+001b3500: 703e 5365 7276 6572 2d73 6964 6520 7573 p>Server-side us\n+001b3510: 6520 6f66 2052 4553 5466 756c 2048 5454 e of RESTful HTT\n+001b3520: 5020 4745 5420 6f70 6572 6174 696f 6e73 P GET operations\n+001b3530: 2069 7320 7375 7070 6f72 7465 6420 7769 is supported wi\n+001b3540: 7468 2074 6865 203c 636f 6465 3e3c 6120 th the ht\n+001b35d0: 7470 5f67 6574 3c2f 613e 3c2f 636f 6465 tp_get HTTP GET plugi\n+001b35f0: 6e20 3c65 6d3e 3c63 6f64 653e 6773 6f61 n gsoa\n+001b3600: 702f 706c 7567 696e 2f68 7474 7067 6574 p/plugin/httpget\n+001b3610: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c .c.<\n+001b3620: 2f70 3e0a 3c70 3e54 6865 2048 5454 5020 /p>.

    The HTTP \n+001b3630: 4745 5420 706c 7567 696e 2061 6c6c 6f77 GET plugin allow\n+001b3640: 7320 796f 7572 2073 6572 7665 7220 746f s your server to\n+001b3650: 2068 616e 646c 6520 5245 5354 6675 6c20 handle RESTful \n+001b3660: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request\n+001b3670: 7320 616e 6420 6174 2074 6865 2073 616d s and at the sam\n+001b3680: 6520 7469 6d65 2073 7469 6c6c 2073 6572 e time still ser\n+001b3690: 7665 2053 4f41 502d 6261 7365 6420 504f ve SOAP-based PO\n+001b36a0: 5354 2072 6571 7565 7374 732e 2054 6865 ST requests. The\n+001b36b0: 2070 6c75 6769 6e20 7072 6f76 6964 6573 plugin provides\n+001b36c0: 2073 7570 706f 7274 2074 6f20 636c 6965 support to clie\n+001b36d0: 6e74 2061 7070 6c69 6361 7469 6f6e 7320 nt applications \n+001b36e0: 746f 2069 7373 7565 2048 5454 5020 4745 to issue HTTP GE\n+001b36f0: 5420 6f70 6572 6174 696f 6e73 2074 6f20 T operations to \n+001b3700: 6120 7365 7276 6572 2e3c 2f70 3e0a 3c70 a server.

    .Note that HTTP \n+001b3720: 4745 5420 7265 7175 6573 7473 2063 616e GET requests can\n+001b3730: 2061 6c73 6f20 6265 2068 616e 646c 6564 also be handled\n+001b3740: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s\n+001b3750: 6964 6520 7769 7468 2074 6865 203c 636f ide with the soap::fget<\n+001b3830: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a>
    callb\n+001b3840: 6163 6b2c 2073 6565 2053 6563 7469 6f6e ack, see Section\n+001b3850: 203c 6120 636c 6173 733d 2265 6c22 2068 Functi\n+001b3880: 6f6e 2063 616c 6c62 6163 6b73 2066 6f72 on callbacks for\n+001b3890: 2063 7573 746f 6d69 7a65 6420 492f 4f20 customized I/O \n+001b38a0: 616e 6420 4854 5450 2068 616e 646c 696e and HTTP handlin\n+001b38b0: 673c 2f61 3e20 2e20 486f 7765 7665 722c g . However,\n+001b38c0: 2074 6865 2048 5454 5020 4745 5420 706c the HTTP GET pl\n+001b38d0: 7567 696e 2061 6c73 6f20 6b65 6570 7320 ugin also keeps \n+001b38e0: 7374 6174 6973 7469 6373 206f 6e20 7468 statistics on th\n+001b38f0: 6520 6e75 6d62 6572 206f 6620 7375 6363 e number of succ\n+001b3900: 6573 7366 756c 2050 4f53 5420 616e 6420 essful POST and \n+001b3910: 4745 5420 6578 6368 616e 6765 7320 616e GET exchanges an\n+001b3920: 6420 6661 696c 6564 206f 7065 7261 7469 d failed operati\n+001b3930: 6f6e 7320 2848 5454 5020 6661 756c 7473 ons (HTTP faults\n+001b3940: 2c20 534f 4150 2046 6175 6c74 732c 2065 , SOAP Faults, e\n+001b3950: 7463 2e29 2e20 4974 2061 6c73 6f20 6b65 tc.). It also ke\n+001b3960: 6570 7320 6869 7420 6869 7374 6f67 7261 eps hit histogra\n+001b3970: 6d73 2061 6363 756d 756c 6174 6564 2066 ms accumulated f\n+001b3980: 6f72 2075 7020 746f 2061 2079 6561 7220 or up to a year \n+001b3990: 6f66 2072 756e 6e69 6e67 2074 696d 652e of running time.\n+001b39a0: 3c2f 703e 0a3c 703e 546f 2075 7365 2074

    .

    To use t\n+001b39b0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_g\n+001b3a40: 6574 3c2f 613e 3c2f 636f 6465 3e20 706c et pl\n+001b3a50: 7567 696e 2c20 636f 6d70 696c 6520 616e ugin, compile an\n+001b3a60: 6420 6c69 6e6b 2079 6f75 7220 6170 706c d link your appl\n+001b3a70: 6963 6174 696f 6e20 7769 7468 203c 656d ication with httpget.c\n+001b3a90: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6f63 loc\n+001b3aa0: 6174 6564 2069 6e20 7468 6520 3c65 6d3e ated in the \n+001b3ab0: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug\n+001b3ac0: 696e 3c2f 636f 6465 3e3c 2f65 6d3e 2064 in d\n+001b3ad0: 6972 6563 746f 7279 206f 6620 7468 6520 irectory of the \n+001b3ae0: 6753 4f41 5020 7061 636b 6167 652e 2054 gSOAP package. T\n+001b3af0: 6f20 656e 6162 6c65 2074 6865 2070 6c75 o enable the plu\n+001b3b00: 6769 6e20 696e 2079 6f75 7220 636f 6465 gin in your code\n+001b3b10: 2c20 7265 6769 7374 6572 2074 6865 2070 , register the p\n+001b3b20: 6c75 6769 6e20 7769 7468 2079 6f75 7220 lugin with your \n+001b3b30: 4854 5450 2047 4554 2068 616e 646c 6572 HTTP GET handler\n+001b3b40: 2066 756e 6374 696f 6e20 6173 2066 6f6c function as fol\n+001b3b50: 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 2063 lows:

    .
    \n+001b3b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+001b3ba0: 636c 7564 6520 2671 756f 743b 6874 7470 clude "http\n+001b3bb0: 6765 742e 6826 7175 6f74 3b3c 2f73 7061 get.h"
    .
    .
    .<\n-001b3c10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b3c20: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
    \n+001b3bf0: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine\">i\n+001b3c10: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main()\n+001b3c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n 001b3c40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-001b3c70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b3c80: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-001b3cf0: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-001b3d50: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    \n-001b3d60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001b3d90: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (so\n-001b3df0: 6170 5f72 6567 6973 7465 725f 706c 7567 ap_register_plug\n-001b3e00: 696e 5f61 7267 3c2f 613e 283c 6120 636c in_arg(soap, http\n-001b3e90: 5f67 6574 3c2f 613e 2c20 283c 7370 616e _get, (void\n-001b3ec0: 2a29 6d79 5f68 7474 705f 6765 745f 6861 *)my_http_get_ha\n-001b3ed0: 6e64 6c65 7229 2920 3c2f 6469 763e 0a3c ndler))
    .<\n-001b3ee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b3ef0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_pri\n-001b3f50: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st\n-001b3f90: 6465 7272 293b 203c 7370 616e 2063 6c61 derr); // \n-001b3fb0: 6661 696c 6564 2074 6f20 7265 6769 7374 failed to regist\n-001b3fc0: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
    \n-001b3fd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n-001b4000: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n-001b4010: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b4020: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n-001b4040: 3c2f 7370 616e 3e68 7474 705f 6765 745f http_get_\n-001b4050: 6461 7461 202a 6874 7470 6765 7464 6174 data *httpgetdat\n-001b4060: 613b 203c 2f64 6976 3e0a 3c64 6976 2063 a;
    .
    ht\n-001b4080: 7470 6765 7464 6174 6120 3d20 283c 7370 tpgetdata = (struct http_get_data*)\n-001b40c0: 736f 6170 5f6c 6f6f 6b75 705f 706c 7567 soap_lookup_plug\n-001b40d0: 696e 283c 6120 636c 6173 733d 2263 6f64 in(soap, http_get_id)\n-001b4110: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n-001b4150: 2028 2168 7474 7067 6574 6461 7461 2920 (!httpgetdata) \n-001b4160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n-001b4180: 203c 7370 616e 2063 6c61 7373 3d22 636f // if the\n-001b41a0: 2070 6c75 6769 6e20 7265 6769 7374 6572 plugin register\n-001b41b0: 6564 204f 4b2c 2074 6865 7265 2069 7320 ed OK, there is \n-001b41c0: 6365 7274 6169 6e6c 7920 6461 7461 2062 certainly data b\n-001b41d0: 7574 2063 616e 2623 3339 3b74 2068 7572 ut can't hur\n-001b41e0: 7420 746f 2063 6865 636b 203c 2f73 7061 t to check
    .
    ...\n-001b4210: 203c 7370 616e 2063 6c61 7373 3d22 636f // proces\n-001b4230: 7320 6d65 7373 6167 6573 3c2f 7370 616e s messages
    .
    size_t get_ok = htt\n-001b4290: 7067 6574 6461 7461 2d26 6774 3b73 7461 pgetdata->sta\n-001b42a0: 745f 6765 743b 203c 2f64 6976 3e0a 3c64 t_get;
    .\n-001b42c0: 2020 3c73 7061 6e20 636c 6173 733d 226b size\n-001b42e0: 5f74 3c2f 7370 616e 3e20 706f 7374 5f6f _t post_o\n-001b42f0: 6b20 3d20 6874 7470 6765 7464 6174 612d k = httpgetdata-\n-001b4300: 2667 743b 7374 6174 5f70 6f73 743b 203c >stat_post; <\n-001b4310: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t errors = httpg\n-001b4360: 6574 6461 7461 2d26 6774 3b73 7461 745f etdata->stat_\n-001b4370: 6661 696c 3b20 3c2f 6469 763e 0a3c 6469 fail;
    . \n-001b4390: 2074 696d 655f 7420 6e6f 7720 3d20 7469 time_t now = ti\n-001b43a0: 6d65 284e 554c 4c29 3b20 3c2f 6469 763e me(NULL);
    \n-001b43b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n-001b43e0: 7420 3c2f 7370 616e 3e74 6d20 2a54 3b20 t tm *T; \n-001b43f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    T = l\n-001b4410: 6f63 616c 7469 6d65 2826 616d 703b 6e6f ocaltime(&no\n-001b4420: 7729 3b20 3c2f 6469 763e 0a3c 6469 7620 w);
    .
    <\n-001b4440: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b4450: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n-001b4460: 2f73 7061 6e3e 2068 6974 7374 6869 736d /span> hitsthism\n-001b4470: 696e 7574 6520 3d20 6874 7470 6765 7464 inute = httpgetd\n-001b4480: 6174 612d 2667 743b 6869 7374 5f6d 696e ata->hist_min\n-001b4490: 5b54 2d26 6774 3b74 6d5f 6d69 6e5d 3b20 [T->tm_min]; \n-001b44a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t hitsthishour \n-001b44f0: 3d20 6874 7470 6765 7464 6174 612d 2667 = httpgetdata-&g\n-001b4500: 743b 6869 7374 5f68 6f75 725b 542d 2667 t;hist_hour[T-&g\n-001b4510: 743b 746d 5f68 6f75 725d 3b20 3c2f 6469 t;tm_hour]; .
    size_t h\n-001b4560: 6974 7374 6f64 6179 203d 2068 7474 7067 itstoday = httpg\n-001b4570: 6574 6461 7461 2d26 6774 3b68 6973 745f etdata->hist_\n-001b4580: 6461 795b 542d 2667 743b 746d 5f79 6461 day[T->tm_yda\n-001b4590: 795d 3b3c 2f64 6976 3e0a 3c64 6976 2063 y];
    .
    }.

    An\n-001b45d0: 2048 5454 5020 4745 5420 6861 6e64 6c65 HTTP GET handle\n-001b45e0: 7220 6361 6e20 7369 6d70 6c79 2070 726f r can simply pro\n-001b45f0: 6475 6365 2073 6f6d 6520 4854 4d4c 2063 duce some HTML c\n-001b4600: 6f6e 7465 6e74 2c20 6f72 2061 6e79 206f ontent, or any o\n-001b4610: 7468 6572 2074 7970 6520 6f66 2063 6f6e ther type of con\n-001b4620: 7465 6e74 2062 7920 7365 6e64 696e 6720 tent by sending \n-001b4630: 6461 7461 2075 7369 6e67 203c 636f 6465 data using soap_resp\n-001b46f0: 6f6e 7365 3c2f 613e 3c2f 636f 6465 3e3a onse:\n-001b4700: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int my_http_get_ha\n-001b4760: 6e64 6c65 7228 3c73 7061 6e20 636c 6173 ndler(stru\n-001b4780: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap) struc\n+001b3c70: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n+001b3ca0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new();\n+001b3d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+001b3d80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_registe\n+001b3de0: 725f 706c 7567 696e 5f61 7267 3c2f 613e r_plugin_arg\n+001b3df0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b3e20: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , http_get, \n+001b3e80: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void<\n+001b3ea0: 2f73 7061 6e3e 2a29 6d79 5f68 7474 705f /span>*)my_http_\n+001b3eb0: 6765 745f 6861 6e64 6c65 7229 2920 3c2f get_handler)) ..
    ... <\n+001b3fd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001b3fe0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    s\n+001b4020: 7472 7563 7420 3c2f 7370 616e 3e68 7474 truct htt\n+001b4030: 705f 6765 745f 6461 7461 202a 6874 7470 p_get_data *http\n+001b4040: 6765 7464 6174 613b 203c 2f64 6976 3e0a getdata;
    .\n+001b4050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .<\n+001b4100: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b4110: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+001b4130: 2f73 7061 6e3e 2028 2168 7474 7067 6574 /span> (!httpget\n+001b4140: 6461 7461 2920 3c2f 6469 763e 0a3c 6469 data)
    . \n+001b4160: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+001b4180: 6966 2074 6865 2070 6c75 6769 6e20 7265 if the plugin re\n+001b4190: 6769 7374 6572 6564 204f 4b2c 2074 6865 gistered OK, the\n+001b41a0: 7265 2069 7320 6365 7274 6169 6e6c 7920 re is certainly \n+001b41b0: 6461 7461 2062 7574 2063 616e 2623 3339 data but can'\n+001b41c0: 3b74 2068 7572 7420 746f 2063 6865 636b ;t hurt to check\n+001b41d0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001b41e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b41f0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n+001b4210: 7072 6f63 6573 7320 6d65 7373 6167 6573 process messages\n+001b4220: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001b4240: 2020 3c73 7061 6e20 636c 6173 733d 226b size\n+001b4260: 5f74 3c2f 7370 616e 3e20 6765 745f 6f6b _t get_ok\n+001b4270: 203d 2068 7474 7067 6574 6461 7461 2d26 = httpgetdata-&\n+001b4280: 6774 3b73 7461 745f 6765 743b 203c 2f64 gt;stat_get; .
    size_t \n+001b42d0: 706f 7374 5f6f 6b20 3d20 6874 7470 6765 post_ok = httpge\n+001b42e0: 7464 6174 612d 2667 743b 7374 6174 5f70 tdata->stat_p\n+001b42f0: 6f73 743b 203c 2f64 6976 3e0a 3c64 6976 ost;
    . \n+001b4310: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+001b4330: 3c2f 7370 616e 3e20 6572 726f 7273 203d errors =\n+001b4340: 2068 7474 7067 6574 6461 7461 2d26 6774 httpgetdata->\n+001b4350: 3b73 7461 745f 6661 696c 3b20 3c2f 6469 ;stat_fail; .
    time_t no\n+001b4380: 7720 3d20 7469 6d65 284e 554c 4c29 3b20 w = time(NULL); \n+001b4390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct t\n+001b43d0: 6d20 2a54 3b20 3c2f 6469 763e 0a3c 6469 m *T;
    . \n+001b43f0: 2054 203d 206c 6f63 616c 7469 6d65 2826 T = localtime(&\n+001b4400: 616d 703b 6e6f 7729 3b20 3c2f 6469 763e amp;now);
    \n+001b4410: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    s\n+001b4440: 697a 655f 743c 2f73 7061 6e3e 2068 6974 ize_t hit\n+001b4450: 7374 6869 736d 696e 7574 6520 3d20 6874 sthisminute = ht\n+001b4460: 7470 6765 7464 6174 612d 2667 743b 6869 tpgetdata->hi\n+001b4470: 7374 5f6d 696e 5b54 2d26 6774 3b74 6d5f st_min[T->tm_\n+001b4480: 6d69 6e5d 3b20 3c2f 6469 763e 0a3c 6469 min];
    . \n+001b44a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n+001b44c0: 743c 2f73 7061 6e3e 2068 6974 7374 6869 t hitsthi\n+001b44d0: 7368 6f75 7220 3d20 6874 7470 6765 7464 shour = httpgetd\n+001b44e0: 6174 612d 2667 743b 6869 7374 5f68 6f75 ata->hist_hou\n+001b44f0: 725b 542d 2667 743b 746d 5f68 6f75 725d r[T->tm_hour]\n+001b4500: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    size_t hitstoday =\n+001b4550: 2068 7474 7067 6574 6461 7461 2d26 6774 httpgetdata->\n+001b4560: 3b68 6973 745f 6461 795b 542d 2667 743b ;hist_day[T->\n+001b4570: 746d 5f79 6461 795d 3b3c 2f64 6976 3e0a tm_yday];
    .\n+001b4580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    \n+001b45a0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    If \n-001b4dd0: 796f 7520 7573 6520 3c63 6f64 653e 3c61 you use soap_co\n-001b4e90: 7079 3c2f 613e 3c2f 636f 6465 3e20 746f py to\n-001b4ea0: 2063 6f70 7920 7468 6520 3c63 6f64 653e copy the \n-001b4eb0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001b4f00: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001b4f10: 6578 7420 7769 7468 2074 6865 2070 6c75 ext with the plu\n-001b4f20: 6769 6e2c 2074 6865 2070 6c75 6769 6e27 gin, the plugin'\n-001b4f30: 7320 6461 7461 2077 696c 6c20 6265 2073 s data will be s\n-001b4f40: 6861 7265 6420 6279 2074 6865 2063 6f70 hared by the cop\n-001b4f50: 792e 2054 6865 7265 666f 7265 2c20 7468 y. Therefore, th\n-001b4f60: 6520 7374 6174 6973 7469 6373 2061 7265 e statistics are\n-001b4f70: 206e 6f74 2031 3030 2520 6775 6172 616e not 100% guaran\n-001b4f80: 7465 6564 2074 6f20 6265 2061 6363 7572 teed to be accur\n-001b4f90: 6174 6520 666f 7220 6d75 6c74 692d 7468 ate for multi-th\n-001b4fa0: 7265 6164 6564 2073 6572 7669 6365 7320 readed services \n-001b4fb0: 7369 6e63 6520 7261 6365 2063 6f6e 6469 since race condi\n-001b4fc0: 7469 6f6e 7320 6f6e 2074 6865 2063 6f75 tions on the cou\n-001b4fd0: 6e74 6572 7320 6d61 7920 6f63 6375 722e nters may occur.\n-001b4fe0: 204d 7574 6578 2069 7320 6e6f 7420 7573 Mutex is not us\n-001b4ff0: 6564 2074 6f20 7570 6461 7465 2074 6865 ed to update the\n-001b5000: 2063 6f75 6e74 6572 7320 746f 2061 766f counters to avo\n-001b5010: 6964 2069 6e74 726f 6475 6369 6e67 2065 id introducing e\n-001b5020: 7870 656e 7369 7665 2073 796e 6368 726f xpensive synchro\n-001b5030: 6e69 7a61 7469 6f6e 2070 6f69 6e74 732e nization points.\n-001b5040: 2049 6620 3130 3025 2073 6572 7665 722d If 100% server-\n-001b5050: 7369 6465 2061 6363 7572 6163 7920 6973 side accuracy is\n-001b5060: 2072 6571 7569 7265 642c 2061 6464 206d required, add m\n-001b5070: 7574 6578 2061 7420 7468 6520 706f 696e utex at the poin\n-001b5080: 7473 2069 6e64 6963 6174 6564 2069 6e20 ts indicated in \n-001b5090: 7468 6520 3c65 6d3e 3c63 6f64 653e 6874 the ht\n-001b50a0: 7470 6765 742e 633c 2f63 6f64 653e 3c2f tpget.c code.

    .The client-side\n-001b50d0: 2075 7365 206f 6620 4854 5450 2047 4554 use of HTTP GET\n-001b50e0: 2069 7320 7072 6f76 6964 6564 2062 7920 is provided by \n-001b50f0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the so\n-001b5170: 6170 5f47 4554 3c2f 613e 3c2f 636f 6465 ap_GET operation. To \n-001b5190: 7265 6365 6976 6520 6120 534f 4150 2f58 receive a SOAP/X\n-001b51a0: 4d4c 2028 7265 7370 6f6e 7365 2920 6d65 ML (response) me\n-001b51b0: 7373 6167 6520 3c65 6d3e 3c63 6f64 653e ssage \n-001b51c0: 6e73 3a6d 6574 686f 6452 6573 706f 6e73 ns:methodRespons\n-001b51d0: 653c 2f63 6f64 653e 3c2f 656d 3e2c 2075 e, u\n-001b51e0: 7365 3a3c 2f70 3e0a 3c64 6976 2063 6c61 se:

    .
    \n-001b5210: 3c73 7061 6e20 636c 6173 733d 226b 6579 int main() so\n+001b4830: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->http_content\n+001b4890: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "text/ht\n+001b48c0: 6d6c 2671 756f 743b 3c2f 7370 616e 3e3b ml";\n+001b48d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n+001b4910: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_response(soap, SOAP_FILE)
    .
    ||\n+001b4a20: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send(<\n+001b4a80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b4a90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b4aa0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001b4ab0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001b4ad0: 743b 266c 743b 6874 6d6c 2667 743b 4865 t;<html>He\n+001b4ae0: 6c6c 6f26 6c74 3b2f 6874 6d6c 2667 743b llo</html>\n+001b4af0: 2671 756f 743b 3c2f 7370 616e 3e29 3c2f ").
    || soa\n+001b4b70: 705f 656e 645f 7365 6e64 3c2f 613e 283c p_end_send(<\n+001b4b80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b4b90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b4ba0: 6874 6d6c 223e 736f 6170 3c2f 613e 293c html\">soap)<\n+001b4bb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..<\n+001b4c90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b4ca0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+001b4cc0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n+001b4d20: 4f41 505f 4f4b 3c2f 613e 3b20 3c73 7061 OAP_OK; // return SOAP\n+001b4d50: 5f4f 4b20 6f72 2048 5454 5020 6572 726f _OK or HTTP erro\n+001b4d60: 7220 636f 6465 2c20 652e 672e 2034 3034 r code, e.g. 404\n+001b4d70: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001b4d80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b4d90: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
    .
    <\n+001b4da0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001b4db0: 3c70 3e49 6620 796f 7520 7573 6520 3c63

    If you use s\n+001b4e70: 6f61 705f 636f 7079 3c2f 613e 3c2f 636f oap_copy to copy the \n+001b4e90: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with t\n+001b4f00: 6865 2070 6c75 6769 6e2c 2074 6865 2070 he plugin, the p\n+001b4f10: 6c75 6769 6e27 7320 6461 7461 2077 696c lugin's data wil\n+001b4f20: 6c20 6265 2073 6861 7265 6420 6279 2074 l be shared by t\n+001b4f30: 6865 2063 6f70 792e 2054 6865 7265 666f he copy. Therefo\n+001b4f40: 7265 2c20 7468 6520 7374 6174 6973 7469 re, the statisti\n+001b4f50: 6373 2061 7265 206e 6f74 2031 3030 2520 cs are not 100% \n+001b4f60: 6775 6172 616e 7465 6564 2074 6f20 6265 guaranteed to be\n+001b4f70: 2061 6363 7572 6174 6520 666f 7220 6d75 accurate for mu\n+001b4f80: 6c74 692d 7468 7265 6164 6564 2073 6572 lti-threaded ser\n+001b4f90: 7669 6365 7320 7369 6e63 6520 7261 6365 vices since race\n+001b4fa0: 2063 6f6e 6469 7469 6f6e 7320 6f6e 2074 conditions on t\n+001b4fb0: 6865 2063 6f75 6e74 6572 7320 6d61 7920 he counters may \n+001b4fc0: 6f63 6375 722e 204d 7574 6578 2069 7320 occur. Mutex is \n+001b4fd0: 6e6f 7420 7573 6564 2074 6f20 7570 6461 not used to upda\n+001b4fe0: 7465 2074 6865 2063 6f75 6e74 6572 7320 te the counters \n+001b4ff0: 746f 2061 766f 6964 2069 6e74 726f 6475 to avoid introdu\n+001b5000: 6369 6e67 2065 7870 656e 7369 7665 2073 cing expensive s\n+001b5010: 796e 6368 726f 6e69 7a61 7469 6f6e 2070 ynchronization p\n+001b5020: 6f69 6e74 732e 2049 6620 3130 3025 2073 oints. If 100% s\n+001b5030: 6572 7665 722d 7369 6465 2061 6363 7572 erver-side accur\n+001b5040: 6163 7920 6973 2072 6571 7569 7265 642c acy is required,\n+001b5050: 2061 6464 206d 7574 6578 2061 7420 7468 add mutex at th\n+001b5060: 6520 706f 696e 7473 2069 6e64 6963 6174 e points indicat\n+001b5070: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the httpget.c code.<\n+001b50a0: 2f70 3e0a 3c70 3e54 6865 2063 6c69 656e /p>.

    The clien\n+001b50b0: 742d 7369 6465 2075 7365 206f 6620 4854 t-side use of HT\n+001b50c0: 5450 2047 4554 2069 7320 7072 6f76 6964 TP GET is provid\n+001b50d0: 6564 2062 7920 7468 6520 3c63 6f64 653e ed by the \n+001b50e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_GET\n+001b5160: 3c2f 636f 6465 3e20 6f70 6572 6174 696f operatio\n+001b5170: 6e2e 2054 6f20 7265 6365 6976 6520 6120 n. To receive a \n+001b5180: 534f 4150 2f58 4d4c 2028 7265 7370 6f6e SOAP/XML (respon\n+001b5190: 7365 2920 6d65 7373 6167 6520 3c65 6d3e se) message \n+001b51a0: 3c63 6f64 653e 6e73 3a6d 6574 686f 6452 ns:methodR\n+001b51b0: 6573 706f 6e73 653c 2f63 6f64 653e 3c2f esponse, use:

    .
    \n+001b5210: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n+001b5220: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    {
    . \n-001b5270: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-001b52c0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-001b52f0: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n-001b5350: 5f6e 6577 3c2f 613e 2829 3b3c 2f64 6976 _new();.
    \n-001b5390: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap_\n-001b53f0: 4745 543c 2f61 3e28 3c61 2063 6c61 7373 GET(s\n-001b5420: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, endpoint, \n-001b5480: 4e55 4c4c 2929 203c 2f64 6976 3e0a 3c64 NULL))
    .\n-001b54a0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n-001b54c0: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    else if (soap_recv_ns_\n-001b5540: 5f77 6562 6d65 7468 6f64 5265 7370 6f6e _webmethodRespon\n-001b5550: 7365 283c 6120 636c 6173 733d 2263 6f64 se(soap, ...))
    \n-001b5590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // error\n-001b55d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else\n-001b5610: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ..\n-001b5630: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe\n-001b5650: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
    .\n-001b5660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-001b5710: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n-001b57d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(soap);
    .
    <\n-001b58d0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-001b58e0: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga\n-001b58f0: 3935 3362 6465 6537 6562 6632 3432 6230 953bdee7ebf242b0\n-001b5900: 3536 3833 3465 3535 3932 3037 3961 6539 56834e5592079ae9\n-001b5910: 223e 736f 6170 5f47 4554 3c2f 613e 3c2f \">soap_GET
    int soap\n-001b5940: 5f47 4554 2873 7472 7563 7420 736f 6170 _GET(struct soap\n-001b5950: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-001b5960: 6172 202a 656e 6470 6f69 6e74 2c20 636f ar *endpoint, co\n-001b5970: 6e73 7420 6368 6172 202a 6163 7469 6f6e nst char *action\n-001b5980: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    HTTP G\n-001b59a0: 4554 2063 6f6e 7465 6e74 2066 726f 6d20 ET content from \n-001b59b0: 7365 7276 6572 2e3c 2f64 6976 3e3c 2f64 server.
    .

    To\n-001b59e0: 2072 6563 6569 7665 2061 6e79 2048 5454 receive any HTT\n-001b59f0: 5020 426f 6479 2064 6174 6120 696e 746f P Body data into\n-001b5a00: 2061 2062 7566 6665 722c 2075 7365 3a3c a buffer, use:<\n-001b5a10: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n-001b5a60: 206d 6169 6e28 293c 2f64 6976 3e0a 3c64 main()
    . stru\n+001b5270: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n+001b5340: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    if \n+001b5380: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_GET(soap, <\n+001b5410: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b5420: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b5430: 6874 6d6c 2361 6564 3162 3836 6238 6133 html#aed1b86b8a3\n+001b5440: 3461 6561 3836 3130 3337 3531 6139 3332 4aea86103751a932\n+001b5450: 6339 6463 6539 223e 656e 6470 6f69 6e74 c9dce9\">endpoint\n+001b5460: 3c2f 613e 2c20 4e55 4c4c 2929 203c 2f64 , NULL)) .
    ... // error
    .
    else if\n+001b5510: 3c2f 7370 616e 3e20 2873 6f61 705f 7265 (soap_re\n+001b5520: 6376 5f6e 735f 5f77 6562 6d65 7468 6f64 cv_ns__webmethod\n+001b5530: 5265 7370 6f6e 7365 283c 6120 636c 6173 Response(\n+001b5560: 736f 6170 3c2f 613e 2c20 2e2e 2e29 2920 soap, ...)) \n+001b5570: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n+001b5590: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+001b55b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001b55d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+001b55f0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n+001b5610: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+001b5630: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n+001b5640: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+001b56b0: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap); \n+001b56f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n+001b5760: 6170 5f65 6e64 3c2f 613e 283c 6120 636c ap_end(soap); .\n+001b5850: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    in\n+001b5920: 7420 736f 6170 5f47 4554 2873 7472 7563 t soap_GET(struc\n+001b5930: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n+001b5940: 6e73 7420 6368 6172 202a 656e 6470 6f69 nst char *endpoi\n+001b5950: 6e74 2c20 636f 6e73 7420 6368 6172 202a nt, const char *\n+001b5960: 6163 7469 6f6e 293c 2f64 6976 3e3c 6469 action)
    \n+001b5980: 4854 5450 2047 4554 2063 6f6e 7465 6e74 HTTP GET content\n+001b5990: 2066 726f 6d20 7365 7276 6572 2e3c 2f64 from server.
    .
    \n+001b59b0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d See also \n-001b64f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_get.

    .

    ...\n-001b6590: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n-001b65a0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n-001b65b0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n-001b65c0: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .RESTful serve\n-001b6600: 722d 7369 6465 2041 5049 2077 6974 6820 r-side API with \n-001b6610: 7468 6520 4854 5450 2050 4f53 5420 706c the HTTP POST pl\n-001b6620: 7567 696e 3c2f 6833 3e0a 3c70 3e53 6572 ugin

    .

    Ser\n-001b6630: 7665 722d 7369 6465 2075 7365 206f 6620 ver-side use of \n-001b6640: 5245 5354 6675 6c20 4854 5450 2050 4f53 RESTful HTTP POS\n-001b6650: 542c 2050 5554 2c20 5041 5443 482c 2061 T, PUT, PATCH, a\n-001b6660: 6e64 2044 454c 4554 4520 6f70 6572 6174 nd DELETE operat\n-001b6670: 696f 6e73 2061 7265 2073 7570 706f 7274 ions are support\n-001b6680: 6564 2077 6974 6820 7468 6520 3c63 6f64 ed with the http_post HTTP PO\n-001b6730: 5354 2070 6c75 6769 6e20 3c65 6d3e 3c63 ST plugin gsoap/plugin\n-001b6750: 2f68 7474 7070 6f73 742e 633c 2f63 6f64 /httppost.c.

    .

    \n-001b6770: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The http\n-001b6800: 5f70 6f73 743c 2f61 3e3c 2f63 6f64 653e _post\n-001b6810: 2048 5454 5020 504f 5354 2070 6c75 6769 HTTP POST plugi\n-001b6820: 6e20 616c 6c6f 7773 2079 6f75 7220 7365 n allows your se\n-001b6830: 7276 6572 2074 6f20 6861 6e64 6c65 2052 rver to handle R\n-001b6840: 4553 5466 756c 2048 5454 5020 504f 5354 ESTful HTTP POST\n-001b6850: 2072 6571 7565 7374 7320 616e 6420 6174 requests and at\n-001b6860: 2074 6865 2073 616d 6520 7469 6d65 2073 the same time s\n-001b6870: 7469 6c6c 2073 6572 7665 2053 4f41 502d till serve SOAP-\n-001b6880: 6261 7365 6420 504f 5354 2072 6571 7565 based POST reque\n-001b6890: 7374 732e 2054 6865 2070 6c75 6769 6e20 sts. The plugin \n-001b68a0: 616c 736f 2070 726f 7669 6465 7320 7375 also provides su\n-001b68b0: 7070 6f72 7420 666f 7220 636c 6965 6e74 pport for client\n-001b68c0: 2061 7070 6c69 6361 7469 6f6e 7320 746f applications to\n-001b68d0: 2069 7373 7565 2048 5454 5020 504f 5354 issue HTTP POST\n-001b68e0: 206f 7065 7261 7469 6f6e 7320 746f 2061 operations to a\n-001b68f0: 2073 6572 7665 722e 3c2f 703e 0a3c 703e server.

    .

    \n-001b6900: 546f 2073 696d 706c 6966 7920 7468 6520 To simplify the \n-001b6910: 7365 7276 6572 2d73 6964 6520 6861 6e64 server-side hand\n-001b6920: 6c69 6e67 206f 6620 504f 5354 2072 6571 ling of POST req\n-001b6930: 7565 7374 732c 2068 616e 646c 6572 7320 uests, handlers \n-001b6940: 6361 6e20 6265 2061 7373 6f63 6961 7465 can be associate\n-001b6950: 6420 7769 7468 206d 6564 6961 2074 7970 d with media typ\n-001b6960: 6573 3a3c 2f70 3e0a 3c64 6976 2063 6c61 es:

    .
    \n-001b6990: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct http_post_ha\n-001b69c0: 6e64 6c65 7273 206d 795f 6861 6e64 6c65 ndlers my_handle\n-001b69d0: 7273 5b5d 203d 203c 2f64 6976 3e0a 3c64 rs[] =
    .struct <\n+001b5aa0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+001b5ad0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001b5b00: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n+001b5b60: 6170 5f6e 6577 3c2f 613e 2829 3b3c 2f64 ap_new();.
    char *r\n+001b5bb0: 6573 706f 6e73 6520 3d20 4e55 4c4c 3b20 esponse = NULL; \n+001b5bc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t response_len;\n+001b5c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+001b5c50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+001b5ca0: 736f 6170 5f47 4554 3c2f 613e 283c 6120 soap_GET(soap, endpoint<\n+001b5d30: 2f61 3e2c 204e 554c 4c29 3c2f 6469 763e /a>, NULL)
    \n+001b5d40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    || (respon\n+001b5d60: 7365 203d 203c 6120 636c 6173 733d 2263 se = soap_http_g\n+001b5dc0: 6574 5f62 6f64 793c 2f61 3e28 3c61 2063 et_body(soap, &am\n+001b5e00: 703b 7265 7370 6f6e 7365 5f6c 656e 2929 p;response_len))\n+001b5e10: 203d 3d20 4e55 4c4c 3c2f 6469 763e 0a3c == NULL
    .<\n+001b5e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b5e30: 3e20 2020 7c7c 203c 6120 636c 6173 733d > || soap_end_\n+001b5e90: 7265 6376 3c2f 613e 2826 616d 703b 3c61 recv(&soap))<\n+001b5ed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n+001b5ef0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    . \n+001b5f30: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n+001b5f70: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // u\n+001b5f90: 7365 2074 6865 2072 6573 706f 6e73 6520 se the response \n+001b5fa0: 7374 7269 6e67 2028 4e55 4c4c 2069 6e64 string (NULL ind\n+001b5fb0: 6963 6174 6573 206e 6f20 626f 6479 206f icates no body o\n+001b5fc0: 7220 6572 726f 7229 3c2f 7370 616e 3e3c r error)<\n+001b5fd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n+001b60a0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n+001b6100: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+001b6130: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soap_\n+001b61b0: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap);<\n+001b61f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+001b6210: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n+001b6260: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 int soap_end_r\n+001b62f0: 6563 7628 7374 7275 6374 2073 6f61 7020 ecv(struct soap \n+001b6300: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    F\n+001b6320: 696e 616c 697a 6520 7468 6520 636f 6e74 inalize the cont\n+001b6330: 6578 7420 6166 7465 7220 7265 6365 6976 ext after receiv\n+001b6340: 696e 672e 3c2f 6469 763e 3c2f 6469 763e ing.
    \n+001b6350: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap_htt\n+001b6400: 705f 6765 745f 626f 6479 3c2f 613e 3c2f p_get_body
    char * s\n+001b6430: 6f61 705f 6874 7470 5f67 6574 5f62 6f64 oap_http_get_bod\n+001b6440: 7928 7374 7275 6374 2073 6f61 7020 2a73 y(struct soap *s\n+001b6450: 6f61 702c 2073 697a 655f 7420 2a6c 656e oap, size_t *len\n+001b6460: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Get th\n+001b6480: 6520 4854 5450 2062 6f64 7920 6d65 7373 e HTTP body mess\n+001b6490: 6167 6520 6173 2061 2073 7472 696e 672e age as a string.\n+001b64a0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    See also \n+001b64d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_get<\n+001b6560: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n+001b6570: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n+001b6590: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .RESTful\n+001b65e0: 2073 6572 7665 722d 7369 6465 2041 5049 server-side API\n+001b65f0: 2077 6974 6820 7468 6520 4854 5450 2050 with the HTTP P\n+001b6600: 4f53 5420 706c 7567 696e 3c2f 6833 3e0a OST plugin

    .\n+001b6610: 3c70 3e53 6572 7665 722d 7369 6465 2075

    Server-side u\n+001b6620: 7365 206f 6620 5245 5354 6675 6c20 4854 se of RESTful HT\n+001b6630: 5450 2050 4f53 542c 2050 5554 2c20 5041 TP POST, PUT, PA\n+001b6640: 5443 482c 2061 6e64 2044 454c 4554 4520 TCH, and DELETE \n+001b6650: 6f70 6572 6174 696f 6e73 2061 7265 2073 operations are s\n+001b6660: 7570 706f 7274 6564 2077 6974 6820 7468 upported with th\n+001b6670: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_p\n+001b6700: 6f73 743c 2f61 3e3c 2f63 6f64 653e 2048 ost H\n+001b6710: 5454 5020 504f 5354 2070 6c75 6769 6e20 TTP POST plugin \n+001b6720: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+001b6730: 706c 7567 696e 2f68 7474 7070 6f73 742e plugin/httppost.\n+001b6740: 633c 2f63 6f64 653e 3c2f 656d 3e2e 3c2f c..

    The \n+001b6760: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_post<\n+001b67f0: 2f63 6f64 653e 2048 5454 5020 504f 5354 /code> HTTP POST\n+001b6800: 2070 6c75 6769 6e20 616c 6c6f 7773 2079 plugin allows y\n+001b6810: 6f75 7220 7365 7276 6572 2074 6f20 6861 our server to ha\n+001b6820: 6e64 6c65 2052 4553 5466 756c 2048 5454 ndle RESTful HTT\n+001b6830: 5020 504f 5354 2072 6571 7565 7374 7320 P POST requests \n+001b6840: 616e 6420 6174 2074 6865 2073 616d 6520 and at the same \n+001b6850: 7469 6d65 2073 7469 6c6c 2073 6572 7665 time still serve\n+001b6860: 2053 4f41 502d 6261 7365 6420 504f 5354 SOAP-based POST\n+001b6870: 2072 6571 7565 7374 732e 2054 6865 2070 requests. The p\n+001b6880: 6c75 6769 6e20 616c 736f 2070 726f 7669 lugin also provi\n+001b6890: 6465 7320 7375 7070 6f72 7420 666f 7220 des support for \n+001b68a0: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati\n+001b68b0: 6f6e 7320 746f 2069 7373 7565 2048 5454 ons to issue HTT\n+001b68c0: 5020 504f 5354 206f 7065 7261 7469 6f6e P POST operation\n+001b68d0: 7320 746f 2061 2073 6572 7665 722e 3c2f s to a server..

    To simplif\n+001b68f0: 7920 7468 6520 7365 7276 6572 2d73 6964 y the server-sid\n+001b6900: 6520 6861 6e64 6c69 6e67 206f 6620 504f e handling of PO\n+001b6910: 5354 2072 6571 7565 7374 732c 2068 616e ST requests, han\n+001b6920: 646c 6572 7320 6361 6e20 6265 2061 7373 dlers can be ass\n+001b6930: 6f63 6961 7465 6420 7769 7468 206d 6564 ociated with med\n+001b6940: 6961 2074 7970 6573 3a3c 2f70 3e0a 3c64 ia types:

    .
    stru\n+001b6990: 6374 203c 2f73 7061 6e3e 6874 7470 5f70 ct http_p\n+001b69a0: 6f73 745f 6861 6e64 6c65 7273 206d 795f ost_handlers my_\n+001b69b0: 6861 6e64 6c65 7273 5b5d 203d 203c 2f64 handlers[] = .
    {
    .\n-001b69f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    { "\n-001b6a30: 696d 6167 652f 6a70 6726 7175 6f74 3b3c image/jpg"<\n-001b6a40: 2f73 7061 6e3e 2c20 6a70 6567 5f68 616e /span>, jpeg_han\n-001b6a50: 646c 6572 207d 2c20 3c2f 6469 763e 0a3c dler },
    .<\n-001b6a60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b6a70: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "image/*&q\n-001b6aa0: 756f 743b 3c2f 7370 616e 3e2c 2020 2069 uot;, i\n-001b6ab0: 6d61 6765 5f68 616e 646c 6572 207d 2c20 mage_handler }, \n-001b6ac0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "t\n-001b6b00: 6578 742f 6874 6d6c 2671 756f 743b 3c2f ext/html", html_hand\n-001b6b20: 6c65 7220 7d2c 203c 2f64 6976 3e0a 3c64 ler },
    .\n-001b6b40: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n-001b6b60: 2671 756f 743b 7465 7874 2f2a 2671 756f "text/*&quo\n-001b6b70: 743b 3c2f 7370 616e 3e2c 2020 2020 7465 t;, te\n-001b6b80: 7874 5f68 616e 646c 6572 207d 2c20 3c2f xt_handler }, .
    { "POS\n-001b6bd0: 5426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 T", \n-001b6be0: 2020 2020 2067 656e 6572 6963 5f50 4f53 generic_POS\n-001b6bf0: 545f 6861 6e64 6c65 7220 7d2c 203c 2f64 T_handler }, .
    { "PUT&\n-001b6c40: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-001b6c50: 2020 2020 6765 6e65 7269 635f 5055 545f generic_PUT_\n-001b6c60: 6861 6e64 6c65 7220 7d2c 203c 2f64 6976 handler }, .
    { "PATCH&\n-001b6cb0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-001b6cc0: 2020 6765 6e65 7269 635f 5041 5443 485f generic_PATCH_\n-001b6cd0: 6861 6e64 6c65 7220 7d2c 203c 2f64 6976 handler }, .
    { "DELETE\n-001b6d20: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-001b6d30: 2020 6765 6e65 7269 635f 4445 4c45 5445 generic_DELETE\n-001b6d40: 5f68 616e 646c 6572 207d 2c20 3c2f 6469 _handler }, .
    { NULL } \n-001b6d70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };.

    Note\n-001b6db0: 2074 6861 7420 3c63 6f64 653e 2a3c 2f63 that * and -\n-001b6dd0: 3c2f 636f 6465 3e20 6361 6e20 6265 2075 can be u\n-001b6de0: 7365 6420 6173 2077 696c 6463 6172 6473 sed as wildcards\n-001b6df0: 2074 6f20 6d61 7463 6820 616e 7920 7465 to match any te\n-001b6e00: 7874 2061 6e64 2061 6e79 2063 6861 7261 xt and any chara\n-001b6e10: 6374 6572 2c20 7265 7370 6563 7469 7665 cter, respective\n-001b6e20: 6c79 2e20 4d65 6469 6120 7479 7065 7320 ly. Media types \n-001b6e30: 6d61 7920 6861 7665 206f 7074 696f 6e61 may have optiona\n-001b6e40: 6c20 7061 7261 6d65 7465 7273 2061 6674 l parameters aft\n-001b6e50: 6572 203c 636f 6465 3e3b 3c2f 636f 6465 er ; such as \n-001b6e70: 6368 6172 7365 743c 2f63 6f64 653e 2061 charset a\n-001b6e80: 6e64 203c 636f 6465 3e62 6f75 6e64 6172 nd boundar\n-001b6e90: 793c 2f63 6f64 653e 2e20 5468 6573 6520 y. These \n-001b6ea0: 7061 7261 6d65 7465 7273 2063 616e 2062 parameters can b\n-001b6eb0: 6520 6d61 7463 6865 6420 6279 2074 6865 e matched by the\n-001b6ec0: 206d 6564 6961 2074 7970 6520 7061 7474 media type patt\n-001b6ed0: 6572 6e73 2069 6e20 7468 6520 7461 626c erns in the tabl\n-001b6ee0: 652e 2050 6174 7465 726e 7320 7468 6174 e. Patterns that\n-001b6ef0: 2061 7265 206d 6f72 6520 7370 6563 6966 are more specif\n-001b6f00: 6963 206d 7573 7420 7072 6563 6564 6520 ic must precede \n-001b6f10: 7061 7474 6572 6e73 2074 6861 7420 6172 patterns that ar\n-001b6f20: 6520 6c65 7373 2073 7065 6369 6669 6320 e less specific \n-001b6f30: 696e 2074 6865 2074 6162 6c65 2e20 466f in the table. Fo\n-001b6f40: 7220 6578 616d 706c 652c 203c 636f 6465 r example, \"text/xml;*char\n-001b6f60: 7365 743d 7574 662d 382a 223c 2f63 6f64 set=utf-8*\" must precede \n-001b6f80: 3c63 6f64 653e 2274 6578 742f 786d 6c22 \"text/xml\"\n-001b6f90: 3c2f 636f 6465 3e20 7768 6963 6820 6d75 which mu\n-001b6fa0: 7374 2070 7265 6365 6465 203c 636f 6465 st precede \"text/*\"\n-001b6fc0: 2e20 4e6f 7465 2074 6861 7420 3c63 6f64 . Note that \"text/xml\" also matches\n-001b6ff0: 2061 6e79 2070 6172 616d 6574 6572 7320 any parameters \n-001b7000: 6f66 2074 6865 206d 6564 6961 2074 7970 of the media typ\n-001b7010: 6520 6f66 2074 6865 206d 6573 7361 6765 e of the message\n-001b7020: 2072 6576 6569 7665 642c 2073 7563 6820 reveived, such \n-001b7030: 6173 203c 636f 6465 3e22 7465 7874 2f78 as \"text/x\n-001b7040: 6d6c 3b20 6368 6172 7365 743d 7574 662d ml; charset=utf-\n-001b7050: 3822 3c2f 636f 6465 3e20 286f 6e6c 7920 8\" (only \n-001b7060: 7369 6e63 6520 6753 4f41 5020 7665 7273 since gSOAP vers\n-001b7070: 696f 6e20 322e 382e 3735 292e 3c2f 703e ion 2.8.75).

    \n-001b7080: 0a3c 703e 5468 6520 6861 6e64 6c65 7273 .

    The handlers\n-001b7090: 2061 7265 2066 756e 6374 696f 6e73 2074 are functions t\n-001b70a0: 6861 7420 7769 6c6c 2062 6520 696e 766f hat will be invo\n-001b70b0: 6b65 6420 7768 656e 2061 2050 4f53 5465 ked when a POSTe\n-001b70c0: 6420 7265 7175 6573 7420 6d65 7373 6167 d request messag\n-001b70d0: 6520 6d61 7463 6869 6e67 206d 6564 6961 e matching media\n-001b70e0: 2074 7970 6520 6973 2073 656e 7420 746f type is sent to\n-001b70f0: 2074 6865 2073 6572 7665 722e 3c2f 703e the server.

    \n-001b7100: 0a3c 703e 416e 2065 7861 6d70 6c65 2069 .

    An example i\n-001b7110: 6d61 6765 2068 616e 646c 6572 2074 6861 mage handler tha\n-001b7120: 7420 6368 6563 6b73 2074 6865 2073 7065 t checks the spe\n-001b7130: 6369 6669 6320 696d 6167 6520 7479 7065 cific image type\n-001b7140: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int image_handler\n-001b71a0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n-001b71f0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-001b7220: 703c 2f61 3e29 203c 2f64 6976 3e0a 3c64 p)
    .\n+001b6a10: 2671 756f 743b 696d 6167 652f 6a70 6726 "image/jpg&\n+001b6a20: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6a70 quot;, jp\n+001b6a30: 6567 5f68 616e 646c 6572 207d 2c20 3c2f eg_handler }, .
    { "ima\n+001b6a80: 6765 2f2a 2671 756f 743b 3c2f 7370 616e ge/*", image_handl\n+001b6aa0: 6572 207d 2c20 3c2f 6469 763e 0a3c 6469 er },
    . \n+001b6ac0: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n+001b6ae0: 7175 6f74 3b74 6578 742f 6874 6d6c 2671 quot;text/html&q\n+001b6af0: 756f 743b 3c2f 7370 616e 3e2c 2068 746d uot;, htm\n+001b6b00: 6c5f 6861 6e64 6c65 7220 7d2c 203c 2f64 l_handler }, .
    { "text\n+001b6b50: 2f2a 2671 756f 743b 3c2f 7370 616e 3e2c /*",\n+001b6b60: 2020 2020 7465 7874 5f68 616e 646c 6572 text_handler\n+001b6b70: 207d 2c20 3c2f 6469 763e 0a3c 6469 7620 },
    .
    {\n+001b6b90: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+001b6bb0: 6f74 3b50 4f53 5426 7175 6f74 3b3c 2f73 ot;POST", gener\n+001b6bd0: 6963 5f50 4f53 545f 6861 6e64 6c65 7220 ic_POST_handler \n+001b6be0: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },
    .
    { \n+001b6c00: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001b6c20: 743b 5055 5426 7175 6f74 3b3c 2f73 7061 t;PUT", generi\n+001b6c40: 635f 5055 545f 6861 6e64 6c65 7220 7d2c c_PUT_handler },\n+001b6c50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { "\n+001b6c90: 5041 5443 4826 7175 6f74 3b3c 2f73 7061 PATCH", generic_\n+001b6cb0: 5041 5443 485f 6861 6e64 6c65 7220 7d2c PATCH_handler },\n+001b6cc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { "\n+001b6d00: 4445 4c45 5445 2671 756f 743b 3c2f 7370 DELETE", generic_\n+001b6d20: 4445 4c45 5445 5f68 616e 646c 6572 207d DELETE_handler }\n+001b6d30: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    { N\n+001b6d50: 554c 4c20 7d20 3c2f 6469 763e 0a3c 6469 ULL }
    .}\n+001b6d70: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+001b6d90: 703e 4e6f 7465 2074 6861 7420 3c63 6f64 p>Note that * and <\n+001b6db0: 636f 6465 3e2d 3c2f 636f 6465 3e20 6361 code>- ca\n+001b6dc0: 6e20 6265 2075 7365 6420 6173 2077 696c n be used as wil\n+001b6dd0: 6463 6172 6473 2074 6f20 6d61 7463 6820 dcards to match \n+001b6de0: 616e 7920 7465 7874 2061 6e64 2061 6e79 any text and any\n+001b6df0: 2063 6861 7261 6374 6572 2c20 7265 7370 character, resp\n+001b6e00: 6563 7469 7665 6c79 2e20 4d65 6469 6120 ectively. Media \n+001b6e10: 7479 7065 7320 6d61 7920 6861 7665 206f types may have o\n+001b6e20: 7074 696f 6e61 6c20 7061 7261 6d65 7465 ptional paramete\n+001b6e30: 7273 2061 6674 6572 203c 636f 6465 3e3b rs after ;\n+001b6e40: 3c2f 636f 6465 3e20 7375 6368 2061 7320 such as \n+001b6e50: 3c63 6f64 653e 6368 6172 7365 743c 2f63 charset and b\n+001b6e70: 6f75 6e64 6172 793c 2f63 6f64 653e 2e20 oundary. \n+001b6e80: 5468 6573 6520 7061 7261 6d65 7465 7273 These parameters\n+001b6e90: 2063 616e 2062 6520 6d61 7463 6865 6420 can be matched \n+001b6ea0: 6279 2074 6865 206d 6564 6961 2074 7970 by the media typ\n+001b6eb0: 6520 7061 7474 6572 6e73 2069 6e20 7468 e patterns in th\n+001b6ec0: 6520 7461 626c 652e 2050 6174 7465 726e e table. Pattern\n+001b6ed0: 7320 7468 6174 2061 7265 206d 6f72 6520 s that are more \n+001b6ee0: 7370 6563 6966 6963 206d 7573 7420 7072 specific must pr\n+001b6ef0: 6563 6564 6520 7061 7474 6572 6e73 2074 ecede patterns t\n+001b6f00: 6861 7420 6172 6520 6c65 7373 2073 7065 hat are less spe\n+001b6f10: 6369 6669 6320 696e 2074 6865 2074 6162 cific in the tab\n+001b6f20: 6c65 2e20 466f 7220 6578 616d 706c 652c le. For example,\n+001b6f30: 203c 636f 6465 3e22 7465 7874 2f78 6d6c \"text/xml\n+001b6f40: 3b2a 6368 6172 7365 743d 7574 662d 382a ;*charset=utf-8*\n+001b6f50: 223c 2f63 6f64 653e 206d 7573 7420 7072 \" must pr\n+001b6f60: 6563 6564 6520 3c63 6f64 653e 2274 6578 ecede \"tex\n+001b6f70: 742f 786d 6c22 3c2f 636f 6465 3e20 7768 t/xml\" wh\n+001b6f80: 6963 6820 6d75 7374 2070 7265 6365 6465 ich must precede\n+001b6f90: 203c 636f 6465 3e22 7465 7874 2f2a 223c \"text/*\"<\n+001b6fa0: 2f63 6f64 653e 2e20 4e6f 7465 2074 6861 /code>. Note tha\n+001b6fb0: 7420 3c63 6f64 653e 2274 6578 742f 786d t \"text/xm\n+001b6fc0: 6c22 3c2f 636f 6465 3e20 616c 736f 206d l\" also m\n+001b6fd0: 6174 6368 6573 2061 6e79 2070 6172 616d atches any param\n+001b6fe0: 6574 6572 7320 6f66 2074 6865 206d 6564 eters of the med\n+001b6ff0: 6961 2074 7970 6520 6f66 2074 6865 206d ia type of the m\n+001b7000: 6573 7361 6765 2072 6576 6569 7665 642c essage reveived,\n+001b7010: 2073 7563 6820 6173 203c 636f 6465 3e22 such as \"\n+001b7020: 7465 7874 2f78 6d6c 3b20 6368 6172 7365 text/xml; charse\n+001b7030: 743d 7574 662d 3822 3c2f 636f 6465 3e20 t=utf-8\" \n+001b7040: 286f 6e6c 7920 7369 6e63 6520 6753 4f41 (only since gSOA\n+001b7050: 5020 7665 7273 696f 6e20 322e 382e 3735 P version 2.8.75\n+001b7060: 292e 3c2f 703e 0a3c 703e 5468 6520 6861 ).

    .

    The ha\n+001b7070: 6e64 6c65 7273 2061 7265 2066 756e 6374 ndlers are funct\n+001b7080: 696f 6e73 2074 6861 7420 7769 6c6c 2062 ions that will b\n+001b7090: 6520 696e 766f 6b65 6420 7768 656e 2061 e invoked when a\n+001b70a0: 2050 4f53 5465 6420 7265 7175 6573 7420 POSTed request \n+001b70b0: 6d65 7373 6167 6520 6d61 7463 6869 6e67 message matching\n+001b70c0: 206d 6564 6961 2074 7970 6520 6973 2073 media type is s\n+001b70d0: 656e 7420 746f 2074 6865 2073 6572 7665 ent to the serve\n+001b70e0: 722e 3c2f 703e 0a3c 703e 416e 2065 7861 r.

    .

    An exa\n+001b70f0: 6d70 6c65 2069 6d61 6765 2068 616e 646c mple image handl\n+001b7100: 6572 2074 6861 7420 6368 6563 6b73 2074 er that checks t\n+001b7110: 6865 2073 7065 6369 6669 6320 696d 6167 he specific imag\n+001b7120: 6520 7479 7065 3a3c 2f70 3e0a 3c64 6976 e type:

    .
    in\n+001b7170: 743c 2f73 7061 6e3e 2069 6d61 6765 5f68 t image_h\n+001b7180: 616e 646c 6572 283c 7370 616e 2063 6c61 andler(str\n+001b71a0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap) .
    {
    .\n-001b7240: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    const <\n-001b7280: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b7290: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *buf; .
    \n-001b72e0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le\n-001b72f0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    // if necess\n-001b7330: 6172 792c 2063 6865 636b 2074 7970 6520 ary, check type \n-001b7340: 696e 2073 6f61 702d 2667 743b 6874 7470 in soap->http\n-001b7350: 5f63 6f6e 7465 6e74 203c 2f73 7061 6e3e _content \n-001b7360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n-001b73a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001b73d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >htt\n-001b7420: 705f 636f 6e74 656e 743c 2f61 3e20 2661 p_content &a\n-001b7430: 6d70 3b26 616d 703b 2021 3c61 2063 6c61 mp;& !soap\n-001b7490: 5f74 6167 5f63 6d70 3c2f 613e 283c 6120 _tag_cmp(soap->\n-001b74d0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;http_c\n-001b7520: 6f6e 7465 6e74 3c2f 613e 2c20 3c73 7061 ontent, "im\n-001b7550: 6167 652f 6769 6626 7175 6f74 3b3c 2f73 age/gif")
    . \n-001b7580: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n-001b75a0: 7572 6e3c 2f73 7061 6e3e 2034 3034 3b20 urn 404; \n-001b75b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // HTTP er\n-001b75d0: 726f 7220 3430 3420 3c2f 7370 616e 3e3c ror 404 <\n-001b75e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if ((b\n-001b7600: 7566 203d 203c 6120 636c 6173 733d 2263 uf = soap_http_g\n-001b7660: 6574 5f62 6f64 793c 2f61 3e28 3c61 2063 et_body(soap, &am\n-001b76a0: 703b 6c65 6e29 2920 3d3d 204e 554c 4c29 p;len)) == NULL)\n-001b76b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return soap\n-001b7720: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error; .
    //\n-001b77b0: 202e 2e2e 206e 6f77 2070 726f 6365 7373 ... now process\n-001b77c0: 2069 6d61 6765 2069 6e20 6275 6620 3c2f image in buf
    . \n-001b77f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // reply w\n-001b7810: 6974 6820 656d 7074 7920 4854 5450 2032 ith empty HTTP 2\n-001b7820: 3030 204f 4b20 7265 7370 6f6e 7365 3a20 00 OK response: \n-001b7830: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001b7850: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-001b7870: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap_s\n-001b78d0: 656e 645f 656d 7074 795f 7265 7370 6f6e end_empty_respon\n-001b78e0: 7365 3c2f 613e 283c 6120 636c 6173 733d se(so\n-001b7910: 6170 3c2f 613e 2c20 3230 3029 3b20 3c2f ap, 200); const c\n+001b7280: 6861 723c 2f73 7061 6e3e 202a 6275 663b har *buf;\n+001b7290: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    size_t len;
    .\n+001b72e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // if \n+001b7310: 6e65 6365 7373 6172 792c 2063 6865 636b necessary, check\n+001b7320: 2074 7970 6520 696e 2073 6f61 702d 2667 type in soap-&g\n+001b7330: 743b 6874 7470 5f63 6f6e 7465 6e74 203c t;http_content <\n+001b7340: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001b7360: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n+001b73b0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->http_content<\n+001b7410: 2f61 3e20 2661 6d70 3b26 616d 703b 2021 /a> && !\n+001b7420: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_tag_cmp(soap->\n+001b7500: 6874 7470 5f63 6f6e 7465 6e74 3c2f 613e http_content\n+001b7510: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+001b7530: 756f 743b 696d 6167 652f 6769 6626 7175 uot;image/gif&qu\n+001b7540: 6f74 3b3c 2f73 7061 6e3e 2920 3c2f 6469 ot;) .
    return\n+001b7590: 2034 3034 3b20 3c73 7061 6e20 636c 6173 404; // H\n+001b75b0: 5454 5020 6572 726f 7220 3430 3420 3c2f TTP error 404
    . \n+001b75e0: 6966 2028 2862 7566 203d 203c 6120 636c if ((buf = soap_\n+001b7640: 6874 7470 5f67 6574 5f62 6f64 793c 2f61 http_get_body(soap, &len)) ==\n+001b7690: 204e 554c 4c29 3c2f 6469 763e 0a3c 6469 NULL)
    . \n+001b76b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n+001b76d0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn soap-><\n+001b7710: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b7720: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b7730: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n+001b7740: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n+001b7750: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error;
    .
    // ... now p\n+001b77a0: 726f 6365 7373 2069 6d61 6765 2069 6e20 rocess image in \n+001b77b0: 6275 6620 3c2f 7370 616e 3e3c 2f64 6976 buf .
    // r\n+001b77f0: 6570 6c79 2077 6974 6820 656d 7074 7920 eply with empty \n+001b7800: 4854 5450 2032 3030 204f 4b20 7265 7370 HTTP 200 OK resp\n+001b7810: 6f6e 7365 3a20 3c2f 7370 616e 3e3c 2f64 onse: .
    return \n+001b7860: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+001b78b0: 736f 6170 5f73 656e 645f 656d 7074 795f soap_send_empty_\n+001b78c0: 7265 7370 6f6e 7365 3c2f 613e 283c 6120 response(soap, 20\n+001b7900: 3029 3b20 3c2f 6469 763e 0a3c 6469 7620 0);
    .
    }.
    }
    .<\n-001b7940: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-001b7950: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-001b7960: 705f 5f6d 6973 635f 6874 6d6c 5f67 6165 p__misc_html_gae\n-001b7970: 3262 6661 6434 3939 3739 6661 6133 6136 2bfad49979faa3a6\n-001b7980: 3235 6163 6134 3461 6361 6130 3137 6322 25aca44acaa017c\"\n-001b7990: 3e3c 6469 7620 636c 6173 733d 2274 746e >\n-001b7a00: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_tag\n-001b7a20: 5f63 6d70 2863 6f6e 7374 2063 6861 7220 _cmp(const char \n-001b7a30: 2a73 7472 696e 672c 2063 6f6e 7374 2063 *string, const c\n-001b7a40: 6861 7220 2a70 6174 7465 726e 293c 2f64 har *pattern)
    Compare st\n-001b7a70: 7269 6e67 2074 6f20 6120 7061 7474 6572 ring to a patter\n-001b7a80: 6e2e 3c2f 6469 763e 3c2f 6469 763e 0a3c n.
    .<\n-001b7a90: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The abo\n-001b7ab0: 7665 2065 7861 6d70 6c65 2072 6574 7572 ve example retur\n-001b7ac0: 6e73 2048 5454 5020 4f4b 2e20 4966 2063 ns HTTP OK. If c\n-001b7ad0: 6f6e 7465 6e74 2069 7320 7375 7070 6f73 ontent is suppos\n-001b7ae0: 6564 2074 6f20 6265 2072 6574 7572 6e65 ed to be returne\n-001b7af0: 642c 2074 6865 6e20 7573 653a 3c2f 703e d, then use:

    \n-001b7b00: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n-001b7b40: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n-001b7bb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .
    ...\n-001b7c30: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-001b7c50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001b7c90: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->http_conte\n-001b7cf0: 6e74 3c2f 613e 203d 203c 7370 616e 2063 nt = "image\n-001b7d20: 2f6a 7065 6726 7175 6f74 3b3c 2f73 7061 /jpeg"; // a j\n-001b7d50: 7065 6720 696d 6167 6520 746f 2072 6574 peg image to ret\n-001b7d60: 7572 6e20 6261 636b 203c 2f73 7061 6e3e urn back \n-001b7d70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so\n-001b7e00: 6170 5f72 6573 706f 6e73 653c 2f61 3e28 ap_response(\n-001b7e10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001b7e40: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_FILE))\n-001b7ea0: 203c 7370 616e 2063 6c61 7373 3d22 636f // SOAP_F\n-001b7ec0: 494c 4520 7365 7473 2063 7573 746f 6d20 ILE sets custom \n-001b7ed0: 6874 7470 2063 6f6e 7465 6e74 203c 2f73 http content
    .
    ||\n-001b7f00: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send_raw(soap, buf\n-001b7fe0: 3c2f 613e 2c20 6c65 6e29 203c 7370 616e , len) // send image <\n-001b8010: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001b8030: 7c7c 203c 6120 636c 6173 733d 2263 6f64 || soap_end_send\n-001b8090: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001b80c0: 3c2f 613e 293c 2f64 6976 3e0a 3c64 6976 )
    . \n-001b80e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001b8100: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soap_clo\n-001b8160: 7365 736f 636b 3c2f 613e 283c 6120 636c sesock(soap);.
    r\n-001b81d0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK;.

    Fo\n-001b8260: 7220 636c 6965 6e74 2061 7070 6c69 6361 r client applica\n-001b8270: 7469 6f6e 7320 746f 2075 7365 2048 5454 tions to use HTT\n-001b8280: 5020 504f 5354 2c20 7573 6520 7468 6520 P POST, use the \n-001b8290: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_PO\n-001b8310: 5354 3c2f 613e 3c2f 636f 6465 3e20 6f70 ST op\n-001b8320: 6572 6174 696f 6e3a 3c2f 703e 0a3c 6469 eration:

    .
    struc\n-001b8370: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-001b83a0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new();\n-001b8440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... //.
    c\n-001b84b0: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *buf; // holds the\n-001b8530: 2048 5454 5020 7265 7175 6573 742f 7265 HTTP request/re\n-001b8540: 7370 6f6e 7365 2062 6f64 7920 6461 7461 sponse body data\n-001b8550: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001b8560: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b8570: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >size_\n-001b8590: 743c 2f73 7061 6e3e 206c 656e 3b20 3c73 t len; // length of\n-001b85c0: 2064 6174 6120 3c2f 7370 616e 3e3c 2f64 data .
    ... \n-001b8600: 2f2f 2070 6f70 756c 6174 6520 6275 6620 // populate buf \n-001b8610: 616e 6420 6c65 6e20 7769 7468 206d 6573 and len with mes\n-001b8620: 7361 6765 2074 6f20 7365 6e64 3c2f 7370 sage to send
    .
    if \n-001b8670: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_POST(<\n-001b86d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b86e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001b86f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001b8700: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001b8720: 743b 5552 4c26 7175 6f74 3b3c 2f73 7061 t;URL", \n-001b8750: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio\n-001b8760: 6e20 6f72 204e 554c 4c26 7175 6f74 3b3c n or NULL"<\n-001b8770: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "media \n-001b87a0: 7479 7065 2671 756f 743b 3c2f 7370 616e type")
    .
    || \n-001b87d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-001b8820: 736f 6170 5f73 656e 645f 7261 773c 2f61 soap_send_raw(soap, buf<\n-001b88b0: 2f61 3e2c 206c 656e 293b 203c 2f64 6976 /a>, len); .
    || soap_end\n-001b8930: 5f73 656e 643c 2f61 3e28 3c61 2063 6c61 _send(soap)) .
    ... \n-001b89a0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-001b89b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n-001b8aa0: 207c 7c20 283c 6120 636c 6173 733d 2263 || (bu\n-001b8af0: 663c 2f61 3e20 3d20 3c61 2063 6c61 7373 f = soap_htt\n-001b8b50: 705f 6765 745f 626f 6479 3c2f 613e 283c p_get_body(<\n-001b8b60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b8b70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001b8b80: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001b8b90: 2661 6d70 3b6c 656e 2929 203d 3d20 4e55 &len)) == NU\n-001b8ba0: 4c4c 3c2f 6469 763e 0a3c 6469 7620 636c LL
    .
    || <\n-001b8bc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b8bd0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b8be0: 705f 5f69 6f2e 6874 6d6c 2367 6138 3662 p__io.html#ga86b\n-001b8bf0: 3063 3034 6538 6261 6139 3131 6663 3537 0c04e8baa911fc57\n-001b8c00: 6537 6631 3232 3066 3965 6238 6622 3e73 e7f1220f9eb8f\">s\n-001b8c10: 6f61 705f 656e 645f 7265 6376 3c2f 613e oap_end_recv\n-001b8c20: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-001b8c50: 703c 2f61 3e29 2920 3c2f 6469 763e 0a3c p))
    .<\n-001b8c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b8c70: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-001b8c90: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    // ..\n-001b8cd0: 2e20 7573 6520 6275 665b 302e 2e6c 656e . use buf[0..len\n-001b8ce0: 2d31 5d20 3c2f 7370 616e 3e3c 2f64 6976 -1] ..
    i\n-001b8fd0: 6e74 2073 6f61 705f 6265 6769 6e5f 7265 nt soap_begin_re\n-001b8fe0: 6376 2873 7472 7563 7420 736f 6170 202a cv(struct soap *\n-001b8ff0: 736f 6170 293c 2f64 6976 3e3c 6469 7620 soap)
    In\n-001b9010: 6974 6961 6c69 7a65 2074 6865 2063 6f6e itialize the con\n-001b9020: 7465 7874 2066 6f72 2072 6563 6569 7669 text for receivi\n-001b9030: 6e67 2e3c 2f64 6976 3e3c 2f64 6976 3e0a ng.
    .\n-001b9040: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n-001b9090: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    in\n-001b9110: 7420 736f 6170 5f50 4f53 5428 7374 7275 t soap_POST(stru\n-001b9120: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-001b9130: 6f6e 7374 2063 6861 7220 2a65 6e64 706f onst char *endpo\n-001b9140: 696e 742c 2063 6f6e 7374 2063 6861 7220 int, const char \n-001b9150: 2a61 6374 696f 6e2c 2063 6f6e 7374 2063 *action, const c\n-001b9160: 6861 7220 2a74 7970 6529 3c2f 6469 763e har *type)
    \n-001b9170: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    HTTP POST con\n-001b9190: 7465 6e74 2074 6f20 7365 7276 6572 2e3c tent to server.<\n-001b91a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    Similarly,\n-001b91d0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_PU\n-001b9250: 543c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 T, soap_PAT\n-001b92e0: 4348 3c2f 613e 3c2f 636f 6465 3e2c 2061 CH, a\n-001b92f0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd \n-001b9370: 736f 6170 5f44 454c 4554 453c 2f61 3e3c soap_DELETE<\n-001b9380: 2f63 6f64 653e 2063 6f6d 6d61 6e64 7320 /code> commands \n-001b9390: 6172 6520 7072 6f76 6964 6564 2066 6f72 are provided for\n-001b93a0: 2050 5554 2c20 5041 5443 482c 2061 6e64 PUT, PATCH, and\n-001b93b0: 2044 454c 4554 4520 6861 6e64 6c69 6e67 DELETE handling\n-001b93c0: 2e3c 2f70 3e0a 3c70 3e54 6f20 7375 7070 .

    .

    To supp\n-001b93d0: 6f72 7420 4854 5450 2070 6970 656c 696e ort HTTP pipelin\n-001b93e0: 696e 6720 7765 2075 7365 2074 6865 203c ing we use the <\n-001b93f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>htt\n-001b9480: 705f 7069 7065 3c2f 613e 3c2f 636f 6465 p_pipe plugin, which \n-001b94a0: 6361 6e20 6265 2075 7365 6420 6174 2074 can be used at t\n-001b94b0: 6865 2073 6572 7665 7220 7369 6465 2074 he server side t\n-001b94c0: 6f20 656e 6162 6c65 2048 5454 5020 7069 o enable HTTP pi\n-001b94d0: 7065 6c69 6e69 6e67 2061 7574 6f6d 6174 pelining automat\n-001b94e0: 6963 616c 6c79 2c20 7768 656e 2072 6567 ically, when reg\n-001b94f0: 6973 7465 7265 642e 2054 6865 2070 6c75 istered. The plu\n-001b9500: 6769 6e20 6361 6e20 616c 736f 2062 6520 gin can also be \n-001b9510: 7573 6564 2061 7420 7468 6520 636c 6965 used at the clie\n-001b9520: 6e74 2073 6964 652c 2074 686f 7567 6820 nt side, though \n-001b9530: 7468 6973 2069 7320 6f6e 6c79 206e 6563 this is only nec\n-001b9540: 6573 7361 7279 2069 6e20 7363 656e 6172 essary in scenar\n-001b9550: 696f 7320 7468 6174 2072 6571 7569 7265 ios that require\n-001b9560: 2074 6865 2063 6c69 656e 7420 746f 2072 the client to r\n-001b9570: 6563 6569 7665 206d 756c 7469 706c 6520 eceive multiple \n-001b9580: 6d65 7373 6167 6573 2077 6974 686f 7574 messages without\n-001b9590: 2069 6e74 6572 6d69 7474 656e 6420 7365 intermittend se\n-001b95a0: 6e64 732c 2069 2e65 2e20 6d75 6c74 6970 nds, i.e. multip\n-001b95b0: 6c65 2073 656e 6473 2066 6f6c 6c6f 7765 le sends followe\n-001b95c0: 6420 6279 206d 756c 7469 706c 6520 7265 d by multiple re\n-001b95d0: 6365 6976 6573 2062 7920 7468 6520 7361 ceives by the sa\n-001b95e0: 6d65 2074 6872 6561 6420 7573 696e 6720 me thread using \n-001b95f0: 7468 6520 7361 6d65 203c 636f 6465 3e3c the same <\n-001b9600: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001b9610: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001b9620: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n-001b9630: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n-001b9640: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n-001b9650: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-001b9660: 7874 2e20 486f 7765 7665 722c 2063 6c69 xt. However, cli\n-001b9670: 656e 7473 2073 686f 756c 6420 7573 6520 ents should use \n-001b9680: 6d75 6c74 6970 6c65 2074 6872 6561 6473 multiple threads\n-001b9690: 2077 6865 6e20 4854 5450 2070 6970 656c when HTTP pipel\n-001b96a0: 696e 696e 6720 6973 2075 7365 6420 746f ining is used to\n-001b96b0: 2070 7265 7665 6e74 2062 6c6f 636b 696e prevent blockin\n-001b96c0: 672e 2053 6565 2074 6865 203c 656d 3e3c g. See the <\n-001b96d0: 636f 6465 3e67 736f 6170 2f73 616d 706c code>gsoap/sampl\n-001b96e0: 6573 2f61 7379 6e63 3c2f 636f 6465 3e3c es/async<\n-001b96f0: 2f65 6d3e 2066 6f6c 6465 7220 696e 2074 /em> folder in t\n-001b9700: 6865 2067 534f 4150 2070 6163 6b61 6765 he gSOAP package\n-001b9710: 2066 6f72 2065 7870 6c61 6e61 7469 6f6e for explanation\n-001b9720: 2061 6e64 2065 7861 6d70 6c65 732e 3c2f and examples..

    See also <\n-001b9740: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>http_post\n-001b97d0: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n-001b97e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 ht\n-001b9870: 7470 5f70 6970 653c 2f61 3e3c 2f63 6f64 tp_pipe.

    .

    .... \n-001b9890: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n-001b98a0: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n-001b98b0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..The H\n-001b98f0: 5454 5020 6469 6765 7374 2061 7574 6865 TTP digest authe\n-001b9900: 6e74 6963 6174 696f 6e20 706c 7567 696e ntication plugin\n-001b9910: 3c2f 6833 3e0a 3c70 3e54 6865 2048 5454 .

    The HTT\n-001b9920: 5020 6469 6765 7374 2061 7574 6865 6e74 P digest authent\n-001b9930: 6963 6174 696f 6e20 706c 7567 696e 2065 ication plugin e\n-001b9940: 6e61 626c 6573 2061 206d 6f72 6520 7365 nables a more se\n-001b9950: 6375 7265 2061 7574 6865 6e74 6963 6174 cure authenticat\n-001b9960: 696f 6e20 7363 6865 6d65 2063 6f6d 7061 ion scheme compa\n-001b9970: 7265 6420 746f 2062 6173 6963 2061 7574 red to basic aut\n-001b9980: 6865 6e74 6963 6174 696f 6e2e 2048 5454 hentication. HTT\n-001b9990: 5020 6261 7369 6320 6175 7468 656e 7469 P basic authenti\n-001b99a0: 6361 7469 6f6e 2073 656e 6473 2075 6e65 cation sends une\n-001b99b0: 6e63 7279 7074 6564 2075 7365 7269 6473 ncrypted userids\n-001b99c0: 2061 6e64 2070 6173 7377 6f72 6473 206f and passwords o\n-001b99d0: 7665 7220 7468 6520 6e65 742c 2077 6869 ver the net, whi\n-001b99e0: 6c65 2064 6967 6573 7420 6175 7468 656e le digest authen\n-001b99f0: 7469 6361 7469 6f6e 2064 6f65 7320 6e6f tication does no\n-001b9a00: 7420 6578 6368 616e 6765 2070 6173 7377 t exchange passw\n-001b9a10: 6f72 6473 2062 7574 2065 7863 6861 6e67 ords but exchang\n-001b9a20: 6573 2063 6865 636b 7375 6d73 206f 6620 es checksums of \n-001b9a30: 7061 7373 776f 7264 7320 2861 6e64 206f passwords (and o\n-001b9a40: 7468 6572 2064 6174 6120 7375 6368 2061 ther data such a\n-001b9a50: 7320 6e6f 6e63 6573 2074 6f20 6176 6f69 s nonces to avoi\n-001b9a60: 6420 7265 706c 6179 2061 7474 6163 6b73 d replay attacks\n-001b9a70: 292e 2046 6f72 206d 6f72 6520 6465 7461 ). For more deta\n-001b9a80: 696c 732c 2070 6c65 6173 6520 7365 6520 ils, please see \n-001b9a90: 5246 4320 3236 3137 2e3c 2f70 3e0a 3c70 RFC 2617.

    .The HTTP digest\n-001b9ab0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-001b9ac0: 6361 6e20 6265 2075 7365 6420 6e65 7874 can be used next\n-001b9ad0: 2074 6f20 7468 6520 6275 696c 742d 696e to the built-in\n-001b9ae0: 2062 6173 6963 2061 7574 6865 6e74 6963 basic authentic\n-001b9af0: 6174 696f 6e2c 206f 7220 6261 7369 6320 ation, or basic \n-001b9b00: 6175 7468 656e 7469 6361 7469 6f6e 2063 authentication c\n-001b9b10: 616e 2062 6520 7265 6a65 6374 6564 2074 an be rejected t\n-001b9b20: 6f20 7469 6768 7465 6e20 7365 6375 7269 o tighten securi\n-001b9b30: 7479 2e20 5468 6520 7365 7276 6572 206d ty. The server m\n-001b9b40: 7573 7420 6861 7665 2061 2064 6174 6162 ust have a datab\n-001b9b50: 6173 6520 7769 7468 2075 7365 7269 6427 ase with userid'\n-001b9b60: 7320 616e 6420 7061 7373 776f 7264 7320 s and passwords \n-001b9b70: 2869 6e20 706c 6169 6e20 7465 7874 2066 (in plain text f\n-001b9b80: 6f72 6d29 2e20 5468 6520 636c 6965 6e74 orm). The client\n-001b9b90: 2c20 7768 656e 2063 6861 6c6c 656e 6765 , when challenge\n-001b9ba0: 6420 6279 2074 6865 2073 6572 7665 722c d by the server,\n-001b9bb0: 2063 6865 636b 7320 7468 6520 6175 7468 checks the auth\n-001b9bc0: 656e 7469 6361 7469 6f6e 2072 6561 6c6d entication realm\n-001b9bd0: 2070 726f 7669 6465 6420 6279 2074 6865 provided by the\n-001b9be0: 2073 6572 7665 7220 616e 6420 7365 7473 server and sets\n-001b9bf0: 2074 6865 2075 7365 7269 6420 616e 6420 the userid and \n-001b9c00: 7061 7373 776f 7264 7320 666f 7220 6469 passwords for di\n-001b9c10: 6765 7374 2061 7574 6865 6e74 6963 6174 gest authenticat\n-001b9c20: 696f 6e2e 2054 6865 2063 6c69 656e 7420 ion. The client \n-001b9c30: 6170 706c 6963 6174 696f 6e20 6361 6e20 application can \n-001b9c40: 7465 6d70 6f72 6172 696c 7920 7374 6f72 temporarily stor\n-001b9c50: 6520 7468 6520 7573 6572 6964 2061 6e64 e the userid and\n-001b9c60: 2070 6173 7377 6f72 6420 666f 7220 6120 password for a \n-001b9c70: 7365 7175 656e 6365 206f 6620 6d65 7373 sequence of mess\n-001b9c80: 6167 6520 6578 6368 616e 6765 7320 7769 age exchanges wi\n-001b9c90: 7468 2074 6865 2073 6572 7665 722c 2077 th the server, w\n-001b9ca0: 6869 6368 2069 7320 6661 7374 6572 2074 hich is faster t\n-001b9cb0: 6861 6e20 7265 7065 6174 6564 2061 7574 han repeated aut\n-001b9cc0: 686f 7269 7a61 7469 6f6e 2063 6861 6c6c horization chall\n-001b9cd0: 656e 6765 7320 616e 6420 6175 7468 656e enges and authen\n-001b9ce0: 7469 6361 7469 6f6e 2072 6573 706f 6e73 tication respons\n-001b9cf0: 6573 2e3c 2f70 3e0a 3c70 3e41 7420 7468 es.

    .

    At th\n-001b9d00: 6520 636c 6965 6e74 2073 6964 652c 2074 e client side, t\n-001b9d10: 6865 2070 6c75 6769 6e20 6973 2072 6567 he plugin is reg\n-001b9d20: 6973 7465 7265 6420 616e 6420 7365 7276 istered and serv\n-001b9d30: 6963 6520 696e 766f 6361 7469 6f6e 7320 ice invocations \n-001b9d40: 6172 6520 6368 6563 6b65 6420 666f 7220 are checked for \n-001b9d50: 6175 7468 6f72 697a 6174 696f 6e20 6368 authorization ch\n-001b9d60: 616c 6c65 6e67 6573 2028 4854 5450 2065 allenges (HTTP e\n-001b9d70: 7272 6f72 2063 6f64 6520 3430 3129 2e20 rror code 401). \n-001b9d80: 5768 656e 2074 6865 2073 6572 7665 7220 When the server \n-001b9d90: 6368 616c 6c65 6e67 6573 2074 6865 2063 challenges the c\n-001b9da0: 6c69 656e 742c 2074 6865 2063 6c69 656e lient, the clien\n-001b9db0: 7420 7368 6f75 6c64 2073 6574 2074 6865 t should set the\n-001b9dc0: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass\n-001b9dd0: 776f 7264 2061 6e64 2072 6574 7279 2074 word and retry t\n-001b9de0: 6865 2069 6e76 6f63 6174 696f 6e2e 2054 he invocation. T\n-001b9df0: 6865 2063 6c69 656e 7420 6361 6e20 6465 he client can de\n-001b9e00: 7465 726d 696e 6520 7468 6520 7573 6572 termine the user\n-001b9e10: 6964 2061 6e64 2070 6173 7377 6f72 6420 id and password \n-001b9e20: 6261 7365 6420 6f6e 2074 6865 2061 7574 based on the aut\n-001b9e30: 6865 6e74 6963 6174 696f 6e20 7265 616c hentication real\n-001b9e40: 6d20 7061 7274 206f 6620 7468 6520 7365 m part of the se\n-001b9e50: 7276 6572 2773 2063 6861 6c6c 656e 6765 rver's challenge\n-001b9e60: 2e20 5468 6520 6175 7468 656e 7469 6361 . The authentica\n-001b9e70: 7469 6f6e 2069 6e66 6f72 6d61 7469 6f6e tion information\n-001b9e80: 2063 616e 2062 6520 7465 6d70 6f72 6172 can be temporar\n-001b9e90: 696c 7920 7361 7665 6420 666f 7220 6d75 ily saved for mu\n-001b9ea0: 6c74 6970 6c65 2069 6e76 6f63 6174 696f ltiple invocatio\n-001b9eb0: 6e73 2e3c 2f70 3e0a 3c70 3e43 6c69 656e ns.

    .

    Clien\n-001b9ec0: 742d 7369 6465 2065 7861 6d70 6c65 3a3c t-side example:<\n-001b9ed0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #include \n-001b9f20: 2671 756f 743b 6874 7470 6461 2e68 2671 "httpda.h&q\n-001b9f30: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot;
    \n+001b79d0: 736f 6170 5f74 6167 5f63 6d70 3c2f 613e soap_tag_cmp\n+001b79e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n+001b7a00: 6170 5f74 6167 5f63 6d70 2863 6f6e 7374 ap_tag_cmp(const\n+001b7a10: 2063 6861 7220 2a73 7472 696e 672c 2063 char *string, c\n+001b7a20: 6f6e 7374 2063 6861 7220 2a70 6174 7465 onst char *patte\n+001b7a30: 726e 293c 2f64 6976 3e3c 6469 7620 636c rn)
    Comp\n+001b7a50: 6172 6520 7374 7269 6e67 2074 6f20 6120 are string to a \n+001b7a60: 7061 7474 6572 6e2e 3c2f 6469 763e 3c2f pattern.
    .

    T\n+001b7a90: 6865 2061 626f 7665 2065 7861 6d70 6c65 he above example\n+001b7aa0: 2072 6574 7572 6e73 2048 5454 5020 4f4b returns HTTP OK\n+001b7ab0: 2e20 4966 2063 6f6e 7465 6e74 2069 7320 . If content is \n+001b7ac0: 7375 7070 6f73 6564 2074 6f20 6265 2072 supposed to be r\n+001b7ad0: 6574 7572 6e65 642c 2074 6865 6e20 7573 eturned, then us\n+001b7ae0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+001b7b10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b7b20: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+001b7b90: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+001b7bf0: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    \n+001b7c00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... //<\n+001b7c30: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001b7c50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b7c60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b7c70: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001b7c80: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;http\n+001b7cd0: 5f63 6f6e 7465 6e74 3c2f 613e 203d 203c _content = <\n+001b7ce0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001b7cf0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001b7d00: 3b69 6d61 6765 2f6a 7065 6726 7175 6f74 ;image/jpeg"\n+001b7d10: 3b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 ;; \n+001b7d30: 2f2f 2061 206a 7065 6720 696d 6167 6520 // a jpeg image \n+001b7d40: 746f 2072 6574 7572 6e20 6261 636b 203c to return back <\n+001b7d50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001b7d70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b7d80: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_respons\n+001b7df0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n+001b7e20: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_FILE\n+001b7e80: 3c2f 613e 2929 203c 7370 616e 2063 6c61 )) // \n+001b7ea0: 534f 4150 5f46 494c 4520 7365 7473 2063 SOAP_FILE sets c\n+001b7eb0: 7573 746f 6d20 6874 7470 2063 6f6e 7465 ustom http conte\n+001b7ec0: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    \n+001b7ed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    || soap_send\n+001b7f40: 5f72 6177 3c2f 613e 283c 6120 636c 6173 _raw(\n+001b7f70: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, buf, len)\n+001b7fd0: 203c 7370 616e 2063 6c61 7373 3d22 636f // send i\n+001b7ff0: 6d61 6765 203c 2f73 7061 6e3e 3c2f 6469 mage .
    || soap_en\n+001b8070: 645f 7365 6e64 3c2f 613e 283c 6120 636c d_send(soap).
    \n+001b80e0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return so\n+001b8140: 6170 5f63 6c6f 7365 736f 636b 3c2f 613e ap_closesock\n+001b8150: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b8180: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    return SOAP_OK;
    .
    \n+001b8230: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Simi\n+001b91b0: 6c61 726c 792c 203c 636f 6465 3e3c 6120 larly, s\n+001b9230: 6f61 705f 5055 543c 2f61 3e3c 2f63 6f64 oap_PUT, so\n+001b92c0: 6170 5f50 4154 4348 3c2f 613e 3c2f 636f ap_PATCH, and <\n+001b92e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001b92f0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001b9300: 5f69 6f2e 6874 6d6c 2367 6139 3865 3633 _io.html#ga98e63\n+001b9310: 6636 3936 3964 3264 3833 6133 3166 3137 f6969d2d83a31f17\n+001b9320: 3837 3238 6130 3163 3763 6322 2074 6974 8728a01c7cc\" tit\n+001b9330: 6c65 3d22 4854 5450 2044 454c 4554 4520 le=\"HTTP DELETE \n+001b9340: 636f 6e74 656e 7420 6672 6f6d 2073 6572 content from ser\n+001b9350: 7665 722e 223e 736f 6170 5f44 454c 4554 ver.\">soap_DELET\n+001b9360: 453c 2f61 3e3c 2f63 6f64 653e 2063 6f6d E com\n+001b9370: 6d61 6e64 7320 6172 6520 7072 6f76 6964 mands are provid\n+001b9380: 6564 2066 6f72 2050 5554 2c20 5041 5443 ed for PUT, PATC\n+001b9390: 482c 2061 6e64 2044 454c 4554 4520 6861 H, and DELETE ha\n+001b93a0: 6e64 6c69 6e67 2e3c 2f70 3e0a 3c70 3e54 ndling.

    .

    T\n+001b93b0: 6f20 7375 7070 6f72 7420 4854 5450 2070 o support HTTP p\n+001b93c0: 6970 656c 696e 696e 6720 7765 2075 7365 ipelining we use\n+001b93d0: 2074 6865 203c 636f 6465 3e3c 6120 636c the http_pipe\n+001b9470: 3c2f 636f 6465 3e20 706c 7567 696e 2c20 plugin, \n+001b9480: 7768 6963 6820 6361 6e20 6265 2075 7365 which can be use\n+001b9490: 6420 6174 2074 6865 2073 6572 7665 7220 d at the server \n+001b94a0: 7369 6465 2074 6f20 656e 6162 6c65 2048 side to enable H\n+001b94b0: 5454 5020 7069 7065 6c69 6e69 6e67 2061 TTP pipelining a\n+001b94c0: 7574 6f6d 6174 6963 616c 6c79 2c20 7768 utomatically, wh\n+001b94d0: 656e 2072 6567 6973 7465 7265 642e 2054 en registered. T\n+001b94e0: 6865 2070 6c75 6769 6e20 6361 6e20 616c he plugin can al\n+001b94f0: 736f 2062 6520 7573 6564 2061 7420 7468 so be used at th\n+001b9500: 6520 636c 6965 6e74 2073 6964 652c 2074 e client side, t\n+001b9510: 686f 7567 6820 7468 6973 2069 7320 6f6e hough this is on\n+001b9520: 6c79 206e 6563 6573 7361 7279 2069 6e20 ly necessary in \n+001b9530: 7363 656e 6172 696f 7320 7468 6174 2072 scenarios that r\n+001b9540: 6571 7569 7265 2074 6865 2063 6c69 656e equire the clien\n+001b9550: 7420 746f 2072 6563 6569 7665 206d 756c t to receive mul\n+001b9560: 7469 706c 6520 6d65 7373 6167 6573 2077 tiple messages w\n+001b9570: 6974 686f 7574 2069 6e74 6572 6d69 7474 ithout intermitt\n+001b9580: 656e 6420 7365 6e64 732c 2069 2e65 2e20 end sends, i.e. \n+001b9590: 6d75 6c74 6970 6c65 2073 656e 6473 2066 multiple sends f\n+001b95a0: 6f6c 6c6f 7765 6420 6279 206d 756c 7469 ollowed by multi\n+001b95b0: 706c 6520 7265 6365 6976 6573 2062 7920 ple receives by \n+001b95c0: 7468 6520 7361 6d65 2074 6872 6561 6420 the same thread \n+001b95d0: 7573 696e 6720 7468 6520 7361 6d65 203c using the same <\n+001b95e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+001b9640: 2063 6f6e 7465 7874 2e20 486f 7765 7665 context. Howeve\n+001b9650: 722c 2063 6c69 656e 7473 2073 686f 756c r, clients shoul\n+001b9660: 6420 7573 6520 6d75 6c74 6970 6c65 2074 d use multiple t\n+001b9670: 6872 6561 6473 2077 6865 6e20 4854 5450 hreads when HTTP\n+001b9680: 2070 6970 656c 696e 696e 6720 6973 2075 pipelining is u\n+001b9690: 7365 6420 746f 2070 7265 7665 6e74 2062 sed to prevent b\n+001b96a0: 6c6f 636b 696e 672e 2053 6565 2074 6865 locking. See the\n+001b96b0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+001b96c0: 2f73 616d 706c 6573 2f61 7379 6e63 3c2f /samples/async folde\n+001b96e0: 7220 696e 2074 6865 2067 534f 4150 2070 r in the gSOAP p\n+001b96f0: 6163 6b61 6765 2066 6f72 2065 7870 6c61 ackage for expla\n+001b9700: 6e61 7469 6f6e 2061 6e64 2065 7861 6d70 nation and examp\n+001b9710: 6c65 732e 3c2f 703e 0a3c 703e 5365 6520 les.

    .

    See \n+001b9720: 616c 736f 203c 636f 6465 3e3c 6120 636c also htt\n+001b97b0: 705f 706f 7374 3c2f 613e 3c2f 636f 6465 p_post and http_pipe.

    ..... Back to table \n+001b9890: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n+001b98a0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+001b98d0: 0a54 6865 2048 5454 5020 6469 6765 7374 .The HTTP digest\n+001b98e0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001b98f0: 706c 7567 696e 3c2f 6833 3e0a 3c70 3e54 plugin

    .

    T\n+001b9900: 6865 2048 5454 5020 6469 6765 7374 2061 he HTTP digest a\n+001b9910: 7574 6865 6e74 6963 6174 696f 6e20 706c uthentication pl\n+001b9920: 7567 696e 2065 6e61 626c 6573 2061 206d ugin enables a m\n+001b9930: 6f72 6520 7365 6375 7265 2061 7574 6865 ore secure authe\n+001b9940: 6e74 6963 6174 696f 6e20 7363 6865 6d65 ntication scheme\n+001b9950: 2063 6f6d 7061 7265 6420 746f 2062 6173 compared to bas\n+001b9960: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio\n+001b9970: 6e2e 2048 5454 5020 6261 7369 6320 6175 n. HTTP basic au\n+001b9980: 7468 656e 7469 6361 7469 6f6e 2073 656e thentication sen\n+001b9990: 6473 2075 6e65 6e63 7279 7074 6564 2075 ds unencrypted u\n+001b99a0: 7365 7269 6473 2061 6e64 2070 6173 7377 serids and passw\n+001b99b0: 6f72 6473 206f 7665 7220 7468 6520 6e65 ords over the ne\n+001b99c0: 742c 2077 6869 6c65 2064 6967 6573 7420 t, while digest \n+001b99d0: 6175 7468 656e 7469 6361 7469 6f6e 2064 authentication d\n+001b99e0: 6f65 7320 6e6f 7420 6578 6368 616e 6765 oes not exchange\n+001b99f0: 2070 6173 7377 6f72 6473 2062 7574 2065 passwords but e\n+001b9a00: 7863 6861 6e67 6573 2063 6865 636b 7375 xchanges checksu\n+001b9a10: 6d73 206f 6620 7061 7373 776f 7264 7320 ms of passwords \n+001b9a20: 2861 6e64 206f 7468 6572 2064 6174 6120 (and other data \n+001b9a30: 7375 6368 2061 7320 6e6f 6e63 6573 2074 such as nonces t\n+001b9a40: 6f20 6176 6f69 6420 7265 706c 6179 2061 o avoid replay a\n+001b9a50: 7474 6163 6b73 292e 2046 6f72 206d 6f72 ttacks). For mor\n+001b9a60: 6520 6465 7461 696c 732c 2070 6c65 6173 e details, pleas\n+001b9a70: 6520 7365 6520 5246 4320 3236 3137 2e3c e see RFC 2617.<\n+001b9a80: 2f70 3e0a 3c70 3e54 6865 2048 5454 5020 /p>.

    The HTTP \n+001b9a90: 6469 6765 7374 2061 7574 6865 6e74 6963 digest authentic\n+001b9aa0: 6174 696f 6e20 6361 6e20 6265 2075 7365 ation can be use\n+001b9ab0: 6420 6e65 7874 2074 6f20 7468 6520 6275 d next to the bu\n+001b9ac0: 696c 742d 696e 2062 6173 6963 2061 7574 ilt-in basic aut\n+001b9ad0: 6865 6e74 6963 6174 696f 6e2c 206f 7220 hentication, or \n+001b9ae0: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica\n+001b9af0: 7469 6f6e 2063 616e 2062 6520 7265 6a65 tion can be reje\n+001b9b00: 6374 6564 2074 6f20 7469 6768 7465 6e20 cted to tighten \n+001b9b10: 7365 6375 7269 7479 2e20 5468 6520 7365 security. The se\n+001b9b20: 7276 6572 206d 7573 7420 6861 7665 2061 rver must have a\n+001b9b30: 2064 6174 6162 6173 6520 7769 7468 2075 database with u\n+001b9b40: 7365 7269 6427 7320 616e 6420 7061 7373 serid's and pass\n+001b9b50: 776f 7264 7320 2869 6e20 706c 6169 6e20 words (in plain \n+001b9b60: 7465 7874 2066 6f72 6d29 2e20 5468 6520 text form). The \n+001b9b70: 636c 6965 6e74 2c20 7768 656e 2063 6861 client, when cha\n+001b9b80: 6c6c 656e 6765 6420 6279 2074 6865 2073 llenged by the s\n+001b9b90: 6572 7665 722c 2063 6865 636b 7320 7468 erver, checks th\n+001b9ba0: 6520 6175 7468 656e 7469 6361 7469 6f6e e authentication\n+001b9bb0: 2072 6561 6c6d 2070 726f 7669 6465 6420 realm provided \n+001b9bc0: 6279 2074 6865 2073 6572 7665 7220 616e by the server an\n+001b9bd0: 6420 7365 7473 2074 6865 2075 7365 7269 d sets the useri\n+001b9be0: 6420 616e 6420 7061 7373 776f 7264 7320 d and passwords \n+001b9bf0: 666f 7220 6469 6765 7374 2061 7574 6865 for digest authe\n+001b9c00: 6e74 6963 6174 696f 6e2e 2054 6865 2063 ntication. The c\n+001b9c10: 6c69 656e 7420 6170 706c 6963 6174 696f lient applicatio\n+001b9c20: 6e20 6361 6e20 7465 6d70 6f72 6172 696c n can temporaril\n+001b9c30: 7920 7374 6f72 6520 7468 6520 7573 6572 y store the user\n+001b9c40: 6964 2061 6e64 2070 6173 7377 6f72 6420 id and password \n+001b9c50: 666f 7220 6120 7365 7175 656e 6365 206f for a sequence o\n+001b9c60: 6620 6d65 7373 6167 6520 6578 6368 616e f message exchan\n+001b9c70: 6765 7320 7769 7468 2074 6865 2073 6572 ges with the ser\n+001b9c80: 7665 722c 2077 6869 6368 2069 7320 6661 ver, which is fa\n+001b9c90: 7374 6572 2074 6861 6e20 7265 7065 6174 ster than repeat\n+001b9ca0: 6564 2061 7574 686f 7269 7a61 7469 6f6e ed authorization\n+001b9cb0: 2063 6861 6c6c 656e 6765 7320 616e 6420 challenges and \n+001b9cc0: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r\n+001b9cd0: 6573 706f 6e73 6573 2e3c 2f70 3e0a 3c70 esponses.

    .At the client s\n+001b9cf0: 6964 652c 2074 6865 2070 6c75 6769 6e20 ide, the plugin \n+001b9d00: 6973 2072 6567 6973 7465 7265 6420 616e is registered an\n+001b9d10: 6420 7365 7276 6963 6520 696e 766f 6361 d service invoca\n+001b9d20: 7469 6f6e 7320 6172 6520 6368 6563 6b65 tions are checke\n+001b9d30: 6420 666f 7220 6175 7468 6f72 697a 6174 d for authorizat\n+001b9d40: 696f 6e20 6368 616c 6c65 6e67 6573 2028 ion challenges (\n+001b9d50: 4854 5450 2065 7272 6f72 2063 6f64 6520 HTTP error code \n+001b9d60: 3430 3129 2e20 5768 656e 2074 6865 2073 401). When the s\n+001b9d70: 6572 7665 7220 6368 616c 6c65 6e67 6573 erver challenges\n+001b9d80: 2074 6865 2063 6c69 656e 742c 2074 6865 the client, the\n+001b9d90: 2063 6c69 656e 7420 7368 6f75 6c64 2073 client should s\n+001b9da0: 6574 2074 6865 2075 7365 7269 6420 616e et the userid an\n+001b9db0: 6420 7061 7373 776f 7264 2061 6e64 2072 d password and r\n+001b9dc0: 6574 7279 2074 6865 2069 6e76 6f63 6174 etry the invocat\n+001b9dd0: 696f 6e2e 2054 6865 2063 6c69 656e 7420 ion. The client \n+001b9de0: 6361 6e20 6465 7465 726d 696e 6520 7468 can determine th\n+001b9df0: 6520 7573 6572 6964 2061 6e64 2070 6173 e userid and pas\n+001b9e00: 7377 6f72 6420 6261 7365 6420 6f6e 2074 sword based on t\n+001b9e10: 6865 2061 7574 6865 6e74 6963 6174 696f he authenticatio\n+001b9e20: 6e20 7265 616c 6d20 7061 7274 206f 6620 n realm part of \n+001b9e30: 7468 6520 7365 7276 6572 2773 2063 6861 the server's cha\n+001b9e40: 6c6c 656e 6765 2e20 5468 6520 6175 7468 llenge. The auth\n+001b9e50: 656e 7469 6361 7469 6f6e 2069 6e66 6f72 entication infor\n+001b9e60: 6d61 7469 6f6e 2063 616e 2062 6520 7465 mation can be te\n+001b9e70: 6d70 6f72 6172 696c 7920 7361 7665 6420 mporarily saved \n+001b9e80: 666f 7220 6d75 6c74 6970 6c65 2069 6e76 for multiple inv\n+001b9e90: 6f63 6174 696f 6e73 2e3c 2f70 3e0a 3c70 ocations.

    .Client-side exa\n+001b9eb0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    \n+001b9ed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+001b9f00: 636c 7564 6520 2671 756f 743b 6874 7470 clude "http\n+001b9f10: 6461 2e68 2671 756f 743b 3c2f 7370 616e da.h"
    .
    .
    .<\n-001b9f70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b9f80: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
    \n+001b9f50: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine\">i\n+001b9f70: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main()\n+001b9f80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n 001b9fa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-001b9fd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b9fe0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-001ba050: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-001ba0b0: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    \n-001ba0c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001ba0f0: 663c 2f73 7061 6e3e 203c 6120 636c 6173 f soa\n-001ba150: 705f 7265 6769 7374 6572 5f70 6c75 6769 p_register_plugi\n-001ba160: 6e3c 2f61 3e28 3c61 2063 6c61 7373 3d22 n(soa\n-001ba190: 703c 2f61 3e2c 2068 7474 705f 6461 2929 p, http_da))\n-001ba1a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ex\n-001ba1c0: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE)\n-001ba1d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // faile\n-001ba1f0: 6420 746f 2072 6567 6973 7465 7220 3c2f d to register
    . \n-001ba220: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-001ba250: 735f 5f77 6562 6d65 7468 6f64 283c 6120 s__webmethod(soap, ..\n-001ba290: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
    .
    {\n-001ba2b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if\n-001ba2f0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e\n-001ba370: 7272 6f72 3c2f 613e 203d 3d20 3430 3129 rror == 401)\n-001ba380: 203c 7370 616e 2063 6c61 7373 3d22 636f // challe\n-001ba3a0: 6e67 653a 2048 5454 5020 6175 7468 656e nge: HTTP authen\n-001ba3b0: 7469 6361 7469 6f6e 2072 6571 7569 7265 tication require\n-001ba3c0: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n-001ba3d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n-001ba400: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-001ba420: 6966 3c2f 7370 616e 3e20 2821 7374 7263 if (!strc\n-001ba430: 6d70 283c 6120 636c 6173 733d 2263 6f64 mp(soap->\n-001ba4b0: 6175 7468 7265 616c 6d3c 2f61 3e2c 203c authrealm, <\n-001ba4c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001ba4d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001ba4e0: 6874 6d6c 2361 3864 6265 3537 6435 3966 html#a8dbe57d59f\n-001ba4f0: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7\n-001ba500: 3933 3962 6664 223e 6175 7468 7265 616c 939bfd\">authreal\n-001ba510: 6d3c 2f61 3e29 2920 3c73 7061 6e20 636c m)) //\n-001ba530: 206f 7074 696f 6e61 6c6c 7920 6465 7465 optionally dete\n-001ba540: 726d 696e 6520 6175 7468 656e 7469 6361 rmine authentica\n-001ba550: 7469 6f6e 2072 6561 6c6d 3c2f 7370 616e tion realm
    .
    \n-001ba580: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001ba5a0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-001ba5c0: 2f73 7061 6e3e 6874 7470 5f64 615f 696e /span>http_da_in\n-001ba5d0: 666f 2069 6e66 6f3b 203c 7370 616e 2063 fo info; /\n-001ba5f0: 2f20 746f 2073 746f 7265 2075 7365 7269 / to store useri\n-001ba600: 6420 616e 6420 7061 7373 7764 203c 2f73 d and passwd
    .
    \n-001ba630: 2020 2020 2068 7474 705f 6461 5f73 6176 http_da_sav\n-001ba640: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap, &info, au\n-001ba680: 7468 7265 616c 6d2c 2075 7365 7269 642c threalm, userid,\n-001ba690: 2070 6173 7377 6429 3b20 3c73 7061 6e20 passwd); \n-001ba6b0: 2f2f 2073 6574 2075 7365 7269 6420 616e // set userid an\n-001ba6c0: 6420 7061 7373 7764 2066 6f72 2074 6869 d passwd for thi\n-001ba6d0: 7320 7265 616c 6d3c 2f73 7061 6e3e 3c2f s realm..\n-001ba7a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {.
    ..\n-001ba7e0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    \n-001ba820: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_en\n-001ba880: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa\n-001ba8b0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); //\n-001ba8d0: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass\n-001ba8e0: 7764 2077 6572 6520 6465 616c 6c6f 6361 wd were dealloca\n-001ba8f0: 7465 6420 3c2f 7370 616e 3e3c 2f64 6976 ted .
    ht\n-001ba920: 7470 5f64 615f 7265 7374 6f72 6528 3c61 tp_da_restore(soap, &\n-001ba960: 616d 703b 696e 666f 293b 203c 7370 616e amp;info); // restore user\n-001ba990: 6964 2061 6e64 2070 6173 7377 6420 3c2f id and passwd
    . \n-001ba9c0: 2020 2020 2020 2020 3c73 7061 6e20 636c if (!so\n-001ba9f0: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n-001baa00: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa\n-001baa30: 703c 2f61 3e2c 202e 2e2e 2929 203c 7370 p, ...)) // another ca\n-001baa60: 6c6c 203c 2f73 7061 6e3e 3c2f 6469 763e ll
    \n-001baa70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .\n-001baa90: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
    .
    \n-001baad0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    \n-001baaf0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    \n-001bab10: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    }.
    http_da\n-001bab50: 5f72 656c 6561 7365 283c 6120 636c 6173 _release(\n-001bab80: 736f 6170 3c2f 613e 2c20 2661 6d70 3b69 soap, &i\n-001bab90: 6e66 6f29 3b20 3c73 7061 6e20 636c 6173 nfo); // t\n-001babb0: 6f20 7265 6d6f 7665 2061 6c6c 2075 7365 o remove all use\n-001babc0: 7269 6420 616e 6420 7061 7373 7764 3c2f rid and passwd
    . \n-001babf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n-001bac50: 793c 2f61 3e28 3c61 2063 6c61 7373 3d22 y(soa\n-001bac80: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-001baca0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n-001bad00: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001bad30: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    . \n-001bad50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
    .
    }.

    T\n-001bae20: 6869 7320 636f 6465 2073 7570 706f 7274 his code support\n-001bae30: 7320 626f 7468 2062 6173 6963 2061 6e64 s both basic and\n-001bae40: 2064 6967 6573 7420 6175 7468 656e 7469 digest authenti\n-001bae50: 6361 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 cation.

    .

    T\n-001bae60: 6865 2073 6572 7665 7220 6361 6e20 6368 he server can ch\n-001bae70: 616c 6c65 6e67 6520 6120 636c 6965 6e74 allenge a client\n-001bae80: 2075 7369 6e67 2048 5454 5020 636f 6465 using HTTP code\n-001bae90: 2034 3031 2e20 5769 7468 2074 6865 2070 401. With the p\n-001baea0: 6c75 6769 6e2c 2048 5454 5020 6469 6765 lugin, HTTP dige\n-001baeb0: 7374 2061 7574 6865 6e74 6963 6174 696f st authenticatio\n-001baec0: 6e20 6368 616c 6c65 6e67 6573 2061 7265 n challenges are\n-001baed0: 2073 656e 642e 2057 6974 686f 7574 2074 send. Without t\n-001baee0: 6865 2070 6c75 6769 6e2c 2062 6173 6963 he plugin, basic\n-001baef0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-001baf00: 6368 616c 6c65 6e67 6573 2061 7265 2073 challenges are s\n-001baf10: 656e 642e 3c2f 703e 0a3c 703e 4561 6368 end.

    .

    Each\n-001baf20: 2073 6572 7665 7220 6d65 7468 6f64 2063 server method c\n-001baf30: 616e 2069 6d70 6c65 6d65 6e74 2061 7574 an implement aut\n-001baf40: 6865 6e74 6963 6174 696f 6e20 6173 2064 hentication as d\n-001baf50: 6573 6972 6564 2061 6e64 206d 6179 2065 esired and may e\n-001baf60: 6e66 6f72 6365 2064 6967 6573 7420 6175 nforce digest au\n-001baf70: 7468 656e 7469 6361 7469 6f6e 206f 7220 thentication or \n-001baf80: 6d61 7920 616c 736f 2061 6363 6570 7420 may also accept \n-001baf90: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica\n-001bafa0: 7469 6f6e 2072 6573 706f 6e73 6573 2e20 tion responses. \n-001bafb0: 546f 2076 6572 6966 7920 6469 6765 7374 To verify digest\n-001bafc0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-001bafd0: 7265 7370 6f6e 7365 732c 2074 6865 2073 responses, the s\n-001bafe0: 6572 7665 7220 7368 6f75 6c64 2063 6f6d erver should com\n-001baff0: 7075 7465 2061 6e64 2063 6f6d 7061 7265 pute and compare\n-001bb000: 2074 6865 2063 6865 636b 7375 6d73 2075 the checksums u\n-001bb010: 7369 6e67 2074 6865 2070 6c75 6769 6e27 sing the plugin'\n-001bb020: 7320 3c63 6f64 653e 6874 7470 5f64 615f s http_da_\n-001bb030: 7665 7269 6679 5f70 6f73 743c 2f63 6f64 verify_post function for \n-001bb050: 4854 5450 2050 4f53 5420 7265 7175 6573 HTTP POST reques\n-001bb060: 7473 2028 616e 6420 3c63 6f64 653e 6874 ts (and ht\n-001bb070: 7470 5f64 615f 7665 7269 6679 5f67 6574 tp_da_verify_get\n-001bb080: 3c2f 636f 6465 3e20 666f 7220 4854 5450 for HTTP\n-001bb090: 2047 4554 2072 6571 7565 7374 7320 7769 GET requests wi\n-001bb0a0: 7468 2074 6865 2048 5454 5020 4745 5420 th the HTTP GET \n-001bb0b0: 706c 7567 696e 2920 6173 2066 6f6c 6c6f plugin) as follo\n-001bb0c0: 7773 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ws:

    .
    .
    if <\n+001ba0e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001ba0f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001ba100: 705f 5f70 6c75 6769 6e2e 6874 6d6c 2367 p__plugin.html#g\n+001ba110: 6164 3634 3565 3561 3538 6564 3434 3266 ad645e5a58ed442f\n+001ba120: 6534 3735 3364 6363 3233 3338 6338 6264 e4753dcc2338c8bd\n+001ba130: 6222 3e73 6f61 705f 7265 6769 7374 6572 b\">soap_register\n+001ba140: 5f70 6c75 6769 6e3c 2f61 3e28 3c61 2063 _plugin(soap, htt\n+001ba180: 705f 6461 2929 203c 2f64 6976 3e0a 3c64 p_da))
    .\n+001ba1a0: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n+001ba1b0: 494c 5552 4529 3b20 3c73 7061 6e20 636c ILURE); //\n+001ba1d0: 2066 6169 6c65 6420 746f 2072 6567 6973 failed to regis\n+001ba1e0: 7465 7220 3c2f 7370 616e 3e3c 2f64 6976 ter .
    \n+001ba220: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+001ba230: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n+001ba240: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    \n+001ba280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+001ba2b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n+001ba2d0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (
    s\n+001ba300: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error =\n+001ba360: 3d20 3430 3129 203c 7370 616e 2063 6c61 = 401) // \n+001ba380: 6368 616c 6c65 6e67 653a 2048 5454 5020 challenge: HTTP \n+001ba390: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r\n+001ba3a0: 6571 7569 7265 6420 3c2f 7370 616e 3e3c equired <\n+001ba3b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    if \n+001ba410: 2821 7374 7263 6d70 283c 6120 636c 6173 (!strcmp(\n+001ba440: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->authrealm<\n+001ba4a0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, au\n+001ba4f0: 7468 7265 616c 6d3c 2f61 3e29 2920 3c73 threalm)) // optionall\n+001ba520: 7920 6465 7465 726d 696e 6520 6175 7468 y determine auth\n+001ba530: 656e 7469 6361 7469 6f6e 2072 6561 6c6d entication realm\n+001ba540: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001ba560: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    .\n+001ba580: 2020 2020 2020 2020 3c73 7061 6e20 636c st\n+001ba5a0: 7275 6374 203c 2f73 7061 6e3e 6874 7470 ruct http\n+001ba5b0: 5f64 615f 696e 666f 2069 6e66 6f3b 203c _da_info info; <\n+001ba5c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001ba5d0: 656e 7422 3e2f 2f20 746f 2073 746f 7265 ent\">// to store\n+001ba5e0: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass\n+001ba5f0: 7764 203c 2f73 7061 6e3e 3c2f 6469 763e wd
    \n+001ba600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    http_\n+001ba620: 6461 5f73 6176 6528 3c61 2063 6c61 7373 da_save(s\n+001ba650: 6f61 703c 2f61 3e2c 2026 616d 703b 696e oap, &in\n+001ba660: 666f 2c20 6175 7468 7265 616c 6d2c 2075 fo, authrealm, u\n+001ba670: 7365 7269 642c 2070 6173 7377 6429 3b20 serid, passwd); \n+001ba680: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set use\n+001ba6a0: 7269 6420 616e 6420 7061 7373 7764 2066 rid and passwd f\n+001ba6b0: 6f72 2074 6869 7320 7265 616c 6d3c 2f73 or this realm
    .
    \n+001ba6e0: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+001ba700: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n+001ba710: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n+001ba720: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap, ...)) /\n+001ba770: 2f20 7265 7472 7920 3c2f 7370 616e 3e3c / retry <\n+001ba780: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+001ba7a0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n+001ba7c0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+001ba7e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001ba800: 2020 2020 2020 2020 2020 3c61 2063 6c61
    s\n+001ba860: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); // userid an\n+001ba8c0: 6420 7061 7373 7764 2077 6572 6520 6465 d passwd were de\n+001ba8d0: 616c 6c6f 6361 7465 6420 3c2f 7370 616e allocated
    .
    \n+001ba900: 2020 2020 6874 7470 5f64 615f 7265 7374 http_da_rest\n+001ba910: 6f72 6528 3c61 2063 6c61 7373 3d22 636f ore(soap<\n+001ba940: 2f61 3e2c 2026 616d 703b 696e 666f 293b /a>, &info);\n+001ba950: 203c 7370 616e 2063 6c61 7373 3d22 636f // restor\n+001ba970: 6520 7573 6572 6964 2061 6e64 2070 6173 e userid and pas\n+001ba980: 7377 6420 3c2f 7370 616e 3e3c 2f64 6976 swd .
    if (!soap_call_ns\n+001ba9e0: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, ...\n+001baa20: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) // anot\n+001baa40: 6865 7220 6361 6c6c 203c 2f73 7061 6e3e her call \n+001baa50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001baa70: 2020 2020 202e 2e2e 203c 7370 616e 2063 ... /\n+001baa90: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n+001baaa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001baab0: 3e20 2020 2020 2020 207d 3c2f 6469 763e > }
    \n+001baac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    \n+001baae0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .<\n+001bab00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bab10: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    h\n+001bab30: 7474 705f 6461 5f72 656c 6561 7365 283c ttp_da_release(<\n+001bab40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bab50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001bab60: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001bab70: 2661 6d70 3b69 6e66 6f29 3b20 3c73 7061 &info); // to remove a\n+001baba0: 6c6c 2075 7365 7269 6420 616e 6420 7061 ll userid and pa\n+001babb0: 7373 7764 3c2f 7370 616e 3e3c 2f64 6976 sswd.
    soap_\n+001bac30: 6465 7374 726f 793c 2f61 3e28 3c61 2063 destroy(soap);.
    soa\n+001bace0: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap);.\n+001badd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    For mor\n-001bc870: 6520 6465 7461 696c 732c 2069 6e63 6c75 e details, inclu\n-001bc880: 6469 6e67 2068 6f77 2074 6f20 636f 6e66 ding how to conf\n-001bc890: 6967 7572 6520 4854 5450 2044 6967 6573 igure HTTP Diges\n-001bc8a0: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication\n-001bc8b0: 2066 6f72 2070 726f 7869 6573 2c20 7365 for proxies, se\n-001bc8c0: 6520 7468 6520 3c61 2068 7265 663d 222e e the HT\n-001bc8f0: 5450 2064 6967 6573 7420 6175 7468 656e TP digest authen\n-001bc900: 7469 6361 7469 6f6e 2070 6c75 6769 6e3c tication plugin<\n-001bc910: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n-001bc920: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

    .

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

    ..The \n-001bc990: 4854 5450 2073 6573 7369 6f6e 7320 706c HTTP sessions pl\n-001bc9a0: 7567 696e 3c2f 6833 3e0a 3c70 3e54 6865 ugin.

    The\n-001bc9b0: 2070 6c75 6769 6e20 636f 6465 2069 7320 plugin code is \n-001bc9c0: 6c6f 6361 7465 6420 696e 2074 6865 203c located in the <\n-001bc9d0: 656d 3e3c 636f 6465 3e67 736f 6170 2f70 em>gsoap/p\n-001bc9e0: 6c75 6769 6e3c 2f63 6f64 653e 3c2f 656d lugin directory cont\n-001bca00: 6169 6e69 6e67 203c 656d 3e3c 636f 6465 aining sessions.h and \n-001bca30: 3c63 6f64 653e 7365 7373 696f 6e73 2e63 sessions.c\n-001bca40: 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c 2f70 ..

    For more de\n-001bca60: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the <\n-001bca70: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7365 a href=\"../../se\n-001bca80: 7373 696f 6e73 2f68 746d 6c2f 696e 6465 ssions/html/inde\n-001bca90: 782e 6874 6d6c 223e 4854 5450 2073 6573 x.html\">HTTP ses\n-001bcaa0: 7369 6f6e 7320 706c 7567 696e 3c2f 613e sions plugin\n-001bcab0: 2064 6f63 756d 656e 7461 7469 6f6e 2e3c documentation.<\n-001bcac0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to \n-001bcae0: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n-001bcaf0: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

    .

    .The Apach\n-001bcb30: 6520 6d6f 6475 6c65 2070 6c75 6769 6e3c e module plugin<\n-001bcb40: 2f68 333e 0a3c 703e 5468 6520 706c 7567 /h3>.

    The plug\n-001bcb50: 696e 2063 6f64 6520 6973 206c 6f63 6174 in code is locat\n-001bcb60: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the gsoap/mod_gs\n-001bcb80: 6f61 702f 6d6f 645f 6773 6f61 702d 302e oap/mod_gsoap-0.\n-001bcb90: 392f 6170 6163 6865 5f32 303c 2f63 6f64 9/apache_20 director\n-001bcbb0: 792e 3c2f 703e 0a3c 703e 466f 7220 6d6f y.

    .

    For mo\n-001bcbc0: 7265 2064 6574 6169 6c73 2c20 7365 6520 re details, see \n-001bcbd0: 7468 6520 3c61 2068 7265 663d 222e 2e2f the Apach\n-001bcc00: 6520 6d6f 6475 6c65 3c2f 613e 2064 6f63 e module doc\n-001bcc10: 756d 656e 7461 7469 6f6e 2e3c 2f70 3e0a umentation.

    .\n-001bcc20: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n-001bcc40: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .The ISAPI exte\n-001bcc90: 6e73 696f 6e20 706c 7567 696e 3c2f 6833 nsion plugin.

    The plugin \n-001bccb0: 636f 6465 2069 7320 6c6f 6361 7465 6420 code is located \n-001bccc0: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/mod_gsoap\n-001bcce0: 2f67 736f 6170 5f77 696e 2f69 7361 7069 /gsoap_win/isapi\n-001bccf0: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir\n-001bcd00: 6563 746f 7279 2e3c 2f70 3e0a 3c70 3e46 ectory.

    .

    F\n-001bcd10: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n-001bcd20: 2073 6565 2074 6865 203c 6120 6872 6566 see the I\n-001bcd50: 5341 5049 2065 7874 656e 7369 6f6e 3c2f SAPI extension documentation\n-001bcd70: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t\n-001bcd90: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n-001bcda0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n-001bcdb0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .The CURL \n-001bcde0: 706c 7567 696e 3c2f 6833 3e0a 3c70 3e54 plugin

    .

    T\n-001bcdf0: 6865 2070 6c75 6769 6e20 636f 6465 2069 he plugin code i\n-001bce00: 7320 6c6f 6361 7465 6420 696e 2074 6865 s located in the\n-001bce10: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-001bce20: 2f70 6c75 6769 6e3c 2f63 6f64 653e 3c2f /plugin directory co\n-001bce40: 6e74 6169 6e69 6e67 203c 656d 3e3c 636f ntaining curlapi.h and curlapi.c\n-001bce80: 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c 2f70 ..

    For more de\n-001bcea0: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the <\n-001bceb0: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 6375 a href=\"../../cu\n-001bcec0: 726c 2f68 746d 6c2f 696e 6465 782e 6874 rl/html/index.ht\n-001bced0: 6d6c 223e 4355 524c 2070 6c75 6769 6e3c ml\">CURL plugin<\n-001bcee0: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n-001bcef0: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

    .

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

    ..The W\n-001bcf60: 696e 496e 6574 2070 6c75 6769 6e3c 2f68 inInet plugin.

    The plugin\n-001bcf80: 2063 6f64 6520 6973 206c 6f63 6174 6564 code is located\n-001bcf90: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/mod_gsoa\n-001bcfb0: 702f 6773 6f61 705f 7769 6e2f 7769 6e69 p/gsoap_win/wini\n-001bcfc0: 6e65 743c 2f63 6f64 653e 3c2f 656d 3e20 net \n-001bcfd0: 6469 7265 6374 6f72 792e 3c2f 703e 0a3c directory.

    .<\n-001bcfe0: 703e 466f 7220 6d6f 7265 2064 6574 6169 p>For more detai\n-001bcff0: 6c73 2c20 7365 6520 7468 6520 3c61 2068 ls, see the WinInet plug\n-001bd030: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta\n-001bd040: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

    .

    ...\n-001bd050: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n-001bd060: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n-001bd070: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n-001bd080: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .The WS\n-001bd0b0: 2d41 6464 7265 7373 696e 6720 706c 7567 -Addressing plug\n-001bd0c0: 696e 3c2f 6833 3e0a 3c70 3e54 6865 2070 in

    .

    The p\n-001bd0d0: 6c75 6769 6e20 636f 6465 2069 7320 6c6f lugin code is lo\n-001bd0e0: 6361 7465 6420 696e 2074 6865 203c 656d cated in the gsoap/plu\n-001bd100: 6769 6e3c 2f63 6f64 653e 3c2f 656d 3e20 gin \n-001bd110: 6469 7265 6374 6f72 7920 636f 6e74 6169 directory contai\n-001bd120: 6e69 6e67 203c 656d 3e3c 636f 6465 3e77 ning w\n-001bd130: 7361 6170 692e 683c 2f63 6f64 653e 3c2f saapi.h and wsaapi.c (to be us\n-001bd170: 6564 2069 6e20 4320 616e 6420 432b 2b29 ed in C and C++)\n-001bd180: 2e3c 2f70 3e0a 3c70 3e54 6f20 656e 6162 .

    .

    To enab\n-001bd190: 6c65 2057 532d 4164 6472 6573 7369 6e67 le WS-Addressing\n-001bd1a0: 2032 3030 3520 2861 6e64 2073 7570 706f 2005 (and suppo\n-001bd1b0: 7274 2066 6f72 2038 2f32 3030 3429 2c20 rt for 8/2004), \n-001bd1c0: 7468 6520 7365 7276 6963 6520 6465 6669 the service defi\n-001bd1d0: 6e69 7469 6f6e 7320 6865 6164 6572 2066 nitions header f\n-001bd1e0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n-001bd1f0: 2073 686f 756c 6420 696e 636c 7564 6520 should include \n-001bd200: 7468 6520 666f 6c6c 6f77 696e 6720 696d the following im\n-001bd210: 706f 7274 733a 3c2f 703e 0a3c 6469 7620 ports:

    .
    #i\n-001bd260: 6d70 6f72 7420 2671 756f 743b 696d 706f mport "impo\n-001bd270: 7274 2f77 7361 352e 6826 7175 6f74 3b3c rt/wsa5.h"<\n-001bd280: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

    This impo\n-001bd2b0: 7274 7320 7468 6520 534f 4150 2068 6561 rts the SOAP hea\n-001bd2c0: 6465 7220 656c 656d 656e 7473 2072 6571 der elements req\n-001bd2d0: 7569 7265 6420 6279 2057 532d 4164 6472 uired by WS-Addr\n-001bd2e0: 6573 7369 6e67 2e3c 2f70 3e0a 3c70 3e46 essing.

    .

    F\n-001bd2f0: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n-001bd300: 2073 6565 2074 6865 203c 6120 6872 6566 see the WS-\n-001bd330: 4164 6472 6573 7369 6e67 2070 6c75 6769 Addressing plugi\n-001bd340: 6e3c 2f61 3e20 646f 6375 6d65 6e74 6174 n documentat\n-001bd350: 696f 6e2e 3c2f 703e 0a3c 703e f09f 949d ion.

    .

    ....\n-001bd360: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n-001bd370: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n-001bd380: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n-001bd390: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.The WS\n-001bd3c0: 2d52 656c 6961 626c 654d 6573 7361 6769 -ReliableMessagi\n-001bd3d0: 6e67 2070 6c75 6769 6e3c 2f68 333e 0a3c ng plugin.<\n-001bd3e0: 703e 5468 6520 706c 7567 696e 2063 6f64 p>The plugin cod\n-001bd3f0: 6520 6973 206c 6f63 6174 6564 2069 6e20 e is located in \n-001bd400: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n-001bd410: 6f61 702f 706c 7567 696e 3c2f 636f 6465 oap/plugin directory\n-001bd430: 2063 6f6e 7461 696e 696e 6720 3c65 6d3e containing \n-001bd440: 3c63 6f64 653e 7773 726d 6170 692e 683c wsrmapi.h<\n-001bd450: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-001bd460: 3c65 6d3e 3c63 6f64 653e 7773 726d 6170 wsrmap\n-001bd470: 692e 633c 2f63 6f64 653e 3c2f 656d 3e20 i.c \n-001bd480: 2874 6f20 6265 2075 7365 6420 696e 2043 (to be used in C\n-001bd490: 2061 6e64 2043 2b2b 292e 3c2f 703e 0a3c and C++).

    .<\n-001bd4a0: 703e 416c 736f 206e 6565 6465 6420 6172 p>Also needed ar\n-001bd4b0: 6520 3c65 6d3e 3c63 6f64 653e 7468 7265 e thre\n-001bd4c0: 6164 732e 683c 2f63 6f64 653e 3c2f 656d ads.h and \n-001bd4e0: 7468 7265 6164 732e 633c 2f63 6f64 653e threads.c\n-001bd4f0: 3c2f 656d 3e20 666f 7220 6d75 6c74 692d for multi-\n-001bd500: 7468 7265 6164 696e 6720 616e 6420 6c6f threading and lo\n-001bd510: 636b 696e 6720 7375 7070 6f72 742e 3c2f cking support..

    To enable \n-001bd530: 5753 2d52 656c 6961 626c 654d 6573 7361 WS-ReliableMessa\n-001bd540: 6769 6e67 2c20 7468 6520 7365 7276 6963 ging, the servic\n-001bd550: 6520 6465 6669 6e69 7469 6f6e 7320 6865 e definitions he\n-001bd560: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n-001bd570: 6170 6370 7032 2073 686f 756c 6420 696e apcpp2 should in\n-001bd580: 636c 7564 6520 7468 6520 666f 6c6c 6f77 clude the follow\n-001bd590: 696e 6720 696d 706f 7274 733a 3c2f 703e ing imports:

    \n-001bd5a0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #import &quo\n-001bd5f0: 743b 696d 706f 7274 2f77 7372 6d2e 6826 t;import/wsrm.h&\n-001bd600: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "i\n-001bd650: 6d70 6f72 742f 7773 6135 2e68 2671 756f mport/wsa5.h&quo\n-001bd660: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001bd670: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    This i\n-001bd690: 6d70 6f72 7473 2074 6865 2053 4f41 5020 mports the SOAP \n-001bd6a0: 6865 6164 6572 2065 6c65 6d65 6e74 7320 header elements \n-001bd6b0: 7265 7175 6972 6564 2062 7920 5753 2d52 required by WS-R\n-001bd6c0: 656c 6961 626c 654d 6573 7361 6769 6e67 eliableMessaging\n-001bd6d0: 2e3c 2f70 3e0a 3c70 3e46 6f72 206d 6f72 .

    .

    For mor\n-001bd6e0: 6520 6465 7461 696c 732c 2073 6565 2074 e details, see t\n-001bd6f0: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he WS-Reli\n-001bd720: 6162 6c65 4d65 7373 6167 696e 6720 706c ableMessaging pl\n-001bd730: 7567 696e 3c2f 613e 2064 6f63 756d 656e ugin documen\n-001bd740: 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 tation.

    .

    .\n-001bd750: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n-001bd760: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n-001bd770: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .The\n-001bd7b0: 2057 532d 5365 6375 7269 7479 2070 6c75 WS-Security plu\n-001bd7c0: 6769 6e3c 2f68 333e 0a3c 703e 5468 6520 gin

    .

    The \n-001bd7d0: 706c 7567 696e 2063 6f64 6520 6973 206c plugin code is l\n-001bd7e0: 6f63 6174 6564 2069 6e20 7468 6520 3c65 ocated in the gsoap/pl\n-001bd800: 7567 696e 3c2f 636f 6465 3e3c 2f65 6d3e ugin\n-001bd810: 2064 6972 6563 746f 7279 2063 6f6e 7461 directory conta\n-001bd820: 696e 696e 6720 3c65 6d3e 3c63 6f64 653e ining \n-001bd830: 7773 7365 6170 692e 683c 2f63 6f64 653e wsseapi.h\n-001bd840: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and wsseapi.c (to be\n-001bd870: 2075 7365 6420 696e 2043 2061 6e64 2043 used in C and C\n-001bd880: 2b2b 292e 3c2f 703e 0a3c 703e 416c 736f ++).

    .

    Also\n-001bd890: 206e 6565 6465 6420 6172 653a 203c 656d needed are: smdevp.h<\n-001bd8b0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-001bd8c0: 3c65 6d3e 3c63 6f64 653e 736d 6465 7670 smdevp\n-001bd8d0: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .c f\n-001bd8e0: 6f72 2073 7472 6561 6d69 6e67 2058 4d4c or streaming XML\n-001bd8f0: 2073 6967 6e61 7475 7265 2061 6e64 206d signature and m\n-001bd900: 6573 7361 6765 2064 6967 6573 7420 656e essage digest en\n-001bd910: 6769 6e65 2c20 3c65 6d3e 3c63 6f64 653e gine, \n-001bd920: 6d65 6365 7670 2e68 3c2f 636f 6465 3e3c mecevp.h<\n-001bd930: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and mecevp.c for the \n-001bd960: 7374 7265 616d 696e 6720 584d 4c20 656e streaming XML en\n-001bd970: 6372 7970 7469 6f6e 2065 6e67 696e 652c cryption engine,\n-001bd980: 203c 656d 3e3c 636f 6465 3e74 6872 6561 threa\n-001bd990: 6473 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ds.h\n-001bd9a0: 2061 6e64 203c 656d 3e3c 636f 6465 3e74 and t\n-001bd9b0: 6872 6561 6473 2e63 3c2f 636f 6465 3e3c hreads.c<\n-001bd9c0: 2f65 6d3e 2066 6f72 206d 756c 7469 2d74 /em> for multi-t\n-001bd9d0: 6872 6561 6469 6e67 2061 6e64 206c 6f63 hreading and loc\n-001bd9e0: 6b69 6e67 2073 7570 706f 7274 2e3c 2f70 king support..

    To enable W\n-001bda00: 532d 5365 6375 7269 7479 2c20 7468 6520 S-Security, the \n-001bda10: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti\n-001bda20: 6f6e 7320 6865 6164 6572 2066 696c 6520 ons header file \n-001bda30: 666f 7220 736f 6170 6370 7032 2073 686f for soapcpp2 sho\n-001bda40: 756c 6420 696e 636c 7564 6520 7468 6520 uld include the \n-001bda50: 666f 6c6c 6f77 696e 6720 696d 706f 7274 following import\n-001bda60: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n-001bda90: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001bdaa0: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor\">#impor\n-001bdab0: 7420 2671 756f 743b 696d 706f 7274 2f77 t "import/w\n-001bdac0: 7373 652e 6826 7175 6f74 3b3c 2f73 7061 sse.h"
    .
    <\n-001bdae0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001bdaf0: 3c70 3e54 6869 7320 696d 706f 7274 7320

    This imports \n-001bdb00: 7468 6520 534f 4150 2068 6561 6465 7220 the SOAP header \n-001bdb10: 656c 656d 656e 7473 2072 6571 7569 7265 elements require\n-001bdb20: 6420 6279 2057 532d 5365 6375 7269 7479 d by WS-Security\n-001bdb30: 2e3c 2f70 3e0a 3c70 3e46 6f72 206d 6f72 .

    .

    For mor\n-001bdb40: 6520 6465 7461 696c 732c 2073 6565 2074 e details, see t\n-001bdb50: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he WS-Securi\n-001bdb80: 7479 2070 6c75 6769 6e3c 2f61 3e20 646f ty plugin do\n-001bdb90: 6375 6d65 6e74 6174 696f 6e2e 3c2f 703e cumentation.

    \n-001bdba0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab\n-001bdbc0: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .The WS-Discove\n-001bdc10: 7279 2070 6c75 6769 6e3c 2f68 333e 0a3c ry plugin

    .<\n-001bdc20: 703e 4261 7369 6361 6c6c 792c 2074 6f20 p>Basically, to \n-001bdc30: 6164 6420 5753 2d44 6973 636f 7665 7279 add WS-Discovery\n-001bdc40: 2073 7570 706f 7274 2074 6865 2066 6f6c support the fol\n-001bdc50: 6c6f 7769 6e67 2065 7665 6e74 2068 616e lowing event han\n-001bdc60: 646c 6572 7320 6d75 7374 2062 6520 6465 dlers must be de\n-001bdc70: 6669 6e65 6420 616e 6420 6c69 6e6b 6564 fined and linked\n-001bdc80: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    void wsdd_event_H\n-001bdce0: 656c 6c6f 283c 7370 616e 2063 6c61 7373 ello(struc\n-001bdd00: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001bdd30: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, .
    un\n-001bdda0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed int InstanceId, <\n-001bdde0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n-001bde10: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001bde40: 202a 5365 7175 656e 6365 4964 2c20 3c2f *SequenceId, .
    unsigned\n-001bde90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int MessageNum\n-001bdec0: 6265 722c 203c 2f64 6976 3e0a 3c64 6976 ber,
    .const\n-001bdf00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001bdf20: 2f73 7061 6e3e 202a 4d65 7373 6167 6549 /span> *MessageI\n-001bdf30: 442c 203c 2f64 6976 3e0a 3c64 6976 2063 D,
    .
    const <\n-001bdf70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bdf80: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *RelatesTo,\n-001bdfa0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001bdfd0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *EndpointRefe\n-001be010: 7265 6e63 652c 203c 2f64 6976 3e0a 3c64 rence,
    .\n-001be030: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001be070: 723c 2f73 7061 6e3e 202a 5479 7065 732c r *Types,\n-001be080: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001be0b0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *Scopes, .
    const\n-001be120: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *M\n-001be150: 6174 6368 4279 2c20 3c2f 6469 763e 0a3c atchBy,
    .<\n-001be160: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001be170: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001be1b0: 6172 3c2f 7370 616e 3e20 2a58 4164 6472 ar *XAddr\n-001be1c0: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    unsigned \n-001be220: 696e 743c 2f73 7061 6e3e 204d 6574 6164 int Metad\n-001be230: 6174 6156 6572 7369 6f6e 293c 2f64 6976 ataVersion).
    <\n-001be270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001be280: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-001be2a0: 2f73 7061 6e3e 2077 7364 645f 6576 656e /span> wsdd_even\n-001be2b0: 745f 4279 6528 3c73 7061 6e20 636c 6173 t_Bye(stru\n-001be2d0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, .
    u\n-001be370: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned <\n-001be380: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be390: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int InstanceId, \n-001be3b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n-001be3e0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *SequenceId, <\n-001be420: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned int<\n-001be480: 2f73 7061 6e3e 204d 6573 7361 6765 4e75 /span> MessageNu\n-001be490: 6d62 6572 2c20 3c2f 6469 763e 0a3c 6469 mber,
    .<\n-001be4b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be4c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001be4f0: 3c2f 7370 616e 3e20 2a4d 6573 7361 6765 *Message\n-001be500: 4944 2c20 3c2f 6469 763e 0a3c 6469 7620 ID,
    .
    const \n-001be540: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *RelatesTo\n-001be570: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *EndpointRef\n-001be5e0: 6572 656e 6365 2c20 3c2f 6469 763e 0a3c erence,
    .<\n-001be5f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001be600: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001be640: 6172 3c2f 7370 616e 3e20 2a54 7970 6573 ar *Types\n-001be650: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *Scopes, .
    cons\n-001be6f0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-001be720: 4d61 7463 6842 792c 203c 2f64 6976 3e0a MatchBy,
    .\n-001be730: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n-001be780: 6861 723c 2f73 7061 6e3e 202a 5841 6464 har *XAdd\n-001be790: 7273 2c20 3c2f 6469 763e 0a3c 6469 7620 rs,
    .
    unsigned<\n-001be7d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int Meta\n-001be800: 6461 7461 5665 7273 696f 6e29 3c2f 6469 dataVersion).
    \n-001be840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_wsdd_mode\n-001be860: 2077 7364 645f 6576 656e 745f 5072 6f62 wsdd_event_Prob\n-001be870: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa\n-001be8c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001be8f0: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
    .<\n-001be900: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001be910: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001be950: 6172 3c2f 7370 616e 3e20 2a4d 6573 7361 ar *Messa\n-001be960: 6765 4944 2c20 3c2f 6469 763e 0a3c 6469 geID,
    .<\n-001be980: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be990: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001be9c0: 3c2f 7370 616e 3e20 2a52 6570 6c79 546f *ReplyTo\n-001be9d0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *Types, .
    const\n-001bea70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *S\n-001beaa0: 636f 7065 732c 203c 2f64 6976 3e0a 3c64 copes,
    .\n-001beac0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001beb00: 723c 2f73 7061 6e3e 202a 4d61 7463 6842 r *MatchB\n-001beb10: 792c 203c 2f64 6976 3e0a 3c64 6976 2063 y,
    .
    struct \n-001beb50: 7773 6464 5f5f 5072 6f62 654d 6174 6368 wsdd__ProbeMatch\n-001beb60: 6573 5479 7065 202a 5072 6f62 654d 6174 esType *ProbeMat\n-001beb70: 6368 6573 293c 2f64 6976 3e0a 3c2f 6469 ches)
    .
    void\n-001bebe0: 2077 7364 645f 6576 656e 745f 5072 6f62 wsdd_event_Prob\n-001bebf0: 654d 6174 6368 6573 283c 7370 616e 2063 eMatches(s\n-001bec10: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001bec80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned int<\n-001bece0: 2f73 7061 6e3e 2049 6e73 7461 6e63 6549 /span> InstanceI\n-001becf0: 642c 203c 2f64 6976 3e0a 3c64 6976 2063 d,
    .
    const <\n-001bed30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bed40: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *SequenceId\n-001bed60: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    unsigned i\n-001bedc0: 6e74 3c2f 7370 616e 3e20 4d65 7373 6167 nt Messag\n-001bedd0: 654e 756d 6265 722c 203c 2f64 6976 3e0a eNumber,
    .\n-001bede0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n-001bee30: 6861 723c 2f73 7061 6e3e 202a 4d65 7373 har *Mess\n-001bee40: 6167 6549 442c 203c 2f64 6976 3e0a 3c64 ageID,
    .\n-001bee60: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001beea0: 723c 2f73 7061 6e3e 202a 5265 6c61 7465 r *Relate\n-001beeb0: 7354 6f2c 203c 2f64 6976 3e0a 3c64 6976 sTo,
    .struct wsdd__ProbeMat\n-001bef00: 6368 6573 5479 7065 202a 5072 6f62 654d chesType *ProbeM\n-001bef10: 6174 6368 6573 293c 2f64 6976 3e0a 3c2f atches)
    .
    soa\n-001bef60: 705f 7773 6464 5f6d 6f64 6520 7773 6464 p_wsdd_mode wsdd\n-001bef70: 5f65 7665 6e74 5f52 6573 6f6c 7665 283c _event_Resolve(<\n-001bef80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bef90: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-001bf000: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
    .const\n-001bf040: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001bf060: 2f73 7061 6e3e 202a 4d65 7373 6167 6549 /span> *MessageI\n-001bf070: 442c 203c 2f64 6976 3e0a 3c64 6976 2063 D,
    .
    const <\n-001bf0b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bf0c0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *ReplyTo, <\n-001bf0e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n-001bf110: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001bf140: 202a 456e 6470 6f69 6e74 5265 6665 7265 *EndpointRefere\n-001bf150: 6e63 652c 203c 2f64 6976 3e0a 3c64 6976 nce,
    .struct wsdd__ResolveM\n-001bf1a0: 6174 6368 6573 5479 7065 202a 5265 736f atchesType *Reso\n-001bf1b0: 6c76 654d 6174 6368 6573 293c 2f64 6976 lveMatches).
    .\n-001bf2e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n-001bf300: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int I\n-001bf330: 6e73 7461 6e63 6549 642c 203c 2f64 6976 nstanceId, .
    const<\n-001bf370: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Se\n-001bf3a0: 7175 656e 6365 4964 2c20 3c2f 6469 763e quenceId,
    \n-001bf3b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    uns\n-001bf3e0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int MessageNumber,\n-001bf420: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001bf450: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *MessageID, <\n-001bf490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n-001bf4c0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001bf4f0: 202a 5265 6c61 7465 7354 6f2c 203c 2f64 *RelatesTo, .
    cons\n-001bf530: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-001bf560: 456e 6470 6f69 6e74 5265 6665 7265 6e63 EndpointReferenc\n-001bf570: 652c 203c 2f64 6976 3e0a 3c64 6976 2063 e,
    .
    const <\n-001bf5b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bf5c0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *Types, .
    cons\n-001bf610: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-001bf640: 5363 6f70 6573 2c20 3c2f 6469 763e 0a3c Scopes,
    .<\n-001bf650: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bf660: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001bf6a0: 6172 3c2f 7370 616e 3e20 2a4d 6174 6368 ar *Match\n-001bf6b0: 4279 2c20 3c2f 6469 763e 0a3c 6469 7620 By,
    .
    const \n-001bf6f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *XAddrs, <\n-001bf720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned int<\n-001bf780: 2f73 7061 6e3e 204d 6574 6164 6174 6156 /span> MetadataV\n-001bf790: 6572 7369 6f6e 293c 2f64 6976 3e0a 3c2f ersion)
    .

    These ev\n-001bf7c0: 656e 7420 6861 6e64 6c65 7273 2077 696c ent handlers wil\n-001bf7d0: 6c20 6265 2069 6e76 6f6b 6564 2077 6865 l be invoked whe\n-001bf7e0: 6e20 696e 626f 756e 6420 5753 2d44 6973 n inbound WS-Dis\n-001bf7f0: 636f 7665 7279 206d 6573 7361 6765 7320 covery messages \n-001bf800: 6172 7269 7665 2075 7369 6e67 3a3c 2f70 arrive using:.

    if (!\n-001bf860: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_valid_soc\n-001bf8c0: 6b65 743c 2f61 3e28 3c61 2063 6c61 7373 ket(soap_bin\n-001bf920: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa\n-001bf950: 703c 2f61 3e2c 204e 554c 4c2c 203c 6120 p, NULL, port, \n-001bf9b0: 4241 434b 4c4f 4729 2929 203c 2f64 6976 BACKLOG))) .
    ... \n-001bf9f0: 2f2f 2065 7272 6f72 203c 2f73 7061 6e3e // error \n-001bfa00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so\n-001bfa40: 6170 5f77 7364 645f 6c69 7374 656e 283c ap_wsdd_listen(<\n-001bfa50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bfa60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bfa70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001bfa80: 7469 6d65 6f75 7429 2920 3c2f 6469 763e timeout))
    \n-001bfa90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n-001bfac0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.

    w\n-001bfaf0: 6869 6368 2077 696c 6c20 6c69 7374 656e hich will listen\n-001bfb00: 2066 6f72 203c 636f 6465 3e74 696d 656f for timeo\n-001bfb10: 7574 3c2f 636f 6465 3e20 7365 636f 6e64 ut second\n-001bfb20: 7320 746f 2069 6e62 6f75 6e64 2057 532d s to inbound WS-\n-001bfb30: 4469 7363 6f76 6572 7920 6d65 7373 6167 Discovery messag\n-001bfb40: 6573 206f 6e20 6120 706f 7274 2061 6e64 es on a port and\n-001bfb50: 2064 6973 7061 7463 6865 7320 7468 656d dispatches them\n-001bfb60: 2074 6f20 7468 6520 6576 656e 7420 6861 to the event ha\n-001bfb70: 6e64 6c65 7273 2e20 4120 6e65 6761 7469 ndlers. A negati\n-001bfb80: 7665 203c 636f 6465 3e74 696d 656f 7574 ve timeout\n-001bfb90: 3c2f 636f 6465 3e20 7661 6c75 6520 7370 value sp\n-001bfba0: 6563 6966 6965 7320 7468 6520 7469 6d65 ecifies the time\n-001bfbb0: 6f75 7420 696e 206d 6963 726f 7365 636f out in microseco\n-001bfbc0: 6e64 732e 3c2f 703e 0a3c 703e 466f 7220 nds.

    .

    For \n-001bfbd0: 6d6f 7265 2064 6574 6169 6c73 2c20 7365 more details, se\n-001bfbe0: 6520 7468 6520 3c61 2068 7265 663d 222e e the WS-D\n-001bfc10: 6973 636f 7665 7279 2070 6c75 6769 6e3c iscovery plugin<\n-001bfc20: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n-001bfc30: 6e2e 3c2f 703e 0a3c 6831 3e3c 6120 636c n.

    .

    \n-001bfc60: 0a43 6f70 7972 6967 6874 3c2f 6831 3e0a .Copyright

    .\n-001bfc70: 3c70 3e3c 656d 3e43 6f70 7972 6967 6874

    Copyright\n-001bfc80: 2028 6329 2032 3030 302d 3230 3230 2c20 (c) 2000-2020, \n-001bfc90: 526f 6265 7274 2041 2e20 7661 6e20 456e Robert A. van En\n-001bfca0: 6765 6c65 6e2c 2047 656e 6976 6961 2049 gelen, Genivia I\n-001bfcb0: 6e63 2e3c 6272 2020 2f3e 0a41 6c6c 2072 nc.
    .All r\n-001bfcc0: 6967 6874 7320 7265 7365 7276 6564 2e3c ights reserved.<\n-001bfcd0: 2f65 6d3e 203c 2f70 3e0a 3c2f 6469 763e /em>

    .
    \n-001bfce0: 3c2f 6469 763e 3c21 2d2d 2050 6167 6544
    .
    .<\n-001bfd10: 2f64 6976 3e3c 212d 2d20 646f 632d 636f /div>.
    ..Copyright\n-001bfd60: 2028 4329 2032 3032 312c 2052 6f62 6572 (C) 2021, Rober\n-001bfd70: 7420 7661 6e20 456e 6765 6c65 6e2c 2047 t van Engelen, G\n-001bfd80: 656e 6976 6961 2049 6e63 2e2c 2041 6c6c enivia Inc., All\n-001bfd90: 2052 6967 6874 7320 5265 7365 7276 6564 Rights Reserved\n-001bfda0: 2e0a 3c2f 6164 6472 6573 733e 0a3c 6164 ....Con\n-001bfdd0: 7665 7274 6564 206f 6e20 4d6f 6e20 4d61 verted on Mon Ma\n-001bfde0: 7220 3820 3230 3231 2031 333a 3036 3a32 r 8 2021 13:06:2\n-001bfdf0: 3320 6279 203c 6120 7461 7267 6574 3d22 3 by Doxygen 1.9\n-001bfe40: 2e31 3c2f 736d 616c 6c3e 3c2f 6164 6472 .1.
    .
    ...\n+001bb970: 3d22 6c69 6e65 223e 2020 3c73 7061 6e20 =\"line\"> if (<\n+001bb9a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bb9b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001bb9c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001bb9d0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;user\n+001bba20: 6964 3c2f 613e 2026 616d 703b 2661 6d70 id &&\n+001bba30: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; soap->p\n+001bbab0: 6173 7377 643c 2f61 3e29 203c 7370 616e asswd) // client used \n+001bbae0: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica\n+001bbaf0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    {
    .<\n+001bbb20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bbb30: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // ma\n+001bbb50: 7920 6465 6369 6465 206e 6f74 2074 6f20 y decide not to \n+001bbb60: 6861 6e64 6c65 2c20 6275 7420 6966 206f handle, but if o\n+001bbb70: 6b20 7468 656e 2067 6f20 6168 6561 6420 k then go ahead \n+001bbb80: 616e 6420 636f 6d70 6172 6520 696e 666f and compare info\n+001bbb90: 3a20 3c2f 7370 616e 3e3c 2f64 6976 3e0a :
    .\n+001bbba0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+001bbbd0: 6966 3c2f 7370 616e 3e20 2821 7374 7263 if (!strc\n+001bbbe0: 6d70 283c 6120 636c 6173 733d 2263 6f64 mp(soap->\n+001bbc60: 7573 6572 6964 3c2f 613e 2c20 3c61 2063 userid, userid)\n+001bbcc0: 2026 616d 703b 2661 6d70 3b20 2173 7472 && !str\n+001bbcd0: 636d 7028 3c61 2063 6c61 7373 3d22 636f cmp(soap<\n+001bbd00: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->passwd, passwd\n+001bbdb0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n+001bbdd0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n+001bbdf0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // han\n+001bbe10: 646c 6520 7265 7175 6573 743c 2f73 7061 dle request
    .
    \n+001bbe40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+001bbe60: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+001bbec0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n+001bbed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+001bbef0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n+001bbf20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+001bbf40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap->\n+001bbfa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 authrea\n+001bbff0: 6c6d 3c2f 613e 2026 616d 703b 2661 6d70 lm &&\n+001bc000: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; soap->u\n+001bc080: 7365 7269 643c 2f61 3e29 203c 7370 616e serid) // Digest authe\n+001bc0b0: 6e74 6963 6174 696f 6e20 3c2f 7370 616e ntication
    .
    {.
    passwd = \n+001bc150: 2e2e 2e3b 203c 7370 616e 2063 6c61 7373 ...; // da\n+001bc170: 7461 6261 7365 206c 6f6f 6b75 7020 6f6e tabase lookup on\n+001bc180: 2075 7365 7269 6420 616e 6420 6175 7468 userid and auth\n+001bc190: 7265 616c 6d20 746f 2066 696e 6420 7061 realm to find pa\n+001bc1a0: 7373 7764 203c 2f73 7061 6e3e 3c2f 6469 sswd .
    if (!s\n+001bc1f0: 7472 636d 7028 3c61 2063 6c61 7373 3d22 trcmp(soa\n+001bc220: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->authrealm\n+001bc280: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , authr\n+001bc2d0: 6561 6c6d 3c2f 613e 2920 2661 6d70 3b26 ealm) &&\n+001bc2e0: 616d 703b 2021 7374 7263 6d70 283c 6120 amp; !strcmp(soap->\n+001bc320: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;userid\n+001bc370: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , u\n+001bc3c0: 7365 7269 643c 2f61 3e29 2920 3c2f 6469 serid)) .
    {
    \n+001bc3f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (!h\n+001bc430: 7474 705f 6461 5f76 6572 6966 795f 706f ttp_da_verify_po\n+001bc440: 7374 283c 6120 636c 6173 733d 2263 6f64 st(soap, pas\n+001bc4c0: 7377 643c 2f61 3e29 2920 3c2f 6469 763e swd))
    \n+001bc4d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    \n+001bc4f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... <\n+001bc510: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001bc520: 656e 7422 3e2f 2f20 6861 6e64 6c65 2072 ent\">// handle r\n+001bc530: 6571 7565 7374 3c2f 7370 616e 3e3c 2f64 equest..\n+001bc600: 2020 2020 2020 7d20 3c2f 6469 763e 0a3c }
    .<\n+001bc610: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bc620: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    .\n+001bc640: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n+001bc660: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bc670: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001bc680: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001bc690: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;auth\n+001bc6e0: 7265 616c 6d3c 2f61 3e20 3d20 3c61 2063 realm = authrealm; // set\n+001bc760: 2072 6561 6c6d 2066 6f72 2063 6861 6c6c realm for chall\n+001bc770: 656e 6765 203c 2f73 7061 6e3e 3c2f 6469 enge .
    return 4\n+001bc7c0: 3031 3b20 3c73 7061 6e20 636c 6173 733d 01; // Not\n+001bc7e0: 2061 7574 686f 7269 7a65 642c 2063 6861 authorized, cha\n+001bc7f0: 6c6c 656e 6765 2064 6967 6573 7420 6175 llenge digest au\n+001bc800: 7468 656e 7469 6361 7469 6f6e 203c 2f73 thentication
    .
    }.

    F\n+001bc850: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n+001bc860: 2069 6e63 6c75 6469 6e67 2068 6f77 2074 including how t\n+001bc870: 6f20 636f 6e66 6967 7572 6520 4854 5450 o configure HTTP\n+001bc880: 2044 6967 6573 7420 6175 7468 656e 7469 Digest authenti\n+001bc890: 6361 7469 6f6e 2066 6f72 2070 726f 7869 cation for proxi\n+001bc8a0: 6573 2c20 7365 6520 7468 6520 3c61 2068 es, see the HTTP digest \n+001bc8e0: 6175 7468 656e 7469 6361 7469 6f6e 2070 authentication p\n+001bc8f0: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume\n+001bc900: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

    .

    \n+001bc910: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+001bc930: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .The HTTP sessi\n+001bc980: 6f6e 7320 706c 7567 696e 3c2f 6833 3e0a ons plugin

    .\n+001bc990: 3c70 3e54 6865 2070 6c75 6769 6e20 636f

    The plugin co\n+001bc9a0: 6465 2069 7320 6c6f 6361 7465 6420 696e de is located in\n+001bc9b0: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n+001bc9c0: 736f 6170 2f70 6c75 6769 6e3c 2f63 6f64 soap/plugin director\n+001bc9e0: 7920 636f 6e74 6169 6e69 6e67 203c 656d y containing sessions.\n+001bca00: 683c 2f63 6f64 653e 3c2f 656d 3e20 616e h an\n+001bca10: 6420 3c65 6d3e 3c63 6f64 653e 7365 7373 d sess\n+001bca20: 696f 6e73 2e63 3c2f 636f 6465 3e3c 2f65 ions.c.

    .

    For m\n+001bca40: 6f72 6520 6465 7461 696c 732c 2073 6565 ore details, see\n+001bca50: 2074 6865 203c 6120 6872 6566 3d22 2e2e the HT\n+001bca80: 5450 2073 6573 7369 6f6e 7320 706c 7567 TP sessions plug\n+001bca90: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta\n+001bcaa0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

    .

    ...\n+001bcab0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba\n+001bcac0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c\n+001bcad0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    .\n+001bcae0: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .The\n+001bcb10: 2041 7061 6368 6520 6d6f 6475 6c65 2070 Apache module p\n+001bcb20: 6c75 6769 6e3c 2f68 333e 0a3c 703e 5468 lugin

    .

    Th\n+001bcb30: 6520 706c 7567 696e 2063 6f64 6520 6973 e plugin code is\n+001bcb40: 206c 6f63 6174 6564 2069 6e20 7468 6520 located in the \n+001bcb50: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+001bcb60: 6d6f 645f 6773 6f61 702f 6d6f 645f 6773 mod_gsoap/mod_gs\n+001bcb70: 6f61 702d 302e 392f 6170 6163 6865 5f32 oap-0.9/apache_2\n+001bcb80: 303c 2f63 6f64 653e 3c2f 656d 3e20 6469 0 di\n+001bcb90: 7265 6374 6f72 792e 3c2f 703e 0a3c 703e rectory.

    .

    \n+001bcba0: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details\n+001bcbb0: 2c20 7365 6520 7468 6520 3c61 2068 7265 , see the Apache module documentation\n+001bcc00: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t\n+001bcc20: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n+001bcc30: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n+001bcc40: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .The ISAP\n+001bcc70: 4920 6578 7465 6e73 696f 6e20 706c 7567 I extension plug\n+001bcc80: 696e 3c2f 6833 3e0a 3c70 3e54 6865 2070 in

    .

    The p\n+001bcc90: 6c75 6769 6e20 636f 6465 2069 7320 6c6f lugin code is lo\n+001bcca0: 6361 7465 6420 696e 2074 6865 203c 656d cated in the gsoap/mod\n+001bccc0: 5f67 736f 6170 2f67 736f 6170 5f77 696e _gsoap/gsoap_win\n+001bccd0: 2f69 7361 7069 3c2f 636f 6465 3e3c 2f65 /isapi directory..

    For more de\n+001bcd00: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the <\n+001bcd10: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 6973 a href=\"../../is\n+001bcd20: 6170 692f 6874 6d6c 2f69 6e64 6578 2e68 api/html/index.h\n+001bcd30: 746d 6c22 3e49 5341 5049 2065 7874 656e tml\">ISAPI exten\n+001bcd40: 7369 6f6e 3c2f 613e 2064 6f63 756d 656e sion documen\n+001bcd50: 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 tation.

    .

    .\n+001bcd60: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... \n+001bcd70: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of\n+001bcd80: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents.

    .The\n+001bcdc0: 2043 5552 4c20 706c 7567 696e 3c2f 6833 CURL plugin.

    The plugin \n+001bcde0: 636f 6465 2069 7320 6c6f 6361 7465 6420 code is located \n+001bcdf0: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/plugin direct\n+001bce20: 6f72 7920 636f 6e74 6169 6e69 6e67 203c ory containing <\n+001bce30: 656d 3e3c 636f 6465 3e63 7572 6c61 7069 em>curlapi\n+001bce40: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a\n+001bce50: 6e64 203c 656d 3e3c 636f 6465 3e63 7572 nd cur\n+001bce60: 6c61 7069 2e63 3c2f 636f 6465 3e3c 2f65 lapi.c.

    .

    For m\n+001bce80: 6f72 6520 6465 7461 696c 732c 2073 6565 ore details, see\n+001bce90: 2074 6865 203c 6120 6872 6566 3d22 2e2e the CURL p\n+001bcec0: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume\n+001bced0: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

    .

    \n+001bcee0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+001bcf00: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    \n+001bcf40: 0a54 6865 2057 696e 496e 6574 2070 6c75 .The WinInet plu\n+001bcf50: 6769 6e3c 2f68 333e 0a3c 703e 5468 6520 gin

    .

    The \n+001bcf60: 706c 7567 696e 2063 6f64 6520 6973 206c plugin code is l\n+001bcf70: 6f63 6174 6564 2069 6e20 7468 6520 3c65 ocated in the gsoap/mo\n+001bcf90: 645f 6773 6f61 702f 6773 6f61 705f 7769 d_gsoap/gsoap_wi\n+001bcfa0: 6e2f 7769 6e69 6e65 743c 2f63 6f64 653e n/wininet\n+001bcfb0: 3c2f 656d 3e20 6469 7265 6374 6f72 792e directory.\n+001bcfc0: 3c2f 703e 0a3c 703e 466f 7220 6d6f 7265

    .

    For more\n+001bcfd0: 2064 6574 6169 6c73 2c20 7365 6520 7468 details, see th\n+001bcfe0: 6520 3c61 2068 7265 663d 222e 2e2f 2e2e e WinIne\n+001bd010: 7420 706c 7567 696e 3c2f 613e 2064 6f63 t plugin doc\n+001bd020: 756d 656e 7461 7469 6f6e 2e3c 2f70 3e0a umentation.

    .\n+001bd030: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl\n+001bd050: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .\n+001bd090: 5468 6520 5753 2d41 6464 7265 7373 696e The WS-Addressin\n+001bd0a0: 6720 706c 7567 696e 3c2f 6833 3e0a 3c70 g plugin

    .The plugin code\n+001bd0c0: 2069 7320 6c6f 6361 7465 6420 696e 2074 is located in t\n+001bd0d0: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso\n+001bd0e0: 6170 2f70 6c75 6769 6e3c 2f63 6f64 653e ap/plugin\n+001bd0f0: 3c2f 656d 3e20 6469 7265 6374 6f72 7920 directory \n+001bd100: 636f 6e74 6169 6e69 6e67 203c 656d 3e3c containing <\n+001bd110: 636f 6465 3e77 7361 6170 692e 683c 2f63 code>wsaapi.h and wsaapi.c\n+001bd140: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 746f
    (to\n+001bd150: 2062 6520 7573 6564 2069 6e20 4320 616e be used in C an\n+001bd160: 6420 432b 2b29 2e3c 2f70 3e0a 3c70 3e54 d C++).

    .

    T\n+001bd170: 6f20 656e 6162 6c65 2057 532d 4164 6472 o enable WS-Addr\n+001bd180: 6573 7369 6e67 2032 3030 3520 2861 6e64 essing 2005 (and\n+001bd190: 2073 7570 706f 7274 2066 6f72 2038 2f32 support for 8/2\n+001bd1a0: 3030 3429 2c20 7468 6520 7365 7276 6963 004), the servic\n+001bd1b0: 6520 6465 6669 6e69 7469 6f6e 7320 6865 e definitions he\n+001bd1c0: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n+001bd1d0: 6170 6370 7032 2073 686f 756c 6420 696e apcpp2 should in\n+001bd1e0: 636c 7564 6520 7468 6520 666f 6c6c 6f77 clude the follow\n+001bd1f0: 696e 6720 696d 706f 7274 733a 3c2f 703e ing imports:

    \n+001bd200: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #import &quo\n+001bd250: 743b 696d 706f 7274 2f77 7361 352e 6826 t;import/wsa5.h&\n+001bd260: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.

    Thi\n+001bd290: 7320 696d 706f 7274 7320 7468 6520 534f s imports the SO\n+001bd2a0: 4150 2068 6561 6465 7220 656c 656d 656e AP header elemen\n+001bd2b0: 7473 2072 6571 7569 7265 6420 6279 2057 ts required by W\n+001bd2c0: 532d 4164 6472 6573 7369 6e67 2e3c 2f70 S-Addressing..

    For more de\n+001bd2e0: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the <\n+001bd2f0: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7773 a href=\"../../ws\n+001bd300: 612f 6874 6d6c 2f77 7361 5f30 2e68 746d a/html/wsa_0.htm\n+001bd310: 6c22 3e57 532d 4164 6472 6573 7369 6e67 l\">WS-Addressing\n+001bd320: 2070 6c75 6769 6e3c 2f61 3e20 646f 6375 plugin docu\n+001bd330: 6d65 6e74 6174 696f 6e2e 3c2f 703e 0a3c mentation.

    .<\n+001bd340: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+001bd360: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+001bd370: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .\n+001bd3a0: 5468 6520 5753 2d52 656c 6961 626c 654d The WS-ReliableM\n+001bd3b0: 6573 7361 6769 6e67 2070 6c75 6769 6e3c essaging plugin<\n+001bd3c0: 2f68 333e 0a3c 703e 5468 6520 706c 7567 /h3>.

    The plug\n+001bd3d0: 696e 2063 6f64 6520 6973 206c 6f63 6174 in code is locat\n+001bd3e0: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the gsoap/plugin\n+001bd400: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir\n+001bd410: 6563 746f 7279 2063 6f6e 7461 696e 696e ectory containin\n+001bd420: 6720 3c65 6d3e 3c63 6f64 653e 7773 726d g wsrm\n+001bd430: 6170 692e 683c 2f63 6f64 653e 3c2f 656d api.h and \n+001bd450: 7773 726d 6170 692e 633c 2f63 6f64 653e wsrmapi.c\n+001bd460: 3c2f 656d 3e20 2874 6f20 6265 2075 7365 (to be use\n+001bd470: 6420 696e 2043 2061 6e64 2043 2b2b 292e d in C and C++).\n+001bd480: 3c2f 703e 0a3c 703e 416c 736f 206e 6565

    .

    Also nee\n+001bd490: 6465 6420 6172 6520 3c65 6d3e 3c63 6f64 ded are threads.h and \n+001bd4c0: 3c63 6f64 653e 7468 7265 6164 732e 633c threads.c<\n+001bd4d0: 2f63 6f64 653e 3c2f 656d 3e20 666f 7220 /code> for \n+001bd4e0: 6d75 6c74 692d 7468 7265 6164 696e 6720 multi-threading \n+001bd4f0: 616e 6420 6c6f 636b 696e 6720 7375 7070 and locking supp\n+001bd500: 6f72 742e 3c2f 703e 0a3c 703e 546f 2065 ort.

    .

    To e\n+001bd510: 6e61 626c 6520 5753 2d52 656c 6961 626c nable WS-Reliabl\n+001bd520: 654d 6573 7361 6769 6e67 2c20 7468 6520 eMessaging, the \n+001bd530: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti\n+001bd540: 6f6e 7320 6865 6164 6572 2066 696c 6520 ons header file \n+001bd550: 666f 7220 736f 6170 6370 7032 2073 686f for soapcpp2 sho\n+001bd560: 756c 6420 696e 636c 7564 6520 7468 6520 uld include the \n+001bd570: 666f 6c6c 6f77 696e 6720 696d 706f 7274 following import\n+001bd580: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n+001bd5b0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001bd5c0: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor\">#impor\n+001bd5d0: 7420 2671 756f 743b 696d 706f 7274 2f77 t "import/w\n+001bd5e0: 7372 6d2e 6826 7175 6f74 3b3c 2f73 7061 srm.h"
    .
    #import &\n+001bd630: 7175 6f74 3b69 6d70 6f72 742f 7773 6135 quot;import/wsa5\n+001bd640: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n+001bd650: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+001bd670: 5468 6973 2069 6d70 6f72 7473 2074 6865 This imports the\n+001bd680: 2053 4f41 5020 6865 6164 6572 2065 6c65 SOAP header ele\n+001bd690: 6d65 6e74 7320 7265 7175 6972 6564 2062 ments required b\n+001bd6a0: 7920 5753 2d52 656c 6961 626c 654d 6573 y WS-ReliableMes\n+001bd6b0: 7361 6769 6e67 2e3c 2f70 3e0a 3c70 3e46 saging.

    .

    F\n+001bd6c0: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n+001bd6d0: 2073 6565 2074 6865 203c 6120 6872 6566 see the W\n+001bd700: 532d 5265 6c69 6162 6c65 4d65 7373 6167 S-ReliableMessag\n+001bd710: 696e 6720 706c 7567 696e 3c2f 613e 2064 ing plugin d\n+001bd720: 6f63 756d 656e 7461 7469 6f6e 2e3c 2f70 ocumentation..

    .... Back to ta\n+001bd750: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n+001bd760: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

    .

    .The WS-Securi\n+001bd7a0: 7479 2070 6c75 6769 6e3c 2f68 333e 0a3c ty plugin

    .<\n+001bd7b0: 703e 5468 6520 706c 7567 696e 2063 6f64 p>The plugin cod\n+001bd7c0: 6520 6973 206c 6f63 6174 6564 2069 6e20 e is located in \n+001bd7d0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n+001bd7e0: 6f61 702f 706c 7567 696e 3c2f 636f 6465 oap/plugin directory\n+001bd800: 2063 6f6e 7461 696e 696e 6720 3c65 6d3e containing \n+001bd810: 3c63 6f64 653e 7773 7365 6170 692e 683c wsseapi.h<\n+001bd820: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+001bd830: 3c65 6d3e 3c63 6f64 653e 7773 7365 6170 wsseap\n+001bd840: 692e 633c 2f63 6f64 653e 3c2f 656d 3e20 i.c \n+001bd850: 2874 6f20 6265 2075 7365 6420 696e 2043 (to be used in C\n+001bd860: 2061 6e64 2043 2b2b 292e 3c2f 703e 0a3c and C++).

    .<\n+001bd870: 703e 416c 736f 206e 6565 6465 6420 6172 p>Also needed ar\n+001bd880: 653a 203c 656d 3e3c 636f 6465 3e73 6d64 e: smd\n+001bd890: 6576 702e 683c 2f63 6f64 653e 3c2f 656d evp.h and \n+001bd8b0: 736d 6465 7670 2e63 3c2f 636f 6465 3e3c smdevp.c<\n+001bd8c0: 2f65 6d3e 2066 6f72 2073 7472 6561 6d69 /em> for streami\n+001bd8d0: 6e67 2058 4d4c 2073 6967 6e61 7475 7265 ng XML signature\n+001bd8e0: 2061 6e64 206d 6573 7361 6765 2064 6967 and message dig\n+001bd8f0: 6573 7420 656e 6769 6e65 2c20 3c65 6d3e est engine, \n+001bd900: 3c63 6f64 653e 6d65 6365 7670 2e68 3c2f mecevp.h and <\n+001bd920: 656d 3e3c 636f 6465 3e6d 6563 6576 702e em>mecevp.\n+001bd930: 633c 2f63 6f64 653e 3c2f 656d 3e20 666f c fo\n+001bd940: 7220 7468 6520 7374 7265 616d 696e 6720 r the streaming \n+001bd950: 584d 4c20 656e 6372 7970 7469 6f6e 2065 XML encryption e\n+001bd960: 6e67 696e 652c 203c 656d 3e3c 636f 6465 ngine, threads.h and <\n+001bd990: 636f 6465 3e74 6872 6561 6473 2e63 3c2f code>threads.c for m\n+001bd9b0: 756c 7469 2d74 6872 6561 6469 6e67 2061 ulti-threading a\n+001bd9c0: 6e64 206c 6f63 6b69 6e67 2073 7570 706f nd locking suppo\n+001bd9d0: 7274 2e3c 2f70 3e0a 3c70 3e54 6f20 656e rt.

    .

    To en\n+001bd9e0: 6162 6c65 2057 532d 5365 6375 7269 7479 able WS-Security\n+001bd9f0: 2c20 7468 6520 7365 7276 6963 6520 6465 , the service de\n+001bda00: 6669 6e69 7469 6f6e 7320 6865 6164 6572 finitions header\n+001bda10: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp\n+001bda20: 7032 2073 686f 756c 6420 696e 636c 7564 p2 should includ\n+001bda30: 6520 7468 6520 666f 6c6c 6f77 696e 6720 e the following \n+001bda40: 696d 706f 7274 733a 3c2f 703e 0a3c 6469 imports:

    .
    \n+001bda90: 2369 6d70 6f72 7420 2671 756f 743b 696d #import "im\n+001bdaa0: 706f 7274 2f77 7373 652e 6826 7175 6f74 port/wsse.h"\n+001bdab0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001bdac0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This im\n+001bdae0: 706f 7274 7320 7468 6520 534f 4150 2068 ports the SOAP h\n+001bdaf0: 6561 6465 7220 656c 656d 656e 7473 2072 eader elements r\n+001bdb00: 6571 7569 7265 6420 6279 2057 532d 5365 equired by WS-Se\n+001bdb10: 6375 7269 7479 2e3c 2f70 3e0a 3c70 3e46 curity.

    .

    F\n+001bdb20: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n+001bdb30: 2073 6565 2074 6865 203c 6120 6872 6566 see the WS-\n+001bdb60: 5365 6375 7269 7479 2070 6c75 6769 6e3c Security plugin<\n+001bdb70: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n+001bdb80: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

    .

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

    ..The WS-D\n+001bdbf0: 6973 636f 7665 7279 2070 6c75 6769 6e3c iscovery plugin<\n+001bdc00: 2f68 333e 0a3c 703e 4261 7369 6361 6c6c /h3>.

    Basicall\n+001bdc10: 792c 2074 6f20 6164 6420 5753 2d44 6973 y, to add WS-Dis\n+001bdc20: 636f 7665 7279 2073 7570 706f 7274 2074 covery support t\n+001bdc30: 6865 2066 6f6c 6c6f 7769 6e67 2065 7665 he following eve\n+001bdc40: 6e74 2068 616e 646c 6572 7320 6d75 7374 nt handlers must\n+001bdc50: 2062 6520 6465 6669 6e65 6420 616e 6420 be defined and \n+001bdc60: 6c69 6e6b 6564 3a3c 2f70 3e0a 3c64 6976 linked:

    .
    vo\n+001bdcb0: 6964 3c2f 7370 616e 3e20 7773 6464 5f65 id wsdd_e\n+001bdcc0: 7665 6e74 5f48 656c 6c6f 283c 7370 616e vent_Hello(struct <\n+001bdcf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bdd00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001bdd10: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001bdd20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001bdd50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    unsigned in\n+001bddb0: 743c 2f73 7061 6e3e 2049 6e73 7461 6e63 t Instanc\n+001bddc0: 6549 642c 203c 2f64 6976 3e0a 3c64 6976 eId,
    .const\n+001bde00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001bde20: 2f73 7061 6e3e 202a 5365 7175 656e 6365 /span> *Sequence\n+001bde30: 4964 2c20 3c2f 6469 763e 0a3c 6469 7620 Id,

    .
    unsigned<\n+001bde70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int Mess\n+001bdea0: 6167 654e 756d 6265 722c 203c 2f64 6976 ageNumber, .
    const<\n+001bdee0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Me\n+001bdf10: 7373 6167 6549 442c 203c 2f64 6976 3e0a ssageID,
    .\n+001bdf20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001bdf70: 6861 723c 2f73 7061 6e3e 202a 5265 6c61 har *Rela\n+001bdf80: 7465 7354 6f2c 203c 2f64 6976 3e0a 3c64 tesTo,
    .\n+001bdfa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001bdfe0: 723c 2f73 7061 6e3e 202a 456e 6470 6f69 r *Endpoi\n+001bdff0: 6e74 5265 6665 7265 6e63 652c 203c 2f64 ntReference, .
    cons\n+001be030: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001be060: 5479 7065 732c 203c 2f64 6976 3e0a 3c64 Types,
    .\n+001be080: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001be0c0: 723c 2f73 7061 6e3e 202a 5363 6f70 6573 r *Scopes\n+001be0d0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *MatchBy, .
    con\n+001be170: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001be1a0: 2a58 4164 6472 732c 203c 2f64 6976 3e0a *XAddrs,
    .\n+001be1b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    unsi\n+001be1e0: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int\n+001be210: 204d 6574 6164 6174 6156 6572 7369 6f6e MetadataVersion\n+001be220: 293c 2f64 6976 3e0a 3c2f 6469 763e 3c21 )
    .
    <\n+001be240: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001be250: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    void wsd\n+001be290: 645f 6576 656e 745f 4279 6528 3c73 7061 d_event_Bye(struct \n+001be2c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001be2f0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001be320: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    unsigned i\n+001be380: 6e74 3c2f 7370 616e 3e20 496e 7374 616e nt Instan\n+001be390: 6365 4964 2c20 3c2f 6469 763e 0a3c 6469 ceId,
    .<\n+001be3b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be3c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001be3f0: 3c2f 7370 616e 3e20 2a53 6571 7565 6e63 *Sequenc\n+001be400: 6549 642c 203c 2f64 6976 3e0a 3c64 6976 eId,

    .unsigned\n+001be440: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Mes\n+001be470: 7361 6765 4e75 6d62 6572 2c20 3c2f 6469 sageNumber, .
    const\n+001be4b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *M\n+001be4e0: 6573 7361 6765 4944 2c20 3c2f 6469 763e essageID,
    \n+001be4f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n+001be540: 6368 6172 3c2f 7370 616e 3e20 2a52 656c char *Rel\n+001be550: 6174 6573 546f 2c20 3c2f 6469 763e 0a3c atesTo,
    .<\n+001be560: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001be570: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n+001be5b0: 6172 3c2f 7370 616e 3e20 2a45 6e64 706f ar *Endpo\n+001be5c0: 696e 7452 6566 6572 656e 6365 2c20 3c2f intReference, .
    con\n+001be600: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001be630: 2a54 7970 6573 2c20 3c2f 6469 763e 0a3c *Types,
    .<\n+001be640: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001be650: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n+001be690: 6172 3c2f 7370 616e 3e20 2a53 636f 7065 ar *Scope\n+001be6a0: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    const <\n+001be6e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be6f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *MatchBy, <\n+001be710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001be740: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001be770: 202a 5841 6464 7273 2c20 3c2f 6469 763e *XAddrs,
    \n+001be780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    uns\n+001be7b0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int MetadataVersio\n+001be7f0: 6e29 3c2f 6469 763e 0a3c 2f64 6976 3e3c n)
    .
    <\n+001be800: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001be810: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    soap_wsd\n+001be840: 645f 6d6f 6465 2077 7364 645f 6576 656e d_mode wsdd_even\n+001be850: 745f 5072 6f62 6528 3c73 7061 6e20 636c t_Probe(st\n+001be870: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, .
    con\n+001be910: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001be940: 2a4d 6573 7361 6765 4944 2c20 3c2f 6469 *MessageID, .
    const\n+001be980: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *R\n+001be9b0: 6570 6c79 546f 2c20 3c2f 6469 763e 0a3c eplyTo,
    .<\n+001be9c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001be9d0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n+001bea10: 6172 3c2f 7370 616e 3e20 2a54 7970 6573 ar *Types\n+001bea20: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *Scopes, .
    cons\n+001beac0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001beaf0: 4d61 7463 6842 792c 203c 2f64 6976 3e0a MatchBy,
    .\n+001beb00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct wsdd__Prob\n+001beb40: 654d 6174 6368 6573 5479 7065 202a 5072 eMatchesType *Pr\n+001beb50: 6f62 654d 6174 6368 6573 293c 2f64 6976 obeMatches).
    <\n+001beb90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001beba0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n+001bebc0: 2f73 7061 6e3e 2077 7364 645f 6576 656e /span> wsdd_even\n+001bebd0: 745f 5072 6f62 654d 6174 6368 6573 283c t_ProbeMatches(<\n+001bebe0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bebf0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001bec60: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
    .unsigned\n+001beca0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Ins\n+001becd0: 7461 6e63 6549 642c 203c 2f64 6976 3e0a tanceId,
    .\n+001bece0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001bed30: 6861 723c 2f73 7061 6e3e 202a 5365 7175 har *Sequ\n+001bed40: 656e 6365 4964 2c20 3c2f 6469 763e 0a3c enceId,
    .<\n+001bed50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bed60: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >unsig\n+001bed80: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned int \n+001bedb0: 4d65 7373 6167 654e 756d 6265 722c 203c MessageNumber, <\n+001bedc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001bedf0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bee20: 202a 4d65 7373 6167 6549 442c 203c 2f64 *MessageID, .
    cons\n+001bee60: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bee90: 5265 6c61 7465 7354 6f2c 203c 2f64 6976 RelatesTo, .
    struct\n+001beed0: 3c2f 7370 616e 3e20 7773 6464 5f5f 5072 wsdd__Pr\n+001beee0: 6f62 654d 6174 6368 6573 5479 7065 202a obeMatchesType *\n+001beef0: 5072 6f62 654d 6174 6368 6573 293c 2f64 ProbeMatches).
    soap_wsdd_mod\n+001bef50: 6520 7773 6464 5f65 7665 6e74 5f52 6573 e wsdd_event_Res\n+001bef60: 6f6c 7665 283c 7370 616e 2063 6c61 7373 olve(struc\n+001bef80: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+001befb0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, .
    const<\n+001bf020: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Me\n+001bf050: 7373 6167 6549 442c 203c 2f64 6976 3e0a ssageID,
    .\n+001bf060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001bf0b0: 6861 723c 2f73 7061 6e3e 202a 5265 706c har *Repl\n+001bf0c0: 7954 6f2c 203c 2f64 6976 3e0a 3c64 6976 yTo,
    .const\n+001bf100: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001bf120: 2f73 7061 6e3e 202a 456e 6470 6f69 6e74 /span> *Endpoint\n+001bf130: 5265 6665 7265 6e63 652c 203c 2f64 6976 Reference, .
    struct\n+001bf170: 3c2f 7370 616e 3e20 7773 6464 5f5f 5265 wsdd__Re\n+001bf180: 736f 6c76 654d 6174 6368 6573 5479 7065 solveMatchesType\n+001bf190: 202a 5265 736f 6c76 654d 6174 6368 6573 *ResolveMatches\n+001bf1a0: 293c 2f64 6976 3e0a 3c2f 6469 763e 3c21 )
    .
    <\n+001bf1c0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001bf1d0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    void wsd\n+001bf210: 645f 6576 656e 745f 5265 736f 6c76 654d d_event_ResolveM\n+001bf220: 6174 6368 6573 283c 7370 616e 2063 6c61 atches(str\n+001bf240: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, .
    \n+001bf2e0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n+001bf2f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int InstanceId,\n+001bf320: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001bf350: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *SequenceId, \n+001bf390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    unsigned int\n+001bf3f0: 3c2f 7370 616e 3e20 4d65 7373 6167 654e MessageN\n+001bf400: 756d 6265 722c 203c 2f64 6976 3e0a 3c64 umber,
    .\n+001bf420: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001bf460: 723c 2f73 7061 6e3e 202a 4d65 7373 6167 r *Messag\n+001bf470: 6549 442c 203c 2f64 6976 3e0a 3c64 6976 eID,
    .const\n+001bf4b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001bf4d0: 2f73 7061 6e3e 202a 5265 6c61 7465 7354 /span> *RelatesT\n+001bf4e0: 6f2c 203c 2f64 6976 3e0a 3c64 6976 2063 o,
    .
    const <\n+001bf520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bf530: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *EndpointRe\n+001bf550: 6665 7265 6e63 652c 203c 2f64 6976 3e0a ference,
    .\n+001bf560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001bf5b0: 6861 723c 2f73 7061 6e3e 202a 5479 7065 har *Type\n+001bf5c0: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    const <\n+001bf600: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bf610: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *Scopes, .
    con\n+001bf660: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001bf690: 2a4d 6174 6368 4279 2c20 3c2f 6469 763e *MatchBy,
    \n+001bf6a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n+001bf6f0: 6368 6172 3c2f 7370 616e 3e20 2a58 4164 char *XAd\n+001bf700: 6472 732c 203c 2f64 6976 3e0a 3c64 6976 drs,
    .unsigned\n+001bf740: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Met\n+001bf770: 6164 6174 6156 6572 7369 6f6e 293c 2f64 adataVersion).

    Th\n+001bf7a0: 6573 6520 6576 656e 7420 6861 6e64 6c65 ese event handle\n+001bf7b0: 7273 2077 696c 6c20 6265 2069 6e76 6f6b rs will be invok\n+001bf7c0: 6564 2077 6865 6e20 696e 626f 756e 6420 ed when inbound \n+001bf7d0: 5753 2d44 6973 636f 7665 7279 206d 6573 WS-Discovery mes\n+001bf7e0: 7361 6765 7320 6172 7269 7665 2075 7369 sages arrive usi\n+001bf7f0: 6e67 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ng:

    .
    \n+001bf820: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!soap_val\n+001bf8a0: 6964 5f73 6f63 6b65 743c 2f61 3e28 3c61 id_socket(so\n+001bf900: 6170 5f62 696e 643c 2f61 3e28 3c61 2063 ap_bind(soap, NUL\n+001bf940: 4c2c 203c 6120 636c 6173 733d 2263 6f64 L, port\n+001bf990: 3c2f 613e 2c20 4241 434b 4c4f 4729 2929 , BACKLOG)))\n+001bf9a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... \n+001bf9c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error <\n+001bf9e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001bfa00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bfa10: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_wsdd_li\n+001bfa30: 7374 656e 283c 6120 636c 6173 733d 2263 sten(soap\n+001bfa60: 3c2f 613e 2c20 7469 6d65 6f75 7429 2920 , timeout)) \n+001bfa70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n+001bfa90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001bfaa0: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent\">// error
    ...
    .\n+001bfd10: 3c68 7220 636c 6173 733d 2266 6f6f 7465
    .
    .Cop\n+001bfd40: 7972 6967 6874 2028 4329 2032 3032 312c yright (C) 2021,\n+001bfd50: 2052 6f62 6572 7420 7661 6e20 456e 6765 Robert van Enge\n+001bfd60: 6c65 6e2c 2047 656e 6976 6961 2049 6e63 len, Genivia Inc\n+001bfd70: 2e2c 2041 6c6c 2052 6967 6874 7320 5265 ., All Rights Re\n+001bfd80: 7365 7276 6564 2e0a 3c2f 6164 6472 6573 served...
    .Converted on \n+001bfdc0: 4d6f 6e20 4d61 7220 3820 3230 3231 2031 Mon Mar 8 2021 1\n+001bfdd0: 333a 3036 3a32 3320 6279 203c 6120 7461 3:06:23 by Doxygen 1.9.1\n+001bfe30: 3c2f 6164 6472 6573 733e 0a3c 6272 3e0a
    .
    .\n+001bfe40: 3c64 6976 2073 7479 6c65 3d22 6865 6967
    ...\n"}]}]}]}]}