{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.MlZARAYk/b1/gsoap_2.8.104-3_armhf.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.MlZARAYk/b2/gsoap_2.8.104-3_armhf.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,7 +1,7 @@\n \n 4492e6b450670087b204e12dc6d6d4c4 5968324 debug optional gsoap-dbgsym_2.8.104-3_armhf.deb\n- a859f734f92a07e10d0d9e9b7482a5e6 12593708 doc optional gsoap-doc_2.8.104-3_all.deb\n+ a53fb92968a92d9372b4cf0b645d99b7 12593960 doc optional gsoap-doc_2.8.104-3_all.deb\n d33eff335e49aaa3e348718abd49c574 1434168 devel optional gsoap_2.8.104-3_armhf.deb\n 2dbad45e4cb22e5c53b3a1a9d9056a7f 1610328 debug optional libgsoap-2.8.104-dbgsym_2.8.104-3_armhf.deb\n d7ef1c6b98acfaa4cf89f4946ec9bec0 244636 libs optional libgsoap-2.8.104_2.8.104-3_armhf.deb\n ae5eaabf7b1f9848389b8fd7d26eb3d5 268120 libdevel optional libgsoap-dev_2.8.104-3_armhf.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 46996 2021-03-08 13:06:23.000000 control.tar.xz\n--rw-r--r-- 0 0 0 12546520 2021-03-08 13:06:23.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 12546772 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) 1834639 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) 1834618 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,57715 +56951,57714 @@\n 000de760: 6c69 7374 3c2f 7370 616e 3e20 3c73 7061 list id="1&\n 000de7b0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;0␟\n-000de7e0: 3b44 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;D.\n-000de7f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
..\n-000de820: 4326 2378 3234 3034 3b3c 2f73 7061 6e3e C␄\n-000de830: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
0␟D&\n-000de870: 2378 3234 3034 3b3c 2f73 7061 6e3e 3c2f #x2404;.
..C␄
. &l\n-000de900: 743b 6e65 7874 2068 7265 663d 2671 756f t;next href=&quo\n-000de910: 743b 3c2f 7370 616e 3e23 3126 7175 6f74 t;#1"\n-000de920: 3b2f 2667 743b 203c 2f64 6976 3e0a 3c64 ;/>
.\n-000de940: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </next>\n-000de970: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
</<\n-000de990: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000de9a0: 6f72 6474 7970 6522 3e6e 733a 6c69 7374 ordtype\">ns:list\n-000de9b0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
\n-000de9e0: 3c70 3e49 6e20 6361 7365 206d 756c 7469

In case multi\n-000de9f0: 2d72 6566 6572 656e 6365 6420 6461 7461 -referenced data\n-000dea00: 2069 7320 7265 6365 6976 6564 2074 6861 is received tha\n-000dea10: 7420 2264 6f65 7320 6e6f 7420 6669 7420 t \"does not fit \n-000dea20: 696e 2061 2070 6f69 6e74 6572 2d62 6173 in a pointer-bas\n-000dea30: 6564 2073 7472 7563 7475 7265 222c 2074 ed structure\", t\n-000dea40: 6865 2064 6174 6120 6973 2063 6f70 6965 he data is copie\n-000dea50: 642e 2046 6f72 2065 7861 6d70 6c65 2c20 d. For example, \n-000dea60: 7468 6520 666f 6c6c 6f77 696e 6720 7477 the following tw\n-000dea70: 6f20 7374 7275 6374 7320 6172 6520 7369 o structs are si\n-000dea80: 6d69 6c61 722c 2065 7863 6570 7420 7468 milar, except th\n-000dea90: 6174 2074 6865 2066 6972 7374 2075 7365 at the first use\n-000deaa0: 7320 706f 696e 7465 722d 6261 7365 6420 s pointer-based \n-000deab0: 6d65 6d62 6572 7320 7768 696c 6520 7468 members while th\n-000deac0: 6520 6f74 6865 7220 7573 6573 206e 6f6e e other uses non\n-000dead0: 2d70 6f69 6e74 6572 2d62 6173 6564 206d -pointer-based m\n-000deae0: 656d 6265 7273 3a3c 2f70 3e0a 3c64 6976 embers:

.
typede\n-000deb30: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f long x\n-000deb60: 7364 5f5f 696e 743b 203c 2f64 6976 3e0a sd__int;
.\n-000deb70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
.
struct \n-000debc0: 6e73 5f5f 7265 636f 7264 203c 2f64 6976 ns__record .
{
. \n-000dec00: 2020 7873 645f 5f69 6e74 202a 613b 203c xsd__int *a; <\n-000dec10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
xsd_\n-000dec30: 5f69 6e74 202a 623b 203c 2f64 6976 3e0a _int *b;
.\n-000dec40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
} P;
.\n-000dec70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000deca0: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n-000decb0: 5f5f 7265 636f 7264 3c2f 6469 763e 0a3c __record
.<\n-000decc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000decd0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{.
x\n-000decf0: 7364 5f5f 696e 7420 613b 203c 2f64 6976 sd__int a; .
xsd__int\n-000ded20: 2062 3b20 3c2f 6469 763e 0a3c 6469 7620 b;
.
} R\n-000ded40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
.
i\n-000ded90: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main()\n-000deda0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-000dedc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
P.a = &\n-000dede0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
.
P.\n-000dee00: 6220 3d20 2661 6d70 3b6e 3b20 3c2f 6469 b = &n; .
... //
\n-000dee50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.

\n-000df220: 5468 6520 6465 7365 7269 616c 697a 6174 The deserializat\n-000df230: 696f 6e20 6f66 2074 6865 2063 6f6e 7465 ion of the conte\n-000df240: 6e74 2069 6e20 7468 6520 3c63 6f64 653e nt in the \n-000df250: 523c 2f63 6f64 653e 2064 6174 6120 7374 R data st\n-000df260: 7275 6374 7572 6520 7468 6174 2064 6f65 ructure that doe\n-000df270: 7320 6e6f 7420 7573 6520 706f 696e 7465 s not use pointe\n-000df280: 7273 2074 6f20 696e 7465 6765 7273 2072 rs to integers r\n-000df290: 6573 756c 7473 2069 6e20 6120 636f 7079 esults in a copy\n-000df2a0: 206f 6620 6561 6368 206d 756c 7469 2d72 of each multi-r\n-000df2b0: 6566 6572 656e 6365 2069 6e74 6567 6572 eference integer\n-000df2c0: 2e20 4e6f 7465 2074 6861 7420 7468 6520 . Note that the \n-000df2d0: 7477 6f20 7374 7275 6374 7320 7265 7365 two structs rese\n-000df2e0: 6d62 6c65 2074 6865 2073 616d 6520 584d mble the same XM\n-000df2f0: 4c20 6461 7461 2074 7970 6520 6265 6361 L data type beca\n-000df300: 7573 6520 7468 6520 7472 6169 6c69 6e67 use the trailing\n-000df310: 2075 6e64 6572 7363 6f72 6520 7769 6c6c underscore will\n-000df320: 2062 6520 6967 6e6f 7265 6420 696e 2058 be ignored in X\n-000df330: 4d4c 2065 6e63 6f64 696e 6720 616e 6420 ML encoding and \n-000df340: 6465 636f 6469 6e67 2e3c 2f70 3e0a 3c70 decoding.

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

.NULL po\n-000df3b0: 696e 7465 7273 2061 6e64 206e 696c 2065 inters and nil e\n-000df3c0: 6c65 6d65 6e74 733c 2f68 333e 0a3c 703e lements

.

\n-000df3d0: 4120 4e55 4c4c 2070 6f69 6e74 6572 2069 A NULL pointer i\n-000df3e0: 7320 6e6f 7420 7365 7269 616c 697a 6564 s not serialized\n-000df3f0: 2c20 756e 6c65 7373 2074 6865 2070 6f69 , unless the poi\n-000df400: 6e74 6572 206d 656d 6265 7220 6f66 2061 nter member of a\n-000df410: 2073 7472 7563 7420 6f72 2063 6c61 7373 struct or class\n-000df420: 2069 7320 6465 636c 6172 6564 2069 6e20 is declared in \n-000df430: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n-000df440: 6164 6572 2066 696c 6520 6173 206e 696c ader file as nil\n-000df450: 6c61 626c 6520 7769 7468 203c 636f 6465 lable with nullptr \n-000df470: 6f72 2069 6e20 7468 6520 756e 6c69 6b65 or in the unlike\n-000df480: 6c79 2063 6173 6520 7468 6520 706f 696e ly case the poin\n-000df490: 7465 7220 6974 7365 6c66 2069 7320 706f ter itself is po\n-000df4a0: 696e 7465 6420 746f 2062 7920 616e 6f74 inted to by anot\n-000df4b0: 6865 7220 706f 696e 7465 7220 2862 7574 her pointer (but\n-000df4c0: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section Run-time flag\n-000df500: 733c 2f61 3e20 746f 2063 6f6e 7472 6f6c s to control\n-000df510: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati\n-000df520: 6f6e 206f 6620 4e55 4c4c 7329 2c20 666f on of NULLs), fo\n-000df530: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n-000df540: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000df550: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n-000df580: 7563 7420 3c2f 7370 616e 3e58 203c 2f64 uct X .
{
.\n-000df5c0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000df5e0: 743c 2f73 7061 6e3e 202a 703b 203c 2f64 t *p; .
int *\n-000df630: 2a71 3b20 3c2f 6469 763e 0a3c 6469 7620 *q;
.
\n-000df650: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int *r n\n-000df690: 756c 6c70 7472 3c2f 7370 616e 3e20 313b ullptr 1;\n-000df6a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}
\n-000df6c0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The t\n-000df6e0: 7970 6573 2073 6563 7469 6f6e 206f 6620 ypes section of \n-000df6f0: 6120 5753 444c 2064 6573 6372 6970 7469 a WSDL descripti\n-000df700: 6f6e 2063 6f6e 7461 696e 7320 696e 666f on contains info\n-000df710: 726d 6174 696f 6e20 6f6e 2074 6865 2022 rmation on the \"\n-000df720: 6e69 6c6c 6162 696c 6974 7922 206f 6620 nillability\" of \n-000df730: 6461 7461 2c20 7768 6963 6820 6973 2064 data, which is d\n-000df740: 6563 6c61 7265 6420 6173 203c 636f 6465 eclared as nullptr \n-000df760: 6d65 6d62 6572 7320 7768 6572 6520 7468 members where th\n-000df770: 6520 3c63 6f64 653e 313c 2f63 6f64 653e e 1\n-000df780: 2069 6e64 6963 6174 6573 2074 6861 7420 indicates that \n-000df790: 7468 6520 6d65 6d62 6572 2069 7320 7265 the member is re\n-000df7a0: 7175 6972 6564 2028 3c65 6d3e 3c63 6f64 quired (minOccurs and \n-000df7d0: 3c63 6f64 653e 6d61 784f 6363 7572 733c maxOccurs<\n-000df7e0: 2f63 6f64 653e 3c2f 656d 3e20 6172 6520 /code> are \n-000df7f0: 3120 7365 7420 7769 7468 203c 636f 6465 1 set with 1:1 or s\n-000df810: 696d 706c 7920 3c63 6f64 653e 313c 2f63 imply 1).

.

Su\n-000df830: 7070 6f73 6520 706f 696e 7465 7220 3c63 ppose pointer q poi\n-000df850: 6e74 7320 746f 2070 6f69 6e74 6572 203c nts to pointer <\n-000df860: 636f 6465 3e70 3c2f 636f 6465 3e20 616e code>p an\n-000df870: 6420 7375 7070 6f73 6520 3c63 6f64 653e d suppose \n-000df880: 703c 2f63 6f64 653e 2061 6e64 203c 636f p and r are \n-000df8a0: 4e55 4c4c 2e20 496e 2074 6861 7420 6361 NULL. In that ca\n-000df8b0: 7365 2074 6865 203c 636f 6465 3e58 3c2f se the X struct is \n-000df8d0: 7365 7269 616c 697a 6564 2077 6974 6820 serialized with \n-000df8e0: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n-000df8f0: 4752 4150 483c 2f63 6f64 653e 2061 733a GRAPH as:\n-000df900: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
&\n-000df940: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;X>
.\n-000df970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<p id="1&q\n-000df9f0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; xsi:nil\n-000dfa20: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000dfa40: 6f74 3b74 7275 6526 7175 6f74 3b3c 2f73 ot;true"/>
.\n-000dfa60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<q ref=0␟\n-000dfae0: 3b44 2623 7832 3430 343b 3c2f 7370 616e ;D␄
.
<r id\n-000dfb30: 3d26 7175 6f74 3b3c 2f73 7061 6e3e 313c ="1<\n-000dfb40: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000dfb50: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000dfb60: 3b20 7873 693a 6e69 6c3d 2671 756f 743b ; xsi:nil="\n-000dfb70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 tru\n-000dfb90: 653c 2f73 7061 6e3e 2671 756f 743b 2f26 e"/&\n-000dfba0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
<\n-000dfbc0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /X>
.

T\n-000dfc10: 6865 2064 6573 6572 6961 6c69 7a65 7220 he deserializer \n-000dfc20: 7265 636f 6e73 7472 7563 7473 2074 6865 reconstructs the\n-000dfc30: 2073 7472 7563 7420 3c63 6f64 653e 583c struct X<\n-000dfc40: 2f63 6f64 653e 2066 726f 6d20 7468 6973 /code> from this\n-000dfc50: 2066 6f72 6d20 6f66 2058 4d4c 2c20 7468 form of XML, th\n-000dfc60: 6572 6562 7920 7072 6573 6572 7669 6e67 ereby preserving\n-000dfc70: 2074 6865 2069 6e74 6567 7269 7479 206f the integrity o\n-000dfc80: 6620 7468 6520 6461 7461 2073 7472 7563 f the data struc\n-000dfc90: 7475 7265 2073 6572 6961 6c69 7a65 642e ture serialized.\n-000dfca0: 3c2f 703e 0a3c 703e 5768 656e 2074 6865

.

When the\n-000dfcb0: 2064 6573 6572 6961 6c69 7a65 7220 656e deserializer en\n-000dfcc0: 636f 756e 7465 7273 2061 6e20 584d 4c20 counters an XML \n-000dfcd0: 656c 656d 656e 7420 7468 6174 2068 6173 element that has\n-000dfce0: 2061 203c 656d 3e3c 636f 6465 3e78 7369 a xsi\n-000dfcf0: 3a6e 696c 3d22 7472 7565 223c 2f63 6f64 :nil=\"true\" attribut\n-000dfd10: 6520 6275 7420 7468 6520 636f 7272 6573 e but the corres\n-000dfd20: 706f 6e64 696e 6720 432f 432b 2b20 6461 ponding C/C++ da\n-000dfd30: 7461 2069 7320 6e6f 7420 6120 706f 696e ta is not a poin\n-000dfd40: 7465 7220 6f72 2072 6566 6572 656e 6365 ter or reference\n-000dfd50: 2c20 7468 6520 6465 7365 7269 616c 697a , the deserializ\n-000dfd60: 6572 2077 696c 6c20 7465 726d 696e 6174 er will terminat\n-000dfd70: 6520 7769 7468 2061 203c 636f 6465 3e23 e with a #\n-000dfd80: 534f 4150 5f4e 554c 4c3c 2f63 6f64 653e SOAP_NULL\n-000dfd90: 2066 6175 6c74 2077 6865 6e20 7468 6520 fault when the \n-000dfda0: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n-000dfdb0: 5354 5249 4354 3c2f 636f 6465 3e20 666c STRICT fl\n-000dfdc0: 6167 2069 7320 7365 742e 3c2f 703e 0a3c ag is set.

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

.

.Void p\n-000dfe30: 6f69 6e74 6572 2073 6572 6961 6c69 7a61 ointer serializa\n-000dfe40: 7469 6f6e 3c2f 6832 3e0a 3c70 3e56 6f69 tion

.

Voi\n-000dfe50: 6420 706f 696e 7465 7273 2028 3c63 6f64 d pointers (void*) \n-000dfe70: 6361 6e6e 6f74 2062 6520 7365 7269 616c cannot be serial\n-000dfe80: 697a 6564 2069 6e20 584d 4c20 6265 6361 ized in XML beca\n-000dfe90: 7573 6520 7468 6520 7479 7065 206f 6620 use the type of \n-000dfea0: 6461 7461 2072 6566 6572 7265 6420 746f data referred to\n-000dfeb0: 2069 7320 756e 7479 7065 642e 2054 6f20 is untyped. To \n-000dfec0: 656e 6162 6c65 2074 6865 2073 6572 6961 enable the seria\n-000dfed0: 6c69 7a61 7469 6f6e 206f 6620 766f 6964 lization of void\n-000dfee0: 2070 6f69 6e74 6572 7320 7468 6174 2061 pointers that a\n-000dfef0: 7265 206d 656d 6265 7273 206f 6620 7374 re members of st\n-000dff00: 7275 6374 7320 616e 6420 636c 6173 7365 ructs and classe\n-000dff10: 732c 2079 6f75 2063 616e 2069 6e73 6572 s, you can inser\n-000dff20: 7420 6120 3c63 6f64 653e 696e 7420 5f5f t a int __\n-000dff30: 7479 7065 3c2f 636f 6465 3e20 6d65 6d62 type memb\n-000dff40: 6572 2072 6967 6874 2062 6566 6f72 6520 er right before \n-000dff50: 7468 6520 766f 6964 2070 6f69 6e74 6572 the void pointer\n-000dff60: 206d 656d 6265 722e 2054 6865 203c 636f member. The int __type member cont\n-000dff90: 6169 6e73 2072 756e 2074 696d 6520 696e ains run time in\n-000dffa0: 666f 726d 6174 696f 6e20 6f6e 2074 6865 formation on the\n-000dffb0: 2074 7970 6520 6f66 2074 6865 2064 6174 type of the dat\n-000dffc0: 6120 706f 696e 7465 6420 746f 2062 7920 a pointed to by \n-000dffd0: 3c63 6f64 653e 766f 6964 2a3c 2f63 6f64 void* member in a s\n-000dfff0: 7472 7563 742f 636c 6173 7320 746f 2065 truct/class to e\n-000e0000: 6e61 626c 6520 7468 6520 7365 7269 616c nable the serial\n-000e0010: 697a 6174 696f 6e20 6f66 2074 6869 7320 ization of this \n-000e0020: 6461 7461 2e20 5468 6520 3c63 6f64 653e data. The \n-000e0030: 696e 7420 5f5f 7479 7065 3c2f 636f 6465 int __type member is set \n-000e0050: 746f 2061 203c 636f 6465 3e53 4f41 505f to a SOAP_\n-000e0060: 5459 5045 5f54 3c2f 636f 6465 3e20 7661 TYPE_T va\n-000e0070: 6c75 652c 2077 6865 7265 203c 636f 6465 lue, where T is the\n-000e0090: 206e 616d 6520 6f66 2061 2074 7970 652e name of a type.\n-000e00a0: 2054 6865 2073 6f61 7063 7070 3220 746f The soapcpp2 to\n-000e00b0: 6f6c 2067 656e 6572 6174 6573 2074 6865 ol generates the\n-000e00c0: 203c 636f 6465 3e53 4f41 505f 5459 5045 SOAP_TYPE\n-000e00d0: 5f54 3c2f 636f 6465 3e20 6465 6669 6e69 _T defini\n-000e00e0: 7469 6f6e 7320 696e 203c 656d 3e3c 636f tions in soapH.h and uses \n-000e0110: 7468 656d 2069 6e74 6572 6e61 6c6c 7920 them internally \n-000e0120: 746f 2075 6e69 7175 656c 7920 6964 656e to uniquely iden\n-000e0130: 7469 6679 2074 6865 2074 7970 6520 6f66 tify the type of\n-000e0140: 2065 6163 6820 6f62 6a65 6374 2e20 5468 each object. Th\n-000e0150: 6520 7479 7065 206e 616d 696e 6720 636f e type naming co\n-000e0160: 6e76 656e 7469 6f6e 7320 6f75 746c 696e nventions outlin\n-000e0170: 6564 2069 6e20 5365 6374 696f 6e20 3c61 ed in Section Serializ\n-000e01b0: 696e 6720 432f 432b 2b20 6461 7461 2074 ing C/C++ data t\n-000e01c0: 6f20 584d 4c3c 2f61 3e20 6172 6520 7573 o XML are us\n-000e01d0: 6564 2074 6f20 6465 7465 726d 696e 6520 ed to determine \n-000e01e0: 7468 6520 7479 7065 206e 616d 6520 666f the type name fo\n-000e01f0: 7220 3c63 6f64 653e 543c 2f63 6f64 653e r T\n-000e0200: 2e20 5661 6c75 6573 2073 6572 6961 6c69 . Values seriali\n-000e0210: 7a65 6420 696e 2058 4d4c 2077 6974 6820 zed in XML with \n-000e0220: 7468 6973 2061 7070 726f 6163 6820 616c this approach al\n-000e0230: 7761 7973 2063 6172 7279 2074 6865 203c ways carry the <\n-000e0240: 656d 3e3c 636f 6465 3e78 7369 3a74 7970 em>xsi:typ\n-000e0250: 653c 2f63 6f64 653e 3c2f 656d 3e20 6174 e at\n-000e0260: 7472 6962 7574 6520 696e 2058 4d4c 2074 tribute in XML t\n-000e0270: 6f20 696e 6469 6361 7465 2074 6865 2074 o indicate the t\n-000e0280: 7970 6520 6f66 2063 6f6e 7465 6e74 2073 ype of content s\n-000e0290: 6572 6961 6c69 7a65 642e 3c2f 703e 0a3c erialized.

.<\n-000e02a0: 703e 4865 7265 2069 7320 616e 2065 7861 p>Here is an exa\n-000e02b0: 6d70 6c65 2074 6f20 696c 6c75 7374 7261 mple to illustra\n-000e02c0: 7465 2074 6865 2073 6572 6961 6c69 7a61 te the serializa\n-000e02d0: 7469 6f6e 206f 6620 6120 3c63 6f64 653e tion of a \n-000e02e0: 766f 6964 2a3c 2f63 6f64 653e 206d 656d void* mem\n-000e02f0: 6265 7220 696e 2061 2073 7472 7563 742f ber in a struct/\n-000e0300: 636c 6173 733a 3c2f 703e 0a3c 6469 7620 class:

.
struct \n-000e0350: 3c2f 7370 616e 3e6e 735f 5f72 6563 6f72 ns__recor\n-000e0360: 6420 3c2f 6469 763e 0a3c 6469 7620 636c d
.
{.
int __\n-000e03c0: 7479 7065 3b20 3c73 7061 6e20 636c 6173 type; // t\n-000e03e0: 6865 2053 4f41 505f 5459 5045 5f54 2070 he SOAP_TYPE_T p\n-000e03f0: 6f69 6e74 6564 2074 6f20 6279 2076 616c ointed to by val\n-000e0400: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000e0420: 2020 2020 3c73 7061 6e20 636c 6173 733d vo\n-000e0440: 6964 3c2f 7370 616e 3e20 2a76 616c 3b20 id *val; \n-000e0450: 203c 7370 616e 2063 6c61 7373 3d22 636f // serial\n-000e0470: 697a 6520 616e 7920 7479 7065 2069 6e20 ize any type in \n-000e0480: 656c 656d 656e 7420 266c 743b 7661 6c26 element <val&\n-000e0490: 6774 3b3c 2f73 7061 6e3e 3c2f 6469 763e gt;
\n-000e04a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

The \n-000e04e0: 5f5f 7479 7065 3c2f 636f 6465 3e20 696e __type in\n-000e04f0: 7465 6765 7220 6361 6e20 6265 2073 6574 teger can be set\n-000e0500: 2074 6f20 3020 6174 2072 756e 2074 696d to 0 at run tim\n-000e0510: 6520 746f 206f 6d69 7420 7468 6520 7365 e to omit the se\n-000e0520: 7269 616c 697a 6174 696f 6e20 6f66 2074 rialization of t\n-000e0530: 6865 2076 6f69 6420 706f 696e 7465 7220 he void pointer \n-000e0540: 6d65 6d62 6572 2e3c 2f70 3e0a 3c70 3e54 member.

.

T\n-000e0550: 6865 2066 6f6c 6c6f 7769 6e67 2065 7861 he following exa\n-000e0560: 6d70 6c65 2069 6c6c 7573 7472 6174 6573 mple illustrates\n-000e0570: 2074 6865 2069 6e69 7469 616c 697a 6174 the initializat\n-000e0580: 696f 6e20 6f66 203c 636f 6465 3e6d 7953 ion of myS\n-000e0590: 7472 7563 743c 2f63 6f64 653e 2077 6974 truct wit\n-000e05a0: 6820 6120 766f 6964 2070 6f69 6e74 6572 h a void pointer\n-000e05b0: 2074 6f20 616e 2069 6e74 3a3c 2f70 3e0a to an int:

.\n-000e05c0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st\n-000e0600: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n-000e0610: 7265 636f 7264 2053 3b20 3c2f 6469 763e record S;
\n-000e0620: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int\n-000e0650: 3c2f 7370 616e 3e20 6e20 3d20 3132 333b n = 123;\n-000e0660: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
S.val \n-000e0680: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (voi\n-000e06a0: 643c 2f73 7061 6e3e 2a29 2661 6d70 3b6e d*)&n\n-000e06b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
S.__t\n-000e06d0: 7970 6520 3d20 534f 4150 5f54 5950 455f ype = SOAP_TYPE_\n-000e06e0: 696e 743b 203c 2f64 6976 3e0a 3c2f 6469 int;
.

The serial\n-000e0710: 697a 6564 206f 7574 7075 7420 6f66 203c ized output of <\n-000e0720: 636f 6465 3e53 3c2f 636f 6465 3e20 636f code>S co\n-000e0730: 6e74 6169 6e73 2074 6865 2069 6e74 6567 ntains the integ\n-000e0740: 6572 2069 6e20 6974 7320 3c65 6d3e 3c63 er in its val element:

\n-000e0770: 0a3c 6469 7620 636c 6173 733d 2261 6c74 .
<<\n-000e07b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e07c0: 6f72 6474 7970 6522 3e6e 733a 7265 636f ordtype\">ns:reco\n-000e07d0: 7264 3c2f 7370 616e 3e26 6774 3b3c 2f64 rd>.
<val\n-000e0820: 203c 7370 616e 2063 6c61 7373 3d22 6b65 xsi:type<\n-000e0840: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:int\n-000e0870: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n-000e0880: 3b31 3233 266c 743b 2f3c 7370 616e 2063 ;123</val>\n-000e08b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
</<\n-000e08d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e08e0: 6f72 6474 7970 6522 3e6e 733a 7265 636f ordtype\">ns:reco\n-000e08f0: 7264 3c2f 7370 616e 3e26 6774 3b3c 2f64 rd>.

The deseria\n-000e0930: 6c69 7a65 7220 666f 7220 3c63 6f64 653e lizer for \n-000e0940: 6e73 5f5f 7265 636f 7264 3c2f 636f 6465 ns__record will automatic\n-000e0960: 616c 6c79 2073 6574 2074 6865 203c 636f ally set the __type\n-000e0980: 2066 6965 6c64 2061 6e64 2076 6f69 6420 field and void \n-000e0990: 706f 696e 7465 7220 7768 656e 2064 6573 pointer when des\n-000e09a0: 6572 6961 6c69 7a69 6e67 2074 6865 2064 erializing the d\n-000e09b0: 6174 612c 2070 726f 7669 6465 6420 7468 ata, provided th\n-000e09c0: 6174 2074 6865 2058 4d4c 2065 6c65 6d65 at the XML eleme\n-000e09d0: 6e74 203c 656d 3e3c 636f 6465 3e76 616c nt val\n-000e09e0: 3c2f 636f 6465 3e3c 2f65 6d3e 2063 6172 car\n-000e09f0: 7269 6573 2074 6865 203c 656d 3e3c 636f ries the xsi:type attribut\n-000e0a20: 6520 6672 6f6d 2077 6869 6368 2069 7420 e from which it \n-000e0a30: 6361 6e20 6465 7465 726d 696e 6520 7468 can determine th\n-000e0a40: 6520 7479 7065 2e3c 2f70 3e0a 3c64 6c20 e type.

.
Note
when seria\n-000e0a80: 6c69 7a69 6e67 2073 7472 696e 6773 2076 lizing strings v\n-000e0a90: 6961 2061 203c 636f 6465 3e76 6f69 642a ia a void*\n-000e0aa0: 3c2f 636f 6465 3e20 6d65 6d62 6572 2c20 member, \n-000e0ab0: 7468 6520 3c63 6f64 653e 766f 6964 2a3c the void*<\n-000e0ac0: 2f63 6f64 653e 2070 6f69 6e74 6572 206d /code> pointer m\n-000e0ad0: 7573 7420 6469 7265 6374 6c79 2070 6f69 ust directly poi\n-000e0ae0: 6e74 2074 6f20 7468 6520 7374 7269 6e67 nt to the string\n-000e0af0: 2076 616c 7565 2072 6174 6865 7220 7468 value rather th\n-000e0b00: 616e 2069 6e64 6972 6563 746c 7920 6173 an indirectly as\n-000e0b10: 2077 6974 6820 616c 6c20 6f74 6865 7220 with all other \n-000e0b20: 7479 7065 732e 2046 6f72 2065 7861 6d70 types. For examp\n-000e0b30: 6c65 3a3c 2f64 643e 3c2f 646c 3e0a 3c64 le:
.
stru\n-000e0b80: 6374 203c 2f73 7061 6e3e 6e73 5f5f 7265 ct ns__re\n-000e0b90: 636f 7264 2053 3b20 3c2f 6469 763e 0a3c cord S;
.<\n-000e0ba0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e0bb0: 3e53 2e76 616c 203d 2028 3c73 7061 6e20 >S.val = (void*\n-000e0be0: 293c 7370 616e 2063 6c61 7373 3d22 7374 )&qu\n-000e0c00: 6f74 3b48 656c 6c6f 2671 756f 743b 3c2f ot;Hello";
.\n-000e0c30: 532e 5f5f 7479 7065 203d 2053 4f41 505f S.__type = SOAP_\n-000e0c40: 5459 5045 5f73 7472 696e 673b 203c 2f64 TYPE_string; .

Th\n-000e0c70: 6973 2069 7320 7468 6520 6361 7365 2066 is is the case f\n-000e0c80: 6f72 2061 6c6c 2073 7472 696e 672d 6261 or all string-ba\n-000e0c90: 7365 6420 7479 7065 732c 2069 6e63 6c75 sed types, inclu\n-000e0ca0: 6469 6e67 2074 7970 6573 2064 6566 696e ding types defin\n-000e0cb0: 6564 2077 6974 6820 3c63 6f64 653e 7479 ed with ty\n-000e0cc0: 7065 6465 6620 6368 6172 2a3c 2f63 6f64 pedef char*.

.

You m\n-000e0ce0: 6179 2075 7365 2061 6e20 6172 6269 7472 ay use an arbitr\n-000e0cf0: 6172 7920 7375 6666 6978 2077 6974 6820 ary suffix with \n-000e0d00: 7468 6520 3c63 6f64 653e 5f5f 7479 7065 the __type\n-000e0d10: 3c2f 636f 6465 3e20 6d65 6d62 6572 7320 members \n-000e0d20: 746f 2068 616e 646c 6520 6d75 6c74 6970 to handle multip\n-000e0d30: 6c65 2076 6f69 6420 706f 696e 7465 7273 le void pointers\n-000e0d40: 2069 6e20 7374 7275 6374 732f 636c 6173 in structs/clas\n-000e0d50: 7365 732e 2046 6f72 2065 7861 6d70 6c65 ses. For example\n-000e0d60: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct ns__record .
{
.\n-000e0df0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000e0e10: 743c 2f73 7061 6e3e 205f 5f74 7970 654f t __typeO\n-000e0e20: 6670 3b20 3c73 7061 6e20 636c 6173 733d fp; // the\n-000e0e40: 2053 4f41 505f 5459 5045 5f54 2070 6f69 SOAP_TYPE_T poi\n-000e0e50: 6e74 6564 2074 6f20 6279 2070 203c 2f73 nted to by p
.
\n-000e0e80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n-000e0ea0: 2f73 7061 6e3e 202a 703b 2020 2020 2020 /span> *p; \n-000e0eb0: 203c 7370 616e 2063 6c61 7373 3d22 636f // elemen\n-000e0ed0: 7420 266c 743b 7026 6774 3b3c 2f73 7061 t <p>
.
<\n-000e0f00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e0f10: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __typeOfq; <\n-000e0f30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000e0f40: 656e 7422 3e2f 2f20 7468 6520 534f 4150 ent\">// the SOAP\n-000e0f50: 5f54 5950 455f 5420 706f 696e 7465 6420 _TYPE_T pointed \n-000e0f60: 746f 2062 7920 7120 3c2f 7370 616e 3e3c to by q <\n-000e0f70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
void *q; // element <\n-000e0fe0: 3b71 2667 743b 3c2f 7370 616e 3e3c 2f64 ;q>.
};
.<\n-000e1010: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

Because\n-000e1030: 2073 6572 7669 6365 206d 6574 686f 6420 service method \n-000e1040: 7061 7261 6d65 7465 7273 2061 7265 2073 parameters are s\n-000e1050: 746f 7265 6420 7769 7468 696e 2073 7472 tored within str\n-000e1060: 7563 7473 2c20 796f 7520 6361 6e20 7573 ucts, you can us\n-000e1070: 6520 3c63 6f64 653e 5f5f 7479 7065 3c2f e __type and \n-000e1090: 766f 6964 2a3c 2f63 6f64 653e 2070 6172 void* par\n-000e10a0: 616d 6574 6572 7320 746f 2070 6173 7320 ameters to pass \n-000e10b0: 706f 6c79 6d6f 7270 6869 6320 6172 6775 polymorphic argu\n-000e10c0: 6d65 6e74 7320 7769 7468 6f75 7420 6861 ments without ha\n-000e10d0: 7669 6e67 2074 6f20 6465 6669 6e65 2061 ving to define a\n-000e10e0: 2043 2b2b 2063 6c61 7373 2068 6965 7261 C++ class hiera\n-000e10f0: 7263 6879 2028 5365 6374 696f 6e20 3c61 rchy (Section Polymorp\n-000e1130: 6869 736d 2c20 6465 7269 7665 6420 7479 hism, derived ty\n-000e1140: 7065 732c 2061 6e64 2064 796e 616d 6963 pes, and dynamic\n-000e1150: 2062 696e 6469 6e67 2069 6e20 432b 2b3c binding in C++<\n-000e1160: 2f61 3e20 292c 2070 726f 7669 6465 6420 /a> ), provided \n-000e1170: 7468 6174 203c 656d 3e3c 636f 6465 3e78 that x\n-000e1180: 7369 3a74 7970 653c 2f63 6f64 653e 3c2f si:type attributes a\n-000e11a0: 7265 2070 7265 7365 6e74 2069 6e20 7468 re present in th\n-000e11b0: 6520 584d 4c20 656c 656d 656e 7473 2e20 e XML elements. \n-000e11c0: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

\n-000e11d0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
t\n-000e1210: 7970 6564 6566 3c2f 7370 616e 3e20 3c73 ypedef char *xsd__string\n-000e1250: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
typedef \n-000e1290: 3c73 7061 6e20 636c 6173 733d 226b 6579 int xsd__int; <\n-000e12c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
ty\n-000e12f0: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef float xsd__float; \n-000e1330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
e\n-000e1360: 6e75 6d3c 2f73 7061 6e3e 206e 735f 5f73 num ns__s\n-000e1370: 7461 7475 7320 7b20 6f6e 2c20 6f66 6620 tatus { on, off \n-000e1380: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
.
struct \n-000e13c0: 6e73 5f5f 7769 6467 6574 3c2f 6469 763e ns__widget
\n-000e13d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n-000e1400: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-000e1420: 2f73 7061 6e3e 202a 6e61 6d65 3b3c 2f64 /span> *name;.
int p\n-000e1470: 6172 743b 3c2f 6469 763e 0a3c 6469 7620 art;
.
};<\n-000e1490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int ns_\n-000e14d0: 5f77 6562 6d65 7468 6f64 283c 7370 616e _webmethod(int \n-000e1500: 5f5f 7479 7065 2c20 3c73 7061 6e20 636c __type, void *d\n-000e1530: 6174 612c 203c 7370 616e 2063 6c61 7373 ata, struc\n-000e1550: 743c 2f73 7061 6e3e 206e 735f 5f77 6562 t ns__web\n-000e1560: 6d65 7468 6f64 5265 7370 6f6e 7365 207b methodResponse {\n-000e1570: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __type; void *return_; } \n-000e15d0: 2a6f 7574 293b 3c2f 6469 763e 0a3c 2f64 *out);
.

This meth\n-000e1600: 6f64 2068 6173 2061 2070 6f6c 796d 6f72 od has a polymor\n-000e1610: 7068 6963 2069 6e70 7574 2070 6172 616d phic input param\n-000e1620: 6574 6572 203c 636f 6465 3e64 6174 613c eter data<\n-000e1630: 2f63 6f64 653e 2061 6e64 2061 2070 6f6c /code> and a pol\n-000e1640: 796d 6f72 7068 6963 206f 7574 7075 7420 ymorphic output \n-000e1650: 7061 7261 6d65 7465 7220 3c63 6f64 653e parameter \n-000e1660: 7265 7475 726e 5f3c 2f63 6f64 653e 2e20 return_. \n-000e1670: 5468 6520 3c63 6f64 653e 5f5f 7479 7065 The __type\n-000e1680: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n-000e1690: 7273 2063 616e 2062 6520 6f6e 6520 6f66 rs can be one of\n-000e16a0: 203c 636f 6465 3e53 4f41 505f 5459 5045 SOAP_TYPE\n-000e16b0: 5f78 7364 5f5f 7374 7269 6e67 3c2f 636f _xsd__string, SOAP_\n-000e16d0: 5459 5045 5f78 7364 5f5f 696e 743c 2f63 TYPE_xsd__int, SOAP\n-000e16f0: 5f54 5950 455f 7873 645f 5f66 6c6f 6174 _TYPE_xsd__float\n-000e1700: 3c2f 636f 6465 3e2c 203c 636f 6465 3e53 , S\n-000e1710: 4f41 505f 5459 5045 5f6e 735f 5f73 7461 OAP_TYPE_ns__sta\n-000e1720: 7475 733c 2f63 6f64 653e 2c20 6f72 203c tus, or <\n-000e1730: 636f 6465 3e53 4f41 505f 5459 5045 5f6e code>SOAP_TYPE_n\n-000e1740: 735f 5f77 6964 6765 743c 2f63 6f64 653e s__widget\n-000e1750: 2e20 5468 6520 5753 444c 2061 6e64 2058 . The WSDL and X\n-000e1760: 5344 2066 696c 6573 2070 726f 6475 6365 SD files produce\n-000e1770: 6420 6279 2074 6865 2073 6f61 7063 7070 d by the soapcpp\n-000e1780: 3220 746f 6f6c 2064 6563 6c61 7265 2074 2 tool declare t\n-000e1790: 6865 203c 636f 6465 3e76 6f69 642a 3c2f he void* polymorphi\n-000e17b0: 6320 6d65 6d62 6572 7320 6173 203c 656d c members as xsd:anyTy\n-000e17d0: 7065 3c2f 636f 6465 3e3c 2f65 6d3e 2065 pe e\n-000e17e0: 6c65 6d65 6e74 732e 3c2f 703e 0a3c 703e lements.

.

\n-000e17f0: 546f 2064 6563 6c61 7265 2061 2077 7261 To declare a wra\n-000e1800: 7070 6572 2073 7472 7563 742f 636c 6173 pper struct/clas\n-000e1810: 7320 666f 7220 3c63 6f64 653e 766f 6964 s for void\n-000e1820: 2a3c 2f63 6f64 653e 2070 6f69 6e74 6572 * pointer\n-000e1830: 7320 616c 6c6f 7773 2075 7320 746f 2072 s allows us to r\n-000e1840: 6575 7365 2074 6869 7320 6d65 6368 616e euse this mechan\n-000e1850: 6973 6d20 7768 656e 2077 6520 7573 6520 ism when we use \n-000e1860: 3c63 6f64 653e 5f5f 7365 6c66 3c2f 636f __self as a member \n-000e1880: 6e61 6d65 2074 6861 7420 7265 6665 7273 name that refers\n-000e1890: 2074 6f20 7468 6520 6375 7272 656e 7420 to the current \n-000e18a0: 584d 4c20 656c 656d 656e 7420 7461 6720 XML element tag \n-000e18b0: 6e61 6d65 3a3c 2f70 3e0a 3c64 6976 2063 name:

.
\n-000e18d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-000e1900: 2f73 7061 6e3e 5f5f 616e 7920 3c2f 6469 /span>__any .
{
. \n-000e1940: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-000e1960: 3c2f 7370 616e 3e20 5f5f 7479 7065 3b20 __type; \n-000e1970: 2020 3c73 7061 6e20 636c 6173 733d 2263 // the S\n-000e1990: 4f41 505f 5459 5045 5f54 2070 6f69 6e74 OAP_TYPE_T point\n-000e19a0: 6564 2074 6f20 6279 205f 5f73 656c 663c ed to by __self<\n-000e19b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-000e19d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi\n-000e19f0: 643c 2f73 7061 6e3e 202a 5f5f 7365 6c66 d *__self\n-000e1a00: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // seria\n-000e1a20: 6c69 7a65 2061 6e79 2074 7970 6520 6f66 lize any type of\n-000e1a30: 2063 6f6e 7465 6e74 206f 6620 7468 6520 content of the \n-000e1a40: 6375 7272 656e 7420 656c 656d 656e 743c current element<\n-000e1a50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n-000e1a70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
\n-000e1aa0: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n-000e1ab0: 5f5f 7265 636f 7264 3c2f 6469 763e 0a3c __record
.<\n-000e1ac0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e1ad0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
.
_\n-000e1af0: 5f61 6e79 2076 616c 3b3c 2f64 6976 3e0a _any val;
.\n-000e1b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

The s\n-000e1d00: 6572 6961 6c69 7a65 6420 6f75 7470 7574 erialized output\n-000e1d10: 206f 6620 3c63 6f64 653e 533c 2f63 6f64 of S contains the \n-000e1d30: 696e 7465 6765 723a 3c2f 703e 0a3c 6469 integer:

. <\n-000e1d50: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000e1d60: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
<ns:record>
.\n-000e1db0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<val xsi:type=&\n-000e1e30: 7175 6f74 3b78 7364 3a69 6e74 2671 756f quot;xsd:int&quo\n-000e1e40: 743b 3c2f 7370 616e 3e26 6774 3b31 3233 t;>123\n-000e1e50: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </v\n-000e1e70: 616c 3c2f 7370 616e 3e26 6774 3b3c 2f64 al>.
</ns:record>
.\n-000e1ed0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
.... Back to table \n-000e1f10: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-000e1f20: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

.\n-000e1f50: 4669 7865 642d 7369 7a65 2061 7272 6179 Fixed-size array\n-000e1f60: 2073 6572 6961 6c69 7a61 7469 6f6e 3c2f serialization.

Fixed siz\n-000e1f80: 6520 6172 7261 7973 2061 7265 2073 6572 e arrays are ser\n-000e1f90: 6961 6c69 7a65 6420 6173 2072 6570 6574 ialized as repet\n-000e1fa0: 6974 696f 6e73 206f 6620 3c65 6d3e 3c63 itions of item<\n-000e1fc0: 2f65 6d3e 2065 6c65 6d65 6e74 7320 7769 /em> elements wi\n-000e1fd0: 7468 2074 6865 2061 7272 6179 2076 616c th the array val\n-000e1fe0: 7565 7320 696e 2058 4d4c 2e20 4d75 6c74 ues in XML. Mult\n-000e1ff0: 692d 6469 6d65 6e73 696f 6e61 6c20 6669 i-dimensional fi\n-000e2000: 7865 6420 7369 7a65 2061 7272 6179 7320 xed size arrays \n-000e2010: 6172 6520 7365 7269 616c 697a 6564 2061 are serialized a\n-000e2020: 7320 6e65 7374 6564 203c 656d 3e3c 636f s nested item elements, wh\n-000e2050: 6572 6520 7468 6520 6f75 7465 7220 656c ere the outer el\n-000e2060: 656d 656e 7473 2061 7265 2061 7272 6179 ements are array\n-000e2070: 732e 3c2f 703e 0a3c 703e 5468 6520 7365 s.

.

The se\n-000e2080: 7269 616c 697a 6174 696f 6e20 6f66 2066 rialization of f\n-000e2090: 6978 6564 2d73 697a 6520 6172 7261 7973 ixed-size arrays\n-000e20a0: 2073 7570 706f 7274 7320 7468 6520 534f supports the SO\n-000e20b0: 4150 2052 5043 2065 6e63 6f64 696e 6720 AP RPC encoding \n-000e20c0: 6d75 6c74 692d 6469 6d65 6e73 696f 6e61 multi-dimensiona\n-000e20d0: 6c20 6172 7261 7920 666f 726d 6174 2061 l array format a\n-000e20e0: 7320 7765 6c6c 2061 7320 7061 7274 6961 s well as partia\n-000e20f0: 6c6c 7920 7472 616e 736d 6974 7465 6420 lly transmitted \n-000e2100: 616e 6420 7370 6172 7365 2061 7272 6179 and sparse array\n-000e2110: 2066 6f72 6d61 7473 2073 7461 6e64 6172 formats standar\n-000e2120: 6469 7a65 6420 696e 2053 4f41 5020 312e dized in SOAP 1.\n-000e2130: 3120 616e 6420 312e 322e 3c2f 703e 0a3c 1 and 1.2.

.<\n-000e2140: 703e 466f 7220 6578 616d 706c 653a 3c2f p>For example:.
// Contents of \n-000e21a0: 6669 6c65 2026 7175 6f74 3b66 6978 6564 file "fixed\n-000e21b0: 2e68 2671 756f 743b 3a20 3c2f 7370 616e .h":
.
\n-000e21f0: 7374 7275 6374 203c 2f73 7061 6e3e 4578 struct Ex\n-000e2200: 616d 706c 6520 3c2f 6469 763e 0a3c 6469 ample
.{\n-000e2220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
float a[3];
\n-000e2270: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

This speci\n-000e22b0: 6669 6573 2061 2066 6978 6564 2d73 697a fies a fixed-siz\n-000e22c0: 6520 6172 7261 7920 7061 7274 206f 6620 e array part of \n-000e22d0: 7468 6520 3c63 6f64 653e 7374 7275 6374 the struct\n-000e22e0: 2045 7861 6d70 6c65 3c2f 636f 6465 3e2e Example.\n-000e22f0: 2054 6865 2073 6572 6961 6c69 7a65 6420 The serialized \n-000e2300: 6f75 7470 7574 206f 6620 6172 7261 7920 output of array \n-000e2310: 3c63 6f64 653e 613c 2f63 6f64 653e 2069 a i\n-000e2320: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
<\n-000e2350: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e2360: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><a\n-000e2380: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<item&\n-000e23d0: 6774 3b31 2e30 266c 743b 2f3c 7370 616e gt;1.0</item\n-000e2400: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
&\n-000e2420: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ite\n-000e2440: 6d3c 2f73 7061 6e3e 2667 743b 322e 3026 m>2.0&\n-000e2450: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/it\n-000e2470: 656d 3c2f 7370 616e 3e26 6774 3b3c 2f64 em>.
<item>3.0</item>
.&\n-000e2510: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/a<\n-000e2530: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n-000e2540: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
<\n-000e2560: 703e 416e 7920 6465 7365 7269 616c 697a p>Any deserializ\n-000e2570: 6564 2069 7465 6d73 206f 6620 616e 2061 ed items of an a\n-000e2580: 7272 6179 2074 6861 7420 646f 206e 6f74 rray that do not\n-000e2590: 2066 6974 2069 6e20 7468 6520 6669 7865 fit in the fixe\n-000e25a0: 6420 7369 7a65 2061 7272 6179 2c20 692e d size array, i.\n-000e25b0: 652e 2061 7265 206f 7574 206f 6620 626f e. are out of bo\n-000e25c0: 756e 6473 2c20 6172 6520 6967 6e6f 7265 unds, are ignore\n-000e25d0: 6420 6279 2074 6865 2064 6573 6572 6961 d by the deseria\n-000e25e0: 6c69 7a65 7220 7768 656e 2074 6865 203c lizer when the <\n-000e25f0: 636f 6465 3e23 534f 4150 5f43 5f4e 4f49 code>#SOAP_C_NOI\n-000e2600: 4f42 3c2f 636f 6465 3e20 666c 6167 2069 OB
flag i\n-000e2610: 7320 7365 742c 206f 7468 6572 7769 7365 s set, otherwise\n-000e2620: 203c 636f 6465 3e23 534f 4150 5f49 4f42 #SOAP_IOB\n-000e2630: 3c2f 636f 6465 3e20 6572 726f 7273 2077 errors w\n-000e2640: 696c 6c20 6265 2067 656e 6572 6174 6564 ill be generated\n-000e2650: 2062 7920 7468 6520 6465 7365 7269 616c by the deserial\n-000e2660: 697a 6572 2e3c 2f70 3e0a 3c70 3ef0 9f94 izer.

.

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

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

.Dynamic\n-000e26d0: 2061 7272 6179 2073 6572 6961 6c69 7a61 array serializa\n-000e26e0: 7469 6f6e 3c2f 6832 3e0a 3c70 3e44 796e tion

.

Dyn\n-000e26f0: 616d 6963 2061 7272 6179 7320 6172 6520 amic arrays are \n-000e2700: 6d75 6368 206d 6f72 6520 666c 6578 6962 much more flexib\n-000e2710: 6c65 2074 6861 6e20 6669 7865 642d 7369 le than fixed-si\n-000e2720: 7a65 2061 7272 6179 732e 2044 796e 616d ze arrays. Dynam\n-000e2730: 6963 2061 7272 6179 7320 6465 636c 6172 ic arrays declar\n-000e2740: 6564 2069 6e20 7468 6520 696e 7465 7266 ed in the interf\n-000e2750: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-000e2760: 666f 7220 736f 6170 6370 7032 2061 7265 for soapcpp2 are\n-000e2770: 2061 2073 7065 6369 616c 2073 7472 7563 a special struc\n-000e2780: 7420 6f72 2063 6c61 7373 206f 7220 6172 t or class or ar\n-000e2790: 6520 7061 7274 206f 6620 6120 7374 7275 e part of a stru\n-000e27a0: 6374 206f 7220 636c 6173 7320 7769 7468 ct or class with\n-000e27b0: 2061 206d 656d 6265 7220 706f 696e 7469 a member pointi\n-000e27c0: 6e67 2074 6f20 616e 2061 7272 6179 206f ng to an array o\n-000e27d0: 6620 656c 656d 656e 7473 2061 6e64 2061 f elements and a\n-000e27e0: 206d 656d 6265 7220 7468 6174 2073 746f member that sto\n-000e27f0: 7265 7320 7468 6520 7369 7a65 206f 6620 res the size of \n-000e2800: 7468 6520 6172 7261 792e 2044 796e 616d the array. Dynam\n-000e2810: 6963 2061 7272 6179 2061 6c6c 6f63 6174 ic array allocat\n-000e2820: 696f 6e73 2061 7265 2065 6173 7920 7573 ions are easy us\n-000e2830: 696e 6720 7468 6520 736f 6170 6370 702d ing the soapcpp-\n-000e2840: 6765 6e65 7261 7465 6420 3c63 6f64 653e generated \n-000e2850: 736f 6170 5f6e 6577 5f54 3c2f 636f 6465 soap_new_T functions for \n-000e2870: 7479 7065 203c 636f 6465 3e54 3c2f 636f type T. This functi\n-000e2890: 6f6e 2069 7320 7573 6564 2074 6f20 616c on is used to al\n-000e28a0: 6c6f 6361 7465 2061 6e20 6172 7261 7920 locate an array \n-000e28b0: 6f66 2076 616c 7565 7320 7768 6963 6820 of values which \n-000e28c0: 6361 6e20 7468 656e 2062 6520 6173 7369 can then be assi\n-000e28d0: 676e 6564 2074 6f20 7468 6520 706f 696e gned to the poin\n-000e28e0: 7465 7220 6d65 6d62 6572 206f 6620 7468 ter member of th\n-000e28f0: 6520 7374 7275 6374 2f63 6c61 7373 2074 e struct/class t\n-000e2900: 6861 7420 7374 6f72 6573 2074 6865 2061 hat stores the a\n-000e2910: 7272 6179 2070 6f69 6e74 6572 2077 6974 rray pointer wit\n-000e2920: 6820 6974 7320 7369 7a65 2e3c 2f70 3e0a h its size.

.\n-000e2930: 3c70 3e54 6f20 6661 6369 6c69 7461 7465

To facilitate\n-000e2940: 2053 4f41 5020 5250 4320 656e 636f 6469 SOAP RPC encodi\n-000e2950: 6e67 2c20 534f 4150 2d65 6e63 6f64 6564 ng, SOAP-encoded\n-000e2960: 2061 7272 6179 7320 7265 7175 6972 6520 arrays require \n-000e2970: 7370 6563 6961 6c20 7472 6561 746d 656e special treatmen\n-000e2980: 742e 2053 4f41 502d 656e 636f 6465 6420 t. SOAP-encoded \n-000e2990: 6172 7261 7973 2061 7265 2073 696e 676c arrays are singl\n-000e29a0: 652d 206f 7220 6d75 6c74 692d 6469 6d65 e- or multi-dime\n-000e29b0: 6e73 696f 6e61 6c20 6172 7261 7973 2077 nsional arrays w\n-000e29c0: 6974 6820 626f 756e 6473 2074 6861 7420 ith bounds that \n-000e29d0: 6170 7065 6172 2069 6e20 584d 4c2e 2054 appear in XML. T\n-000e29e0: 6865 7365 2061 7272 6179 7320 6d61 7920 hese arrays may \n-000e29f0: 616c 736f 2068 6176 6520 6f66 6673 6574 also have offset\n-000e2a00: 7320 7468 6174 2064 6966 6665 7220 6672 s that differ fr\n-000e2a10: 6f6d 207a 6572 6f2e 2054 6865 2069 6e74 om zero. The int\n-000e2a20: 656e 7420 6f66 2053 4f41 502d 656e 636f ent of SOAP-enco\n-000e2a30: 6465 6420 6172 7261 7973 2069 7320 746f ded arrays is to\n-000e2a40: 2072 6570 6c69 6361 7465 206d 756c 7469 replicate multi\n-000e2a50: 2d64 696d 656e 7369 6f6e 616c 2061 7272 -dimensional arr\n-000e2a60: 6179 7320 636f 6d6d 6f6e 6c79 2066 6f75 ays commonly fou\n-000e2a70: 6e64 2069 6e20 7072 6f67 7261 6d6d 696e nd in programmin\n-000e2a80: 6720 6c61 6e67 7561 6765 732e 3c2f 703e g languages.

\n-000e2a90: 0a3c 703e 486f 7765 7665 722c 2058 4d4c .

However, XML\n-000e2aa0: 2061 6c73 6f20 7072 6f76 6964 6573 2061 also provides a\n-000e2ab0: 2073 696d 706c 6520 7761 7920 746f 2072 simple way to r\n-000e2ac0: 6570 7265 7365 6e74 2061 2073 6571 7565 epresent a seque\n-000e2ad0: 6e63 6520 6f66 2076 616c 7565 7320 7769 nce of values wi\n-000e2ae0: 7468 2061 2073 6571 7565 6e63 6520 6f66 th a sequence of\n-000e2af0: 2058 4d4c 2065 6c65 6d65 6e74 732e 2054 XML elements. T\n-000e2b00: 6869 7320 6469 6666 6572 7320 6672 6f6d his differs from\n-000e2b10: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n-000e2b20: 7261 7973 2069 6e20 7468 6174 2053 4f41 rays in that SOA\n-000e2b30: 502d 656e 636f 6465 6420 6172 7261 7973 P-encoded arrays\n-000e2b40: 2061 7265 2065 6c65 6d65 6e74 7320 7769 are elements wi\n-000e2b50: 7468 206e 6573 7465 6420 3c65 6d3e 3c63 th nested item<\n-000e2b70: 2f65 6d3e 2065 6c65 6d65 6e74 7320 7769 /em> elements wi\n-000e2b80: 7468 2076 616c 7565 732c 2074 686f 7567 th values, thoug\n-000e2b90: 6820 534f 4150 2064 6573 6572 6961 6c69 h SOAP deseriali\n-000e2ba0: 7a65 7273 206d 6179 2069 676e 6f72 6520 zers may ignore \n-000e2bb0: 7468 6520 6e61 6d65 206f 6620 7468 6573 the name of thes\n-000e2bc0: 6520 656c 656d 656e 7473 2077 6865 6e20 e elements when \n-000e2bd0: 7061 7273 696e 6720 584d 4c20 6173 2073 parsing XML as s\n-000e2be0: 7461 7465 6420 696e 2074 6865 2053 4f41 tated in the SOA\n-000e2bf0: 5020 7370 6563 6966 6963 6174 696f 6e73 P specifications\n-000e2c00: 2e3c 2f70 3e0a 3c70 3e42 6f74 6820 534f .

.

Both SO\n-000e2c10: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array\n-000e2c20: 7320 616e 6420 7365 7175 656e 6365 7320 s and sequences \n-000e2c30: 6f66 2058 4d4c 2065 6c65 6d65 6e74 7320 of XML elements \n-000e2c40: 6172 6520 7375 7070 6f72 7465 6420 696e are supported in\n-000e2c50: 2067 534f 4150 2c20 7573 696e 6720 6479 gSOAP, using dy\n-000e2c60: 6e61 6d69 6320 6172 7261 7973 2061 6e64 namic arrays and\n-000e2c70: 2063 6f6e 7461 696e 6572 732e 2054 6865 containers. The\n-000e2c80: 2062 6173 6963 7320 7769 6c6c 2062 6520 basics will be \n-000e2c90: 6465 7363 7269 6265 6420 6e65 7874 2e20 described next. \n-000e2ca0: 466f 7220 6164 6469 7469 6f6e 616c 2064 For additional d\n-000e2cb0: 6574 6169 6c73 2c20 7365 6520 7468 6520 etails, see the \n-000e2cc0: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f64 C an\n-000e2cf0: 6420 432b 2b20 584d 4c20 4461 7461 2042 d C++ XML Data B\n-000e2d00: 696e 6469 6e67 733c 2f61 3e20 646f 6375 indings docu\n-000e2d10: 6d65 6e74 6174 696f 6e2e 3c2f 703e 0a3c mentation.

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

.

\n-000e2d80: 0a53 4f41 502d 656e 636f 6465 6420 6172 .SOAP-encoded ar\n-000e2d90: 7261 7920 626f 756e 6473 3c2f 6833 3e0a ray bounds

.\n-000e2da0: 3c70 3e53 4f41 502d 656e 636f 6465 6420

SOAP-encoded \n-000e2db0: 6172 7261 7973 2075 7365 2074 6865 203c arrays use the <\n-000e2dc0: 656d 3e3c 636f 6465 3e53 4f41 502d 454e em>SOAP-EN\n-000e2dd0: 433a 4172 7261 793c 2f63 6f64 653e 3c2f C:Array attribute in\n-000e2df0: 2058 4d4c 2074 6f20 6964 656e 7469 6679 XML to identify\n-000e2e00: 2074 6865 2061 7272 6179 2061 6e64 2074 the array and t\n-000e2e10: 6865 203c 656d 3e3c 636f 6465 3e53 4f41 he SOA\n-000e2e20: 502d 454e 433a 6172 7261 7954 7970 653c P-ENC:arrayType<\n-000e2e30: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n-000e2e40: 6962 7574 6520 746f 2069 6465 6e74 6966 ibute to identif\n-000e2e50: 7920 7468 6520 6172 7261 7920 6469 6d65 y the array dime\n-000e2e60: 6e73 696f 6e61 6c69 7479 2061 6e64 2069 nsionality and i\n-000e2e70: 7473 2073 697a 652e 3c2f 703e 0a3c 703e ts size.

.

\n-000e2e80: 4173 2061 2073 6563 7572 6974 7920 6d65 As a security me\n-000e2e90: 6173 7572 6520 746f 2061 766f 6964 2064 asure to avoid d\n-000e2ea0: 656e 6961 6c20 6f66 2073 6572 7669 6365 enial of service\n-000e2eb0: 2061 7474 6163 6b73 2062 6173 6564 206f attacks based o\n-000e2ec0: 6e20 7365 6e64 696e 6720 6120 6875 6765 n sending a huge\n-000e2ed0: 2061 7272 6179 2073 697a 6520 7661 6c75 array size valu\n-000e2ee0: 6520 7573 696e 6720 7468 6520 3c65 6d3e e using the \n-000e2ef0: 3c63 6f64 653e 534f 4150 2d45 4e43 3a61 SOAP-ENC:a\n-000e2f00: 7272 6179 5479 7065 3c2f 636f 6465 3e3c rrayType<\n-000e2f10: 2f65 6d3e 2061 7474 7269 6275 7465 2c20 /em> attribute, \n-000e2f20: 7265 7175 6972 696e 6720 7468 6520 616c requiring the al\n-000e2f30: 6c6f 6361 7469 6f6e 206f 6620 6c61 7267 location of larg\n-000e2f40: 6520 6368 756e 6b73 206f 6620 6d65 6d6f e chunks of memo\n-000e2f50: 7279 2c20 7468 6520 746f 7461 6c20 6e75 ry, the total nu\n-000e2f60: 6d62 6572 206f 6620 6172 7261 7920 656c mber of array el\n-000e2f70: 656d 656e 7473 2073 6574 2062 7920 7468 ements set by th\n-000e2f80: 6520 3c65 6d3e 3c63 6f64 653e 534f 4150 e SOAP\n-000e2f90: 2d45 4e43 3a61 7272 6179 5479 7065 3c2f -ENC:arrayType attri\n-000e2fb0: 6275 7465 2063 616e 6e6f 7420 6578 6365 bute cannot exce\n-000e2fc0: 6564 203c 636f 6465 3e23 534f 4150 5f4d ed #SOAP_M\n-000e2fd0: 4158 4152 5241 5953 495a 453c 2f63 6f64 AXARRAYSIZE, which is set\n-000e2ff0: 2074 6f20 3130 3030 3030 2062 7920 6465 to 100000 by de\n-000e3000: 6661 756c 742e 2054 6869 7320 6c69 6d69 fault. This limi\n-000e3010: 7420 6973 206e 6f74 2061 2068 6172 6420 t is not a hard \n-000e3020: 6c69 6d69 7420 6f6e 2074 6865 206e 756d limit on the num\n-000e3030: 6265 7220 6f66 2061 7272 6179 2065 6c65 ber of array ele\n-000e3040: 6d65 6e74 732c 2062 7574 2072 6174 6865 ments, but rathe\n-000e3050: 7220 746f 2061 766f 6964 2070 7265 2d61 r to avoid pre-a\n-000e3060: 6c6c 6f63 6174 696e 6720 6c61 7267 6520 llocating large \n-000e3070: 6172 7261 7973 2061 7320 7374 6174 6564 arrays as stated\n-000e3080: 2e20 5468 6520 6861 7264 206c 696d 6974 . The hard limit\n-000e3090: 206f 6e20 7468 6520 6e75 6d62 6572 206f on the number o\n-000e30a0: 6620 6172 7261 7920 656c 656d 656e 7473 f array elements\n-000e30b0: 2072 6563 6569 7665 6420 6973 203c 636f received is soap:\n-000e3180: 3a6d 6178 6f63 6375 7273 3c2f 613e 3c2f :maxoccurs which is s\n-000e31a0: 6574 2074 6f20 3c63 6f64 653e 2353 4f41 et to #SOA\n-000e31b0: 505f 4d41 584f 4343 5552 533c 2f63 6f64 P_MAXOCCURS by default. B\n-000e31d0: 7920 636f 6e74 7261 7374 2c20 7468 6520 y contrast, the \n-000e31e0: 3c63 6f64 653e 2353 4f41 505f 4d41 5841 #SOAP_MAXA\n-000e31f0: 5252 4159 5349 5a45 3c2f 636f 6465 3e20 RRAYSIZE \n-000e3200: 6c69 6d69 7420 6f6e 6c79 206e 6567 6174 limit only negat\n-000e3210: 6976 656c 7920 6166 6665 6374 7320 6d75 ively affects mu\n-000e3220: 6c74 692d 6469 6d65 6e73 696f 6e61 6c20 lti-dimensional \n-000e3230: 6172 7261 7973 2062 6563 6175 7365 2074 arrays because t\n-000e3240: 6865 2064 696d 656e 7369 6f6e 616c 6974 he dimensionalit\n-000e3250: 7920 6f66 2074 6865 2072 6563 6569 7669 y of the receivi\n-000e3260: 6e67 2061 7272 6179 206d 6179 2062 6520 ng array may be \n-000e3270: 6c6f 7374 2077 6865 6e20 7468 6520 6e75 lost when the nu\n-000e3280: 6d62 6572 206f 6620 656c 656d 656e 7473 mber of elements\n-000e3290: 2065 7863 6565 6473 2031 3030 3030 302e exceeds 100000.\n-000e32a0: 204f 6e65 2d64 696d 656e 7369 6f6e 616c One-dimensional\n-000e32b0: 2061 7272 6179 7320 6172 6520 6e6f 7420 arrays are not \n-000e32c0: 6166 6665 6374 6564 2061 6e64 2070 6f70 affected and pop\n-000e32d0: 756c 6174 6564 2061 6674 6572 2074 6869 ulated after thi\n-000e32e0: 7320 6c69 6d69 7420 6279 2073 696d 706c s limit by simpl\n-000e32f0: 7920 6465 7365 7269 616c 697a 696e 6720 y deserializing \n-000e3300: 7468 6520 6172 7261 7920 656c 656d 656e the array elemen\n-000e3310: 7473 2072 6563 6569 7665 642e 3c2f 703e ts received.

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

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

.

.One-\n-000e3380: 6469 6d65 6e73 696f 6e61 6c20 6479 6e61 dimensional dyna\n-000e3390: 6d69 6320 534f 4150 2d65 6e63 6f64 6564 mic SOAP-encoded\n-000e33a0: 2061 7272 6179 733c 2f68 333e 0a3c 703e arrays

.

\n-000e33b0: 4120 7370 6563 6961 6c20 666f 726d 206f A special form o\n-000e33c0: 6620 7374 7275 6374 206f 7220 636c 6173 f struct or clas\n-000e33d0: 7320 6973 2075 7365 6420 746f 2064 6566 s is used to def\n-000e33e0: 696e 6520 6f6e 652d 6469 6d65 6e73 696f ine one-dimensio\n-000e33f0: 6e61 6c20 6479 6e61 6d69 6320 534f 4150 nal dynamic SOAP\n-000e3400: 2d65 6e63 6f64 6564 2061 7272 6179 7320 -encoded arrays \n-000e3410: 696e 2061 6e20 696e 7465 7266 6163 6520 in an interface \n-000e3420: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n-000e3430: 736f 6170 6370 7032 2e20 4561 6368 2061 soapcpp2. Each a\n-000e3440: 7272 6179 2068 6173 2061 2070 6f69 6e74 rray has a point\n-000e3450: 6572 2076 6172 6961 626c 6520 616e 6420 er variable and \n-000e3460: 6120 6d65 6d62 6572 2074 6861 7420 7265 a member that re\n-000e3470: 636f 7264 7320 7468 6520 6e75 6d62 6572 cords the number\n-000e3480: 206f 6620 656c 656d 656e 7473 2074 6865 of elements the\n-000e3490: 2070 6f69 6e74 6572 2070 6f69 6e74 7320 pointer points \n-000e34a0: 746f 2069 6e20 6d65 6d6f 7279 2e3c 2f70 to in memory..

The general\n-000e34c0: 2066 6f72 6d20 6f66 2074 6865 2073 7472 form of the str\n-000e34d0: 7563 7420 6f72 2063 6c61 7373 2064 6563 uct or class dec\n-000e34e0: 6c61 7261 7469 6f6e 2074 6861 7420 636f laration that co\n-000e34f0: 6e74 6169 6e73 2061 206f 6e65 2d64 696d ntains a one-dim\n-000e3500: 656e 7369 6f6e 616c 2064 796e 616d 6963 ensional dynamic\n-000e3510: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n-000e3520: 7261 7920 6973 3a3c 2f70 3e0a 3c64 6976 ray is:

.
struct\n-000e3570: 203c 2f73 7061 6e3e 6172 7261 795f 6e61 array_na\n-000e3580: 6d65 203c 2f64 6976 3e0a 3c64 6976 2063 me
.
{.
Type *\n-000e35c0: 5f5f 7074 723b 2020 3c73 7061 6e20 636c __ptr; //\n-000e35e0: 2070 6f69 6e74 6572 2074 6f20 6172 7261 pointer to arra\n-000e35f0: 7920 6f66 2065 6c65 6d65 6e74 7320 696e y of elements in\n-000e3600: 206d 656d 6f72 793c 2f73 7061 6e3e 3c2f memory.
int \n-000e3650: 5f5f 7369 7a65 3b20 2020 3c73 7061 6e20 __size; \n-000e3670: 2f2f 206e 756d 6265 7220 6f66 2065 6c65 // number of ele\n-000e3680: 6d65 6e74 7320 706f 696e 7465 6420 746f ments pointed to\n-000e3690: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-000e36a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e36b0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-000e36d0: 6e74 3c2f 7370 616e 3e20 5f5f 6f66 6673 nt __offs\n-000e36e0: 6574 3b20 3c73 7061 6e20 636c 6173 733d et; // opt\n-000e3700: 696f 6e61 6c20 534f 4150 2031 2e31 2061 ional SOAP 1.1 a\n-000e3710: 7272 6179 206f 6666 7365 743c 2f73 7061 rray offset
.
.\n-000e3740: 2e2e 2020 2020 2020 2020 2020 203c 7370 .. // anything t\n-000e3770: 6861 7420 666f 6c6c 6f77 7320 6865 7265 hat follows here\n-000e3780: 2077 696c 6c20 6265 2069 676e 6f72 6564 will be ignored\n-000e3790: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-000e37a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e37b0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.

\n-000e37c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

The im\n-000e43c0: 706c 656d 656e 7461 7469 6f6e 7320 6f66 plementations of\n-000e43d0: 2074 6865 203c 636f 6465 3e56 6563 746f the Vecto\n-000e43e0: 723c 2f63 6f64 653e 206d 6574 686f 6473 r methods\n-000e43f0: 2061 7265 3a3c 2f70 3e0a 3c64 6976 2063 are:

.
\n-000e4410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
Vector::Vector\n-000e4430: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
.
{.
this->\n-000e4470: 736f 6170 5f64 6566 6175 6c74 284e 554c soap_default(NUL\n-000e4480: 4c29 3b3c 2f64 6976 3e0a 3c64 6976 2063 L);
.
}.
Vector::Ve\n-000e44c0: 6374 6f72 283c 7370 616e 2063 6c61 7373 ctor(struc\n-000e44e0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-000e4510: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, int \n-000e4570: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
.
{.
this->\n-000e45b0: 3b73 6f61 7020 3d20 3c61 2063 6c61 7373 ;soap = soap;
\n-000e4610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
__ptr = soa\n-000e4630: 705f 6e65 775f 666c 6f61 7428 3c61 2063 p_new_float(soap, n);\n-000e4670: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
__si\n-000e4690: 7a65 203d 206e 3b20 3c2f 6469 763e 0a3c ze = n;
.<\n-000e46a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e46b0: 3e20 205f 5f6f 6666 7365 7420 3d20 313b > __offset = 1;\n-000e46c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
} .
f\n-000e4710: 6c6f 6174 3c2f 7370 616e 3e26 616d 703b loat&\n-000e4720: 2056 6563 746f 723a 3a6f 7065 7261 746f Vector::operato\n-000e4730: 725b 5d28 3c73 7061 6e20 636c 6173 733d r[](in\n-000e4750: 743c 2f73 7061 6e3e 2069 2920 3c2f 6469 t i) .
{
. \n-000e4790: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-000e47b0: 6e3c 2f73 7061 6e3e 205f 5f70 7472 5b69 n __ptr[i\n-000e47c0: 202d 205f 5f6f 6666 7365 745d 3b20 3c2f - __offset]; .
}
.<\n-000e47f0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

An exam\n-000e4810: 706c 6520 7072 6f67 7261 6d20 6672 6167 ple program frag\n-000e4820: 6d65 6e74 2074 6861 7420 7365 7269 616c ment that serial\n-000e4830: 697a 6573 2061 2076 6563 746f 7220 6f66 izes a vector of\n-000e4840: 2033 2065 6c65 6d65 6e74 733a 3c2f 703e 3 elements:

\n-000e4850: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n-000e4890: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n-000e4900: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
.Ve\n-000e4980: 6374 6f72 2076 283c 6120 636c 6173 733d ctor v(so\n-000e49b0: 6170 3c2f 613e 2c20 3329 3b3c 2f64 6976 ap, 3);.
v[1] = 1.0; \n-000e49e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
v[2] = \n-000e4a00: 322e 303b 203c 2f64 6976 3e0a 3c64 6976 2.0;
.v[\n-000e4a20: 335d 203d 2033 2e30 3b20 3c2f 6469 763e 3] = 3.0;
\n-000e4a30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
soap_write_Ve\n-000e4a50: 6374 6f72 283c 6120 636c 6173 733d 2263 ctor(soap\n-000e4a80: 3c2f 613e 2c20 2661 6d70 3b76 293b 3c2f , &v);.
soap\n-000e4b00: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap);.\n-000e4bf0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..

The outp\n-000e4cc0: 7574 2069 7320 6120 7061 7274 6961 6c6c ut is a partiall\n-000e4cd0: 7920 7472 616e 736d 6974 7465 6420 6172 y transmitted ar\n-000e4ce0: 7261 793a 3c2f 703e 0a3c 6469 7620 636c ray:

.
<SOAP-ENC:Array<\n-000e4d50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> SOA\n-000e4d70: 502d 454e 433a 6172 7261 7954 7970 653c P-ENC:arrayType<\n-000e4d80: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:flo\n-000e4db0: 6174 5b34 5d26 7175 6f74 3b3c 2f73 7061 at[4]" SOAP-EN\n-000e4de0: 433a 6f66 6673 6574 3c2f 7370 616e 3e3d C:offset=\n-000e4df0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000e4e10: 743b 5b31 5d26 7175 6f74 3b3c 2f73 7061 t;[1]">
.\n-000e4e40: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000e4e60: 6974 656d 3c2f 7370 616e 3e26 6774 3b31 item>1\n-000e4e70: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </i\n-000e4e90: 7465 6d3c 2f73 7061 6e3e 2667 743b 203c tem> <\n-000e4ea0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<item>2</item>
.\n-000e4f30: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000e4f50: 6974 656d 3c2f 7370 616e 3e26 6774 3b33 item>3\n-000e4f60: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </i\n-000e4f80: 7465 6d3c 2f73 7061 6e3e 2667 743b 203c tem> <\n-000e4f90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</SOAP-ENC:\n-000e4fd0: 4172 7261 793c 2f73 7061 6e3e 2667 743b Array>\n-000e4fe0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
<\n-000e5000: 2f64 6976 3e3c 703e 4e6f 7465 2074 6861 /div>

Note tha\n-000e5010: 7420 3c65 6d3e 3c63 6f64 653e 7873 643a t xsd:\n-000e5020: 666c 6f61 745b 345d 3c2f 636f 6465 3e3c float[4]<\n-000e5030: 2f65 6d3e 2069 7320 7468 6520 7479 7065 /em> is the type\n-000e5040: 2061 6e64 2073 6861 7065 206f 6620 7468 and shape of th\n-000e5050: 6520 656e 636f 6465 6420 6172 7261 792c e encoded array,\n-000e5060: 2077 6869 6368 2073 7461 7274 7320 6174 which starts at\n-000e5070: 206f 6666 7365 7420 3120 616e 6420 7468 offset 1 and th\n-000e5080: 6572 6566 6f72 6520 7468 6520 656c 656d erefore the elem\n-000e5090: 656e 7420 6174 2030 2069 7320 6f6d 6974 ent at 0 is omit\n-000e50a0: 7465 642e 3c2f 703e 0a3c 703e f09f 949d ted.

.

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

.<\n-000e50e0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.Nested one\n-000e5110: 2d64 696d 656e 7369 6f6e 616c 2064 796e -dimensional dyn\n-000e5120: 616d 6963 2053 4f41 502d 656e 636f 6465 amic SOAP-encode\n-000e5130: 6420 6172 7261 7973 3c2f 6833 3e0a 3c70 d arrays.One-dimensional\n-000e5150: 2053 4f41 502d 656e 636f 6465 6420 6479 SOAP-encoded dy\n-000e5160: 6e61 6d69 6320 6172 7261 7973 206d 6179 namic arrays may\n-000e5170: 2062 6520 6e65 7374 6564 2e20 466f 7220 be nested. For \n-000e5180: 6578 616d 706c 652c 2075 7369 6e67 203c example, using <\n-000e5190: 636f 6465 3e63 6c61 7373 2056 6563 746f code>class Vecto\n-000e51a0: 723c 2f63 6f64 653e 2064 6563 6c61 7265 r declare\n-000e51b0: 6420 696e 2074 6865 2070 7265 7669 6f75 d in the previou\n-000e51c0: 7320 7365 6374 696f 6e2c 203c 636f 6465 s section, class Matrix is declared\n-000e51f0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
// Contents \n-000e5240: 6f66 2066 696c 6520 2671 756f 743b 6d61 of file "ma\n-000e5250: 7472 6978 2e68 2671 756f 743b 3a20 3c2f trix.h":
.class Matrix
.<\n-000e52b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e52c0: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n-000e52e0: 2f73 7061 6e3e 3a20 3c2f 6469 763e 0a3c /span>:
.<\n-000e52f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e5300: 3e20 2020 2056 6563 746f 7220 2a5f 5f70 > Vector *__p\n-000e5310: 7472 3b20 3c2f 6469 763e 0a3c 6469 7620 tr;
.
\n-000e5330: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __size; .
int \n-000e53a0: 5f5f 6f66 6673 6574 3b20 3c2f 6469 763e __offset;
\n-000e53b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
Matrix();\n-000e53d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
Ma\n-000e53f0: 7472 6978 283c 7370 616e 2063 6c61 7373 trix(struc\n-000e5410: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-000e5440: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, int \n-000e54a0: 6e2c 203c 7370 616e 2063 6c61 7373 3d22 n, int\n-000e54c0: 3c2f 7370 616e 3e20 6d29 3b20 3c2f 6469 m); .
Vector&\n-000e54f0: 616d 703b 206f 7065 7261 746f 725b 5d28 amp; operator[](\n-000e5500: 3c73 7061 6e20 636c 6173 733d 226b 6579 int i);
.\n-000e5530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
stru\n-000e5560: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap;.
};
.\n-000e5610: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

The Ma\n-000e5630: 7472 6978 2074 7970 6520 6973 2065 7373 trix type is ess\n-000e5640: 656e 7469 616c 6c79 2061 6e20 6172 7261 entially an arra\n-000e5650: 7920 6f66 2070 6f69 6e74 6572 7320 746f y of pointers to\n-000e5660: 2061 7272 6179 7320 7768 6963 6820 6d61 arrays which ma\n-000e5670: 6b65 2075 7020 7468 6520 726f 7773 206f ke up the rows o\n-000e5680: 6620 6120 6d61 7472 6978 2e20 5468 6520 f a matrix. The \n-000e5690: 7365 7269 616c 697a 6174 696f 6e20 6f66 serialization of\n-000e56a0: 2074 6865 2074 776f 2d64 696d 656e 7369 the two-dimensi\n-000e56b0: 6f6e 616c 2064 796e 616d 6963 2061 7272 onal dynamic arr\n-000e56c0: 6179 2069 6e20 6973 206e 6573 7465 6420 ay in is nested \n-000e56d0: 666f 726d 2069 6e20 584d 4c2e 3c2f 703e form in XML.

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

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

.

.Mu\n-000e5740: 6c74 692d 6469 6d65 6e73 696f 6e61 6c20 lti-dimensional \n-000e5750: 6479 6e61 6d69 6320 534f 4150 2d65 6e63 dynamic SOAP-enc\n-000e5760: 6f64 6564 2061 7272 6179 733c 2f68 333e oded arrays

\n-000e5770: 0a3c 703e 4120 7370 6563 6961 6c20 666f .

A special fo\n-000e5780: 726d 206f 6620 3c63 6f64 653e 7374 7275 rm of stru\n-000e5790: 6374 3c2f 636f 6465 3e20 6f72 203c 636f ct or class \n-000e57b0: 6973 2075 7365 6420 746f 2064 6566 696e is used to defin\n-000e57c0: 6520 6d75 6c74 692d 6469 6d65 6e73 696f e multi-dimensio\n-000e57d0: 6e61 6c20 6479 6e61 6d69 6320 534f 4150 nal dynamic SOAP\n-000e57e0: 2d65 6e63 6f64 6564 2061 7272 6179 732e -encoded arrays.\n-000e57f0: 2045 6163 6820 6172 7261 7920 6861 7320 Each array has \n-000e5800: 6120 706f 696e 7465 7220 7661 7269 6162 a pointer variab\n-000e5810: 6c65 2061 6e64 2061 206d 656d 6265 7220 le and a member \n-000e5820: 7468 6174 2072 6563 6f72 6473 2074 6865 that records the\n-000e5830: 206e 756d 6265 7220 6f66 2065 6c65 6d65 number of eleme\n-000e5840: 6e74 7320 7065 7220 6469 6d65 6e73 696f nts per dimensio\n-000e5850: 6e2e 2041 203c 636f 6465 3e4b 3c2f 636f n. A K-dimensional \n-000e5870: 6172 7261 7920 6973 2064 6563 6c61 7265 array is declare\n-000e5880: 6420 6173 3a3c 2f70 3e0a 3c64 6976 2063 d as:

.
\n-000e58a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-000e58d0: 2f73 7061 6e3e 6172 7261 795f 6e61 6d65 /span>array_name\n-000e58e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
Type *__\n-000e5920: 7074 723b 2020 2020 203c 7370 616e 2063 ptr; /\n-000e5940: 2f20 706f 696e 7465 7220 746f 2061 7272 / pointer to arr\n-000e5950: 6179 206f 6620 656c 656d 656e 7473 2069 ay of elements i\n-000e5960: 6e20 6d65 6d6f 7279 3c2f 7370 616e 3e3c n memory<\n-000e5970: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n-000e59b0: 205f 5f73 697a 655b 4b5d 3b20 2020 3c73 __size[K]; // number of\n-000e59e0: 2065 6c65 6d65 6e74 7320 7065 7220 6469 elements per di\n-000e59f0: 6d65 6e73 696f 6e3c 2f73 7061 6e3e 3c2f mension.
int \n-000e5a40: 5f5f 6f66 6673 6574 5b4b 5d3b 203c 7370 __offset[K]; // optional S\n-000e5a70: 4f41 5020 312e 3120 6172 7261 7920 6f66 OAP 1.1 array of\n-000e5a80: 6673 6574 3c2f 7370 616e 3e3c 2f64 6976 fset.
... \n-000e5ab0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-000e5ad0: 2f20 616e 7974 6869 6e67 2074 6861 7420 / anything that \n-000e5ae0: 666f 6c6c 6f77 7320 6865 7265 2077 696c follows here wil\n-000e5af0: 6c20 6265 2069 676e 6f72 6564 203c 2f73 l be ignored
.
};<\n-000e5b20: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n-000e5b40: 7768 6572 6520 7468 6520 3c63 6f64 653e where the \n-000e5b50: 6172 7261 795f 6e61 6d65 3c2f 636f 6465 array_name must be a non-\n-000e5b70: 7175 616c 6966 6965 6420 6e61 6d65 2061 qualified name a\n-000e5b80: 6e64 203c 636f 6465 3e54 7970 653c 2f63 nd Type is the type\n-000e5ba0: 2066 6f72 2074 6865 2065 6c65 6d65 6e74 for the element\n-000e5bb0: 7320 6f66 2074 6865 2061 7272 6179 2e20 s of the array. \n-000e5bc0: 5468 6520 3c63 6f64 653e 5f5f 7074 723c The __ptr<\n-000e5bd0: 2f63 6f64 653e 206d 656d 6265 7220 706f /code> member po\n-000e5be0: 696e 7473 2074 6f20 7468 6520 6172 7261 ints to the arra\n-000e5bf0: 7920 7661 6c75 6573 2e20 5468 6520 3c63 y values. The __size array specifie\n-000e5c20: 7320 7468 6520 6e75 6d62 6572 206f 6620 s the number of \n-000e5c30: 6172 7261 7920 656c 656d 656e 7473 2070 array elements p\n-000e5c40: 6572 2064 696d 656e 7369 6f6e 2e20 5468 er dimension. Th\n-000e5c50: 6520 3c63 6f64 653e 5f5f 6f66 6673 6574 e __offset\n-000e5c60: 3c2f 636f 6465 3e20 6172 7261 7920 7370 array sp\n-000e5c70: 6563 6966 6965 7320 616e 206f 7074 696f ecifies an optio\n-000e5c80: 6e61 6c20 6f66 6673 6574 2070 6572 2064 nal offset per d\n-000e5c90: 696d 656e 7369 6f6e 2e3c 2f70 3e0a 3c70 imension.

.For example, th\n-000e5cb0: 6520 666f 6c6c 6f77 696e 6720 6465 636c e following decl\n-000e5cc0: 6172 6174 696f 6e20 7370 6563 6966 6965 aration specifie\n-000e5cd0: 7320 6120 6d61 7472 6978 2063 6c61 7373 s a matrix class\n-000e5ce0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
class Matrix
.<\n-000e5d40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e5d50: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n-000e5d70: 2f73 7061 6e3e 3a20 3c2f 6469 763e 0a3c /span>:
.<\n-000e5d80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e5d90: 3e20 2020 203c 7370 616e 2063 6c61 7373 > f\n-000e5db0: 6c6f 6174 3c2f 7370 616e 3e20 2a5f 5f70 loat *__p\n-000e5dc0: 7472 3b20 3c2f 6469 763e 0a3c 6469 7620 tr;
.
\n-000e5de0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __size[2];\n-000e5e10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int __offset[2]; \n-000e5e60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}; .

By \n-000e5ea0: 636f 6e74 7261 7374 2074 6f20 7468 6520 contrast to the \n-000e5eb0: 6d61 7472 6978 2063 6c61 7373 206f 6620 matrix class of \n-000e5ec0: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section N\n-000e5ef0: 6573 7465 6420 6f6e 652d 6469 6d65 6e73 ested one-dimens\n-000e5f00: 696f 6e61 6c20 6479 6e61 6d69 6320 534f ional dynamic SO\n-000e5f10: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array\n-000e5f20: 733c 2f61 3e20 7468 6174 2064 6566 696e s that defin\n-000e5f30: 6573 2061 206d 6174 7269 7820 6173 2061 es a matrix as a\n-000e5f40: 6e20 6172 7261 7920 6f66 2070 6f69 6e74 n array of point\n-000e5f50: 6572 7320 746f 206d 6174 7269 7820 726f ers to matrix ro\n-000e5f60: 7773 2c20 7468 6973 2063 6c61 7373 2068 ws, this class h\n-000e5f70: 6173 206f 6e65 2070 6f69 6e74 6572 2074 as one pointer t\n-000e5f80: 6f20 6120 6d61 7472 6978 2073 746f 7265 o a matrix store\n-000e5f90: 6420 696e 2072 6f77 2d6d 616a 6f72 206f d in row-major o\n-000e5fa0: 7264 6572 2e20 5468 6520 7369 7a65 206f rder. The size o\n-000e5fb0: 6620 7468 6520 6d61 7472 6978 2069 7320 f the matrix is \n-000e5fc0: 6465 7465 726d 696e 6564 2062 7920 7468 determined by th\n-000e5fd0: 6520 3c63 6f64 653e 5f5f 7369 7a65 3c2f e __size member: __size[0] holds the n\n-000e6010: 756d 6265 7220 6f66 2072 6f77 7320 616e umber of rows an\n-000e6020: 6420 3c63 6f64 653e 5f5f 7369 7a65 5b31 d __size[1\n-000e6030: 5d3c 2f63 6f64 653e 2068 6f6c 6473 2074 ] holds t\n-000e6040: 6865 206e 756d 6265 7220 6f66 2063 6f6c he number of col\n-000e6050: 756d 6e73 206f 6620 7468 6520 6d61 7472 umns of the matr\n-000e6060: 6978 2e20 4c69 6b65 7769 7365 2c20 3c63 ix. Likewise, __offset[0]<\n-000e6080: 2f63 6f64 653e 2069 7320 7468 6520 726f /code> is the ro\n-000e6090: 7720 6f66 6673 6574 2061 6e64 203c 636f w offset and __offset[1] is the col\n-000e60c0: 756d 6e73 206f 6666 7365 742e 3c2f 703e umns offset.

\n-000e60d0: 0a3c 646c 2063 6c61 7373 3d22 7365 6374 .
WarningSOAP 1.2 does n\n-000e6110: 6f74 2073 7570 706f 7274 2070 6172 7469 ot support parti\n-000e6120: 616c 6c79 2074 7261 6e73 6d69 7474 6564 ally transmitted\n-000e6130: 2061 7272 6179 7320 616e 6420 7468 6520 arrays and the \n-000e6140: 3c63 6f64 653e 5f5f 6f66 6673 6574 3c2f __offset member of \n-000e6160: 6120 6479 6e61 6d69 6320 6172 7261 7920 a dynamic array \n-000e6170: 6973 2069 676e 6f72 6564 2e3c 2f64 643e is ignored.\n-000e6180: 3c2f 646c 3e0a 3c70 3ef0 9f94 9d20 3c61
.

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

.

\n-000e61c0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-000e61e0: 0a4e 6f6e 2d53 4f41 5020 6479 6e61 6d69 .Non-SOAP dynami\n-000e61f0: 6320 6172 7261 7973 3c2f 6833 3e0a 3c70 c arrays

.An array is ser\n-000e6210: 6961 6c69 7a65 6420 6173 2061 2073 6571 ialized as a seq\n-000e6220: 7565 6e63 6520 6f66 2058 4d4c 2065 6c65 uence of XML ele\n-000e6230: 6d65 6e74 732e 2042 7920 636f 6e74 7261 ments. By contra\n-000e6240: 7374 2c20 6120 534f 4150 2d65 6e63 6f64 st, a SOAP-encod\n-000e6250: 6564 2061 7272 6179 2069 7320 7365 7269 ed array is seri\n-000e6260: 616c 697a 6564 2061 7320 616e 2065 6c65 alized as an ele\n-000e6270: 6d65 6e74 2077 6974 6820 6120 7365 7175 ment with a sequ\n-000e6280: 656e 6365 206f 6620 7375 622d 656c 656d ence of sub-elem\n-000e6290: 656e 7473 2c20 7768 6f73 6520 7461 6720 ents, whose tag \n-000e62a0: 6e61 6d65 7320 6172 6520 6972 7265 6c65 names are irrele\n-000e62b0: 7661 6e74 2074 6f20 7468 6520 534f 4150 vant to the SOAP\n-000e62c0: 2070 726f 6365 7373 6f72 2c20 7365 6520 processor, see \n-000e62d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 One-dimensi\n-000e6300: 6f6e 616c 2064 796e 616d 6963 2053 4f41 onal dynamic SOA\n-000e6310: 502d 656e 636f 6465 6420 6172 7261 7973 P-encoded arrays\n-000e6320: 3c2f 613e 2e3c 2f70 3e0a 3c70 3e41 6e20 .

.

An \n-000e6330: 6172 7261 7920 6973 2064 6563 6c61 7265 array is declare\n-000e6340: 6420 696e 2061 6e20 696e 7465 7266 6163 d in an interfac\n-000e6350: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n-000e6360: 7220 736f 6170 6370 7032 2061 7320 6120 r soapcpp2 as a \n-000e6370: 7374 7275 6374 206f 7220 636c 6173 7320 struct or class \n-000e6380: 7769 7468 2061 206e 616d 6520 7468 6174 with a name that\n-000e6390: 2069 7320 7175 616c 6966 6965 6420 7769 is qualified wi\n-000e63a0: 7468 2061 206e 616d 6573 7061 6365 2070 th a namespace p\n-000e63b0: 7265 6669 782e 2054 6865 7265 2061 7265 refix. There are\n-000e63c0: 2074 776f 2066 6f72 6d73 2e20 5468 6520 two forms. The \n-000e63d0: 6669 7273 7420 666f 726d 2069 7320 7369 first form is si\n-000e63e0: 6d69 6c61 7220 746f 2074 6865 2053 4f41 milar to the SOA\n-000e63f0: 502d 656e 636f 6465 6420 6172 7261 7920 P-encoded array \n-000e6400: 6465 636c 6172 6174 696f 6e20 7468 6174 declaration that\n-000e6410: 2077 7261 7073 2074 6865 203c 636f 6465 wraps the __ptr an\n-000e6430: 6420 3c63 6f64 653e 5f5f 7369 7a65 3c2f d __size members:.

struct p\n-000e64a0: 7265 6669 785f 5f61 7272 6179 5f6e 616d refix__array_nam\n-000e64b0: 6520 3c2f 6469 763e 0a3c 6469 7620 636c e
.
{.
Type *_\n-000e64f0: 5f70 7472 3b20 203c 7370 616e 2063 6c61 _ptr; // \n-000e6510: 706f 696e 7465 7220 746f 2061 7272 6179 pointer to array\n-000e6520: 206f 6620 656c 656d 656e 7473 2069 6e20 of elements in \n-000e6530: 6d65 6d6f 7279 3c2f 7370 616e 3e3c 2f64 memory.
int _\n-000e6580: 5f73 697a 653b 2020 203c 7370 616e 2063 _size; /\n-000e65a0: 2f20 6e75 6d62 6572 206f 6620 656c 656d / number of elem\n-000e65b0: 656e 7473 2070 6f69 6e74 6564 2074 6f20 ents pointed to \n-000e65c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000e65e0: 2020 2020 2e2e 2e20 2020 2020 2020 2020 ... \n-000e65f0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // anyth\n-000e6610: 696e 6720 7468 6174 2066 6f6c 6c6f 7773 ing that follows\n-000e6620: 2068 6572 6520 7769 6c6c 2062 6520 6967 here will be ig\n-000e6630: 6e6f 7265 6420 3c2f 7370 616e 3e3c 2f64 nored .
};
.<\n-000e6660: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The sec\n-000e6680: 6f6e 6420 666f 726d 2069 7320 6d6f 7265 ond form is more\n-000e6690: 2067 656e 6572 6963 2c20 6265 6361 7573 generic, becaus\n-000e66a0: 6520 7468 6520 6172 7261 7920 6361 6e20 e the array can \n-000e66b0: 6265 2064 6563 6c61 7265 6420 616e 7977 be declared anyw\n-000e66c0: 6865 7265 2069 6e20 7468 6520 7374 7275 here in the stru\n-000e66d0: 6374 206f 7220 636c 6173 7320 616e 6420 ct or class and \n-000e66e0: 6d75 6c74 6970 6c65 2061 7272 6179 7320 multiple arrays \n-000e66f0: 6361 6e20 6265 2075 7365 6420 6173 206d can be used as m\n-000e6700: 656d 6265 7273 2c20 6561 6368 2077 6974 embers, each wit\n-000e6710: 6820 6120 3c63 6f64 653e 5f5f 7369 7a65 h a __size\n-000e6720: 3c2f 636f 6465 3e20 6d65 6d62 6572 2028 member (\n-000e6730: 3c63 6f64 653e 5f5f 7369 7a65 4e61 6d65 __sizeName\n-000e6740: 3c2f 636f 6465 3e20 6973 2061 6c73 6f20 is also \n-000e6750: 616c 6c6f 7765 6429 2074 6861 7420 7072 allowed) that pr\n-000e6760: 6563 6564 6573 2061 2070 6f69 6e74 6572 ecedes a pointer\n-000e6770: 206d 656d 6265 723a 3c2f 703e 0a3c 6469 member:

.
struc\n-000e67c0: 7420 3c2f 7370 616e 3e70 7265 6669 785f t prefix_\n-000e67d0: 5f61 7272 6179 5f6e 616d 6520 3c2f 6469 _array_name .
{
. \n-000e6810: 2020 202e 2e2e 2020 2020 2020 2020 2020 ... \n-000e6820: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-000e6840: 2f20 6f74 6865 7220 6d65 6d62 6572 7320 / other members \n-000e6850: 7468 6174 2061 7265 2073 6572 6961 6c69 that are seriali\n-000e6860: 7a65 643c 2f73 7061 6e3e 3c2f 6469 763e zed
\n-000e6870: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __si\n-000e68b0: 7a65 5f6f 665f 6172 7261 7931 3b20 3c73 ze_of_array1; // number of\n-000e68e0: 2065 6c65 6d65 6e74 7320 706f 696e 7465 elements pointe\n-000e68f0: 6420 746f 203c 2f73 7061 6e3e 3c2f 6469 d to .
Type1 *\n-000e6920: 6172 7261 7931 3b20 2020 2020 2020 203c array1; <\n-000e6930: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000e6940: 656e 7422 3e2f 2f20 706f 696e 7465 7220 ent\">// pointer \n-000e6950: 746f 2061 7272 6179 206f 6620 656c 656d to array of elem\n-000e6960: 656e 7473 2069 6e20 6d65 6d6f 7279 3c2f ents in memory
. \n-000e6990: 2020 2e2e 2e20 2020 2020 2020 2020 2020 ... \n-000e69a0: 2020 2020 2020 2020 3c73 7061 6e20 636c //\n-000e69c0: 206f 7468 6572 206d 656d 6265 7273 2074 other members t\n-000e69d0: 6861 7420 6172 6520 7365 7269 616c 697a hat are serializ\n-000e69e0: 6564 3c2f 7370 616e 3e3c 2f64 6976 3e0a ed
.\n-000e69f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-000e6a20: 696e 743c 2f73 7061 6e3e 205f 5f73 697a int __siz\n-000e6a30: 655f 6f66 5f61 7272 6179 313b 203c 7370 e_of_array1; // number of \n-000e6a60: 656c 656d 656e 7473 2070 6f69 6e74 6564 elements pointed\n-000e6a70: 2074 6f20 3c2f 7370 616e 3e3c 2f64 6976 to .
Type2 *a\n-000e6aa0: 7272 6179 323b 2020 2020 2020 2020 3c73 rray2; // pointer t\n-000e6ad0: 6f20 6172 7261 7920 6f66 2065 6c65 6d65 o array of eleme\n-000e6ae0: 6e74 7320 696e 206d 656d 6f72 793c 2f73 nts in memory
.
\n-000e6b10: 202e 2e2e 2020 2020 2020 2020 2020 2020 ... \n-000e6b20: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-000e6b40: 6f74 6865 7220 6d65 6d62 6572 7320 7468 other members th\n-000e6b50: 6174 2061 7265 2073 6572 6961 6c69 7a65 at are serialize\n-000e6b60: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
.<\n-000e6b70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e6b80: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n-000e6b90: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

Sin\n-000e6f00: 6365 2032 2e37 2e31 3620 6974 2069 7320 ce 2.7.16 it is \n-000e6f10: 616c 736f 2070 6f73 7369 626c 6520 746f also possible to\n-000e6f20: 2075 7365 2061 2027 3c63 6f64 653e 243c use a '$<\n-000e6f30: 2f63 6f64 653e 2720 6173 2061 2073 7065 /code>' as a spe\n-000e6f40: 6369 616c 206d 6172 6b65 7220 746f 2061 cial marker to a\n-000e6f50: 6e6e 6f74 6174 6520 6120 7369 7a65 206d nnotate a size m\n-000e6f60: 656d 6265 7220 696e 7374 6561 6420 6f66 ember instead of\n-000e6f70: 2072 6571 7569 7269 6e67 2074 6865 7365 requiring these\n-000e6f80: 206d 656d 6265 7273 2074 6f20 7374 6172 members to star\n-000e6f90: 7420 7769 7468 203c 636f 6465 3e5f 5f73 t with __s\n-000e6fa0: 697a 653c 2f63 6f64 653e 3a3c 2f70 3e0a ize:

.\n-000e6fb0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st\n-000e6ff0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n-000e7000: 4d61 7020 3c2f 6469 763e 0a3c 6469 7620 Map
.
{.
$ int \n-000e7060: 7369 7a65 3b20 203c 7370 616e 2063 6c61 size; // \n-000e7080: 6e75 6d62 6572 206f 6620 7061 6972 7320 number of pairs \n-000e7090: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000e70b0: 2020 2020 3c73 7061 6e20 636c 6173 733d struct\n-000e70d0: 203c 2f73 7061 6e3e 6e73 5f5f 5061 6972 ns__Pair\n-000e70e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{.
<\n-000e7120: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e7130: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *key;
\n-000e7150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char\n-000e7190: 202a 7661 6c3b 3c2f 6469 763e 0a3c 6469 *val;
. \n-000e71b0: 2020 207d 202a 7061 6972 3b20 2020 203c } *pair; <\n-000e71c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000e71d0: 656e 7422 3e2f 2f20 6172 7261 7920 6f66 ent\">// array of\n-000e71e0: 2070 6169 7273 3c2f 7370 616e 3e3c 2f64 pairs.
};
.<\n-000e7210: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The arr\n-000e7230: 6179 2077 696c 6c20 6265 2073 6572 6961 ay will be seria\n-000e7240: 6c69 7a65 6420 696e 2058 4d4c 2061 7320 lized in XML as \n-000e7250: 6120 7365 7175 656e 6365 206f 6620 7061 a sequence of pa\n-000e7260: 6972 733a 3c2f 703e 0a3c 6469 7620 636c irs:

.
<ns:Map&g\n-000e72d0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000e72f0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;pair\n-000e7310: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<key>Joe</key&g\n-000e73b0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
\n-000e73d0: 266c 743b 3c73 7061 6e20 636c 6173 733d <va\n-000e73f0: 6c3c 2f73 7061 6e3e 2667 743b 3535 3520 l>555 \n-000e7400: 3737 2031 3233 3426 6c74 3b2f 3c73 7061 77 1234</val\n-000e7430: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e7450: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </p\n-000e7470: 6169 723c 2f73 7061 6e3e 2667 743b 203c air> <\n-000e7480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<pair>
.<\n-000e74d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e74e0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <key>\n-000e7510: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;Susan</key>\n-000e7560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
&l\n-000e7580: 743b 3c73 7061 6e20 636c 6173 733d 226b t;val<\n-000e75a0: 2f73 7061 6e3e 2667 743b 3535 3520 3132 /span>>555 12\n-000e75b0: 2036 3732 3526 6c74 3b2f 3c73 7061 6e20 6725</val&g\n-000e75e0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000e7600: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/pai\n-000e7620: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
<pair>
. \n-000e7690: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <key><\n-000e76c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e76d0: 6f72 6422 3e50 6574 653c 2f73 7061 6e3e ord\">Pete\n-000e76e0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </k\n-000e7700: 6579 3c2f 7370 616e 3e26 6774 3b20 3c2f ey> .
<<\n-000e7730: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e7740: 6f72 6474 7970 6522 3e76 616c 3c2f 7370 ordtype\">val>555 99 43\n-000e7760: 3231 266c 743b 2f3c 7370 616e 2063 6c61 21</val> \n-000e7790: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</\n-000e77b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 pair>
\n-000e77e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</ns:Map&\n-000e7820: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
.
\n-000e7830: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-000e7d90: 703e 5468 6520 584d 4c20 7365 7269 616c p>The XML serial\n-000e7da0: 697a 6174 696f 6e20 6f66 2061 6e20 6578 ization of an ex\n-000e7db0: 616d 706c 6520 3c63 6f64 653e 6e73 5f5f ample ns__\n-000e7dc0: 436f 6e74 6163 743c 2f63 6f64 653e 2069 Contact i\n-000e7dd0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
<\n-000e7e00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e7e10: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><n\n-000e7e30: 733a 436f 6e74 6163 743c 2f73 7061 6e3e s:Contact\n-000e7e40: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e7e60: 266c 743b 3c73 7061 6e20 636c 6173 733d <fi\n-000e7e80: 7273 744e 616d 653c 2f73 7061 6e3e 2667 rstName&g\n-000e7e90: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Joe</firstName>
. \n-000e7f00: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <l\n-000e7f20: 6173 744e 616d 653c 2f73 7061 6e3e 2667 astName&g\n-000e7f30: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Smith</lastName>
.\n-000e7fa0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000e7fc0: 7068 6f6e 654e 756d 6265 723c 2f73 7061 phoneNumber>5551112222\n-000e7fe0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </p\n-000e8000: 686f 6e65 4e75 6d62 6572 3c2f 7370 616e honeNumber>
. \n-000e8030: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <p\n-000e8050: 686f 6e65 4e75 6d62 6572 3c2f 7370 616e honeNumber>5551234567&\n-000e8070: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/ph\n-000e8090: 6f6e 654e 756d 6265 723c 2f73 7061 6e3e oneNumber\n-000e80a0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e80c0: 266c 743b 3c73 7061 6e20 636c 6173 733d <ph\n-000e80e0: 6f6e 654e 756d 6265 723c 2f73 7061 6e3e oneNumber\n-000e80f0: 2667 743b 3535 3532 3334 3839 3031 266c >5552348901&l\n-000e8100: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/pho\n-000e8120: 6e65 4e75 6d62 6572 3c2f 7370 616e 3e26 neNumber&\n-000e8130: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n-000e8150: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ema\n-000e8170: 696c 4164 6472 6573 733c 2f73 7061 6e3e ilAddress\n-000e8180: 2667 743b 3c73 7061 6e20 636c 6173 733d >Joe.Sm\n-000e81a0: 6974 683c 2f73 7061 6e3e 403c 7370 616e ith@mail.com\n-000e81d0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </e\n-000e81f0: 6d61 696c 4164 6472 6573 733c 2f73 7061 mailAddress>
.\n-000e8220: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000e8240: 656d 6169 6c41 6464 7265 7373 3c2f 7370 emailAddress>Joe\n-000e8270: 3c2f 7370 616e 3e40 3c73 7061 6e20 636c @Sm\n-000e8290: 6974 682e 636f 6d3c 2f73 7061 6e3e 266c ith.com&l\n-000e82a0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ema\n-000e82c0: 696c 4164 6472 6573 733c 2f73 7061 6e3e ilAddress\n-000e82d0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.&l\n-000e82f0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ns:\n-000e8310: 436f 6e74 6163 743c 2f73 7061 6e3e 2667 Contact&g\n-000e8320: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
.
<\n-000e8330: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000e8340: 203c 2f64 6976 3e3c 703e 466f 7220 432b

For C+\n-000e8350: 2b2c 2061 2062 6574 7465 7220 616c 7465 +, a better alte\n-000e8360: 726e 6174 6976 6520 746f 2061 7272 6179 rnative to array\n-000e8370: 7320 6172 6520 636f 6e74 6169 6e65 7273 s are containers\n-000e8380: 2c20 7768 6963 6820 6172 6520 6465 7363 , which are desc\n-000e8390: 7269 6265 6420 6e65 7874 2e3c 2f70 3e0a ribed next.

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

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

.

.\n-000e8400: 5354 4c20 636f 6e74 6169 6e65 7273 3c2f STL containers.

The STL c\n-000e8420: 6f6e 7461 696e 6572 7320 3c63 6f64 653e ontainers \n-000e8430: 7374 643a 3a64 6571 7565 3c2f 636f 6465 std::deque, std::li\n-000e8450: 7374 3c2f 636f 6465 3e2c 203c 636f 6465 st, std::set\n-000e8470: 2c20 616e 6420 3c63 6f64 653e 7374 643a , and std:\n-000e8480: 3a76 6563 746f 723c 2f63 6f64 653e 2061 :vector a\n-000e8490: 7265 2073 6572 6961 6c69 7a61 626c 6520 re serializable \n-000e84a0: 696e 2058 4d4c 2062 7920 7468 6520 736f in XML by the so\n-000e84b0: 6170 6370 7032 2d67 656e 6572 6174 6564 apcpp2-generated\n-000e84c0: 2073 6572 6961 6c69 7a65 7273 2e3c 2f70 serializers..

In order to\n-000e84e0: 2075 7365 2063 6f6e 7461 696e 6572 7320 use containers \n-000e84f0: 696e 2061 6e20 696e 7465 7266 6163 6520 in an interface \n-000e8500: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n-000e8510: 736f 6170 6370 7032 2c20 696d 706f 7274 soapcpp2, import\n-000e8520: 203c 656d 3e3c 636f 6465 3e73 746c 6465 stlde\n-000e8530: 7175 652e 683c 2f63 6f64 653e 3c2f 656d que.h, stl\n-000e8550: 6c69 7374 2e68 3c2f 636f 6465 3e3c 2f65 list.h, st\n-000e8570: 6c73 6574 2e68 3c2f 636f 6465 3e3c 2f65 lset.h, or stlvector.h to enab\n-000e85b0: 6c65 203c 636f 6465 3e73 7464 3a3a 6465 le std::de\n-000e85c0: 7175 653c 2f63 6f64 653e 2c20 3c63 6f64 que, std::list, std::s\n-000e85f0: 6574 3c2f 636f 6465 3e2c 2061 6e64 203c et, and <\n-000e8600: 636f 6465 3e73 7464 3a3a 7665 6374 6f72 code>std::vector\n-000e8610: 3c2f 636f 6465 3e2c 2072 6573 7065 6374 , respect\n-000e8620: 6976 656c 792e 2046 6f72 2065 7861 6d70 ively. For examp\n-000e8630: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

.
\n-000e8660: 3c73 7061 6e20 636c 6173 733d 2270 7265 #impo\n-000e8680: 7274 2026 7175 6f74 3b73 746c 7665 6374 rt "stlvect\n-000e8690: 6f72 2e68 2671 756f 743b 3c2f 7370 616e or.h"
.
class ns\n-000e86e0: 5f5f 6d79 436c 6173 7320 3c2f 6469 763e __myClass
\n-000e86f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ publi\n-000e8720: 633c 2f73 7061 6e3e 3a20 3c2f 6469 763e c:
\n-000e8730: 0a3c 6469 7620 636c 6173 733d 226c 696e .
std::vect\n-000e8750: 6f72 266c 743b 696e 7426 6774 3b20 2020 or<int> \n-000e8760: 2020 2020 2020 206e 756d 6265 7220 313a number 1:\n-000e8770: 3130 3b20 3c73 7061 6e20 636c 6173 733d 10; // 1 t\n-000e8790: 6f20 3130 206e 756d 6265 7273 3c2f 7370 o 10 numbers
.
\n-000e87c0: 7374 643a 3a76 6563 746f 7226 6c74 3b73 std::vector<s\n-000e87d0: 7464 3a3a 7374 7269 6e67 2667 743b 202a td::string> *\n-000e87e0: 6e61 6d65 2020 2032 3b20 2020 203c 7370 name 2; // more than \n-000e8810: 3220 6e61 6d65 733c 2f73 7061 6e3e 3c2f 2 names.
};
.\n-000e8840: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

The us\n-000e8860: 6520 6f66 2070 6f69 6e74 6572 206d 656d e of pointer mem\n-000e8870: 6265 7273 2073 7563 6820 6173 2066 6f72 bers such as for\n-000e8880: 203c 636f 6465 3e6e 616d 653c 2f63 6f64 name shown above i\n-000e88a0: 7320 706f 7373 6962 6c65 2c20 6275 7420 s possible, but \n-000e88b0: 6e6f 7420 7265 7175 6972 6564 2e20 416c not required. Al\n-000e88c0: 736f 203c 636f 6465 3e6d 696e 4f63 6375 so minOccu\n-000e88d0: 7273 203a 206d 6178 4f63 6375 7273 3c2f rs : maxOccurs and \n-000e88f0: 6d69 6e4f 6363 7572 733c 2f63 6f64 653e minOccurs\n-000e8900: 206c 656e 6774 6820 636f 6e73 7472 6169 length constrai\n-000e8910: 6e74 7320 6361 6e20 6265 2073 7065 6369 nts can be speci\n-000e8920: 6669 6564 2061 7320 7368 6f77 6e20 696e fied as shown in\n-000e8930: 2074 6865 2065 7861 6d70 6c65 2061 626f the example abo\n-000e8940: 7665 2e20 5468 6520 584d 4c20 7363 6865 ve. The XML sche\n-000e8950: 6d61 2074 6861 7420 636f 7272 6573 706f ma that correspo\n-000e8960: 6e64 7320 746f 2074 6865 203c 636f 6465 nds to the ns__myClass type is:

\n-000e8990: 0a3c 6469 7620 636c 6173 733d 2261 6c74 .
<<\n-000e89d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e89e0: 6f72 6474 7970 6522 3e63 6f6d 706c 6578 ordtype\">complex\n-000e89f0: 5479 7065 3c2f 7370 616e 3e20 3c73 7061 Type name="\n-000e8a40: 6d79 436c 6173 7326 7175 6f74 3b3c 2f73 myClass">
.\n-000e8a60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<sequence>
. \n-000e8ac0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <element \n-000e8af0: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n-000e8b30: 756f 743b 6e75 6d62 6572 2671 756f 743b uot;number"\n-000e8b40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ty\n-000e8b60: 7065 3c2f 7370 616e 3e3d 3c73 7061 6e20 pe="xsd:\n-000e8b90: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int"\n-000e8ba0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 minOccurs\n-000e8bc0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="1"\n-000e8bf0: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; m\n-000e8c10: 6178 4f63 6375 7273 3c2f 7370 616e 3e3d axOccurs=\n-000e8c20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000e8c40: 743b 3130 2671 756f 743b 3c2f 7370 616e t;10"/>
.\n-000e8c70: 2020 2020 266c 743b 3c73 7061 6e20 636c <element\n-000e8ca0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n-000e8ce0: 7175 6f74 3b6e 616d 6526 7175 6f74 3b3c quot;name"<\n-000e8cf0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ\n-000e8d10: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:s\n-000e8d40: 7472 696e 6726 7175 6f74 3b3c 2f73 7061 tring" minOccu\n-000e8d70: 7273 3c2f 7370 616e 3e3d 3c73 7061 6e20 rs="2&qu\n-000e8da0: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; maxOccurs=&q\n-000e8df0: 756f 743b 756e 626f 756e 6465 6426 7175 uot;unbounded&qu\n-000e8e00: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> \n-000e8e10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</\n-000e8e30: 3c73 7061 6e20 636c 6173 733d 226b 6579 sequen\n-000e8e50: 6365 3c2f 7370 616e 3e26 6774 3b20 3c2f ce> .
</complexTyp\n-000e8ea0: 653c 2f73 7061 6e3e 2667 743b 3c2f 6469 e>.

You can also\n-000e8ee0: 2069 6d70 6c65 6d65 6e74 2079 6f75 7220 implement your \n-000e8ef0: 6f77 6e20 636f 6e74 6169 6e65 7273 2e20 own containers. \n-000e8f00: 5468 6520 636f 6e74 6169 6e65 7273 206d The containers m\n-000e8f10: 7573 7420 6265 2063 6c61 7373 2074 656d ust be class tem\n-000e8f20: 706c 6174 6573 2061 6e64 2073 686f 756c plates and shoul\n-000e8f30: 6420 6465 6669 6e65 2061 2066 6f72 7761 d define a forwa\n-000e8f40: 7264 2069 7465 7261 746f 7220 7479 7065 rd iterator type\n-000e8f50: 2c20 616e 6420 7072 6f76 6964 6520 7468 , and provide th\n-000e8f60: 6520 666f 6c6c 6f77 696e 6720 6d65 7468 e following meth\n-000e8f70: 6f64 733a 3c2f 703e 0a3c 756c 3e0a 3c6c ods:

.
    .void cle\n-000e8f90: 6172 2829 3c2f 636f 6465 3e20 656d 7074 ar() empt\n-000e8fa0: 7920 7468 6520 636f 6e74 6169 6e65 723b y the container;\n-000e8fb0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e .
  • \n-000e8fc0: 6974 6572 6174 6f72 2062 6567 696e 2829 iterator begin()\n-000e8fd0: 3c2f 636f 6465 3e20 7265 7475 726e 2069 return i\n-000e8fe0: 7465 7261 746f 7220 746f 2062 6567 696e terator to begin\n-000e8ff0: 6e69 6e67 3b3c 2f6c 693e 0a3c 6c69 3e3c ning;
  • .
  • <\n-000e9000: 636f 6465 3e63 6f6e 7374 5f69 7465 7261 code>const_itera\n-000e9010: 746f 7220 6265 6769 6e28 2920 636f 6e73 tor begin() cons\n-000e9020: 743c 2f63 6f64 653e 2072 6574 7572 6e20 t return \n-000e9030: 636f 6e73 7420 6974 6572 6174 6f72 2074 const iterator t\n-000e9040: 6f20 6265 6769 6e6e 696e 673b 3c2f 6c69 o beginning;.
  • iter\n-000e9060: 6174 6f72 2065 6e64 2829 3c2f 636f 6465 ator end() return iterato\n-000e9080: 7220 746f 2065 6e64 3b3c 2f6c 693e 0a3c r to end;
  • .<\n-000e9090: 6c69 3e3c 636f 6465 3e63 6f6e 7374 5f69 li>const_i\n-000e90a0: 7465 7261 746f 7220 656e 6428 2920 636f terator end() co\n-000e90b0: 6e73 743c 2f63 6f64 653e 2072 6574 7572 nst retur\n-000e90c0: 6e20 636f 6e73 7420 6974 6572 6174 6f72 n const iterator\n-000e90d0: 2074 6f20 656e 643b 3c2f 6c69 3e0a 3c6c to end;.size_t s\n-000e90f0: 697a 6528 293c 2f63 6f64 653e 2072 6574 ize() ret\n-000e9100: 7572 6e20 7369 7a65 3b3c 2f6c 693e 0a3c urn size;.<\n-000e9110: 6c69 3e3c 636f 6465 3e69 7465 7261 746f li>iterato\n-000e9120: 7220 696e 7365 7274 2869 7465 7261 746f r insert(iterato\n-000e9130: 7220 706f 732c 2063 6f6e 7374 5f72 6566 r pos, const_ref\n-000e9140: 6572 656e 6365 2076 616c 293c 2f63 6f64 erence val) insert elemen\n-000e9160: 742e 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 t..
.The itera\n-000e9180: 746f 723c 2f63 6f64 653e 2073 686f 756c tor shoul\n-000e9190: 6420 6265 2061 2066 6f72 7761 7264 2069 d be a forward i\n-000e91a0: 7465 7261 746f 7220 7769 7468 2061 2064 terator with a d\n-000e91b0: 6572 6566 6572 656e 6365 206f 7065 7261 ereference opera\n-000e91c0: 746f 7220 746f 2061 6363 6573 7320 7468 tor to access th\n-000e91d0: 6520 636f 6e74 6169 6e65 7227 7320 656c e container's el\n-000e91e0: 656d 656e 7473 2c20 6974 206d 7573 7420 ements, it must \n-000e91f0: 6265 2063 6f6d 7061 7261 626c 6520 2865 be comparable (e\n-000e9200: 7175 616c 2f75 6e65 7175 616c 292c 2061 qual/unequal), a\n-000e9210: 6e64 2062 6520 7072 652d 696e 6372 656d nd be pre-increm\n-000e9220: 656e 7461 626c 6520 283c 636f 6465 3e2b entable (+\n-000e9230: 2b69 743c 2f63 6f64 653e 292e 2054 6865 +it). The\n-000e9240: 2063 6f6e 7374 2069 7465 7261 746f 7220 const iterator \n-000e9250: 6973 2075 7365 6420 6279 2069 7473 2073 is used by its s\n-000e9260: 6f61 7063 7070 322d 6765 6e65 7261 7465 oapcpp2-generate\n-000e9270: 6420 7365 7269 616c 697a 6572 2074 6f20 d serializer to \n-000e9280: 7365 6e64 2061 2073 6571 7565 6e63 6520 send a sequence \n-000e9290: 6f66 2058 4d4c 2065 6c65 6d65 6e74 2076 of XML element v\n-000e92a0: 616c 7565 732e 2054 6865 203c 636f 6465 alues. The insert m\n-000e92c0: 6574 686f 6420 6973 2075 7365 6420 746f ethod is used to\n-000e92d0: 2070 6f70 756c 6174 6520 6120 636f 6e74 populate a cont\n-000e92e0: 6169 6e65 7220 7769 7468 203c 636f 6465 ainer with Container::iter\n-000e9300: 6174 6f72 2069 203d 2063 6f6e 7461 696e ator i = contain\n-000e9310: 6572 2e69 6e73 6572 7428 636f 6e74 6169 er.insert(contai\n-000e9320: 6e65 722e 656e 6428 292c 2076 616c 293c ner.end(), val)<\n-000e9330: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e48 /code>.

.

H\n-000e9340: 6572 6520 6973 2069 6e20 6578 616d 706c ere is in exampl\n-000e9350: 6520 636f 6e74 6169 6e65 7220 7465 6d70 e container temp\n-000e9360: 6c61 7465 2063 6c61 7373 3a3c 2f70 3e0a late class:

.\n-000e9370: 3c64 6976 2063 6c61 7373 3d22 6672 6167
//\n-000e93b0: 2073 696d 706c 655f 7665 6374 6f72 2e68 simple_vector.h\n-000e93c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-000e93d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e93e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >template<\n-000e9400: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <class T&\n-000e9430: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
class \n-000e9470: 7369 6d70 6c65 5f76 6563 746f 7220 3c2f simple_vector .
{ p\n-000e94b0: 7562 6c69 633c 2f73 7061 6e3e 3a20 3c2f ublic: .
typedef \n-000e9500: 5420 2020 2020 2020 2020 2020 2020 2020 T \n-000e9510: 2020 2020 2020 2020 7661 6c75 655f 7479 value_ty\n-000e9520: 7065 3b20 3c2f 6469 763e 0a3c 6469 7620 pe;
.
\n-000e9540: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typedef value_type\n-000e9570: 2020 2020 2020 2020 2020 2020 2a20 706f * po\n-000e9580: 696e 7465 723b 203c 2f64 6976 3e0a 3c64 inter;
.\n-000e95a0: 2020 2020 3c73 7061 6e20 636c 6173 733d typede\n-000e95c0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f c\n-000e95e0: 6f6e 7374 3c2f 7370 616e 3e20 7661 6c75 onst valu\n-000e95f0: 655f 7479 7065 2020 2020 2020 2a20 636f e_type * co\n-000e9600: 6e73 745f 706f 696e 7465 723b 203c 2f64 nst_pointer; .
\n-000e9640: 7479 7065 6465 663c 2f73 7061 6e3e 2076 typedef v\n-000e9650: 616c 7565 5f74 7970 6520 2020 2020 2020 alue_type \n-000e9660: 2020 2020 2026 616d 703b 2072 6566 6572 & refer\n-000e9670: 656e 6365 3b20 3c2f 6469 763e 0a3c 6469 ence;
. \n-000e9690: 2020 203c 7370 616e 2063 6c61 7373 3d22 typedef\n-000e96b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c co\n-000e96d0: 6e73 743c 2f73 7061 6e3e 2076 616c 7565 nst value\n-000e96e0: 5f74 7970 6520 2020 2020 2026 616d 703b _type &\n-000e96f0: 2063 6f6e 7374 5f72 6566 6572 656e 6365 const_reference\n-000e9700: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000e9720: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e9730: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef pointer \n-000e9750: 2020 2020 2020 2020 2020 2020 6974 6572 iter\n-000e9760: 6174 6f72 3b20 3c2f 6469 763e 0a3c 6469 ator;
. \n-000e9780: 2020 203c 7370 616e 2063 6c61 7373 3d22 typedef\n-000e97a0: 3c2f 7370 616e 3e20 636f 6e73 745f 706f const_po\n-000e97b0: 696e 7465 7220 2020 2020 2020 2020 2020 inter \n-000e97c0: 636f 6e73 745f 6974 6572 6174 6f72 3b20 const_iterator; \n-000e97d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
protected:
.
\n-000e9830: 6974 6572 6174 6f72 2020 2020 2020 2020 iterator \n-000e9840: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9850: 6865 6164 3b20 3c2f 6469 763e 0a3c 6469 head;
. \n-000e9870: 2020 2069 7465 7261 746f 7220 2020 2020 iterator \n-000e9880: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9890: 2020 2074 6169 6c3b 203c 2f64 6976 3e0a tail;
.\n-000e98a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-000e98d0: 7369 7a65 5f74 3c2f 7370 616e 3e20 2020 size_t \n-000e98e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e98f0: 2020 2020 2020 2063 6170 6163 6974 793b capacity;\n-000e9900: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
public:\n-000e9940: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000e9960: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9970: 2020 2020 2020 2020 2020 2020 2020 7369 si\n-000e9980: 6d70 6c65 5f76 6563 746f 7228 2920 2020 mple_vector() \n-000e9990: 2020 2020 7b20 6865 6164 203d 2074 6169 { head = tai\n-000e99a0: 6c20 3d20 4e55 4c4c 3b20 7d20 3c2f 6469 l = NULL; } .
\n-000e99d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e99e0: 2020 2020 2020 2020 2073 696d 706c 655f simple_\n-000e99f0: 7665 6374 6f72 283c 7370 616e 2063 6c61 vector(con\n-000e9a10: 7374 3c2f 7370 616e 3e20 7369 6d70 6c65 st simple\n-000e9a20: 5f76 6563 746f 7226 616d 703b 2076 2920 _vector& v) \n-000e9a30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n+000de7d0: 6974 6572 616c 223e 6063 393c 2f73 7061 iteral\">`c9
.
..8ɀ\n+000de820: 333b 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3;
.\n+000de830: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
`c\n+000de860: 3926 2378 3234 3033 3b3c 2f73 7061 6e3e 9␃\n+000de870: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
..8␃\n+000de8b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000de8d0: 3c73 7061 6e20 636c 6173 733d 2273 7472 \n+000de8f0: 266c 743b 6e65 7874 2068 7265 663d 2671 <next href=&q\n+000de900: 756f 743b 3c2f 7370 616e 3e23 3126 7175 uot;#1&qu\n+000de910: 6f74 3b2f 2667 743b 203c 2f64 6976 3e0a ot;/>
.\n+000de920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</next&g\n+000de960: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
<\n+000de980: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /ns:li\n+000de9a0: 7374 3c2f 7370 616e 3e26 6774 3b3c 2f64 st>.

In case mul\n+000de9e0: 7469 2d72 6566 6572 656e 6365 6420 6461 ti-referenced da\n+000de9f0: 7461 2069 7320 7265 6365 6976 6564 2074 ta is received t\n+000dea00: 6861 7420 2264 6f65 7320 6e6f 7420 6669 hat \"does not fi\n+000dea10: 7420 696e 2061 2070 6f69 6e74 6572 2d62 t in a pointer-b\n+000dea20: 6173 6564 2073 7472 7563 7475 7265 222c ased structure\",\n+000dea30: 2074 6865 2064 6174 6120 6973 2063 6f70 the data is cop\n+000dea40: 6965 642e 2046 6f72 2065 7861 6d70 6c65 ied. For example\n+000dea50: 2c20 7468 6520 666f 6c6c 6f77 696e 6720 , the following \n+000dea60: 7477 6f20 7374 7275 6374 7320 6172 6520 two structs are \n+000dea70: 7369 6d69 6c61 722c 2065 7863 6570 7420 similar, except \n+000dea80: 7468 6174 2074 6865 2066 6972 7374 2075 that the first u\n+000dea90: 7365 7320 706f 696e 7465 722d 6261 7365 ses pointer-base\n+000deaa0: 6420 6d65 6d62 6572 7320 7768 696c 6520 d members while \n+000deab0: 7468 6520 6f74 6865 7220 7573 6573 206e the other uses n\n+000deac0: 6f6e 2d70 6f69 6e74 6572 2d62 6173 6564 on-pointer-based\n+000dead0: 206d 656d 6265 7273 3a3c 2f70 3e0a 3c64 members:

.
type\n+000deb20: 6465 663c 2f73 7061 6e3e 203c 7370 616e def long\n+000deb50: 2078 7364 5f5f 696e 743b 203c 2f64 6976 xsd__int; .
.struct ns__record .
{
.\n+000debf0: 2020 2020 7873 645f 5f69 6e74 202a 613b xsd__int *a;\n+000dec00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
xs\n+000dec20: 645f 5f69 6e74 202a 623b 203c 2f64 6976 d__int *b; .
} P;
.\n+000dec50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
.
struct \n+000deca0: 6e73 5f5f 7265 636f 7264 3c2f 6469 763e ns__record
\n+000decb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n+000dece0: 2078 7364 5f5f 696e 7420 613b 203c 2f64 xsd__int a; .
xsd__i\n+000ded10: 6e74 2062 3b20 3c2f 6469 763e 0a3c 6469 nt b;
.}\n+000ded30: 2052 3b20 3c2f 6469 763e 0a3c 6469 7620 R;
.
.
int main\n+000ded90: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
.
{.
P.a = &am\n+000dedd0: 703b 6e3b 203c 2f64 6976 3e0a 3c64 6976 p;n;
. \n+000dedf0: 502e 6220 3d20 2661 6d70 3b6e 3b20 3c2f P.b = &n; .
... //.
}
.

Since bot\n+000dee80: 6820 3c63 6f64 653e 613c 2f63 6f64 653e h a\n+000dee90: 2061 6e64 203c 636f 6465 3e62 3c2f 636f and b members of <\n+000deeb0: 636f 6465 3e50 3c2f 636f 6465 3e20 706f code>P po\n+000deec0: 696e 7420 746f 2074 6865 2073 616d 6520 int to the same \n+000deed0: 696e 7465 6765 722c 2074 6865 2073 6572 integer, the ser\n+000deee0: 6961 6c69 7a61 7469 6f6e 206f 6620 3c63 ialization of P pro\n+000def00: 6475 6365 7320 6120 6d75 6c74 692d 7265 duces a multi-re\n+000def10: 6665 7265 6e63 6520 696e 2053 4f41 5020 ference in SOAP \n+000def20: 312e 3120 5250 4320 656e 636f 6469 6e67 1.1 RPC encoding\n+000def30: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
\n+000def70: 266c 743b 3c73 7061 6e20 636c 6173 733d <ns\n+000def90: 3a72 6563 6f72 643c 2f73 7061 6e3e 2667 :record&g\n+000defa0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n+000defc0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;a href<\n+000df000: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="#1"\n+000df030: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
<b \n+000df080: 3c73 7061 6e20 636c 6173 733d 226b 6579 href=&q\n+000df0c0: 756f 743b 2331 2671 756f 743b 3c2f 7370 uot;#1"/>
.\n+000df0e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</ns:record>
.&\n+000df140: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;id<\n+000df160: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> id<\n+000df180: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="1"\n+000df1b0: 3c2f 7370 616e 3e26 6774 3b31 3233 266c >123&l\n+000df1c0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/id<\n+000df1e0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000df1f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
<\n+000df210: 703e 5468 6520 6465 7365 7269 616c 697a p>The deserializ\n+000df220: 6174 696f 6e20 6f66 2074 6865 2063 6f6e ation of the con\n+000df230: 7465 6e74 2069 6e20 7468 6520 3c63 6f64 tent in the R data \n+000df250: 7374 7275 6374 7572 6520 7468 6174 2064 structure that d\n+000df260: 6f65 7320 6e6f 7420 7573 6520 706f 696e oes not use poin\n+000df270: 7465 7273 2074 6f20 696e 7465 6765 7273 ters to integers\n+000df280: 2072 6573 756c 7473 2069 6e20 6120 636f results in a co\n+000df290: 7079 206f 6620 6561 6368 206d 756c 7469 py of each multi\n+000df2a0: 2d72 6566 6572 656e 6365 2069 6e74 6567 -reference integ\n+000df2b0: 6572 2e20 4e6f 7465 2074 6861 7420 7468 er. Note that th\n+000df2c0: 6520 7477 6f20 7374 7275 6374 7320 7265 e two structs re\n+000df2d0: 7365 6d62 6c65 2074 6865 2073 616d 6520 semble the same \n+000df2e0: 584d 4c20 6461 7461 2074 7970 6520 6265 XML data type be\n+000df2f0: 6361 7573 6520 7468 6520 7472 6169 6c69 cause the traili\n+000df300: 6e67 2075 6e64 6572 7363 6f72 6520 7769 ng underscore wi\n+000df310: 6c6c 2062 6520 6967 6e6f 7265 6420 696e ll be ignored in\n+000df320: 2058 4d4c 2065 6e63 6f64 696e 6720 616e XML encoding an\n+000df330: 6420 6465 636f 6469 6e67 2e3c 2f70 3e0a d decoding.

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

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

.

.NULL \n+000df3a0: 706f 696e 7465 7273 2061 6e64 206e 696c pointers and nil\n+000df3b0: 2065 6c65 6d65 6e74 733c 2f68 333e 0a3c elements

.<\n+000df3c0: 703e 4120 4e55 4c4c 2070 6f69 6e74 6572 p>A NULL pointer\n+000df3d0: 2069 7320 6e6f 7420 7365 7269 616c 697a is not serializ\n+000df3e0: 6564 2c20 756e 6c65 7373 2074 6865 2070 ed, unless the p\n+000df3f0: 6f69 6e74 6572 206d 656d 6265 7220 6f66 ointer member of\n+000df400: 2061 2073 7472 7563 7420 6f72 2063 6c61 a struct or cla\n+000df410: 7373 2069 7320 6465 636c 6172 6564 2069 ss is declared i\n+000df420: 6e20 7468 6520 696e 7465 7266 6163 6520 n the interface \n+000df430: 6865 6164 6572 2066 696c 6520 6173 206e header file as n\n+000df440: 696c 6c61 626c 6520 7769 7468 203c 636f illable with nullptr or in the unli\n+000df470: 6b65 6c79 2063 6173 6520 7468 6520 706f kely case the po\n+000df480: 696e 7465 7220 6974 7365 6c66 2069 7320 inter itself is \n+000df490: 706f 696e 7465 6420 746f 2062 7920 616e pointed to by an\n+000df4a0: 6f74 6865 7220 706f 696e 7465 7220 2862 other pointer (b\n+000df4b0: 7574 2073 6565 2053 6563 7469 6f6e 203c ut see Section <\n+000df4c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+000df4d0: 663d 2269 6e64 6578 2e68 746d 6c23 666c f=\"index.html#fl\n+000df4e0: 6167 7322 3e52 756e 2d74 696d 6520 666c ags\">Run-time fl\n+000df4f0: 6167 733c 2f61 3e20 746f 2063 6f6e 7472 ags to contr\n+000df500: 6f6c 2074 6865 2073 6572 6961 6c69 7a61 ol the serializa\n+000df510: 7469 6f6e 206f 6620 4e55 4c4c 7329 2c20 tion of NULLs), \n+000df520: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

\n+000df530: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n+000df570: 7472 7563 7420 3c2f 7370 616e 3e58 203c truct X <\n+000df580: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n+000df5a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000df5d0: 696e 743c 2f73 7061 6e3e 202a 703b 203c int *p; <\n+000df5e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n+000df620: 202a 2a71 3b20 3c2f 6469 763e 0a3c 6469 **q;
. \n+000df640: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+000df660: 3c2f 7370 616e 3e20 2a72 203c 7370 616e *r nullptr \n+000df690: 313b 3c2f 6469 763e 0a3c 6469 7620 636c 1;
.
}.

The\n+000df6d0: 2074 7970 6573 2073 6563 7469 6f6e 206f types section o\n+000df6e0: 6620 6120 5753 444c 2064 6573 6372 6970 f a WSDL descrip\n+000df6f0: 7469 6f6e 2063 6f6e 7461 696e 7320 696e tion contains in\n+000df700: 666f 726d 6174 696f 6e20 6f6e 2074 6865 formation on the\n+000df710: 2022 6e69 6c6c 6162 696c 6974 7922 206f \"nillability\" o\n+000df720: 6620 6461 7461 2c20 7768 6963 6820 6973 f data, which is\n+000df730: 2064 6563 6c61 7265 6420 6173 203c 636f declared as nullptr members where \n+000df760: 7468 6520 3c63 6f64 653e 313c 2f63 6f64 the 1 indicates tha\n+000df780: 7420 7468 6520 6d65 6d62 6572 2069 7320 t the member is \n+000df790: 7265 7175 6972 6564 2028 3c65 6d3e 3c63 required (minOccurs and maxOccur\n+000df7d0: 733c 2f63 6f64 653e 3c2f 656d 3e20 6172 s ar\n+000df7e0: 6520 3120 7365 7420 7769 7468 203c 636f e 1 set with 1:1 or\n+000df800: 2073 696d 706c 7920 3c63 6f64 653e 313c simply 1<\n+000df810: 2f63 6f64 653e 292e 3c2f 703e 0a3c 703e /code>).

.

\n+000df820: 5375 7070 6f73 6520 706f 696e 7465 7220 Suppose pointer \n+000df830: 3c63 6f64 653e 713c 2f63 6f64 653e 2070 q p\n+000df840: 6f69 6e74 7320 746f 2070 6f69 6e74 6572 oints to pointer\n+000df850: 203c 636f 6465 3e70 3c2f 636f 6465 3e20 p \n+000df860: 616e 6420 7375 7070 6f73 6520 3c63 6f64 and suppose p and <\n+000df880: 636f 6465 3e72 3c2f 636f 6465 3e20 6172 code>r ar\n+000df890: 6520 4e55 4c4c 2e20 496e 2074 6861 7420 e NULL. In that \n+000df8a0: 6361 7365 2074 6865 203c 636f 6465 3e58 case the X\n+000df8b0: 3c2f 636f 6465 3e20 7374 7275 6374 2069 struct i\n+000df8c0: 7320 7365 7269 616c 697a 6564 2077 6974 s serialized wit\n+000df8d0: 6820 3c63 6f64 653e 2353 4f41 505f 584d h #SOAP_XM\n+000df8e0: 4c5f 4752 4150 483c 2f63 6f64 653e 2061 L_GRAPH a\n+000df8f0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
<\n+000df920: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000df930: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><X\n+000df950: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<p id="1\n+000df9e0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " xsi:nil=&\n+000dfa30: 7175 6f74 3b74 7275 6526 7175 6f74 3b3c quot;true"<\n+000dfa40: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>.
<q ref=`c9&#x\n+000dfad0: 3234 3033 3b3c 2f73 7061 6e3e 3c2f 6469 2403;.
<r id=&quo\n+000dfb20: 743b 3c2f 7370 616e 3e31 3c73 7061 6e20 t;1" xsi\n+000dfb50: 3a6e 696c 3d26 7175 6f74 3b3c 2f73 7061 :nil="true"/>.
</X&g\n+000dfbd0: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
.
<\n+000dfbe0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000dfbf0: 203c 2f64 6976 3e3c 703e 5468 6520 6465

The de\n+000dfc00: 7365 7269 616c 697a 6572 2072 6563 6f6e serializer recon\n+000dfc10: 7374 7275 6374 7320 7468 6520 7374 7275 structs the stru\n+000dfc20: 6374 203c 636f 6465 3e58 3c2f 636f 6465 ct X from this form\n+000dfc40: 206f 6620 584d 4c2c 2074 6865 7265 6279 of XML, thereby\n+000dfc50: 2070 7265 7365 7276 696e 6720 7468 6520 preserving the \n+000dfc60: 696e 7465 6772 6974 7920 6f66 2074 6865 integrity of the\n+000dfc70: 2064 6174 6120 7374 7275 6374 7572 6520 data structure \n+000dfc80: 7365 7269 616c 697a 6564 2e3c 2f70 3e0a serialized.

.\n+000dfc90: 3c70 3e57 6865 6e20 7468 6520 6465 7365

When the dese\n+000dfca0: 7269 616c 697a 6572 2065 6e63 6f75 6e74 rializer encount\n+000dfcb0: 6572 7320 616e 2058 4d4c 2065 6c65 6d65 ers an XML eleme\n+000dfcc0: 6e74 2074 6861 7420 6861 7320 6120 3c65 nt that has a xsi:nil=\n+000dfce0: 2274 7275 6522 3c2f 636f 6465 3e3c 2f65 \"true\" attribute but\n+000dfd00: 2074 6865 2063 6f72 7265 7370 6f6e 6469 the correspondi\n+000dfd10: 6e67 2043 2f43 2b2b 2064 6174 6120 6973 ng C/C++ data is\n+000dfd20: 206e 6f74 2061 2070 6f69 6e74 6572 206f not a pointer o\n+000dfd30: 7220 7265 6665 7265 6e63 652c 2074 6865 r reference, the\n+000dfd40: 2064 6573 6572 6961 6c69 7a65 7220 7769 deserializer wi\n+000dfd50: 6c6c 2074 6572 6d69 6e61 7465 2077 6974 ll terminate wit\n+000dfd60: 6820 6120 3c63 6f64 653e 2353 4f41 505f h a #SOAP_\n+000dfd70: 4e55 4c4c 3c2f 636f 6465 3e20 6661 756c NULL faul\n+000dfd80: 7420 7768 656e 2074 6865 203c 636f 6465 t when the #SOAP_XML_STRIC\n+000dfda0: 543c 2f63 6f64 653e 2066 6c61 6720 6973 T flag is\n+000dfdb0: 2073 6574 2e3c 2f70 3e0a 3c70 3ef0 9f94 set.

.

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

.\n+000dfdf0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

\n+000dfe10: 3c2f 613e 0a56 6f69 6420 706f 696e 7465 .Void pointe\n+000dfe20: 7220 7365 7269 616c 697a 6174 696f 6e3c r serialization<\n+000dfe30: 2f68 323e 0a3c 703e 566f 6964 2070 6f69 /h2>.

Void poi\n+000dfe40: 6e74 6572 7320 283c 636f 6465 3e76 6f69 nters (voi\n+000dfe50: 642a 3c2f 636f 6465 3e29 2063 616e 6e6f d*) canno\n+000dfe60: 7420 6265 2073 6572 6961 6c69 7a65 6420 t be serialized \n+000dfe70: 696e 2058 4d4c 2062 6563 6175 7365 2074 in XML because t\n+000dfe80: 6865 2074 7970 6520 6f66 2064 6174 6120 he type of data \n+000dfe90: 7265 6665 7272 6564 2074 6f20 6973 2075 referred to is u\n+000dfea0: 6e74 7970 6564 2e20 546f 2065 6e61 626c ntyped. To enabl\n+000dfeb0: 6520 7468 6520 7365 7269 616c 697a 6174 e the serializat\n+000dfec0: 696f 6e20 6f66 2076 6f69 6420 706f 696e ion of void poin\n+000dfed0: 7465 7273 2074 6861 7420 6172 6520 6d65 ters that are me\n+000dfee0: 6d62 6572 7320 6f66 2073 7472 7563 7473 mbers of structs\n+000dfef0: 2061 6e64 2063 6c61 7373 6573 2c20 796f and classes, yo\n+000dff00: 7520 6361 6e20 696e 7365 7274 2061 203c u can insert a <\n+000dff10: 636f 6465 3e69 6e74 205f 5f74 7970 653c code>int __type<\n+000dff20: 2f63 6f64 653e 206d 656d 6265 7220 7269 /code> member ri\n+000dff30: 6768 7420 6265 666f 7265 2074 6865 2076 ght before the v\n+000dff40: 6f69 6420 706f 696e 7465 7220 6d65 6d62 oid pointer memb\n+000dff50: 6572 2e20 5468 6520 3c63 6f64 653e 696e er. The in\n+000dff60: 7420 5f5f 7479 7065 3c2f 636f 6465 3e20 t __type \n+000dff70: 6d65 6d62 6572 2063 6f6e 7461 696e 7320 member contains \n+000dff80: 7275 6e20 7469 6d65 2069 6e66 6f72 6d61 run time informa\n+000dff90: 7469 6f6e 206f 6e20 7468 6520 7479 7065 tion on the type\n+000dffa0: 206f 6620 7468 6520 6461 7461 2070 6f69 of the data poi\n+000dffb0: 6e74 6564 2074 6f20 6279 203c 636f 6465 nted to by void* me\n+000dffd0: 6d62 6572 2069 6e20 6120 7374 7275 6374 mber in a struct\n+000dffe0: 2f63 6c61 7373 2074 6f20 656e 6162 6c65 /class to enable\n+000dfff0: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati\n+000e0000: 6f6e 206f 6620 7468 6973 2064 6174 612e on of this data.\n+000e0010: 2054 6865 203c 636f 6465 3e69 6e74 205f The int _\n+000e0020: 5f74 7970 653c 2f63 6f64 653e 206d 656d _type mem\n+000e0030: 6265 7220 6973 2073 6574 2074 6f20 6120 ber is set to a \n+000e0040: 3c63 6f64 653e 534f 4150 5f54 5950 455f SOAP_TYPE_\n+000e0050: 543c 2f63 6f64 653e 2076 616c 7565 2c20 T value, \n+000e0060: 7768 6572 6520 3c63 6f64 653e 543c 2f63 where T is the name\n+000e0080: 206f 6620 6120 7479 7065 2e20 5468 6520 of a type. The \n+000e0090: 736f 6170 6370 7032 2074 6f6f 6c20 6765 soapcpp2 tool ge\n+000e00a0: 6e65 7261 7465 7320 7468 6520 3c63 6f64 nerates the SOAP_TYPE_T definitions\n+000e00d0: 2069 6e20 3c65 6d3e 3c63 6f64 653e 736f in so\n+000e00e0: 6170 482e 683c 2f63 6f64 653e 3c2f 656d apH.h and uses them \n+000e0100: 696e 7465 726e 616c 6c79 2074 6f20 756e internally to un\n+000e0110: 6971 7565 6c79 2069 6465 6e74 6966 7920 iquely identify \n+000e0120: 7468 6520 7479 7065 206f 6620 6561 6368 the type of each\n+000e0130: 206f 626a 6563 742e 2054 6865 2074 7970 object. The typ\n+000e0140: 6520 6e61 6d69 6e67 2063 6f6e 7665 6e74 e naming convent\n+000e0150: 696f 6e73 206f 7574 6c69 6e65 6420 696e ions outlined in\n+000e0160: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Serializing C\n+000e01a0: 2f43 2b2b 2064 6174 6120 746f 2058 4d4c /C++ data to XML\n+000e01b0: 3c2f 613e 2061 7265 2075 7365 6420 746f are used to\n+000e01c0: 2064 6574 6572 6d69 6e65 2074 6865 2074 determine the t\n+000e01d0: 7970 6520 6e61 6d65 2066 6f72 203c 636f ype name for T. Val\n+000e01f0: 7565 7320 7365 7269 616c 697a 6564 2069 ues serialized i\n+000e0200: 6e20 584d 4c20 7769 7468 2074 6869 7320 n XML with this \n+000e0210: 6170 7072 6f61 6368 2061 6c77 6179 7320 approach always \n+000e0220: 6361 7272 7920 7468 6520 3c65 6d3e 3c63 carry the xsi:type attribu\n+000e0250: 7465 2069 6e20 584d 4c20 746f 2069 6e64 te in XML to ind\n+000e0260: 6963 6174 6520 7468 6520 7479 7065 206f icate the type o\n+000e0270: 6620 636f 6e74 656e 7420 7365 7269 616c f content serial\n+000e0280: 697a 6564 2e3c 2f70 3e0a 3c70 3e48 6572 ized.

.

Her\n+000e0290: 6520 6973 2061 6e20 6578 616d 706c 6520 e is an example \n+000e02a0: 746f 2069 6c6c 7573 7472 6174 6520 7468 to illustrate th\n+000e02b0: 6520 7365 7269 616c 697a 6174 696f 6e20 e serialization \n+000e02c0: 6f66 2061 203c 636f 6465 3e76 6f69 642a of a void*\n+000e02d0: 3c2f 636f 6465 3e20 6d65 6d62 6572 2069 member i\n+000e02e0: 6e20 6120 7374 7275 6374 2f63 6c61 7373 n a struct/class\n+000e02f0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct ns__record .
{
.\n+000e0380: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+000e03a0: 743c 2f73 7061 6e3e 205f 5f74 7970 653b t __type;\n+000e03b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // the SO\n+000e03d0: 4150 5f54 5950 455f 5420 706f 696e 7465 AP_TYPE_T pointe\n+000e03e0: 6420 746f 2062 7920 7661 6c3c 2f73 7061 d to by val
.
<\n+000e0410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e0420: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *val; // serialize a\n+000e0460: 6e79 2074 7970 6520 696e 2065 6c65 6d65 ny type in eleme\n+000e0470: 6e74 2026 6c74 3b76 616c 2667 743b 3c2f nt <val>
.};\n+000e04a0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d

.
The __typ\n+000e04d0: 653c 2f63 6f64 653e 2069 6e74 6567 6572 e integer\n+000e04e0: 2063 616e 2062 6520 7365 7420 746f 2030 can be set to 0\n+000e04f0: 2061 7420 7275 6e20 7469 6d65 2074 6f20 at run time to \n+000e0500: 6f6d 6974 2074 6865 2073 6572 6961 6c69 omit the seriali\n+000e0510: 7a61 7469 6f6e 206f 6620 7468 6520 766f zation of the vo\n+000e0520: 6964 2070 6f69 6e74 6572 206d 656d 6265 id pointer membe\n+000e0530: 722e 3c2f 703e 0a3c 703e 5468 6520 666f r.

.

The fo\n+000e0540: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example \n+000e0550: 696c 6c75 7374 7261 7465 7320 7468 6520 illustrates the \n+000e0560: 696e 6974 6961 6c69 7a61 7469 6f6e 206f initialization o\n+000e0570: 6620 3c63 6f64 653e 6d79 5374 7275 6374 f myStruct\n+000e0580: 3c2f 636f 6465 3e20 7769 7468 2061 2076 with a v\n+000e0590: 6f69 6420 706f 696e 7465 7220 746f 2061 oid pointer to a\n+000e05a0: 6e20 696e 743a 3c2f 703e 0a3c 6469 7620 n int:

.
struct \n+000e05f0: 3c2f 7370 616e 3e6e 735f 5f72 6563 6f72 ns__recor\n+000e0600: 6420 533b 203c 2f64 6976 3e0a 3c64 6976 d S;
.int n = 123; .
S.val = (void*)&n; .
S.__type =\n+000e06c0: 2053 4f41 505f 5459 5045 5f69 6e74 3b20 SOAP_TYPE_int; \n+000e06d0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
The serialized \n+000e0700: 6f75 7470 7574 206f 6620 3c63 6f64 653e output of \n+000e0710: 533c 2f63 6f64 653e 2063 6f6e 7461 696e S contain\n+000e0720: 7320 7468 6520 696e 7465 6765 7220 696e s the integer in\n+000e0730: 2069 7473 203c 656d 3e3c 636f 6465 3e76 its v\n+000e0740: 616c 3c2f 636f 6465 3e3c 2f65 6d3e 2065 al e\n+000e0750: 6c65 6d65 6e74 3a3c 2f70 3e0a 3c64 6976 lement:

.
<ns:record>
.<\n+000e07d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e07e0: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <val xsi:type=&q\n+000e0850: 756f 743b 7873 643a 696e 7426 7175 6f74 uot;xsd:int"\n+000e0860: 3b3c 2f73 7061 6e3e 2667 743b 3132 3326 ;>123&\n+000e0870: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/va\n+000e0890: 6c3c 2f73 7061 6e3e 2667 743b 3c2f 6469 l>.
</ns:record>
.<\n+000e08f0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

\n+000e0910: 5468 6520 6465 7365 7269 616c 697a 6572 The deserializer\n+000e0920: 2066 6f72 203c 636f 6465 3e6e 735f 5f72 for ns__r\n+000e0930: 6563 6f72 643c 2f63 6f64 653e 2077 696c ecord wil\n+000e0940: 6c20 6175 746f 6d61 7469 6361 6c6c 7920 l automatically \n+000e0950: 7365 7420 7468 6520 3c63 6f64 653e 5f5f set the __\n+000e0960: 7479 7065 3c2f 636f 6465 3e20 6669 656c type fiel\n+000e0970: 6420 616e 6420 766f 6964 2070 6f69 6e74 d and void point\n+000e0980: 6572 2077 6865 6e20 6465 7365 7269 616c er when deserial\n+000e0990: 697a 696e 6720 7468 6520 6461 7461 2c20 izing the data, \n+000e09a0: 7072 6f76 6964 6564 2074 6861 7420 7468 provided that th\n+000e09b0: 6520 584d 4c20 656c 656d 656e 7420 3c65 e XML element val carries \n+000e09e0: 7468 6520 3c65 6d3e 3c63 6f64 653e 7873 the xs\n+000e09f0: 693a 7479 7065 3c2f 636f 6465 3e3c 2f65 i:type attribute fro\n+000e0a10: 6d20 7768 6963 6820 6974 2063 616e 2064 m which it can d\n+000e0a20: 6574 6572 6d69 6e65 2074 6865 2074 7970 etermine the typ\n+000e0a30: 652e 3c2f 703e 0a3c 646c 2063 6c61 7373 e.

.
\n+000e0a50: 3c64 743e 4e6f 7465 3c2f 6474 3e3c 6464
Note
when serializin\n+000e0a70: 6720 7374 7269 6e67 7320 7669 6120 6120 g strings via a \n+000e0a80: 3c63 6f64 653e 766f 6964 2a3c 2f63 6f64 void* member, the <\n+000e0aa0: 636f 6465 3e76 6f69 642a 3c2f 636f 6465 code>void* pointer must d\n+000e0ac0: 6972 6563 746c 7920 706f 696e 7420 746f irectly point to\n+000e0ad0: 2074 6865 2073 7472 696e 6720 7661 6c75 the string valu\n+000e0ae0: 6520 7261 7468 6572 2074 6861 6e20 696e e rather than in\n+000e0af0: 6469 7265 6374 6c79 2061 7320 7769 7468 directly as with\n+000e0b00: 2061 6c6c 206f 7468 6572 2074 7970 6573 all other types\n+000e0b10: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:
.
<\n+000e0b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e0b50: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__record \n+000e0b80: 533b 203c 2f64 6976 3e0a 3c64 6976 2063 S;
.
S.va\n+000e0ba0: 6c20 3d20 283c 7370 616e 2063 6c61 7373 l = (v\n+000e0bc0: 6f69 643c 2f73 7061 6e3e 2a29 3c73 7061 oid*)"He\n+000e0bf0: 6c6c 6f26 7175 6f74 3b3c 2f73 7061 6e3e llo"\n+000e0c00: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
S.__t\n+000e0c20: 7970 6520 3d20 534f 4150 5f54 5950 455f ype = SOAP_TYPE_\n+000e0c30: 7374 7269 6e67 3b20 3c2f 6469 763e 0a3c string;
.<\n+000e0c40: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

This is\n+000e0c60: 2074 6865 2063 6173 6520 666f 7220 616c the case for al\n+000e0c70: 6c20 7374 7269 6e67 2d62 6173 6564 2074 l string-based t\n+000e0c80: 7970 6573 2c20 696e 636c 7564 696e 6720 ypes, including \n+000e0c90: 7479 7065 7320 6465 6669 6e65 6420 7769 types defined wi\n+000e0ca0: 7468 203c 636f 6465 3e74 7970 6564 6566 th typedef\n+000e0cb0: 2063 6861 722a 3c2f 636f 6465 3e2e 3c2f char*..

You may us\n+000e0cd0: 6520 616e 2061 7262 6974 7261 7279 2073 e an arbitrary s\n+000e0ce0: 7566 6669 7820 7769 7468 2074 6865 203c uffix with the <\n+000e0cf0: 636f 6465 3e5f 5f74 7970 653c 2f63 6f64 code>__type members to ha\n+000e0d10: 6e64 6c65 206d 756c 7469 706c 6520 766f ndle multiple vo\n+000e0d20: 6964 2070 6f69 6e74 6572 7320 696e 2073 id pointers in s\n+000e0d30: 7472 7563 7473 2f63 6c61 7373 6573 2e20 tructs/classes. \n+000e0d40: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

\n+000e0d50: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n+000e0d90: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n+000e0da0: 5f72 6563 6f72 6420 3c2f 6469 763e 0a3c _record
.<\n+000e0db0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e0dc0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
.
<\n+000e0de0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e0df0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __typeOfp; <\n+000e0e10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e0e20: 656e 7422 3e2f 2f20 7468 6520 534f 4150 ent\">// the SOAP\n+000e0e30: 5f54 5950 455f 5420 706f 696e 7465 6420 _TYPE_T pointed \n+000e0e40: 746f 2062 7920 7020 3c2f 7370 616e 3e3c to by p <\n+000e0e50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
void *p; // element <\n+000e0ec0: 3b70 2667 743b 3c2f 7370 616e 3e3c 2f64 ;p>.
int _\n+000e0f10: 5f74 7970 654f 6671 3b20 3c73 7061 6e20 _typeOfq; \n+000e0f30: 2f2f 2074 6865 2053 4f41 505f 5459 5045 // the SOAP_TYPE\n+000e0f40: 5f54 2070 6f69 6e74 6564 2074 6f20 6279 _T pointed to by\n+000e0f50: 2071 203c 2f73 7061 6e3e 3c2f 6469 763e q
\n+000e0f60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
void *q;\n+000e0fa0: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n+000e0fc0: 656c 656d 656e 7420 266c 743b 7126 6774 element <q>\n+000e0fd0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
.<\n+000e0fe0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e0ff0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n+000e1000: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n+000e15e0: 703e 5468 6973 206d 6574 686f 6420 6861 p>This method ha\n+000e15f0: 7320 6120 706f 6c79 6d6f 7270 6869 6320 s a polymorphic \n+000e1600: 696e 7075 7420 7061 7261 6d65 7465 7220 input parameter \n+000e1610: 3c63 6f64 653e 6461 7461 3c2f 636f 6465 data and a polymorp\n+000e1630: 6869 6320 6f75 7470 7574 2070 6172 616d hic output param\n+000e1640: 6574 6572 203c 636f 6465 3e72 6574 7572 eter retur\n+000e1650: 6e5f 3c2f 636f 6465 3e2e 2054 6865 203c n_. The <\n+000e1660: 636f 6465 3e5f 5f74 7970 653c 2f63 6f64 code>__type parameters ca\n+000e1680: 6e20 6265 206f 6e65 206f 6620 3c63 6f64 n be one of SOAP_TYPE_xsd_\n+000e16a0: 5f73 7472 696e 673c 2f63 6f64 653e 2c20 _string, \n+000e16b0: 3c63 6f64 653e 534f 4150 5f54 5950 455f SOAP_TYPE_\n+000e16c0: 7873 645f 5f69 6e74 3c2f 636f 6465 3e2c xsd__int,\n+000e16d0: 203c 636f 6465 3e53 4f41 505f 5459 5045 SOAP_TYPE\n+000e16e0: 5f78 7364 5f5f 666c 6f61 743c 2f63 6f64 _xsd__float, SOAP_T\n+000e1700: 5950 455f 6e73 5f5f 7374 6174 7573 3c2f YPE_ns__status, or \n+000e1720: 534f 4150 5f54 5950 455f 6e73 5f5f 7769 SOAP_TYPE_ns__wi\n+000e1730: 6467 6574 3c2f 636f 6465 3e2e 2054 6865 dget. The\n+000e1740: 2057 5344 4c20 616e 6420 5853 4420 6669 WSDL and XSD fi\n+000e1750: 6c65 7320 7072 6f64 7563 6564 2062 7920 les produced by \n+000e1760: 7468 6520 736f 6170 6370 7032 2074 6f6f the soapcpp2 too\n+000e1770: 6c20 6465 636c 6172 6520 7468 6520 3c63 l declare the void*\n+000e1790: 2070 6f6c 796d 6f72 7068 6963 206d 656d polymorphic mem\n+000e17a0: 6265 7273 2061 7320 3c65 6d3e 3c63 6f64 bers as xsd:anyType elemen\n+000e17d0: 7473 2e3c 2f70 3e0a 3c70 3e54 6f20 6465 ts.

.

To de\n+000e17e0: 636c 6172 6520 6120 7772 6170 7065 7220 clare a wrapper \n+000e17f0: 7374 7275 6374 2f63 6c61 7373 2066 6f72 struct/class for\n+000e1800: 203c 636f 6465 3e76 6f69 642a 3c2f 636f void* pointers all\n+000e1820: 6f77 7320 7573 2074 6f20 7265 7573 6520 ows us to reuse \n+000e1830: 7468 6973 206d 6563 6861 6e69 736d 2077 this mechanism w\n+000e1840: 6865 6e20 7765 2075 7365 203c 636f 6465 hen we use __self a\n+000e1860: 7320 6120 6d65 6d62 6572 206e 616d 6520 s a member name \n+000e1870: 7468 6174 2072 6566 6572 7320 746f 2074 that refers to t\n+000e1880: 6865 2063 7572 7265 6e74 2058 4d4c 2065 he current XML e\n+000e1890: 6c65 6d65 6e74 2074 6167 206e 616d 653a lement tag name:\n+000e18a0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
struct __any
.\n+000e1910: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
int __type; // the SOAP_T\n+000e1980: 5950 455f 5420 706f 696e 7465 6420 746f YPE_T pointed to\n+000e1990: 2062 7920 5f5f 7365 6c66 3c2f 7370 616e by __self
.
void *__self; // serialize \n+000e1a10: 616e 7920 7479 7065 206f 6620 636f 6e74 any type of cont\n+000e1a20: 656e 7420 6f66 2074 6865 2063 7572 7265 ent of the curre\n+000e1a30: 6e74 2065 6c65 6d65 6e74 3c2f 7370 616e nt element
.
};.
struc\n+000e1a90: 7420 3c2f 7370 616e 3e6e 735f 5f72 6563 t ns__rec\n+000e1aa0: 6f72 643c 2f64 6976 3e0a 3c64 6976 2063 ord
.
{.
__any \n+000e1ae0: 7661 6c3b 3c2f 6469 763e 0a3c 6469 7620 val;
.
};<\n+000e1b00: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n+000e1b20: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex\n+000e1b30: 616d 706c 6520 696c 6c75 7374 7261 7465 ample illustrate\n+000e1b40: 7320 7468 6520 696e 6974 6961 6c69 7a61 s the initializa\n+000e1b50: 7469 6f6e 206f 6620 3c63 6f64 653e 5f5f tion of __\n+000e1b60: 6e73 5f5f 7265 636f 7264 3c2f 636f 6465 ns__record with a void po\n+000e1b80: 696e 7465 7220 746f 2061 6e20 696e 743a inter to an int:\n+000e1b90: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
struct ns__record S; <\n+000e1bf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int n =\n+000e1c30: 2031 3233 3b20 3c2f 6469 763e 0a3c 6469 123;
.S\n+000e1c50: 2e76 616c 2e5f 5f69 7465 6d20 3d20 283c .val.__item = (<\n+000e1c60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e1c70: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void*)&n; .
S.val.__t\n+000e1cb0: 7970 6520 3d20 534f 4150 5f54 5950 455f ype = SOAP_TYPE_\n+000e1cc0: 696e 743b 203c 2f64 6976 3e0a 3c2f 6469 int;
.

The serial\n+000e1cf0: 697a 6564 206f 7574 7075 7420 6f66 203c ized output of <\n+000e1d00: 636f 6465 3e53 3c2f 636f 6465 3e20 636f code>S co\n+000e1d10: 6e74 6169 6e73 2074 6865 2069 6e74 6567 ntains the integ\n+000e1d20: 6572 3a3c 2f70 3e0a 3c64 6976 2063 6c61 er:

.
\n+000e1d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<\n+000e1d80: 6e73 3a72 6563 6f72 643c 2f73 7061 6e3e ns:record\n+000e1d90: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
&\n+000e1db0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;val\n+000e1dd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c xs\n+000e1df0: 693a 7479 7065 3c2f 7370 616e 3e3d 3c73 i:type="\n+000e1e20: 7873 643a 696e 7426 7175 6f74 3b3c 2f73 xsd:int">123</\n+000e1e40: 3c73 7061 6e20 636c 6173 733d 226b 6579 val>
.<\n+000e1e70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e1e80: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n+000e1ea0: 6e73 3a72 6563 6f72 643c 2f73 7061 6e3e ns:record\n+000e1eb0: 2667 743b 3c2f 6469 763e 0a3c 2f64 6976 >
.This specifies \n+000e22a0: 6120 6669 7865 642d 7369 7a65 2061 7272 a fixed-size arr\n+000e22b0: 6179 2070 6172 7420 6f66 2074 6865 203c ay part of the <\n+000e22c0: 636f 6465 3e73 7472 7563 7420 4578 616d code>struct Exam\n+000e22d0: 706c 653c 2f63 6f64 653e 2e20 5468 6520 ple
. The \n+000e22e0: 7365 7269 616c 697a 6564 206f 7574 7075 serialized outpu\n+000e22f0: 7420 6f66 2061 7272 6179 203c 636f 6465 t of array a is:.
<\n+000e2350: 3c73 7061 6e20 636c 6173 733d 226b 6579 a>
. \n+000e2390: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <i\n+000e23b0: 7465 6d3c 2f73 7061 6e3e 2667 743b 312e tem>1.\n+000e23c0: 3026 6c74 3b2f 3c73 7061 6e20 636c 6173 0</\n+000e23e0: 6974 656d 3c2f 7370 616e 3e26 6774 3b3c item><\n+000e23f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<item>2.0</<\n+000e2440: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e2450: 6f72 6474 7970 6522 3e69 7465 6d3c 2f73 ordtype\">item>
.<\n+000e2470: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e2480: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <item>\n+000e24b0: 332e 3026 6c74 3b2f 3c73 7061 6e20 636c 3.0</item>\n+000e24e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
</<\n+000e2500: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e2510: 6f72 6474 7970 6522 3e61 3c2f 7370 616e ordtype\">a>
.

Any\n+000e2550: 2064 6573 6572 6961 6c69 7a65 6420 6974 deserialized it\n+000e2560: 656d 7320 6f66 2061 6e20 6172 7261 7920 ems of an array \n+000e2570: 7468 6174 2064 6f20 6e6f 7420 6669 7420 that do not fit \n+000e2580: 696e 2074 6865 2066 6978 6564 2073 697a in the fixed siz\n+000e2590: 6520 6172 7261 792c 2069 2e65 2e20 6172 e array, i.e. ar\n+000e25a0: 6520 6f75 7420 6f66 2062 6f75 6e64 732c e out of bounds,\n+000e25b0: 2061 7265 2069 676e 6f72 6564 2062 7920 are ignored by \n+000e25c0: 7468 6520 6465 7365 7269 616c 697a 6572 the deserializer\n+000e25d0: 2077 6865 6e20 7468 6520 3c63 6f64 653e when the \n+000e25e0: 2353 4f41 505f 435f 4e4f 494f 423c 2f63 #SOAP_C_NOIOB flag is set\n+000e2600: 2c20 6f74 6865 7277 6973 6520 3c63 6f64 , otherwise #SOAP_IOB errors will b\n+000e2630: 6520 6765 6e65 7261 7465 6420 6279 2074 e generated by t\n+000e2640: 6865 2064 6573 6572 6961 6c69 7a65 722e he deserializer.\n+000e2650: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

.

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

.

<\n+000e2690: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+000e26a0: 2069 643d 2264 796e 6172 7261 7922 3e3c id=\"dynarray\"><\n+000e26b0: 2f61 3e0a 4479 6e61 6d69 6320 6172 7261 /a>.Dynamic arra\n+000e26c0: 7920 7365 7269 616c 697a 6174 696f 6e3c y serialization<\n+000e26d0: 2f68 323e 0a3c 703e 4479 6e61 6d69 6320 /h2>.

Dynamic \n+000e26e0: 6172 7261 7973 2061 7265 206d 7563 6820 arrays are much \n+000e26f0: 6d6f 7265 2066 6c65 7869 626c 6520 7468 more flexible th\n+000e2700: 616e 2066 6978 6564 2d73 697a 6520 6172 an fixed-size ar\n+000e2710: 7261 7973 2e20 4479 6e61 6d69 6320 6172 rays. Dynamic ar\n+000e2720: 7261 7973 2064 6563 6c61 7265 6420 696e rays declared in\n+000e2730: 2074 6865 2069 6e74 6572 6661 6365 2068 the interface h\n+000e2740: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s\n+000e2750: 6f61 7063 7070 3220 6172 6520 6120 7370 oapcpp2 are a sp\n+000e2760: 6563 6961 6c20 7374 7275 6374 206f 7220 ecial struct or \n+000e2770: 636c 6173 7320 6f72 2061 7265 2070 6172 class or are par\n+000e2780: 7420 6f66 2061 2073 7472 7563 7420 6f72 t of a struct or\n+000e2790: 2063 6c61 7373 2077 6974 6820 6120 6d65 class with a me\n+000e27a0: 6d62 6572 2070 6f69 6e74 696e 6720 746f mber pointing to\n+000e27b0: 2061 6e20 6172 7261 7920 6f66 2065 6c65 an array of ele\n+000e27c0: 6d65 6e74 7320 616e 6420 6120 6d65 6d62 ments and a memb\n+000e27d0: 6572 2074 6861 7420 7374 6f72 6573 2074 er that stores t\n+000e27e0: 6865 2073 697a 6520 6f66 2074 6865 2061 he size of the a\n+000e27f0: 7272 6179 2e20 4479 6e61 6d69 6320 6172 rray. Dynamic ar\n+000e2800: 7261 7920 616c 6c6f 6361 7469 6f6e 7320 ray allocations \n+000e2810: 6172 6520 6561 7379 2075 7369 6e67 2074 are easy using t\n+000e2820: 6865 2073 6f61 7063 7070 2d67 656e 6572 he soapcpp-gener\n+000e2830: 6174 6564 203c 636f 6465 3e73 6f61 705f ated soap_\n+000e2840: 6e65 775f 543c 2f63 6f64 653e 2066 756e new_T fun\n+000e2850: 6374 696f 6e73 2066 6f72 2074 7970 6520 ctions for type \n+000e2860: 3c63 6f64 653e 543c 2f63 6f64 653e 2e20 T. \n+000e2870: 5468 6973 2066 756e 6374 696f 6e20 6973 This function is\n+000e2880: 2075 7365 6420 746f 2061 6c6c 6f63 6174 used to allocat\n+000e2890: 6520 616e 2061 7272 6179 206f 6620 7661 e an array of va\n+000e28a0: 6c75 6573 2077 6869 6368 2063 616e 2074 lues which can t\n+000e28b0: 6865 6e20 6265 2061 7373 6967 6e65 6420 hen be assigned \n+000e28c0: 746f 2074 6865 2070 6f69 6e74 6572 206d to the pointer m\n+000e28d0: 656d 6265 7220 6f66 2074 6865 2073 7472 ember of the str\n+000e28e0: 7563 742f 636c 6173 7320 7468 6174 2073 uct/class that s\n+000e28f0: 746f 7265 7320 7468 6520 6172 7261 7920 tores the array \n+000e2900: 706f 696e 7465 7220 7769 7468 2069 7473 pointer with its\n+000e2910: 2073 697a 652e 3c2f 703e 0a3c 703e 546f size.

.

To\n+000e2920: 2066 6163 696c 6974 6174 6520 534f 4150 facilitate SOAP\n+000e2930: 2052 5043 2065 6e63 6f64 696e 672c 2053 RPC encoding, S\n+000e2940: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n+000e2950: 7973 2072 6571 7569 7265 2073 7065 6369 ys require speci\n+000e2960: 616c 2074 7265 6174 6d65 6e74 2e20 534f al treatment. SO\n+000e2970: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array\n+000e2980: 7320 6172 6520 7369 6e67 6c65 2d20 6f72 s are single- or\n+000e2990: 206d 756c 7469 2d64 696d 656e 7369 6f6e multi-dimension\n+000e29a0: 616c 2061 7272 6179 7320 7769 7468 2062 al arrays with b\n+000e29b0: 6f75 6e64 7320 7468 6174 2061 7070 6561 ounds that appea\n+000e29c0: 7220 696e 2058 4d4c 2e20 5468 6573 6520 r in XML. These \n+000e29d0: 6172 7261 7973 206d 6179 2061 6c73 6f20 arrays may also \n+000e29e0: 6861 7665 206f 6666 7365 7473 2074 6861 have offsets tha\n+000e29f0: 7420 6469 6666 6572 2066 726f 6d20 7a65 t differ from ze\n+000e2a00: 726f 2e20 5468 6520 696e 7465 6e74 206f ro. The intent o\n+000e2a10: 6620 534f 4150 2d65 6e63 6f64 6564 2061 f SOAP-encoded a\n+000e2a20: 7272 6179 7320 6973 2074 6f20 7265 706c rrays is to repl\n+000e2a30: 6963 6174 6520 6d75 6c74 692d 6469 6d65 icate multi-dime\n+000e2a40: 6e73 696f 6e61 6c20 6172 7261 7973 2063 nsional arrays c\n+000e2a50: 6f6d 6d6f 6e6c 7920 666f 756e 6420 696e ommonly found in\n+000e2a60: 2070 726f 6772 616d 6d69 6e67 206c 616e programming lan\n+000e2a70: 6775 6167 6573 2e3c 2f70 3e0a 3c70 3e48 guages.

.

H\n+000e2a80: 6f77 6576 6572 2c20 584d 4c20 616c 736f owever, XML also\n+000e2a90: 2070 726f 7669 6465 7320 6120 7369 6d70 provides a simp\n+000e2aa0: 6c65 2077 6179 2074 6f20 7265 7072 6573 le way to repres\n+000e2ab0: 656e 7420 6120 7365 7175 656e 6365 206f ent a sequence o\n+000e2ac0: 6620 7661 6c75 6573 2077 6974 6820 6120 f values with a \n+000e2ad0: 7365 7175 656e 6365 206f 6620 584d 4c20 sequence of XML \n+000e2ae0: 656c 656d 656e 7473 2e20 5468 6973 2064 elements. This d\n+000e2af0: 6966 6665 7273 2066 726f 6d20 534f 4150 iffers from SOAP\n+000e2b00: 2d65 6e63 6f64 6564 2061 7272 6179 7320 -encoded arrays \n+000e2b10: 696e 2074 6861 7420 534f 4150 2d65 6e63 in that SOAP-enc\n+000e2b20: 6f64 6564 2061 7272 6179 7320 6172 6520 oded arrays are \n+000e2b30: 656c 656d 656e 7473 2077 6974 6820 6e65 elements with ne\n+000e2b40: 7374 6564 203c 656d 3e3c 636f 6465 3e69 sted i\n+000e2b50: 7465 6d3c 2f63 6f64 653e 3c2f 656d 3e20 tem \n+000e2b60: 656c 656d 656e 7473 2077 6974 6820 7661 elements with va\n+000e2b70: 6c75 6573 2c20 7468 6f75 6768 2053 4f41 lues, though SOA\n+000e2b80: 5020 6465 7365 7269 616c 697a 6572 7320 P deserializers \n+000e2b90: 6d61 7920 6967 6e6f 7265 2074 6865 206e may ignore the n\n+000e2ba0: 616d 6520 6f66 2074 6865 7365 2065 6c65 ame of these ele\n+000e2bb0: 6d65 6e74 7320 7768 656e 2070 6172 7369 ments when parsi\n+000e2bc0: 6e67 2058 4d4c 2061 7320 7374 6174 6564 ng XML as stated\n+000e2bd0: 2069 6e20 7468 6520 534f 4150 2073 7065 in the SOAP spe\n+000e2be0: 6369 6669 6361 7469 6f6e 732e 3c2f 703e cifications.

\n+000e2bf0: 0a3c 703e 426f 7468 2053 4f41 502d 656e .

Both SOAP-en\n+000e2c00: 636f 6465 6420 6172 7261 7973 2061 6e64 coded arrays and\n+000e2c10: 2073 6571 7565 6e63 6573 206f 6620 584d sequences of XM\n+000e2c20: 4c20 656c 656d 656e 7473 2061 7265 2073 L elements are s\n+000e2c30: 7570 706f 7274 6564 2069 6e20 6753 4f41 upported in gSOA\n+000e2c40: 502c 2075 7369 6e67 2064 796e 616d 6963 P, using dynamic\n+000e2c50: 2061 7272 6179 7320 616e 6420 636f 6e74 arrays and cont\n+000e2c60: 6169 6e65 7273 2e20 5468 6520 6261 7369 ainers. The basi\n+000e2c70: 6373 2077 696c 6c20 6265 2064 6573 6372 cs will be descr\n+000e2c80: 6962 6564 206e 6578 742e 2046 6f72 2061 ibed next. For a\n+000e2c90: 6464 6974 696f 6e61 6c20 6465 7461 696c dditional detail\n+000e2ca0: 732c 2073 6565 2074 6865 203c 6120 6872 s, see the C and C++\n+000e2ce0: 2058 4d4c 2044 6174 6120 4269 6e64 696e XML Data Bindin\n+000e2cf0: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta\n+000e2d00: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

.

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

.\n+000e2d40: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

.SOAP\n+000e2d70: 2d65 6e63 6f64 6564 2061 7272 6179 2062 -encoded array b\n+000e2d80: 6f75 6e64 733c 2f68 333e 0a3c 703e 534f ounds

.

SO\n+000e2d90: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array\n+000e2da0: 7320 7573 6520 7468 6520 3c65 6d3e 3c63 s use the SOAP-ENC:Arr\n+000e2dc0: 6179 3c2f 636f 6465 3e3c 2f65 6d3e 2061 ay a\n+000e2dd0: 7474 7269 6275 7465 2069 6e20 584d 4c20 ttribute in XML \n+000e2de0: 746f 2069 6465 6e74 6966 7920 7468 6520 to identify the \n+000e2df0: 6172 7261 7920 616e 6420 7468 6520 3c65 array and the SOAP-ENC\n+000e2e10: 3a61 7272 6179 5479 7065 3c2f 636f 6465 :arrayType attribute\n+000e2e30: 2074 6f20 6964 656e 7469 6679 2074 6865 to identify the\n+000e2e40: 2061 7272 6179 2064 696d 656e 7369 6f6e array dimension\n+000e2e50: 616c 6974 7920 616e 6420 6974 7320 7369 ality and its si\n+000e2e60: 7a65 2e3c 2f70 3e0a 3c70 3e41 7320 6120 ze.

.

As a \n+000e2e70: 7365 6375 7269 7479 206d 6561 7375 7265 security measure\n+000e2e80: 2074 6f20 6176 6f69 6420 6465 6e69 616c to avoid denial\n+000e2e90: 206f 6620 7365 7276 6963 6520 6174 7461 of service atta\n+000e2ea0: 636b 7320 6261 7365 6420 6f6e 2073 656e cks based on sen\n+000e2eb0: 6469 6e67 2061 2068 7567 6520 6172 7261 ding a huge arra\n+000e2ec0: 7920 7369 7a65 2076 616c 7565 2075 7369 y size value usi\n+000e2ed0: 6e67 2074 6865 203c 656d 3e3c 636f 6465 ng the SOAP-ENC:arrayT\n+000e2ef0: 7970 653c 2f63 6f64 653e 3c2f 656d 3e20 ype \n+000e2f00: 6174 7472 6962 7574 652c 2072 6571 7569 attribute, requi\n+000e2f10: 7269 6e67 2074 6865 2061 6c6c 6f63 6174 ring the allocat\n+000e2f20: 696f 6e20 6f66 206c 6172 6765 2063 6875 ion of large chu\n+000e2f30: 6e6b 7320 6f66 206d 656d 6f72 792c 2074 nks of memory, t\n+000e2f40: 6865 2074 6f74 616c 206e 756d 6265 7220 he total number \n+000e2f50: 6f66 2061 7272 6179 2065 6c65 6d65 6e74 of array element\n+000e2f60: 7320 7365 7420 6279 2074 6865 203c 656d s set by the SOAP-ENC:\n+000e2f80: 6172 7261 7954 7970 653c 2f63 6f64 653e arrayType\n+000e2f90: 3c2f 656d 3e20 6174 7472 6962 7574 6520 attribute \n+000e2fa0: 6361 6e6e 6f74 2065 7863 6565 6420 3c63 cannot exceed #SOAP_MAXARR\n+000e2fc0: 4159 5349 5a45 3c2f 636f 6465 3e2c 2077 AYSIZE, w\n+000e2fd0: 6869 6368 2069 7320 7365 7420 746f 2031 hich is set to 1\n+000e2fe0: 3030 3030 3020 6279 2064 6566 6175 6c74 00000 by default\n+000e2ff0: 2e20 5468 6973 206c 696d 6974 2069 7320 . This limit is \n+000e3000: 6e6f 7420 6120 6861 7264 206c 696d 6974 not a hard limit\n+000e3010: 206f 6e20 7468 6520 6e75 6d62 6572 206f on the number o\n+000e3020: 6620 6172 7261 7920 656c 656d 656e 7473 f array elements\n+000e3030: 2c20 6275 7420 7261 7468 6572 2074 6f20 , but rather to \n+000e3040: 6176 6f69 6420 7072 652d 616c 6c6f 6361 avoid pre-alloca\n+000e3050: 7469 6e67 206c 6172 6765 2061 7272 6179 ting large array\n+000e3060: 7320 6173 2073 7461 7465 642e 2054 6865 s as stated. The\n+000e3070: 2068 6172 6420 6c69 6d69 7420 6f6e 2074 hard limit on t\n+000e3080: 6865 206e 756d 6265 7220 6f66 2061 7272 he number of arr\n+000e3090: 6179 2065 6c65 6d65 6e74 7320 7265 6365 ay elements rece\n+000e30a0: 6976 6564 2069 7320 3c63 6f64 653e 3c61 ived is soap::maxo\n+000e3170: 6363 7572 733c 2f61 3e3c 2f63 6f64 653e ccurs\n+000e3180: 2077 6869 6368 2069 7320 7365 7420 746f which is set to\n+000e3190: 203c 636f 6465 3e23 534f 4150 5f4d 4158 #SOAP_MAX\n+000e31a0: 4f43 4355 5253 3c2f 636f 6465 3e20 6279 OCCURS by\n+000e31b0: 2064 6566 6175 6c74 2e20 4279 2063 6f6e default. By con\n+000e31c0: 7472 6173 742c 2074 6865 203c 636f 6465 trast, the #SOAP_MAXARRAYS\n+000e31e0: 495a 453c 2f63 6f64 653e 206c 696d 6974 IZE limit\n+000e31f0: 206f 6e6c 7920 6e65 6761 7469 7665 6c79 only negatively\n+000e3200: 2061 6666 6563 7473 206d 756c 7469 2d64 affects multi-d\n+000e3210: 696d 656e 7369 6f6e 616c 2061 7272 6179 imensional array\n+000e3220: 7320 6265 6361 7573 6520 7468 6520 6469 s because the di\n+000e3230: 6d65 6e73 696f 6e61 6c69 7479 206f 6620 mensionality of \n+000e3240: 7468 6520 7265 6365 6976 696e 6720 6172 the receiving ar\n+000e3250: 7261 7920 6d61 7920 6265 206c 6f73 7420 ray may be lost \n+000e3260: 7768 656e 2074 6865 206e 756d 6265 7220 when the number \n+000e3270: 6f66 2065 6c65 6d65 6e74 7320 6578 6365 of elements exce\n+000e3280: 6564 7320 3130 3030 3030 2e20 4f6e 652d eds 100000. One-\n+000e3290: 6469 6d65 6e73 696f 6e61 6c20 6172 7261 dimensional arra\n+000e32a0: 7973 2061 7265 206e 6f74 2061 6666 6563 ys are not affec\n+000e32b0: 7465 6420 616e 6420 706f 7075 6c61 7465 ted and populate\n+000e32c0: 6420 6166 7465 7220 7468 6973 206c 696d d after this lim\n+000e32d0: 6974 2062 7920 7369 6d70 6c79 2064 6573 it by simply des\n+000e32e0: 6572 6961 6c69 7a69 6e67 2074 6865 2061 erializing the a\n+000e32f0: 7272 6179 2065 6c65 6d65 6e74 7320 7265 rray elements re\n+000e3300: 6365 6976 6564 2e3c 2f70 3e0a 3c70 3ef0 ceived.

.

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

.One-dimen\n+000e3370: 7369 6f6e 616c 2064 796e 616d 6963 2053 sional dynamic S\n+000e3380: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n+000e3390: 7973 3c2f 6833 3e0a 3c70 3e41 2073 7065 ys

.

A spe\n+000e33a0: 6369 616c 2066 6f72 6d20 6f66 2073 7472 cial form of str\n+000e33b0: 7563 7420 6f72 2063 6c61 7373 2069 7320 uct or class is \n+000e33c0: 7573 6564 2074 6f20 6465 6669 6e65 206f used to define o\n+000e33d0: 6e65 2d64 696d 656e 7369 6f6e 616c 2064 ne-dimensional d\n+000e33e0: 796e 616d 6963 2053 4f41 502d 656e 636f ynamic SOAP-enco\n+000e33f0: 6465 6420 6172 7261 7973 2069 6e20 616e ded arrays in an\n+000e3400: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+000e3410: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+000e3420: 7070 322e 2045 6163 6820 6172 7261 7920 pp2. Each array \n+000e3430: 6861 7320 6120 706f 696e 7465 7220 7661 has a pointer va\n+000e3440: 7269 6162 6c65 2061 6e64 2061 206d 656d riable and a mem\n+000e3450: 6265 7220 7468 6174 2072 6563 6f72 6473 ber that records\n+000e3460: 2074 6865 206e 756d 6265 7220 6f66 2065 the number of e\n+000e3470: 6c65 6d65 6e74 7320 7468 6520 706f 696e lements the poin\n+000e3480: 7465 7220 706f 696e 7473 2074 6f20 696e ter points to in\n+000e3490: 206d 656d 6f72 792e 3c2f 703e 0a3c 703e memory.

.

\n+000e34a0: 5468 6520 6765 6e65 7261 6c20 666f 726d The general form\n+000e34b0: 206f 6620 7468 6520 7374 7275 6374 206f of the struct o\n+000e34c0: 7220 636c 6173 7320 6465 636c 6172 6174 r class declarat\n+000e34d0: 696f 6e20 7468 6174 2063 6f6e 7461 696e ion that contain\n+000e34e0: 7320 6120 6f6e 652d 6469 6d65 6e73 696f s a one-dimensio\n+000e34f0: 6e61 6c20 6479 6e61 6d69 6320 534f 4150 nal dynamic SOAP\n+000e3500: 2d65 6e63 6f64 6564 2061 7272 6179 2069 -encoded array i\n+000e3510: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
<\n+000e3540: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e3550: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct array_name .
{
.<\n+000e3590: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e35a0: 3e20 2020 2054 7970 6520 2a5f 5f70 7472 > Type *__ptr\n+000e35b0: 3b20 203c 7370 616e 2063 6c61 7373 3d22 ; // poin\n+000e35d0: 7465 7220 746f 2061 7272 6179 206f 6620 ter to array of \n+000e35e0: 656c 656d 656e 7473 2069 6e20 6d65 6d6f elements in memo\n+000e35f0: 7279 3c2f 7370 616e 3e3c 2f64 6976 3e0a ry
.\n+000e3600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000e3630: 696e 743c 2f73 7061 6e3e 205f 5f73 697a int __siz\n+000e3640: 653b 2020 203c 7370 616e 2063 6c61 7373 e; // nu\n+000e3660: 6d62 6572 206f 6620 656c 656d 656e 7473 mber of elements\n+000e3670: 2070 6f69 6e74 6564 2074 6f20 3c2f 7370 pointed to
.
\n+000e36a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __offset; <\n+000e36d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e36e0: 656e 7422 3e2f 2f20 6f70 7469 6f6e 616c ent\">// optional\n+000e36f0: 2053 4f41 5020 312e 3120 6172 7261 7920 SOAP 1.1 array \n+000e3700: 6f66 6673 6574 3c2f 7370 616e 3e3c 2f64 offset.
... \n+000e3730: 2020 2020 2020 2020 3c73 7061 6e20 636c //\n+000e3750: 2061 6e79 7468 696e 6720 7468 6174 2066 anything that f\n+000e3760: 6f6c 6c6f 7773 2068 6572 6520 7769 6c6c ollows here will\n+000e3770: 2062 6520 6967 6e6f 7265 6420 3c2f 7370 be ignored
.
};.

w\n+000e37c0: 6865 7265 2074 6865 203c 636f 6465 3e61 here the a\n+000e37d0: 7272 6179 5f6e 616d 653c 2f63 6f64 653e rray_name\n+000e37e0: 206d 7573 7420 6265 2061 206e 6f6e 2d71 must be a non-q\n+000e37f0: 7561 6c69 6669 6564 206e 616d 6520 616e ualified name an\n+000e3800: 6420 3c63 6f64 653e 5479 7065 3c2f 636f d Type is the type \n+000e3820: 666f 7220 7468 6520 656c 656d 656e 7473 for the elements\n+000e3830: 206f 6620 7468 6520 6172 7261 792e 2054 of the array. T\n+000e3840: 6865 203c 636f 6465 3e5f 5f70 7472 3c2f he __ptr member poi\n+000e3860: 6e74 7320 746f 2074 6865 2061 7272 6179 nts to the array\n+000e3870: 2076 616c 7565 7320 616e 6420 3c63 6f64 values and __size \n+000e3890: 6973 2074 6865 2061 7272 6179 2073 697a is the array siz\n+000e38a0: 652e 2054 6865 203c 636f 6465 3e5f 5f6f e. The __o\n+000e38b0: 6666 7365 743c 2f63 6f64 653e 206d 656d ffset mem\n+000e38c0: 6265 7220 7370 6563 6966 6965 7320 616e ber specifies an\n+000e38d0: 206f 7074 696f 6e61 6c20 6172 7261 7920 optional array \n+000e38e0: 6f66 6673 6574 2c20 7768 656e 206e 6f6e offset, when non\n+000e38f0: 7a65 726f 2c20 7365 6520 5365 6374 696f zero, see Sectio\n+000e3900: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n One\n+000e3930: 2d64 696d 656e 7369 6f6e 616c 2064 796e -dimensional dyn\n+000e3940: 616d 6963 2053 4f41 502d 656e 636f 6465 amic SOAP-encode\n+000e3950: 6420 6172 7261 7973 2077 6974 6820 6e6f d arrays with no\n+000e3960: 6e2d 7a65 726f 206f 6666 7365 7473 3c2f n-zero offsets.

.

If th\n+000e3980: 6520 3c63 6f64 653e 6172 7261 795f 6e61 e array_na\n+000e3990: 6d65 3c2f 636f 6465 3e20 6973 2071 7561 me is qua\n+000e39a0: 6c69 6669 6564 2077 6974 6820 6120 6e61 lified with a na\n+000e39b0: 6d65 7370 6163 6520 7072 6566 6978 2074 mespace prefix t\n+000e39c0: 6865 6e20 7468 6520 6172 7261 7920 6973 hen the array is\n+000e39d0: 206e 6f74 2061 2053 4f41 502d 656e 636f not a SOAP-enco\n+000e39e0: 6465 6420 6172 7261 7920 6275 7420 7261 ded array but ra\n+000e39f0: 7468 6572 2072 6570 7265 7365 6e74 7320 ther represents \n+000e3a00: 6120 7365 7175 656e 6365 206f 6620 584d a sequence of XM\n+000e3a10: 4c20 656c 656d 656e 7473 2c20 7365 6520 L elements, see \n+000e3a20: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section Non\n+000e3a50: 2d53 4f41 5020 6479 6e61 6d69 6320 6172 -SOAP dynamic ar\n+000e3a60: 7261 7973 3c2f 613e 2e3c 2f70 3e0a 3c70 rays.

.The soapcpp2-ge\n+000e3a80: 6e65 7261 7465 6420 6465 7365 7269 616c nerated deserial\n+000e3a90: 697a 6572 206f 6620 6120 6f6e 652d 6469 izer of a one-di\n+000e3aa0: 6d65 6e73 696f 6e61 6c20 6479 6e61 6d69 mensional dynami\n+000e3ab0: 6320 6172 7261 7920 6361 6e20 6465 7365 c array can dese\n+000e3ac0: 7269 616c 697a 6520 7061 7274 6961 6c6c rialize partiall\n+000e3ad0: 7920 7472 616e 736d 6974 7465 6420 616e y transmitted an\n+000e3ae0: 642f 6f72 2053 4f41 502d 656e 636f 6465 d/or SOAP-encode\n+000e3af0: 6420 7370 6172 7365 2061 7272 6179 732c d sparse arrays,\n+000e3b00: 2061 6e64 2065 7665 6e20 6d75 6c74 692d and even multi-\n+000e3b10: 6469 6d65 6e73 696f 6e61 6c20 6172 7261 dimensional arra\n+000e3b20: 7973 2077 6869 6368 2077 696c 6c20 6265 ys which will be\n+000e3b30: 2063 6f6c 6c61 7073 6564 2069 6e74 6f20 collapsed into \n+000e3b40: 6120 6f6e 652d 6469 6d65 6e73 696f 6e61 a one-dimensiona\n+000e3b50: 6c20 6172 7261 7920 7769 7468 2072 6f77 l array with row\n+000e3b60: 2d6d 616a 6f72 206f 7264 6572 696e 672e -major ordering.\n+000e3b70: 3c2f 703e 0a3c 646c 2063 6c61 7373 3d22

.
Warning
SOAP 1.2 do\n+000e3bb0: 6573 206e 6f74 2073 7570 706f 7274 2070 es not support p\n+000e3bc0: 6172 7469 616c 6c79 2074 7261 6e73 6d69 artially transmi\n+000e3bd0: 7474 6564 2061 7272 6179 7320 616e 6420 tted arrays and \n+000e3be0: 7468 6520 3c63 6f64 653e 5f5f 6f66 6673 the __offs\n+000e3bf0: 6574 3c2f 636f 6465 3e20 6d65 6d62 6572 et member\n+000e3c00: 206f 6620 6120 6479 6e61 6d69 6320 6172 of a dynamic ar\n+000e3c10: 7261 7920 6973 2069 676e 6f72 6564 2e3c ray is ignored.<\n+000e3c20: 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 9f94 /dd>
.

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

.\n+000e3c60: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

.One-d\n+000e3c90: 696d 656e 7369 6f6e 616c 2064 796e 616d imensional dynam\n+000e3ca0: 6963 2053 4f41 502d 656e 636f 6465 6420 ic SOAP-encoded \n+000e3cb0: 6172 7261 7973 2077 6974 6820 6e6f 6e2d arrays with non-\n+000e3cc0: 7a65 726f 206f 6666 7365 7473 3c2f 6833 zero offsets.

The declara\n+000e3ce0: 7469 6f6e 206f 6620 6120 6479 6e61 6d69 tion of a dynami\n+000e3cf0: 6320 6172 7261 7920 6173 2064 6573 6372 c array as descr\n+000e3d00: 6962 6564 2069 6e20 5365 6374 696f 6e20 ibed in Section \n+000e3d10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 One-dimensi\n+000e3d40: 6f6e 616c 2064 796e 616d 6963 2053 4f41 onal dynamic SOA\n+000e3d50: 502d 656e 636f 6465 6420 6172 7261 7973 P-encoded arrays\n+000e3d60: 3c2f 613e 206d 6179 2069 6e63 6c75 6465 may include\n+000e3d70: 2061 6e20 3c63 6f64 653e 696e 7420 5f5f an int __\n+000e3d80: 6f66 6673 6574 3c2f 636f 6465 3e20 6d65 offset me\n+000e3d90: 6d62 6572 2e20 5768 656e 2073 6574 2074 mber. When set t\n+000e3da0: 6f20 616e 2069 6e74 6567 6572 2076 616c o an integer val\n+000e3db0: 7565 2c20 7468 6520 7365 7269 616c 697a ue, the serializ\n+000e3dc0: 6572 206f 6620 7468 6520 6479 6e61 6d69 er of the dynami\n+000e3dd0: 6320 6172 7261 7920 7769 6c6c 2075 7365 c array will use\n+000e3de0: 2074 6869 7320 6d65 6d62 6572 2061 7320 this member as \n+000e3df0: 7468 6520 7374 6172 7420 696e 6465 7820 the start index \n+000e3e00: 6f66 2074 6865 2061 7272 6179 2061 6e64 of the array and\n+000e3e10: 2074 6865 2053 4f41 502d 656e 636f 6465 the SOAP-encode\n+000e3e20: 6420 6172 7261 7920 6f66 6673 6574 2061 d array offset a\n+000e3e30: 7474 7269 6275 7465 203c 656d 3e3c 636f ttribute SOAP-ENC:offs\n+000e3e50: 6574 3c2f 636f 6465 3e3c 2f65 6d3e 2077 et w\n+000e3e60: 696c 6c20 6170 7065 6172 2069 6e20 7468 ill appear in th\n+000e3e70: 6520 584d 4c20 6d65 7373 6167 652e 204e e XML message. N\n+000e3e80: 6f74 6520 7468 6174 2061 7272 6179 206f ote that array o\n+000e3e90: 6666 7365 7473 2069 7320 6120 534f 4150 ffsets is a SOAP\n+000e3ea0: 2031 2e31 2073 7065 6369 6669 6320 6665 1.1 specific fe\n+000e3eb0: 6174 7572 6520 7768 6963 6820 6973 206e ature which is n\n+000e3ec0: 6f74 2073 7570 706f 7274 6564 2069 6e20 ot supported in \n+000e3ed0: 534f 4150 2031 2e32 2e3c 2f70 3e0a 3c70 SOAP 1.2.

.For example, th\n+000e3ef0: 6520 666f 6c6c 6f77 696e 6720 6865 6164 e following head\n+000e3f00: 6572 2066 696c 6520 6465 636c 6172 6573 er file declares\n+000e3f10: 2061 206e 756d 6572 6963 203c 636f 6465 a numeric Vector c\n+000e3f30: 6c61 7373 2c20 7768 6963 6820 6973 2061 lass, which is a\n+000e3f40: 2064 796e 616d 6963 2061 7272 6179 206f dynamic array o\n+000e3f50: 6620 666c 6f61 7469 6e67 2070 6f69 6e74 f floating point\n+000e3f60: 2076 616c 7565 7320 7769 7468 2061 6e20 values with an \n+000e3f70: 696e 6465 7820 7468 6174 2073 7461 7274 index that start\n+000e3f80: 7320 6174 2031 3a3c 2f70 3e0a 3c64 6976 s at 1:

.
// Con\n+000e3fd0: 7465 6e74 7320 6f66 2066 696c 6520 2671 tents of file &q\n+000e3fe0: 756f 743b 7665 6374 6f72 2e68 2671 756f uot;vector.h&quo\n+000e3ff0: 743b 3a20 3c2f 7370 616e 3e3c 2f64 6976 t;: .
class \n+000e4030: 3c2f 7370 616e 3e56 6563 746f 7220 3c2f Vector .
{ p\n+000e4070: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
float\n+000e40c0: 202a 5f5f 7074 723b 203c 2f64 6976 3e0a *__ptr;
.\n+000e40d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000e4100: 696e 743c 2f73 7061 6e3e 205f 5f73 697a int __siz\n+000e4110: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
.
\n+000e4130: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __offset; <\n+000e4160: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
Vect\n+000e4180: 6f72 2829 3b3c 2f64 6976 3e0a 3c64 6976 or();
. \n+000e41a0: 2020 5665 6374 6f72 283c 7370 616e 2063 Vector(s\n+000e41c0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *, \n+000e4200: 3c73 7061 6e20 636c 6173 733d 226b 6579 int n);
.<\n+000e4230: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e4240: 3e20 2020 203c 7370 616e 2063 6c61 7373 > f\n+000e4260: 6c6f 6174 3c2f 7370 616e 3e26 616d 703b loat&\n+000e4270: 206f 7065 7261 746f 725b 5d28 3c73 7061 operator[](int\n+000e42a0: 2069 293b 203c 2f64 6976 3e0a 3c64 6976 i);
. \n+000e42c0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+000e42e0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+000e4310: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *\n+000e4360: 736f 6170 3c2f 613e 3b3c 2f64 6976 3e0a soap;
.\n+000e4370: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.\n+000e4ca0: 3c70 3e54 6865 206f 7574 7075 7420 6973

The output is\n+000e4cb0: 2061 2070 6172 7469 616c 6c79 2074 7261 a partially tra\n+000e4cc0: 6e73 6d69 7474 6564 2061 7272 6179 3a3c nsmitted array:<\n+000e4cd0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l\n+000e4d10: 743b 3c73 7061 6e20 636c 6173 733d 226b t;SOAP\n+000e4d30: 2d45 4e43 3a41 7272 6179 3c2f 7370 616e -ENC:Array SOAP-ENC\n+000e4d60: 3a61 7272 6179 5479 7065 3c2f 7370 616e :arrayType=&q\n+000e4d90: 756f 743b 7873 643a 666c 6f61 745b 345d uot;xsd:float[4]\n+000e4da0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " SOAP-ENC:off\n+000e4dd0: 7365 743c 2f73 7061 6e3e 3d3c 7370 616e set="[1]\n+000e4e00: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n+000e4e10: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000e4e30: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;item<\n+000e4e50: 2f73 7061 6e3e 2667 743b 3126 6c74 3b2f /span>>1</\n+000e4e60: 3c73 7061 6e20 636c 6173 733d 226b 6579 item>
\n+000e4e90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<item&g\n+000e4ed0: 743b 3226 6c74 3b2f 3c73 7061 6e20 636c t;2</item>\n+000e4f00: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000e4f20: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;item<\n+000e4f40: 2f73 7061 6e3e 2667 743b 3326 6c74 3b2f /span>>3</\n+000e4f50: 3c73 7061 6e20 636c 6173 733d 226b 6579 item>
\n+000e4f80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</SOAP-ENC:Array\n+000e4fc0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
\n+000e4ff0: 3c70 3e4e 6f74 6520 7468 6174 203c 656d

Note that xsd:float\n+000e5010: 5b34 5d3c 2f63 6f64 653e 3c2f 656d 3e20 [4] \n+000e5020: 6973 2074 6865 2074 7970 6520 616e 6420 is the type and \n+000e5030: 7368 6170 6520 6f66 2074 6865 2065 6e63 shape of the enc\n+000e5040: 6f64 6564 2061 7272 6179 2c20 7768 6963 oded array, whic\n+000e5050: 6820 7374 6172 7473 2061 7420 6f66 6673 h starts at offs\n+000e5060: 6574 2031 2061 6e64 2074 6865 7265 666f et 1 and therefo\n+000e5070: 7265 2074 6865 2065 6c65 6d65 6e74 2061 re the element a\n+000e5080: 7420 3020 6973 206f 6d69 7474 6564 2e3c t 0 is omitted.<\n+000e5090: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

.

\n+000e50f0: 0a4e 6573 7465 6420 6f6e 652d 6469 6d65 .Nested one-dime\n+000e5100: 6e73 696f 6e61 6c20 6479 6e61 6d69 6320 nsional dynamic \n+000e5110: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr\n+000e5120: 6179 733c 2f68 333e 0a3c 703e 4f6e 652d ays

.

One-\n+000e5130: 6469 6d65 6e73 696f 6e61 6c20 534f 4150 dimensional SOAP\n+000e5140: 2d65 6e63 6f64 6564 2064 796e 616d 6963 -encoded dynamic\n+000e5150: 2061 7272 6179 7320 6d61 7920 6265 206e arrays may be n\n+000e5160: 6573 7465 642e 2046 6f72 2065 7861 6d70 ested. For examp\n+000e5170: 6c65 2c20 7573 696e 6720 3c63 6f64 653e le, using \n+000e5180: 636c 6173 7320 5665 6374 6f72 3c2f 636f class Vector declared in \n+000e51a0: 7468 6520 7072 6576 696f 7573 2073 6563 the previous sec\n+000e51b0: 7469 6f6e 2c20 3c63 6f64 653e 636c 6173 tion, clas\n+000e51c0: 7320 4d61 7472 6978 3c2f 636f 6465 3e20 s Matrix \n+000e51d0: 6973 2064 6563 6c61 7265 643a 3c2f 703e is declared:

\n+000e51e0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
/\n+000e5220: 2f20 436f 6e74 656e 7473 206f 6620 6669 / Contents of fi\n+000e5230: 6c65 2026 7175 6f74 3b6d 6174 7269 782e le "matrix.\n+000e5240: 6826 7175 6f74 3b3a 203c 2f73 7061 6e3e h": \n+000e5250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
c\n+000e5280: 6c61 7373 203c 2f73 7061 6e3e 4d61 7472 lass Matr\n+000e5290: 6978 203c 2f64 6976 3e0a 3c64 6976 2063 ix
.
{ public:
.
\n+000e52f0: 5665 6374 6f72 202a 5f5f 7074 723b 203c Vector *__ptr; <\n+000e5300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n+000e5340: 205f 5f73 697a 653b 203c 2f64 6976 3e0a __size;
.\n+000e5350: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000e5380: 696e 743c 2f73 7061 6e3e 205f 5f6f 6666 int __off\n+000e5390: 7365 743b 203c 2f64 6976 3e0a 3c64 6976 set;
. \n+000e53b0: 2020 4d61 7472 6978 2829 3b20 3c2f 6469 Matrix(); .
Matrix(\n+000e53e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+000e5430: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+000e5460: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n+000e5480: 696e 743c 2f73 7061 6e3e 206e 2c20 3c73 int n, int m);
.\n+000e54d0: 2020 2020 5665 6374 6f72 2661 6d70 3b20 Vector& \n+000e54e0: 6f70 6572 6174 6f72 5b5d 283c 7370 616e operator[](int \n+000e5510: 6929 3b20 3c2f 6469 763e 0a3c 6469 7620 i);
..<\n+000e55e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e55f0: 3e7d 3b20 3c2f 6469 763e 0a3c 2f64 6976 >};
.

where\n+000e5b30: 2074 6865 203c 636f 6465 3e61 7272 6179 the array\n+000e5b40: 5f6e 616d 653c 2f63 6f64 653e 206d 7573 _name mus\n+000e5b50: 7420 6265 2061 206e 6f6e 2d71 7561 6c69 t be a non-quali\n+000e5b60: 6669 6564 206e 616d 6520 616e 6420 3c63 fied name and Type \n+000e5b80: 6973 2074 6865 2074 7970 6520 666f 7220 is the type for \n+000e5b90: 7468 6520 656c 656d 656e 7473 206f 6620 the elements of \n+000e5ba0: 7468 6520 6172 7261 792e 2054 6865 203c the array. The <\n+000e5bb0: 636f 6465 3e5f 5f70 7472 3c2f 636f 6465 code>__ptr member points \n+000e5bd0: 746f 2074 6865 2061 7272 6179 2076 616c to the array val\n+000e5be0: 7565 732e 2054 6865 203c 636f 6465 3e5f ues. The _\n+000e5bf0: 5f73 697a 653c 2f63 6f64 653e 2061 7272 _size arr\n+000e5c00: 6179 2073 7065 6369 6669 6573 2074 6865 ay specifies the\n+000e5c10: 206e 756d 6265 7220 6f66 2061 7272 6179 number of array\n+000e5c20: 2065 6c65 6d65 6e74 7320 7065 7220 6469 elements per di\n+000e5c30: 6d65 6e73 696f 6e2e 2054 6865 203c 636f mension. The __offset array specifi\n+000e5c60: 6573 2061 6e20 6f70 7469 6f6e 616c 206f es an optional o\n+000e5c70: 6666 7365 7420 7065 7220 6469 6d65 6e73 ffset per dimens\n+000e5c80: 696f 6e2e 3c2f 703e 0a3c 703e 466f 7220 ion.

.

For \n+000e5c90: 6578 616d 706c 652c 2074 6865 2066 6f6c example, the fol\n+000e5ca0: 6c6f 7769 6e67 2064 6563 6c61 7261 7469 lowing declarati\n+000e5cb0: 6f6e 2073 7065 6369 6669 6573 2061 206d on specifies a m\n+000e5cc0: 6174 7269 7820 636c 6173 733a 3c2f 703e atrix class:

\n+000e5cd0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
c\n+000e5d10: 6c61 7373 203c 2f73 7061 6e3e 4d61 7472 lass Matr\n+000e5d20: 6978 203c 2f64 6976 3e0a 3c64 6976 2063 ix
.
{ public:
.
\n+000e5d80: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n+000e5da0: 2f73 7061 6e3e 202a 5f5f 7074 723b 203c /span> *__ptr; <\n+000e5db0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n+000e5df0: 205f 5f73 697a 655b 325d 3b20 3c2f 6469 __size[2]; .
int __\n+000e5e40: 6f66 6673 6574 5b32 5d3b 203c 2f64 6976 offset[2]; .
};
.

By contr\n+000e5e90: 6173 7420 746f 2074 6865 206d 6174 7269 ast to the matri\n+000e5ea0: 7820 636c 6173 7320 6f66 2053 6563 7469 x class of Secti\n+000e5eb0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Nested\n+000e5ee0: 206f 6e65 2d64 696d 656e 7369 6f6e 616c one-dimensional\n+000e5ef0: 2064 796e 616d 6963 2053 4f41 502d 656e dynamic SOAP-en\n+000e5f00: 636f 6465 6420 6172 7261 7973 3c2f 613e coded arrays\n+000e5f10: 2074 6861 7420 6465 6669 6e65 7320 6120 that defines a \n+000e5f20: 6d61 7472 6978 2061 7320 616e 2061 7272 matrix as an arr\n+000e5f30: 6179 206f 6620 706f 696e 7465 7273 2074 ay of pointers t\n+000e5f40: 6f20 6d61 7472 6978 2072 6f77 732c 2074 o matrix rows, t\n+000e5f50: 6869 7320 636c 6173 7320 6861 7320 6f6e his class has on\n+000e5f60: 6520 706f 696e 7465 7220 746f 2061 206d e pointer to a m\n+000e5f70: 6174 7269 7820 7374 6f72 6564 2069 6e20 atrix stored in \n+000e5f80: 726f 772d 6d61 6a6f 7220 6f72 6465 722e row-major order.\n+000e5f90: 2054 6865 2073 697a 6520 6f66 2074 6865 The size of the\n+000e5fa0: 206d 6174 7269 7820 6973 2064 6574 6572 matrix is deter\n+000e5fb0: 6d69 6e65 6420 6279 2074 6865 203c 636f mined by the __size\n+000e5fd0: 206d 656d 6265 723a 203c 636f 6465 3e5f member: _\n+000e5fe0: 5f73 697a 655b 305d 3c2f 636f 6465 3e20 _size[0] \n+000e5ff0: 686f 6c64 7320 7468 6520 6e75 6d62 6572 holds the number\n+000e6000: 206f 6620 726f 7773 2061 6e64 203c 636f of rows and __size[1] holds the nu\n+000e6030: 6d62 6572 206f 6620 636f 6c75 6d6e 7320 mber of columns \n+000e6040: 6f66 2074 6865 206d 6174 7269 782e 204c of the matrix. L\n+000e6050: 696b 6577 6973 652c 203c 636f 6465 3e5f ikewise, _\n+000e6060: 5f6f 6666 7365 745b 305d 3c2f 636f 6465 _offset[0] is the row off\n+000e6080: 7365 7420 616e 6420 3c63 6f64 653e 5f5f set and __\n+000e6090: 6f66 6673 6574 5b31 5d3c 2f63 6f64 653e offset[1]\n+000e60a0: 2069 7320 7468 6520 636f 6c75 6d6e 7320 is the columns \n+000e60b0: 6f66 6673 6574 2e3c 2f70 3e0a 3c64 6c20 offset.

.
Warn\n+000e60e0: 696e 673c 2f64 743e 3c64 643e 534f 4150 ing
SOAP\n+000e60f0: 2031 2e32 2064 6f65 7320 6e6f 7420 7375 1.2 does not su\n+000e6100: 7070 6f72 7420 7061 7274 6961 6c6c 7920 pport partially \n+000e6110: 7472 616e 736d 6974 7465 6420 6172 7261 transmitted arra\n+000e6120: 7973 2061 6e64 2074 6865 203c 636f 6465 ys and the __offset\n+000e6140: 206d 656d 6265 7220 6f66 2061 2064 796e member of a dyn\n+000e6150: 616d 6963 2061 7272 6179 2069 7320 6967 amic array is ig\n+000e6160: 6e6f 7265 642e 3c2f 6464 3e3c 2f64 6c3e nored.
\n+000e6170: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

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

.

.Non-\n+000e61d0: 534f 4150 2064 796e 616d 6963 2061 7272 SOAP dynamic arr\n+000e61e0: 6179 733c 2f68 333e 0a3c 703e 416e 2061 ays

.

An a\n+000e61f0: 7272 6179 2069 7320 7365 7269 616c 697a rray is serializ\n+000e6200: 6564 2061 7320 6120 7365 7175 656e 6365 ed as a sequence\n+000e6210: 206f 6620 584d 4c20 656c 656d 656e 7473 of XML elements\n+000e6220: 2e20 4279 2063 6f6e 7472 6173 742c 2061 . By contrast, a\n+000e6230: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n+000e6240: 7261 7920 6973 2073 6572 6961 6c69 7a65 ray is serialize\n+000e6250: 6420 6173 2061 6e20 656c 656d 656e 7420 d as an element \n+000e6260: 7769 7468 2061 2073 6571 7565 6e63 6520 with a sequence \n+000e6270: 6f66 2073 7562 2d65 6c65 6d65 6e74 732c of sub-elements,\n+000e6280: 2077 686f 7365 2074 6167 206e 616d 6573 whose tag names\n+000e6290: 2061 7265 2069 7272 656c 6576 616e 7420 are irrelevant \n+000e62a0: 746f 2074 6865 2053 4f41 5020 7072 6f63 to the SOAP proc\n+000e62b0: 6573 736f 722c 2073 6565 203c 6120 636c essor, see \n+000e62e0: 4f6e 652d 6469 6d65 6e73 696f 6e61 6c20 One-dimensional \n+000e62f0: 6479 6e61 6d69 6320 534f 4150 2d65 6e63 dynamic SOAP-enc\n+000e6300: 6f64 6564 2061 7272 6179 733c 2f61 3e2e oded arrays.\n+000e6310: 3c2f 703e 0a3c 703e 416e 2061 7272 6179

.

An array\n+000e6320: 2069 7320 6465 636c 6172 6564 2069 6e20 is declared in \n+000e6330: 616e 2069 6e74 6572 6661 6365 2068 6561 an interface hea\n+000e6340: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa\n+000e6350: 7063 7070 3220 6173 2061 2073 7472 7563 pcpp2 as a struc\n+000e6360: 7420 6f72 2063 6c61 7373 2077 6974 6820 t or class with \n+000e6370: 6120 6e61 6d65 2074 6861 7420 6973 2071 a name that is q\n+000e6380: 7561 6c69 6669 6564 2077 6974 6820 6120 ualified with a \n+000e6390: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+000e63a0: 2e20 5468 6572 6520 6172 6520 7477 6f20 . There are two \n+000e63b0: 666f 726d 732e 2054 6865 2066 6972 7374 forms. The first\n+000e63c0: 2066 6f72 6d20 6973 2073 696d 696c 6172 form is similar\n+000e63d0: 2074 6f20 7468 6520 534f 4150 2d65 6e63 to the SOAP-enc\n+000e63e0: 6f64 6564 2061 7272 6179 2064 6563 6c61 oded array decla\n+000e63f0: 7261 7469 6f6e 2074 6861 7420 7772 6170 ration that wrap\n+000e6400: 7320 7468 6520 3c63 6f64 653e 5f5f 7074 s the __pt\n+000e6410: 723c 2f63 6f64 653e 2061 6e64 203c 636f r and __size\n+000e6430: 206d 656d 6265 7273 3a3c 2f70 3e0a 3c64 members:

.
stru\n+000e6480: 6374 203c 2f73 7061 6e3e 7072 6566 6978 ct prefix\n+000e6490: 5f5f 6172 7261 795f 6e61 6d65 203c 2f64 __array_name .
{
.\n+000e64d0: 2020 2020 5479 7065 202a 5f5f 7074 723b Type *__ptr;\n+000e64e0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // point\n+000e6500: 6572 2074 6f20 6172 7261 7920 6f66 2065 er to array of e\n+000e6510: 6c65 6d65 6e74 7320 696e 206d 656d 6f72 lements in memor\n+000e6520: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
.<\n+000e6530: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e6540: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+000e6560: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n+000e6570: 3b20 2020 3c73 7061 6e20 636c 6173 733d ; // num\n+000e6590: 6265 7220 6f66 2065 6c65 6d65 6e74 7320 ber of elements \n+000e65a0: 706f 696e 7465 6420 746f 203c 2f73 7061 pointed to
.
.\n+000e65d0: 2e2e 2020 2020 2020 2020 2020 203c 7370 .. // anything t\n+000e6600: 6861 7420 666f 6c6c 6f77 7320 6865 7265 hat follows here\n+000e6610: 2077 696c 6c20 6265 2069 676e 6f72 6564 will be ignored\n+000e6620: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n+000e6630: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e6640: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n+000e6650: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

T\n+000e6b90: 6865 203c 636f 6465 3e5f 5f73 697a 653c he __size<\n+000e6ba0: 2f63 6f64 653e 206d 656d 6265 7220 7368 /code> member sh\n+000e6bb0: 6f75 6c64 2062 6520 616e 203c 636f 6465 ould be an int type\n+000e6bd0: 2061 6e64 2063 616e 6e6f 7420 6265 2061 and cannot be a\n+000e6be0: 203c 636f 6465 3e73 697a 655f 743c 2f63 size_t type or oth\n+000e6c00: 6572 2069 6e74 6567 6572 2074 7970 652e er integer type.\n+000e6c10: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

.

For exam\n+000e6c20: 706c 652c 2077 6520 6465 6669 6e65 2061 ple, we define a\n+000e6c30: 204d 6170 2073 7472 7563 7475 7265 2074 Map structure t\n+000e6c40: 6861 7420 636f 6e74 6169 6e73 2061 2073 hat contains a s\n+000e6c50: 6571 7565 6e63 6520 6f66 206b 6579 2d76 equence of key-v\n+000e6c60: 616c 2070 6169 7273 3a3c 2f70 3e0a 3c64 al pairs:

.
stru\n+000e6cb0: 6374 203c 2f73 7061 6e3e 6e73 5f5f 4d61 ct ns__Ma\n+000e6cc0: 7020 3c2f 6469 763e 0a3c 6469 7620 636c p
.
{.
int __\n+000e6d20: 7369 7a65 3b20 3c73 7061 6e20 636c 6173 size; // n\n+000e6d40: 756d 6265 7220 6f66 2070 6169 7273 203c umber of pairs <\n+000e6d50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n+000e6d70: 2020 203c 7370 616e 2063 6c61 7373 3d22 struct \n+000e6d90: 3c2f 7370 616e 3e6e 735f 5f50 6169 723c ns__Pair<\n+000e6da0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{.
char *key;
.\n+000e6e10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
char \n+000e6e50: 2a76 616c 3b3c 2f64 6976 3e0a 3c64 6976 *val;
. \n+000e6e70: 2020 7d20 2a70 6169 723b 2020 2020 3c73 } *pair; // array of \n+000e6ea0: 7061 6972 733c 2f73 7061 6e3e 3c2f 6469 pairs.
};
.

Since 2.\n+000e6ef0: 372e 3136 2069 7420 6973 2061 6c73 6f20 7.16 it is also \n+000e6f00: 706f 7373 6962 6c65 2074 6f20 7573 6520 possible to use \n+000e6f10: 6120 273c 636f 6465 3e24 3c2f 636f 6465 a '$' as a special \n+000e6f30: 6d61 726b 6572 2074 6f20 616e 6e6f 7461 marker to annota\n+000e6f40: 7465 2061 2073 697a 6520 6d65 6d62 6572 te a size member\n+000e6f50: 2069 6e73 7465 6164 206f 6620 7265 7175 instead of requ\n+000e6f60: 6972 696e 6720 7468 6573 6520 6d65 6d62 iring these memb\n+000e6f70: 6572 7320 746f 2073 7461 7274 2077 6974 ers to start wit\n+000e6f80: 6820 3c63 6f64 653e 5f5f 7369 7a65 3c2f h __size:

.
struct \n+000e6fe0: 3c2f 7370 616e 3e6e 735f 5f4d 6170 203c ns__Map <\n+000e6ff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n+000e7010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
$ \n+000e7040: 696e 743c 2f73 7061 6e3e 2073 697a 653b int size;\n+000e7050: 2020 3c73 7061 6e20 636c 6173 733d 2263 // numbe\n+000e7070: 7220 6f66 2070 6169 7273 203c 2f73 7061 r of pairs
.
<\n+000e70a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e70b0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__Pair.
{
.\n+000e70f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
char \n+000e7130: 2a6b 6579 3b3c 2f64 6976 3e0a 3c64 6976 *key;
. \n+000e7150: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+000e7170: 6368 6172 3c2f 7370 616e 3e20 2a76 616c char *val\n+000e7180: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
} \n+000e71a0: 2a70 6169 723b 2020 2020 3c73 7061 6e20 *pair; \n+000e71c0: 2f2f 2061 7272 6179 206f 6620 7061 6972 // array of pair\n+000e71d0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
.<\n+000e71e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e71f0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n+000e7200: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

Deserializ\n+000e7840: 6174 696f 6e20 6973 206c 6573 7320 6566 ation is less ef\n+000e7850: 6669 6369 656e 7420 636f 6d70 6172 6564 ficient compared\n+000e7860: 2074 6f20 6120 534f 4150 2d65 6e63 6f64 to a SOAP-encod\n+000e7870: 6564 2061 7272 6179 2c20 6265 6361 7573 ed array, becaus\n+000e7880: 6520 7468 6520 7369 7a65 206f 6620 7468 e the size of th\n+000e7890: 6520 7365 7175 656e 6365 2069 7320 6e6f e sequence is no\n+000e78a0: 7420 7061 7274 206f 6620 7468 6520 534f t part of the SO\n+000e78b0: 4150 2065 6e63 6f64 696e 672e 2042 7566 AP encoding. Buf\n+000e78c0: 6665 7269 6e67 2069 7320 7573 6564 2062 fering is used b\n+000e78d0: 7920 7468 6520 6465 7365 7269 616c 697a y the deserializ\n+000e78e0: 6572 2074 6f20 636f 6c6c 6563 7420 7468 er to collect th\n+000e78f0: 6520 656c 656d 656e 7473 2069 6e20 6d65 e elements in me\n+000e7900: 6d6f 7279 2e20 5768 656e 2074 6865 2065 mory. When the e\n+000e7910: 6e64 206f 6620 7468 6520 6c69 7374 2069 nd of the list i\n+000e7920: 7320 7265 6163 6865 642c 2074 6865 2062 s reached, the b\n+000e7930: 7566 6665 7265 6420 656c 656d 656e 7473 uffered elements\n+000e7940: 2061 7265 2063 6f70 6965 6420 746f 2061 are copied to a\n+000e7950: 206e 6577 6c79 2061 6c6c 6f63 6174 6564 newly allocated\n+000e7960: 206d 616e 6167 6564 2073 7061 6365 206f managed space o\n+000e7970: 6e20 7468 6520 6865 6170 2066 6f72 2074 n the heap for t\n+000e7980: 6865 2064 796e 616d 6963 2061 7272 6179 he dynamic array\n+000e7990: 2e3c 2f70 3e0a 3c70 3e4d 756c 7469 706c .

.

Multipl\n+000e79a0: 6520 6172 7261 7973 2063 616e 2062 6520 e arrays can be \n+000e79b0: 7061 7274 206f 6620 6120 7374 7275 6374 part of a struct\n+000e79c0: 206f 7220 636c 6173 732e 2046 6f72 2065 or class. For e\n+000e79d0: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

.
struct\n+000e7a20: 203c 2f73 7061 6e3e 6e73 5f5f 436f 6e74 ns__Cont\n+000e7a30: 6163 7420 3c2f 6469 763e 0a3c 6469 7620 act
.
{.
char\n+000e7a90: 202a 6669 7273 744e 616d 653b 203c 2f64 *firstName; .
char \n+000e7ae0: 2a6c 6173 744e 616d 653b 203c 2f64 6976 *lastName; .
$ int nPh\n+000e7b30: 6f6e 6573 3b20 2020 2020 2020 2020 203c ones; <\n+000e7b40: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e7b50: 656e 7422 3e2f 2f20 6e75 6d62 6572 206f ent\">// number o\n+000e7b60: 6620 5068 6f6e 6573 3c2f 7370 616e 3e3c f Phones<\n+000e7b70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
UL\n+000e7be0: 4f4e 4736 343c 2f61 3e20 2a70 686f 6e65 ONG64 *phone\n+000e7bf0: 4e75 6d62 6572 3b20 3c73 7061 6e20 636c Number; //\n+000e7c10: 2061 7272 6179 206f 6620 7068 6f6e 6520 array of phone \n+000e7c20: 6e75 6d62 6572 7320 3c2f 7370 616e 3e3c numbers <\n+000e7c30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
$ int\n+000e7c70: 206e 456d 6169 6c73 3b20 2020 2020 2020 nEmails; \n+000e7c80: 2020 203c 7370 616e 2063 6c61 7373 3d22 // numb\n+000e7ca0: 6572 206f 6620 656d 6169 6c73 203c 2f73 er of emails
.
\n+000e7cd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+000e7cf0: 2f73 7061 6e3e 202a 2a65 6d61 696c 4164 /span> **emailAd\n+000e7d00: 6472 6573 733b 2020 3c73 7061 6e20 636c dress; //\n+000e7d20: 2061 7272 6179 206f 6620 656d 6169 6c20 array of email \n+000e7d30: 6164 6472 6573 7365 7320 3c2f 7370 616e addresses
.
};.

The\n+000e7d80: 2058 4d4c 2073 6572 6961 6c69 7a61 7469 XML serializati\n+000e7d90: 6f6e 206f 6620 616e 2065 7861 6d70 6c65 on of an example\n+000e7da0: 203c 636f 6465 3e6e 735f 5f43 6f6e 7461 ns__Conta\n+000e7db0: 6374 3c2f 636f 6465 3e20 6973 3a3c 2f70 ct is:.

<\n+000e7e00: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:Con\n+000e7e20: 7461 6374 3c2f 7370 616e 3e26 6774 3b20 tact> \n+000e7e30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e7e50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e7e60: 6f72 6474 7970 6522 3e66 6972 7374 4e61 ordtype\">firstNa\n+000e7e70: 6d65 3c2f 7370 616e 3e26 6774 3b3c 7370 me>Joe<\n+000e7ea0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/firs\n+000e7ec0: 744e 616d 653c 2f73 7061 6e3e 2667 743b tName>\n+000e7ed0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n+000e7ef0: 3c73 7061 6e20 636c 6173 733d 226b 6579 lastNa\n+000e7f10: 6d65 3c2f 7370 616e 3e26 6774 3b3c 7370 me>Smith&\n+000e7f40: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/la\n+000e7f60: 7374 4e61 6d65 3c2f 7370 616e 3e26 6774 stName>\n+000e7f70: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000e7f90: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;phone\n+000e7fb0: 4e75 6d62 6572 3c2f 7370 616e 3e26 6774 Number>\n+000e7fc0: 3b35 3535 3131 3132 3232 3226 6c74 3b2f ;5551112222</\n+000e7fd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 phoneN\n+000e7ff0: 756d 6265 723c 2f73 7061 6e3e 2667 743b umber>\n+000e8000: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n+000e8020: 3c73 7061 6e20 636c 6173 733d 226b 6579 phoneN\n+000e8040: 756d 6265 723c 2f73 7061 6e3e 2667 743b umber>\n+000e8050: 3535 3531 3233 3435 3637 266c 743b 2f3c 5551234567</<\n+000e8060: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e8070: 6f72 6474 7970 6522 3e70 686f 6e65 4e75 ordtype\">phoneNu\n+000e8080: 6d62 6572 3c2f 7370 616e 3e26 6774 3b20 mber> \n+000e8090: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e80b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e80c0: 6f72 6474 7970 6522 3e70 686f 6e65 4e75 ordtype\">phoneNu\n+000e80d0: 6d62 6572 3c2f 7370 616e 3e26 6774 3b35 mber>5\n+000e80e0: 3535 3233 3438 3930 3126 6c74 3b2f 3c73 552348901</phoneNum\n+000e8110: 6265 723c 2f73 7061 6e3e 2667 743b 203c ber> <\n+000e8120: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<emailAdd\n+000e8160: 7265 7373 3c2f 7370 616e 3e26 6774 3b3c ress><\n+000e8170: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e8180: 6f72 6422 3e4a 6f65 2e53 6d69 7468 3c2f ord\">Joe.Smith@mail\n+000e81b0: 2e63 6f6d 3c2f 7370 616e 3e26 6c74 3b2f .com</\n+000e81c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 emailA\n+000e81e0: 6464 7265 7373 3c2f 7370 616e 3e26 6774 ddress>\n+000e81f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000e8210: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;email\n+000e8230: 4164 6472 6573 733c 2f73 7061 6e3e 2667 Address&g\n+000e8240: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Joe@Smith.c\n+000e8280: 6f6d 3c2f 7370 616e 3e26 6c74 3b2f 3c73 om</emailAdd\n+000e82b0: 7265 7373 3c2f 7370 616e 3e26 6774 3b20 ress> \n+000e82c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</ns:Conta\n+000e8300: 6374 3c2f 7370 616e 3e26 6774 3b3c 2f64 ct>.

For C++, a \n+000e8340: 6265 7474 6572 2061 6c74 6572 6e61 7469 better alternati\n+000e8350: 7665 2074 6f20 6172 7261 7973 2061 7265 ve to arrays are\n+000e8360: 2063 6f6e 7461 696e 6572 732c 2077 6869 containers, whi\n+000e8370: 6368 2061 7265 2064 6573 6372 6962 6564 ch are described\n+000e8380: 206e 6578 742e 3c2f 703e 0a3c 703e f09f next.

.

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

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

.STL c\n+000e83f0: 6f6e 7461 696e 6572 733c 2f68 333e 0a3c ontainers

.<\n+000e8400: 703e 5468 6520 5354 4c20 636f 6e74 6169 p>The STL contai\n+000e8410: 6e65 7273 203c 636f 6465 3e73 7464 3a3a ners std::\n+000e8420: 6465 7175 653c 2f63 6f64 653e 2c20 3c63 deque, std::list, std:\n+000e8450: 3a73 6574 3c2f 636f 6465 3e2c 2061 6e64 :set, and\n+000e8460: 203c 636f 6465 3e73 7464 3a3a 7665 6374 std::vect\n+000e8470: 6f72 3c2f 636f 6465 3e20 6172 6520 7365 or are se\n+000e8480: 7269 616c 697a 6162 6c65 2069 6e20 584d rializable in XM\n+000e8490: 4c20 6279 2074 6865 2073 6f61 7063 7070 L by the soapcpp\n+000e84a0: 322d 6765 6e65 7261 7465 6420 7365 7269 2-generated seri\n+000e84b0: 616c 697a 6572 732e 3c2f 703e 0a3c 703e alizers.

.

\n+000e84c0: 496e 206f 7264 6572 2074 6f20 7573 6520 In order to use \n+000e84d0: 636f 6e74 6169 6e65 7273 2069 6e20 616e containers in an\n+000e84e0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+000e84f0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+000e8500: 7070 322c 2069 6d70 6f72 7420 3c65 6d3e pp2, import \n+000e8510: 3c63 6f64 653e 7374 6c64 6571 7565 2e68 stldeque.h\n+000e8520: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , stllist.\n+000e8540: 683c 2f63 6f64 653e 3c2f 656d 3e2c 203c h, <\n+000e8550: 656d 3e3c 636f 6465 3e73 746c 7365 742e em>stlset.\n+000e8560: 683c 2f63 6f64 653e 3c2f 656d 3e2c 206f h, o\n+000e8570: 7220 3c65 6d3e 3c63 6f64 653e 7374 6c76 r stlv\n+000e8580: 6563 746f 722e 683c 2f63 6f64 653e 3c2f ector.h to enable std::deque, std\n+000e85c0: 3a3a 6c69 7374 3c2f 636f 6465 3e2c 203c ::list, <\n+000e85d0: 636f 6465 3e73 7464 3a3a 7365 743c 2f63 code>std::set, and \n+000e85f0: 7374 643a 3a76 6563 746f 723c 2f63 6f64 std::vector, respectively\n+000e8610: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

#import &q\n+000e8670: 756f 743b 7374 6c76 6563 746f 722e 6826 uot;stlvector.h&\n+000e8680: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
clas\n+000e86c0: 7320 3c2f 7370 616e 3e6e 735f 5f6d 7943 s ns__myC\n+000e86d0: 6c61 7373 203c 2f64 6976 3e0a 3c64 6976 lass
.{ \n+000e86f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
. \n+000e8730: 2020 7374 643a 3a76 6563 746f 7226 6c74 std::vector<\n+000e8740: 3b69 6e74 2667 743b 2020 2020 2020 2020 ;int> \n+000e8750: 2020 6e75 6d62 6572 2031 3a31 303b 203c number 1:10; <\n+000e8760: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e8770: 656e 7422 3e2f 2f20 3120 746f 2031 3020 ent\">// 1 to 10 \n+000e8780: 6e75 6d62 6572 733c 2f73 7061 6e3e 3c2f numbers.
std::\n+000e87b0: 7665 6374 6f72 266c 743b 7374 643a 3a73 vector<std::s\n+000e87c0: 7472 696e 6726 6774 3b20 2a6e 616d 6520 tring> *name \n+000e87d0: 2020 323b 2020 2020 3c73 7061 6e20 636c 2; //\n+000e87f0: 206d 6f72 6520 7468 616e 2032 206e 616d more than 2 nam\n+000e8800: 6573 3c2f 7370 616e 3e3c 2f64 6976 3e0a es
.\n+000e8810: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

Y\n+000e8ec0: 6f75 2063 616e 2061 6c73 6f20 696d 706c ou can also impl\n+000e8ed0: 656d 656e 7420 796f 7572 206f 776e 2063 ement your own c\n+000e8ee0: 6f6e 7461 696e 6572 732e 2054 6865 2063 ontainers. The c\n+000e8ef0: 6f6e 7461 696e 6572 7320 6d75 7374 2062 ontainers must b\n+000e8f00: 6520 636c 6173 7320 7465 6d70 6c61 7465 e class template\n+000e8f10: 7320 616e 6420 7368 6f75 6c64 2064 6566 s and should def\n+000e8f20: 696e 6520 6120 666f 7277 6172 6420 6974 ine a forward it\n+000e8f30: 6572 6174 6f72 2074 7970 652c 2061 6e64 erator type, and\n+000e8f40: 2070 726f 7669 6465 2074 6865 2066 6f6c provide the fol\n+000e8f50: 6c6f 7769 6e67 206d 6574 686f 6473 3a3c lowing methods:<\n+000e8f60: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c 636f /p>.

    .
  • void clear()<\n+000e8f80: 2f63 6f64 653e 2065 6d70 7479 2074 6865 /code> empty the\n+000e8f90: 2063 6f6e 7461 696e 6572 3b3c 2f6c 693e container;
  • \n+000e8fa0: 0a3c 6c69 3e3c 636f 6465 3e69 7465 7261 .
  • itera\n+000e8fb0: 746f 7220 6265 6769 6e28 293c 2f63 6f64 tor begin() return iterat\n+000e8fd0: 6f72 2074 6f20 6265 6769 6e6e 696e 673b or to beginning;\n+000e8fe0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
  • .
  • \n+000e8ff0: 636f 6e73 745f 6974 6572 6174 6f72 2062 const_iterator b\n+000e9000: 6567 696e 2829 2063 6f6e 7374 3c2f 636f egin() const return const\n+000e9020: 2069 7465 7261 746f 7220 746f 2062 6567 iterator to beg\n+000e9030: 696e 6e69 6e67 3b3c 2f6c 693e 0a3c 6c69 inning;
  • .iterator \n+000e9050: 656e 6428 293c 2f63 6f64 653e 2072 6574 end() ret\n+000e9060: 7572 6e20 6974 6572 6174 6f72 2074 6f20 urn iterator to \n+000e9070: 656e 643b 3c2f 6c69 3e0a 3c6c 693e 3c63 end;.
  • const_iterat\n+000e9090: 6f72 2065 6e64 2829 2063 6f6e 7374 3c2f or end() const return con\n+000e90b0: 7374 2069 7465 7261 746f 7220 746f 2065 st iterator to e\n+000e90c0: 6e64 3b3c 2f6c 693e 0a3c 6c69 3e3c 636f nd;
  • .
  • size_t size()\n+000e90e0: 3c2f 636f 6465 3e20 7265 7475 726e 2073 return s\n+000e90f0: 697a 653b 3c2f 6c69 3e0a 3c6c 693e 3c63 ize;
  • .
  • iterator ins\n+000e9110: 6572 7428 6974 6572 6174 6f72 2070 6f73 ert(iterator pos\n+000e9120: 2c20 636f 6e73 745f 7265 6665 7265 6e63 , const_referenc\n+000e9130: 6520 7661 6c29 3c2f 636f 6465 3e20 696e e val) in\n+000e9140: 7365 7274 2065 6c65 6d65 6e74 2e3c 2f6c sert element..
.

The \n+000e9160: 3c63 6f64 653e 6974 6572 6174 6f72 3c2f iterator should be \n+000e9180: 6120 666f 7277 6172 6420 6974 6572 6174 a forward iterat\n+000e9190: 6f72 2077 6974 6820 6120 6465 7265 6665 or with a derefe\n+000e91a0: 7265 6e63 6520 6f70 6572 6174 6f72 2074 rence operator t\n+000e91b0: 6f20 6163 6365 7373 2074 6865 2063 6f6e o access the con\n+000e91c0: 7461 696e 6572 2773 2065 6c65 6d65 6e74 tainer's element\n+000e91d0: 732c 2069 7420 6d75 7374 2062 6520 636f s, it must be co\n+000e91e0: 6d70 6172 6162 6c65 2028 6571 7561 6c2f mparable (equal/\n+000e91f0: 756e 6571 7561 6c29 2c20 616e 6420 6265 unequal), and be\n+000e9200: 2070 7265 2d69 6e63 7265 6d65 6e74 6162 pre-incrementab\n+000e9210: 6c65 2028 3c63 6f64 653e 2b2b 6974 3c2f le (++it). The cons\n+000e9230: 7420 6974 6572 6174 6f72 2069 7320 7573 t iterator is us\n+000e9240: 6564 2062 7920 6974 7320 736f 6170 6370 ed by its soapcp\n+000e9250: 7032 2d67 656e 6572 6174 6564 2073 6572 p2-generated ser\n+000e9260: 6961 6c69 7a65 7220 746f 2073 656e 6420 ializer to send \n+000e9270: 6120 7365 7175 656e 6365 206f 6620 584d a sequence of XM\n+000e9280: 4c20 656c 656d 656e 7420 7661 6c75 6573 L element values\n+000e9290: 2e20 5468 6520 3c63 6f64 653e 696e 7365 . The inse\n+000e92a0: 7274 3c2f 636f 6465 3e20 6d65 7468 6f64 rt method\n+000e92b0: 2069 7320 7573 6564 2074 6f20 706f 7075 is used to popu\n+000e92c0: 6c61 7465 2061 2063 6f6e 7461 696e 6572 late a container\n+000e92d0: 2077 6974 6820 3c63 6f64 653e 436f 6e74 with Cont\n+000e92e0: 6169 6e65 723a 3a69 7465 7261 746f 7220 ainer::iterator \n+000e92f0: 6920 3d20 636f 6e74 6169 6e65 722e 696e i = container.in\n+000e9300: 7365 7274 2863 6f6e 7461 696e 6572 2e65 sert(container.e\n+000e9310: 6e64 2829 2c20 7661 6c29 3c2f 636f 6465 nd(), val).

.

Here i\n+000e9330: 7320 696e 2065 7861 6d70 6c65 2063 6f6e s in example con\n+000e9340: 7461 696e 6572 2074 656d 706c 6174 6520 tainer template \n+000e9350: 636c 6173 733a 3c2f 703e 0a3c 6469 7620 class:

.
// simp\n+000e93a0: 6c65 5f76 6563 746f 722e 6820 3c2f 7370 le_vector.h
.
template <clas\n+000e9410: 733c 2f73 7061 6e3e 2054 2667 743b 203c s T> <\n+000e9420: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
cl\n+000e9450: 6173 7320 3c2f 7370 616e 3e73 696d 706c ass simpl\n+000e9460: 655f 7665 6374 6f72 203c 2f64 6976 3e0a e_vector
.\n+000e9470: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{ public\n+000e94a0: 3c2f 7370 616e 3e3a 203c 2f64 6976 3e0a :
.\n+000e94b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
type\n+000e94e0: 6465 663c 2f73 7061 6e3e 2054 2020 2020 def T \n+000e94f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9500: 2020 2076 616c 7565 5f74 7970 653b 203c value_type; <\n+000e9510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
typedef\n+000e9550: 2076 616c 7565 5f74 7970 6520 2020 2020 value_type \n+000e9560: 2020 2020 2020 202a 2070 6f69 6e74 6572 * pointer\n+000e9570: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000e9590: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e95a0: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef const<\n+000e95d0: 2f73 7061 6e3e 2076 616c 7565 5f74 7970 /span> value_typ\n+000e95e0: 6520 2020 2020 202a 2063 6f6e 7374 5f70 e * const_p\n+000e95f0: 6f69 6e74 6572 3b20 3c2f 6469 763e 0a3c ointer;
.<\n+000e9600: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e9610: 3e20 2020 203c 7370 616e 2063 6c61 7373 > typed\n+000e9630: 6566 3c2f 7370 616e 3e20 7661 6c75 655f ef value_\n+000e9640: 7479 7065 2020 2020 2020 2020 2020 2020 type \n+000e9650: 2661 6d70 3b20 7265 6665 7265 6e63 653b & reference;\n+000e9660: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
typedef const value_type\n+000e96d0: 2020 2020 2020 2661 6d70 3b20 636f 6e73 & cons\n+000e96e0: 745f 7265 6665 7265 6e63 653b 203c 2f64 t_reference; .
\n+000e9720: 7479 7065 6465 663c 2f73 7061 6e3e 2070 typedef p\n+000e9730: 6f69 6e74 6572 2020 2020 2020 2020 2020 ointer \n+000e9740: 2020 2020 2020 2069 7465 7261 746f 723b iterator;\n+000e9750: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
typedef const_pointer\n+000e97a0: 2020 2020 2020 2020 2020 2063 6f6e 7374 const\n+000e97b0: 5f69 7465 7261 746f 723b 203c 2f64 6976 _iterator; .
prot\n+000e97f0: 6563 7465 643c 2f73 7061 6e3e 3a20 3c2f ected: .
itera\n+000e9820: 746f 7220 2020 2020 2020 2020 2020 2020 tor \n+000e9830: 2020 2020 2020 2020 2020 2068 6561 643b head;\n+000e9840: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
it\n+000e9860: 6572 6174 6f72 2020 2020 2020 2020 2020 erator \n+000e9870: 2020 2020 2020 2020 2020 2020 2020 7461 ta\n+000e9880: 696c 3b20 3c2f 6469 763e 0a3c 6469 7620 il;
.
\n+000e98a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n+000e98c0: 743c 2f73 7061 6e3e 2020 2020 2020 2020 t \n+000e98d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e98e0: 2020 6361 7061 6369 7479 3b20 3c2f 6469 capacity; .
pub\n+000e9920: 6c69 633c 2f73 7061 6e3e 3a20 3c2f 6469 lic: .
\n+000e9950: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9960: 2020 2020 2020 2020 2073 696d 706c 655f simple_\n+000e9970: 7665 6374 6f72 2829 2020 2020 2020 207b vector() {\n+000e9980: 2068 6561 6420 3d20 7461 696c 203d 204e head = tail = N\n+000e9990: 554c 4c3b 207d 203c 2f64 6976 3e0a 3c64 ULL; }
.\n+000e99b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e99c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e99d0: 2020 2020 7369 6d70 6c65 5f76 6563 746f simple_vecto\n+000e99e0: 7228 3c73 7061 6e20 636c 6173 733d 226b r(const simple_vect\n+000e9a10: 6f72 2661 6d70 3b20 7629 203c 2f64 6976 or& 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 207b 206f 7065 7261 746f 723d 2876 { operator=(v\n-000e9a90: 293b 207d 203c 2f64 6976 3e0a 3c64 6976 ); }
. \n-000e9ab0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9ac0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9ad0: 2020 7e73 696d 706c 655f 7665 6374 6f72 ~simple_vector\n-000e9ae0: 2829 2020 2020 2020 7b20 3c73 7061 6e20 () { if (h\n-000e9b10: 6561 6429 203c 7370 616e 2063 6c61 7373 ead) delet\n-000e9b30: 653c 2f73 7061 6e3e 5b5d 2068 6561 643b e[] head;\n-000e9b40: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
.
\n-000e9b60: 3c73 7061 6e20 636c 6173 733d 226b 6579 void \n-000e9b90: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9ba0: 2063 6c65 6172 2829 2020 2020 2020 2020 clear() \n-000e9bb0: 2020 2020 2020 207b 2074 6169 6c20 3d20 { tail = \n-000e9bc0: 6865 6164 3b20 7d20 3c2f 6469 763e 0a3c head; }
.<\n-000e9bd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e9be0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* the me\n-000e9c00: 6d62 6572 2066 756e 6374 696f 6e73 2062 mber functions b\n-000e9c10: 656c 6f77 2061 7265 2072 6571 7569 7265 elow are require\n-000e9c20: 6420 666f 7220 7365 7269 616c 697a 6174 d for serializat\n-000e9c30: 696f 6e20 6f66 2074 656d 706c 6174 6573 ion of templates\n-000e9c40: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
iterator\n-000e9c70: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9c80: 2020 2020 2020 2020 6265 6769 6e28 2920 begin() \n-000e9c90: 2020 2020 2020 2020 2020 2020 2020 7b20 { \n-000e9ca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-000e9cc0: 3c2f 7370 616e 3e20 6865 6164 3b20 7d20 head; } \n-000e9cd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
con\n-000e9cf0: 7374 5f69 7465 7261 746f 7220 2020 2020 st_iterator \n-000e9d00: 2020 2020 2020 2020 2020 2020 2062 6567 beg\n-000e9d10: 696e 2829 3c73 7061 6e20 636c 6173 733d in() const\n-000e9d30: 203c 2f73 7061 6e3e 7b20 3c73 7061 6e20 { return head; }
\n-000e9d70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
iterator \n-000e9d90: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9da0: 2020 2020 2020 2065 6e64 2829 2020 2020 end() \n-000e9db0: 2020 2020 2020 2020 2020 2020 207b 203c { <\n-000e9dc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e9dd0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-000e9de0: 2f73 7061 6e3e 2074 6169 6c3b 207d 203c /span> tail; } <\n-000e9df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
cons\n-000e9e10: 745f 6974 6572 6174 6f72 2020 2020 2020 t_iterator \n-000e9e20: 2020 2020 2020 2020 2020 2020 656e 6428 end(\n-000e9e30: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const { return t\n-000e9e80: 6169 6c3b 207d 203c 2f64 6976 3e0a 3c64 ail; }
.\n-000e9ea0: 2020 2020 3c73 7061 6e20 636c 6173 733d si\n-000e9ec0: 7a65 5f74 3c2f 7370 616e 3e20 2020 2020 ze_t \n-000e9ed0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9ee0: 2020 2020 2073 697a 6528 293c 7370 616e size() const {\n-000e9f10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-000e9f30: 6e3c 2f73 7061 6e3e 2074 6169 6c20 2d20 n tail - \n-000e9f40: 6865 6164 3b20 7d20 3c2f 6469 763e 0a3c head; }
.<\n-000e9f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e9f60: 3e20 2020 2069 7465 7261 746f 7220 2020 > iterator \n-000e9f70: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9f80: 2020 2020 2069 6e73 6572 7428 6974 6572 insert(iter\n-000e9f90: 6174 6f72 2070 6f73 2c20 636f 6e73 745f ator pos, const_\n-000e9fa0: 7265 6665 7265 6e63 6520 7661 6c29 203c reference val) <\n-000e9fb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{.
if \n-000ea010: 2821 6865 6164 2920 3c2f 6469 763e 0a3c (!head)
.<\n-000ea020: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea030: 3e20 2020 2020 2020 2068 6561 6420 3d20 > head = \n-000ea040: 7461 696c 203d 203c 7370 616e 2063 6c61 tail = new\n-000ea060: 3c2f 7370 616e 3e20 7661 6c75 655f 7479 value_ty\n-000ea070: 7065 5b63 6170 6163 6974 7920 3d20 315d pe[capacity = 1]\n-000ea080: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
\n-000ea0a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-000ea0c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (tail\n-000ea0f0: 2026 6774 3b3d 2068 6561 6420 2b20 6361 >= head + ca\n-000ea100: 7061 6369 7479 2920 3c2f 6469 763e 0a3c pacity)
.<\n-000ea110: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea120: 3e20 2020 2020 207b 3c2f 6469 763e 0a3c > {
.<\n-000ea130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea140: 3e20 2020 2020 2020 2069 7465 7261 746f > iterato\n-000ea150: 7220 6920 3d20 6865 6164 3b20 3c2f 6469 r i = head; .
ite\n-000ea180: 7261 746f 7220 6a20 3d20 3c73 7061 6e20 rator j = \n-000ea1a0: 6e65 773c 2f73 7061 6e3e 2076 616c 7565 new value\n-000ea1b0: 5f74 7970 655b 6361 7061 6369 7479 202a _type[capacity *\n-000ea1c0: 3d20 325d 3b20 3c2f 6469 763e 0a3c 6469 = 2];
. \n-000ea1e0: 2020 2020 2020 2069 7465 7261 746f 7220 iterator \n-000ea1f0: 6b20 3d20 6a3b 203c 2f64 6976 3e0a 3c64 k = j;
.\n-000ea210: 2020 2020 2020 2020 3c73 7061 6e20 636c while (\n-000ea240: 6920 266c 743b 2074 6169 6c29 203c 2f64 i < tail) .
\n-000ea270: 2a6b 2b2b 203d 202a 692b 2b3b 203c 2f64 *k++ = *i++; .
if (pos)
.<\n-000ea2d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea2e0: 3e20 2020 2020 2020 2020 2070 6f73 203d > pos =\n-000ea2f0: 206a 202b 2028 706f 7320 2d20 6865 6164 j + (pos - head\n-000ea300: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
\n-000ea320: 2020 2020 7461 696c 203d 206a 202b 2028 tail = j + (\n-000ea330: 7461 696c 202d 2068 6561 6429 3b20 3c2f tail - head); .
<\n-000ea360: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ea370: 6f72 6422 3e64 656c 6574 653c 2f73 7061 ord\">delete[] head; .
head\n-000ea3b0: 203d 206a 3b20 3c2f 6469 763e 0a3c 6469 = j;
. \n-000ea3d0: 2020 2020 207d 203c 2f64 6976 3e0a 3c64 }
.\n-000ea3f0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-000ea410: 6966 3c2f 7370 616e 3e20 2870 6f73 2026 if (pos &\n-000ea420: 616d 703b 2661 6d70 3b20 706f 7320 2667 amp;& pos &g\n-000ea430: 743b 3d20 6865 6164 2026 616d 703b 2661 t;= head &&a\n-000ea440: 6d70 3b20 706f 7320 266c 743b 2074 6169 mp; pos < tai\n-000ea450: 6c29 203c 2f64 6976 3e0a 3c64 6976 2063 l)
.
\n-000ea470: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
.
\n-000ea490: 2020 2020 6974 6572 6174 6f72 2069 203d iterator i =\n-000ea4a0: 2074 6169 6c3b 203c 2f64 6976 3e0a 3c64 tail;
.\n-000ea4c0: 2020 2020 2020 2020 6974 6572 6174 6f72 iterator\n-000ea4d0: 206a 203d 2069 202d 2031 3b20 3c2f 6469 j = i - 1; .
while (j != pos) <\n-000ea530: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n-000ea550: 2020 202a 692d 2d20 3d20 2a6a 2d2d 3b20 *i-- = *j--; \n-000ea560: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000ea580: 202a 706f 7320 3d20 7661 6c3b 203c 2f64 *pos = val; .
} .
else
.
\n-000ea610: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
.
\n-000ea630: 2020 2020 706f 7320 3d20 7461 696c 3b20 pos = tail; \n-000ea640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000ea660: 202a 7461 696c 2b2b 203d 2076 616c 3b20 *tail++ = val; \n-000ea670: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}\n-000ea690: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000ea6b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-000ea6d0: 3c2f 7370 616e 3e20 706f 733b 203c 2f64 pos; .
} .
simple_\n-000ea720: 7665 6374 6f72 2661 6d70 3b20 6f70 6572 vector& oper\n-000ea730: 6174 6f72 3d28 3c73 7061 6e20 636c 6173 ator=(cons\n-000ea750: 743c 2f73 7061 6e3e 2073 696d 706c 655f t simple_\n-000ea760: 7665 6374 6f72 2661 6d70 3b20 7629 203c vector& v) <\n-000ea770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{.
head\n-000ea7b0: 203d 2074 6169 6c20 3d20 4e55 4c4c 3b20 = tail = NULL; \n-000ea7c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
c\n-000ea7e0: 6170 6163 6974 7920 3d20 762e 6361 7061 apacity = v.capa\n-000ea7f0: 6369 7479 3b20 3c2f 6469 763e 0a3c 6469 city;
. \n-000ea810: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n-000ea830: 663c 2f73 7061 6e3e 2028 762e 6865 6164 f (v.head\n-000ea840: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
.
\n-000ea860: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
.
\n-000ea880: 2020 2068 6561 6420 3d20 7461 696c 203d head = tail =\n-000ea890: 203c 7370 616e 2063 6c61 7373 3d22 6b65 new value_type[cap\n-000ea8c0: 6163 6974 795d 3b20 3c2f 6469 763e 0a3c acity];
.<\n-000ea8d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea8e0: 3e20 2020 2020 2020 2069 7465 7261 746f > iterato\n-000ea8f0: 7220 6920 3d20 762e 6865 6164 3b20 3c2f r i = v.head; .
<\n-000ea920: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ea930: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (i != v.ta\n-000ea950: 696c 2920 3c2f 6469 763e 0a3c 6469 7620 il)
.
\n-000ea970: 2020 2020 2020 202a 7461 696c 2b2b 203d *tail++ =\n-000ea980: 202a 692b 2b3b 203c 2f64 6976 3e0a 3c64 *i++;
.\n-000ea9a0: 2020 2020 2020 7d20 3c2f 6469 763e 0a3c }
.<\n-000ea9b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea9c0: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return *\n-000ea9f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 this;
.
\n-000eaa30: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
.
};.

To\n-000eaa70: 2065 6e61 626c 6520 7468 6520 636f 6e74 enable the cont\n-000eaa80: 6169 6e65 722c 2077 6520 6164 6420 7468 ainer, we add th\n-000eaa90: 6520 666f 6c6c 6f77 696e 6720 7477 6f20 e following two \n-000eaaa0: 6c69 6e65 7320 746f 2074 6865 2069 6e74 lines to the int\n-000eaab0: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n-000eaac0: 6c65 2066 6f72 2073 6f61 7063 7070 323a le for soapcpp2:\n-000eaad0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
#include\n-000eab20: 2026 7175 6f74 3b73 696d 706c 6556 6563 "simpleVec\n-000eab30: 746f 722e 6826 7175 6f74 3b3c 2f73 7061 tor.h"
.
template <clas\n-000eaba0: 733c 2f73 7061 6e3e 2054 2667 743b 203c s T> <\n-000eabb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000eabc0: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class simpleVector;<\n-000eabe0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n-000eac00: 5468 6520 636f 6e74 6169 6e65 7220 636c The container cl\n-000eac10: 6173 7320 6974 7365 6c66 2073 686f 756c ass itself shoul\n-000eac20: 6420 6e6f 7420 6265 2064 6566 696e 6564 d not be defined\n-000eac30: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac\n-000eac40: 6520 6865 6164 6572 2066 696c 652c 206f e header file, o\n-000eac50: 6e6c 7920 7468 6520 7465 6d70 6c61 7465 nly the template\n-000eac60: 2064 6563 6c61 7261 7469 6f6e 2073 7566 declaration suf\n-000eac70: 6669 6365 7320 666f 7220 736f 6170 6370 fices for soapcp\n-000eac80: 7032 2074 6f20 6765 6e65 7261 7465 2073 p2 to generate s\n-000eac90: 6572 6961 6c69 7a65 7273 2e20 5265 6361 erializers. Reca\n-000eaca0: 6c6c 2074 6861 7420 7468 6520 3c63 6f64 ll that the #include directives are\n-000eacd0: 206e 6f74 2065 7865 6375 7465 6420 6279 not executed by\n-000eace0: 2073 6f61 7063 7070 3220 6275 7420 7369 soapcpp2 but si\n-000eacf0: 6d70 6c79 2070 6173 7365 6420 6f6e 2074 mply passed on t\n-000ead00: 6f20 7468 6520 6765 6e65 7261 7465 6420 o the generated \n-000ead10: 736f 7572 6365 2063 6f64 652e 2054 6869 source code. Thi\n-000ead20: 7320 696e 636c 7564 6520 7370 6563 6966 s include specif\n-000ead30: 6965 7320 696e 2074 6865 2067 656e 6572 ies in the gener\n-000ead40: 6174 6564 2073 6f75 7263 6520 636f 6465 ated source code\n-000ead50: 2077 6865 7265 2074 6865 2063 6f6e 7461 where the conta\n-000ead60: 696e 6572 2069 7320 6163 7475 616c 6c79 iner is actually\n-000ead70: 2064 6566 696e 6564 2e3c 2f70 3e0a 3c70 defined.

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

.Polymorphi\n-000eadf0: 6320 6479 6e61 6d69 6320 6172 7261 7973 c dynamic arrays\n-000eae00: 2061 6e64 206c 6973 7473 3c2f 6833 3e0a and lists

.\n-000eae10: 3c70 3e50 6f6c 796d 6f72 7068 6963 2061

Polymorphic a\n-000eae20: 7272 6179 732c 2074 6861 7420 6973 2c20 rrays, that is, \n-000eae30: 6172 7261 7973 206f 6620 7661 6c75 6573 arrays of values\n-000eae40: 206f 6620 616e 7920 7479 7065 2c20 6361 of any type, ca\n-000eae50: 6e20 6265 2073 6572 6961 6c69 7a65 6420 n be serialized \n-000eae60: 696e 2058 4d4c 2077 6865 6e20 6465 636c in XML when decl\n-000eae70: 6172 6564 2061 7320 616e 2061 7272 6179 ared as an array\n-000eae80: 206f 6620 706f 696e 7465 7273 2074 6f20 of pointers to \n-000eae90: 6120 6261 7365 2063 6c61 7373 2e20 466f a base class. Fo\n-000eaea0: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n-000eaeb0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000eaec0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
cla\n-000eaef0: 7373 203c 2f73 7061 6e3e 6e73 5f5f 4f62 ss ns__Ob\n-000eaf00: 6a65 6374 203c 2f64 6976 3e0a 3c64 6976 ject
.{ \n-000eaf20: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
. \n-000eaf60: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // m\n-000eaf80: 656d 6265 7273 206f 6620 6e73 5f5f 4f62 embers of ns__Ob\n-000eaf90: 6a65 6374 3c2f 7370 616e 3e3c 2f64 6976 ject.
};
.\n-000eafd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 class ns__Data : public ns__Object .
{ pu\n-000eb060: 626c 6963 3c2f 7370 616e 3e3a 203c 2f64 blic: .
... // members o\n-000eb0b0: 6620 6e73 5f5f 4461 7461 3c2f 7370 616e f ns__Data
.
}; .
clas\n-000eb110: 7320 3c2f 7370 616e 3e41 7272 6179 4f66 s ArrayOf\n-000eb120: 4f62 6a65 6374 203c 2f64 6976 3e0a 3c64 Object
.\n-000eb140: 7b20 3c73 7061 6e20 636c 6173 733d 226b { public:
.\n-000eb180: 2020 2020 6e73 5f5f 4f62 6a65 6374 202a ns__Object *\n-000eb190: 2a5f 5f70 7472 3b20 3c73 7061 6e20 636c *__ptr; //\n-000eb1b0: 2070 6f69 6e74 6572 2074 6f20 6172 7261 pointer to arra\n-000eb1c0: 7920 6f66 2070 6f69 6e74 6572 7320 746f y of pointers to\n-000eb1d0: 2062 6173 6520 6f72 2064 6572 6976 6564 base or derived\n-000eb1e0: 206f 626a 6563 7473 203c 2f73 7061 6e3e objects \n-000eb1f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int __size; \n-000eb240: 2020 3c73 7061 6e20 636c 6173 733d 2263 // size \n-000eb260: 6f66 2074 6865 2061 7272 6179 3c2f 7370 of the array
.
}; <\n-000eb290: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
cl\n-000eb2c0: 6173 7320 3c2f 7370 616e 3e6e 735f 5f4f ass ns__O\n-000eb2d0: 626a 6563 7473 203c 2f64 6976 3e0a 3c64 bjects
.\n-000eb2f0: 7b20 3c73 7061 6e20 636c 6173 733d 226b { public:
.\n-000eb330: 2020 2020 7374 643a 3a76 6563 746f 7226 std::vector&\n-000eb340: 6c74 3b6e 735f 5f4f 626a 6563 7426 6774 lt;ns__Object>\n-000eb350: 3b20 6f62 6a65 6374 733b 203c 7370 616e ; objects; // vector of ba\n-000eb380: 7365 206f 7220 6465 7269 7665 6420 6f62 se or derived ob\n-000eb390: 6a65 6374 7320 3c2f 7370 616e 3e3c 2f64 jects
.
};
.<\n-000eb3c0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The poi\n-000eb3e0: 6e74 6572 7320 696e 2074 6865 2061 7272 nters in the arr\n-000eb3f0: 6179 2063 616e 2070 6f69 6e74 2074 6f20 ay can point to \n-000eb400: 7468 6520 3c63 6f64 653e 6e73 5f5f 4f62 the ns__Ob\n-000eb410: 6a65 6374 3c2f 636f 6465 3e20 6261 7365 ject base\n-000eb420: 2069 6e73 7461 6e63 6573 206f 7220 3c63 instances or ns__Data derived inst\n-000eb450: 616e 6365 732c 2077 6869 6368 2077 696c ances, which wil\n-000eb460: 6c20 6265 2073 6572 6961 6c69 7a65 6420 l be serialized \n-000eb470: 6163 636f 7264 696e 676c 7920 696e 2058 accordingly in X\n-000eb480: 4d4c 2e20 4465 7269 7665 6420 696e 7374 ML. Derived inst\n-000eb490: 616e 6365 7320 6172 6520 696e 6469 6361 ances are indica\n-000eb4a0: 7465 6420 6279 203c 656d 3e3c 636f 6465 ted by xsi:type\n-000eb4c0: 3c2f 656d 3e20 6174 7472 6962 7574 6520 attribute \n-000eb4d0: 696e 2058 4d4c 2077 6974 6820 7468 6520 in XML with the \n-000eb4e0: 7175 616c 6966 6965 6420 6e61 6d65 206f qualified name o\n-000eb4f0: 6620 7468 6520 636c 6173 732c 2074 6f20 f the class, to \n-000eb500: 6469 7374 696e 6775 6973 6820 6465 7269 distinguish deri\n-000eb510: 7665 6420 696e 7374 616e 6365 7320 6672 ved instances fr\n-000eb520: 6f6d 2074 6865 2062 6173 6520 696e 7374 om the base inst\n-000eb530: 616e 6365 732e 2057 6974 686f 7574 2074 ances. Without t\n-000eb540: 6869 7320 6174 7472 6962 7574 6520 7468 his attribute th\n-000eb550: 6520 6465 7365 7269 616c 697a 6572 2077 e deserializer w\n-000eb560: 696c 6c20 6e6f 7420 696e 7374 616e 7469 ill not instanti\n-000eb570: 6174 6520 7468 6520 6465 7269 7665 6420 ate the derived \n-000eb580: 696e 7374 616e 6365 2062 7574 2061 2062 instance but a b\n-000eb590: 6173 6520 696e 7374 616e 6365 2073 696e ase instance sin\n-000eb5a0: 6365 2074 6865 7265 2069 7320 6e6f 2069 ce there is no i\n-000eb5b0: 6465 6e74 6966 7969 6e67 2069 6e66 6f72 dentifying infor\n-000eb5c0: 6d61 7469 6f6e 2074 6f20 6469 7374 696e mation to distin\n-000eb5d0: 6775 6973 6820 7468 6520 584d 4c20 666f guish the XML fo\n-000eb5e0: 726d 7320 6578 6365 7074 2066 6f72 2074 rms except for t\n-000eb5f0: 6865 203c 656d 3e3c 636f 6465 3e78 7369 he xsi\n-000eb600: 3a74 7970 653c 2f63 6f64 653e 3c2f 656d :type attribute.

\n-000eb620: 0a3c 703e 5369 6e63 6520 7765 2063 616e .

Since we can\n-000eb630: 6e6f 7420 7573 6520 6479 6e61 6d69 6320 not use dynamic \n-000eb640: 6269 6e64 696e 6720 746f 2073 7570 706f binding to suppo\n-000eb650: 7274 2070 6f6c 796d 6f72 7068 6973 6d20 rt polymorphism \n-000eb660: 696e 2043 2c20 616e 6f74 6865 7220 6d65 in C, another me\n-000eb670: 6368 616e 6973 6d20 7765 2063 616e 2075 chanism we can u\n-000eb680: 7365 2069 7320 766f 6964 2070 6f69 6e74 se is void point\n-000eb690: 6572 7320 2e20 4865 7265 2069 7320 616e ers . Here is an\n-000eb6a0: 2065 7861 6d70 6c65 206f 6620 6120 706f example of a po\n-000eb6b0: 6c79 6d6f 7270 6869 6320 534f 4150 2d65 lymorphic SOAP-e\n-000eb6c0: 6e63 6f64 6564 2061 7272 6179 203c 636f ncoded array ArrayOfObject\n-000eb6e0: 3c2f 636f 6465 3e20 616e 6420 6120 6e6f and a no\n-000eb6f0: 6e2d 534f 4150 2064 796e 616d 6963 2061 n-SOAP dynamic a\n-000eb700: 7272 6179 203c 636f 6465 3e6e 735f 5f4f rray ns__O\n-000eb710: 626a 6563 7473 3c2f 636f 6465 3e20 7468 bjects th\n-000eb720: 6174 2068 6f6c 6420 7661 6c75 6573 206f at hold values o\n-000eb730: 6620 616e 7920 7365 7269 616c 697a 6162 f any serializab\n-000eb740: 6c65 2074 7970 653a 3c2f 703e 0a3c 6469 le type:

.
struc\n-000eb790: 7420 3c2f 7370 616e 3e5f 5f77 7261 7070 t __wrapp\n-000eb7a0: 6572 203c 2f64 6976 3e0a 3c64 6976 2063 er
.
{.
int _\n-000eb800: 5f74 7970 653b 2020 203c 7370 616e 2063 _type; /\n-000eb820: 2f20 6964 656e 7469 6679 2074 6865 2074 / identify the t\n-000eb830: 7970 6520 6265 6c6f 7720 6279 2053 4f41 ype below by SOA\n-000eb840: 505f 5459 5045 5f54 203c 2f73 7061 6e3e P_TYPE_T \n-000eb850: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
void *__item; // pointer to \n-000eb8c0: 6461 7461 206f 6620 7479 7065 2054 203c data of type T <\n-000eb8d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n-000eb8f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
struct A\n-000eb930: 7272 6179 4f66 4f62 6a65 6374 203c 2f64 rrayOfObject .
{
.\n-000eb970: 2020 2020 3c73 7061 6e20 636c 6173 733d struct\n-000eb990: 203c 2f73 7061 6e3e 5f5f 7772 6170 7065 __wrappe\n-000eb9a0: 7220 2a5f 5f70 7472 3b20 3c73 7061 6e20 r *__ptr; \n-000eb9c0: 2f2f 2070 6f69 6e74 6572 2074 6f20 6172 // pointer to ar\n-000eb9d0: 7261 793c 2f73 7061 6e3e 3c2f 6469 763e ray
\n-000eb9e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __si\n-000eba20: 7a65 3b20 2020 2020 2020 2020 2020 2020 ze; \n-000eba30: 203c 7370 616e 2063 6c61 7373 3d22 636f // size o\n-000eba50: 6620 7468 6520 6172 7261 793c 2f73 7061 f the array
.
}; .
str\n-000ebab0: 7563 7420 3c2f 7370 616e 3e6e 735f 5f4f uct ns__O\n-000ebac0: 626a 6563 7473 203c 2f64 6976 3e0a 3c64 bjects
.\n-000ebae0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
int __size; \n-000ebb30: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-000ebb50: 2f2f 2073 697a 6520 6f66 2074 6865 2061 // size of the a\n-000ebb60: 7272 6179 3c2f 7370 616e 3e3c 2f64 6976 rray.
st\n-000ebba0: 7275 6374 203c 2f73 7061 6e3e 5f5f 7772 ruct __wr\n-000ebbb0: 6170 7065 7220 2a6f 626a 6563 7473 3b20 apper *objects; \n-000ebbc0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // pointer\n-000ebbe0: 2074 6f20 6172 7261 793c 2f73 7061 6e3e to array\n-000ebbf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};.

This\n-000ebc30: 2065 7861 6d70 6c65 2075 7365 7320 616e example uses an\n-000ebc40: 2022 696e 7669 7369 626c 6522 2074 7970 \"invisible\" typ\n-000ebc50: 6520 3c63 6f64 653e 5f5f 7772 6170 7065 e __wrappe\n-000ebc60: 723c 2f63 6f64 653e 2061 6e64 206d 656d r and mem\n-000ebc70: 6265 7220 3c63 6f64 653e 5f5f 6172 7261 ber __arra\n-000ebc80: 793c 2f63 6f64 653e 2c20 7768 6963 6820 y, which \n-000ebc90: 7374 6172 7420 7769 7468 2061 2064 6f75 start with a dou\n-000ebca0: 626c 6520 756e 6465 7273 636f 7265 2e20 ble underscore. \n-000ebcb0: 5468 6573 6520 6e61 6d65 7320 6172 6520 These names are \n-000ebcc0: 6e65 7665 7220 7669 7369 626c 6520 696e never visible in\n-000ebcd0: 2073 6572 6961 6c69 7a65 6420 584d 4c2e serialized XML.\n-000ebce0: 2054 6865 203c 636f 6465 3e5f 5f74 7970 The __typ\n-000ebcf0: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member \n-000ebd00: 6f66 203c 636f 6465 3e5f 5f77 7261 7070 of __wrapp\n-000ebd10: 6572 3c2f 636f 6465 3e20 6973 2061 203c er is a <\n-000ebd20: 636f 6465 3e53 4f41 505f 5459 5045 5f54 code>SOAP_TYPE_T\n-000ebd30: 3c2f 636f 6465 3e20 7661 6c75 6520 7468 value th\n-000ebd40: 6174 2069 6465 6e74 6966 6965 7320 7468 at identifies th\n-000ebd50: 6520 7479 7065 203c 636f 6465 3e54 3c2f e type T that __item p\n-000ebd80: 6f69 6e74 7320 746f 2c20 7365 6520 5365 oints to, see Se\n-000ebd90: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Void \n-000ebdc0: 706f 696e 7465 7220 7365 7269 616c 697a pointer serializ\n-000ebdd0: 6174 696f 6e3c 2f61 3e2e 3c2f 703e 0a3c ation.

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

.

.\n-000ebe40: 486f 7720 746f 2063 6861 6e67 6520 7468 How to change th\n-000ebe50: 6520 7461 6720 6e61 6d65 7320 6f66 2061 e tag names of a\n-000ebe60: 7272 6179 2069 7465 6d20 656c 656d 656e rray item elemen\n-000ebe70: 7473 3c2f 6833 3e0a 3c70 3e54 6865 2064 ts

.

The d\n-000ebe80: 6566 6175 6c74 2058 4d4c 2065 6c65 6d65 efault XML eleme\n-000ebe90: 6e74 2074 6167 206e 616d 6520 666f 7220 nt tag name for \n-000ebea0: 6172 7261 7920 656c 656d 656e 7473 2069 array elements i\n-000ebeb0: 7320 3c65 6d3e 3c63 6f64 653e 6974 656d s item\n-000ebec0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 7768 , wh\n-000ebed0: 6963 6820 6361 6e20 6265 2063 6861 6e67 ich can be chang\n-000ebee0: 6564 2e20 5468 6520 3c63 6f64 653e 5f5f ed. The __\n-000ebef0: 7074 723c 2f63 6f64 653e 206d 656d 6265 ptr membe\n-000ebf00: 7220 696e 2061 2073 7472 7563 7420 6f72 r in a struct or\n-000ebf10: 2063 6c61 7373 206f 6620 6120 6479 6e61 class of a dyna\n-000ebf20: 6d69 6320 6172 7261 7920 6d61 7920 6861 mic array may ha\n-000ebf30: 7665 2061 6e20 6f70 7469 6f6e 616c 2073 ve an optional s\n-000ebf40: 7566 6669 7820 7061 7274 2074 6861 7420 uffix part that \n-000ebf50: 7370 6563 6966 6965 7320 7468 6520 6e61 specifies the na\n-000ebf60: 6d65 206f 6620 7468 6520 656c 656d 656e me of the elemen\n-000ebf70: 7420 7461 6720 696e 2058 4d4c 2e20 5468 t tag in XML. Th\n-000ebf80: 6174 2069 732c 2074 6865 2073 7566 6669 at is, the suffi\n-000ebf90: 7820 6973 2070 6172 7420 6f66 2074 6865 x is part of the\n-000ebfa0: 203c 636f 6465 3e5f 5f70 7472 3c2f 636f __ptr member name:\n-000ebfc0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
Typ\n-000ebff0: 6520 2a5f 5f70 7472 6172 7261 795f 656c e *__ptrarray_el\n-000ec000: 745f 6e61 6d65 3c2f 6469 763e 0a3c 2f64 t_name
.

Consider \n-000ec030: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

\n-000ec040: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n-000ec080: 7472 7563 7420 3c2f 7370 616e 3e41 7272 truct Arr\n-000ec090: 6179 4f66 7374 7269 6e67 203c 2f64 6976 ayOfstring .
{
. \n-000ec0d0: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n-000ec0f0: 3c2f 7370 616e 3e2a 202a 5f5f 7074 7273 * *__ptrs\n-000ec100: 7472 696e 673b 3c2f 6469 763e 0a3c 6469 tring;
. \n-000ec120: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-000ec140: 3c2f 7370 616e 3e20 5f5f 7369 7a65 3b3c __size;<\n-000ec150: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n-000ec170: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The a\n-000ec190: 7272 6179 2069 7320 7365 7269 616c 697a rray is serializ\n-000ec1a0: 6564 2061 733a 3c2f 703e 0a3c 6469 7620 ed as:

.
<SOAP-ENC:Arra\n-000ec210: 793c 2f73 7061 6e3e 203c 7370 616e 2063 y S\n-000ec230: 4f41 502d 454e 433a 6172 7261 7954 7970 OAP-ENC:arrayTyp\n-000ec240: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:s\n-000ec270: 7472 696e 675b 325d 2671 756f 743b 3c2f tring[2]">
\n-000ec290: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<string\n-000ec2d0: 2667 743b 3c73 7061 6e20 636c 6173 733d >Hello<\n-000ec2f0: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></string>
.\n-000ec340: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000ec360: 7374 7269 6e67 3c2f 7370 616e 3e26 6774 string>\n-000ec370: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;World</string&\n-000ec3c0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
<\n-000ec3e0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/SOAP\n-000ec400: 2d45 4e43 3a41 7272 6179 3c2f 7370 616e -ENC:Array>
.

SOA\n-000ec440: 5020 312e 312f 312e 3220 646f 6573 206e P 1.1/1.2 does n\n-000ec450: 6f74 206d 616e 6461 7465 2061 2073 7065 ot mandate a spe\n-000ec460: 6369 6669 6320 7461 6720 6e61 6d65 2066 cific tag name f\n-000ec470: 6f72 2053 4f41 502d 656e 636f 6465 6420 or SOAP-encoded \n-000ec480: 6172 7261 7920 656c 656d 656e 7473 2061 array elements a\n-000ec490: 6e64 2074 6865 2073 6f61 7063 7070 322d nd the soapcpp2-\n-000ec4a0: 6765 6e65 7261 7465 6420 7365 7269 616c generated serial\n-000ec4b0: 697a 6572 7320 7769 6c6c 2069 676e 6f72 izers will ignor\n-000ec4c0: 6520 7468 6520 6e61 6d65 2075 7365 6420 e the name used \n-000ec4d0: 746f 2069 7465 6d69 7a65 2053 4f41 502d to itemize SOAP-\n-000ec4e0: 656e 636f 6465 6420 6172 7261 7920 7661 encoded array va\n-000ec4f0: 6c75 6573 2e3c 2f70 3e0a 3c70 3ef0 9f94 lues.

.

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

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

.bas\n-000ec560: 6536 3442 696e 6172 7920 7365 7269 616c e64Binary serial\n-000ec570: 697a 6174 696f 6e3c 2f68 323e 0a3c 703e ization

.

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

.\n-000ec640: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st\n-000ec680: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct xsd__base64Bi\n-000ec6d0: 6e61 7279 3c2f 613e 203c 2f64 6976 3e0a nary
.\n-000ec6e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
\n-000ec710: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n-000ec730: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char \n-000ec760: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *__ptr<\n-000ec7c0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
. \n-000ec7e0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-000ec800: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> \n-000ec860: 5f5f 7369 7a65 3c2f 613e 3b20 3c2f 6469 __size; .
};
.

The adva\n-000ec8b0: 6e74 6167 6520 6f66 2074 6869 7320 7374 ntage of this st\n-000ec8c0: 7275 6374 206f 7220 636c 6173 7320 6973 ruct or class is\n-000ec8d0: 2074 6865 2061 6269 6c69 7479 2074 6f20 the ability to \n-000ec8e0: 7365 7269 616c 697a 6572 2072 6177 2062 serializer raw b\n-000ec8f0: 696e 6172 7920 6461 7461 2066 726f 6d20 inary data from \n-000ec900: 6d65 6d6f 7279 2c20 7369 6e63 6520 7468 memory, since th\n-000ec910: 6520 736f 6170 6370 7032 2d67 656e 6572 e soapcpp2-gener\n-000ec920: 6174 6564 2073 6572 6961 6c69 7a65 7220 ated serializer \n-000ec930: 636f 6e76 6572 7473 2074 6865 2062 696e converts the bin\n-000ec940: 6172 7920 6461 7461 2074 6f2f 6672 6f6d ary data to/from\n-000ec950: 2062 6173 6536 3420 696e 2058 4d4c 2e3c base64 in XML.<\n-000ec960: 2f70 3e0a 3c70 3e54 6f20 696e 7472 6f64 /p>.

To introd\n-000ec970: 7563 6520 6120 6e65 7720 584d 4c20 7363 uce a new XML sc\n-000ec980: 6865 6d61 2074 7970 6520 6465 7269 7665 hema type derive\n-000ec990: 6420 6672 6f6d 203c 656d 3e3c 636f 6465 d from base64Binary use th\n-000ec9c0: 6520 7361 6d65 2073 7472 7563 7420 6f72 e same struct or\n-000ec9d0: 2063 6c61 7373 2073 7472 7563 7475 7265 class structure\n-000ec9e0: 2c20 6275 7420 7769 7468 2061 6e6f 7468 , but with anoth\n-000ec9f0: 6572 206e 616d 652e 2046 6f72 2065 7861 er name. For exa\n-000eca00: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

.
\n-000eca20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-000eca50: 2f73 7061 6e3e 6e73 5f5f 6269 6e61 7279 /span>ns__binary\n-000eca60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-000eca80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
unsigned\n-000ecac0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-000ecae0: 2f73 7061 6e3e 202a 5f5f 7074 723b 203c /span> *__ptr; <\n-000ecaf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n-000ecb30: 205f 5f73 697a 653b 203c 2f64 6976 3e0a __size;
.\n-000ecb40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

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

.

.hexBinary ser\n-000ece40: 6961 6c69 7a61 7469 6f6e 3c2f 6832 3e0a ialization

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

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

.
unsigned<\n-000ed000: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *__ptr; <\n-000ed090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n-000ed0d0: 203c 6120 636c 6173 733d 2263 6f64 6522 __size;
.
};.

T\n-000ed170: 6865 2061 6476 616e 7461 6765 206f 6620 he advantage of \n-000ed180: 7468 6973 2073 7472 7563 7420 6f72 2063 this struct or c\n-000ed190: 6c61 7373 2069 7320 7468 6520 6162 696c lass is the abil\n-000ed1a0: 6974 7920 746f 2073 6572 6961 6c69 7a65 ity to serialize\n-000ed1b0: 7220 7261 7720 6269 6e61 7279 2064 6174 r raw binary dat\n-000ed1c0: 6120 6672 6f6d 206d 656d 6f72 792c 2073 a from memory, s\n-000ed1d0: 696e 6365 2074 6865 2073 6f61 7063 7070 ince the soapcpp\n-000ed1e0: 322d 6765 6e65 7261 7465 6420 7365 7269 2-generated seri\n-000ed1f0: 616c 697a 6572 2063 6f6e 7665 7274 7320 alizer converts \n-000ed200: 7468 6520 6269 6e61 7279 2064 6174 6120 the binary data \n-000ed210: 746f 2f66 726f 6d20 6865 7861 6465 6369 to/from hexadeci\n-000ed220: 6d61 6c20 696e 2058 4d4c 2e3c 2f70 3e0a mal in XML.

.\n-000ed230: 3c70 3e49 6620 6120 6269 6e61 7279 2074

If a binary t\n-000ed240: 7970 6520 7375 6368 2061 7320 3c63 6f64 ype such as \n-000ed2c0: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n-000ed2d0: 793c 2f61 3e3c 2f63 6f64 653e 2069 7320 y is \n-000ed2e0: 616c 7265 6164 7920 6465 6669 6e65 642c already defined,\n-000ed2f0: 2074 6865 6e20 7765 2063 616e 2073 696d then we can sim\n-000ed300: 706c 7920 7573 6520 6120 3c63 6f64 653e ply use a \n-000ed310: 7479 7065 6465 663c 2f63 6f64 653e 2074 typedef t\n-000ed320: 6f20 696e 7472 6f64 7563 6520 7468 6520 o introduce the \n-000ed330: 6865 7820 7661 7269 616e 743a 3c2f 703e hex variant:

\n-000ed340: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
c\n-000ed380: 6c61 7373 203c 2f73 7061 6e3e 3c61 2063 lass xsd__base64Bi\n-000ed3d0: 6e61 7279 3c2f 613e 3c2f 6469 763e 0a3c nary
.<\n-000ed3e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ed3f0: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n-000ed410: 2f73 7061 6e3e 3a20 3c2f 6469 763e 0a3c /span>:
.<\n-000ed420: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ed430: 3e20 2020 203c 7370 616e 2063 6c61 7373 > u\n-000ed450: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned <\n-000ed460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ed470: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *_\n-000ed4e0: 5f70 7472 3c2f 613e 3b20 3c2f 6469 763e _ptr;
\n-000ed4f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __size;\n-000ed590: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
}; .
type\n-000ed5e0: 6465 663c 2f73 7061 6e3e 203c 6120 636c def xsd__base64Bin\n-000ed630: 6172 793c 2f61 3e20 3c61 2063 6c61 7373 ary xsd_\n-000ed670: 5f68 6578 4269 6e61 7279 3c2f 613e 3b20 _hexBinary; \n-000ed680: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // seriali\n-000ed6a0: 7a65 7320 696e 746f 2068 6578 2063 6f6e zes into hex con\n-000ed6b0: 7465 6e74 3c2f 7370 616e 3e3c 2f64 6976 tent.

This\n-000ed6e0: 206c 6574 7320 736f 6170 6370 7032 2067 lets soapcpp2 g\n-000ed6f0: 656e 6572 6174 6520 3c65 6d3e 3c63 6f64 enerate xsd:base64Bina\n-000ed710: 7279 3c2f 636f 6465 3e3c 2f65 6d3e 2061 ry a\n-000ed720: 6e64 203c 656d 3e3c 636f 6465 3e78 7364 nd xsd\n-000ed730: 3a68 6578 4269 6e61 7279 3c2f 636f 6465 :hexBinary serialize\n-000ed750: 7273 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 rs.

.

.... \n-000ed760: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n-000ed770: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n-000ed780: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

..SOAP RPC e\n-000ed7c0: 6e63 6f64 6564 2076 6572 7375 7320 646f ncoded versus do\n-000ed7d0: 6375 6d65 6e74 2f6c 6974 6572 616c 2073 cument/literal s\n-000ed7e0: 7479 6c65 3c2f 6832 3e0a 3c70 3e53 4f41 tyle

.

SOA\n-000ed7f0: 5020 6861 7320 7365 7665 7261 6c20 7374 P has several st\n-000ed800: 796c 6573 3a3c 2f70 3e0a 3c75 6c3e 0a3c yles:

.
    .<\n-000ed810: 6c69 3e53 4f41 5020 5250 4320 656e 636f li>SOAP RPC enco\n-000ed820: 6469 6e67 2075 7365 7320 584d 4c20 7468 ding uses XML th\n-000ed830: 6174 2069 7320 7265 7374 7269 6374 6564 at is restricted\n-000ed840: 2074 6f20 534f 4150 2073 7472 7563 7475 to SOAP structu\n-000ed850: 7265 7320 746f 2065 6e73 7572 6520 7072 res to ensure pr\n-000ed860: 6f67 7261 6d6d 696e 672d 6c61 6e67 7561 ogramming-langua\n-000ed870: 6765 2069 6e74 6572 6f70 6572 6162 696c ge interoperabil\n-000ed880: 6974 792e 204e 6f74 2061 6c6c 6f77 6564 ity. Not allowed\n-000ed890: 2061 7265 2076 616c 7565 7320 7365 7269 are values seri\n-000ed8a0: 616c 697a 6564 2061 7320 584d 4c20 6174 alized as XML at\n-000ed8b0: 7472 6962 7574 6573 2c20 6172 7261 7973 tributes, arrays\n-000ed8c0: 2073 686f 756c 6420 6265 2073 6572 6961 should be seria\n-000ed8d0: 6c69 7a65 6420 6173 2053 4f41 502d 656e lized as SOAP-en\n-000ed8e0: 636f 6465 6420 6172 7261 7973 2069 6e73 coded arrays ins\n-000ed8f0: 7465 6164 206f 6620 584d 4c20 656c 656d tead of XML elem\n-000ed900: 656e 7420 7265 7065 7469 7469 6f6e 7320 ent repetitions \n-000ed910: 2869 2e65 2e20 3c65 6d3e 3c63 6f64 653e (i.e. \n-000ed920: 7873 643a 7365 7175 656e 6365 206d 6178 xsd:sequence max\n-000ed930: 4f63 6375 7273 3d22 756e 626f 756e 6465 Occurs=\"unbounde\n-000ed940: 6422 3c2f 636f 6465 3e3c 2f65 6d3e 2069 d\" i\n-000ed950: 7320 6e6f 7420 616c 6c6f 7765 6429 2c20 s not allowed), \n-000ed960: 616e 6420 3c65 6d3e 3c63 6f64 653e 7873 and xs\n-000ed970: 643a 6368 6f69 6365 3c2f 636f 6465 3e3c d:choice<\n-000ed980: 2f65 6d3e 2063 6f6d 706f 6e65 6e74 7320 /em> components \n-000ed990: 6172 6520 6e6f 7420 616c 6c6f 7765 642e are not allowed.\n-000ed9a0: 204d 756c 7469 2d72 6566 6572 656e 6365 Multi-reference\n-000ed9b0: 6420 656c 656d 656e 7473 2061 7265 2075 d elements are u\n-000ed9c0: 7365 6420 746f 2073 6572 6961 6c69 7a65 sed to serialize\n-000ed9d0: 2064 6174 6120 7374 7275 6374 7572 6520 data structure \n-000ed9e0: 6772 6170 6873 2e20 4265 6361 7573 6520 graphs. Because \n-000ed9f0: 6164 6469 7469 6f6e 616c 2053 4f41 502d additional SOAP-\n-000eda00: 656e 636f 6469 6e67 2073 7065 6369 6669 encoding specifi\n-000eda10: 6320 6174 7472 6962 7574 6573 2061 7265 c attributes are\n-000eda20: 2070 7265 7365 6e74 2074 6861 7420 6172 present that ar\n-000eda30: 6520 6e6f 7420 6465 6669 6e65 6420 696e e not defined in\n-000eda40: 2074 6865 2058 4d4c 2073 6368 656d 6120 the XML schema \n-000eda50: 286f 6620 7468 6520 5753 444c 292c 2073 (of the WSDL), s\n-000eda60: 7472 6963 7420 584d 4c20 7363 6865 6d61 trict XML schema\n-000eda70: 2076 616c 6964 6174 6f72 7320 6d61 7920 validators may \n-000eda80: 7265 6a65 6374 2053 4f41 502d 656e 636f reject SOAP-enco\n-000eda90: 6465 6420 636f 6e74 656e 742e 2054 6865 ded content. The\n-000edaa0: 2053 4f41 5020 426f 6479 2063 6f6e 7461 SOAP Body conta\n-000edab0: 696e 7320 6174 206d 6f73 7420 6f6e 6520 ins at most one \n-000edac0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-000edad0: 6e20 7265 7175 6573 7420 656c 656d 656e n request elemen\n-000edae0: 7420 6f72 2061 7420 6d6f 7374 206f 6e65 t or at most one\n-000edaf0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n-000edb00: 6f6e 2072 6573 706f 6e73 6520 656c 656d on response elem\n-000edb10: 656e 7420 616e 6420 7468 6520 656e 636f ent and the enco\n-000edb20: 6469 6e67 2073 7479 6c65 2069 7320 696e ding style is in\n-000edb30: 6469 6361 7465 6420 7769 7468 2074 6865 dicated with the\n-000edb40: 203c 656d 3e3c 636f 6465 3e53 4f41 502d SOAP-\n-000edb50: 454e 563a 656e 636f 6469 6e67 5374 796c ENV:encodingStyl\n-000edb60: 653d 222e 2e2e 223c 2f63 6f64 653e 3c2f e=\"...\" attribute in\n-000edb80: 2074 6865 2053 4f41 5020 426f 6479 206f the SOAP Body o\n-000edb90: 7220 6f6e 6520 6f72 206d 6f72 6520 6f66 r one or more of\n-000edba0: 2069 7473 2073 7562 2d65 6c65 6d65 6e74 its sub-element\n-000edbb0: 732e 2054 6869 7320 7374 796c 6520 6973 s. This style is\n-000edbc0: 2073 7065 6369 6669 6564 2066 6f72 2074 specified for t\n-000edbd0: 6865 2065 6e74 6972 6520 7365 7276 6963 he entire servic\n-000edbe0: 6520 6465 636c 6172 6564 2075 6e64 6572 e declared under\n-000edbf0: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n-000edc00: 7820 3c63 6f64 653e 6e73 3c2f 636f 6465 x ns with:
    \n-000edc40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-000edc60: 2073 6572 7669 6365 2073 7479 6c65 3a20 service style: \n-000edc70: 2020 2072 7063 3c2f 7370 616e 3e3c 2f64 rpc.
    //gs\n-000edcb0: 6f61 7020 6e73 2073 6572 7669 6365 2065 oap ns service e\n-000edcc0: 6e63 6f64 696e 673a 2065 6e63 6f64 6564 ncoding: encoded\n-000edcd0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    ..
  • S\n-000edd00: 4f41 5020 646f 6375 6d65 6e74 2f6c 6974 OAP document/lit\n-000edd10: 6572 616c 2075 7365 7320 584d 4c20 636f eral uses XML co\n-000edd20: 6e73 7472 6169 6e65 6420 746f 2074 6865 nstrained to the\n-000edd30: 2058 4d4c 2073 6368 656d 6120 7468 6174 XML schema that\n-000edd40: 2064 6566 696e 6573 2074 6865 2058 4d4c defines the XML\n-000edd50: 2063 6f6e 7465 6e74 2e20 5468 6520 7365 content. The se\n-000edd60: 7269 616c 697a 6174 696f 6e20 6f66 2074 rialization of t\n-000edd70: 7265 652d 6261 7365 6420 6461 7461 2073 ree-based data s\n-000edd80: 7472 7563 7475 7265 7320 6973 2061 6363 tructures is acc\n-000edd90: 7572 6174 6520 696e 2058 4d4c 2e20 5468 urate in XML. Th\n-000edda0: 6520 7365 7269 616c 697a 6174 696f 6e20 e serialization \n-000eddb0: 6f66 2064 6967 7261 7068 2d73 6861 7065 of digraph-shape\n-000eddc0: 6420 6461 7461 2073 7472 7563 7475 7265 d data structure\n-000eddd0: 7320 7265 7375 6c74 7320 696e 2074 6865 s results in the\n-000edde0: 2064 7570 6c69 6361 7469 6f6e 206f 6620 duplication of \n-000eddf0: 6461 7461 206e 6f64 6573 2074 6861 7420 data nodes that \n-000ede00: 6172 6520 636f 2d72 6566 6572 656e 6365 are co-reference\n-000ede10: 732e 2043 7963 6c69 6320 6461 7461 2073 s. Cyclic data s\n-000ede20: 7472 7563 7475 7265 7320 6361 6e6e 6f74 tructures cannot\n-000ede30: 2062 6520 6163 6375 7261 7465 6c79 2073 be accurately s\n-000ede40: 6572 6961 6c69 7a65 642c 2062 7574 2079 erialized, but y\n-000ede50: 6f75 2063 616e 2075 7365 203c 636f 6465 ou can use #SOAP_XML_GRAPH\n-000ede70: 3c2f 636f 6465 3e20 746f 2066 6f72 6365 to force\n-000ede80: 2074 6865 2075 7365 206f 6620 6964 2d72 the use of id-r\n-000ede90: 6566 2074 6f20 6163 6375 7261 7465 6c79 ef to accurately\n-000edea0: 2073 6572 6961 6c69 7a65 2064 6967 7261 serialize digra\n-000edeb0: 7068 7320 616e 6420 6379 636c 6963 2064 phs and cyclic d\n-000edec0: 6174 6120 7374 7275 6374 7572 6573 2e20 ata structures. \n-000eded0: 5468 6520 534f 4150 2042 6f64 7920 6d61 The SOAP Body ma\n-000edee0: 7920 636f 6e74 6169 6e20 616e 7920 6e75 y contain any nu\n-000edef0: 6d62 6572 206f 6620 584d 4c20 656c 656d mber of XML elem\n-000edf00: 656e 7473 2c20 6173 2069 6620 7468 6520 ents, as if the \n-000edf10: 534f 4150 2042 6f64 7920 6973 2074 6865 SOAP Body is the\n-000edf20: 2072 6f6f 7420 6f66 2061 6e20 584d 4c20 root of an XML \n-000edf30: 646f 6375 6d65 6e74 2e20 4e6f 203c 656d document. No SOAP-ENV:\n-000edf50: 656e 636f 6469 6e67 5374 796c 653d 222e encodingStyle=\".\n-000edf60: 2e2e 223c 2f63 6f64 653e 3c2f 656d 3e20 ..\" \n-000edf70: 6174 7472 6962 7574 6520 7368 6f75 6c64 attribute should\n-000edf80: 2061 7070 6561 7220 696e 206c 6974 6572 appear in liter\n-000edf90: 616c 2063 6f6e 7465 6e74 2e20 5468 6973 al content. This\n-000edfa0: 2073 7479 6c65 2069 7320 7370 6563 6966 style is specif\n-000edfb0: 6965 6420 666f 7220 7468 6520 656e 7469 ied for the enti\n-000edfc0: 7265 2073 6572 7669 6365 2064 6563 6c61 re service decla\n-000edfd0: 7265 6420 756e 6465 7220 6e61 6d65 7370 red under namesp\n-000edfe0: 6163 6520 7072 6566 6978 203c 636f 6465 ace prefix ns with:\n-000ee000: 203c 6469 7620 636c 6173 733d 2266 7261
    /\n-000ee040: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-000ee050: 6520 7374 796c 653a 2020 2020 646f 6375 e style: docu\n-000ee060: 6d65 6e74 3c2f 7370 616e 3e3c 2f64 6976 ment.
    //gsoa\n-000ee0a0: 7020 6e73 2073 6572 7669 6365 2065 6e63 p ns service enc\n-000ee0b0: 6f64 696e 673a 206c 6974 6572 616c 3c2f oding: literal
    .
  • .
  • SOA\n-000ee0f0: 5020 5250 4320 6c69 7465 7261 6c20 616c P RPC literal al\n-000ee100: 736f 2075 7365 7320 584d 4c20 636f 6e73 so uses XML cons\n-000ee110: 7472 6169 6e65 6420 746f 2074 6865 2058 trained to the X\n-000ee120: 4d4c 2073 6368 656d 6120 7468 6174 2064 ML schema that d\n-000ee130: 6566 696e 6573 2074 6865 2058 4d4c 2063 efines the XML c\n-000ee140: 6f6e 7465 6e74 2e20 5468 6520 6469 6666 ontent. The diff\n-000ee150: 6572 656e 6365 2077 6974 6820 646f 6375 erence with docu\n-000ee160: 6d65 6e74 2f6c 6974 6572 616c 2069 7320 ment/literal is \n-000ee170: 7468 6174 2074 6865 2053 4f41 5020 426f that the SOAP Bo\n-000ee180: 6479 2063 6f6e 7461 696e 7320 6174 206d dy contains at m\n-000ee190: 6f73 7420 6f6e 6520 7365 7276 6963 6520 ost one service \n-000ee1a0: 6f70 6572 6174 696f 6e20 7265 7175 6573 operation reques\n-000ee1b0: 7420 656c 656d 656e 7420 6f72 2061 7420 t element or at \n-000ee1c0: 6d6f 7374 206f 6e65 2073 6572 7669 6365 most one service\n-000ee1d0: 206f 7065 7261 7469 6f6e 2072 6573 706f operation respo\n-000ee1e0: 6e73 6520 656c 656d 656e 742e 204e 6f20 nse element. No \n-000ee1f0: 3c65 6d3e 3c63 6f64 653e 534f 4150 2d45 SOAP-E\n-000ee200: 4e56 3a65 6e63 6f64 696e 6753 7479 6c65 NV:encodingStyle\n-000ee210: 3d22 2e2e 2e22 3c2f 636f 6465 3e3c 2f65 =\"...\" attribute sho\n-000ee230: 756c 6420 6170 7065 6172 2069 6e20 6c69 uld appear in li\n-000ee240: 7465 7261 6c20 636f 6e74 656e 742e 2054 teral content. T\n-000ee250: 6869 7320 7374 796c 6520 6973 2073 7065 his style is spe\n-000ee260: 6369 6669 6564 2066 6f72 2074 6865 2065 cified for the e\n-000ee270: 6e74 6972 6520 7365 7276 6963 6520 6465 ntire service de\n-000ee280: 636c 6172 6564 2075 6e64 6572 206e 616d clared under nam\n-000ee290: 6573 7061 6365 2070 7265 6669 7820 3c63 espace prefix ns wi\n-000ee2b0: 7468 3a20 3c64 6976 2063 6c61 7373 3d22 th:
    //gsoap ns ser\n-000ee300: 7669 6365 2073 7479 6c65 3a20 2020 2072 vice style: r\n-000ee310: 7063 3c2f 7370 616e 3e3c 2f64 6976 3e0a pc
    .\n-000ee320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-000ee350: 6e73 2073 6572 7669 6365 2065 6e63 6f64 ns service encod\n-000ee360: 696e 673a 206c 6974 6572 616c 3c2f 7370 ing: literal
    .
    \n-000ee380: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    \n-000ee730: 546f 2065 6e61 626c 6520 534f 4150 2052 To enable SOAP R\n-000ee740: 5043 2065 6e63 6f64 696e 6720 666f 7220 PC encoding for \n-000ee750: 6120 7061 7274 6963 756c 6172 2073 6572 a particular ser\n-000ee760: 7669 6365 206f 7065 7261 7469 6f6e 2072 vice operation r\n-000ee770: 6573 706f 6e73 652c 2075 7365 3a3c 2f70 esponse, use:.

    \n-000ee7c0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-000ee7d0: 6365 206d 6574 686f 642d 7265 7370 6f6e ce method-respon\n-000ee7e0: 7365 2d73 7479 6c65 3a20 2020 2077 6562 se-style: web\n-000ee7f0: 6d65 7468 6f64 2072 7063 203c 2f73 7061 method rpc
    .
    //gsoap ns serv\n-000ee840: 6963 6520 6d65 7468 6f64 2d72 6573 706f ice method-respo\n-000ee850: 6e73 652d 656e 636f 6469 6e67 3a20 7765 nse-encoding: we\n-000ee860: 626d 6574 686f 6420 656e 636f 6465 6420 bmethod encoded \n-000ee870: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-000ee890: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__webmeth\n-000ee8c0: 6f64 282e 2e2e 293c 2f64 6976 3e0a 3c2f od(...)
    .

    Likewise\n-000ee8f0: 2c20 796f 7520 6361 6e20 7370 6563 6966 , you can specif\n-000ee900: 7920 646f 6375 6d65 6e74 2f6c 6974 6572 y document/liter\n-000ee910: 616c 2061 6e64 2052 5043 206c 6974 6572 al and RPC liter\n-000ee920: 616c 206d 6573 7361 6765 732e 2054 6865 al messages. The\n-000ee930: 2064 6566 6175 6c74 2073 7479 6c65 2069 default style i\n-000ee940: 7320 646f 6375 6d65 6e74 2f6c 6974 6572 s document/liter\n-000ee950: 616c 2c20 756e 6c65 7373 203c 623e 3c63 al, unless soapcpp2 -e<\n-000ee970: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio\n-000ee980: 6e20 3c62 3e3c 636f 6465 3e2d 653c 2f63 n -e is used\n-000ee9a0: 2074 6f20 7365 7420 534f 4150 2052 5043 to set SOAP RPC\n-000ee9b0: 2065 6e63 6f64 696e 6720 6279 2064 6566 encoding by def\n-000ee9c0: 6175 6c74 2e3c 2f70 3e0a 3c70 3e46 6f72 ault.

    .

    For\n-000ee9d0: 2074 6865 203c 636f 6465 3e73 7479 6c65 the style\n-000ee9e0: 3c2f 636f 6465 3e20 6469 7265 6374 6976 directiv\n-000ee9f0: 6573 2079 6f75 2063 616e 2073 7065 6369 es you can speci\n-000eea00: 6679 203c 636f 6465 3e72 7063 3c2f 636f fy rpc or doc\n-000eea20: 756d 656e 743c 2f63 6f64 653e 2e20 466f ument. Fo\n-000eea30: 7220 7468 6520 3c63 6f64 653e 656e 636f r the enco\n-000eea40: 6469 6e67 3c2f 636f 6465 3e20 6469 7265 ding dire\n-000eea50: 6374 6976 6573 2079 6f75 2063 616e 2073 ctives you can s\n-000eea60: 7065 6369 6679 203c 636f 6465 3e6c 6974 pecify lit\n-000eea70: 6572 616c 3c2f 636f 6465 3e2c 203c 636f eral, encoded, or even a cus\n-000eeaa0: 746f 6d20 5552 4920 7468 6174 2069 6e64 tom URI that ind\n-000eeab0: 6963 6174 6573 2073 6f6d 6520 6375 7374 icates some cust\n-000eeac0: 6f6d 206f 7220 7072 6f70 7269 6574 6172 om or proprietar\n-000eead0: 7920 656e 636f 6469 6e67 2066 6f72 6d61 y encoding forma\n-000eeae0: 7420 696e 2058 4d4c 2077 6869 6368 2077 t in XML which w\n-000eeaf0: 696c 6c20 6e6f 7420 696e 7465 726f 7065 ill not interope\n-000eeb00: 7261 7465 2077 6974 6820 534f 4150 2070 rate with SOAP p\n-000eeb10: 726f 6365 7373 6f72 7320 7468 6174 2061 rocessors that a\n-000eeb20: 7265 206e 6f74 2063 6f6d 7061 7469 626c re not compatibl\n-000eeb30: 6520 7769 7468 2074 6865 2073 7065 6369 e with the speci\n-000eeb40: 6669 6564 2065 6e63 6f64 696e 6720 666f fied encoding fo\n-000eeb50: 726d 6174 2e20 5365 6520 616c 736f 2053 rmat. See also S\n-000eeb60: 6563 7469 6f6e 203c 6120 636c 6173 733d ection Directives\n-000eeba0: 2e3c 2f70 3e0a 3c70 3e53 6565 2061 6c73 .

    .

    See als\n-000eebb0: 6f20 3c61 2068 7265 663d 222e 2e2f 2e2e o C \n-000eebe0: 616e 6420 432b 2b20 584d 4c20 6461 7461 and C++ XML data\n-000eebf0: 2062 696e 6469 6e67 733c 2f61 3e20 646f bindings do\n-000eec00: 6375 6d65 6e74 6174 696f 6e20 666f 7220 cumentation for \n-000eec10: 6469 6666 6572 656e 6365 7320 696e 2058 differences in X\n-000eec20: 4d4c 2073 6572 6961 6c69 7a61 7469 6f6e ML serialization\n-000eec30: 2077 6865 6e20 7573 696e 6720 7468 6520 when using the \n-000eec40: 534f 4150 2052 5043 2065 6e63 6f64 6564 SOAP RPC encoded\n-000eec50: 2061 6e64 2064 6f63 756d 656e 742f 6c69 and document/li\n-000eec60: 7465 7261 6c20 6d65 7373 6167 696e 6720 teral messaging \n-000eec70: 7374 796c 6573 2e3c 2f70 3e0a 3c70 3ef0 styles.

    .

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

    .Seria\n-000eece0: 6c69 7a69 6e67 206d 6978 6564 2063 6f6e lizing mixed con\n-000eecf0: 7465 6e74 2077 6974 6820 6c69 7465 7261 tent with litera\n-000eed00: 6c20 584d 4c20 7374 7269 6e67 733c 2f68 l XML strings.

    XML is sto\n-000eed20: 7265 6420 696e 2022 6c69 7465 7261 6c22 red in \"literal\"\n-000eed30: 2058 4d4c 2073 7472 696e 6773 2077 6869 XML strings whi\n-000eed40: 6368 2061 7265 2074 6865 2062 7569 6c74 ch are the built\n-000eed50: 2d69 6e20 3c63 6f64 653e 5f58 4d4c 3c2f -in _XML type that \n-000eed70: 6973 2061 2072 6567 756c 6172 203c 636f is a regular char* \n-000eed90: 7374 7269 6e67 206f 7220 796f 7520 6361 string or you ca\n-000eeda0: 6e20 6465 636c 6172 6520 6120 7769 6465 n declare a wide\n-000eedb0: 2063 6861 7261 6374 6572 2073 7472 696e character strin\n-000eedc0: 6720 696e 2061 6e20 696e 7465 7266 6163 g in an interfac\n-000eedd0: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n-000eede0: 7220 736f 6170 6370 7032 2061 7320 666f r soapcpp2 as fo\n-000eedf0: 6c6c 6f77 733a 3c2f 703e 0a3c 6469 7620 llows:

    .
    typedef\n-000eee40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c wchar_t\n-000eee70: 202a 584d 4c3b 3c2f 6469 763e 0a3c 2f64 *XML;
    .

    To declar\n-000eeea0: 6520 6120 432b 2b20 3c63 6f64 653e 7374 e a C++ st\n-000eeeb0: 643a 3a73 7472 696e 673c 2f63 6f64 653e d::string\n-000eeec0: 206c 6974 6572 616c 2058 4d4c 2074 7970 literal XML typ\n-000eeed0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n-000eef00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000eef10: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef std::string \n-000eef30: 584d 4c3b 3c2f 6469 763e 0a3c 2f64 6976 XML;
    .

    To use b\n-000ef000: 6f74 6820 6174 2074 6865 2073 616d 6520 oth at the same \n-000ef010: 7469 6d65 3a3c 2f70 3e0a 3c64 6976 2063 time:

    .
    \n-000ef030: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    typedef<\n-000ef060: 2f73 7061 6e3e 2073 7464 3a3a 7374 7269 /span> std::stri\n-000ef070: 6e67 2020 584d 4c3b 3c2f 6469 763e 0a3c ng XML;
    .<\n-000ef080: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ef090: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef std::wstri\n-000ef0c0: 6e67 2058 4d4c 5f3b 3c2f 6469 763e 0a3c ng XML_;
    .<\n-000ef0d0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The dif\n-000ef0f0: 6665 7265 6e63 6573 2062 6574 7765 656e ferences between\n-000ef100: 2074 6865 2075 7365 206f 6620 7265 6775 the use of regu\n-000ef110: 6c61 7220 382d 6269 7420 7374 7269 6e67 lar 8-bit string\n-000ef120: 7320 7665 7273 7573 2077 6964 6520 6368 s versus wide ch\n-000ef130: 6172 6163 7465 7220 7374 7269 6e67 7320 aracter strings \n-000ef140: 666f 7220 584d 4c20 646f 6375 6d65 6e74 for XML document\n-000ef150: 7320 6172 653a 3c2f 703e 0a3c 756c 3e0a s are:

    .
      .\n-000ef160: 3c6c 693e 584d 4c20 6c69 7465 7261 6c20
    • XML literal \n-000ef170: 7374 7269 6e67 7320 6d75 7374 2068 6f6c strings must hol\n-000ef180: 6420 5554 462d 3820 584d 4c20 636f 6e74 d UTF-8 XML cont\n-000ef190: 656e 742e 3c2f 6c69 3e0a 3c6c 693e 5769 ent.
    • .
    • Wi\n-000ef1a0: 6465 2063 6861 7261 6374 6572 2058 4d4c de character XML\n-000ef1b0: 206c 6974 6572 616c 2073 7472 696e 6773 literal strings\n-000ef1c0: 2061 7265 2063 6f6e 7665 7274 6564 2074 are converted t\n-000ef1d0: 6f20 616e 6420 6672 6f6d 2055 5446 2d38 o and from UTF-8\n-000ef1e0: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
    • .
    .

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

    .XM\n-000ef250: 4c20 7661 6c69 6461 7469 6f6e 3c2f 6831 L validation.

    Some XML va\n-000ef270: 6c69 6461 7469 6f6e 2063 6f6e 7374 7261 lidation constra\n-000ef280: 696e 7473 2061 7265 206e 6f74 2061 7574 ints are not aut\n-000ef290: 6f6d 6174 6963 616c 6c79 2076 6572 6966 omatically verif\n-000ef2a0: 6965 6420 756e 6c65 7373 2065 7870 6c69 ied unless expli\n-000ef2b0: 6369 746c 7920 7365 7420 7573 696e 6720 citly set using \n-000ef2c0: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n-000ef2d0: 584d 4c5f 5354 5249 4354 3c2f 636f 6465 XML_STRICT flag. SOAP RPC\n-000ef2f0: 2065 6e63 6f64 696e 6720 6973 2061 6e20 encoding is an \n-000ef300: 584d 4c20 666f 726d 6174 2074 6861 7420 XML format that \n-000ef310: 646f 6573 206e 6f74 2061 6666 6f72 6420 does not afford \n-000ef320: 7374 7269 6374 2058 4d4c 2076 616c 6964 strict XML valid\n-000ef330: 6174 696f 6e2c 2062 6563 6175 7365 206f ation, because o\n-000ef340: 6620 7468 6520 6164 6469 7469 6f6e 206f f the addition o\n-000ef350: 6620 534f 4150 2d73 7065 6369 6669 6320 f SOAP-specific \n-000ef360: 6174 7472 6962 7574 6573 2061 6e64 206f attributes and o\n-000ef370: 7468 6572 2073 6d61 6c6c 2064 6576 6961 ther small devia\n-000ef380: 7469 6f6e 7320 7468 6174 2077 696c 6c20 tions that will \n-000ef390: 6265 2064 6574 6563 7465 6420 6279 2061 be detected by a\n-000ef3a0: 6e20 6167 6772 6573 7369 7665 2058 4d4c n aggressive XML\n-000ef3b0: 2076 616c 6964 6174 6f72 2c20 6c65 6164 validator, lead\n-000ef3c0: 696e 6720 7468 6520 6d65 7373 6167 696e ing the messagin\n-000ef3d0: 6720 6661 696c 7572 6573 2e20 4279 2074 g failures. By t\n-000ef3e0: 6f6e 696e 6720 584d 4c20 7661 6c69 6461 oning XML valida\n-000ef3f0: 7469 6f6e 2064 6f77 6e2c 2069 7420 6865 tion down, it he\n-000ef400: 6c70 7320 746f 2069 6d70 726f 7665 2053 lps to improve S\n-000ef410: 4f41 5020 5250 4320 656e 636f 6469 6e67 OAP RPC encoding\n-000ef420: 2069 6e74 6572 6f70 6572 6162 696c 6974 interoperabilit\n-000ef430: 792e 3c2f 703e 0a3c 703e 5374 7269 6374 y.

    .

    Strict\n-000ef440: 2076 616c 6964 6174 696f 6e20 636f 6e73 validation cons\n-000ef450: 7472 6169 6e74 7320 6172 6520 656e 6162 traints are enab\n-000ef460: 6c65 6420 7769 7468 2074 6865 203c 636f led with the #SOAP_XML_STR\n-000ef480: 4943 543c 2f63 6f64 653e 206d 6f64 6520 ICT mode \n-000ef490: 666c 6167 2073 6574 2c20 652e 672e 2077 flag set, e.g. w\n-000ef4a0: 6974 6820 3c63 6f64 653e 736f 6170 5f73 ith soap_s\n-000ef4b0: 6574 5f69 6d6f 6465 2873 6f61 702c 2053 et_imode(soap, S\n-000ef4c0: 4f41 505f 584d 4c5f 5354 5249 4354 293c OAP_XML_STRICT)<\n-000ef4d0: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n-000ef4e0: 736f 6170 5f6e 6577 2853 4f41 505f 584d soap_new(SOAP_XM\n-000ef4f0: 4c5f 5354 5249 4354 293c 2f63 6f64 653e L_STRICT)\n-000ef500: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Run-time fla\n-000ef540: 6773 3c2f 613e 2066 6f72 2074 6865 2063 gs for the c\n-000ef550: 6f6d 706c 6574 6520 6c69 7374 206f 6620 omplete list of \n-000ef560: 666c 6167 732e 3c2f 703e 0a3c 703e 5468 flags.

    .

    Th\n-000ef570: 6520 6e65 7874 2073 6563 7469 6f6e 7320 e next sections \n-000ef580: 6465 7363 7269 6265 2074 6865 2074 7970 describe the typ\n-000ef590: 6520 6f66 2063 6f6e 7374 7261 696e 7473 e of constraints\n-000ef5a0: 2076 616c 6964 6174 6564 2077 6865 6e20 validated when \n-000ef5b0: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n-000ef5c0: 5354 5249 4354 3c2f 636f 6465 3e20 6973 STRICT is\n-000ef5d0: 2065 6e61 626c 6564 2061 6e64 2076 616c enabled and val\n-000ef5e0: 6964 6174 696f 6e20 636f 6e73 7472 6169 idation constrai\n-000ef5f0: 6e74 7320 6172 6520 7370 6563 6966 6965 nts are specifie\n-000ef600: 6420 696e 2074 6865 2069 6e74 6572 6661 d in the interfa\n-000ef610: 6365 2068 6561 6465 7220 6669 6c65 2e3c ce header file.<\n-000ef620: 2f70 3e0a 3c70 3e55 7365 2063 6f6d 7069 /p>.

    Use compi\n-000ef630: 6c65 7220 666c 6167 203c 636f 6465 3e23 ler flag #\n-000ef640: 5749 5448 5f52 4550 4c41 4345 5f49 4c4c WITH_REPLACE_ILL\n-000ef650: 4547 414c 5f55 5446 383c 2f63 6f64 653e EGAL_UTF8\n-000ef660: 2074 6f20 666f 7263 6520 7374 7269 6374 to force strict\n-000ef670: 2055 5446 2d38 2074 6578 7420 636f 6e76 UTF-8 text conv\n-000ef680: 6572 7369 6f6e 732c 2077 6869 6368 2072 ersions, which r\n-000ef690: 6570 6c61 6365 7320 696e 7661 6c69 6420 eplaces invalid \n-000ef6a0: 5554 462d 3820 7769 7468 2055 2b46 4646 UTF-8 with U+FFF\n-000ef6b0: 442e 3c2f 703e 0a3c 703e 5365 6520 616c D.

    .

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

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

    .

    .Default v\n-000ef7a0: 616c 7565 733c 2f68 323e 0a3c 703e 4465 alues

    .

    De\n-000ef7b0: 6661 756c 7420 7661 6c75 6573 2063 616e fault values can\n-000ef7c0: 2062 6520 6465 6669 6e65 6420 666f 7220 be defined for \n-000ef7d0: 6f70 7469 6f6e 616c 2065 6c65 6d65 6e74 optional element\n-000ef7e0: 7320 616e 6420 6174 7472 6962 7574 6573 s and attributes\n-000ef7f0: 2c20 7768 6963 6820 6d65 616e 7320 7468 , which means th\n-000ef800: 6174 2074 6865 2064 6566 6175 6c74 2076 at the default v\n-000ef810: 616c 7565 2077 696c 6c20 6265 2075 7365 alue will be use\n-000ef820: 6420 7768 656e 2074 6865 2065 6c65 6d65 d when the eleme\n-000ef830: 6e74 206f 7220 6174 7472 6962 7574 6520 nt or attribute \n-000ef840: 7661 6c75 6520 6973 206e 6f74 2070 7265 value is not pre\n-000ef850: 7365 6e74 2069 6e20 7468 6520 7061 7273 sent in the pars\n-000ef860: 6564 2058 4d4c 2e20 5365 6520 616c 736f ed XML. See also\n-000ef870: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Default values \n-000ef8b0: 666f 7220 6f6d 6974 7465 6420 584d 4c20 for omitted XML \n-000ef8c0: 656c 656d 656e 7473 2061 6e64 2061 7474 elements and att\n-000ef8d0: 7269 6275 7465 733c 2f61 3e20 616e 6420 ributes and \n-000ef8e0: 6578 616d 706c 6573 2069 6e20 7375 6273 examples in subs\n-000ef8f0: 6571 7565 6e74 2073 7562 7365 6374 696f equent subsectio\n-000ef900: 6e73 2062 656c 6f77 2e3c 2f70 3e0a 3c70 ns below.

    .Default values \n-000ef920: 6d75 7374 2062 6520 7072 696d 6974 6976 must be primitiv\n-000ef930: 6520 7479 7065 732c 2069 6e74 6567 6572 e types, integer\n-000ef940: 2c20 666c 6f61 742c 2073 7472 696e 672c , float, string,\n-000ef950: 2065 7463 2e20 6f72 2070 6f69 6e74 6572 etc. or pointer\n-000ef960: 7320 746f 2070 7269 6d69 7469 7665 2074 s to primitive t\n-000ef970: 7970 6573 2e20 4465 6661 756c 7420 7661 ypes. Default va\n-000ef980: 6c75 6573 2063 616e 2062 6520 7370 6563 lues can be spec\n-000ef990: 6966 6965 6420 666f 7220 7374 7275 6374 ified for struct\n-000ef9a0: 2061 6e64 2063 6c61 7373 206d 656d 6265 and class membe\n-000ef9b0: 7273 2c20 6173 2073 686f 776e 2069 6e20 rs, as shown in \n-000ef9c0: 7468 6520 6578 616d 706c 6520 6265 6c6f the example belo\n-000ef9d0: 773a 3c2f 703e 0a3c 6469 7620 636c 6173 w:

    .
    <\n-000efa00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000efa10: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__MyRecord \n-000efa30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-000efa50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int n = \n-000efa90: 353b 2020 2020 2020 2020 2020 203c 7370 5; // optional e\n-000efac0: 6c65 6d65 6e74 2077 6974 6820 6465 6661 lement with defa\n-000efad0: 756c 7420 7661 6c75 6520 3520 3c2f 7370 ult value 5
    .
    \n-000efb00: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *name = "\n-000efb50: 6e6f 6e65 2671 756f 743b 3c2f 7370 616e none"; // opti\n-000efb80: 6f6e 616c 2065 6c65 6d65 6e74 2077 6974 onal element wit\n-000efb90: 6820 6465 6661 756c 7420 7661 6c75 6520 h default value \n-000efba0: 2671 756f 743b 6e6f 6e65 2671 756f 743b "none"\n-000efbb0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-000efbc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000efbd0: 3e20 2040 203c 7370 616e 2063 6c61 7373 > @ enum<\n-000efbf0: 2f73 7061 6e3e 206e 735f 5f63 6f6c 6f72 /span> ns__color\n-000efc00: 207b 2052 4544 2c20 5748 4954 452c 2042 { RED, WHITE, B\n-000efc10: 4c55 4520 7d20 636f 6c6f 7220 3d20 5245 LUE } color = RE\n-000efc20: 443b 203c 7370 616e 2063 6c61 7373 3d22 D; // opti\n-000efc40: 6f6e 616c 2061 7474 7269 6275 7465 2077 onal attribute w\n-000efc50: 6974 6820 6465 6661 756c 7420 7661 6c75 ith default valu\n-000efc60: 6520 5245 4420 3c2f 7370 616e 3e3c 2f64 e RED .
    };
    .<\n-000efc90: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Upon de\n-000efcb0: 7365 7269 616c 697a 6174 696f 6e20 6f66 serialization of\n-000efcc0: 2061 6273 656e 7420 6461 7461 2c20 7468 absent data, th\n-000efcd0: 6573 6520 6d65 6d62 6572 7320 7769 6c6c ese members will\n-000efce0: 2062 6520 7365 7420 6163 636f 7264 696e be set accordin\n-000efcf0: 676c 792e 2057 6865 6e20 636c 6173 7365 gly. When classe\n-000efd00: 7320 6172 6520 696e 7374 616e 7469 6174 s are instantiat\n-000efd10: 6564 2077 6974 6820 3c63 6f64 653e 736f ed with so\n-000efd20: 6170 5f6e 6577 5f43 6c61 7373 4e61 6d65 ap_new_ClassName\n-000efd30: 3c2f 636f 6465 3e20 7468 6520 696e 7374 the inst\n-000efd40: 616e 6365 2077 696c 6c20 6265 2069 6e69 ance will be ini\n-000efd50: 7469 616c 697a 6564 2077 6974 6820 6465 tialized with de\n-000efd60: 6661 756c 7420 7661 6c75 6573 2e3c 2f70 fault values..

    See also C and \n-000efdb0: 432b 2b20 584d 4c20 6461 7461 2062 696e C++ XML data bin\n-000efdc0: 6469 6e67 733c 2f61 3e20 646f 6375 6d65 dings docume\n-000efdd0: 6e74 6174 696f 6e20 666f 7220 6d6f 7265 ntation for more\n-000efde0: 2064 6574 6169 6c73 2e3c 2f70 3e0a 3c70 details.

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

    .O\n-000efe50: 6363 7572 7265 6e63 6520 636f 6e73 7472 ccurrence constr\n-000efe60: 6169 6e74 733c 2f68 323e 0a3c 703e 4f63 aints

    .

    Oc\n-000efe70: 6375 7272 656e 6365 2063 6f6e 7374 7261 currence constra\n-000efe80: 696e 7473 2073 7065 6369 6679 2074 6865 ints specify the\n-000efe90: 206d 696e 696d 756d 2061 6e64 2f6f 7220 minimum and/or \n-000efea0: 6d61 7869 6d75 6d20 6672 6571 7565 6e63 maximum frequenc\n-000efeb0: 7920 6f72 206f 7074 696f 6e61 6c69 7479 y or optionality\n-000efec0: 206f 6620 6f66 2061 7474 7269 6275 7465 of of attribute\n-000efed0: 7320 616e 6420 656c 656d 656e 7473 2e3c s and elements.<\n-000efee0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    \n-000eff40: 0a45 6c65 6d65 6e74 7320 7769 7468 206d .Elements with m\n-000eff50: 696e 4f63 6375 7273 2061 6e64 206d 6178 inOccurs and max\n-000eff60: 4f63 6375 7273 2072 6573 7472 6963 7469 Occurs restricti\n-000eff70: 6f6e 733c 2f68 333e 0a3c 703e 546f 2066 ons

    .

    To f\n-000eff80: 6f72 6365 2074 6865 2076 616c 6964 6174 orce the validat\n-000eff90: 696f 6e20 6f66 206d 696e 4f63 6375 7273 ion of minOccurs\n-000effa0: 2061 6e64 206d 6178 4f63 6375 7273 2063 and maxOccurs c\n-000effb0: 6f6e 7374 7261 696e 7473 2074 6865 203c onstraints the <\n-000effc0: 636f 6465 3e23 534f 4150 5f58 4d4c 5f53 code>#SOAP_XML_S\n-000effd0: 5452 4943 543c 2f63 6f64 653e 2069 6e70 TRICT inp\n-000effe0: 7574 206d 6f64 6520 666c 6167 206d 7573 ut mode flag mus\n-000efff0: 7420 6265 2073 6574 2e20 5468 6520 6d69 t be set. The mi\n-000f0000: 6e4f 6363 7572 7320 616e 6420 6d61 784f nOccurs and maxO\n-000f0010: 6363 7572 7320 636f 6e73 7472 6169 6e74 ccurs constraint\n-000f0020: 7320 6172 6520 7370 6563 6966 6965 6420 s are specified \n-000f0030: 666f 7220 6d65 6d62 6572 7320 6f66 2061 for members of a\n-000f0040: 2073 7472 7563 7420 616e 6420 6d65 6d62 struct and memb\n-000f0050: 6572 7320 6f66 2061 2063 6c61 7373 2069 ers of a class i\n-000f0060: 6e20 6120 6865 6164 6572 2066 696c 6520 n a header file \n-000f0070: 7573 696e 6720 7468 6520 666f 6c6c 6f77 using the follow\n-000f0080: 696e 6720 7379 6e74 6178 3a3c 2f70 3e0a ing syntax:

    .\n-000f0090: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    Type mem\n-000f00c0: 6265 726e 616d 6520 3c73 7061 6e20 636c bername nu\n-000f00e0: 6c6c 7074 723c 2f73 7061 6e3e 206d 696e llptr min\n-000f00f0: 4f63 6375 7273 203a 206d 6178 4f63 6375 Occurs : maxOccu\n-000f0100: 7273 203d 2076 616c 7565 3b3c 2f64 6976 rs = value;.

    The \n-000f0130: 3c63 6f64 653e 6e75 6c6c 7074 723c 2f63 nullptr is optional\n-000f0150: 2061 6e64 2069 6e64 6963 6174 6573 2074 and indicates t\n-000f0160: 6861 7420 7468 6520 6d65 6d62 6572 2069 hat the member i\n-000f0170: 7320 6e69 6c6c 6162 6c65 2028 6753 4f41 s nillable (gSOA\n-000f0180: 5020 7665 7273 696f 6e20 322e 382e 3234 P version 2.8.24\n-000f0190: 206f 7220 6772 6561 7465 7229 2c20 7768 or greater), wh\n-000f01a0: 6963 6820 6d65 616e 7320 7468 6174 2077 ich means that w\n-000f01b0: 6865 6e20 4e55 4c4c 2061 6e20 656d 7074 hen NULL an empt\n-000f01c0: 7920 656c 656d 656e 7420 7769 7468 203c y element with <\n-000f01d0: 656d 3e3c 636f 6465 3e78 7369 3a6e 696c em>xsi:nil\n-000f01e0: 3d22 7472 7565 223c 2f63 6f64 653e 3c2f =\"true\" is added in \n-000f0200: 7468 6520 7365 7269 616c 697a 6564 2058 the serialized X\n-000f0210: 4d4c 2e3c 2f70 3e0a 3c70 3e54 6865 203c ML.

    .

    The <\n-000f0220: 636f 6465 3e6d 696e 4f63 6375 7273 3c2f code>minOccurs and \n-000f0240: 6d61 784f 6363 7572 733c 2f63 6f64 653e maxOccurs\n-000f0250: 2061 7265 206f 7074 696f 6e61 6c20 7661 are optional va\n-000f0260: 6c75 6573 2074 6861 7420 6d75 7374 2062 lues that must b\n-000f0270: 6520 696e 7465 6765 7220 6c69 7465 7261 e integer litera\n-000f0280: 6c73 2e20 5768 656e 203c 636f 6465 3e6d ls. When m\n-000f0290: 6178 4f63 6375 7273 3c2f 636f 6465 3e20 axOccurs \n-000f02a0: 6973 206e 6f74 2073 7065 6369 6669 6564 is not specified\n-000f02b0: 2074 6865 6e20 7468 6520 636f 6c6f 6e20 then the colon \n-000f02c0: 6361 6e20 6265 206f 6d69 7474 6564 2e20 can be omitted. \n-000f02d0: 5768 656e 203c 636f 6465 3e6d 696e 4f63 When minOc\n-000f02e0: 6375 7273 3c2f 636f 6465 3e20 6973 206e curs is n\n-000f02f0: 6f74 2073 7065 6369 6669 6564 2069 7420 ot specified it \n-000f0300: 6973 2061 7373 756d 6564 2074 6f20 6265 is assumed to be\n-000f0310: 206f 6e65 2028 3129 2066 6f72 206e 6f6e one (1) for non\n-000f0320: 2d70 6f69 6e74 6572 206d 656d 6265 7273 -pointer members\n-000f0330: 2074 6861 7420 6172 6520 656c 656d 656e that are elemen\n-000f0340: 7473 2061 6e64 207a 6572 6f20 2830 2920 ts and zero (0) \n-000f0350: 666f 7220 6d65 6d62 6572 7320 7468 6174 for members that\n-000f0360: 2061 7265 2070 6f69 6e74 6572 7320 6f72 are pointers or\n-000f0370: 2061 7265 2061 7474 7269 6275 7465 7320 are attributes \n-000f0380: 2869 2e65 2e20 6861 7665 2061 203c 636f (i.e. have a @ qual\n-000f03a0: 6966 6965 7229 2e3c 2f70 3e0a 3c70 3e41 ifier).

    .

    A\n-000f03b0: 2064 6566 6175 6c74 2069 6e69 7469 616c default initial\n-000f03c0: 697a 6174 696f 6e20 3c63 6f64 653e 7661 ization va\n-000f03d0: 6c75 653c 2f63 6f64 653e 206d 6179 2062 lue may b\n-000f03e0: 6520 7072 6f76 6964 6564 2061 6e64 2069 e provided and i\n-000f03f0: 7320 6f70 7469 6f6e 616c 2e3c 2f70 3e0a s optional.

    .\n-000f0400: 3c70 3e41 2066 6978 6564 2069 6e69 7469

    A fixed initi\n-000f0410: 616c 697a 6174 696f 6e20 7661 6c75 6520 alization value \n-000f0420: 6361 6e20 6265 2073 7065 6369 6669 6564 can be specified\n-000f0430: 2077 6974 6820 3c63 6f64 653e 3d3d 3c2f with == (gSOAP ver\n-000f0450: 7369 6f6e 2032 2e38 2e34 3820 6f72 2067 sion 2.8.48 or g\n-000f0460: 7265 6174 6572 292e 3c2f 703e 0a3c 703e reater).

    .

    \n-000f0470: 466f 7220 6578 616d 706c 653c 2f70 3e0a For example

    .\n-000f0480: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n-000f04c0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n-000f04d0: 4d79 5265 636f 7264 203c 2f64 6976 3e0a MyRecord
    .\n-000f04e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n-000f0510: 3c73 7061 6e20 636c 6173 733d 226b 6579 int n 0 = 5; \n-000f0540: 2020 203c 7370 616e 2063 6c61 7373 3d22 // elem\n-000f0560: 656e 7420 7769 7468 2064 6566 6175 6c74 ent with default\n-000f0570: 2076 616c 7565 2035 2c20 6d69 6e4f 6363 value 5, minOcc\n-000f0580: 7572 733d 302c 206d 6178 4f63 6375 7273 urs=0, maxOccurs\n-000f0590: 3d31 3c2f 7370 616e 3e3c 2f64 6976 3e0a =1
    .\n-000f05a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-000f05d0: 696e 743c 2f73 7061 6e3e 206d 3b20 2020 int m; \n-000f05e0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-000f0600: 2f20 656c 656d 656e 7420 7769 7468 206d / element with m\n-000f0610: 696e 4f63 6375 7273 3d31 203c 2f73 7061 inOccurs=1
    .
    <\n-000f0640: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f0650: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int *k nul\n-000f0680: 6c70 7472 3c2f 7370 616e 3e20 313b 203c lptr 1; <\n-000f0690: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f06a0: 656e 7422 3e2f 2f20 656c 656d 656e 7420 ent\">// element \n-000f06b0: 7769 7468 206d 696e 4f63 6375 7273 3d31 with minOccurs=1\n-000f06c0: 2061 6e64 206e 696c 6c61 626c 653d 7472 and nillable=tr\n-000f06d0: 7565 203c 2f73 7061 6e3e 3c2f 6469 763e ue
    \n-000f06e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int v ==\n-000f0720: 2032 3b20 2020 2020 2020 3c73 7061 6e20 2; \n-000f0740: 2f2f 2065 6c65 6d65 6e74 2077 6974 6820 // element with \n-000f0750: 6d69 6e4f 6363 7572 733d 3120 616e 6420 minOccurs=1 and \n-000f0760: 6669 7865 6420 7661 6c75 6520 3220 3c2f fixed value 2
    . \n-000f0790: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-000f07b0: 2f73 7061 6e3e 205f 5f73 697a 6520 303a /span> __size 0:\n-000f07c0: 3130 3b20 203c 7370 616e 2063 6c61 7373 10; // se\n-000f07e0: 7175 656e 6365 2026 6c74 3b69 7465 6d26 quence <item&\n-000f07f0: 6774 3b20 7769 7468 206d 696e 4f63 6375 gt; with minOccu\n-000f0800: 7273 3d30 2c20 6d61 784f 6363 7572 733d rs=0, maxOccurs=\n-000f0810: 3130 3c2f 7370 616e 3e3c 2f64 6976 3e0a 10
    .\n-000f0820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-000f0850: 696e 743c 2f73 7061 6e3e 202a 6974 656d int *item\n-000f0860: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    s\n-000f0880: 7464 3a3a 7665 6374 6f72 266c 743b 646f td::vector<do\n-000f0890: 7562 6c65 2667 743b 206e 756d 7320 323b uble> nums 2;\n-000f08a0: 203c 7370 616e 2063 6c61 7373 3d22 636f // sequen\n-000f08c0: 6365 2026 6c74 3b6e 756d 7326 6774 3b20 ce <nums> \n-000f08d0: 7769 7468 206d 696e 4f63 6375 7273 3d32 with minOccurs=2\n-000f08e0: 2c20 6d61 784f 6363 7572 733d 756e 626f , maxOccurs=unbo\n-000f08f0: 756e 6465 6420 3c2f 7370 616e 3e3c 2f64 unded .
    };
    .\n-000f0920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    struct \n-000f0970: 6172 7261 794f 6669 6e74 203c 2f64 6976 arrayOfint .
    {
    . \n-000f09b0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-000f09d0: 2f73 7061 6e3e 202a 5f5f 7074 7220 313a /span> *__ptr 1:\n-000f09e0: 3130 303b 203c 7370 616e 2063 6c61 7373 100; // mi\n-000f0a00: 6e4f 6363 7572 733d 312c 206d 6178 4f63 nOccurs=1, maxOc\n-000f0a10: 6375 7273 3d31 3030 203c 2f73 7061 6e3e curs=100 \n-000f0a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int size;
    .<\n-000f0a70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f0a80: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    \n-000f0a90: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This defin\n-000f1360: 6573 2074 6865 2066 6f6c 6c6f 7769 6e67 es the following\n-000f1370: 2073 6368 656d 6120 7479 7065 2069 6e20 schema type in \n-000f1380: 3c65 6d3e 3c63 6f64 653e 7469 6d65 2e78 time.x\n-000f1390: 7364 3c2f 636f 6465 3e3c 2f65 6d3e 3a3c sd:<\n-000f13a0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    &l\n-000f13e0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;simp\n-000f1400: 6c65 5479 7065 3c2f 7370 616e 3e20 3c73 leType name=\n-000f1430: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f1450: 743b 7365 636f 6e64 7326 7175 6f74 3b3c t;seconds"<\n-000f1460: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
    <restriction<\n-000f14b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bas\n-000f14d0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:i\n-000f1500: 6e74 2671 756f 743b 3c2f 7370 616e 3e2f nt"/\n-000f1510: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    .&l\n-000f1530: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/sim\n-000f1550: 706c 6554 7970 653c 2f73 7061 6e3e 2667 pleType&g\n-000f1560: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
    .
    <\n-000f1570: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000f1580: 203c 2f64 6976 3e3c 703e 4120 636f 6d70

    A comp\n-000f1590: 6c65 7854 7970 6520 7769 7468 2073 696d lexType with sim\n-000f15a0: 706c 6543 6f6e 7465 6e74 2069 7320 6465 pleContent is de\n-000f15b0: 6669 6e65 6420 7769 7468 2061 2077 7261 fined with a wra\n-000f15c0: 7070 6572 2073 7472 7563 742f 636c 6173 pper struct/clas\n-000f15d0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n-000f1600: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f1610: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct time__date .
    {
    .<\n-000f1650: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f1660: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-000f1680: 6861 723c 2f73 7061 6e3e 202a 5f5f 6974 har *__it\n-000f1690: 656d 3b20 3c73 7061 6e20 636c 6173 733d em; // som\n-000f16b0: 6520 6375 7374 6f6d 2066 6f72 6d61 7420 e custom format \n-000f16c0: 6461 7465 2028 7265 7374 7269 6374 696f date (restrictio\n-000f16d0: 6e20 6f66 2073 7472 696e 6729 203c 2f73 n of string)
    .
    @\n-000f1700: 203c 7370 616e 2063 6c61 7373 3d22 6b65 enum time__zone { \n-000f1730: 4553 542c 2047 4d54 2c20 2e2e 2e20 7d20 EST, GMT, ... } \n-000f1740: 7a6f 6e65 3b20 3c2f 6469 763e 0a3c 6469 zone;
    .}\n-000f1760: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d

  • .
This defines th\n-000f1790: 6520 666f 6c6c 6f77 696e 6720 7363 6865 e following sche\n-000f17a0: 6d61 2074 7970 6520 696e 203c 656d 3e3c ma type in <\n-000f17b0: 636f 6465 3e74 696d 652e 7873 643c 2f63 code>time.xsd:

.<\n-000f17d0: 6469 7620 636c 6173 733d 2261 6c74 223e div class=\"alt\">\n-000f17e0: 203c 6469 7620 636c 6173 733d 2266 7261
<complexTy\n-000f1830: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe \n-000f1850: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="da\n-000f1880: 7465 2671 756f 743b 3c2f 7370 616e 3e26 te"&\n-000f1890: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n-000f18b0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;sim\n-000f18d0: 706c 6543 6f6e 7465 6e74 3c2f 7370 616e pleContent>
. \n-000f1900: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <extension base=\n-000f1970: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string\n-000f1980: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n-000f1990: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000f19b0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/sim\n-000f19d0: 706c 6543 6f6e 7465 6e74 3c2f 7370 616e pleContent>
. \n-000f1a00: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <a\n-000f1a20: 7474 7269 6275 7465 3c2f 7370 616e 3e20 ttribute \n-000f1a30: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n-000f1a70: 756f 743b 7a6f 6e65 2671 756f 743b 3c2f uot;zone" type\n-000f1aa0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="time:z\n-000f1ad0: 6f6e 6526 7175 6f74 3b3c 2f73 7061 6e3e one"\n-000f1ae0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 use=&q\n-000f1b20: 756f 743b 6f70 7469 6f6e 616c 2671 756f uot;optional&quo\n-000f1b30: 743b 3c2f 7370 616e 3e2f 2667 743b 203c t;/> <\n-000f1b40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</complexTy\n-000f1b80: 7065 3c2f 7370 616e 3e26 6774 3b3c 2f64 pe>.
<simpleType name\n-000f1bf0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="zone&q\n-000f1c20: 756f 743b 3c2f 7370 616e 3e26 6774 3b20 uot;> \n-000f1c30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n-000f1c50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f1c60: 6f72 6474 7970 6522 3e72 6573 7472 6963 ordtype\">restric\n-000f1c70: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion base="\n-000f1cc0: 7873 643a 7374 7269 6e67 2671 756f 743b xsd:string"\n-000f1cd0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<enumerati\n-000f1d20: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-000f1d40: 7661 6c75 653c 2f73 7061 6e3e 3d3c 7370 value="E\n-000f1d70: 5354 2671 756f 743b 3c2f 7370 616e 3e2f ST"/\n-000f1d80: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000f1da0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000f1dc0: 656e 756d 6572 6174 696f 6e3c 2f73 7061 enumeration value="GMT"\n-000f1e20: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
... <\n-000f1e50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</<\n-000f1e70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f1e80: 6f72 6474 7970 6522 3e72 6573 7472 6963 ordtype\">restric\n-000f1e90: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b20 tion> \n-000f1ea0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</simpleTy\n-000f1ee0: 7065 3c2f 7370 616e 3e26 6774 3b3c 2f64 pe>.

Data value \n-000f1f20: 6c65 6e67 7468 2063 6f6e 7374 7261 696e length constrain\n-000f1f30: 7473 206f 6620 7369 6d70 6c65 5479 7065 ts of simpleType\n-000f1f40: 7320 616e 6420 636f 6d70 6c65 7854 7970 s and complexTyp\n-000f1f50: 6573 2077 6974 6820 7369 6d70 6c65 436f es with simpleCo\n-000f1f60: 6e74 656e 7420 6172 6520 6465 6669 6e65 ntent are define\n-000f1f70: 6420 6173 2066 6f6c 6c6f 7773 3a3c 2f70 d as follows:.

\n-000f1fc0: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef <\n-000f1fd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f1fe0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *ns__string\n-000f2000: 3235 3620 303a 3235 363b 203c 7370 616e 256 0:256; // simpleType r\n-000f2030: 6573 7472 6963 7469 6f6e 206f 6620 7374 estriction of st\n-000f2040: 7269 6e67 2077 6974 6820 6d61 7820 6c65 ring with max le\n-000f2050: 6e67 7468 2032 3536 2063 6861 7261 6374 ngth 256 charact\n-000f2060: 6572 7320 3c2f 7370 616e 3e3c 2f64 6976 ers .
typede\n-000f20a0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f char *\n-000f20d0: 6e73 5f5f 7374 7269 6e67 3130 2031 303a ns__string10 10:\n-000f20e0: 3130 3b20 3c73 7061 6e20 636c 6173 733d 10; // sim\n-000f2100: 706c 6554 7970 6520 7265 7374 7269 6374 pleType restrict\n-000f2110: 696f 6e20 6f66 2073 7472 696e 6720 7769 ion of string wi\n-000f2120: 7468 206c 656e 6774 6820 6f66 2031 3020 th length of 10 \n-000f2130: 6368 6172 6163 7465 7273 203c 2f73 7061 characters
.
typedef \n-000f2180: 7374 643a 3a73 7472 696e 6720 2a6e 735f std::string *ns_\n-000f2190: 5f73 7472 696e 6738 2038 3b20 3c73 7061 _string8 8; // simpleType \n-000f21c0: 7265 7374 7269 6374 696f 6e20 6f66 2073 restriction of s\n-000f21d0: 7472 696e 6720 7769 7468 2061 7420 6c65 tring with at le\n-000f21e0: 6173 7420 3820 6368 6172 6163 7465 7273 ast 8 characters\n-000f21f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-000f2200: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f2210: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__data // simpleCon\n-000f2260: 7465 6e74 2077 7261 7070 6572 203c 2f73 tent wrapper
.
{.
char\n-000f22d0: 202a 5f5f 6974 656d 203a 3235 363b 203c *__item :256; <\n-000f22e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f22f0: 656e 7422 3e2f 2f20 7369 6d70 6c65 436f ent\">// simpleCo\n-000f2300: 6e74 656e 7420 7769 7468 2061 7420 6d6f ntent with at mo\n-000f2310: 7374 2032 3536 2063 6861 7261 6374 6572 st 256 character\n-000f2320: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
.\n-000f2330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
@ \n-000f2360: 6368 6172 3c2f 7370 616e 3e20 2a6e 616d char *nam\n-000f2370: 6520 313b 2020 2020 2020 3c73 7061 6e20 e 1; \n-000f2390: 2f2f 2072 6571 7569 7265 6420 6e61 6d65 // required name\n-000f23a0: 2061 7474 7269 6275 7465 203c 2f73 7061 attribute
.
}; .
str\n-000f2400: 7563 7420 3c2f 7370 616e 3e74 696d 655f uct time_\n-000f2410: 5f64 6174 6520 3c73 7061 6e20 636c 6173 _date // s\n-000f2430: 696d 706c 6543 6f6e 7465 6e74 2077 7261 impleContent wra\n-000f2440: 7070 6572 203c 2f73 7061 6e3e 3c2f 6469 pper .
{
. \n-000f2480: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-000f24a0: 723c 2f73 7061 6e3e 202a 5f5f 6974 656d r *__item\n-000f24b0: 203a 3130 303b 203c 2f64 6976 3e0a 3c64 :100;
.\n-000f24d0: 2020 4020 3c73 7061 6e20 636c 6173 733d @ enum time__zone\n-000f2500: 207b 2045 5354 2c20 474d 542c 202e 2e2e { EST, GMT, ...\n-000f2510: 207d 207a 6f6e 6520 3d20 474d 543b 203c } zone = GMT; <\n-000f2520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}
.\n-000f2540: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

Set th\n-000f2560: 6520 3c63 6f64 653e 2353 4f41 505f 584d e #SOAP_XM\n-000f2570: 4c5f 5354 5249 4354 3c2f 636f 6465 3e20 L_STRICT \n-000f2580: 6d6f 6465 2066 6c61 6720 746f 2065 6e61 mode flag to ena\n-000f2590: 626c 6520 7468 6520 7661 6c69 6461 7469 ble the validati\n-000f25a0: 6f6e 206f 6620 7661 6c75 6520 6c65 6e67 on of value leng\n-000f25b0: 7468 2063 6f6e 7374 7261 696e 7473 2e3c th constraints.<\n-000f25c0: 2f70 3e0a 3c70 3e53 6565 2061 6c73 6f20 /p>.

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

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

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

.

.Valu\n-000f26b0: 6520 7261 6e67 6520 7265 7374 7269 6374 e range restrict\n-000f26c0: 696f 6e73 3c2f 6833 3e0a 3c70 3e53 696d ions

.

Sim\n-000f26d0: 696c 6172 2074 6f20 6461 7461 206c 656e ilar to data len\n-000f26e0: 6774 6820 636f 6e73 7472 6169 6e74 7320 gth constraints \n-000f26f0: 666f 7220 7374 7269 6e67 2d62 6173 6564 for string-based\n-000f2700: 2064 6174 612c 2069 6e74 6567 6572 2061 data, integer a\n-000f2710: 6e64 2066 6c6f 6174 696e 6720 706f 696e nd floating poin\n-000f2720: 7420 7661 6c75 6520 7261 6e67 6520 636f t value range co\n-000f2730: 6e73 7472 6169 6e74 7320 6f6e 206e 756d nstraints on num\n-000f2740: 6572 6963 2073 696d 706c 6554 7970 6573 eric simpleTypes\n-000f2750: 2061 6e64 2063 6f6d 706c 6578 5479 7065 and complexType\n-000f2760: 7320 7769 7468 2073 696d 706c 6543 6f6e s with simpleCon\n-000f2770: 7465 6e74 2061 7265 2064 6563 6c61 7265 tent are declare\n-000f2780: 6420 7769 7468 203c 636f 6465 3e6c 6f77 d with low\n-000f2790: 203a 2068 6967 683c 2f63 6f64 653e 2c20 : high, \n-000f27a0: 7768 6572 6520 3c63 6f64 653e 6c6f 773c where low<\n-000f27b0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and high are\n-000f27d0: 206f 7074 696f 6e61 6c2e 3c2f 703e 0a3c optional.

.<\n-000f27e0: 703e 4173 206f 6620 6753 4f41 5020 322e p>As of gSOAP 2.\n-000f27f0: 382e 3236 2c20 666c 6f61 7469 6e67 2070 8.26, floating p\n-000f2800: 6f69 6e74 2076 616c 7565 2072 616e 6765 oint value range\n-000f2810: 7320 616e 6420 696e 7465 6765 7220 7261 s and integer ra\n-000f2820: 6e67 6573 2063 616e 2062 6520 6578 636c nges can be excl\n-000f2830: 7573 6976 6520 6279 2061 6464 696e 6720 usive by adding \n-000f2840: 3c63 6f64 653e 266c 743b 3c2f 636f 6465 < on either side\n-000f2860: 206f 6620 7468 6520 3c63 6f64 653e 3a3c of the :<\n-000f2870: 2f63 6f64 653e 2072 616e 6765 206f 7065 /code> range ope\n-000f2880: 7261 746f 723a 3c2f 703e 0a3c 7461 626c rator:

...range \n-000f28f0: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 validat\n-000f2920: 696f 6e20 6368 6563 6b20 2020 203c 2f74 ion check ..1
1 <= x \n-000f29c0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-000f2a10: 636f 6465 3e31 203a 3c2f 636f 6465 3e20 code>1 :
\n-000f2a20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 1 <=\n-000f2a50: 2078 2020 2020 3c2f 7464 3e3c 2f74 723e x \n-000f2a60: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..: 10 x\n-000f2ae0: 2026 6c74 3b3d 2031 3020 2020 203c 2f74 <= 10 ..1 : 10 \n-000f2b50: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 1 <=\n-000f2b80: 2078 2026 6c74 3b3d 2031 3020 2020 203c x <= 10 <\n-000f2b90: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..1 < : <\n-000f2bf0: 2031 303c 2f63 6f64 653e 2020 203c 2f74 10
1 < x <\n-000f2c30: 3b20 3130 2020 2020 3c2f 7464 3e3c 2f74 ; 10 ..1 &\n-000f2c90: 6c74 3b20 3130 3c2f 636f 6465 3e20 2020 lt; 10 \n-000f2ca0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 < x \n-000f2cd0: 266c 743b 2031 3020 2020 203c 2f74 643e < 10 \n-000f2ce0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..1\n-000f2d30: 203a 2026 6c74 3b20 3130 3c2f 636f 6465 : < 10 1 <\n-000f2d70: 3b3d 2078 2026 6c74 3b20 3130 2020 2020 ;= x < 10 \n-000f2d80: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-000f2dd0: 636f 6465 3e3a 2026 6c74 3b20 3130 3c2f code>: < 10 x\n-000f2e10: 2026 6c74 3b20 3130 2020 2020 3c2f 7464 < 10 ..\n-000f2e70: 266c 743b 2031 303c 2f63 6f64 653e 2020 < 10 \n-000f2e80: 203c 2f74 643e 3c74 6420 636c 6173 733d x < 1\n-000f2eb0: 3020 2020 203c 2f74 643e 3c2f 7472 3e0a 0 .\n-000f2ec0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .1 <\n-000f2f10: 203a 3c2f 636f 6465 3e20 2020 3c2f 7464 : 1 < x <\n-000f2f50: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..1 <\n-000f2fb0: 2020 203c 2f74 643e 3c74 6420 636c 6173 1 <\n-000f2fe0: 2078 2020 2020 3c2f 7464 3e3c 2f74 723e x \n-000f2ff0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..1 <\n-000f3040: 3b20 3a20 3130 3c2f 636f 6465 3e20 2020 ; : 10 \n-000f3050: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 < x \n-000f3080: 266c 743b 3d20 3130 2020 203c 2f74 643e <= 10 \n-000f3090: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c ..<\n-000f30a0: 703e 466f 7220 6578 616d 706c 653a 3c2f p>For example:.
typedef \n-000f3100: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__int10 0\n-000f3130: 3a31 303b 203c 7370 616e 2063 6c61 7373 :10; // si\n-000f3150: 6d70 6c65 5479 7065 2072 6573 7472 6963 mpleType restric\n-000f3160: 7469 6f6e 206f 6620 696e 7420 302e 2e31 tion of int 0..1\n-000f3170: 3020 3c2f 7370 616e 3e3c 2f64 6976 3e0a 0
.\n-000f3180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
typedef \n-000f32c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n-000f32e0: 2f73 7061 6e3e 206e 735f 5f66 6c6f 6174 /span> ns__float\n-000f32f0: 202d 312e 3020 266c 743b 3a26 6c74 3b20 -1.0 <:< \n-000f3300: 3130 2e35 3b20 3c73 7061 6e20 636c 6173 10.5; // s\n-000f3320: 696d 706c 6554 7970 6520 7265 7374 7269 impleType restri\n-000f3330: 6374 696f 6e20 6f66 2066 6c6f 6174 2069 ction of float i\n-000f3340: 6e20 282d 312c 3130 2e35 2920 3c2f 7370 n (-1,10.5)
.
struct \n-000f3390: 6e73 5f5f 6461 7461 203c 7370 616e 2063 ns__data /\n-000f33b0: 2f20 7369 6d70 6c65 436f 6e74 656e 7420 / simpleContent \n-000f33c0: 7772 6170 7065 7220 3c2f 7370 616e 3e3c wrapper <\n-000f33d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n-000f33f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-000f3420: 696e 743c 2f73 7061 6e3e 205f 5f69 7465 int __ite\n-000f3430: 6d20 303a 3130 3b20 3c73 7061 6e20 636c m 0:10; //\n-000f3450: 2073 696d 706c 6543 6f6e 7465 6e74 2072 simpleContent r\n-000f3460: 616e 6765 2030 2e2e 3130 203c 2f73 7061 ange 0..10
.
@ <\n-000f3490: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f34a0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *name 1; \n-000f34c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // requir\n-000f34e0: 6564 206e 616d 6520 6174 7472 6962 7574 ed name attribut\n-000f34f0: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
.\n-000f3500: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

This defi\n-000f3a10: 6e65 7320 7468 6520 666f 6c6c 6f77 696e nes the followin\n-000f3a20: 6720 7363 6865 6d61 2074 7970 6520 696e g schema type in\n-000f3a30: 203c 656d 3e3c 636f 6465 3e74 696d 652e time.\n-000f3a40: 7873 643c 2f63 6f64 653e 3c2f 656d 3e3a xsd:\n-000f3a50: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
&\n-000f3a90: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;sim\n-000f3ab0: 706c 6554 7970 653c 2f73 7061 6e3e 203c pleType <\n-000f3ac0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f3ad0: 6f72 6422 3e6e 616d 653c 2f73 7061 6e3e ord\">name\n-000f3ae0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f3b00: 6f74 3b73 6563 6f6e 6426 7175 6f74 3b3c ot;second"<\n-000f3b10: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
<restriction<\n-000f3b60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bas\n-000f3b80: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:i\n-000f3bb0: 6e74 2671 756f 743b 3c2f 7370 616e 3e26 nt"&\n-000f3bc0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n-000f3be0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <p\n-000f3c00: 6174 7465 726e 3c2f 7370 616e 3e20 3c73 attern value\n-000f3c30: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f3c50: 6f74 3b5b 312d 355d 3f5b 302d 395d 7c36 ot;[1-5]?[0-9]|6\n-000f3c60: 3026 7175 6f74 3b3c 2f73 7061 6e3e 2f26 0"/&\n-000f3c70: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n-000f3c90: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/re\n-000f3cb0: 7374 7269 6374 696f 6e3c 2f73 7061 6e3e striction\n-000f3cc0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.&l\n-000f3ce0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/sim\n-000f3d00: 706c 6554 7970 653c 2f73 7061 6e3e 2667 pleType&g\n-000f3d10: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
.
<\n-000f3d20: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000f3d30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373

\n-000f3d50: 2054 6865 2070 6174 7465 726e 2073 7472 The pattern str\n-000f3d60: 696e 6720 6d75 7374 2063 6f6e 7461 696e ing must contain\n-000f3d70: 2061 2076 616c 6964 2072 6567 756c 6172 a valid regular\n-000f3d80: 2065 7870 7265 7373 696f 6e2e 3c2f 703e expression.

\n-000f3d90: 0a3c 703e 4120 7370 6563 6961 6c20 6361 .

A special ca\n-000f3da0: 7365 2066 6f72 2043 2066 6f72 6d61 7420 se for C format \n-000f3db0: 7374 7269 6e67 2070 6174 7465 726e 7320 string patterns \n-000f3dc0: 6973 2069 6e74 726f 6475 6365 6420 696e is introduced in\n-000f3dd0: 2067 534f 4150 2032 2e38 2e31 382e 2057 gSOAP 2.8.18. W\n-000f3de0: 6865 6e20 3c65 6d3e 3c63 6f64 653e 7873 hen xs\n-000f3df0: 643a 746f 7461 6c44 6967 6974 733c 2f63 d:totalDigits and xsd:frac\n-000f3e20: 7469 6f6e 4469 6769 7473 3c2f 636f 6465 tionDigits are given\n-000f3e40: 2069 6e20 6120 5853 4420 6669 6c65 2c20 in a XSD file, \n-000f3e50: 7468 656e 2061 2043 2066 6f72 6d61 7420 then a C format \n-000f3e60: 7374 7269 6e67 2069 7320 7072 6f64 7563 string is produc\n-000f3e70: 6564 2074 6f20 6f75 7470 7574 2066 6c6f ed to output flo\n-000f3e80: 6174 696e 6720 706f 696e 7420 7661 6c75 ating point valu\n-000f3e90: 6573 2077 6974 6820 7468 6520 7072 6f70 es with the prop\n-000f3ea0: 6572 2070 7265 6369 7369 6f6e 2061 6e64 er precision and\n-000f3eb0: 2073 6361 6c65 2e20 466f 7220 6578 616d scale. For exam\n-000f3ec0: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

.
<simpleType name="ratio&quo\n-000f3f80: 743b 3c2f 7370 616e 3e26 6774 3b20 3c2f t;> .
<restricti\n-000f3fd0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-000f3ff0: 6261 7365 3c2f 7370 616e 3e3d 3c73 7061 base="xs\n-000f4020: 643a 666c 6f61 7426 7175 6f74 3b3c 2f73 d:float">
.\n-000f4040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<totalDigits<\n-000f4080: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val\n-000f40a0: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="5&qu\n-000f40d0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> \n-000f40e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n-000f4100: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;fract\n-000f4120: 696f 6e44 6967 6974 733c 2f73 7061 6e3e ionDigits\n-000f4130: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value=\n-000f4170: 2671 756f 743b 3226 7175 6f74 3b3c 2f73 "2"/>
\n-000f4190: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</restriction<\n-000f41d0: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
</simpleType>
.<\n-000f4230: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

\n-000f4250: 7072 6f64 7563 6573 3a3c 2f70 3e0a 3c64 produces:

.
type\n-000f42a0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def float time__ratio "\n-000f4300: 2535 2e32 6626 7175 6f74 3b3c 2f73 7061 %5.2f";
.
\n-000f4320: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

H\n-000f4890: 6572 652c 2074 6865 203c 636f 6465 3e6e ere, the n\n-000f48a0: 735f 5f72 6563 6f72 643c 2f63 6f64 653e s__record\n-000f48b0: 2073 7472 7563 7420 6973 2073 6572 6961 struct is seria\n-000f48c0: 6c69 7a65 6420 7769 7468 2071 7561 6c69 lized with quali\n-000f48d0: 6669 6564 2065 6c65 6d65 6e74 203c 636f fied element name a\n-000f48f0: 6e64 2075 6e71 7561 6c69 6669 6564 2061 nd unqualified a\n-000f4900: 7474 7269 6275 7465 203c 636f 6465 3e74 ttribute t\n-000f4910: 7970 653c 2f63 6f64 653e 3a3c 2f70 3e0a ype:

.\n-000f4920: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<ns:recor\n-000f4980: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d t\n-000f49a0: 7970 653c 2f73 7061 6e3e 3d3c 7370 616e ype="...\n-000f49d0: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n-000f49e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000f4a00: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;ns:na\n-000f4a20: 6d65 3c2f 7370 616e 3e26 6774 3b2e 2e2e me>...\n-000f4a30: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </n\n-000f4a50: 733a 6e61 6d65 3c2f 7370 616e 3e26 6774 s:name>\n-000f4a60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
</\n-000f4a80: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:rec\n-000f4aa0: 6f72 643c 2f73 7061 6e3e 2667 743b 3c2f ord>.

The \"colon\n-000f4ae0: 206e 6f74 6174 696f 6e22 2066 6f72 2073 notation\" for s\n-000f4af0: 7472 7563 742f 636c 6173 732f 756e 696f truct/class/unio\n-000f4b00: 6e20 6d65 6d62 6572 206e 616d 6573 2069 n member names i\n-000f4b10: 7320 7573 6564 2074 6f20 6f76 6572 7269 s used to overri\n-000f4b20: 6465 2065 6c65 6d65 6e74 2061 6e64 2061 de element and a\n-000f4b30: 7474 7269 6275 7465 2071 7561 6c69 6669 ttribute qualifi\n-000f4b40: 6564 206f 7220 756e 7175 616c 6966 6965 ed or unqualifie\n-000f4b50: 6420 666f 726d 732e 2054 6f20 6f76 6572 d forms. To over\n-000f4b60: 7269 6465 2074 6865 2066 6f72 6d20 666f ride the form fo\n-000f4b70: 7220 696e 6469 7669 6475 616c 206d 656d r individual mem\n-000f4b80: 6265 7273 2074 6861 7420 7265 7072 6573 bers that repres\n-000f4b90: 656e 7420 656c 656d 656e 7473 2061 6e64 ent elements and\n-000f4ba0: 2061 7474 7269 6275 7465 732c 2075 7365 attributes, use\n-000f4bb0: 2061 206e 616d 6573 7061 6365 2070 7265 a namespace pre\n-000f4bc0: 6669 7820 616e 6420 636f 6c6f 6e20 7769 fix and colon wi\n-000f4bd0: 7468 2074 6865 206d 656d 6265 7220 6e61 th the member na\n-000f4be0: 6d65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 me:

.
\n-000f4c10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-000f4c30: 2073 6368 656d 6120 656c 656d 656e 7446 schema elementF\n-000f4c40: 6f72 6d3a 2071 7561 6c69 6669 6564 203c orm: qualified <\n-000f4c50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-000f4c70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f4c80: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-000f4c90: 7363 6865 6d61 2061 7474 7269 6275 7465 schema attribute\n-000f4ca0: 466f 726d 3a20 756e 7175 616c 6966 6965 Form: unqualifie\n-000f4cb0: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
.\n-000f4cc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-000f4cf0: 2f73 7061 6e3e 6e73 5f5f 7265 636f 7264 /span>ns__record\n-000f4d00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
@ char * \n-000f4d60: 6e73 3a74 7970 653b 203c 2f64 6976 3e0a ns:type;
.\n-000f4d70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-000f4da0: 6368 6172 3c2f 7370 616e 3e20 2a20 3a6e char * :n\n-000f4db0: 616d 653b 203c 2f64 6976 3e0a 3c64 6976 ame;
.};\n-000f4dd0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
where nam\n-000f4e00: 653c 2f63 6f64 653e 2069 7320 756e 7175 e is unqu\n-000f4e10: 616c 6966 6965 6420 616e 6420 3c63 6f64 alified and type
is\n-000f4e30: 2071 7561 6c69 6669 6564 3a3c 2f70 3e0a qualified:

.\n-000f4e40: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<ns:recor\n-000f4ea0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d n\n-000f4ec0: 733a 7479 7065 3c2f 7370 616e 3e3d 3c73 s:type="\n-000f4ef0: 2e2e 2e26 7175 6f74 3b3c 2f73 7061 6e3e ..."\n-000f4f00: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000f4f20: 266c 743b 3c73 7061 6e20 636c 6173 733d <na\n-000f4f40: 6d65 3c2f 7370 616e 3e26 6774 3b2e 2e2e me>...\n-000f4f50: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </n\n-000f4f70: 616d 653c 2f73 7061 6e3e 2667 743b 203c ame> <\n-000f4f80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</ns:record\n-000f4fc0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
\n-000f4ff0: 3c70 3e54 6865 2063 6f6c 6f6e 206e 6f74

The colon not\n-000f5000: 6174 696f 6e20 6973 2061 2073 796e 7461 ation is a synta\n-000f5010: 6374 6963 206e 6f74 6174 696f 6e20 7573 ctic notation us\n-000f5020: 6564 206f 6e6c 7920 696e 2074 6865 2069 ed only in the i\n-000f5030: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-000f5040: 6669 6c65 2073 796e 7461 782c 2069 7420 file syntax, it \n-000f5050: 6973 206e 6f74 2074 7261 6e73 6c61 7465 is not translate\n-000f5060: 6420 746f 2074 6865 2043 2f43 2b2b 206f d to the C/C++ o\n-000f5070: 7574 7075 742e 3c2f 703e 0a3c 703e 5468 utput.

.

Th\n-000f5080: 6520 636f 6c6f 6e20 6e6f 7461 7469 6f6e e colon notation\n-000f5090: 2064 6f65 7320 6e6f 7420 6176 6f69 6420 does not avoid \n-000f50a0: 6e61 6d65 2063 6c61 7368 6573 2062 6574 name clashes bet\n-000f50b0: 7765 656e 206d 656d 6265 7273 2e20 466f ween members. Fo\n-000f50c0: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n-000f50d0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000f50e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n-000f5110: 7563 7420 3c2f 7370 616e 3e78 5f5f 7265 uct x__re\n-000f5120: 636f 7264 203c 2f64 6976 3e0a 3c64 6976 cord
.{<\n-000f5140: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
@ char * name;
\n-000f5190: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char * x\n-000f51d0: 3a6e 616d 653b 203c 2f64 6976 3e0a 3c64 :name;
.\n-000f51f0: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
<\n-000f5200: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000f5210: 3c70 3e72 6573 756c 7473 2069 6e20 6120

results in a \n-000f5220: 7265 6465 6669 6e69 7469 6f6e 2065 7272 redefinition err\n-000f5230: 6f72 2c20 7369 6e63 6520 626f 7468 206d or, since both m\n-000f5240: 656d 6265 7273 2068 6176 6520 7468 6520 embers have the \n-000f5250: 7361 6d65 206e 616d 652e 2054 6f20 6176 same name. To av\n-000f5260: 6f69 6420 6e61 6d65 2063 6c61 7368 6573 oid name clashes\n-000f5270: 2c20 7573 6520 6120 756e 6465 7273 636f , use a undersco\n-000f5280: 7265 2073 7566 6669 783a 3c2f 703e 0a3c re suffix:

.<\n-000f5290: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000f52a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n-000f52d0: 7563 7420 3c2f 7370 616e 3e78 5f5f 7265 uct x__re\n-000f52e0: 636f 7264 203c 2f64 6976 3e0a 3c64 6976 cord
.{<\n-000f5300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
@ char * name;
\n-000f5350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char * x\n-000f5390: 3a6e 616d 655f 3b20 3c2f 6469 763e 0a3c :name_;
.<\n-000f53a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f53b0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n-000f53c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

which\n-000f5560: 2061 766f 6964 7320 7468 6520 6e61 6d65 avoids the name\n-000f5570: 2063 6c61 7368 2e20 486f 7765 7665 722c clash. However,\n-000f5580: 2074 6865 2072 6573 756c 7469 6e67 2073 the resulting s\n-000f5590: 6368 656d 6120 6973 2064 6966 6665 7265 chema is differe\n-000f55a0: 6e74 2073 696e 6365 2074 6865 206c 6173 nt since the las\n-000f55b0: 7420 6578 616d 706c 6520 6765 6e65 7261 t example genera\n-000f55c0: 7465 7320 6120 676c 6f62 616c 203c 636f tes a global name e\n-000f55e0: 6c65 6d65 6e74 2064 6566 696e 6974 696f lement definitio\n-000f55f0: 6e20 7468 6174 2069 7320 7265 6665 7265 n that is refere\n-000f5600: 6e63 6564 2062 7920 7468 6520 6c6f 6361 nced by the loca\n-000f5610: 6c20 656c 656d 656e 742e 3c2f 703e 0a3c l element.

.<\n-000f5620: 703e 4d6f 7265 2073 7065 6369 6669 6361 p>More specifica\n-000f5630: 6c6c 792c 2074 6865 2064 6966 6665 7265 lly, the differe\n-000f5640: 6e63 6520 6265 7477 6565 6e20 7468 6520 nce between the \n-000f5650: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n-000f5660: 2063 6f6e 7665 6e74 696f 6e20 7769 7468 convention with\n-000f5670: 2064 6f75 626c 6520 756e 6465 7273 636f double undersco\n-000f5680: 7265 7320 616e 6420 636f 6c6f 6e20 6e6f res and colon no\n-000f5690: 7461 7469 6f6e 2069 7320 7468 6174 2074 tation is that t\n-000f56a0: 6865 206e 616d 6573 7061 6365 2070 7265 he namespace pre\n-000f56b0: 6669 7820 636f 6e76 656e 7469 6f6e 2067 fix convention g\n-000f56c0: 656e 6572 6174 6573 2073 6368 656d 6120 enerates schema \n-000f56d0: 656c 656d 656e 742f 6174 7472 6962 7574 element/attribut\n-000f56e0: 6520 7265 6665 7265 6e63 6573 2074 6f20 e references to \n-000f56f0: 656c 656d 656e 7473 2f61 7474 7269 6275 elements/attribu\n-000f5700: 7465 7320 6174 2074 6865 2074 6f70 206c tes at the top l\n-000f5710: 6576 656c 2c20 7768 696c 6520 7468 6520 evel, while the \n-000f5720: 636f 6c6f 6e20 6e6f 7461 7469 6f6e 206f colon notation o\n-000f5730: 6e6c 7920 6166 6665 6374 7320 7468 6520 nly affects the \n-000f5740: 6c6f 6361 6c20 656c 656d 656e 742f 6174 local element/at\n-000f5750: 7472 6962 7574 6520 6e61 6d65 7370 6163 tribute namespac\n-000f5760: 6520 7175 616c 6966 6963 6174 696f 6e20 e qualification \n-000f5770: 6279 2066 6f72 6d20 6f76 6572 7269 6469 by form overridi\n-000f5780: 6e67 2e20 5468 6973 2069 7320 6265 7374 ng. This is best\n-000f5790: 2069 6c6c 7573 7472 6174 6564 2062 7920 illustrated by \n-000f57a0: 616e 2065 7861 6d70 6c65 3a3c 2f70 3e0a an example:

.\n-000f57b0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st\n-000f57f0: 7275 6374 203c 2f73 7061 6e3e 785f 5f72 ruct x__r\n-000f5800: 6563 6f72 6420 3c2f 6469 763e 0a3c 6469 ecord
.{\n-000f5820: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
char * :name; .
char *\n-000f58b0: 2078 3a70 686f 6e65 3b20 3c2f 6469 763e x:phone;
\n-000f58c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char * x\n-000f5900: 5f5f 6661 783b 203c 2f64 6976 3e0a 3c64 __fax;
.\n-000f5920: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-000f5940: 6172 3c2f 7370 616e 3e20 2a20 795f 5f7a ar * y__z\n-000f5950: 6970 3b20 3c2f 6469 763e 0a3c 6469 7620 ip;
.
};<\n-000f5970: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n-000f5990: 7768 6963 6820 6765 6e65 7261 7465 7320 which generates \n-000f59a0: 7468 6520 666f 6c6c 6f77 696e 6720 3c65 the following x.xsdschema:\n-000f59d0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
&\n-000f5a10: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;com\n-000f5a30: 706c 6578 5479 7065 3c2f 7370 616e 3e20 plexType \n-000f5a40: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n-000f5a80: 756f 743b 7265 636f 7264 2671 756f 743b uot;record"\n-000f5a90: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<sequence>
.\n-000f5af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<element name="name"\n-000f5b80: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; t\n-000f5ba0: 7970 653c 2f73 7061 6e3e 3d3c 7370 616e ype="xsd\n-000f5bd0: 3a73 7472 696e 6726 7175 6f74 3b3c 2f73 :string" minOc\n-000f5c00: 6375 7273 3c2f 7370 616e 3e3d 3c73 7061 curs="0&\n-000f5c30: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; maxOccurs=\n-000f5c80: 2671 756f 743b 3126 7175 6f74 3b3c 2f73 "1" nilla\n-000f5cb0: 626c 653c 2f73 7061 6e3e 3d3c 7370 616e ble="tru\n-000f5ce0: 6526 7175 6f74 3b3c 2f73 7061 6e3e 203c e" <\n-000f5cf0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f5d00: 6f72 6422 3e66 6f72 6d3c 2f73 7061 6e3e ord\">form\n-000f5d10: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f5d30: 6f74 3b75 6e71 7561 6c69 6669 6564 2671 ot;unqualified&q\n-000f5d40: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n-000f5d50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
&l\n-000f5d70: 743b 3c73 7061 6e20 636c 6173 733d 226b t;elem\n-000f5d90: 656e 743c 2f73 7061 6e3e 203c 7370 616e ent name="p\n-000f5de0: 686f 6e65 2671 756f 743b 3c2f 7370 616e hone" type=\n-000f5e30: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string\n-000f5e40: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " minOccurs="0" maxO\n-000f5ec0: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="1\n-000f5ef0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " nillable=\n-000f5f40: 2671 756f 743b 7472 7565 2671 756f 743b "true"\n-000f5f50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fo\n-000f5f70: 726d 3c2f 7370 616e 3e3d 3c73 7061 6e20 rm="qual\n-000f5fa0: 6966 6965 6426 7175 6f74 3b3c 2f73 7061 ified"/>
.<\n-000f5fc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f5fd0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <element ref=&\n-000f6040: 7175 6f74 3b78 3a66 6178 2671 756f 743b quot;x:fax"\n-000f6050: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c mi\n-000f6070: 6e4f 6363 7572 733c 2f73 7061 6e3e 3d3c nOccurs=<\n-000f6080: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f6090: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f60a0: 3b30 2671 756f 743b 3c2f 7370 616e 3e20 ;0" \n-000f60b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 maxOccurs<\n-000f60d0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="1"\n-000f6100: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
<element<\n-000f6150: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ref\n-000f6170: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="y:zip&\n-000f61a0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; minOccurs=\n-000f61f0: 2671 756f 743b 3026 7175 6f74 3b3c 2f73 "0" maxOc\n-000f6220: 6375 7273 3c2f 7370 616e 3e3d 3c73 7061 curs="1&\n-000f6250: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n-000f6260: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000f6280: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/sequ\n-000f62a0: 656e 6365 3c2f 7370 616e 3e26 6774 3b20 ence> \n-000f62b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</complexT\n-000f62f0: 7970 653c 2f73 7061 6e3e 2667 743b 203c ype> <\n-000f6300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<element name<\n-000f6360: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="fax&quo\n-000f6390: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n-000f63b0: 7479 7065 3c2f 7370 616e 3e3d 3c73 7061 type="xs\n-000f63e0: 643a 7374 7269 6e67 2671 756f 743b 3c2f d:string"/>
\n-000f6400: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
<\n-000f6420: 703e 616e 6420 7468 6520 3c65 6d3e 3c63 p>and the y.xsd
\n-000f6440: 3c2f 656d 3e20 7363 6865 6d61 2064 6566 schema def\n-000f6450: 696e 6573 2063 6f6e 7461 696e 733a 3c2f ines contains:.
<\n-000f64a0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;eleme\n-000f64c0: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt \n-000f64e0: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="zi\n-000f6510: 7026 7175 6f74 3b3c 2f73 7061 6e3e 203c p" <\n-000f6520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f6530: 6f72 6422 3e74 7970 653c 2f73 7061 6e3e ord\">type\n-000f6540: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f6560: 6f74 3b78 7364 3a73 7472 696e 6726 7175 ot;xsd:string&qu\n-000f6570: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n-000f6580: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

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

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

.

.XM\n-000f6680: 4c20 6e61 6d65 7370 6163 6573 2061 6e64 L namespaces and\n-000f6690: 2074 6865 206e 616d 6573 7061 6365 206d the namespace m\n-000f66a0: 6170 7069 6e67 2074 6162 6c65 3c2f 6831 apping table.

A namespace\n-000f66c0: 206d 6170 7069 6e67 2074 6162 6c65 2073 mapping table s\n-000f66d0: 686f 756c 6420 6265 2069 6e63 6c75 6465 hould be include\n-000f66e0: 6420 696e 2074 6865 2073 6f75 7263 6520 d in the source \n-000f66f0: 636f 6465 206f 6620 636c 6965 6e74 2061 code of client a\n-000f6700: 6e64 2073 6572 7669 6365 2061 7070 6c69 nd service appli\n-000f6710: 6361 7469 6f6e 732e 2054 6865 206d 6170 cations. The map\n-000f6720: 7069 6e67 2074 6162 6c65 2069 7320 7573 ping table is us\n-000f6730: 6564 2062 7920 7468 6520 7365 7269 616c ed by the serial\n-000f6740: 697a 6572 7320 616e 6420 6465 7365 7269 izers and deseri\n-000f6750: 616c 697a 6572 7320 6f66 2074 6865 2073 alizers of the s\n-000f6760: 7475 6220 616e 6420 736b 656c 6574 6f6e tub and skeleton\n-000f6770: 2066 756e 6374 696f 6e73 2074 6f20 7072 functions to pr\n-000f6780: 6f64 7563 6520 7661 6c69 6420 584d 4c20 oduce valid XML \n-000f6790: 6d65 7373 6167 6573 2061 6e64 2074 6f20 messages and to \n-000f67a0: 7061 7273 6520 616e 6420 7661 6c69 6461 parse and valida\n-000f67b0: 7465 2058 4d4c 206d 6573 7361 6765 732e te XML messages.\n-000f67c0: 2041 2074 7970 6963 616c 206d 6170 7069 A typical mappi\n-000f67d0: 6e67 2074 6162 6c65 2069 7320 7368 6f77 ng table is show\n-000f67e0: 6e20 6265 6c6f 773a 3c2f 703e 0a3c 6469 n below:

.
struc\n-000f6830: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t Namespace<\n-000f6870: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> names\n-000f68d0: 7061 6365 733c 2f61 3e5b 5d20 3d20 3c2f paces[] = .
{
.<\n-000f6900: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f6910: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // { &q\n-000f6930: 756f 743b 7072 6566 6978 2671 756f 743b uot;prefix"\n-000f6940: 2c20 2671 756f 743b 5552 4926 7175 6f74 , "URI"\n-000f6950: 3b2c 2026 7175 6f74 3b55 5249 2d70 6174 ;, "URI-pat\n-000f6960: 7465 726e 2671 756f 743b 2028 6f70 7469 tern" (opti\n-000f6970: 6f6e 616c 2920 7d20 3c2f 7370 616e 3e3c onal) } <\n-000f6980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{ "SO\n-000f69c0: 4150 2d45 4e56 2671 756f 743b 3c2f 7370 AP-ENV", "http://sc\n-000f6a00: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n-000f6a10: 672f 736f 6170 2f65 6e76 656c 6f70 652f g/soap/envelope/\n-000f6a20: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n-000f6a30: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b\n-000f6a50: 6520 6669 7273 7420 3c2f 7370 616e 3e3c e first <\n-000f6a60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{ "SO\n-000f6aa0: 4150 2d45 4e43 2671 756f 743b 3c2f 7370 AP-ENC", "http://sc\n-000f6ae0: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n-000f6af0: 672f 736f 6170 2f65 6e63 6f64 696e 672f g/soap/encoding/\n-000f6b00: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n-000f6b10: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b\n-000f6b30: 6520 7365 636f 6e64 203c 2f73 7061 6e3e e second \n-000f6b40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ "x\n-000f6b80: 7369 2671 756f 743b 3c2f 7370 616e 3e2c si",\n-000f6b90: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w\n-000f6bc0: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X\n-000f6bd0: 4d4c 5363 6865 6d61 2d69 6e73 7461 6e63 MLSchema-instanc\n-000f6be0: 6526 7175 6f74 3b3c 2f73 7061 6e3e 207d e" }\n-000f6bf0: 2c20 3c73 7061 6e20 636c 6173 733d 2263 , // must \n-000f6c10: 6265 2074 6869 7264 203c 2f73 7061 6e3e be third \n-000f6c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ "x\n-000f6c60: 7364 2671 756f 743b 3c2f 7370 616e 3e2c sd",\n-000f6c70: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w\n-000f6ca0: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X\n-000f6cb0: 4d4c 5363 6865 6d61 2671 756f 743b 3c2f MLSchema" }, \n-000f6cd0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // must \n-000f6cf0: 6265 2066 6f75 7274 683c 2f73 7061 6e3e be fourth\n-000f6d00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ "n\n-000f6d40: 7326 7175 6f74 3b3c 2f73 7061 6e3e 2c20 s", \n-000f6d50: 2020 2020 2020 3c73 7061 6e20 636c 6173 "urn:my-s\n-000f6d80: 6572 7669 6365 2d55 5249 2671 756f 743b ervice-URI"\n-000f6d90: 3c2f 7370 616e 3e20 7d2c 203c 7370 616e }, // binds "\n-000f6dc0: 6e73 2671 756f 743b 206e 616d 6573 7061 ns" namespa\n-000f6dd0: 6365 2070 7265 6669 7820 746f 2073 6368 ce prefix to sch\n-000f6de0: 656d 6120 5552 493c 2f73 7061 6e3e 3c2f ema URI.
{ NULL,\n-000f6e10: 204e 554c 4c20 7d20 3c73 7061 6e20 636c NULL } //\n-000f6e30: 2065 6e64 206f 6620 7461 626c 6520 3c2f end of table
.};\n-000f6e60: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
.
<\n-000f6e80: 703e 4561 6368 206e 616d 6573 7061 6365 p>Each namespace\n-000f6e90: 2070 7265 6669 7820 7573 6564 2062 7920 prefix used by \n-000f6ea0: 6120 6964 656e 7469 6669 6572 206e 616d a identifier nam\n-000f6eb0: 6520 696e 2074 6865 2068 6561 6465 7220 e in the header \n-000f6ec0: 6669 6c65 2073 7065 6369 6669 6361 7469 file specificati\n-000f6ed0: 6f6e 2c20 7365 6520 5365 6374 696f 6e20 on, see Section \n-000f6ee0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 C/C++ id\n-000f6f10: 656e 7469 6669 6572 206e 616d 6520 746f entifier name to\n-000f6f20: 2058 4d4c 2074 6167 206e 616d 6520 7472 XML tag name tr\n-000f6f30: 616e 736c 6174 696f 6e3c 2f61 3e2c 206d anslation, m\n-000f6f40: 7573 7420 6861 7665 2061 2062 696e 6469 ust have a bindi\n-000f6f50: 6e67 2074 6f20 6120 6e61 6d65 7370 6163 ng to a namespac\n-000f6f60: 6520 5552 4920 696e 2074 6865 206d 6170 e URI in the map\n-000f6f70: 7069 6e67 2074 6162 6c65 2e20 5468 6520 ping table. The \n-000f6f80: 656e 6420 6f66 2074 6865 206e 616d 6573 end of the names\n-000f6f90: 7061 6365 206d 6170 7069 6e67 2074 6162 pace mapping tab\n-000f6fa0: 6c65 206d 7573 7420 6265 2069 6e64 6963 le must be indic\n-000f6fb0: 6174 6564 2062 7920 7468 6520 4e55 4c4c ated by the NULL\n-000f6fc0: 2070 6169 722e 2054 6865 206e 616d 6573 pair. The names\n-000f6fd0: 7061 6365 2055 5249 206d 6174 6368 696e pace URI matchin\n-000f6fe0: 6720 6973 2063 6173 6520 696e 7365 6e73 g is case insens\n-000f6ff0: 6974 6976 652e 2041 206e 616d 6573 7061 itive. A namespa\n-000f7000: 6365 2070 7265 6669 7820 6973 2064 6973 ce prefix is dis\n-000f7010: 7469 6e67 7569 7368 6564 2062 7920 7468 tinguished by th\n-000f7020: 6520 6f63 6375 7272 656e 6365 206f 6620 e occurrence of \n-000f7030: 6120 7061 6972 206f 6620 756e 6465 7273 a pair of unders\n-000f7040: 636f 7265 7320 283c 636f 6465 3e5f 5f3c cores (__<\n-000f7050: 2f63 6f64 653e 2920 696e 2061 6e20 6964 /code>) in an id\n-000f7060: 656e 7469 6669 6572 206f 7220 6279 2075 entifier or by u\n-000f7070: 7369 6e67 2063 6f6c 6f6e 206e 6f74 6174 sing colon notat\n-000f7080: 696f 6e2c 2073 6565 2053 6563 7469 6f6e ion, see Section\n-000f7090: 203c 6120 636c 6173 733d 2265 6c22 2068 C/C++ i\n-000f70c0: 6465 6e74 6966 6965 7220 6e61 6d65 2074 dentifier name t\n-000f70d0: 6f20 584d 4c20 7461 6720 6e61 6d65 2074 o XML tag name t\n-000f70e0: 7261 6e73 6c61 7469 6f6e 3c2f 613e 2e3c ranslation.<\n-000f70f0: 2f70 3e0a 3c70 3e41 6e20 6f70 7469 6f6e /p>.

An option\n-000f7100: 616c 2074 6869 7264 2063 6f6c 756d 6e20 al third column \n-000f7110: 696e 2074 6865 206e 616d 6573 7061 6365 in the namespace\n-000f7120: 206d 6170 7069 6e67 2074 6162 6c65 206d mapping table m\n-000f7130: 6179 2062 6520 7370 6563 6966 6965 6420 ay be specified \n-000f7140: 7468 6174 2063 6f6e 7461 696e 7320 6120 that contains a \n-000f7150: 6e61 6d65 7370 6163 6520 5552 4920 7061 namespace URI pa\n-000f7160: 7474 6572 6e2e 2054 6865 2070 6174 7465 ttern. The patte\n-000f7170: 726e 7320 7072 6f76 6964 6520 616e 2061 rns provide an a\n-000f7180: 6c74 6572 6e61 7469 7665 206e 616d 6573 lternative names\n-000f7190: 7061 6365 2066 6f72 2074 6865 2076 616c pace for the val\n-000f71a0: 6964 6174 696f 6e20 6f66 2070 6172 7365 idation of parse\n-000f71b0: 6420 584d 4c20 6d65 7373 6167 6573 2e20 d XML messages. \n-000f71c0: 496e 2074 6869 7320 7061 7474 6572 6e2c In this pattern,\n-000f71d0: 2064 6173 6865 7320 283c 636f 6465 3e2d dashes (-\n-000f71e0: 3c2f 636f 6465 3e29 2061 7265 2073 696e ) are sin\n-000f71f0: 676c 652d 6368 6172 6163 7465 7220 7769 gle-character wi\n-000f7200: 6c64 6361 7264 7320 616e 6420 6173 7465 ldcards and aste\n-000f7210: 7269 736b 7320 283c 636f 6465 3e2a 3c2f risks (*) are multi\n-000f7230: 2d63 6861 7261 6374 6572 2077 696c 6463 -character wildc\n-000f7240: 6172 6473 2e20 466f 7220 6578 616d 706c ards. For exampl\n-000f7250: 652c 2074 6f20 6163 6365 7074 2061 6c74 e, to accept alt\n-000f7260: 6572 6e61 7469 7665 2076 6572 7369 6f6e ernative version\n-000f7270: 7320 6f66 2058 4d4c 2073 6368 656d 6173 s of XML schemas\n-000f7280: 2077 6974 6820 6469 6666 6572 656e 7420 with different \n-000f7290: 6175 7468 6f72 696e 6720 6461 7465 732c authoring dates,\n-000f72a0: 2066 6f75 7220 6461 7368 6573 2063 616e four dashes can\n-000f72b0: 2062 6520 7573 6564 2069 6e20 706c 6163 be used in plac\n-000f72c0: 6520 6f66 2074 6865 2073 7065 6369 6669 e of the specifi\n-000f72d0: 6320 6461 7465 7320 696e 2074 6865 206e c dates in the n\n-000f72e0: 616d 6573 7061 6365 206d 6170 7069 6e67 amespace mapping\n-000f72f0: 2074 6162 6c65 2070 6174 7465 726e 3a3c table pattern:<\n-000f7300: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n-000f7350: 3c61 2063 6c61 7373 3d22 636f 6465 2220 Nam\n-000f7380: 6573 7061 6365 3c2f 613e 203c 6120 636c espace namespaces\n-000f73f0: 5b5d 203d 203c 2f64 6976 3e0a 3c64 6976 [] =
.{<\n-000f7410: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n-000f7440: 2f2f 207b 2026 7175 6f74 3b70 7265 6669 // { "prefi\n-000f7450: 7826 7175 6f74 3b2c 2026 7175 6f74 3b55 x", "U\n-000f7460: 5249 2671 756f 743b 2c20 2671 756f 743b RI", "\n-000f7470: 5552 492d 7061 7474 6572 6e26 7175 6f74 URI-pattern"\n-000f7480: 3b20 286f 7074 696f 6e61 6c29 207d 203c ; (optional) } <\n-000f7490: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-000f74b0: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n-000f74d0: 7175 6f74 3b53 4f41 502d 454e 5626 7175 quot;SOAP-ENV&qu\n-000f74e0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ht\n-000f7510: 7470 3a2f 2f73 6368 656d 6173 2e78 6d6c tp://schemas.xml\n-000f7520: 736f 6170 2e6f 7267 2f73 6f61 702f 656e soap.org/soap/en\n-000f7530: 7665 6c6f 7065 2f26 7175 6f74 3b3c 2f73 velope/" }, //\n-000f7560: 206d 7573 7420 6265 2066 6972 7374 203c must be first <\n-000f7570: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-000f7590: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n-000f75b0: 7175 6f74 3b53 4f41 502d 454e 4326 7175 quot;SOAP-ENC&qu\n-000f75c0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ht\n-000f75f0: 7470 3a2f 2f73 6368 656d 6173 2e78 6d6c tp://schemas.xml\n-000f7600: 736f 6170 2e6f 7267 2f73 6f61 702f 656e soap.org/soap/en\n-000f7610: 636f 6469 6e67 2f26 7175 6f74 3b3c 2f73 coding/" }, //\n-000f7640: 206d 7573 7420 6265 2073 6563 6f6e 6420 must be second \n-000f7650: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000f7670: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n-000f7690: 2671 756f 743b 7873 6926 7175 6f74 3b3c "xsi"<\n-000f76a0: 2f73 7061 6e3e 2c20 2020 2020 203c 7370 /span>, "h\n-000f76d0: 7474 703a 2f2f 7777 772e 7733 2e6f 7267 ttp://www.w3.org\n-000f76e0: 2f32 3030 312f 584d 4c53 6368 656d 612d /2001/XMLSchema-\n-000f76f0: 696e 7374 616e 6365 2671 756f 743b 3c2f instance", "http://\n-000f7730: 7777 772e 7733 2e6f 7267 2f2d 2d2d 2d2f www.w3.org/----/\n-000f7740: 584d 4c53 6368 656d 612d 696e 7374 616e XMLSchema-instan\n-000f7750: 6365 2671 756f 743b 3c2f 7370 616e 3e20 ce" \n-000f7760: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },

.
{ \n-000f7780: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f77a0: 743b 7873 6426 7175 6f74 3b3c 2f73 7061 t;xsd", "http:\n-000f77e0: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200\n-000f77f0: 312f 584d 4c53 6368 656d 6126 7175 6f74 1/XMLSchema"\n-000f7800: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "http\n-000f7830: 3a2f 2f77 7777 2e77 332e 6f72 672f 2d2d ://www.w3.org/--\n-000f7840: 2d2d 2f58 4d4c 5363 6865 6d61 2671 756f --/XMLSchema&quo\n-000f7850: 743b 3c2f 7370 616e 3e20 7d2c 203c 2f64 t; }, .
... //.
{ NULL, NU\n-000f78c0: 4c4c 207d 203c 7370 616e 2063 6c61 7373 LL } // en\n-000f78e0: 6420 6f66 2074 6162 6c65 203c 2f73 7061 d of table
.
};.

Or\n-000f7930: 2061 6c74 6572 6e61 7469 7665 6c79 2c20 alternatively, \n-000f7940: 6173 7465 7269 736b 7320 6361 6e20 6265 asterisks can be\n-000f7950: 2075 7365 6420 6173 2077 696c 6463 6172 used as wildcar\n-000f7960: 6473 2066 6f72 206d 756c 7469 706c 6520 ds for multiple \n-000f7970: 6368 6172 6163 7465 7273 3a3c 2f70 3e0a characters:

.\n-000f7980: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st\n-000f79c0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct Namespa\n-000f7a00: 6365 3c2f 613e 203c 6120 636c 6173 733d ce na\n-000f7a60: 6d65 7370 6163 6573 3c2f 613e 5b5d 203d mespaces[] =\n-000f7a70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
// {\n-000f7ac0: 2026 7175 6f74 3b70 7265 6669 7826 7175 "prefix&qu\n-000f7ad0: 6f74 3b2c 2026 7175 6f74 3b55 5249 2671 ot;, "URI&q\n-000f7ae0: 756f 743b 2c20 2671 756f 743b 5552 492d uot;, "URI-\n-000f7af0: 7061 7474 6572 6e26 7175 6f74 3b20 286f pattern" (o\n-000f7b00: 7074 696f 6e61 6c29 207d 203c 2f73 7061 ptional) }
.
{ <\n-000f7b30: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f7b40: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f7b50: 3b53 4f41 502d 454e 5626 7175 6f74 3b3c ;SOAP-ENV"<\n-000f7b60: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/\n-000f7b90: 2f73 6368 656d 6173 2e78 6d6c 736f 6170 /schemas.xmlsoap\n-000f7ba0: 2e6f 7267 2f73 6f61 702f 656e 7665 6c6f .org/soap/envelo\n-000f7bb0: 7065 2f26 7175 6f74 3b3c 2f73 7061 6e3e pe/"\n-000f7bc0: 207d 2c20 3c73 7061 6e20 636c 6173 733d }, // mus\n-000f7be0: 7420 6265 2066 6972 7374 203c 2f73 7061 t be first
.
{ <\n-000f7c10: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f7c20: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f7c30: 3b53 4f41 502d 454e 4326 7175 6f74 3b3c ;SOAP-ENC"<\n-000f7c40: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/\n-000f7c70: 2f73 6368 656d 6173 2e78 6d6c 736f 6170 /schemas.xmlsoap\n-000f7c80: 2e6f 7267 2f73 6f61 702f 656e 636f 6469 .org/soap/encodi\n-000f7c90: 6e67 2f26 7175 6f74 3b3c 2f73 7061 6e3e ng/"\n-000f7ca0: 207d 2c20 3c73 7061 6e20 636c 6173 733d }, // mus\n-000f7cc0: 7420 6265 2073 6563 6f6e 6420 3c2f 7370 t be second
.
{ \n-000f7cf0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f7d10: 743b 7873 6926 7175 6f74 3b3c 2f73 7061 t;xsi", "http:\n-000f7d50: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200\n-000f7d60: 312f 584d 4c53 6368 656d 612d 696e 7374 1/XMLSchema-inst\n-000f7d70: 616e 6365 2671 756f 743b 3c2f 7370 616e ance", &\n-000f7da0: 7175 6f74 3b68 7474 703a 2f2f 7777 772e quot;http://www.\n-000f7db0: 7733 2e6f 7267 2f2a 2f58 4d4c 5363 6865 w3.org/*/XMLSche\n-000f7dc0: 6d61 2d69 6e73 7461 6e63 6526 7175 6f74 ma-instance"\n-000f7dd0: 3b3c 2f73 7061 6e3e 207d 2c20 3c2f 6469 ; }, .
{ "xsd&q\n-000f7e20: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n-000f7e30: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n-000f7e50: 756f 743b 6874 7470 3a2f 2f77 7777 2e77 uot;http://www.w\n-000f7e60: 332e 6f72 672f 3230 3031 2f58 4d4c 5363 3.org/2001/XMLSc\n-000f7e70: 6865 6d61 2671 756f 743b 3c2f 7370 616e hema", "ht\n-000f7eb0: 7470 3a2f 2f77 7777 2e77 332e 6f72 672f tp://www.w3.org/\n-000f7ec0: 2a2f 584d 4c53 6368 656d 6126 7175 6f74 */XMLSchema"\n-000f7ed0: 3b3c 2f73 7061 6e3e 207d 2c20 3c2f 6469 ; }, .
... //
\n-000f7f20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ NULL, NUL\n-000f7f40: 4c7d 203c 7370 616e 2063 6c61 7373 3d22 L} // end \n-000f7f60: 6f66 2074 6162 6c65 203c 2f73 7061 6e3e of table \n-000f7f70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};.

A na\n-000f7fb0: 6d65 7370 6163 6520 6d61 7070 696e 6720 mespace mapping \n-000f7fc0: 7461 626c 6520 6973 2061 7574 6f6d 6174 table is automat\n-000f7fd0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated\n-000f7fe0: 2077 6974 6820 7072 6566 6978 6573 2061 with prefixes a\n-000f7ff0: 6e64 2055 5249 7320 696e 2074 6865 2074 nd URIs in the t\n-000f8000: 6162 6c65 2074 6861 7420 6172 6520 6465 able that are de\n-000f8010: 636c 6172 6564 2077 6974 6820 3c63 6f64 clared with //gsoap <pr\n-000f8030: 6566 6978 2667 743b 2073 6368 656d 6120 efix> schema \n-000f8040: 6e61 6d65 7370 6163 653a 3c2f 636f 6465 namespace: directives in \n-000f8060: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n-000f8070: 6164 6572 2066 696c 652c 2073 6565 2053 ader file, see S\n-000f8080: 6563 7469 6f6e 203c 6120 636c 6173 733d ection Directives\n-000f80c0: 2e20 4966 2064 6972 6563 7469 7665 7320 . If directives \n-000f80d0: 6172 6520 6e6f 7420 7072 6f76 6964 6564 are not provided\n-000f80e0: 2069 6e20 7468 6520 6865 6164 6572 2066 in the header f\n-000f80f0: 696c 6520 7468 656e 2064 6566 6175 6c74 ile then default\n-000f8100: 2055 5249 7320 6f66 2074 6865 2066 6f72 URIs of the for\n-000f8110: 6d20 3c65 6d3e 3c63 6f64 653e 3c61 2068 m http://tempu\n-000f8150: 7269 2e6f 7267 2f70 7265 6669 782e 7873 ri.org/prefix.xs\n-000f8160: 643c 2f61 3e3c 2f63 6f64 653e 3c2f 656d d for each names\n-000f8180: 7061 6365 203c 656d 3e3c 636f 6465 3e70 pace p\n-000f8190: 7265 6669 783c 2f63 6f64 653e 3c2f 656d refix. The soapcpp2 \n-000f81b0: 746f 6f6c 2061 6c73 6f20 6765 6e65 7261 tool also genera\n-000f81c0: 7465 7320 6120 5753 444c 2061 6e64 206f tes a WSDL and o\n-000f81d0: 6e65 206f 7220 6d6f 7265 2058 5344 2066 ne or more XSD f\n-000f81e0: 696c 6573 2c20 6f6e 6520 666f 7220 6561 iles, one for ea\n-000f81f0: 6368 2058 4d4c 206e 616d 6573 7061 6365 ch XML namespace\n-000f8200: 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 7061 .

.

When pa\n-000f8210: 7273 696e 6720 584d 4c20 616e 6420 6465 rsing XML and de\n-000f8220: 7365 7269 616c 697a 696e 6720 6461 7461 serializing data\n-000f8230: 2c20 6e61 6d65 7370 6163 6520 5552 4973 , namespace URIs\n-000f8240: 2069 6e20 7468 6520 584d 4c20 6d65 7373 in the XML mess\n-000f8250: 6167 6573 2061 7265 206d 6174 6368 6564 ages are matched\n-000f8260: 2061 6761 696e 7374 2074 6865 2073 6563 against the sec\n-000f8270: 6f6e 6420 616e 6420 7468 6972 6420 636f ond and third co\n-000f8280: 6c75 6d6e 206f 6620 7468 6520 6e61 6d65 lumn of the name\n-000f8290: 7370 6163 6520 6d61 7070 696e 6720 7461 space mapping ta\n-000f82a0: 626c 652c 2073 6561 7263 6869 6e67 2066 ble, searching f\n-000f82b0: 726f 6d20 7468 6520 746f 7020 746f 2074 rom the top to t\n-000f82c0: 6865 2062 6f74 746f 6d20 6f66 2074 6865 he bottom of the\n-000f82d0: 2074 6162 6c65 2e20 5468 6520 6163 7475 table. The actu\n-000f82e0: 616c 2070 7265 6669 7820 7573 6564 2069 al prefix used i\n-000f82f0: 6e20 7468 6520 584d 4c20 6d65 7373 6167 n the XML messag\n-000f8300: 6520 6973 2069 7272 656c 6576 616e 7420 e is irrelevant \n-000f8310: 6173 2074 6865 2055 5249 2061 7373 6f63 as the URI assoc\n-000f8320: 6961 7465 6420 7769 7468 2074 6865 2070 iated with the p\n-000f8330: 7265 6669 7820 6973 2072 656c 6576 616e refix is relevan\n-000f8340: 7420 746f 2064 6566 696e 6520 7468 6520 t to define the \n-000f8350: 584d 4c20 6e61 6d65 7370 6163 6520 746f XML namespace to\n-000f8360: 2077 6869 6368 2061 2071 7561 6c69 6669 which a qualifi\n-000f8370: 6564 2065 6c65 6d65 6e74 206f 7220 6174 ed element or at\n-000f8380: 7472 6962 7574 6520 6265 6c6f 6e67 732e tribute belongs.\n-000f8390: 2057 6865 6e20 6120 6d61 7463 6820 6973 When a match is\n-000f83a0: 2066 6f75 6e64 2c20 7468 6520 6e61 6d65 found, the name\n-000f83b0: 7370 6163 6520 7072 6566 6978 2069 6e20 space prefix in \n-000f83c0: 7468 6520 6669 7273 7420 636f 6c75 6d6e the first column\n-000f83d0: 206f 6620 7468 6520 7461 626c 6520 6973 of the table is\n-000f83e0: 2063 6f6e 7369 6465 7265 6420 7365 6d61 considered sema\n-000f83f0: 6e74 6963 616c 6c79 2069 6465 6e74 6963 ntically identic\n-000f8400: 616c 2074 6f20 7468 6520 6e61 6d65 7370 al to the namesp\n-000f8410: 6163 6520 7072 6566 6978 2075 7365 6420 ace prefix used \n-000f8420: 6279 2074 6865 2071 7561 6c69 6669 6564 by the qualified\n-000f8430: 2058 4d4c 2065 6c65 6d65 6e74 2061 6e64 XML element and\n-000f8440: 2061 7474 7269 6275 7465 2070 6172 7365 attribute parse\n-000f8450: 642c 2065 7665 6e20 7768 656e 2074 6865 d, even when the\n-000f8460: 2070 7265 6669 7820 6e61 6d65 7320 6469 prefix names di\n-000f8470: 6666 6572 2e20 5468 6973 206e 6f72 6d61 ffer. This norma\n-000f8480: 6c69 7a61 7469 6f6e 206f 6620 7072 6566 lization of pref\n-000f8490: 6978 6573 2069 7320 696e 7669 7369 626c ixes is invisibl\n-000f84a0: 6520 746f 2074 6865 2075 7365 7220 6f66 e to the user of\n-000f84b0: 2067 534f 4150 2061 6e64 206d 616b 6573 gSOAP and makes\n-000f84c0: 2063 6f64 696e 6720 7769 7468 2058 4d4c coding with XML\n-000f84d0: 2065 6173 6965 722e 2046 6f72 2065 7861 easier. For exa\n-000f84e0: 6d70 6c65 2c20 7768 656e 2058 5344 2051 mple, when XSD Q\n-000f84f0: 4e61 6d65 7320 6172 6520 7061 7273 6564 Names are parsed\n-000f8500: 2069 6e74 6f20 7374 7269 6e67 7320 7573 into strings us\n-000f8510: 696e 6720 7468 6520 6275 696c 742d 696e ing the built-in\n-000f8520: 2073 6f61 7063 7070 3220 3c63 6f64 653e soapcpp2 \n-000f8530: 5f51 4e61 6d65 3c2f 636f 6465 3e20 7479 _QName ty\n-000f8540: 7065 206f 7220 6120 514e 616d 6520 6465 pe or a QName de\n-000f8550: 636c 6172 6564 2077 6974 6820 3c63 6f64 clared with typedef std::s\n-000f8570: 7472 696e 6720 7873 645f 5f51 4e61 6d65 tring xsd__QName\n-000f8580: 3c2f 636f 6465 3e2c 2074 6865 6e20 7468 , then th\n-000f8590: 6973 2051 4e61 6d65 2073 7472 696e 6720 is QName string \n-000f85a0: 7769 6c6c 2061 6c77 6179 7320 636f 6e74 will always cont\n-000f85b0: 6169 6e20 7175 616c 6966 6965 6420 6e61 ain qualified na\n-000f85c0: 6d65 7320 7769 7468 206e 6f72 6d61 6c69 mes with normali\n-000f85d0: 7a65 6420 7072 6566 6978 6573 2c20 692e zed prefixes, i.\n-000f85e0: 652e 2070 7265 6669 7865 7320 6465 6669 e. prefixes defi\n-000f85f0: 6e65 6420 696e 2074 6865 206e 616d 6573 ned in the names\n-000f8600: 7061 6365 206d 6170 7069 6e67 2074 6162 pace mapping tab\n-000f8610: 6c65 2c20 756e 6c65 7373 2074 6865 2074 le, unless the t\n-000f8620: 6162 6c65 2068 6173 206e 6f20 656e 7472 able has no entr\n-000f8630: 792c 2073 6565 2053 6563 7469 6f6e 203c y, see Section <\n-000f8640: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-000f8650: 663d 2269 6e64 6578 2e68 746d 6c23 716e f=\"index.html#qn\n-000f8660: 616d 6522 3e48 6f77 2074 6f20 7573 6520 ame\">How to use \n-000f8670: 514e 616d 6520 6174 7472 6962 7574 6573 QName attributes\n-000f8680: 2061 6e64 2065 6c65 6d65 6e74 733c 2f61 and elements.

.

For ex\n-000f86a0: 616d 706c 652c 206c 6574 2773 2073 6179 ample, let's say\n-000f86b0: 2077 6520 6861 7665 2074 6865 2066 6f6c we have the fol\n-000f86c0: 6c6f 7769 6e67 2073 7472 7563 7473 3a3c lowing structs:<\n-000f86d0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n-000f8720: 615f 5f65 6c74 207b 202e 2e2e 207d 3b20 a__elt { ... }; \n-000f8730: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s\n-000f8760: 7472 7563 7420 3c2f 7370 616e 3e62 5f5f truct b__\n-000f8770: 656c 7420 7b20 2e2e 2e20 7d3b 203c 2f64 elt { ... }; .
stru\n-000f87b0: 6374 203c 2f73 7061 6e3e 6b5f 5f65 6c74 ct k__elt\n-000f87c0: 207b 202e 2e2e 207d 3b20 3c2f 6469 763e { ... };
\n-000f87d0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The n\n-000f87f0: 616d 6573 7061 6365 206d 6170 7069 6e67 amespace mapping\n-000f8800: 2074 6162 6c65 2067 656e 6572 6174 6564 table generated\n-000f8810: 2062 7920 736f 6170 6370 7032 2068 6173 by soapcpp2 has\n-000f8820: 2074 6865 2066 6f6c 6c6f 7769 6e67 2065 the following e\n-000f8830: 6e74 7269 6573 3a3c 2f70 3e0a 3c64 6976 ntries:

.
struct\n-000f8880: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 Namespace namesp\n-000f8920: 6163 6573 3c2f 613e 5b5d 203d 203c 2f64 aces[] = .
{
.\n-000f8960: 2020 3c73 7061 6e20 636c 6173 733d 2263 // { &qu\n-000f8980: 6f74 3b70 7265 6669 7826 7175 6f74 3b2c ot;prefix",\n-000f8990: 2026 7175 6f74 3b55 5249 2671 756f 743b "URI"\n-000f89a0: 2c20 2671 756f 743b 5552 492d 7061 7474 , "URI-patt\n-000f89b0: 6572 6e26 7175 6f74 3b20 286f 7074 696f ern" (optio\n-000f89c0: 6e61 6c29 207d 203c 2f73 7061 6e3e 3c2f nal) } .
... // the four S\n-000f8a10: 4f41 5020 616e 6420 5853 4420 6e61 6d65 OAP and XSD name\n-000f8a20: 7370 6163 6520 6269 6e64 696e 6773 3c2f space bindings
. \n-000f8a50: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n-000f8a70: 756f 743b 6126 7175 6f74 3b3c 2f73 7061 uot;a", \n-000f8aa0: 2671 756f 743b 6874 7470 3a2f 2f74 656d "http://tem\n-000f8ab0: 7075 7269 2e6f 7267 2f61 2e78 7364 2671 puri.org/a.xsd&q\n-000f8ac0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n-000f8ad0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{ "b&\n-000f8b10: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n-000f8b40: 6874 7470 3a2f 2f74 656d 7075 7269 2e6f http://tempuri.o\n-000f8b50: 7267 2f62 2e78 7364 2671 756f 743b 3c2f rg/b.xsd" },
.\n-000f8b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{ "c"<\n-000f8bb0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/\n-000f8be0: 2f74 656d 7075 7269 2e6f 7267 2f63 2e78 /tempuri.org/c.x\n-000f8bf0: 7364 2671 756f 743b 3c2f 7370 616e 3e20 sd" \n-000f8c00: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },
.
..\n-000f8c20: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
.
{ NU\n-000f8c60: 4c4c 2c20 4e55 4c4c 207d 3c2f 6469 763e LL, NULL }
\n-000f8c70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

Then, the \n-000f8cb0: 666f 6c6c 6f77 696e 6720 584d 4c20 656c following XML el\n-000f8cc0: 656d 656e 7473 2077 696c 6c20 6d61 7463 ements will matc\n-000f8cd0: 6820 7468 6573 6520 7374 7275 6374 733a h these structs:\n-000f8ce0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
&\n-000f8d20: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;x:e\n-000f8d40: 6c74 3c2f 7370 616e 3e20 3c73 7061 6e20 lt \n-000f8d60: 786d 6c6e 733a 783c 2f73 7061 6e3e 3d3c xmlns:x=<\n-000f8d70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f8d80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f8d90: 3b68 7474 703a 2f2f 7465 6d70 7572 692e ;http://tempuri.\n-000f8da0: 6f72 672f 612e 7873 6426 7175 6f74 3b3c org/a.xsd"<\n-000f8db0: 2f73 7061 6e3e 2667 743b 2e2e 2e26 6c74 /span>>...<\n-000f8dc0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/x:el\n-000f8de0: 743c 2f73 7061 6e3e 2667 743b 3c2f 6469 t>.
<elt xmlns\n-000f8e50: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f8e70: 6f74 3b68 7474 703a 2f2f 7465 6d70 7572 ot;http://tempur\n-000f8e80: 692e 6f72 672f 622e 7873 6426 7175 6f74 i.org/b.xsd"\n-000f8e90: 3b3c 2f73 7061 6e3e 2667 743b 2e2e 2e26 ;>...&\n-000f8ea0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/el\n-000f8ec0: 743c 2f73 7061 6e3e 2667 743b 3c2f 6469 t>.
<zzz:elt xmlns:zz\n-000f8f30: 7a3c 2f73 7061 6e3e 3d3c 7370 616e 2063 z=h\n-000f8f50: 7474 703a 3c2f 7370 616e 3e2f 2f3c 7370 ttp://tempuri.org/c.xs\n-000f8fa0: 643c 2f73 7061 6e3e 2671 756f 743b 2667 d"&g\n-000f8fb0: 743b 2e2e 2e26 6c74 3b2f 3c73 7061 6e20 t;...</zzz:elt>
.

In\n-000f9010: 7374 6561 6420 6f66 206f 6e65 2062 6967 stead of one big\n-000f9020: 206e 616d 6573 7061 6365 2074 6162 6c65 namespace table\n-000f9030: 2074 6861 7420 636f 6e74 6169 6e73 2061 that contains a\n-000f9040: 6c6c 2058 4d4c 206e 616d 6573 7061 6365 ll XML namespace\n-000f9050: 2070 7265 6669 7865 7320 7769 7468 2074 prefixes with t\n-000f9060: 6865 6972 2055 5249 732c 2074 6865 7265 heir URIs, there\n-000f9070: 2061 7265 2063 6173 6573 2077 6865 6e20 are cases when \n-000f9080: 6974 2069 7320 6465 7369 7261 626c 6520 it is desirable \n-000f9090: 746f 2075 7365 206d 756c 7469 706c 6520 to use multiple \n-000f90a0: 6e61 6d65 7370 6163 6520 7461 626c 6573 namespace tables\n-000f90b0: 2c20 6f6e 6520 666f 7220 6561 6368 2073 , one for each s\n-000f90c0: 6572 7669 6365 2e20 5468 6973 2061 766f ervice. This avo\n-000f90d0: 6964 7320 6c65 616b 696e 6720 6e61 6d65 ids leaking name\n-000f90e0: 7370 6163 6520 7072 6566 6978 6573 2069 space prefixes i\n-000f90f0: 6e20 584d 4c20 6d65 7373 6167 6573 2074 n XML messages t\n-000f9100: 6861 7420 6861 7665 206e 6f74 6869 6e67 hat have nothing\n-000f9110: 2074 6f20 646f 2077 6974 6820 7468 6520 to do with the \n-000f9120: 7365 7276 6963 6520 696e 766f 6b65 642e service invoked.\n-000f9130: 2049 6e20 7072 696e 6369 706c 6520 7468 In principle th\n-000f9140: 6572 6520 6973 206e 6f20 6861 726d 2074 ere is no harm t\n-000f9150: 6f20 6c65 616b 2074 6865 7365 206e 616d o leak these nam\n-000f9160: 6573 7061 6365 2070 7265 6669 7865 732c espace prefixes,\n-000f9170: 2062 7574 2074 6865 206d 6573 7361 6765 but the message\n-000f9180: 7320 6172 6520 6c65 7373 2063 6f6d 7061 s are less compa\n-000f9190: 6374 2061 6e64 206e 6f74 2061 7320 636c ct and not as cl\n-000f91a0: 6561 6e2e 2054 6f20 7573 6520 6d75 6c74 ean. To use mult\n-000f91b0: 6970 6c65 206e 616d 6573 7061 6365 2074 iple namespace t\n-000f91c0: 6162 6c65 7320 6174 2074 6865 2063 6c69 ables at the cli\n-000f91d0: 656e 7420 7369 6465 2069 7320 646f 6e65 ent side is done\n-000f91e0: 2061 7320 666f 6c6c 6f77 733a 3c2f 703e as follows:

\n-000f91f0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n-000f9230: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct Namesp\n-000f9270: 6163 653c 2f61 3e20 6e61 6d65 7370 6163 ace namespac\n-000f9280: 6573 5461 626c 6531 5b5d 203d 207b 202e esTable1[] = { .\n-000f9290: 2e2e 207d 3b20 3c2f 6469 763e 0a3c 6469 .. };
.<\n-000f92b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f92c0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct \n-000f9300: 4e61 6d65 7370 6163 653c 2f61 3e20 6e61 Namespace na\n-000f9310: 6d65 7370 6163 6573 5461 626c 6532 5b5d mespacesTable2[]\n-000f9320: 203d 207b 202e 2e2e 207d 3b20 3c2f 6469 = { ... }; ...
... <\n-000f94c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f94d0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
str\n-000f9510: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n-000f95e0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
soap_set_name\n-000f9660: 7370 6163 6573 3c2f 613e 283c 6120 636c spaces(soap, name\n-000f96a0: 7370 6163 6554 6162 6c65 3129 3b20 3c73 spaceTable1); // use the f\n-000f96d0: 6972 7374 206e 616d 6573 7061 6365 2074 irst namespace t\n-000f96e0: 6162 6c65 3c2f 7370 616e 3e3c 2f64 6976 able.
if\n-000f9720: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-000f9730: 6c6c 5f72 656d 6f74 655f 6d65 7468 6f64 ll_remote_method\n-000f9740: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-000f9770: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , endpo\n-000f97c0: 696e 743c 2f61 3e2c 2041 6374 696f 6e2c int, Action,\n-000f97d0: 202e 2e2e 2929 3c2f 6469 763e 0a3c 6469 ...))
. \n-000f97f0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n-000f9810: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
\n-000f9820: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

Likew\n-000f9840: 6973 652c 206f 6e20 7468 6520 7365 7276 ise, on the serv\n-000f9850: 6572 2073 6964 6520 6361 6c6c 203c 636f er side call soap_set_name\n-000f9930: 7370 6163 6573 3c2f 613e 3c2f 636f 6465 spaces before calling\n-000f9950: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_serve\n-000f99d0: 3c2f 613e 3c2f 636f 6465 3e2e 2043 6861 . Cha\n-000f99e0: 6e67 696e 6720 7468 6520 6e61 6d65 7370 nging the namesp\n-000f99f0: 6163 6573 2074 6162 6c65 2069 6e20 7365 aces table in se\n-000f9a00: 7276 6963 6520 6f70 6572 6174 696f 6e73 rvice operations\n-000f9a10: 2068 6173 206e 6f20 6566 6665 6374 2e3c has no effect.<\n-000f9a20: 2f70 3e0a 3c70 3e54 6865 2058 4d4c 206d /p>.

The XML m\n-000f9a30: 6573 7361 6765 7320 7072 6f64 7563 6564 essages produced\n-000f9a40: 2062 7920 7468 6520 6753 4f41 5020 656e by the gSOAP en\n-000f9a50: 6769 6e65 2069 6e63 6c75 6465 2061 6c6c gine include all\n-000f9a60: 203c 656d 3e3c 636f 6465 3e78 6d6c 736e xmlsn\n-000f9a70: 3c2f 636f 6465 3e3c 2f65 6d3e 206e 616d nam\n-000f9a80: 6573 7061 6365 2062 696e 6469 6e67 7320 espace bindings \n-000f9a90: 696e 2074 6865 2072 6f6f 7420 656c 656d in the root elem\n-000f9aa0: 656e 742c 2077 6869 6368 2069 7320 6765 ent, which is ge\n-000f9ab0: 6e65 7261 6c6c 7920 6d6f 7265 2065 6666 nerally more eff\n-000f9ac0: 6963 6965 6e74 2066 6f72 206c 6172 6765 icient for large\n-000f9ad0: 7220 584d 4c20 646f 6375 6d65 6e74 7320 r XML documents \n-000f9ae0: 696e 2077 6869 6368 206f 7468 6572 7769 in which otherwi\n-000f9af0: 7365 2074 6865 203c 656d 3e3c 636f 6465 se the xmlsn namespace bin\n-000f9b20: 6469 6e67 7320 7769 6c6c 2062 6520 7370 dings will be sp\n-000f9b30: 7269 6e6b 6c65 6420 7468 726f 7567 686f rinkled througho\n-000f9b40: 7574 2e20 4279 2063 6f6e 7472 6173 742c ut. By contrast,\n-000f9b50: 2063 616e 6f6e 6963 616c 2058 4d4c 2072 canonical XML r\n-000f9b60: 6571 7569 7265 7320 3c65 6d3e 3c63 6f64 equires xmlsn namespace bi\n-000f9b90: 6e64 696e 6773 206f 6e6c 7920 746f 2062 ndings only to b\n-000f9ba0: 6520 696e 636c 7564 6564 2077 6865 6e20 e included when \n-000f9bb0: 7574 696c 697a 6564 2e20 5468 6572 6566 utilized. Theref\n-000f9bc0: 6f72 652c 2074 6865 203c 636f 6465 3e23 ore, the #\n-000f9bd0: 534f 4150 5f58 4d4c 5f43 414e 4f4e 4943 SOAP_XML_CANONIC\n-000f9be0: 414c 3c2f 636f 6465 3e20 636f 6e74 6578 AL contex\n-000f9bf0: 7420 666c 6167 2070 726f 6475 6365 7320 t flag produces \n-000f9c00: 4331 344e 2065 7863 6c75 7369 7665 2058 C14N exclusive X\n-000f9c10: 4d4c 206d 6573 7361 6765 7320 616e 6420 ML messages and \n-000f9c20: 646f 6375 6d65 6e74 732c 2077 6869 6368 documents, which\n-000f9c30: 2065 6c69 6d69 6e61 7465 7320 756e 7573 eliminates unus\n-000f9c40: 6564 203c 656d 3e3c 636f 6465 3e78 6d6c ed xml\n-000f9c50: 736e 3c2f 636f 6465 3e3c 2f65 6d3e 206e sn n\n-000f9c60: 616d 6573 7061 6365 2062 696e 6469 6e67 amespace binding\n-000f9c70: 7320 6672 6f6d 2058 4d4c 2e20 556e 666f s from XML. Unfo\n-000f9c80: 7274 756e 6174 656c 792c 2074 6865 2063 rtunately, the c\n-000f9c90: 7572 7265 6e74 2043 3134 4e20 7374 616e urrent C14N stan\n-000f9ca0: 6461 7264 2069 7320 6275 6767 7920 7769 dard is buggy wi\n-000f9cb0: 7468 2072 6573 7065 6374 2074 6f20 5853 th respect to XS\n-000f9cc0: 4420 514e 616d 6520 636f 6e74 656e 742c D QName content,\n-000f9cd0: 2062 6563 6175 7365 2070 7265 6669 7865 because prefixe\n-000f9ce0: 7320 7573 6564 2069 6e20 514e 616d 6520 s used in QName \n-000f9cf0: 636f 6e74 656e 7420 6172 6520 6e6f 7420 content are not \n-000f9d00: 636f 6e73 6964 6572 6564 2075 7469 6c69 considered utili\n-000f9d10: 7a65 642e 2054 6865 2067 534f 4150 2065 zed. The gSOAP e\n-000f9d20: 6e67 696e 6520 636f 6e73 6964 6572 7320 ngine considers \n-000f9d30: 514e 616d 6520 636f 6e74 656e 7420 7072 QName content pr\n-000f9d40: 6566 6978 6573 2075 7469 6c69 7a65 6420 efixes utilized \n-000f9d50: 616e 6420 7468 6572 6566 6f72 6520 7072 and therefore pr\n-000f9d60: 6f64 7563 6573 2063 6f72 7265 6374 6564 oduces corrected\n-000f9d70: 2063 616e 6f6e 6963 616c 697a 6564 2058 canonicalized X\n-000f9d80: 4d4c 206f 7574 7075 7420 7468 6174 2070 ML output that p\n-000f9d90: 7265 7665 6e74 7320 7468 6520 6c6f 7373 revents the loss\n-000f9da0: 206f 6620 6e61 6d65 7370 6163 6520 696e of namespace in\n-000f9db0: 666f 726d 6174 696f 6e20 666f 7220 514e formation for QN\n-000f9dc0: 616d 6573 2e3c 2f70 3e0a 3c70 3ef0 9f94 ames.

.

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

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

.SOAP Head\n-000f9e30: 6572 2070 726f 6365 7373 696e 673c 2f68 er processing.

A built-in\n-000f9e50: 2053 4f41 5020 4865 6164 6572 2064 6174 SOAP Header dat\n-000f9e60: 6120 7374 7275 6374 7572 6520 3c63 6f64 a structure SOA\n-000f9ed0: 505f 454e 565f 5f48 6561 6465 723c 2f61 P_ENV__Header is gene\n-000f9ef0: 7261 7465 6420 6279 2074 6865 2073 6f61 rated by the soa\n-000f9f00: 7063 7070 3220 746f 6f6c 2066 6f72 2065 pcpp2 tool for e\n-000f9f10: 7863 6861 6e67 696e 6720 534f 4150 2068 xchanging SOAP h\n-000f9f20: 6561 6465 7273 2069 6e20 534f 4150 206d eaders in SOAP m\n-000f9f30: 6573 7361 6765 732e 2054 6869 7320 7374 essages. This st\n-000f9f40: 7275 6374 7572 6520 6973 2065 6d70 7479 ructure is empty\n-000f9f50: 2075 6e6c 6573 7320 6865 6164 6572 7320 unless headers \n-000f9f60: 6172 6520 6164 6465 6420 6279 2070 6c75 are added by plu\n-000f9f70: 6769 6e73 2061 6e64 2068 6561 6465 7273 gins and headers\n-000f9f80: 2073 7065 6369 6669 6564 2062 7920 5753 specified by WS\n-000f9f90: 444c 2073 7065 6369 6669 6361 7469 6f6e DL specification\n-000f9fa0: 7320 2869 2e65 2e20 7773 646c 3268 2061 s (i.e. wsdl2h a\n-000f9fb0: 6464 7320 534f 4150 2048 6561 6465 7273 dds SOAP Headers\n-000f9fc0: 292e 3c2f 703e 0a3c 703e 596f 7520 6361 ).

.

You ca\n-000f9fd0: 6e20 6372 6561 7465 2079 6f75 7220 6f77 n create your ow\n-000f9fe0: 6e20 534f 4150 2048 6561 6465 7220 7374 n SOAP Header st\n-000f9ff0: 7275 6374 2073 696d 706c 7920 6279 2064 ruct simply by d\n-000fa000: 6563 6c61 7269 6e67 2069 7420 696e 2061 eclaring it in a\n-000fa010: 6e20 696e 7465 7266 6163 6520 6865 6164 n interface head\n-000fa020: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap\n-000fa030: 6370 7032 2061 6e64 2062 7920 6164 6469 cpp2 and by addi\n-000fa040: 6e67 206d 656d 6265 7273 2074 6861 7420 ng members that \n-000fa050: 6d75 7374 2062 6520 7175 616c 6966 6965 must be qualifie\n-000fa060: 6420 7769 7468 206e 616d 6573 7061 6365 d with namespace\n-000fa070: 2070 7265 6669 7865 7320 746f 2063 6f6e prefixes to con\n-000fa080: 666f 726d 2074 6f20 7468 6520 534f 4150 form to the SOAP\n-000fa090: 2048 6561 6465 7220 7072 6f63 6573 7369 Header processi\n-000fa0a0: 6e67 2072 6571 7569 7265 6d65 6e74 7320 ng requirements \n-000fa0b0: 7468 6174 2053 4f41 5020 4865 6164 6572 that SOAP Header\n-000fa0c0: 2065 6c65 6d65 6e74 7320 6d75 7374 2062 elements must b\n-000fa0d0: 6520 6e61 6d65 7370 6163 6520 7175 616c e namespace qual\n-000fa0e0: 6966 6965 642e 3c2f 703e 0a3c 703e 466f ified.

.

Fo\n-000fa0f0: 7220 6578 616d 706c 652c 2061 7373 756d r example, assum\n-000fa100: 6520 7468 6174 2074 7261 6e73 6163 7469 e that transacti\n-000fa110: 6f6e 2064 6174 6120 7368 6f75 6c64 2062 on data should b\n-000fa120: 6520 7069 6767 792d 6261 636b 6564 2077 e piggy-backed w\n-000fa130: 6974 6820 534f 4150 206d 6573 7361 6765 ith SOAP message\n-000fa140: 7320 696e 2053 4f41 5020 4865 6164 6572 s in SOAP Header\n-000fa150: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct t__transaction\n-000fa1b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-000fa1d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int numb\n-000fa210: 6572 3b3c 2f64 6976 3e0a 3c64 6976 2063 er;
.
\n-000fa230: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-000fa270: 723c 2f73 7061 6e3e 202a 6473 6372 6970 r *dscrip\n-000fa280: 7469 6f6e 3b3c 2f64 6976 3e0a 3c64 6976 tion;
.};\n-000fa2a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

..
{
\n-000fa350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
mustUnder\n-000fa370: 7374 616e 6420 3c73 7061 6e20 636c 6173 stand stru\n-000fa390: 6374 203c 2f73 7061 6e3e 745f 5f74 7261 ct t__tra\n-000fa3a0: 6e73 6163 7469 6f6e 202a 745f 5f74 7261 nsaction *t__tra\n-000fa3b0: 6e73 6163 7469 6f6e 3b20 3c2f 6469 763e nsaction;
\n-000fa3c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.//gsoap ns s\n-000fa410: 6572 7669 6365 206d 6574 686f 642d 696e ervice method-in\n-000fa420: 7075 742d 6865 6164 6572 2d70 6172 743a put-header-part:\n-000fa430: 2077 6562 6d65 7468 6f64 2074 5f5f 7472 webmethod t__tr\n-000fa440: 616e 7361 6374 696f 6e3c 2f73 7061 6e3e ansaction\n-000fa450: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int ns\n-000fa490: 5f5f 7765 626d 6574 686f 6428 2e2e 2e29 __webmethod(...)\n-000fa4a0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000fa4c0: 703e 5468 6520 3c63 6f64 653e 6d75 7374 p>The must\n-000fa4d0: 556e 6465 7273 7461 6e64 3c2f 636f 6465 Understand qualifier spec\n-000fa4f0: 6966 6965 7320 7468 6174 2074 6865 2065 ifies that the e\n-000fa500: 6c65 6d65 6e74 206d 7573 7420 6265 2070 lement must be p\n-000fa510: 726f 6365 7373 6564 2062 7920 7468 6520 rocessed by the \n-000fa520: 534f 4150 2070 726f 6365 7373 6f72 2061 SOAP processor a\n-000fa530: 6e64 2063 616e 6e6f 7420 6265 2069 676e nd cannot be ign\n-000fa540: 6f72 6564 2069 6620 7468 6520 7072 6f63 ored if the proc\n-000fa550: 6573 736f 7220 6861 7320 6e6f 206c 6f67 essor has no log\n-000fa560: 6963 2069 6e20 706c 6163 6520 666f 7220 ic in place for \n-000fa570: 7468 6973 2053 4f41 5020 6865 6164 6572 this SOAP header\n-000fa580: 2c20 7768 6963 6820 6973 2064 6f6e 6520 , which is done \n-000fa590: 6279 2061 6464 696e 6720 6120 3c65 6d3e by adding a \n-000fa5a0: 3c63 6f64 653e 534f 4150 2d45 4e56 3a6d SOAP-ENV:m\n-000fa5b0: 7573 7455 6e64 6572 7374 616e 643d 2274 ustUnderstand=\"t\n-000fa5c0: 7275 6522 3c2f 636f 6465 3e3c 2f65 6d3e rue\"\n-000fa5d0: 2061 7474 7269 6275 7465 2074 6f20 7468 attribute to th\n-000fa5e0: 6520 3c65 6d3e 3c63 6f64 653e 743a 7472 e t:tr\n-000fa5f0: 616e 7361 6374 696f 6e3c 2f63 6f64 653e ansaction\n-000fa600: 3c2f 656d 3e20 656c 656d 656e 742e 2054 element. T\n-000fa610: 6865 2073 6f61 7063 7070 322d 6765 6e65 he soapcpp2-gene\n-000fa620: 7261 7465 6420 7365 7269 616c 697a 6572 rated serializer\n-000fa630: 7320 6f62 6579 2074 6869 7320 7361 6665 s obey this safe\n-000fa640: 7479 2070 7269 6e63 6970 6c65 2e3c 2f70 ty principle..

This declar\n-000fa660: 6573 2061 2073 6572 7669 6365 206f 7065 es a service ope\n-000fa670: 7261 7469 6f6e 2074 6861 7420 7365 6e64 ration that send\n-000fa680: 7320 6d65 7373 6167 6573 2077 6974 6820 s messages with \n-000fa690: 616e 2069 6e70 7574 2053 4f41 5020 6865 an input SOAP he\n-000fa6a0: 6164 6572 203c 636f 6465 3e74 5f5f 7472 ader t__tr\n-000fa6b0: 616e 7361 6374 696f 6e3c 2f63 6f64 653e ansaction\n-000fa6c0: 2c20 6173 2063 616e 2062 6520 7365 656e , as can be seen\n-000fa6d0: 2069 6e20 7468 6520 6765 6e65 7261 7465 in the generate\n-000fa6e0: 6420 5753 444c 2062 696e 6469 6e67 3a3c d WSDL binding:<\n-000fa6f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l\n-000fa730: 743b 3c73 7061 6e20 636c 6173 733d 226b t;bind\n-000fa750: 696e 673c 2f73 7061 6e3e 203c 7370 616e ing name="S\n-000fa7a0: 6572 7669 6365 2671 756f 743b 3c2f 7370 ervice" type="tns:Serv\n-000fa800: 6963 6550 6f72 7454 7970 6526 7175 6f74 icePortType"\n-000fa810: 3b3c 2f73 7061 6e3e 2667 743b 3c2f 6469 ;>.
<SOAP:bindin\n-000fa860: 673c 2f73 7061 6e3e 203c 7370 616e 2063 g s\n-000fa880: 7479 6c65 3c2f 7370 616e 3e3d 3c73 7061 tyle="do\n-000fa8b0: 6375 6d65 6e74 2671 756f 743b 3c2f 7370 cument" transp\n-000fa8e0: 6f72 743c 2f73 7061 6e3e 3d3c 7370 616e ort="htt\n-000fa910: 703a 2f2f 7363 6865 6d61 732e 786d 6c73 p://schemas.xmls\n-000fa920: 6f61 702e 6f72 672f 736f 6170 2f68 7474 oap.org/soap/htt\n-000fa930: 7026 7175 6f74 3b3c 2f73 7061 6e3e 2f26 p"/&\n-000fa940: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
&l\n-000fa960: 743b 3c73 7061 6e20 636c 6173 733d 226b t;oper\n-000fa980: 6174 696f 6e3c 2f73 7061 6e3e 203c 7370 ation name=<\n-000fa9b0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000fa9c0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000fa9d0: 3b77 6562 6d65 7468 6f64 2671 756f 743b ;webmethod"\n-000fa9e0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<SOAP:opera\n-000faa30: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion soapAction=\n-000faa80: 2671 756f 743b 2671 756f 743b 3c2f 7370 ""/>
.<\n-000faaa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000faab0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <input&\n-000faae0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
\n-000fab00: 2020 2020 2020 266c 743b 3c73 7061 6e20 <SOAP:body use="literal&\n-000fab80: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; parts=\n-000fabb0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000fabd0: 743b 426f 6479 2671 756f 743b 3c2f 7370 t;Body"/>
.<\n-000fabf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fac00: 3e20 2020 2020 2020 2020 2026 6c74 3b3c > <<\n-000fac10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000fac20: 6f72 6474 7970 6522 3e53 4f41 503a 6865 ordtype\">SOAP:he\n-000fac30: 6164 6572 3c2f 7370 616e 3e20 3c73 7061 ader
use="l\n-000fac80: 6974 6572 616c 2671 756f 743b 3c2f 7370 iteral" messag\n-000facb0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="tns:S\n-000face0: 6572 7669 6365 4865 6164 6572 2671 756f erviceHeader&quo\n-000facf0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n-000fad10: 7061 7274 3c2f 7370 616e 3e3d 3c73 7061 part="tr\n-000fad40: 616e 7361 6374 696f 6e26 7175 6f74 3b3c ansaction"<\n-000fad50: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>.
</input>
.\n-000fadc0: 2020 2020 266c 743b 3c73 7061 6e20 636c <output&\n-000fadf0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
\n-000fae10: 2020 2020 2020 266c 743b 3c73 7061 6e20 <SOAP:body use="literal&\n-000fae90: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; parts=\n-000faec0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000faee0: 743b 426f 6479 2671 756f 743b 3c2f 7370 t;Body"/>
.<\n-000faf00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000faf10: 3e20 2020 2026 6c74 3b2f 3c73 7061 6e20 > </output>
. \n-000faf60: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </o\n-000faf80: 7065 7261 7469 6f6e 3c2f 7370 616e 3e26 peration&\n-000faf90: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
<\n-000fafb0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /bindi\n-000fafd0: 6e67 3c2f 7370 616e 3e26 6774 3b3c 2f64 ng>.

Likewise, y\n-000fb010: 6f75 2063 616e 2073 7065 6369 6679 2074 ou can specify t\n-000fb020: 6861 7420 626f 7468 2069 6e70 7574 2061 hat both input a\n-000fb030: 6e64 206f 7574 7075 7420 6d65 7373 6167 nd output messag\n-000fb040: 6573 2068 6176 6520 7468 6520 7361 6d65 es have the same\n-000fb050: 2068 6561 6465 7220 7769 7468 203c 636f header with //gsoap ns se\n-000fb070: 7276 6963 6520 6d65 7468 6f64 2d68 6561 rvice method-hea\n-000fb080: 6465 722d 7061 7274 3a3c 2f63 6f64 653e der-part:\n-000fb090: 206f 7220 7468 6520 6f75 7470 7574 206d or the output m\n-000fb0a0: 6573 7361 6765 2068 6173 2061 2068 6561 essage has a hea\n-000fb0b0: 6465 7220 7769 7468 203c 636f 6465 3e2f der with /\n-000fb0c0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-000fb0d0: 6520 6d65 7468 6f64 2d6f 7574 7075 742d e method-output-\n-000fb0e0: 6865 6164 6572 2d70 6172 743a 3c2f 636f header-part:. Multiple he\n-000fb100: 6164 6572 7320 6361 6e20 6265 2073 7065 aders can be spe\n-000fb110: 6369 6669 6564 2074 6869 7320 7761 792e cified this way.\n-000fb120: 3c2f 703e 0a3c 703e 546f 2073 6574 2075

.

To set u\n-000fb130: 7020 6120 534f 4150 2048 6561 6465 7220 p a SOAP Header \n-000fb140: 6174 2074 6865 2063 6c69 656e 7420 7369 at the client si\n-000fb150: 6465 2074 6861 7420 636f 6e74 6169 6e73 de that contains\n-000fb160: 2074 6865 203c 636f 6465 3e74 5f5f 7472 the t__tr\n-000fb170: 616e 7361 6374 696f 6e3c 2f63 6f64 653e ansaction\n-000fb180: 206d 656d 6265 723a 3c2f 703e 0a3c 6469 member:

.
struc\n-000fb1d0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-000fb200: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new();\n-000fb2a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
... //.
soa\n-000fb320: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.h\n-000fb370: 6561 6465 723c 2f61 3e20 3d20 4e55 4c4c eader = NULL\n-000fb380: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // erase\n-000fb3a0: 2061 6e79 2053 4f41 5020 4865 6164 6572 any SOAP Header\n-000fb3b0: 2077 6520 6861 7665 2073 6f20 6661 723c we have so far<\n-000fb3c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-000fb3e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000fb3f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-000fb400: 705f 5f68 6561 6465 722e 6874 6d6c 2367 p__header.html#g\n-000fb410: 6130 3864 3335 6431 3930 3061 3139 3832 a08d35d1900a1982\n-000fb420: 6664 6465 3666 3738 6534 3366 6339 3633 fdde6f78e43fc963\n-000fb430: 3522 3e73 6f61 705f 6865 6164 6572 3c2f 5\">soap_header(soap); // a\n-000fb490: 6c6c 6f63 6174 6520 616e 6420 696e 6974 llocate and init\n-000fb4a0: 6961 6c69 7a65 2061 206e 6577 2053 4f41 ialize a new SOA\n-000fb4b0: 5020 4865 6164 6572 3c2f 7370 616e 3e3c P Header<\n-000fb4c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
s\n-000fb500: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->header-\n-000fb560: 2667 743b 745f 5f74 7261 6e73 6163 7469 >t__transacti\n-000fb570: 6f6e 203d 2073 6f61 705f 6e65 775f 745f on = soap_new_t_\n-000fb580: 5f74 7261 6e73 6163 7469 6f6e 283c 6120 _transaction(soap, -1\n-000fb5c0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
.
soap-><\n-000fb610: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000fb620: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-000fb630: 6874 6d6c 2361 6330 3931 6466 6534 6530 html#ac091dfe4e0\n-000fb640: 3162 3661 3038 3264 3931 3663 3338 3165 1b6a082d916c381e\n-000fb650: 3730 3036 6261 223e 6865 6164 6572 3c2f 7006ba\">header->t__transa\n-000fb670: 6374 696f 6e2d 2667 743b 6e75 6d62 6572 ction->number\n-000fb680: 203d 206e 756d 3b3c 2f64 6976 3e0a 3c64 = num;
.\n-000fb6a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-000fb6d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >hea\n-000fb720: 6465 723c 2f61 3e2d 2667 743b 745f 5f74 der->t__t\n-000fb730: 7261 6e73 6163 7469 6f6e 2d26 6774 3b64 ransaction->d\n-000fb740: 6573 6372 6970 7469 6f6e 203d 203c 7370 escription = "T\n-000fb770: 7261 6e73 6163 7469 6f6e 616c 2064 6174 ransactional dat\n-000fb780: 6126 7175 6f74 3b3c 2f73 7061 6e3e 3b3c a";<\n-000fb790: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
if (soa\n-000fb7d0: 705f 6361 6c6c 5f77 6562 6d65 7468 6f64 p_call_webmethod\n-000fb7e0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-000fb810: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , endpo\n-000fb860: 696e 743c 2f61 3e2c 204e 554c 4c2c 202e int, NULL, .\n-000fb870: 2e2e 2929 3c2f 6469 763e 0a3c 6469 7620 ..))
.
.\n-000fb890: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro\n-000fb8b0: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
.<\n-000fb8c0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-000fb8d0: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-000fb8e0: 6874 6d6c 5f61 6330 3931 6466 6534 6530 html_ac091dfe4e0\n-000fb8f0: 3162 3661 3038 3264 3931 3663 3338 3165 1b6a082d916c381e\n-000fb900: 3730 3036 6261 223e 3c64 6976 2063 6c61 7006ba\">struct SOAP_EN\n-000fb990: 565f 5f48 6561 6465 7220 2a20 6865 6164 V__Header * head\n-000fb9a0: 6572 3c2f 6469 763e 3c64 6976 2063 6c61 er
The s\n-000fb9c0: 6f61 703a 3a68 6561 6465 7220 706f 696e oap::header poin\n-000fb9d0: 7473 2074 6f20 6120 534f 4150 5f45 4e56 ts to a SOAP_ENV\n-000fb9e0: 5f5f 4865 6164 6572 2073 7472 7563 7475 __Header structu\n-000fb9f0: 7265 2077 6974 6820 7468 6520 534f 4150 re with the SOAP\n-000fba00: 2048 6561 6465 7220 7468 6174 2077 6173 Header that was\n-000fba10: 2072 6563 6569 7665 6420 6f72 2074 6861 received or tha\n-000fba20: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
D\n-000fba40: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-000fba50: 7464 736f 6170 322e 683a 3239 3535 3c2f tdsoap2.h:2955
.

\n-000fca70: 5375 7070 6f73 6520 6d65 7468 6f64 203c Suppose method <\n-000fca80: 636f 6465 3e6e 735f 5f6c 6f67 696e 3c2f code>ns__login uses both \n-000fcaa0: 6865 6164 6572 2070 6172 7473 2028 6174 header parts (at\n-000fcab0: 206d 6f73 7429 2c20 7468 656e 2074 6869 most), then thi\n-000fcac0: 7320 6973 2064 6563 6c61 7265 6420 6173 s is declared as\n-000fcad0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
//gsoap ns s\n-000fcb20: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he\n-000fcb30: 6164 6572 2d70 6172 743a 206c 6f67 696e ader-part: login\n-000fcb40: 2068 5f5f 7472 616e 7361 6374 696f 6e20 h__transaction \n-000fcb50: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000fcb70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-000fcb90: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n-000fcba0: 6865 6164 6572 2d70 6172 743a 206c 6f67 header-part: log\n-000fcbb0: 696e 2068 5f5f 6175 7468 656e 7469 6361 in h__authentica\n-000fcbc0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
i\n-000fcc00: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6c6f nt ns__lo\n-000fcc10: 6769 6e28 2e2e 2e29 3b3c 2f64 6976 3e0a gin(...);
.\n-000fcc20: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

Suppos\n-000fcc40: 6520 6d65 7468 6f64 203c 636f 6465 3e6e e method n\n-000fcc50: 735f 5f73 6561 7263 683c 2f63 6f64 653e s__search\n-000fcc60: 2075 7365 7320 6f6e 6c79 2074 6865 2066 uses only the f\n-000fcc70: 6972 7374 2068 6561 6465 7220 7061 7274 irst header part\n-000fcc80: 2c20 7468 656e 2074 6869 7320 6973 2064 , then this is d\n-000fcc90: 6563 6c61 7265 6420 6173 3a3c 2f70 3e0a eclared as:

.\n-000fcca0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
//\n-000fcce0: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-000fccf0: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n-000fcd00: 6172 743a 2073 6561 7263 6820 685f 5f74 art: search h__t\n-000fcd10: 7261 6e73 6163 7469 6f6e 203c 2f73 7061 ransaction
.
int \n-000fcd60: 6e73 5f5f 7365 6172 6368 282e 2e2e 293b ns__search(...);\n-000fcd70: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
Note that the m\n-000fcda0: 6574 686f 6420 6e61 6d65 2061 6e64 2068 ethod name and h\n-000fcdb0: 6561 6465 7220 7061 7274 206e 616d 6573 eader part names\n-000fcdc0: 206d 7573 7420 6265 206e 616d 6573 7061 must be namespa\n-000fcdd0: 6365 2071 7561 6c69 6669 6564 2e20 5468 ce qualified. Th\n-000fcde0: 6520 6865 6164 6572 7320 6d75 7374 2062 e headers must b\n-000fcdf0: 6520 7072 6573 656e 7420 696e 2061 6c6c e present in all\n-000fce00: 206f 7065 7261 7469 6f6e 7320 7468 6174 operations that\n-000fce10: 2064 6563 6c61 7265 6420 7468 6520 6865 declared the he\n-000fce20: 6164 6572 2070 6172 7473 2e3c 2f70 3e0a ader parts.

.\n-000fce30: 3c70 3e54 6f20 7370 6563 6966 7920 7468

To specify th\n-000fce40: 6520 6865 6164 6572 2070 6172 7473 2066 e header parts f\n-000fce50: 6f72 2074 6865 206d 6574 686f 6420 696e or the method in\n-000fce60: 7075 7420 286d 6574 686f 6420 7265 7175 put (method requ\n-000fce70: 6573 7420 6d65 7373 6167 6529 2c20 7573 est message), us\n-000fce80: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

.
<\n-000fceb0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000fcec0: 656e 7422 3e2f 2f67 736f 6170 206e 616d ent\">//gsoap nam\n-000fced0: 6573 7061 6365 2d70 7265 6669 7820 7365 espace-prefix se\n-000fcee0: 7276 6963 6520 6d65 7468 6f64 2d69 6e70 rvice method-inp\n-000fcef0: 7574 2d68 6561 6465 722d 7061 7274 3a20 ut-header-part: \n-000fcf00: 6d65 7468 6f64 2d6e 616d 6520 6865 6164 method-name head\n-000fcf10: 6572 2d70 6172 743c 2f73 7061 6e3e 3c2f er-part.

S\n-000fcf40: 696d 696c 6172 6c79 2c20 746f 2073 7065 imilarly, to spe\n-000fcf50: 6369 6679 2074 6865 2068 6561 6465 7220 cify the header \n-000fcf60: 7061 7274 7320 666f 7220 7468 6520 6d65 parts for the me\n-000fcf70: 7468 6f64 206f 7574 7075 7420 286d 6574 thod output (met\n-000fcf80: 686f 6420 7265 7370 6f6e 7365 206d 6573 hod response mes\n-000fcf90: 7361 6765 292c 2075 7365 3a3c 2f70 3e0a sage), use:

.\n-000fcfa0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
//\n-000fcfe0: 6773 6f61 7020 6e61 6d65 7370 6163 652d gsoap namespace-\n-000fcff0: 7072 6566 6978 2073 6572 7669 6365 206d prefix service m\n-000fd000: 6574 686f 642d 6f75 7470 7574 2d68 6561 ethod-output-hea\n-000fd010: 6465 722d 7061 7274 3a20 6d65 7468 6f64 der-part: method\n-000fd020: 2d6e 616d 6520 6865 6164 6572 2d70 6172 -name header-par\n-000fd030: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
.<\n-000fd040: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The dec\n-000fd060: 6c61 7261 7469 6f6e 7320 6f6e 6c79 2061 larations only a\n-000fd070: 6666 6563 7420 7468 6520 5753 444c 2e20 ffect the WSDL. \n-000fd080: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

\n-000fd090: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n-000fd0d0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct SOAP_\n-000fd120: 454e 565f 5f48 6561 6465 723c 2f61 3e20 ENV__Header \n-000fd130: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-000fd150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char *h_\n-000fd190: 5f74 7261 6e73 6163 7469 6f6e 3b20 3c2f _transaction; .
struct U\n-000fd1e0: 7365 7241 7574 6820 2a68 5f5f 6175 7468 serAuth *h__auth\n-000fd1f0: 656e 7469 6361 7469 6f6e 3b20 3c2f 6469 entication; .
};
.<\n-000fd220: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fd230: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-000fd250: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n-000fd260: 2d69 6e70 7574 2d68 6561 6465 722d 7061 -input-header-pa\n-000fd270: 7274 3a20 6c6f 6769 6e20 685f 5f61 7574 rt: login h__aut\n-000fd280: 6865 6e74 6963 6174 696f 6e20 3c2f 7370 hentication
.
//gsoap ns ser\n-000fd2d0: 7669 6365 206d 6574 686f 642d 696e 7075 vice method-inpu\n-000fd2e0: 742d 6865 6164 6572 2d70 6172 743a 206c t-header-part: l\n-000fd2f0: 6f67 696e 2068 5f5f 7472 616e 7361 6374 ogin h__transact\n-000fd300: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion .
//gsoa\n-000fd340: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n-000fd350: 686f 642d 6f75 7470 7574 2d68 6561 6465 hod-output-heade\n-000fd360: 722d 7061 7274 3a20 6c6f 6769 6e20 685f r-part: login h_\n-000fd370: 5f74 7261 6e73 6163 7469 6f6e 203c 2f73 _transaction
.
int ns__login(...)\n-000fd3d0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000fd3f0: 703e 5468 6520 6865 6164 6572 7320 6d75 p>The headers mu\n-000fd400: 7374 2062 6520 7072 6573 656e 7420 696e st be present in\n-000fd410: 2061 6c6c 206f 7065 7261 7469 6f6e 7320 all operations \n-000fd420: 7468 6174 2064 6563 6c61 7265 6420 7468 that declared th\n-000fd430: 6520 6865 6164 6572 2070 6172 7473 2e3c e header parts.<\n-000fd440: 2f70 3e0a 3c70 3e53 6565 2061 6c73 6f20 /p>.

See also \n-000fd450: 4150 4920 646f 6375 6d65 6e74 6174 696f API documentatio\n-000fd460: 6e20 4d6f 6475 6c65 203c 6120 636c 6173 n Module Header s\n-000fd4a0: 7472 7563 7475 7265 2061 6e64 2066 756e tructure and fun\n-000fd4b0: 6374 696f 6e73 3c2f 613e 2e3c 2f70 3e0a ctions.

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

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

.

.SOAP\n-000fd520: 2046 6175 6c74 2070 726f 6365 7373 696e Fault processin\n-000fd530: 673c 2f68 313e 0a3c 703e 4120 6275 696c g

.

A buil\n-000fd540: 742d 696e 2053 4f41 5020 4661 756c 7420 t-in SOAP Fault \n-000fd550: 6461 7461 2073 7472 7563 7475 7265 203c data structure <\n-000fd560: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SO\n-000fd5c0: 4150 5f45 4e56 5f5f 4661 756c 743c 2f61 AP_ENV__Fault is gene\n-000fd5e0: 7261 7465 6420 6279 2074 6865 2073 6f61 rated by the soa\n-000fd5f0: 7063 7070 3220 746f 6f6c 2066 6f72 2065 pcpp2 tool for e\n-000fd600: 7863 6861 6e67 696e 6720 6578 6365 7074 xchanging except\n-000fd610: 696f 6e20 6d65 7373 6167 6573 2e20 5468 ion messages. Th\n-000fd620: 6973 2073 7472 7563 7475 7265 2068 6173 is structure has\n-000fd630: 2074 6865 2067 656e 6572 616c 2066 6f72 the general for\n-000fd640: 6d3a 3c2f 703e 0a3c 6469 7620 636c 6173 m:

..
{.
_Q\n-000fd770: 4e61 6d65 3c2f 613e 203c 6120 636c 6173 Name faultcod\n-000fd7e0: 653c 2f61 3e3b 203c 7370 616e 2063 6c61 e; // \n-000fd800: 5f51 4e61 6d65 2069 7320 6275 696c 742d _QName is built-\n-000fd810: 696e 203c 2f73 7061 6e3e 3c2f 6469 763e in
\n-000fd820: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char *fau\n-000fd8c0: 6c74 7374 7269 6e67 3c2f 613e 3b20 3c2f ltstring; .
char\n-000fd910: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *faultactor;\n-000fd980: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
...
\n-000fdbf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *SOAP_ENV__\n-000fdc80: 5265 6173 6f6e 3c2f 613e 3b20 3c2f 6469 Reason; .
char *\n-000fdcd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 S\n-000fdd30: 4f41 505f 454e 565f 5f4e 6f64 653c 2f61 OAP_ENV__Node;
.\n-000fde00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
str\n-000fde30: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_EN\n-000fde80: 565f 5f44 6574 6169 6c3c 2f61 3e20 2a3c V__Detail *<\n-000fde90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000fdea0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n-000fdeb0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-000fdec0: 6661 756c 742e 6874 6d6c 2361 3536 3065 fault.html#a560e\n-000fded0: 3666 6430 3761 3662 3266 3531 6365 6639 6fd07a6b2f51cef9\n-000fdee0: 3761 6131 3232 3832 6338 3730 223e 534f 7aa12282c870\">SO\n-000fdef0: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail; // SOA\n-000fdf20: 5020 312e 3220 6465 7461 696c 206d 656d P 1.2 detail mem\n-000fdf30: 6265 7220 3c2f 7370 616e 3e3c 2f64 6976 ber .
};
.\n-000fdf70: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct \n-000fdfd0: 534f 4150 5f45 4e56 5f5f 436f 6465 3c2f SOAP_ENV__Code
.
{.
_QN\n-000fe070: 616d 653c 2f61 3e20 3c61 2063 6c61 7373 ame SOAP_ENV__\n-000fe0e0: 5661 6c75 653c 2f61 3e3b 203c 2f64 6976 Value; .
st\n-000fe120: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_ENV\n-000fe170: 5f5f 436f 6465 3c2f 613e 202a 3c61 2063 __Code *SOAP_E\n-000fe1e0: 4e56 5f5f 5375 6263 6f64 653c 2f61 3e3b NV__Subcode;\n-000fe1f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
}; .
stru\n-000fe240: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct SOAP_ENV\n-000fe290: 5f5f 4465 7461 696c 3c2f 613e 203c 2f64 __Detail .
{
.\n-000fe2d0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000fe2f0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t __type<\n-000fe360: 2f61 3e3b 2020 3c73 7061 6e20 636c 6173 /a>; // T\n-000fe380: 6865 2053 4f41 505f 5459 5045 5f20 6f66 he SOAP_TYPE_ of\n-000fe390: 2074 6865 206f 626a 6563 7420 7365 7269 the object seri\n-000fe3a0: 616c 697a 6564 2061 7320 4661 756c 7420 alized as Fault \n-000fe3b0: 6465 7461 696c 203c 2f73 7061 6e3e 3c2f detail .
void\n-000fe400: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *fault; // pointer to\n-000fe490: 2074 6865 2066 6175 6c74 206f 626a 6563 the fault objec\n-000fe4a0: 742c 206f 7220 4e55 4c4c 203c 2f73 7061 t, or NULL
.
<\n-000fe4d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000fe4e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-000fe4f0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-000fe500: 3563 3632 6432 3662 3438 3233 6237 3663 5c62d26b4823b76c\n-000fe510: 3562 3465 6632 3965 3738 3635 6433 6630 5b4ef29e7865d3f0\n-000fe520: 223e 5f58 4d4c 3c2f 613e 203c 6120 636c \">_XML __any\n-000fe590: 3c2f 613e 3b20 203c 7370 616e 2063 6c61 ; // \n-000fe5b0: 616e 7920 6f74 6865 7220 6465 7461 696c any other detail\n-000fe5c0: 2065 6c65 6d65 6e74 2063 6f6e 7465 6e74 element content\n-000fe5d0: 2028 7374 6f72 6564 2069 6e20 584d 4c20 (stored in XML \n-000fe5e0: 666f 726d 6174 2920 3c2f 7370 616e 3e3c format) <\n-000fe5f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n-000fe610: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
.
s\n-000fe820: 7472 7563 7420 534f 4150 5f45 4e56 5f5f truct SOAP_ENV__\n-000fe830: 436f 6465 202a 2053 4f41 505f 454e 565f Code * SOAP_ENV_\n-000fe840: 5f53 7562 636f 6465 3c2f 6469 763e 3c64 _Subcode
Optional elemen\n-000fe870: 7420 534f 4150 2d45 4e56 3a53 7562 636f t SOAP-ENV:Subco\n-000fe880: 6465 206f 6620 5853 4420 7479 7065 2053 de of XSD type S\n-000fe890: 4f41 502d 454e 563a 436f 6465 3c2f 6469 OAP-ENV:Code
Definiti\n-000fe8c0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-000fe8d0: 2e68 3a39 3437 353c 2f64 6976 3e3c 2f64 .h:9475
.
\n-000fe9d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
_QName SOAP_\n-000fe9f0: 454e 565f 5f56 616c 7565 3c2f 6469 763e ENV__Value
\n-000fea00: 3c64 6976 2063 6c61 7373 3d22 7474 646f
Optional elem\n-000fea20: 656e 7420 534f 4150 2d45 4e56 3a56 616c ent SOAP-ENV:Val\n-000fea30: 7565 206f 6620 5853 4420 7479 7065 2078 ue of XSD type x\n-000fea40: 7364 3a51 4e61 6d65 3c2f 6469 763e 3c64 sd:QName
Definition:<\n-000fea70: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-000fea80: 3437 333c 2f64 6976 3e3c 2f64 6976 3e0a 473
.\n-000fea90: 3c64 6976 2063 6c61 7373 3d22 7474 6322 \n-000feb40: 534f 4150 2046 6175 6c74 2044 6574 6169 SOAP Fault Detai\n-000feb50: 6c20 7374 7275 6374 7572 652e 3c2f 6469 l structure.
Definiti\n-000feb80: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-000feb90: 2e68 3a39 3438 323c 2f64 6976 3e3c 2f64 .h:9482
.
\n-000feca0: 766f 6964 202a 2066 6175 6c74 3c2f 6469 void * fault
Any data of\n-000fecd0: 2073 6f6d 6520 7479 7065 2054 2073 6572 some type T ser\n-000fece0: 6961 6c69 7a65 6420 6173 2066 6175 6c74 ialized as fault\n-000fecf0: 2065 6c65 6d65 6e74 2077 6865 6e20 6974 element when it\n-000fed00: 7320 534f 4150 5f54 5950 455f 5420 6973 s SOAP_TYPE_T is\n-000fed10: 2061 7373 6967 6e65 6420 746f 205f 5f74 assigned to __t\n-000fed20: 7970 653c 2f64 6976 3e3c 6469 7620 636c ype
D\n-000fed40: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-000fed50: 7464 736f 6170 322e 683a 3934 3836 3c2f tdsoap2.h:9486
.
<\n-000fede0: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n-000fedf0: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n-000fee00: 5f5f 5f64 6574 6169 6c2e 6874 6d6c 2361 ___detail.html#a\n-000fee10: 3236 3165 3432 3932 3136 3733 6132 3862 261e42921673a28b\n-000fee20: 6430 3835 6134 3764 3465 6436 3563 6536 d085a47d4ed65ce6\n-000fee30: 223e 534f 4150 5f45 4e56 5f5f 4465 7461 \">SOAP_ENV__Deta\n-000fee40: 696c 3a3a 5f5f 616e 793c 2f61 3e3c 2f64 il::__any
_XML __an\n-000fee70: 793c 2f64 6976 3e3c 6469 7620 636c 6173 y
Any XM\n-000fee90: 4c20 636f 6e74 656e 742e 3c2f 6469 763e L content.
\n-000feea0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
Definition\n-000feec0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-000feed0: 3a39 3438 383c 2f64 6976 3e3c 2f64 6976 :9488
.
i\n-000fefe0: 6e74 205f 5f74 7970 653c 2f64 6976 3e3c nt __type
<\n-000feff0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-000ff000: 223e 416e 7920 6461 7461 206f 6620 736f \">Any data of so\n-000ff010: 6d65 2074 7970 6520 5420 7365 7269 616c me type T serial\n-000ff020: 697a 6564 2061 7320 6661 756c 7420 656c ized as fault el\n-000ff030: 656d 656e 7420 7768 656e 2069 7473 2053 ement when its S\n-000ff040: 4f41 505f 5459 5045 5f54 2069 7320 6173 OAP_TYPE_T is as\n-000ff050: 7369 676e 6564 2074 6f20 5f5f 7479 7065 signed to __type\n-000ff060: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Defi\n-000ff080: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-000ff090: 6f61 7032 2e68 3a39 3438 343c 2f64 6976 oap2.h:9484
.
char *\n-000ff1b0: 2053 4f41 505f 454e 565f 5f4e 6f64 653c SOAP_ENV__Node<\n-000ff1c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
Optional\n-000ff1e0: 2065 6c65 6d65 6e74 2053 4f41 502d 454e element SOAP-EN\n-000ff1f0: 563a 4e6f 6465 206f 6620 5853 4420 7479 V:Node of XSD ty\n-000ff200: 7065 2078 7364 3a73 7472 696e 673c 2f64 pe xsd:string
Definit\n-000ff230: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-000ff240: 322e 683a 3934 3630 3c2f 6469 763e 3c2f 2.h:9460
.
SOAP_E\n-000ff320: 4e56 5f5f 4661 756c 743a 3a53 4f41 505f NV__Fault::SOAP_\n-000ff330: 454e 565f 5f44 6574 6169 6c3c 2f61 3e3c ENV__Detail<\n-000ff340: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
struct \n-000ff360: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail\n-000ff370: 202a 2053 4f41 505f 454e 565f 5f44 6574 * SOAP_ENV__Det\n-000ff380: 6169 6c3c 2f64 6976 3e3c 6469 7620 636c ail
Opti\n-000ff3a0: 6f6e 616c 2065 6c65 6d65 6e74 2053 4f41 onal element SOA\n-000ff3b0: 502d 454e 563a 4465 7461 696c 206f 6620 P-ENV:Detail of \n-000ff3c0: 5853 4420 7479 7065 2053 4f41 502d 454e XSD type SOAP-EN\n-000ff3d0: 563a 4465 7461 696c 3c2f 6469 763e 3c64 V:Detail
Definition:<\n-000ff400: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-000ff410: 3436 343c 2f64 6976 3e3c 2f64 6976 3e0a 464
.\n-000ff420: 3c64 6976 2063 6c61 7373 3d22 7474 6322
<\n-000ff480: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-000ff490: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">SOAP_ENV__F\n-000ff4f0: 6175 6c74 3a3a 534f 4150 5f45 4e56 5f5f ault::SOAP_ENV__\n-000ff500: 526f 6c65 3c2f 613e 3c2f 6469 763e 3c64 Role
char * SOAP_EN\n-000ff530: 565f 5f52 6f6c 653c 2f64 6976 3e3c 6469 V__Role
\n-000ff550: 4f70 7469 6f6e 616c 2065 6c65 6d65 6e74 Optional element\n-000ff560: 2053 4f41 502d 454e 563a 526f 6c65 206f SOAP-ENV:Role o\n-000ff570: 6620 5853 4420 7479 7065 2078 7364 3a73 f XSD type xsd:s\n-000ff580: 7472 696e 673c 2f64 6976 3e3c 6469 7620 tring
Definition:\n-000ff5b0: 2073 7464 736f 6170 322e 683a 3934 3632 stdsoap2.h:9462\n-000ff5c0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
.\n-000ff640: 3c61 2068 7265 663d 2273 7472 7563 745f SOAP_ENV__Faul\n-000ff6a0: 743a 3a53 4f41 505f 454e 565f 5f52 6561 t::SOAP_ENV__Rea\n-000ff6b0: 736f 6e3c 2f61 3e3c 2f64 6976 3e3c 6469 son
struct SOAP_ENV\n-000ff6e0: 5f5f 5265 6173 6f6e 202a 2053 4f41 505f __Reason * SOAP_\n-000ff6f0: 454e 565f 5f52 6561 736f 6e3c 2f64 6976 ENV__Reason
Optional ele\n-000ff720: 6d65 6e74 2053 4f41 502d 454e 563a 5265 ment SOAP-ENV:Re\n-000ff730: 6173 6f6e 206f 6620 5853 4420 7479 7065 ason of XSD type\n-000ff740: 2053 4f41 502d 454e 563a 5265 6173 6f6e SOAP-ENV:Reason\n-000ff750: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Defi\n-000ff770: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-000ff780: 6f61 7032 2e68 3a39 3435 383c 2f64 6976 oap2.h:9458
.
SOA\n-000ff860: 505f 454e 565f 5f46 6175 6c74 3a3a 6661 P_ENV__Fault::fa\n-000ff870: 756c 7473 7472 696e 673c 2f61 3e3c 2f64 ultstring
char * fa\n-000ff8a0: 756c 7473 7472 696e 673c 2f64 6976 3e3c ultstring
<\n-000ff8b0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-000ff8c0: 223e 4f70 7469 6f6e 616c 2065 6c65 6d65 \">Optional eleme\n-000ff8d0: 6e74 2066 6175 6c74 7374 7269 6e67 206f nt faultstring o\n-000ff8e0: 6620 5853 4420 7479 7065 2078 7364 3a73 f XSD type xsd:s\n-000ff8f0: 7472 696e 673c 2f64 6976 3e3c 6469 7620 tring
Definition:\n-000ff920: 2073 7464 736f 6170 322e 683a 3934 3530 stdsoap2.h:9450\n-000ff930: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
.\n-000ff9b0: 3c61 2068 7265 663d 2273 7472 7563 745f SOAP_ENV__Faul\n-000ffa10: 743a 3a53 4f41 505f 454e 565f 5f43 6f64 t::SOAP_ENV__Cod\n-000ffa20: 653c 2f61 3e3c 2f64 6976 3e3c 6469 7620 e
s\n-000ffa40: 7472 7563 7420 534f 4150 5f45 4e56 5f5f truct SOAP_ENV__\n-000ffa50: 436f 6465 202a 2053 4f41 505f 454e 565f Code * SOAP_ENV_\n-000ffa60: 5f43 6f64 653c 2f64 6976 3e3c 6469 7620 _Code
Op\n-000ffa80: 7469 6f6e 616c 2065 6c65 6d65 6e74 2053 tional element S\n-000ffa90: 4f41 502d 454e 563a 436f 6465 206f 6620 OAP-ENV:Code of \n-000ffaa0: 5853 4420 7479 7065 2053 4f41 502d 454e XSD type SOAP-EN\n-000ffab0: 563a 436f 6465 3c2f 6469 763e 3c64 6976 V:Code
<\n-000ffad0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:945\n-000ffaf0: 363c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6
.SOAP_ENV__Fau\n-000ffbd0: 6c74 3a3a 6661 756c 7463 6f64 653c 2f61 lt::faultcode
_QNam\n-000ffc00: 6520 6661 756c 7463 6f64 653c 2f64 6976 e faultcode
Optional ele\n-000ffc30: 6d65 6e74 2066 6175 6c74 636f 6465 206f ment faultcode o\n-000ffc40: 6620 5853 4420 7479 7065 2078 7364 3a51 f XSD type xsd:Q\n-000ffc50: 4e61 6d65 3c2f 6469 763e 3c64 6976 2063 Name
\n-000ffc70: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-000ffc80: 7374 6473 6f61 7032 2e68 3a39 3434 383c stdsoap2.h:9448<\n-000ffc90: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
.
char *\n-000ffda0: 2066 6175 6c74 6163 746f 723c 2f64 6976 faultactor
Optional ele\n-000ffdd0: 6d65 6e74 2066 6175 6c74 6163 746f 7220 ment faultactor \n-000ffde0: 6f66 2058 5344 2074 7970 6520 7873 643a of XSD type xsd:\n-000ffdf0: 7374 7269 6e67 3c2f 6469 763e 3c64 6976 string
<\n-000ffe10: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:945\n-000ffe30: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
.SOAP_ENV__Fau\n-000fff10: 6c74 3a3a 6465 7461 696c 3c2f 613e 3c2f lt::detail
struct S\n-000fff40: 4f41 505f 454e 565f 5f44 6574 6169 6c20 OAP_ENV__Detail \n-000fff50: 2a20 6465 7461 696c 3c2f 6469 763e 3c64 * detail
Optional elemen\n-000fff80: 7420 6465 7461 696c 206f 6620 5853 4420 t detail of XSD \n-000fff90: 7479 7065 2053 4f41 502d 454e 563a 4465 type SOAP-ENV:De\n-000fffa0: 7461 696c 3c2f 6469 763e 3c64 6976 2063 tail
\n-000fffc0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-000fffd0: 7374 6473 6f61 7032 2e68 3a39 3435 343c stdsoap2.h:9454<\n-000fffe0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
.

The first \n-00100010: 666f 7572 206d 656d 6265 7273 2069 6e20 four members in \n-00100020: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 S\n-00100080: 4f41 505f 454e 565f 5f46 6175 6c74 3c2f OAP_ENV__Fault are SO\n-001000a0: 4150 2031 2e31 2073 7065 6369 6669 632e AP 1.1 specific.\n-001000b0: 2054 6865 206c 6173 7420 6669 7665 206d The last five m\n-001000c0: 656d 6265 7273 2061 7265 2053 4f41 5020 embers are SOAP \n-001000d0: 312e 3220 7370 6563 6966 6963 2e20 596f 1.2 specific. Yo\n-001000e0: 7520 6361 6e20 7265 6465 6669 6e65 2074 u can redefine t\n-001000f0: 6865 7365 2073 7472 7563 7475 7265 7320 hese structures \n-00100100: 696e 2074 6865 2069 6e74 6572 6661 6365 in the interface\n-00100110: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n-00100120: 2073 6f61 7063 7070 322e 2046 6f72 2065 soapcpp2. For e\n-00100130: 7861 6d70 6c65 2c20 796f 7520 6361 6e20 xample, you can \n-00100140: 7573 6520 6120 3c63 6f64 653e 636c 6173 use a clas\n-00100150: 733c 2f63 6f64 653e 2066 6f72 2074 6865 s for the\n-00100160: 203c 636f 6465 3e3c 6120 636c 6173 733d \n-001001c0: 534f 4150 5f45 4e56 5f5f 4661 756c 743c SOAP_ENV__Fault<\n-001001d0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 2061 /a> and a\n-001001e0: 6464 206d 6574 686f 6473 2066 6f72 2063 dd methods for c\n-001001f0: 6f6e 7665 6e69 656e 6365 2e3c 2f70 3e0a onvenience.

.\n-00100200: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

The SO\n-00100270: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail struct\n-00100290: 7572 6520 6361 6e20 6265 2063 6861 6e67 ure can be chang\n-001002a0: 6564 2074 6f20 7468 6520 6e65 6564 7320 ed to the needs \n-001002b0: 6f66 2057 6562 2073 6572 7669 6365 2061 of Web service a\n-001002c0: 7070 6c69 6361 7469 6f6e 2074 6f20 636f pplication to co\n-001002d0: 6d6d 756e 6963 6174 6520 7370 6563 6966 mmunicate specif\n-001002e0: 6963 2066 6175 6c74 2064 6174 6120 7374 ic fault data st\n-001002f0: 7275 6374 7572 6573 2c20 6275 7420 7468 ructures, but th\n-00100300: 6973 2069 7320 6765 6e65 7261 6c6c 7920 is is generally \n-00100310: 6e6f 7420 6e65 6365 7373 6172 7920 6265 not necessary be\n-00100320: 6361 7573 6520 7468 6520 6170 706c 6963 cause the applic\n-00100330: 6174 696f 6e2d 7370 6563 6966 6963 2053 ation-specific S\n-00100340: 4f41 5020 4661 756c 7420 6465 7461 696c OAP Fault detail\n-00100350: 7320 6361 6e20 6265 2073 6572 6961 6c69 s can be seriali\n-00100360: 7a65 6420 7669 6120 7468 6520 3c63 6f64 zed via the __type \n-00100380: 616e 6420 3c63 6f64 653e 6661 756c 743c and fault<\n-00100390: 2f63 6f64 653e 206d 656d 6265 7273 2069 /code> members i\n-001003a0: 6e20 7468 6520 3c63 6f64 653e 3c61 2063 n the SOA\n-00100410: 505f 454e 565f 5f44 6574 6169 6c3c 2f61 P_ENV__Detail member,\n-00100430: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section Void pointer s\n-00100470: 6572 6961 6c69 7a61 7469 6f6e 3c2f 613e erialization\n-00100480: 206f 6e20 7468 6520 7365 7269 616c 697a on the serializ\n-00100490: 6174 696f 6e20 6f66 2064 6174 6120 7265 ation of data re\n-001004a0: 6665 7272 6564 2074 6f20 6279 203c 636f ferred to by __type\n-001004c0: 2061 6e64 203c 636f 6465 3e66 6175 6c74 and fault\n-001004d0: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

.

\n-001004e0: 5768 656e 2061 2075 7365 722d 6465 6669 When a user-defi\n-001004f0: 6e65 2073 6572 7669 6365 206f 7065 7261 ne service opera\n-00100500: 7469 6f6e 2066 756e 6374 696f 6e20 7265 tion function re\n-00100510: 7475 726e 7320 616e 2065 7272 6f72 2077 turns an error w\n-00100520: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_sen\n-001005d0: 6465 725f 6661 756c 743c 2f61 3e3c 2f63 der_fault or so\n-00100690: 6170 5f72 6563 6569 7665 725f 6661 756c ap_receiver_faul\n-001006a0: 743c 2f61 3e3c 2f63 6f64 653e 2c20 7468 t, th\n-001006b0: 656e 2074 6865 2053 4f41 5020 4661 756c en the SOAP Faul\n-001006c0: 7420 7374 7275 6374 7572 6520 6973 2070 t structure is p\n-001006d0: 6f70 756c 6174 6564 2061 6e64 203c 636f opulated and soap:\n-001007a0: 3a66 6175 6c74 3c2f 613e 3c2f 636f 6465 :fault points to this\n-001007c0: 2053 4f41 5020 4661 756c 742e 2054 6865 SOAP Fault. The\n-001007d0: 2053 4f41 5020 4661 756c 7420 6973 2073 SOAP Fault is s\n-001007e0: 656e 7420 746f 2074 6865 2063 6c69 656e ent to the clien\n-001007f0: 742e 2054 6865 2063 6c69 656e 7420 706f t. The client po\n-00100800: 7075 6c61 7465 7320 6120 534f 4150 2046 pulates a SOAP F\n-00100810: 6175 6c74 2073 7472 7563 7475 7265 2074 ault structure t\n-00100820: 6861 7420 636f 6e74 6169 6e73 2074 6865 hat contains the\n-00100830: 2053 4f41 5020 4661 756c 7420 6d65 7373 SOAP Fault mess\n-00100840: 6167 6520 7769 7468 2064 6574 6169 6c73 age with details\n-00100850: 2e3c 2f70 3e0a 3c70 3e53 6572 7665 722d .

.

Server-\n-00100860: 7369 6465 2066 6175 6c74 7320 6172 6520 side faults are \n-00100870: 7261 6973 6564 2077 6974 6820 3c63 6f64 raised with \n-00100920: 736f 6170 5f73 656e 6465 725f 6661 756c soap_sender_faul\n-00100930: 743c 2f61 3e3c 2f63 6f64 653e 206f 7220 t or \n-00100940: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_recei\n-001009f0: 7665 725f 6661 756c 743c 2f61 3e3c 2f63 ver_fault. The \n-00100a10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 so\n-00100ab0: 6170 5f73 656e 6465 725f 6661 756c 743c ap_sender_fault<\n-00100ac0: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c20 /a> call \n-00100ad0: 7368 6f75 6c64 2062 6520 7573 6564 2074 should be used t\n-00100ae0: 6f20 696e 666f 726d 2074 6861 7420 7468 o inform that th\n-00100af0: 6520 7365 6e64 6572 2069 7320 6174 2066 e sender is at f\n-00100b00: 6175 6c74 2061 6e64 2074 6865 2073 656e ault and the sen\n-00100b10: 6465 7220 2863 6c69 656e 7429 2073 686f der (client) sho\n-00100b20: 756c 6420 6e6f 7420 7265 2d73 656e 6420 uld not re-send \n-00100b30: 7468 6520 7265 7175 6573 742e 2054 6865 the request. The\n-00100b40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_rece\n-00100bf0: 6976 6572 5f66 6175 6c74 3c2f 613e 3c2f iver_fault call shoul\n-00100c10: 6420 6265 2075 7365 6420 746f 2069 6e64 d be used to ind\n-00100c20: 6963 6174 6520 6120 7465 6d70 6f72 6172 icate a temporar\n-00100c30: 7920 7365 7276 6572 2d73 6964 6520 7072 y server-side pr\n-00100c40: 6f62 6c65 6d2c 2073 6f20 6120 7365 6e64 oblem, so a send\n-00100c50: 6572 2028 636c 6965 6e74 2920 6361 6e20 er (client) can \n-00100c60: 7265 2d73 656e 6420 7468 6520 7265 7175 re-send the requ\n-00100c70: 6573 7420 6c61 7465 722e 2046 6f72 2065 est later. For e\n-00100c80: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

.
in\n-00100cd0: 743c 2f73 7061 6e3e 206e 7331 5f5f 6d79 t ns1__my\n-00100ce0: 4d65 7468 6f64 283c 7370 616e 2063 6c61 Method(str\n-00100d00: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, ...\n-00100d70: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
.
{.
... //
\n-00100dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
r\n-00100e00: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn \n-00100e60: 736f 6170 5f72 6563 6569 7665 725f 6661 soap_receiver_fa\n-00100e70: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n-00100ea0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "Resou\n-00100ed0: 7263 6520 7465 6d70 6f72 6172 696c 7920 rce temporarily \n-00100ee0: 756e 6176 6169 6c61 626c 6526 7175 6f74 unavailable"\n-00100ef0: 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c 293b ;, NULL);\n-00100f00: 203c 7370 616e 2063 6c61 7373 3d22 636f // return\n-00100f20: 2066 6175 6c74 2074 6f20 7365 6e64 6572 fault to sender\n-00100f30: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-00100f40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00100f50: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
.
<\n-00100f60: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00100f70: 3c70 3e49 6e20 7468 6520 6578 616d 706c

In the exampl\n-00100f80: 652c 2074 6865 2053 4f41 5020 4661 756c e, the SOAP Faul\n-00100f90: 7420 6465 7461 696c 7320 7765 7265 2065 t details were e\n-00100fa0: 6d70 7479 2028 4e55 4c4c 292e 2059 6f75 mpty (NULL). You\n-00100fb0: 206d 6179 2070 6173 7320 616e 2058 4d4c may pass an XML\n-00100fc0: 2066 7261 676d 656e 742c 2077 6869 6368 fragment, which\n-00100fd0: 2077 696c 6c20 6265 206c 6974 6572 616c will be literal\n-00100fe0: 6c79 2069 6e63 6c75 6465 6420 696e 2074 ly included in t\n-00100ff0: 6865 2053 4f41 5020 4661 756c 7420 6d65 he SOAP Fault me\n-00101000: 7373 6167 652e 2046 6f72 2057 532d 4920 ssage. For WS-I \n-00101010: 4261 7369 6320 5072 6f66 696c 6520 636f Basic Profile co\n-00101020: 6d70 6c69 616e 6365 2c20 796f 7520 6d75 mpliance, you mu\n-00101030: 7374 2070 6173 7320 616e 2058 4d4c 2073 st pass an XML s\n-00101040: 7472 696e 6720 7769 7468 206f 6e65 206f tring with one o\n-00101050: 7220 6d6f 7265 206e 616d 6573 7061 6365 r more namespace\n-00101060: 2071 7561 6c69 6669 6564 2065 6c65 6d65 qualified eleme\n-00101070: 6e74 732c 2073 7563 6820 6173 3a3c 2f70 nts, such as:.

return soap_receiv\n-00101130: 6572 5f66 6175 6c74 3c2f 613e 283c 6120 er_fault(soap, "\n-00101190: 5265 736f 7572 6365 2074 656d 706f 7261 Resource tempora\n-001011a0: 7269 6c79 2075 6e61 7661 696c 6162 6c65 rily unavailable\n-001011b0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-001011c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001011d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-001011e0: 3b26 6c74 3b65 7272 6f72 636f 6465 2078 ;<errorcode x\n-001011f0: 6d6c 6e73 3d26 2333 393b 6874 7470 3a2f mlns='http:/\n-00101200: 2f74 656d 7075 7269 2e6f 7267 2623 3339 /tempuri.org'\n-00101210: 3b26 6774 3b31 3233 266c 743b 2f65 7272 ;>123</err\n-00101220: 6f72 636f 6465 2667 743b 266c 743b 6572 orcode><er\n-00101230: 726f 7269 6e66 6f20 786d 6c6e 733d 2623 rorinfo xmlns=&#\n-00101240: 3339 3b68 7474 703a 2f2f 7465 6d70 7572 39;http://tempur\n-00101250: 692e 6f72 6726 2333 393b 2667 743b 6162 i.org'>ab\n-00101260: 6326 6c74 3b2f 6572 726f 7269 6e66 6f26 c</errorinfo&\n-00101270: 6774 3b26 7175 6f74 3b3c 2f73 7061 6e3e gt;"\n-00101280: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
.
<\n-00101290: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001012a0: 3c70 3e57 6865 6e20 6120 7365 7276 6963

When a servic\n-001012b0: 6520 6f70 6572 6174 696f 6e20 6e65 6564 e operation need\n-001012c0: 7320 746f 2070 6f70 756c 6174 6520 534f s to populate SO\n-001012d0: 4150 2046 6175 6c74 2064 6574 6169 6c73 AP Fault details\n-001012e0: 2077 6974 6820 6120 6170 706c 6963 6174 with a applicat\n-001012f0: 696f 6e2d 7370 6563 6966 6963 2064 6174 ion-specific dat\n-00101300: 612c 2069 7420 646f 6573 2073 6f20 6279 a, it does so by\n-00101310: 2061 7373 6967 6e69 6e67 2074 6865 203c assigning the <\n-00101320: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-001013e0: 703a 3a66 6175 6c74 3c2f 613e 3c2f 636f p::fault member of th\n-00101400: 6520 6375 7272 656e 7420 7265 6665 7265 e current refere\n-00101410: 6e63 6520 746f 2074 6865 2063 6f6e 7465 nce to the conte\n-00101420: 7874 2077 6974 6820 6170 7072 6f70 7269 xt with appropri\n-00101430: 6174 6520 6461 7461 2061 7373 6f63 6961 ate data associa\n-00101440: 7465 6420 7769 7468 2074 6865 2065 7863 ted with the exc\n-00101450: 6570 7469 6f6e 2061 6e64 2062 7920 7265 eption and by re\n-00101460: 7475 726e 696e 6720 7468 6520 6572 726f turning the erro\n-00101470: 7220 3c63 6f64 653e 2353 4f41 505f 4641 r #SOAP_FA\n-00101480: 554c 543c 2f63 6f64 653e 2e20 466f 7220 ULT. For \n-00101490: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

.
soap_rec\n-00101520: 6569 7665 725f 6661 756c 743c 2f61 3e28 eiver_fault(\n-00101530: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00101560: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00101580: 6f74 3b45 7272 6f72 206d 6573 7361 6765 ot;Error message\n-00101590: 2671 756f 743b 3c2f 7370 616e 3e2c 204e ", N\n-001015a0: 554c 4c29 3b20 3c2f 6469 763e 0a3c 6469 ULL);
.<\n-001015c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001015d0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n-00101610: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->version == \n-00101670: 3229 203c 7370 616e 2063 6c61 7373 3d22 2) // SOAP\n-00101690: 2031 2e32 2069 7320 7573 6564 203c 2f73 1.2 is used
.
{.
\n-00101700: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->fault-\n-00101760: 2667 743b 3c61 2063 6c61 7373 3d22 636f >SOAP_ENV__Det\n-001017d0: 6169 6c3c 2f61 3e20 3d20 736f 6170 5f6e ail = soap_n\n-001017e0: 6577 5f53 4f41 505f 454e 565f 5f44 6574 ew_SOAP_ENV__Det\n-001017f0: 6169 6c28 3c61 2063 6c61 7373 3d22 636f ail(soap<\n-00101820: 2f61 3e2c 202d 3129 3b3c 2f64 6976 3e0a /a>, -1);
.\n-00101830: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
soap<\n-00101870: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->fault-><\n-001018d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001018e0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n-001018f0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-00101900: 6661 756c 742e 6874 6d6c 2361 3536 3065 fault.html#a560e\n-00101910: 3666 6430 3761 3662 3266 3531 6365 6639 6fd07a6b2f51cef9\n-00101920: 3761 6131 3232 3832 6338 3730 223e 534f 7aa12282c870\">SO\n-00101930: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail->__type = SOAP_TYPE_ns\n-001019c0: 315f 5f6d 7953 7461 636b 4461 7461 5479 1__myStackDataTy\n-001019d0: 7065 3b20 3c73 7061 6e20 636c 6173 733d pe; // sta\n-001019f0: 636b 2074 7970 6520 3c2f 7370 616e 3e3c ck type <\n-00101a00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
soap->fault\n-00101aa0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->SOAP_ENV__De\n-00101b10: 7461 696c 3c2f 613e 2d26 6774 3b3c 6120 tail->fau\n-00101b80: 6c74 3c2f 613e 203d 2073 703b 2020 2020 lt = sp; \n-00101b90: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00101ba0: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-00101bc0: 2f2f 2070 6f69 6e74 2074 6f20 7374 6163 // point to stac\n-00101bd0: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
.\n-00101be0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
soap<\n-00101c20: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->fault-><\n-00101c80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00101c90: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n-00101ca0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-00101cb0: 6661 756c 742e 6874 6d6c 2361 3536 3065 fault.html#a560e\n-00101cc0: 3666 6430 3761 3662 3266 3531 6365 6639 6fd07a6b2f51cef9\n-00101cd0: 3761 6131 3232 3832 6338 3730 223e 534f 7aa12282c870\">SO\n-00101ce0: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail->__any\n-00101d60: 203d 204e 554c 4c3b 2020 2020 2020 2020 = NULL; \n-00101d70: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00101d80: 2020 2020 3c73 7061 6e20 636c 6173 733d // no \n-00101da0: 6f74 6865 7220 584d 4c20 6461 7461 203c other XML data <\n-00101db0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n-00101dd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
else \n-00101e10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-00101e30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
soap\n-00101e70: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->fault->\n-00101ed0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 d\n-00101f30: 6574 6169 6c3c 2f61 3e20 3d20 736f 6170 etail = soap\n-00101f40: 5f6e 6577 5f53 4f41 505f 454e 565f 5f44 _new_SOAP_ENV__D\n-00101f50: 6574 6169 6c28 3c61 2063 6c61 7373 3d22 etail(soa\n-00101f80: 703c 2f61 3e2c 202d 3129 3b20 3c2f 6469 p, -1); .
so\n-00101fd0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fault-&g\n-00102030: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;detail->\n-001020a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-00102100: 5f5f 7479 7065 3c2f 613e 203d 2053 4f41 __type = SOA\n-00102110: 505f 5459 5045 5f6e 7331 5f5f 6d79 5374 P_TYPE_ns1__mySt\n-00102120: 6163 6b44 6174 6154 7970 653b 203c 7370 ackDataType; // stack type\n-00102150: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-00102160: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00102170: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n-001021f0: 6661 756c 743c 2f61 3e2d 2667 743b 3c61 fault->det\n-00102260: 6169 6c3c 2f61 3e2d 2667 743b 3c61 2063 ail->faul\n-001022d0: 743c 2f61 3e20 3d20 7370 3b20 2020 2020 t = sp; \n-001022e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-001022f0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-00102310: 2f20 706f 696e 7420 746f 2073 7461 636b / point to stack\n-00102320: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-00102330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00102340: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n-001023c0: 6661 756c 743c 2f61 3e2d 2667 743b 3c61 fault->det\n-00102430: 6169 6c3c 2f61 3e2d 2667 743b 3c61 2063 ail->__an\n-001024a0: 793c 2f61 3e20 3d20 4e55 4c4c 3b20 2020 y = NULL; \n-001024b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-001024c0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001024e0: 2f20 6e6f 206f 7468 6572 2058 4d4c 2064 / no other XML d\n-001024f0: 6174 6120 3c2f 7370 616e 3e3c 2f64 6976 ata .
}
.<\n-00102530: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00102540: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-00102550: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n-001025b0: 4641 554c 543c 2f61 3e3b 203c 7370 616e FAULT; // return from \n-001025e0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-001025f0: 6e20 6361 6c6c 2077 6974 6820 7468 6520 n call with the \n-00102600: 6661 756c 743c 2f73 7061 6e3e 3c2f 6469 fault.
\n-00102670: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-001026b0: 3a3a 7665 7273 696f 6e3c 2f61 3e3c 2f64 ::version
short ver\n-001026e0: 7369 6f6e 3c2f 6469 763e 3c64 6976 2063 sion
SOA\n-00102700: 5020 7665 7273 696f 6e20 2830 203d 206e P version (0 = n\n-00102710: 6f20 534f 4150 2c20 3120 3d20 534f 4150 o SOAP, 1 = SOAP\n-00102720: 2031 2e31 2c20 3220 3d20 534f 4150 2031 1.1, 2 = SOAP 1\n-00102730: 2e32 293c 2f64 6976 3e3c 6469 7620 636c .2)
D\n-00102750: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-00102760: 7464 736f 6170 322e 683a 3238 3531 3c2f tdsoap2.h:2851
.

This produ\n-00103200: 6365 733a 3c2f 703e 0a3c 6469 7620 636c ces:

.
<SOAP-ENV:Fault<\n-00103270: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n-00103280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<SOAP-ENV:Code\n-001032c0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<SOAP-ENV:V\n-00103310: 616c 7565 3c2f 7370 616e 3e26 6774 3b3c alue><\n-00103320: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00103330: 6f72 6422 3e53 4f41 502d 454e 563a 5365 ord\">SOAP-ENV:Se\n-00103340: 6e64 6572 3c2f 7370 616e 3e26 6c74 3b2f nder</\n-00103350: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n-00103370: 4e56 3a56 616c 7565 3c2f 7370 616e 3e26 NV:Value&\n-00103380: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
\n-001033a0: 266c 743b 3c73 7061 6e20 636c 6173 733d <SO\n-001033c0: 4150 2d45 4e56 3a53 7562 636f 6465 3c2f AP-ENV:Subcode>
.\n-001033e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<SOAP-ENV:V\n-00103420: 616c 7565 3c2f 7370 616e 3e26 6774 3b3c alue><\n-00103430: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00103440: 6f72 6422 3e74 6572 3a49 6e76 616c 6964 ord\">ter:Invalid\n-00103450: 4172 6773 3c2f 7370 616e 3e26 6c74 3b2f Args</\n-00103460: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n-00103480: 4e56 3a56 616c 7565 3c2f 7370 616e 3e26 NV:Value&\n-00103490: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
\n-001034b0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-001034d0: 534f 4150 2d45 4e56 3a53 7562 636f 6465 SOAP-ENV:Subcode\n-001034e0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<\n-00103510: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n-00103530: 4e56 3a56 616c 7565 3c2f 7370 616e 3e26 NV:Value&\n-00103540: 6774 3b3c 7370 616e 2063 6c61 7373 3d22 gt;ter:NoP\n-00103560: 726f 6669 6c65 3c2f 7370 616e 3e20 266c rofile &l\n-00103570: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/SOA\n-00103590: 502d 454e 563a 5661 6c75 653c 2f73 7061 P-ENV:Value>
. \n-001035c0: 2020 2020 2026 6c74 3b2f 3c73 7061 6e20 </SOAP-ENV:Sub\n-001035f0: 636f 6465 3c2f 7370 616e 3e26 6774 3b3c code><\n-00103600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n-00103620: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /SOAP-\n-00103640: 454e 563a 5375 6263 6f64 653c 2f73 7061 ENV:Subcode>
. \n-00103670: 2026 6c74 3b2f 3c73 7061 6e20 636c 6173 </\n-00103690: 534f 4150 2d45 4e56 3a43 6f64 653c 2f73 SOAP-ENV:Code>
.<\n-001036b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001036c0: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <SOAP-ENV:Reason\n-001036f0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<SOAP-ENV:T\n-00103740: 6578 743c 2f73 7061 6e3e 203c 7370 616e ext xml:lang\n-00103770: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-00103790: 6f74 3b65 6e26 7175 6f74 3b3c 2f73 7061 ot;en">The<\n-001037c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> req\n-001037e0: 7565 7374 6564 3c2f 7370 616e 3e20 3c73 uested profile token Prof\n-00103850: 696c 6554 6f6b 656e 3c2f 7370 616e 3e20 ileToken \n-00103860: 3c73 7061 6e20 636c 6173 733d 226b 6579 does not exist.<\n-001038c0: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></SOAP-ENV:Te\n-001038f0: 7874 3c2f 7370 616e 3e26 6774 3b3c 2f64 xt>.
</SOAP-ENV:\n-00103940: 5265 6173 6f6e 3c2f 7370 616e 3e26 6774 Reason>\n-00103950: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
</<\n-00103970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00103980: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype\">SOAP-EN\n-00103990: 563a 4661 756c 743c 2f73 7061 6e3e 2667 V:Fault&g\n-001039a0: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
.
<\n-001039b0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001039c0: 203c 2f64 6976 3e3c 703e 5365 7276 6963

Servic\n-001039d0: 6520 6f70 6572 6174 696f 6e73 2069 6d70 e operations imp\n-001039e0: 6c65 6d65 6e74 6174 696f 6e20 696e 2061 lementation in a\n-001039f0: 2057 6562 2073 6572 7669 6365 2061 7070 Web service app\n-00103a00: 6c69 6361 7469 6f6e 2063 616e 2072 6574 lication can ret\n-00103a10: 7572 6e20 7661 7269 6f75 7320 534f 4150 urn various SOAP\n-00103a20: 2046 6175 6c74 7320 6375 7374 6f6d 697a Faults customiz\n-00103a30: 6564 2069 6e20 7468 6973 2077 6179 2e3c ed in this way.<\n-00103a40: 2f70 3e0a 3c70 3e53 4f41 5020 4661 756c /p>.

SOAP Faul\n-00103a50: 7420 7374 7275 6374 7572 6573 2061 7265 t structures are\n-00103a60: 2064 6563 6c61 7265 6420 3c63 6f64 653e declared \n-00103a70: 6d75 7461 626c 653c 2f63 6f64 653e 2c20 mutable, \n-00103a80: 7768 6963 6820 6d65 616e 7320 7468 6174 which means that\n-00103a90: 2072 652d 6465 636c 6172 6174 696f 6e73 re-declarations\n-00103aa0: 206f 6620 7468 6520 7374 7275 6374 7572 of the structur\n-00103ab0: 6573 2061 7265 2070 6572 6d69 7474 6564 es are permitted\n-00103ac0: 2061 6e64 2061 6464 6974 696f 6e61 6c20 and additional \n-00103ad0: 6d65 6d62 6572 7320 6172 6520 636f 6c6c members are coll\n-00103ae0: 6563 7465 6420 696e 746f 206f 6e65 2066 ected into one f\n-00103af0: 696e 616c 2073 7472 7563 7475 7265 2062 inal structure b\n-00103b00: 7920 7468 6520 736f 6170 6370 7032 2074 y the soapcpp2 t\n-00103b10: 6f6f 6c2e 3c2f 703e 0a3c 703e 466f 7220 ool.

.

For \n-00103b20: 616e 2065 7861 6d70 6c65 2074 6861 7420 an example that \n-00103b30: 7573 6564 2074 6865 2053 4f41 5020 4661 used the SOAP Fa\n-00103b40: 756c 7420 6465 7461 696c 2073 7472 7563 ult detail struc\n-00103b50: 7475 7265 3a3c 2f70 3e0a 3c64 6976 2063 ture:

.
\n-00103b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-00103ba0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>SOAP_ENV__De\n-00103bf0: 7461 696c 3c2f 613e 203c 2f64 6976 3e0a tail
.\n-00103c00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
\n-00103c30: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00103c70: 723c 2f73 7061 6e3e 202a 665f 5f69 6e76 r *f__inv\n-00103c80: 616c 6964 3b3c 2f64 6976 3e0a 3c64 6976 alid;
. \n-00103ca0: 2020 3c73 7061 6e20 636c 6173 733d 226b const c\n-00103ce0: 6861 723c 2f73 7061 6e3e 202a 665f 5f75 har *f__u\n-00103cf0: 6e61 7661 696c 6162 6c65 3b3c 2f64 6976 navailable;..<\n-00103db0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00103dc0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > v\n-00103de0: 6f69 643c 2f73 7061 6e3e 202a 3c61 2063 oid *faul\n-00103e50: 743c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 t;
. \n-00103e70: 2020 203c 6120 636c 6173 733d 2263 6f64 _XML <\n-00103ed0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00103ee0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n-00103ef0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-00103f00: 6465 7461 696c 2e68 746d 6c23 6132 3631 detail.html#a261\n-00103f10: 6534 3239 3231 3637 3361 3238 6264 3038 e42921673a28bd08\n-00103f20: 3561 3437 6434 6564 3635 6365 3622 3e5f 5a47d4ed65ce6\">_\n-00103f30: 5f61 6e79 3c2f 613e 3b3c 2f64 6976 3e0a _any;
.\n-00103f40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.//gsoap ns s\n-00103f90: 6572 7669 6365 206d 6574 686f 642d 6661 ervice method-fa\n-00103fa0: 756c 743a 206c 6f67 696e 2066 5f5f 696e ult: login f__in\n-00103fb0: 7661 6c69 6420 3c2f 7370 616e 3e3c 2f64 valid .
//gs\n-00103ff0: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n-00104000: 6574 686f 642d 6661 756c 743a 206c 6f67 ethod-fault: log\n-00104010: 696e 2066 5f5f 756e 6176 6169 6c61 626c in f__unavailabl\n-00104020: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
.\n-00104030: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
int<\n-00104060: 2f73 7061 6e3e 206e 735f 5f6c 6f67 696e /span> ns__login\n-00104070: 282e 2e2e 293b 3c2f 6469 763e 0a3c 2f64 (...);
.

See also \n-001040a0: 4150 4920 646f 6375 6d65 6e74 6174 696f API documentatio\n-001040b0: 6e20 4d6f 6475 6c65 203c 6120 636c 6173 n Module Fault str\n-001040f0: 7563 7475 7265 2061 6e64 2066 756e 6374 ucture and funct\n-00104100: 696f 6e73 3c2f 613e 2e3c 2f70 3e0a 3c70 ions.

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

.MIME at\n-00104170: 7461 6368 6d65 6e74 733c 2f68 313e 0a3c tachments

.<\n-00104180: 703e 5468 6520 6753 4f41 5020 746f 6f6c p>The gSOAP tool\n-00104190: 6b69 7420 7375 7070 6f72 7473 204d 494d kit supports MIM\n-001041a0: 4520 6174 7461 6368 6d65 6e74 7320 6173 E attachments as\n-001041b0: 2070 6572 2053 4f41 5020 7769 7468 2041 per SOAP with A\n-001041c0: 7474 6163 686d 656e 7473 2028 5377 4129 ttachments (SwA)\n-001041d0: 2073 7065 6369 6669 6361 7469 6f6e 203c specification <\n-001041e0: 6120 6872 6566 3d22 6874 7470 3a2f 2f77 a href=\"http://w\n-001041f0: 7777 2e77 332e 6f72 672f 5452 2f53 4f41 ww.w3.org/TR/SOA\n-00104200: 502d 6174 7461 6368 6d65 6e74 7322 3e68 P-attachments\">h\n-00104210: 7474 703a 2f2f 7777 772e 7733 2e6f 7267 ttp://www.w3.org\n-00104220: 2f54 522f 534f 4150 2d61 7474 6163 686d /TR/SOAP-attachm\n-00104230: 656e 7473 3c2f 613e 2e3c 2f70 3e0a 3c70 ents.

.MTOM attachment\n-00104250: 7320 7468 6174 2061 7265 2065 7373 656e s that are essen\n-00104260: 7469 616c 6c79 204d 494d 4520 6174 7461 tially MIME atta\n-00104270: 6368 6d65 6e74 7320 7468 6174 2063 6f6e chments that con\n-00104280: 666f 726d 2074 6f20 7468 6520 4d54 4f4d form to the MTOM\n-00104290: 2073 7065 6369 6669 6361 7469 6f6e 203c specification <\n-001042a0: 6120 6872 6566 3d22 6874 7470 3a2f 2f77 a href=\"http://w\n-001042b0: 7777 2e77 332e 6f72 672f 5452 2f73 6f61 ww.w3.org/TR/soa\n-001042c0: 7031 322d 6d74 6f6d 223e 6874 7470 3a2f p12-mtom\">http:/\n-001042d0: 2f77 7777 2e77 332e 6f72 672f 5452 2f73 /www.w3.org/TR/s\n-001042e0: 6f61 7031 322d 6d74 6f6d 3c2f 613e 2061 oap12-mtom a\n-001042f0: 7265 2061 6c73 6f20 7375 7070 6f72 7465 re also supporte\n-00104300: 6420 7768 6963 6820 6172 6520 7468 6520 d which are the \n-00104310: 7072 6566 6572 7265 6420 7761 7920 746f preferred way to\n-00104320: 2069 6e63 6c75 6465 204d 494d 4520 6174 include MIME at\n-00104330: 7461 6368 6d65 6e74 7320 7769 7468 2053 tachments with S\n-00104340: 4f41 5020 6d65 7373 6167 6573 2c20 7365 OAP messages, se\n-00104350: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section M\n-00104380: 544f 4d20 6174 7461 6368 6d65 6e74 733c TOM attachments<\n-00104390: 2f61 3e2e 3c2f 703e 0a3c 703e 496e 2074 /a>.

.

In t\n-001043a0: 6865 2066 6f6c 6c6f 7769 6e67 2064 6973 he following dis\n-001043b0: 6375 7373 696f 6e2c 204d 494d 4520 6174 cussion, MIME at\n-001043c0: 7461 6368 6d65 6e74 2064 6174 6120 6973 tachment data is\n-001043d0: 2061 7373 756d 6564 2074 6f20 6265 2072 assumed to be r\n-001043e0: 6573 6964 656e 7420 696e 206d 656d 6f72 esident in memor\n-001043f0: 7920 666f 7220 7365 6e64 696e 6720 6f70 y for sending op\n-00104400: 6572 6174 696f 6e73 2061 6e64 204d 494d erations and MIM\n-00104410: 4520 6174 7461 6368 6d65 6e74 7320 7265 E attachments re\n-00104420: 6365 6976 6564 2077 696c 6c20 6265 2073 ceived will be s\n-00104430: 746f 7265 6420 696e 206d 656d 6f72 7920 tored in memory \n-00104440: 6d61 6e61 6765 6420 6279 2074 6865 2063 managed by the c\n-00104450: 6f6e 7465 7874 2e20 4d54 4f4d 2061 6e64 ontext. MTOM and\n-00104460: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-00104470: 7320 6f6e 2074 6865 206f 7468 6572 2068 s on the other h\n-00104480: 616e 6420 6361 6e20 6265 2073 7472 6561 and can be strea\n-00104490: 6d65 6420 616e 6420 7468 6572 6566 6f72 med and therefor\n-001044a0: 6520 4d54 4f4d 2f44 494d 4520 6174 7461 e MTOM/DIME atta\n-001044b0: 6368 6d65 6e74 2064 6174 6120 646f 6573 chment data does\n-001044c0: 206e 6f74 206e 6565 6420 746f 2062 6520 not need to be \n-001044d0: 7374 6f72 6564 2069 6e20 6d65 6d6f 7279 stored in memory\n-001044e0: 2c20 7365 6520 5365 6374 696f 6e73 203c , see Sections <\n-001044f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00104500: 663d 2269 6e64 6578 2e68 746d 6c23 4449 f=\"index.html#DI\n-00104510: 4d45 223e 4449 4d45 2061 7474 6163 686d ME\">DIME attachm\n-00104520: 656e 7473 3c2f 613e 2061 6e64 203c 6120 ents and MTOM attachmen\n-00104560: 7473 3c2f 613e 202e 3c2f 703e 0a3c 703e ts .

.

\n-00104570: 5472 616e 736d 6974 7469 6e67 206d 756c Transmitting mul\n-00104580: 7469 7061 7274 2f72 656c 6174 6564 204d tipart/related M\n-00104590: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n-001045a0: 7769 7468 2061 2053 4f41 502f 584d 4c20 with a SOAP/XML \n-001045b0: 6d65 7373 6167 6520 6973 2061 6363 6f6d message is accom\n-001045c0: 706c 6973 6865 6420 7769 7468 2074 776f plished with two\n-001045d0: 2066 756e 6374 696f 6e73 2c20 3c63 6f64 functions, soap_set_mime\n-00104660: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n-00104670: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n-00104700: 705f 7365 745f 6d69 6d65 5f61 7474 6163 p_set_mime_attac\n-00104710: 686d 656e 743c 2f61 3e3c 2f63 6f64 653e hment\n-00104720: 2e20 5468 6520 6669 7273 7420 6675 6e63 . The first func\n-00104730: 7469 6f6e 2069 7320 666f 7220 696e 6974 tion is for init\n-00104740: 6961 6c69 7a61 7469 6f6e 2070 7572 706f ialization purpo\n-00104750: 7365 7320 616e 6420 7468 6520 6c61 7474 ses and the latt\n-00104760: 6572 2066 756e 6374 696f 6e20 6973 2075 er function is u\n-00104770: 7365 6420 746f 2073 7065 6369 6679 206d sed to specify m\n-00104780: 6574 6120 6461 7461 2061 6e64 2063 6f6e eta data and con\n-00104790: 7465 6e74 2064 6174 6120 666f 7220 6561 tent data for ea\n-001047a0: 6368 2061 7474 6163 686d 656e 742e 3c2f ch attachment..

See also A\n-001047c0: 5049 2064 6f63 756d 656e 7461 7469 6f6e PI documentation\n-001047d0: 204d 6f64 756c 6520 3c61 2063 6c61 7373 Module MIME attach\n-00104810: 6d65 6e74 2066 756e 6374 696f 6e73 3c2f ment functions.

.

.... \n-00104830: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n-00104840: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n-00104850: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

..Sending\n-00104890: 2061 2063 6f6c 6c65 6374 696f 6e20 6f66 a collection of\n-001048a0: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n-001048b0: 7320 2853 7741 293c 2f68 323e 0a3c 703e s (SwA)

.

\n-001048c0: 5468 6520 666f 6c6c 6f77 696e 6720 6675 The following fu\n-001048d0: 6e63 7469 6f6e 7320 6172 6520 7573 6564 nctions are used\n-001048e0: 2074 6f20 7365 7420 7570 2061 2063 6f6c to set up a col\n-001048f0: 6c65 6374 696f 6e20 6f66 206d 756c 7469 lection of multi\n-00104900: 7061 7274 2f72 656c 6174 6564 204d 494d part/related MIM\n-00104910: 4520 6174 7461 6368 6d65 6e74 7320 666f E attachments fo\n-00104920: 7220 7472 616e 736d 6973 7369 6f6e 2077 r transmission w\n-00104930: 6974 6820 6120 534f 4150 206f 7220 584d ith a SOAP or XM\n-00104940: 4c20 6d65 7373 6167 652e 3c2f 703e 0a3c L message.

.<\n-00104950: 756c 3e0a 3c6c 693e 3c63 6f64 653e 766f ul>.
  • vo\n-00104960: 6964 203c 6120 636c 6173 733d 2265 6c22 id soap_set_mim\n-001049e0: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n-001049f0: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n-00104a00: 2a62 6f75 6e64 6172 792c 2063 6f6e 7374 *boundary, const\n-00104a10: 2063 6861 7220 2a73 7461 7274 293c 2f61 char *start) This fu\n-00104a30: 6e63 7469 6f6e 2065 6e61 626c 6573 2073 nction enables s\n-00104a40: 656e 6469 6e67 204d 494d 4520 6174 7461 ending MIME atta\n-00104a50: 6368 6d65 6e74 732e 2054 6869 7320 6675 chments. This fu\n-00104a60: 6e63 7469 6f6e 2069 7320 6765 6e65 7261 nction is genera\n-00104a70: 6c6c 7920 6e6f 7420 7265 7175 6972 6564 lly not required\n-00104a80: 2077 6865 6e20 7468 6520 636f 6e74 6578 when the contex\n-00104a90: 7420 6973 2069 6e69 7469 616c 697a 6564 t is initialized\n-00104aa0: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA\n-00104ab0: 505f 454e 435f 4d49 4d45 3c2f 636f 6465 P_ENC_MIME, because MIME \n-00104ad0: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are \n-00104ae0: 6175 746f 6d61 7469 6361 6c6c 7920 6465 automatically de\n-00104af0: 7465 6374 6564 2061 7320 3c63 6f64 653e tected as \n-00104b00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xs\n-00104b70: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary<\n-00104b80: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n-00104b90: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>_xop_\n-00104c00: 5f49 6e63 6c75 6465 3c2f 613e 3c2f 636f _Include structures i\n-00104c20: 6e20 7468 6520 6461 7461 2074 6f20 7365 n the data to se\n-00104c30: 7269 616c 697a 6520 6173 2061 6e20 584d rialize as an XM\n-00104c40: 4c20 6d65 7373 6167 6520 7769 7468 2074 L message with t\n-00104c50: 6865 2061 7474 6163 686d 656e 7473 2061 he attachments a\n-00104c60: 7574 6f6d 6174 6963 616c 6c79 2061 6464 utomatically add\n-00104c70: 6564 206f 7220 4d49 4d45 2061 7474 6163 ed or MIME attac\n-00104c80: 686d 656e 7473 2063 616e 2062 6520 6578 hments can be ex\n-00104c90: 706c 6963 6974 6c79 2061 6464 6564 2077 plicitly added w\n-00104ca0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_set_mime_a\n-00104d40: 7474 6163 686d 656e 743c 2f61 3e3c 2f63 ttachment. Parameter \n-00104d60: 3c63 6f64 653e 626f 756e 6461 7279 3c2f boundary specifies \n-00104d80: 6120 4d49 4d45 2062 6f75 6e64 6172 7920 a MIME boundary \n-00104d90: 7374 7269 6e67 206f 7220 4e55 4c4c 2074 string or NULL t\n-00104da0: 6f20 6861 7665 2074 6865 2065 6e67 696e o have the engin\n-00104db0: 6520 6765 6e65 7261 7465 2061 204d 494d e generate a MIM\n-00104dc0: 4520 626f 756e 6461 7279 2073 7472 696e E boundary strin\n-00104dd0: 672e 2050 6172 616d 6574 6572 203c 636f g. Parameter start \n-00104df0: 7370 6563 6966 6965 7320 7468 6520 7374 specifies the st\n-00104e00: 6172 7420 636f 6e74 656e 7420 4944 2066 art content ID f\n-00104e10: 6f72 2074 6865 2066 6972 7374 204d 494d or the first MIM\n-00104e20: 4520 626f 6479 2063 6f6e 7461 696e 696e E body containin\n-00104e30: 6720 7468 6520 534f 4150 206f 7220 584d g the SOAP or XM\n-00104e40: 4c20 6d65 7373 6167 652e 2057 6865 6e20 L message. When \n-00104e50: 4e55 4c4c 2c20 7468 6520 7374 6172 7420 NULL, the start \n-00104e60: 4944 206f 6620 7468 6520 534f 4150 206d ID of the SOAP m\n-00104e70: 6573 7361 6765 2069 7320 3c65 6d3e 3c63 essage is <SOAP-ENV\n-00104e90: 3a45 6e76 656c 6f70 6526 6774 3b3c 2f63 :Envelope>.
  • .\n-00104eb0: 3c6c 693e 3c63 6f64 653e 696e 7420 736f
  • int so\n-00104ec0: 6170 5f73 6574 5f6d 696d 655f 6174 7461 ap_set_mime_atta\n-00104ed0: 6368 6d65 6e74 2873 7472 7563 7420 736f chment(struct so\n-00104ee0: 6170 202a 736f 6170 2c20 6368 6172 202a ap *soap, char *\n-00104ef0: 7074 722c 2073 697a 655f 7420 7369 7a65 ptr, size_t size\n-00104f00: 2c20 656e 756d 2073 6f61 705f 6d69 6d65 , enum soap_mime\n-00104f10: 5f65 6e63 6f64 696e 6720 656e 636f 6469 _encoding encodi\n-00104f20: 6e67 2c20 636f 6e73 7420 6368 6172 202a ng, const char *\n-00104f30: 7479 7065 2c20 636f 6e73 7420 6368 6172 type, const char\n-00104f40: 202a 6964 2c20 636f 6e73 7420 6368 6172 *id, const char\n-00104f50: 202a 6c6f 6361 7469 6f6e 2c20 636f 6e73 *location, cons\n-00104f60: 7420 6368 6172 202a 6465 7363 7269 7074 t char *descript\n-00104f70: 696f 6e29 3c2f 636f 6465 3e20 5468 6973 ion) This\n-00104f80: 2066 756e 6374 696f 6e20 6164 6473 2061 function adds a\n-00104f90: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n-00104fa0: 2074 6f20 6120 534f 4150 2f58 4d4c 206d to a SOAP/XML m\n-00104fb0: 6573 7361 6765 2074 6f20 7365 6e64 2e20 essage to send. \n-00104fc0: 5468 6520 7370 6563 6966 6965 6420 3c63 The specified ptr p\n-00104fe0: 6f69 6e74 7320 746f 2074 6865 2064 6174 oints to the dat\n-00104ff0: 6120 746f 2073 656e 6420 6f66 206c 656e a to send of len\n-00105000: 6774 6820 7370 6563 6966 6965 6420 6279 gth specified by\n-00105010: 203c 636f 6465 3e73 697a 653c 2f63 6f64 size. The en\n-00105030: 636f 6469 6e67 3c2f 636f 6465 3e20 7061 coding pa\n-00105040: 7261 6d65 7465 7220 6973 2061 203c 636f rameter is a soap_mime_en\n-001050e0: 636f 6469 6e67 3c2f 613e 3c2f 636f 6465 coding value that is \n-00105100: 7265 636f 6d6d 656e 6465 6420 746f 2062 recommended to b\n-00105110: 6520 7370 6563 6966 6965 6420 6173 203c e specified as <\n-00105120: 636f 6465 3e23 534f 4150 5f4d 494d 455f code>#SOAP_MIME_\n-00105130: 4e4f 4e45 3c2f 636f 6465 3e20 746f 2073 NONE to s\n-00105140: 7065 6369 6679 2074 6861 7420 7468 6520 pecify that the \n-00105150: 4d49 4d45 2064 6174 6120 636f 6e74 656e MIME data conten\n-00105160: 7420 6973 206e 6f74 2065 6e63 6f64 6564 t is not encoded\n-00105170: 2069 6e20 616e 7920 7761 7920 2874 6865 in any way (the\n-00105180: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n-00105190: 2066 756e 6374 696f 6e20 7369 6d70 6c79 function simply\n-001051a0: 2063 6f70 6965 7320 7468 6520 7261 7720 copies the raw \n-001051b0: 6461 7461 2074 6f20 7468 6520 4d49 4d45 data to the MIME\n-001051c0: 2062 6c6f 636b 2077 6974 686f 7574 2065 block without e\n-001051d0: 6e63 6f64 696e 6729 2e20 5468 6520 3c63 ncoding). The type \n-001051f0: 7061 7261 6d65 7465 7220 6973 2072 6571 parameter is req\n-00105200: 7569 7265 6420 616e 6420 696e 6469 6361 uired and indica\n-00105210: 7465 7320 7468 6520 4d49 4d45 2074 7970 tes the MIME typ\n-00105220: 6520 6f66 2074 6865 2064 6174 612c 2073 e of the data, s\n-00105230: 7563 6820 6173 2022 696d 6167 652f 6a70 uch as \"image/jp\n-00105240: 6722 2e20 5468 6520 3c63 6f64 653e 6964 g\". The id\n-00105250: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n-00105260: 7220 756e 6971 7565 6c79 2069 6465 6e74 r uniquely ident\n-00105270: 6966 6965 7320 7468 6520 6174 7461 6368 ifies the attach\n-00105280: 6d65 6e74 2069 6e20 7468 6520 6d65 7373 ment in the mess\n-00105290: 6167 652c 2077 6869 6368 2063 616e 2062 age, which can b\n-001052a0: 6520 6f6d 6974 7465 6420 6279 2073 7065 e omitted by spe\n-001052b0: 6369 6679 696e 6720 4e55 4c4c 2e20 5468 cifying NULL. Th\n-001052c0: 6520 3c63 6f64 653e 6c6f 6361 7469 6f6e e location\n-001052d0: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n-001052e0: 7220 7370 6563 6966 6965 7320 6120 6c6f r specifies a lo\n-001052f0: 6361 7469 6f6e 2073 7472 696e 6720 6f72 cation string or\n-00105300: 204e 554c 4c2e 2054 6865 203c 636f 6465 NULL. The description parameter is\n-00105330: 2061 2073 7472 696e 6720 7468 6174 2064 a string that d\n-00105340: 6573 6372 6962 6573 2074 6865 2064 6174 escribes the dat\n-00105350: 6120 6f72 204e 554c 4c2e 2052 6574 7572 a or NULL. Retur\n-00105360: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n-00105370: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n-00105440: 3c2f 613e 3c2f 636f 6465 3e20 6572 726f erro\n-00105450: 7220 636f 6465 2e3c 2f6c 693e 0a3c 6c69 r code.
  • .void so\n-001054e0: 6170 5f63 6c72 5f6d 696d 6528 7374 7275 ap_clr_mime(stru\n-001054f0: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap) This f\n-00105510: 756e 6374 696f 6e20 6469 7361 626c 6573 unction disables\n-00105520: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n-00105530: 7320 7375 6368 2061 7320 6166 7465 7220 s such as after \n-00105540: 7365 6e64 696e 6720 6120 6d75 6c74 6970 sending a multip\n-00105550: 6172 742d 7265 6c61 7465 6420 6d65 7373 art-related mess\n-00105560: 6167 6520 7769 7468 2061 7474 6163 686d age with attachm\n-00105570: 656e 7473 2074 6f20 7377 6974 6368 2062 ents to switch b\n-00105580: 6163 6b20 746f 206e 6f6e 2d6d 756c 7469 ack to non-multi\n-00105590: 7061 7274 2d72 656c 6174 6564 206d 6573 part-related mes\n-001055a0: 7361 6769 6e67 2c20 756e 6c65 7373 2074 saging, unless t\n-001055b0: 6865 2064 6174 6120 746f 2073 6572 6961 he data to seria\n-001055c0: 6c69 7a65 2061 7320 6120 6d65 7373 6167 lize as a messag\n-001055d0: 6520 636f 6e74 6169 6e73 2061 7474 6163 e contains attac\n-001055e0: 686d 656e 7473 2073 7563 6820 6173 203c hments such as <\n-001055f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>xsd__base64Bi\n-00105670: 6e61 7279 3c2f 613e 3c2f 636f 6465 3e20 nary \n-00105680: 666f 7220 4d49 4d45 2061 7474 6163 686d for MIME attachm\n-00105690: 656e 7473 2061 6e64 203c 636f 6465 3e3c ents and <\n-001056a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001056b0: 663d 2273 7472 7563 745f 5f78 6f70 5f5f f=\"struct__xop__\n-001056c0: 5f5f 5f69 6e63 6c75 6465 2e68 746d 6c22 ___include.html\"\n-001056d0: 2074 6974 6c65 3d22 584f 5020 696e 636c title=\"XOP incl\n-001056e0: 7564 6520 7374 7275 6374 7572 6520 7769 ude structure wi\n-001056f0: 7468 2061 7474 6163 686d 656e 7420 6461 th attachment da\n-00105700: 7461 2e22 3e5f 786f 705f 5f49 6e63 6c75 ta.\">_xop__Inclu\n-00105710: 6465 3c2f 613e 3c2f 636f 6465 3e20 666f de fo\n-00105720: 7220 4d54 4f4d 2061 7474 6163 686d 656e r MTOM attachmen\n-00105730: 7473 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c ts...<\n-00105740: 703e 5768 656e 2070 726f 7669 6469 6e67 p>When providing\n-00105750: 2061 204d 494d 4520 626f 756e 6461 7279 a MIME boundary\n-00105760: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soa\n-001057e0: 705f 7365 745f 6d69 6d65 3c2f 613e 3c2f p_set_mime, you have \n-00105800: 746f 206d 616b 6520 7375 7265 2074 6865 to make sure the\n-00105810: 2062 6f75 6e64 6172 7920 6361 6e6e 6f74 boundary cannot\n-00105820: 206d 6174 6368 2061 6e79 2070 6172 7473 match any parts\n-00105830: 206f 6620 7468 6520 6d65 7373 6167 6520 of the message \n-00105840: 616e 6420 6174 7461 6368 6d65 6e74 7320 and attachments \n-00105850: 7468 6174 2079 6f75 2061 7265 2073 656e that you are sen\n-00105860: 6469 6e67 2c20 6265 6361 7573 6520 7468 ding, because th\n-00105870: 6520 626f 756e 6461 7279 2064 656c 696e e boundary delin\n-00105880: 6561 7465 7320 7468 6520 6174 7461 6368 eates the attach\n-00105890: 6d65 6e74 732e 3c2f 703e 0a3c 703e 5468 ments.

    .

    Th\n-001058a0: 6520 696e 7465 726e 616c 206c 6973 7420 e internal list \n-001058b0: 6f66 2061 7474 6163 686d 656e 7473 2073 of attachments s\n-001058c0: 7065 6369 6669 6564 2077 6974 6820 3c63 pecified with soap_\n-00105960: 7365 745f 6d69 6d65 5f61 7474 6163 686d set_mime_attachm\n-00105970: 656e 743c 2f61 3e3c 2f63 6f64 653e 2069 ent i\n-00105980: 7320 6465 7374 726f 7965 6420 7769 7468 s destroyed with\n-00105990: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n-00105a60: 656e 643c 2f61 3e3c 2f63 6f64 653e 206f end o\n-00105a70: 7220 7768 656e 2061 206d 6573 7361 6765 r when a message\n-00105a80: 2069 7320 7265 6365 6976 6564 2e20 5468 is received. Th\n-00105a90: 6572 6566 6f72 652c 2063 616c 6c20 3c63 erefore, call soap_\n-00105b30: 7365 745f 6d69 6d65 5f61 7474 6163 686d set_mime_attachm\n-00105b40: 656e 743c 2f61 3e3c 2f63 6f64 653e 2074 ent t\n-00105b50: 6f20 7365 7420 6174 7461 6368 6d65 6e74 o set attachment\n-00105b60: 7320 6265 666f 7265 2073 656e 6469 6e67 s before sending\n-00105b70: 2061 206d 6573 7361 6765 2e3c 2f70 3e0a a message.

    .\n-00105b80: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n-00105b90: 2065 7861 6d70 6c65 2073 686f 7773 2068 example shows h\n-00105ba0: 6f77 2061 206d 756c 7469 7061 7274 2f72 ow a multipart/r\n-00105bb0: 656c 6174 6564 2048 5454 5020 6d65 7373 elated HTTP mess\n-00105bc0: 6167 6520 7769 7468 2074 6872 6565 204d age with three M\n-00105bd0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n-00105be0: 6973 2073 6574 2075 7020 616e 6420 7472 is set up and tr\n-00105bf0: 616e 736d 6974 7465 6420 746f 2061 2073 ansmitted to a s\n-00105c00: 6572 7665 722e 2049 6e20 7468 6973 2065 erver. In this e\n-00105c10: 7861 6d70 6c65 2077 6520 6c65 7420 7468 xample we let th\n-00105c20: 6520 6d65 7373 6167 6520 626f 6479 2072 e message body r\n-00105c30: 6566 6572 2074 6f20 7468 6520 6174 7461 efer to the atta\n-00105c40: 6368 6d65 6e74 7320 7573 696e 6720 584d chments using XM\n-00105c50: 4c20 3c65 6d3e 3c63 6f64 653e 6872 6566 L href\n-00105c60: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 7474 att\n-00105c70: 7269 6275 7465 732e 2054 6865 203c 636f ributes. The struct claim_\n-00105c90: 5f66 6f72 6d3c 2f63 6f64 653e 2064 6174 _form dat\n-00105ca0: 6120 7479 7065 2069 6e63 6c75 6465 7320 a type includes \n-00105cb0: 6120 6465 6669 6e69 7469 6f6e 206f 6620 a definition of \n-00105cc0: 6120 3c63 6f64 653e 6872 6566 3c2f 636f a href attribute fo\n-00105ce0: 7220 7468 6973 2070 7572 706f 7365 2e3c r this purpose.<\n-00105cf0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct \n-00105d40: 636c 6169 6d5f 5f66 6f72 6d20 666f 726d claim__form form\n-00105d50: 312c 2066 6f72 6d32 3b20 3c2f 6469 763e 1, form2;
    \n-00105d60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    form1.href = \n-00105d80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00105da0: 743b 6369 643a 636c 6169 6d30 3631 3430 t;cid:claim06140\n-00105db0: 3061 2e74 6966 6640 636c 6169 6d69 6e67 0a.tiff@claiming\n-00105dc0: 2d69 742e 636f 6d26 7175 6f74 3b3c 2f73 -it.com";
    .f\n-00105df0: 6f72 6d32 2e68 7265 6620 3d20 3c73 7061 orm2.href = "ci\n-00105e20: 643a 636c 6169 6d30 3631 3430 3061 2e6a d:claim061400a.j\n-00105e30: 7065 6740 636c 6169 6d69 6e67 2d69 742e peg@claiming-it.\n-00105e40: 636f 6d26 7175 6f74 3b3c 2f73 7061 6e3e com"\n-00105e50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    /* initialize a\n-00105e90: 6e64 2065 6e61 626c 6520 4d49 4d45 202a nd enable MIME *\n-00105ea0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00105eb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_set_mim\n-00105f20: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n-00105f50: 703c 2f61 3e2c 204e 554c 4c2c 203c 7370 p, NULL, "&\n-00105f80: 6c74 3b63 6c61 696d 3036 3134 3030 612e lt;claim061400a.\n-00105f90: 786d 6c40 636c 6169 6d69 6e67 2d69 742e xml@claiming-it.\n-00105fa0: 636f 6d26 6774 3b26 7175 6f74 3b3c 2f73 com>");
    .\n-00105fd0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* add a b\n-00105ff0: 6173 6536 3420 656e 636f 6465 6420 7469 ase64 encoded ti\n-00106000: 6666 2069 6d61 6765 2028 7469 6666 496d ff image (tiffIm\n-00106010: 6167 6520 706f 696e 7473 2074 6f20 6261 age points to ba\n-00106020: 7365 3634 2064 6174 6129 202a 2f3c 2f73 se64 data) */
    .\n-001060a0: 736f 6170 5f73 6574 5f6d 696d 655f 6174 soap_set_mime_at\n-001060b0: 7461 6368 6d65 6e74 3c2f 613e 283c 6120 tachment(soap, ti\n-001060f0: 6666 496d 6167 652c 2074 6966 664c 656e ffImage, tiffLen\n-00106100: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_MIME_\n-00106180: 4241 5345 3634 3c2f 613e 2c20 3c73 7061 BASE64, "im\n-001061b0: 6167 652f 7469 6666 2671 756f 743b 3c2f age/tiff", "<cla\n-001061f0: 696d 3036 3134 3030 612e 7469 6666 4063 im061400a.tiff@c\n-00106200: 6c61 696d 696e 672d 6974 2e63 6f6d 2667 laiming-it.com&g\n-00106210: 743b 2671 756f 743b 3c2f 7370 616e 3e2c t;",\n-00106220: 204e 554c 4c2c 204e 554c 4c29 3b20 3c2f NULL, NULL); .
    /* \n-00106260: 6164 6420 6120 7261 7720 6269 6e61 7279 add a raw binary\n-00106270: 206a 7065 6720 696d 6167 6520 286a 7065 jpeg image (jpe\n-00106280: 6749 6d61 6765 2070 6f69 6e74 7320 746f gImage points to\n-00106290: 2072 6177 2064 6174 6129 202a 2f3c 2f73 raw data) */
    .\n-00106310: 736f 6170 5f73 6574 5f6d 696d 655f 6174 soap_set_mime_at\n-00106320: 7461 6368 6d65 6e74 3c2f 613e 283c 6120 tachment(soap, jp\n-00106360: 6567 496d 6167 652c 206a 7065 674c 656e egImage, jpegLen\n-00106370: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_MIME_\n-001063f0: 4249 4e41 5259 3c2f 613e 2c20 3c73 7061 BINARY, "im\n-00106420: 6167 652f 6a70 6567 2671 756f 743b 3c2f age/jpeg", "<cla\n-00106460: 696d 3036 3134 3030 612e 6a70 6567 4063 im061400a.jpeg@c\n-00106470: 6c61 696d 696e 672d 6974 2e63 6f6d 2667 laiming-it.com&g\n-00106480: 743b 2671 756f 743b 3c2f 7370 616e 3e2c t;",\n-00106490: 204e 554c 4c2c 204e 554c 4c29 3b20 3c2f NULL, NULL); .
    /* \n-001064d0: 7365 6e64 2074 6865 2066 6f72 6d73 2061 send the forms a\n-001064e0: 7320 4d49 4d45 2061 7474 6163 686d 656e s MIME attachmen\n-001064f0: 7473 2077 6974 6820 7468 6973 2069 6e76 ts with this inv\n-00106500: 6f63 6174 696f 6e20 2a2f 3c2f 7370 616e ocation */
    .
    if (\n-00106550: 736f 6170 5f63 616c 6c5f 636c 6169 6d5f soap_call_claim_\n-00106560: 5f69 6e73 7572 616e 6365 5f63 6c61 696d _insurance_claim\n-00106570: 5f61 7574 6f28 3c61 2063 6c61 7373 3d22 _auto(soa\n-001065a0: 703c 2f61 3e2c 2066 6f72 6d31 2c20 666f p, form1, fo\n-001065b0: 726d 322c 202e 2e2e 2929 203c 2f64 6976 rm2, ...)) .
    ... \n-001065f0: 2f2f 2061 6e20 6572 726f 7220 6f63 6375 // an error occu\n-00106600: 7272 6564 203c 2f73 7061 6e3e 3c2f 6469 rred .
    e\n-00106640: 6c73 653c 2f73 7061 6e3e 203c 2f64 6976 lse .
    ... \n-00106680: 2f2f 2070 726f 6365 7373 2074 6865 2072 // process the r\n-00106690: 6573 706f 6e73 653c 2f73 7061 6e3e 3c2f esponse.
    soap_cl\n-00106710: 725f 6d69 6d65 3c2f 613e 283c 6120 636c r_mime(soap);.
    \n-00106820: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_set\n-00106840: 5f6d 696d 655f 6174 7461 6368 6d65 6e74 _mime_attachment\n-00106850: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-00106860: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n-00106870: 7074 722c 2073 697a 655f 7420 7369 7a65 ptr, size_t size\n-00106880: 2c20 656e 756d 2073 6f61 705f 6d69 6d65 , enum soap_mime\n-00106890: 5f65 6e63 6f64 696e 6720 656e 636f 6469 _encoding encodi\n-001068a0: 6e67 2c20 636f 6e73 7420 6368 6172 202a ng, const char *\n-001068b0: 7479 7065 2c20 636f 6e73 7420 6368 6172 type, const char\n-001068c0: 202a 6964 2c20 636f 6e73 7420 6368 6172 *id, const char\n-001068d0: 202a 6c6f 6361 7469 6f6e 2c20 636f 6e73 *location, cons\n-001068e0: 7420 6368 6172 202a 6465 7363 7269 7074 t char *descript\n-001068f0: 696f 6e29 3c2f 6469 763e 3c64 6976 2063 ion)
    Add\n-00106910: 2061 204d 494d 4520 6174 7461 6368 6d65 a MIME attachme\n-00106920: 6e74 2074 6f20 7468 6520 534f 4150 2f58 nt to the SOAP/X\n-00106930: 4d4c 206d 6573 7361 6765 2e3c 2f64 6976 ML message.
    .
    soap_clr_mime\n-00106a00: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    vo\n-00106a20: 6964 2073 6f61 705f 636c 725f 6d69 6d65 id soap_clr_mime\n-00106a30: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-00106a40: 6170 293c 2f64 6976 3e3c 6469 7620 636c ap)
    Disa\n-00106a60: 626c 6520 4d49 4d45 2061 7474 6163 686d ble MIME attachm\n-00106a70: 656e 7473 2e3c 2f64 6976 3e3c 2f64 6976 ents.
    .
    soa\n-00106b30: 705f 7365 745f 6d69 6d65 3c2f 613e 3c2f p_set_mime
    int soap\n-00106b60: 5f73 6574 5f6d 696d 6528 7374 7275 6374 _set_mime(struct\n-00106b70: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-00106b80: 7374 2063 6861 7220 2a62 6f75 6e64 6172 st char *boundar\n-00106b90: 792c 2063 6f6e 7374 2063 6861 7220 2a73 y, const char *s\n-00106ba0: 7461 7274 293c 2f64 6976 3e3c 6469 7620 tart)
    En\n-00106bc0: 6162 6c65 204d 494d 4520 6174 7461 6368 able MIME attach\n-00106bd0: 6d65 6e74 732e 3c2f 6469 763e 3c2f 6469 ments.
    .
    \n-00106d00: 4020 534f 4150 5f4d 494d 455f 4241 5345 @ SOAP_MIME_BASE\n-00106d10: 3634 3c2f 6469 763e 3c64 6976 2063 6c61 64
    data \n-00106d30: 6973 2066 6f72 6d61 7474 6564 2069 6e20 is formatted in \n-00106d40: 6261 7365 3634 3c2f 6469 763e 3c64 6976 base64
    <\n-00106d60: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:102\n-00106d80: 3239 3c2f 6469 763e 3c2f 6469 763e 0a3c 29
    .<\n-00106d90: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00106da0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-00106db0: 705f 5f6d 696d 655f 6874 6d6c 5f67 6761 p__mime_html_gga\n-00106dc0: 3366 6563 3736 3333 6461 3037 6266 6632 3fec7633da07bff2\n-00106dd0: 6266 3566 6436 3333 3062 6566 3138 3434 bf5fd6330bef1844\n-00106de0: 6139 3830 6630 3933 3539 3964 6332 3937 a980f093599dc297\n-00106df0: 3637 6663 6463 3064 3930 3732 3364 6461 67fcdc0d90723dda\n-00106e00: 3122 3e3c 6469 7620 636c 6173 733d 2274 1\">The claim\n-00106f60: 5f5f 666f 726d 3c2f 636f 6465 3e20 7374 __form st\n-00106f70: 7275 6374 2069 7320 6465 636c 6172 6564 ruct is declared\n-00106f80: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac\n-00106f90: 6520 6865 6164 6572 2066 696c 6520 6173 e header file as\n-00106fa0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    struct claim__form .
    {
    .<\n-00107020: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00107030: 3e20 2040 203c 7370 616e 2063 6c61 7373 > @ c\n-00107050: 6861 723c 2f73 7061 6e3e 202a 6872 6566 har *href\n-00107060: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    };.

    Th\n-001070a0: 6520 636c 6169 6d20 666f 726d 7320 696e e claim forms in\n-001070b0: 2074 6865 206d 6573 7361 6765 2063 6f6e the message con\n-001070c0: 7369 7374 206f 6620 3c65 6d3e 3c63 6f64 sist of hrefs to the claim\n-001070f0: 2066 6f72 6d73 2061 7474 6163 6865 642e forms attached.\n-00107100: 2054 6865 2075 7365 206f 6620 3c65 6d3e The use of \n-00107110: 3c63 6f64 653e 6872 6566 3c2f 636f 6465 href or other \n-00107130: 6174 7472 6962 7574 6573 2066 6f72 2072 attributes for r\n-00107140: 6566 6572 7269 6e67 2074 6f20 7468 6520 eferring to the \n-00107150: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n-00107160: 2069 7320 6f70 7469 6f6e 616c 2061 6363 is optional acc\n-00107170: 6f72 6469 6e67 2074 6f20 7468 6520 5377 ording to the Sw\n-00107180: 4120 7374 616e 6461 7264 2e20 4d54 4f4d A standard. MTOM\n-00107190: 206f 6e20 7468 6520 6f74 6865 7220 6861 on the other ha\n-001071a0: 6e64 206d 616e 6461 7465 7320 7468 6520 nd mandates the \n-001071b0: 7573 6520 6f66 203c 656d 3e3c 636f 6465 use of href with XOP eleme\n-001071e0: 6e74 732e 3c2f 703e 0a3c 703e 546f 2061 nts.

    .

    To a\n-001071f0: 7373 6f63 6961 7465 204d 494d 4520 6174 ssociate MIME at\n-00107200: 7461 6368 6d65 6e74 7320 7769 7468 2074 tachments with t\n-00107210: 6865 2072 6571 7565 7374 2061 6e64 2072 he request and r\n-00107220: 6573 706f 6e73 6520 6f66 2061 2073 6572 esponse of a ser\n-00107230: 7669 6365 206f 7065 7261 7469 6f6e 2069 vice operation i\n-00107240: 6e20 7468 6520 6765 6e65 7261 7465 6420 n the generated \n-00107250: 5753 444c 2c20 706c 6561 7365 2073 6565 WSDL, please see\n-00107260: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Generating Mul\n-001072a0: 7469 7061 7274 5265 6c61 7465 6420 4d49 tipartRelated MI\n-001072b0: 4d45 2061 7474 6163 686d 656e 7420 6269 ME attachment bi\n-001072c0: 6e64 696e 6773 2069 6e20 5753 444c 3c2f ndings in WSDL .

    .

    The \n-001072e0: 7365 7276 6572 2d73 6964 6520 636f 6465 server-side code\n-001072f0: 2074 6f20 7472 616e 736d 6974 204d 494d to transmit MIM\n-00107300: 4520 6174 7461 6368 6d65 6e74 7320 6261 E attachments ba\n-00107310: 636b 2074 6f20 6120 636c 6965 6e74 3a3c ck to a client:<\n-00107320: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    .
    const \n-00107470: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *htmlDoc =\n-001074a0: 202e 2e2e 3b20 3c73 7061 6e20 636c 6173 ...; // a\n-001074c0: 6e20 4854 4d4c 206d 6573 7361 6765 2074 n HTML message t\n-001074d0: 6f20 7365 6e64 2061 7320 616e 2061 7474 o send as an att\n-001074e0: 6163 686d 656e 743c 2f73 7061 6e3e 3c2f achment.
    soap_\n-00107560: 7365 745f 6d69 6d65 3c2f 613e 283c 6120 set_mime(soap, NU\n-001075a0: 4c4c 2c20 4e55 4c4c 293b 203c 7370 616e LL, NULL); // enable MIME<\n-001075d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001075f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // add a \n-00107610: 4854 4d4c 2064 6f63 756d 656e 7420 2868 HTML document (h\n-00107620: 746d 6c44 6f63 2070 6f69 6e74 7320 746f tmlDoc points to\n-00107630: 2064 6174 612c 2077 6865 7265 2074 6865 data, where the\n-00107640: 2048 544d 4c20 646f 6320 6973 2073 746f HTML doc is sto\n-00107650: 7265 6420 696e 2063 6f6d 706c 6961 6e63 red in complianc\n-00107660: 6520 7769 7468 2037 6269 7420 656e 636f e with 7bit enco\n-00107670: 6469 6e67 2052 4643 3230 3435 2920 3c2f ding RFC2045)
    . \n-001076a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_set_\n-00107720: 6d69 6d65 5f61 7474 6163 686d 656e 743c mime_attachment<\n-00107730: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-00107760: 2f61 3e2c 2068 746d 6c44 6f63 2c20 7374 /a>, htmlDoc, st\n-00107770: 726c 656e 2868 746d 6c44 6f63 292c 203c rlen(htmlDoc), <\n-00107780: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00107790: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001077a0: 705f 5f6d 696d 652e 6874 6d6c 2367 6761 p__mime.html#gga\n-001077b0: 3366 6563 3736 3333 6461 3037 6266 6632 3fec7633da07bff2\n-001077c0: 6266 3566 6436 3333 3062 6566 3138 3434 bf5fd6330bef1844\n-001077d0: 6166 3236 3130 3866 6630 6365 6537 3037 af26108ff0cee707\n-001077e0: 3939 3339 6137 3964 6632 3766 3039 6530 9939a79df27f09e0\n-001077f0: 3422 3e53 4f41 505f 4d49 4d45 5f37 4249 4\">SOAP_MIME_7BI\n-00107800: 543c 2f61 3e2c 203c 7370 616e 2063 6c61 T, "text/ht\n-00107830: 6d6c 2671 756f 743b 3c2f 7370 616e 3e2c ml",\n-00107840: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00107860: 6f74 3b26 6c74 3b63 6c61 696d 3036 3134 ot;<claim0614\n-00107870: 3030 612e 6874 6d6c 4063 6c61 696d 696e 00a.html@claimin\n-00107880: 672d 6974 2e63 6f6d 2667 743b 2671 756f g-it.com>&quo\n-00107890: 743b 3c2f 7370 616e 3e2c 204e 554c 4c2c t;, NULL,\n-001078a0: 204e 554c 4c29 2920 3c2f 6469 763e 0a3c NULL))
    .<\n-001078b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001078c0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n-001078e0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_clr_mime\n-00107940: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-00107970: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n-00107990: 646f 6e26 2333 393b 7420 7761 6e74 2066 don't want f\n-001079a0: 6175 6c74 2077 6974 6820 6174 7461 6368 ault with attach\n-001079b0: 6d65 6e74 7320 3c2f 7370 616e 3e3c 2f64 ments .\n-00107a90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-00107ac0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-00107ae0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-00107b40: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK; .
    }
    .\n-00107be0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    SOAP_\n-00107c60: 4d49 4d45 5f37 4249 543c 2f61 3e3c 2f64 MIME_7BIT
    @ SOAP_MI\n-00107c90: 4d45 5f37 4249 543c 2f64 6976 3e3c 6469 ME_7BIT
    \n-00107cb0: 3720 6269 7420 6461 7461 2063 6f6e 7465 7 bit data conte\n-00107cc0: 6e74 3c2f 6469 763e 3c64 6976 2063 6c61 nt
    De\n-00107ce0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00107cf0: 6473 6f61 7032 2e68 3a31 3032 3235 3c2f dsoap2.h:10225
    .

    C++ pr\n-00109960: 6f67 7261 6d6d 6572 7320 6361 6e20 7573 ogrammers can us\n-00109970: 6520 616e 2069 7465 7261 746f 7220 696e e an iterator in\n-00109980: 7374 6561 643a 3c2f 703e 0a3c 6469 7620 stead:

    .
    int\n-001099d0: 3c2f 7370 616e 3e20 6e20 3d20 303b 3c2f n = 0;.
    for (soap_multipart:\n-00109a80: 3a69 7465 7261 746f 723c 2f61 3e20 6920 :iterator i \n-00109a90: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap->m\n-00109b10: 696d 653c 2f61 3e2e 3c61 2063 6c61 7373 ime.begin\n-00109b70: 2829 3b20 6920 213d 203c 6120 636c 6173 (); i != \n-00109ba0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->mime.<\n-00109c00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00109c10: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n-00109c20: 5f6d 696d 652e 6874 6d6c 2361 6638 3130 _mime.html#af810\n-00109c30: 6539 3237 6364 6265 3631 3234 3266 3937 e927cdbe61242f97\n-00109c40: 3839 3138 6663 3264 6537 3438 223e 656e 8918fc2de748\">en\n-00109c50: 643c 2f61 3e28 293b 202b 2b69 293c 2f64 d(); ++i).
    {
    .\n-00109c90: 2020 2b2b 6e3b 3c2f 6469 763e 0a3c 6469 ++n;
    . \n-00109cb0: 2070 7269 6e74 6628 3c73 7061 6e20 636c printf("Part %\n-00109ce0: 643a 5c6e 2671 756f 743b 3c2f 7370 616e d:\\n", n);
    . \n-00109d10: 2070 7269 6e74 6628 3c73 7061 6e20 636c printf("ptr \n-00109d40: 2020 2020 203d 2570 5c6e 2671 756f 743b =%p\\n"\n-00109d50: 3c2f 7370 616e 3e2c 2069 2d26 6774 3b70 , i->p\n-00109d60: 7472 293b 3c2f 6469 763e 0a3c 6469 7620 tr);
    .
    .\n-00109d80: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // etc<\n-00109da0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-00109dc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap\n-00109e70: 5f6d 696d 653a 3a62 6567 696e 3c2f 613e _mime::begin\n-00109e80: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    soap_m\n-00109ea0: 756c 7469 7061 7274 3a3a 6974 6572 6174 ultipart::iterat\n-00109eb0: 6f72 2062 6567 696e 2829 3c2f 6469 763e or begin()
    \n-00109ec0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    C++ only: an \n-00109ee0: 6974 6572 6174 6f72 206f 7665 7220 736f iterator over so\n-00109ef0: 6170 5f6d 756c 7469 7061 7274 2061 7474 ap_multipart att\n-00109f00: 6163 686d 656e 7473 2e3c 2f64 6976 3e3c achments.
    <\n-00109f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_\n-00109fc0: 6d69 6d65 3a3a 656e 643c 2f61 3e3c 2f64 mime::end
    soap_mult\n-00109ff0: 6970 6172 743a 3a69 7465 7261 746f 7220 ipart::iterator \n-0010a000: 656e 6428 293c 2f64 6976 3e3c 6469 7620 end()
    C+\n-0010a020: 2b20 6f6e 6c79 3a20 616e 2069 7465 7261 + only: an itera\n-0010a030: 746f 7220 6f76 6572 2073 6f61 705f 6d75 tor over soap_mu\n-0010a040: 6c74 6970 6172 7420 6174 7461 6368 6d65 ltipart attachme\n-0010a050: 6e74 732e 3c2f 6469 763e 3c2f 6469 763e nts.
    \n-0010a060: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    \n-0010a110: 736f 6170 5f6d 756c 7469 7061 7274 3a3a soap_multipart::\n-0010a120: 6974 6572 6174 6f72 3c2f 613e 3c2f 6469 iterator
    soap_multi\n-0010a150: 7061 7274 5f69 7465 7261 746f 7220 6974 part_iterator it\n-0010a160: 6572 6174 6f72 3c2f 6469 763e 3c64 6976 erator
    C\n-0010a180: 2b2b 206f 6e6c 793a 2061 6e20 6974 6572 ++ only: an iter\n-0010a190: 6174 6f72 206f 7665 7220 736f 6170 5f6d ator over soap_m\n-0010a1a0: 756c 7469 7061 7274 2061 7474 6163 686d ultipart attachm\n-0010a1b0: 656e 7473 2e3c 2f64 6976 3e3c 6469 7620 ents.
    Definition:\n-0010a1e0: 2073 7464 736f 6170 322e 683a 3130 3434 stdsoap2.h:1044\n-0010a1f0: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 1
    .

    Note: ke\n-0010a220: 6570 2069 6e20 6d69 6e64 2074 6861 7420 ep in mind that \n-0010a230: 7468 6520 6669 7273 7420 6174 7461 6368 the first attach\n-0010a240: 6d65 6e74 2069 7320 6173 736f 6369 6174 ment is associat\n-0010a250: 6564 2077 6974 6820 7468 6520 534f 4150 ed with the SOAP\n-0010a260: 206d 6573 7361 6765 2061 6e64 2079 6f75 message and you\n-0010a270: 206d 6179 2077 616e 7420 746f 2069 676e may want to ign\n-0010a280: 6f72 6520 6974 2e3c 2f70 3e0a 3c70 3e41 ore it.

    .

    A\n-0010a290: 2063 616c 6c20 746f 203c 636f 6465 3e3c call to <\n-0010a2a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0010a2b0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0010a2c0: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-0010a2d0: 3831 6130 3039 6165 3165 6138 3235 6130 81a009ae1ea825a0\n-0010a2e0: 3565 3532 3431 6532 6237 6138 6563 6539 5e5241e2b7a8ece9\n-0010a2f0: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n-0010a300: 616c 6c20 6461 7461 2066 726f 6d20 6865 all data from he\n-0010a310: 6170 206d 656d 6f72 7920 6d61 6e61 6765 ap memory manage\n-0010a320: 6420 6279 2074 6865 2073 7065 6369 6669 d by the specifi\n-0010a330: 6564 2073 6f61 7020 636f 6e74 6578 7420 ed soap context \n-0010a340: 616e 6420 7265 6c65 6173 6520 7468 6520 and release the \n-0010a350: 6672 6565 6420 6d65 6d6f 7279 2062 2e2e freed memory b..\n-0010a360: 2e22 3e73 6f61 705f 656e 643c 2f61 3e3c .\">soap_end<\n-0010a370: 2f63 6f64 653e 2072 656d 6f76 6573 2061 /code> removes a\n-0010a380: 6c6c 206f 6620 7468 6520 7265 6365 6976 ll of the receiv\n-0010a390: 6564 204d 494d 4520 6461 7461 2e20 546f ed MIME data. To\n-0010a3a0: 2070 7265 7365 7276 6520 616e 2061 7474 preserve an att\n-0010a3b0: 6163 686d 656e 7420 696e 206d 656d 6f72 achment in memor\n-0010a3c0: 792c 2075 7365 203c 636f 6465 3e3c 6120 y, use soap_unlink\n-0010a4a0: 3c2f 636f 6465 3e20 6f6e 2074 6865 203c on the <\n-0010a4b0: 636f 6465 3e70 7472 3c2f 636f 6465 3e20 code>ptr \n-0010a4c0: 6d65 6d62 6572 206f 6620 7468 6520 3c63 member of the soap_multipar\n-0010a550: 743c 2f61 3e3c 2f63 6f64 653e 2073 7472 t str\n-0010a560: 7563 742e 2054 6865 203c 636f 6465 3e3c uct. The <\n-0010a570: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0010a580: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0010a590: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-0010a5a0: 3634 3362 6233 6364 6331 3932 6563 3064 643bb3cdc192ec0d\n-0010a5b0: 6331 6138 3434 3834 3938 6461 6234 3031 c1a8448498dab401\n-0010a5c0: 2220 7469 746c 653d 2255 6e6c 696e 6b20 \" title=\"Unlink \n-0010a5d0: 6120 626c 6f63 6b20 6f66 2068 6561 7020 a block of heap \n-0010a5e0: 6d65 6d6f 7279 206d 616e 6167 6564 2062 memory managed b\n-0010a5f0: 7920 7468 6520 7370 6563 6966 6965 6420 y the specified \n-0010a600: 736f 6170 2063 6f6e 7465 7874 2c20 746f soap context, to\n-0010a610: 2072 656c 6561 7365 2074 6865 206d 656d release the mem\n-0010a620: 6f72 7920 6578 706c 6963 6974 6c79 2e2e ory explicitly..\n-0010a630: 2e22 3e73 6f61 705f 756e 6c69 6e6b 3c2f .\">soap_unlink functi\n-0010a650: 6f6e 2063 616e 2062 6520 7573 6564 2074 on can be used t\n-0010a660: 6f20 7072 6576 656e 7420 6465 616c 6c6f o prevent deallo\n-0010a670: 6361 7469 6f6e 206f 6620 6465 7365 7269 cation of deseri\n-0010a680: 616c 697a 6564 2064 6174 612e 3c2f 703e alized data.

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

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

    .

    .DIME\n-0010a6f0: 2061 7474 6163 686d 656e 7473 3c2f 6831 attachments.

    Application\n-0010a710: 7320 6465 7665 6c6f 7065 6420 7769 7468 s developed with\n-0010a720: 2074 6865 2067 534f 4150 2074 6f6f 6c73 the gSOAP tools\n-0010a730: 2063 616e 2074 7261 6e73 6d69 7420 6269 can transmit bi\n-0010a740: 6e61 7279 2044 494d 4520 6174 7461 6368 nary DIME attach\n-0010a750: 6d65 6e74 7320 7374 6f72 6564 2069 6e20 ments stored in \n-0010a760: 6d65 6d6f 7279 206f 7220 696e 2073 7472 memory or in str\n-0010a770: 6561 6d69 6e67 206d 6f64 6520 6279 2066 eaming mode by f\n-0010a780: 6574 6368 696e 6720 6461 7461 2066 726f etching data fro\n-0010a790: 6d20 6120 7265 736f 7572 6365 206f 7220 m a resource or \n-0010a7a0: 7365 6e64 696e 6720 6461 7461 2074 6f20 sending data to \n-0010a7b0: 6120 7265 736f 7572 6365 2075 7369 6e67 a resource using\n-0010a7c0: 2063 616c 6c62 6163 6b20 6675 6e63 7469 callback functi\n-0010a7d0: 6f6e 732e 2054 6865 206d 6178 696d 756d ons. The maximum\n-0010a7e0: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-0010a7f0: 2073 697a 6520 6973 206c 696d 6974 6564 size is limited\n-0010a800: 2074 6f20 3820 4d42 2062 7920 6465 6661 to 8 MB by defa\n-0010a810: 756c 7420 6173 2073 6574 2077 6974 6820 ult as set with \n-0010a820: 3c63 6f64 653e 2353 4f41 505f 4d41 5844 #SOAP_MAXD\n-0010a830: 494d 4553 495a 453c 2f63 6f64 653e 2e20 IMESIZE. \n-0010a840: 5468 6973 206c 696d 6974 2063 616e 2062 This limit can b\n-0010a850: 6520 6368 616e 6765 6420 6173 206e 6565 e changed as nee\n-0010a860: 6465 642e 2057 6974 6820 7374 7265 616d ded. With stream\n-0010a870: 696e 6720 4449 4d45 2075 7369 6e67 2063 ing DIME using c\n-0010a880: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function\n-0010a890: 732c 2064 6174 6120 6861 6e64 6c65 7273 s, data handlers\n-0010a8a0: 2061 7265 2075 7365 6420 746f 2070 6173 are used to pas\n-0010a8b0: 7320 7468 6520 6461 7461 2074 6f20 616e s the data to an\n-0010a8c0: 6420 6672 6f6d 2061 2072 6573 6f75 7263 d from a resourc\n-0010a8d0: 6520 6672 6f6d 2077 6869 6368 2074 6f20 e from which to \n-0010a8e0: 6665 7463 6820 7468 6520 6461 7461 2074 fetch the data t\n-0010a8f0: 6f20 7365 6e64 206f 7220 6461 7461 2074 o send or data t\n-0010a900: 6f20 7374 6f72 652c 2073 7563 6820 6173 o store, such as\n-0010a910: 2061 2066 696c 6520 6f72 2064 6576 6963 a file or devic\n-0010a920: 652e 2053 6565 2053 6563 7469 6f6e 203c e. See Section <\n-0010a930: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0010a940: 663d 2269 6e64 6578 2e68 746d 6c23 4449 f=\"index.html#DI\n-0010a950: 4d45 7374 7265 616d 696e 6722 3e53 7472 MEstreaming\">Str\n-0010a960: 6561 6d69 6e67 2044 494d 453c 2f61 3e20 eaming DIME \n-0010a970: 2e3c 2f70 3e0a 3c70 3e46 6f72 2064 6574 .

    .

    For det\n-0010a980: 6169 6c73 206f 6e20 4449 4d45 2061 7474 ails on DIME att\n-0010a990: 6163 686d 656e 7473 2c20 7365 6520 3c61 achments, see http:/\n-0010aa00: 2f6d 7364 6e2e 6d69 6372 6f73 6f66 742e /msdn.microsoft.\n-0010aa10: 636f 6d2f 6c69 6272 6172 792f 656e 2d75 com/library/en-u\n-0010aa20: 732f 646e 676c 6f62 7370 6563 2f68 746d s/dnglobspec/htm\n-0010aa30: 6c2f 6472 6166 742d 6e69 656c 7365 6e2d l/draft-nielsen-\n-0010aa40: 6469 6d65 2d30 322e 7478 743c 2f61 3e3c dime-02.txt<\n-0010aa50: 2f70 3e0a 3c70 3e53 6565 2061 6c73 6f20 /p>.

    See also \n-0010aa60: 4150 4920 646f 6375 6d65 6e74 6174 696f API documentatio\n-0010aa70: 6e20 4d6f 6475 6c65 203c 6120 636c 6173 n Module DIME attac\n-0010aab0: 686d 656e 7420 6675 6e63 7469 6f6e 733c hment functions<\n-0010aac0: 2f61 3e2e 3c2f 703e 0a3c 703e f09f 949d /a>.

    .

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

    .<\n-0010ab00: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Sendi\n-0010ab30: 6e67 2061 2063 6f6c 6c65 6374 696f 6e20 ng a collection \n-0010ab40: 6f66 2044 494d 4520 6174 7461 6368 6d65 of DIME attachme\n-0010ab50: 6e74 733c 2f68 323e 0a3c 703e 5468 6520 nts

    .

    The \n-0010ab60: 666f 6c6c 6f77 696e 6720 6675 6e63 7469 following functi\n-0010ab70: 6f6e 7320 6361 6e20 6265 2075 7365 6420 ons can be used \n-0010ab80: 746f 2065 7870 6c69 6369 746c 7920 7365 to explicitly se\n-0010ab90: 7420 7570 2061 2063 6f6c 6c65 6374 696f t up a collectio\n-0010aba0: 6e20 6f66 2044 494d 4520 6174 7461 6368 n of DIME attach\n-0010abb0: 6d65 6e74 7320 666f 7220 7472 616e 736d ments for transm\n-0010abc0: 6973 7369 6f6e 2077 6974 6820 6120 6d65 ission with a me\n-0010abd0: 7373 6167 652e 2054 6865 7365 2061 7474 ssage. These att\n-0010abe0: 6163 686d 656e 7473 2063 616e 2062 6520 achments can be \n-0010abf0: 7374 7265 616d 6564 2c20 6173 2064 6573 streamed, as des\n-0010ac00: 6372 6962 6564 2069 6e20 5365 6374 696f cribed in Sectio\n-0010ac10: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n \n-0010ac40: 5374 7265 616d 696e 6720 4449 4d45 3c2f Streaming DIME . Without str\n-0010ac60: 6561 6d69 6e67 2c20 6561 6368 2061 7474 eaming, each att\n-0010ac70: 6163 686d 656e 7420 6d75 7374 2072 6566 achment must ref\n-0010ac80: 6572 2074 6f20 6120 626c 6f63 6b20 6f66 er to a block of\n-0010ac90: 2064 6174 6120 696e 206d 656d 6f72 792e data in memory.\n-0010aca0: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 3c63

    .
      .
    • void soap_s\n-0010ad30: 6574 5f64 696d 6528 7374 7275 6374 2073 et_dime(struct s\n-0010ad40: 6f61 7020 2a73 6f61 7029 3c2f 613e 3c2f oap *soap) This funct\n-0010ad60: 696f 6e20 656e 6162 6c65 7320 7365 6e64 ion enables send\n-0010ad70: 696e 6720 4449 4d45 2061 7474 6163 686d ing DIME attachm\n-0010ad80: 656e 7473 2e20 5468 6973 2066 756e 6374 ents. This funct\n-0010ad90: 696f 6e20 6973 2067 656e 6572 616c 6c79 ion is generally\n-0010ada0: 206e 6f74 2072 6571 7569 7265 6420 6265 not required be\n-0010adb0: 6361 7573 6520 4449 4d45 2061 7474 6163 cause DIME attac\n-0010adc0: 686d 656e 7473 2061 7265 2061 7574 6f6d hments are autom\n-0010add0: 6174 6963 616c 6c79 2064 6574 6563 7465 atically detecte\n-0010ade0: 6420 6173 203c 636f 6465 3e3c 6120 636c d as xsd__ba\n-0010ae60: 7365 3634 4269 6e61 7279 3c2f 613e 3c2f se64Binary and \n-0010ae80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 _xop__Incl\n-0010aef0: 7564 653c 2f61 3e3c 2f63 6f64 653e 2073 ude s\n-0010af00: 7472 7563 7475 7265 7320 696e 2074 6865 tructures in the\n-0010af10: 2064 6174 6120 746f 2073 6572 6961 6c69 data to seriali\n-0010af20: 7a65 2061 7320 616e 2058 4d4c 206d 6573 ze as an XML mes\n-0010af30: 7361 6765 2077 6974 6820 7468 6520 6174 sage with the at\n-0010af40: 7461 6368 6d65 6e74 7320 6175 746f 6d61 tachments automa\n-0010af50: 7469 6361 6c6c 7920 6164 6465 6420 6f72 tically added or\n-0010af60: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-0010af70: 7320 6361 6e20 6265 2065 7870 6c69 6369 s can be explici\n-0010af80: 746c 7920 6164 6465 6420 7769 7468 203c tly added with <\n-0010af90: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-0010b020: 5f73 6574 5f64 696d 655f 6174 7461 6368 _set_dime_attach\n-0010b030: 6d65 6e74 3c2f 613e 3c2f 636f 6465 3e2e ment.\n-0010b040: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
    • .
    • \n-0010b050: 696e 7420 736f 6170 5f73 6574 5f64 696d int soap_set_dim\n-0010b060: 655f 6174 7461 6368 6d65 6e74 2873 7472 e_attachment(str\n-0010b070: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-0010b080: 6368 6172 202a 7074 722c 2073 697a 655f char *ptr, size_\n-0010b090: 7420 7369 7a65 2c20 636f 6e73 7420 6368 t size, const ch\n-0010b0a0: 6172 202a 7479 7065 2c20 636f 6e73 7420 ar *type, const \n-0010b0b0: 6368 6172 202a 6964 2c20 756e 7369 676e char *id, unsign\n-0010b0c0: 6564 2073 686f 7274 206f 7074 7970 652c ed short optype,\n-0010b0d0: 2063 6f6e 7374 2063 6861 7220 2a6f 7074 const char *opt\n-0010b0e0: 696f 6e29 3c2f 636f 6465 3e20 5468 6973 ion) This\n-0010b0f0: 2066 756e 6374 696f 6e20 6164 6473 2061 function adds a\n-0010b100: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-0010b110: 2074 6f20 7468 6520 584d 4c20 6d65 7373 to the XML mess\n-0010b120: 6167 6520 746f 2073 656e 642e 2054 6865 age to send. The\n-0010b130: 2073 7065 6369 6669 6564 203c 636f 6465 specified ptr poin\n-0010b150: 7473 2074 6f20 7468 6520 6461 7461 2074 ts to the data t\n-0010b160: 6f20 7365 6e64 206f 6620 6c65 6e67 7468 o send of length\n-0010b170: 2073 7065 6369 6669 6564 2062 7920 3c63 specified by size.\n-0010b190: 2054 6865 203c 636f 6465 3e74 7970 653c The type<\n-0010b1a0: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n-0010b1b0: 2069 6e64 6963 6174 6573 2074 6865 204d indicates the M\n-0010b1c0: 494d 4520 7479 7065 206f 6620 7468 6520 IME type of the \n-0010b1d0: 6461 7461 206f 7220 6361 6e20 6265 204e data or can be N\n-0010b1e0: 554c 4c2e 2054 6865 203c 636f 6465 3e69 ULL. The i\n-0010b1f0: 643c 2f63 6f64 653e 2070 6172 616d 6574 d paramet\n-0010b200: 6572 2075 6e69 7175 656c 7920 6964 656e er uniquely iden\n-0010b210: 7469 6669 6573 2074 6865 2061 7474 6163 tifies the attac\n-0010b220: 686d 656e 7420 696e 2074 6865 206d 6573 hment in the mes\n-0010b230: 7361 6765 2c20 7768 6963 6820 6361 6e20 sage, which can \n-0010b240: 6265 206f 6d69 7474 6564 2062 7920 7370 be omitted by sp\n-0010b250: 6563 6966 7969 6e67 204e 554c 4c2e 2054 ecifying NULL. T\n-0010b260: 6865 203c 636f 6465 3e6f 7074 696f 6e3c he option<\n-0010b270: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n-0010b280: 2069 7320 616e 206f 7074 696f 6e20 7375 is an option su\n-0010b290: 6368 2061 7320 6120 6465 7363 7269 7074 ch as a descript\n-0010b2a0: 696f 6e20 6f66 2074 6865 2064 6174 6120 ion of the data \n-0010b2b0: 616e 6420 3c63 6f64 653e 6f70 7479 7065 and optype\n-0010b2c0: 3c2f 636f 6465 3e20 6973 2061 2075 7365 is a use\n-0010b2d0: 722d 6465 6669 6e65 6420 6f70 7469 6f6e r-defined option\n-0010b2e0: 2074 7970 6520 2861 7320 7065 7220 4449 type (as per DI\n-0010b2f0: 4d45 206f 7074 696f 6e20 7370 6563 6966 ME option specif\n-0010b300: 6963 6174 696f 6e20 666f 726d 6174 292e ication format).\n-0010b310: 2054 6865 203c 636f 6465 3e70 7472 3c2f The ptr parameter \n-0010b330: 6d75 7374 2062 6520 7065 7273 6973 7465 must be persiste\n-0010b340: 6e74 2e20 5468 6520 3c63 6f64 653e 7074 nt. The pt\n-0010b350: 723c 2f63 6f64 653e 2070 6172 616d 6574 r paramet\n-0010b360: 6572 2070 6173 7365 6420 746f 2074 6869 er passed to thi\n-0010b370: 7320 6675 6e63 7469 6f6e 206d 7573 7420 s function must \n-0010b380: 6265 2070 6572 7369 7374 656e 7420 696e be persistent in\n-0010b390: 206d 656d 6f72 7920 756e 7469 6c20 7468 memory until th\n-0010b3a0: 6520 6174 7461 6368 6d65 6e74 2077 6173 e attachment was\n-0010b3b0: 2073 656e 742e 2052 6574 7572 6e73 203c sent. Returns <\n-0010b3c0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n-0010b3e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n-0010b4a0: 3c2f 636f 6465 3e20 6572 726f 7220 636f error co\n-0010b4b0: 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f de.
    • .
    • void soap_c\n-0010b540: 6c72 5f64 696d 6528 7374 7275 6374 2073 lr_dime(struct s\n-0010b550: 6f61 7020 2a73 6f61 7029 3c2f 613e 3c2f oap *soap) This funct\n-0010b570: 696f 6e20 6469 7361 626c 6573 2044 494d ion disables DIM\n-0010b580: 4520 6174 7461 6368 6d65 6e74 732c 2075 E attachments, u\n-0010b590: 6e6c 6573 7320 7468 6520 6461 7461 2074 nless the data t\n-0010b5a0: 6f20 7365 7269 616c 697a 6520 6173 2061 o serialize as a\n-0010b5b0: 6e20 584d 4c20 6d65 7373 6167 6520 636f n XML message co\n-0010b5c0: 6e74 6169 6e73 2061 7474 6163 686d 656e ntains attachmen\n-0010b5d0: 7473 2064 6566 696e 6564 2062 7920 3c63 ts defined by xsd__base64Bin\n-0010b660: 6172 793c 2f61 3e3c 2f63 6f64 653e 2061 ary a\n-0010b670: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd _\n-0010b6e0: 786f 705f 5f49 6e63 6c75 6465 3c2f 613e xop__Include\n-0010b6f0: 3c2f 636f 6465 3e20 7374 7275 6374 7572 structur\n-0010b700: 6573 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c es.
    • .
    .<\n-0010b710: 703e 5468 6573 6520 6675 6e63 7469 6f6e p>These function\n-0010b720: 7320 616c 6c6f 7720 4449 4d45 2061 7474 s allow DIME att\n-0010b730: 6163 686d 656e 7473 2074 6f20 6265 2061 achments to be a\n-0010b740: 6464 6564 2074 6f20 534f 4150 206d 6573 dded to SOAP mes\n-0010b750: 7361 6765 7320 7769 7468 6f75 7420 7265 sages without re\n-0010b760: 7175 6972 696e 6720 6d65 7373 6167 6520 quiring message \n-0010b770: 626f 6479 2072 6566 6572 656e 6365 732e body references.\n-0010b780: 2054 6869 7320 6973 2061 6c73 6f20 7265 This is also re\n-0010b790: 6665 7272 6564 2074 6f20 6173 2074 6865 ferred to as the\n-0010b7a0: 206f 7065 6e20 4449 4d45 2061 7474 6163 open DIME attac\n-0010b7b0: 686d 656e 7420 7374 796c 652e 2054 6865 hment style. The\n-0010b7c0: 2063 6c6f 7365 6420 6174 7461 6368 6d65 closed attachme\n-0010b7d0: 6e74 2073 7479 6c65 2072 6571 7569 7265 nt style require\n-0010b7e0: 7320 616c 6c20 4449 4d45 2061 7474 6163 s all DIME attac\n-0010b7f0: 686d 656e 7473 2074 6f20 6265 2072 6566 hments to be ref\n-0010b800: 6572 656e 6365 6420 6672 6f6d 2074 6865 erenced from the\n-0010b810: 2053 4f41 5020 6d65 7373 6167 6520 626f SOAP message bo\n-0010b820: 6479 2077 6974 6820 3c65 6d3e 3c63 6f64 dy with href (or similar) \n-0010b850: 7265 6665 7265 6e63 6573 2e20 466f 7220 references. For \n-0010b860: 7468 6520 636c 6f73 6564 2073 7479 6c65 the closed style\n-0010b870: 2c20 6753 4f41 5020 7375 7070 6f72 7473 , gSOAP supports\n-0010b880: 2061 6e20 6175 746f 6d61 7469 6320 6269 an automatic bi\n-0010b890: 6e61 7279 2064 6174 6120 7365 7269 616c nary data serial\n-0010b8a0: 697a 6174 696f 6e20 6d65 7468 6f64 2c20 ization method, \n-0010b8b0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Serializi\n-0010b8f0: 6e67 2062 696e 6172 7920 6461 7461 2077 ng binary data w\n-0010b900: 6974 6820 4449 4d45 2061 7474 6163 686d ith DIME attachm\n-0010b910: 656e 7473 3c2f 613e 202e 3c2f 703e 0a3c ents .

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

    .

    .Retrieving a \n-0010b990: 636f 6c6c 6563 7469 6f6e 206f 6620 4449 collection of DI\n-0010b9a0: 4d45 2061 7474 6163 686d 656e 7473 3c2f ME attachments.

    DIME atta\n-0010b9c0: 6368 6d65 6e74 7320 6172 6520 6175 746f chments are auto\n-0010b9d0: 6d61 7469 6361 6c6c 7920 7061 7273 6564 matically parsed\n-0010b9e0: 2061 6e64 2073 746f 7265 6420 696e 206d and stored in m\n-0010b9f0: 656d 6f72 7920 286f 7220 7061 7373 6564 emory (or passed\n-0010ba00: 2074 6f20 7468 6520 7374 7265 616d 696e to the streamin\n-0010ba10: 6720 6861 6e64 6c65 7273 2076 6961 2074 g handlers via t\n-0010ba20: 6865 2044 494d 4520 6361 6c6c 6261 636b he DIME callback\n-0010ba30: 2066 756e 6374 696f 6e73 2077 6865 6e20 functions when \n-0010ba40: 6465 6669 6e65 6429 2e20 4166 7465 7220 defined). After \n-0010ba50: 7265 6365 6976 696e 6720 6120 7365 7420 receiving a set \n-0010ba60: 6f66 2044 494d 4520 6174 7461 6368 6d65 of DIME attachme\n-0010ba70: 6e74 732c 2065 6974 6865 7220 6174 2074 nts, either at t\n-0010ba80: 6865 2063 6c69 656e 742d 7369 6465 206f he client-side o\n-0010ba90: 7220 7468 6520 7365 7276 6572 2d73 6964 r the server-sid\n-0010baa0: 652c 2074 6865 206c 6973 7420 6f66 2044 e, the list of D\n-0010bab0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n-0010bac0: 6361 6e20 6265 2074 7261 7665 7273 6564 can be traversed\n-0010bad0: 2074 6f20 6578 7472 6163 7420 6d65 7461 to extract meta\n-0010bae0: 2064 6174 6120 616e 6420 7468 6520 6174 data and the at\n-0010baf0: 7461 6368 6d65 6e74 2063 6f6e 7465 6e74 tachment content\n-0010bb00: 2e3c 2f70 3e0a 3c70 3e54 6f20 7472 6176 .

    .

    To trav\n-0010bb10: 6572 7365 2074 6865 206c 6973 7420 6f66 erse the list of\n-0010bb20: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-0010bb30: 7320 696e 2043 2c20 796f 7520 7573 6520 s in C, you use \n-0010bb40: 6120 6c6f 6f70 2073 696d 696c 6172 2074 a loop similar t\n-0010bb50: 6f3a 3c2f 703e 0a3c 6469 7620 636c 6173 o:

    .
    <\n-0010bb80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0010bb90: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int n = 0;
    \n-0010bbb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .<\n-0010bc40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0010bc50: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >for (attachmen\n-0010bc80: 7420 3d20 3c61 2063 6c61 7373 3d22 636f t = soap<\n-0010bcb0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->dime.list; attachment; a\n-0010bd70: 7474 6163 686d 656e 7420 3d20 6174 7461 ttachment = atta\n-0010bd80: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->n\n-0010bde0: 6578 743c 2f61 3e29 3c2f 6469 763e 0a3c ext)

    .<\n-0010bdf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0010be00: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    ++n\n-0010be20: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    prin\n-0010be40: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n-0010be60: 7175 6f74 3b50 6172 7420 2564 3a5c 6e26 quot;Part %d:\\n&\n-0010be70: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6e29 quot;, n)\n-0010be80: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    prin\n-0010bea0: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n-0010bec0: 7175 6f74 3b70 7472 2020 2020 2020 2020 quot;ptr \n-0010bed0: 3d25 705c 6e26 7175 6f74 3b3c 2f73 7061 =%p\\n", attachment-&\n-0010bef0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;ptr);\n-0010bf50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    print\n-0010bf70: 6628 3c73 7061 6e20 636c 6173 733d 2273 f(&q\n-0010bf90: 756f 743b 7369 7a65 2020 2020 2020 203d uot;size =\n-0010bfa0: 2575 6c5c 6e26 7175 6f74 3b3c 2f73 7061 %ul\\n", attachment-&\n-0010bfc0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;size)\n-0010c020: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    prin\n-0010c040: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n-0010c060: 7175 6f74 3b69 6420 2020 2020 2020 2020 quot;id \n-0010c070: 3d25 735c 6e26 7175 6f74 3b3c 2f73 7061 =%s\\n", attachment-&\n-0010c090: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;id ? \n-0010c0f0: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment-><\n-0010c100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0010c110: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n-0010c120: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n-0010c130: 6164 3062 6364 3739 6234 3061 3162 6331 ad0bcd79b40a1bc1\n-0010c140: 6463 3133 6663 3334 3334 3737 6635 3536 dc13fc343477f556\n-0010c150: 3422 3e69 643c 2f61 3e20 3a20 3c73 7061 4\">id : "&q\n-0010c180: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    printf(<\n-0010c1b0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0010c1c0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0010c1d0: 3b74 7970 6520 2020 2020 2020 3d25 735c ;type =%s\\\n-0010c1e0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-0010c1f0: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment-><\n-0010c200: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0010c210: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n-0010c220: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n-0010c230: 6134 3935 6338 6432 3065 3033 3334 6265 a495c8d20e0334be\n-0010c240: 3162 3133 3435 3139 3363 6132 6662 3736 1b1345193ca2fb76\n-0010c250: 3422 3e74 7970 653c 2f61 3e20 3f20 6174 4\">type ? at\n-0010c260: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->type : "&q\n-0010c2f0: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    }
    .soap_dime::li\n-0010c3d0: 7374 3c2f 613e 3c2f 6469 763e 3c64 6976 st
    \n-0010c3f0: 7374 7275 6374 2073 6f61 705f 6d75 6c74 struct soap_mult\n-0010c400: 6970 6172 7420 2a20 6c69 7374 3c2f 6469 ipart * list
    list of DIM\n-0010c430: 4520 6174 7461 6368 6d65 6e74 7320 7265 E attachments re\n-0010c440: 6365 6976 6564 3c2f 6469 763e 3c64 6976 ceived
    <\n-0010c460: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:997\n-0010c480: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 1
    .
    s\n-0010c550: 7472 7563 7420 736f 6170 5f64 696d 6520 truct soap_dime \n-0010c560: 6469 6d65 3c2f 6469 763e 3c64 6976 2063 dime
    DIM\n-0010c580: 4520 6174 7461 6368 6d65 6e74 7320 7265 E attachments re\n-0010c590: 6365 6976 6564 2e3c 2f64 6976 3e3c 6469 ceived.
    \n-0010c5b0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:41\n-0010c5d0: 3834 3c2f 6469 763e 3c2f 6469 763e 0a3c 84
    .<\n-0010c5e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    C++ pro\n-0010c600: 6772 616d 6d65 7273 2063 616e 2075 7365 grammers can use\n-0010c610: 2061 6e20 6974 6572 6174 6f72 2069 6e73 an iterator ins\n-0010c620: 7465 6164 3a3c 2f70 3e0a 3c64 6976 2063 tead:

    .
    \n-0010c640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-0010c670: 2f73 7061 6e3e 206e 203d 2030 3b3c 2f64 /span> n = 0;.
    \n-0010c6b0: 666f 723c 2f73 7061 6e3e 2028 3c61 2063 for (\n-0010c710: 736f 6170 5f6d 756c 7469 7061 7274 3a3a soap_multipart::\n-0010c720: 6974 6572 6174 6f72 3c2f 613e 2069 203d iterator i =\n-0010c730: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-0010c760: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->di\n-0010c7b0: 6d65 3c2f 613e 2e3c 6120 636c 6173 733d me.begin(\n-0010c810: 293b 2069 2021 3d20 3c61 2063 6c61 7373 ); i != s\n-0010c840: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->dime.end\n-0010c8f0: 3c2f 613e 2829 3b20 2b2b 6929 3c2f 6469 (); ++i).
    {
    . \n-0010c930: 202b 2b6e 3b3c 2f64 6976 3e0a 3c64 6976 ++n;
    . \n-0010c950: 7072 696e 7466 283c 7370 616e 2063 6c61 printf("Part %d\n-0010c980: 3a5c 6e26 7175 6f74 3b3c 2f73 7061 6e3e :\\n"\n-0010c990: 2c20 6e29 3b3c 2f64 6976 3e0a 3c64 6976 , n);
    . \n-0010c9b0: 7072 696e 7466 283c 7370 616e 2063 6c61 printf("ptr \n-0010c9e0: 2020 2020 3d25 705c 6e26 7175 6f74 3b3c =%p\\n"<\n-0010c9f0: 2f73 7061 6e3e 2c20 692d 2667 743b 7074 /span>, i->pt\n-0010ca00: 7229 3b3c 2f64 6976 3e0a 3c64 6976 2063 r);
    .
    ..\n-0010ca20: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // etc
    .}<\n-0010ca60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_\n-0010cb10: 6469 6d65 3a3a 6265 6769 6e3c 2f61 3e3c dime::begin<\n-0010cb20: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_mu\n-0010cb40: 6c74 6970 6172 743a 3a69 7465 7261 746f ltipart::iterato\n-0010cb50: 7220 6265 6769 6e28 293c 2f64 6976 3e3c r begin()
    <\n-0010cb60: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0010cb70: 223e 432b 2b20 6f6e 6c79 3a20 616e 2069 \">C++ only: an i\n-0010cb80: 7465 7261 746f 7220 6f76 6572 2073 6f61 terator over soa\n-0010cb90: 705f 6d75 6c74 6970 6172 7420 6174 7461 p_multipart atta\n-0010cba0: 6368 6d65 6e74 732e 3c2f 6469 763e 3c2f chments.
    .
    soap_d\n-0010cc60: 696d 653a 3a65 6e64 3c2f 613e 3c2f 6469 ime::end
    soap_multi\n-0010cc90: 7061 7274 3a3a 6974 6572 6174 6f72 2065 part::iterator e\n-0010cca0: 6e64 2829 3c2f 6469 763e 3c64 6976 2063 nd()
    C++\n-0010ccc0: 206f 6e6c 793a 2061 6e20 6974 6572 6174 only: an iterat\n-0010ccd0: 6f72 206f 7665 7220 736f 6170 5f6d 756c or over soap_mul\n-0010cce0: 7469 7061 7274 2061 7474 6163 686d 656e tipart attachmen\n-0010ccf0: 7473 2e3c 2f64 6976 3e3c 2f64 6976 3e0a ts.
    .\n-0010cd00: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The options member is ava\n-0010cd40: 696c 6162 6c65 2061 7320 7765 6c6c 2c20 ilable as well, \n-0010cd50: 6275 7420 6e6f 7420 7368 6f77 6e20 696e but not shown in\n-0010cd60: 2074 6865 2063 6f64 6520 6162 6f76 652e the code above.\n-0010cd70: 2054 6865 203c 636f 6465 3e6f 7074 696f The optio\n-0010cd80: 6e73 3c2f 636f 6465 3e20 636f 6e74 656e ns conten\n-0010cd90: 7420 6973 2066 6f72 6d61 7474 6564 2061 t is formatted a\n-0010cda0: 6363 6f72 6469 6e67 2074 6f20 7468 6520 ccording to the \n-0010cdb0: 4449 4d45 2073 7065 6369 6669 6361 7469 DIME specificati\n-0010cdc0: 6f6e 3a20 7468 6520 6669 7273 7420 7477 on: the first tw\n-0010cdd0: 6f20 6279 7465 7320 6172 6520 7265 7365 o bytes are rese\n-0010cde0: 7276 6564 2066 6f72 2074 6865 206f 7074 rved for the opt\n-0010cdf0: 696f 6e20 7479 7065 2c20 7468 6520 6e65 ion type, the ne\n-0010ce00: 7874 2074 776f 2062 7974 6573 2073 746f xt two bytes sto\n-0010ce10: 7265 2074 6865 2073 697a 6520 6f66 2074 re the size of t\n-0010ce20: 6865 206f 7074 696f 6e20 6461 7461 2c20 he option data, \n-0010ce30: 666f 6c6c 6f77 6564 2062 7920 7468 6520 followed by the \n-0010ce40: 2862 696e 6172 7929 206f 7074 696f 6e20 (binary) option \n-0010ce50: 6461 7461 2e3c 2f70 3e0a 3c70 3e41 2063 data.

    .

    A c\n-0010ce60: 616c 6c20 746f 203c 636f 6465 3e3c 6120 all to soap_end removes all\n-0010cf50: 206f 6620 7468 6520 7265 6365 6976 6564 of the received\n-0010cf60: 2044 494d 4520 6461 7461 2e20 546f 2070 DIME data. To p\n-0010cf70: 7265 7365 7276 6520 616e 2061 7474 6163 reserve an attac\n-0010cf80: 686d 656e 7420 696e 206d 656d 6f72 792c hment in memory,\n-0010cf90: 2075 7365 203c 636f 6465 3e3c 6120 636c use s\n-0010d060: 6f61 705f 756e 6c69 6e6b 3c2f 613e 3c2f oap_unlink on the ptr me\n-0010d090: 6d62 6572 206f 6620 7468 6520 3c63 6f64 mber of the soap_multipart<\n-0010d120: 2f61 3e3c 2f63 6f64 653e 2073 7472 7563 /a> struc\n-0010d130: 742e 2054 6865 203c 636f 6465 3e3c 6120 t. The soap_unlink\n-0010d210: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n-0010d220: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n-0010d230: 7072 6576 656e 7420 6465 616c 6c6f 6361 prevent dealloca\n-0010d240: 7469 6f6e 206f 6620 6465 7365 7269 616c tion of deserial\n-0010d250: 697a 6564 2064 6174 612e 3c2f 703e 0a3c ized data.

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

    .

    .\n-0010d2c0: 5365 7269 616c 697a 696e 6720 6269 6e61 Serializing bina\n-0010d2d0: 7279 2064 6174 6120 7769 7468 2044 494d ry data with DIM\n-0010d2e0: 4520 6174 7461 6368 6d65 6e74 733c 2f68 E attachments.

    Binary dat\n-0010d300: 6120 7374 6f72 6564 2069 6e20 6578 7465 a stored in exte\n-0010d310: 6e64 6564 203c 636f 6465 3e3c 6120 636c nded xsd__ba\n-0010d390: 7365 3634 4269 6e61 7279 3c2f 613e 3c2f se64Binary and \n-0010d3b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xsd__hex\n-0010d420: 4269 6e61 7279 3c2f 613e 3c2f 636f 6465 Binary types can be s\n-0010d440: 6572 6961 6c69 7a65 6420 616e 6420 6465 erialized and de\n-0010d450: 7365 7269 616c 697a 6564 2061 7320 4449 serialized as DI\n-0010d460: 4d45 2061 7474 6163 686d 656e 7473 2077 ME attachments w\n-0010d470: 6865 6e20 6f6e 6520 6f72 206d 6f72 6520 hen one or more \n-0010d480: 6f66 2074 6865 2065 7874 7261 206d 656d of the extra mem\n-0010d490: 6265 7273 203c 636f 6465 3e69 643c 2f63 bers id, type\n-0010d4b0: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and options are non-NULL. \n-0010d4e0: 5468 6573 6520 6174 7461 6368 6d65 6e74 These attachment\n-0010d4f0: 7320 7769 6c6c 2062 6520 6175 746f 6d61 s will be automa\n-0010d500: 7469 6361 6c6c 7920 7472 616e 736d 6974 tically transmit\n-0010d510: 7465 6420 7072 696f 7220 746f 2074 6865 ted prior to the\n-0010d520: 2073 6571 7565 6e63 6520 6f66 2073 6563 sequence of sec\n-0010d530: 6f6e 6461 7279 2044 494d 4520 6174 7461 ondary DIME atta\n-0010d540: 6368 6d65 6e74 7320 6465 6669 6e65 6420 chments defined \n-0010d550: 6279 2074 6865 2075 7365 7220 7769 7468 by the user with\n-0010d560: 203c 636f 6465 3e3c 6120 636c 6173 733d so\n-0010d5f0: 6170 5f73 6574 5f64 696d 655f 6174 7461 ap_set_dime_atta\n-0010d600: 6368 6d65 6e74 3c2f 613e 3c2f 636f 6465 chment as explained i\n-0010d620: 6e20 7468 6520 7072 6576 696f 7573 2073 n the previous s\n-0010d630: 6563 7469 6f6e 2e20 5468 6520 7365 7269 ection. The seri\n-0010d640: 616c 697a 6174 696f 6e20 7072 6f63 6573 alization proces\n-0010d650: 7320 6973 2061 7574 6f6d 6174 6564 2066 s is automated f\n-0010d660: 6f72 2053 4f41 5020 656e 636f 6465 6420 or SOAP encoded \n-0010d670: 6d65 7373 6167 6573 2061 6e64 2044 494d messages and DIM\n-0010d680: 4520 6174 7461 6368 6d65 6e74 7320 7769 E attachments wi\n-0010d690: 6c6c 2062 6520 7365 6e64 2065 7665 6e20 ll be send even \n-0010d6a0: 7768 656e 203c 636f 6465 3e3c 6120 636c when soap\n-0010d720: 5f73 6574 5f64 696d 653c 2f61 3e3c 2f63 _set_dime or soap_set_di\n-0010d7d0: 6d65 5f61 7474 6163 686d 656e 743c 2f61 me_attachment are not\n-0010d7f0: 2075 7365 642e 2046 6f72 206e 6f6e 2d53 used. For non-S\n-0010d800: 4f41 502d 656e 636f 6465 6420 6d65 7373 OAP-encoded mess\n-0010d810: 6167 6573 2073 7563 6820 6173 2064 6f63 ages such as doc\n-0010d820: 756d 656e 742f 6c69 7465 7261 6c20 6d65 ument/literal me\n-0010d830: 7373 6167 6573 2079 6f75 206d 7573 7420 ssages you must \n-0010d840: 7374 696c 6c20 6361 6c6c 203c 636f 6465 still call soap_set_dime<\n-0010d8d0: 2f61 3e3c 2f63 6f64 653e 2074 6f20 656e /a> to en\n-0010d8e0: 6162 6c65 2073 656e 6469 6e67 206d 6573 able sending mes\n-0010d8f0: 7361 6765 7320 7769 7468 2061 7474 6163 sages with attac\n-0010d900: 686d 656e 7473 2e3c 2f70 3e0a 3c70 3e54 hments.

    .

    T\n-0010d910: 6f20 656e 6162 6c65 2073 6572 6961 6c69 o enable seriali\n-0010d920: 7a61 7469 6f6e 206f 6620 7468 6520 6461 zation of the da\n-0010d930: 7461 2061 7320 4449 4d45 2061 7474 6163 ta as DIME attac\n-0010d940: 686d 656e 7473 2069 6e73 7465 6164 206f hments instead o\n-0010d950: 6620 696e 6c69 6e65 2062 6173 6536 342c f inline base64,\n-0010d960: 2077 6520 6578 7465 6e64 2074 6865 203c we extend the <\n-0010d970: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>xsd__base64Bi\n-0010d9f0: 6e61 7279 3c2f 613e 3c2f 636f 6465 3e20 nary \n-0010da00: 7479 7065 2077 6974 6820 7468 7265 6520 type with three \n-0010da10: 6164 6469 7469 6f6e 616c 206d 656d 6265 additional membe\n-0010da20: 7273 3a3c 2f70 3e0a 3c64 6976 2063 6c61 rs:

    .
    \n-0010da50: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct xsd__\n-0010dab0: 6261 7365 3634 4269 6e61 7279 3c2f 613e base64Binary\n-0010dac0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    unsigned char\n-0010db40: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *__ptr; .
    int <\n-0010dbf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0010dc00: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n-0010dc10: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary.\n-0010dc20: 6874 6d6c 2361 6132 6466 6434 6439 3966 html#aa2dfd4d99f\n-0010dc30: 3832 3830 6334 3133 6239 6666 3235 6136 8280c413b9ff25a6\n-0010dc40: 3961 3837 3239 223e 5f5f 7369 7a65 3c2f 9a8729\">__size;
    .
    \n-0010dc70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0010dc90: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *id;
    .\n-0010dd00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-0010dd30: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *type; \n-0010dda0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .\n-0010de50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .
    cha\n-0010df60: 7220 2a20 6f70 7469 6f6e 733c 2f64 6976 r * options.e\n-0010e2d0: 7874 7261 206d 656d 6265 723a 204d 494d xtra member: MIM\n-0010e2e0: 4520 7479 7065 206f 6620 7468 6520 6461 E type of the da\n-0010e2f0: 7461 3c2f 6469 763e 3c64 6976 2063 6c61 ta
    .
    \n-0010e340: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    When eithe\n-0010ed50: 7220 7468 6520 3c63 6f64 653e 6964 3c2f r the id or t\n-0010ed70: 7970 653c 2f63 6f64 653e 206d 656d 6265 ype membe\n-0010ed80: 7220 7661 6c75 6573 2061 7265 206e 6f6e r values are non\n-0010ed90: 2d4e 554c 4c20 6174 2072 756e 2074 696d -NULL at run tim\n-0010eda0: 652c 2074 6865 2064 6174 6120 7769 6c6c e, the data will\n-0010edb0: 2062 6520 7365 7269 616c 697a 6564 2061 be serialized a\n-0010edc0: 7320 6120 4449 4d45 2061 7474 6163 686d s a DIME attachm\n-0010edd0: 656e 742e 3c2f 703e 0a3c 703e 5468 6520 ent.

    .

    The \n-0010ede0: 534f 4150 2f58 4d4c 206d 6573 7361 6765 SOAP/XML message\n-0010edf0: 2072 6566 6572 7320 746f 2074 6865 2061 refers to the a\n-0010ee00: 7474 6163 686d 656e 7473 2075 7369 6e67 ttachments using\n-0010ee10: 203c 656d 3e3c 636f 6465 3e68 7265 663c href<\n-0010ee20: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n-0010ee30: 6962 7574 6573 2e20 5468 6973 2067 656e ibutes. This gen\n-0010ee40: 6572 616c 6c79 2077 6f72 6b73 2077 696c erally works wil\n-0010ee50: 6c20 7769 7468 2053 4f41 5020 5250 4320 l with SOAP RPC \n-0010ee60: 656e 636f 6465 6420 6d65 7373 6167 696e encoded messagin\n-0010ee70: 672c 2062 6563 6175 7365 203c 656d 3e3c g, because <\n-0010ee80: 636f 6465 3e68 7265 663c 2f63 6f64 653e code>href\n-0010ee90: 3c2f 656d 3e20 6174 7472 6962 7574 6573 attributes\n-0010eea0: 2061 7265 2070 6572 6d69 7474 6564 2e20 are permitted. \n-0010eeb0: 486f 7765 7665 722c 2077 6974 6820 646f However, with do\n-0010eec0: 6375 6d65 6e74 2f6c 6974 6572 616c 2073 cument/literal s\n-0010eed0: 7479 6c65 2074 6865 2072 6566 6572 656e tyle the referen\n-0010eee0: 6369 6e67 206d 6563 6861 6e69 736d 206d cing mechanism m\n-0010eef0: 7573 7420 6265 2065 7870 6c69 6369 746c ust be explicitl\n-0010ef00: 7920 6465 6669 6e65 6420 696e 2074 6865 y defined in the\n-0010ef10: 2073 6368 656d 6120 6f66 2074 6865 2062 schema of the b\n-0010ef20: 696e 6172 7920 7479 7065 2e20 5468 6572 inary type. Ther\n-0010ef30: 6566 6f72 652c 204d 544f 4d20 6973 2074 efore, MTOM is t\n-0010ef40: 6865 2070 7265 6665 7272 6564 2061 7474 he preferred att\n-0010ef50: 6163 686d 656e 7420 6d65 6368 616e 6973 achment mechanis\n-0010ef60: 6d20 666f 7220 646f 6375 6d65 6e74 2f6c m for document/l\n-0010ef70: 6974 6572 616c 2073 7479 6c65 206d 6573 iteral style mes\n-0010ef80: 7361 6769 6e67 2e3c 2f70 3e0a 3c70 3e54 saging.

    .

    T\n-0010ef90: 6865 2064 6563 6c61 7261 7469 6f6e 206f he declaration o\n-0010efa0: 6620 616e 2065 7874 656e 6465 6420 6269 f an extended bi\n-0010efb0: 6e61 7279 2074 7970 6520 696e 2074 6865 nary type in the\n-0010efc0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-0010efd0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n-0010efe0: 7070 3220 6973 3a3c 2f70 3e0a 3c64 6976 pp2 is:

    .
    struct\n-0010f030: 203c 2f73 7061 6e3e 6e73 5f5f 6d79 4269 ns__myBi\n-0010f040: 6e61 7279 4461 7461 5479 7065 203c 2f64 naryDataType .
    {
    .\n-0010f080: 2020 2020 3c73 7061 6e20 636c 6173 733d un\n-0010f0a0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char *__ptr; .
    int __\n-0010f120: 7369 7a65 3b20 3c2f 6469 763e 0a3c 6469 size;
    . \n-0010f140: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-0010f160: 723c 2f73 7061 6e3e 202a 6964 3b20 3c2f r *id; .
    char\n-0010f1b0: 202a 7479 7065 3b20 3c2f 6469 763e 0a3c *type;
    .<\n-0010f1c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0010f1d0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-0010f1f0: 6861 723c 2f73 7061 6e3e 202a 6f70 7469 har *opti\n-0010f200: 6f6e 733b 203c 2f64 6976 3e0a 3c64 6976 ons;
    .};\n-0010f220: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    C++ programmers\n-0010f250: 2063 616e 2075 7365 2069 6e68 6572 6974 can use inherit\n-0010f260: 616e 6365 2069 6e73 7465 6164 206f 6620 ance instead of \n-0010f270: 7465 7874 7561 6c20 6578 7465 6e73 696f textual extensio\n-0010f280: 6e20 7265 7175 6972 6564 2069 6e20 433a n required in C:\n-0010f290: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    class \n-0010f2e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 xsd__base\n-0010f320: 3634 4269 6e61 7279 3c2f 613e 203c 2f64 64Binary ..
    \n-0010f620: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0010f640: 2f73 7061 6e3e 202a 6964 3b20 3c2f 6469 /span> *id; .
    char *\n-0010f690: 7479 7065 3b20 3c2f 6469 763e 0a3c 6469 type;
    . \n-0010f6b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-0010f6d0: 723c 2f73 7061 6e3e 202a 6f70 7469 6f6e r *option\n-0010f6e0: 733b 203c 2f64 6976 3e0a 3c64 6976 2063 s;
    .
    };.

    T\n-0010f720: 6869 7320 6465 6669 6e65 7320 616e 2065 his defines an e\n-0010f730: 7874 656e 7369 6f6e 206f 6620 3c65 6d3e xtension of \n-0010f740: 3c63 6f64 653e 7873 643a 6261 7365 3634 xsd:base64\n-0010f750: 4269 6e61 7279 3c2f 636f 6465 3e3c 2f65 Binary, such that th\n-0010f770: 6520 6461 7461 2063 616e 2062 6520 7365 e data can be se\n-0010f780: 7269 616c 697a 6564 2061 7320 4449 4d45 rialized as DIME\n-0010f790: 2061 7474 6163 686d 656e 7473 2075 7369 attachments usi\n-0010f7a0: 6e67 203c 656d 3e3c 636f 6465 3e68 7265 ng hre\n-0010f7b0: 663c 2f63 6f64 653e 3c2f 656d 3e20 6174 f at\n-0010f7c0: 7472 6962 7574 6573 2066 6f72 2072 6566 tributes for ref\n-0010f7d0: 6572 656e 6369 6e67 2e20 5768 656e 2061 erencing. When a\n-0010f7e0: 2064 6966 6665 7265 6e74 2061 7474 7269 different attri\n-0010f7f0: 6275 7465 2069 7320 746f 2062 6520 7573 bute is to be us\n-0010f800: 6564 2c20 7468 6973 206d 7573 7420 6265 ed, this must be\n-0010f810: 2065 7870 6c69 6369 746c 7920 6465 6669 explicitly defi\n-0010f820: 6e65 643a 3c2f 703e 0a3c 6469 7620 636c ned:

    .
    <\n-0010f840: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0010f850: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap W\n-0010f870: 5372 6566 2073 6368 656d 6120 696d 706f Sref schema impo\n-0010f880: 7274 3a20 6874 7470 3a2f 2f73 6368 656d rt: http://schem\n-0010f890: 6173 2e78 6d6c 736f 6170 2e6f 7267 2f77 as.xmlsoap.org/w\n-0010f8a0: 732f 3230 3032 2f30 342f 7265 6665 7265 s/2002/04/refere\n-0010f8b0: 6e63 652f 203c 2f73 7061 6e3e 3c2f 6469 nce/ .
    struc\n-0010f8f0: 7420 3c2f 7370 616e 3e6e 735f 5f6d 7942 t ns__myB\n-0010f900: 696e 6172 7944 6174 6154 7970 6520 3c2f inaryDataType .
    {
    .<\n-0010f930: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0010f940: 3e20 2020 203c 7370 616e 2063 6c61 7373 > u\n-0010f960: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned <\n-0010f970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0010f980: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *__ptr; .
    int _\n-0010f9e0: 5f73 697a 653b 203c 2f64 6976 3e0a 3c64 _size;
    .\n-0010fa00: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-0010fa20: 6172 3c2f 7370 616e 3e20 2a69 643b 203c ar *id; <\n-0010fa30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *type;
    .\n-0010fa80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-0010fab0: 6368 6172 3c2f 7370 616e 3e20 2a6f 7074 char *opt\n-0010fac0: 696f 6e73 3b20 3c2f 6469 763e 0a3c 6469 ions;
    . \n-0010fae0: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n-0010fb00: 723c 2f73 7061 6e3e 202a 5753 7265 665f r *WSref_\n-0010fb10: 5f6c 6f63 6174 696f 6e3b 203c 2f64 6976 _location; .
    };
    .

    The examp\n-0010fb60: 6c65 2061 626f 7665 2075 7365 7320 7468 le above uses th\n-0010fb70: 6520 3c65 6d3e 3c63 6f64 653e 6c6f 6361 e loca\n-0010fb80: 7469 6f6e 3c2f 636f 6465 3e3c 2f65 6d3e tion\n-0010fb90: 2061 7474 7269 6275 7465 2064 6566 696e attribute defin\n-0010fba0: 6564 2069 6e20 7468 6520 636f 6e74 656e ed in the conten\n-0010fbb0: 7420 7265 6665 7265 6e63 6520 7363 6865 t reference sche\n-0010fbc0: 6d61 2c20 6173 2064 6566 696e 6564 2069 ma, as defined i\n-0010fbd0: 6e20 6f6e 6520 6f66 2074 6865 2076 656e n one of the ven\n-0010fbe0: 646f 7227 7320 7370 6563 6966 6963 2057 dor's specific W\n-0010fbf0: 5344 4c20 6578 7465 6e73 696f 6e73 2066 SDL extensions f\n-0010fc00: 6f72 2044 494d 4520 3c61 2068 7265 663d or DIME htt\n-0010fc60: 703a 2f2f 7777 772e 676f 7464 6f74 6e65 p://www.gotdotne\n-0010fc70: 742e 636f 6d2f 7465 616d 2f78 6d6c 5f77 t.com/team/xml_w\n-0010fc80: 7373 7065 6373 2f64 696d 652f 5753 444c sspecs/dime/WSDL\n-0010fc90: 2d45 7874 656e 7369 6f6e 2d66 6f72 2d44 -Extension-for-D\n-0010fca0: 494d 452e 6874 6d3c 2f61 3e2e 3c2f 703e IME.htm.

    \n-0010fcb0: 0a3c 703e 5768 656e 2072 6563 6569 7669 .

    When receivi\n-0010fcc0: 6e67 2044 494d 4520 6174 7461 6368 6d65 ng DIME attachme\n-0010fcd0: 6e74 732c 2074 6865 2044 494d 4520 6d65 nts, the DIME me\n-0010fce0: 7461 2064 6174 6120 616e 6420 6269 6e61 ta data and bina\n-0010fcf0: 7279 2063 6f6e 7465 6e74 2061 7265 2073 ry content are s\n-0010fd00: 746f 7265 6420 696e 2074 6865 2073 7065 tored in the spe\n-0010fd10: 6369 6669 6564 203c 636f 6465 3e3c 6120 cified xsd__\n-0010fd90: 6261 7365 3634 4269 6e61 7279 3c2f 613e base64Binary\n-0010fda0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and xsd__h\n-0010fe20: 6578 4269 6e61 7279 3c2f 613e 3c2f 636f exBinary binary data \n-0010fe40: 7479 7065 7320 6f6e 6c79 2077 6865 6e20 types only when \n-0010fe50: 7468 6520 584d 4c20 7061 7274 7320 6f66 the XML parts of\n-0010fe60: 2074 6865 206d 6573 7361 6765 2075 7365 the message use\n-0010fe70: 7320 3c65 6d3e 3c63 6f64 653e 6872 6566 s href\n-0010fe80: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 7474 att\n-0010fe90: 7269 6275 7465 7320 746f 2072 6566 6572 ributes to refer\n-0010fea0: 2074 6f20 7468 6573 6520 6174 7461 6368 to these attach\n-0010feb0: 6d65 6e74 732e 2049 6620 736f 2c20 7468 ments. If so, th\n-0010fec0: 6520 6269 6e61 7279 2064 6174 6120 7479 e binary data ty\n-0010fed0: 7065 203c 636f 6465 3e5f 5f70 7472 3c2f pe __ptr and \n-0010fef0: 5f5f 7369 7a65 3c2f 636f 6465 3e20 6d65 __size me\n-0010ff00: 6d62 6572 7320 6172 6520 7365 7420 746f mbers are set to\n-0010ff10: 2074 6865 206c 6f63 6174 696f 6e20 696e the location in\n-0010ff20: 206d 656d 6f72 7920 6f66 2074 6865 2061 memory of the a\n-0010ff30: 7474 6163 686d 656e 7420 6461 7461 2061 ttachment data a\n-0010ff40: 6e64 206c 656e 6774 682c 2072 6573 7065 nd length, respe\n-0010ff50: 6374 6976 656c 792e 3c2f 703e 0a3c 703e ctively.

    .

    \n-0010ff60: 4d65 7373 6167 6573 206d 6179 2063 6f6e Messages may con\n-0010ff70: 7461 696e 2062 696e 6172 7920 6461 7461 tain binary data\n-0010ff80: 2074 6861 7420 7265 6665 7265 6e63 6573 that references\n-0010ff90: 2065 7874 6572 6e61 6c20 7265 736f 7572 external resour\n-0010ffa0: 6365 7320 6e6f 7420 7072 6f76 6964 6564 ces not provided\n-0010ffb0: 2061 7320 6174 7461 6368 6d65 6e74 732e as attachments.\n-0010ffc0: 2049 6e20 7468 6174 2063 6173 652c 2074 In that case, t\n-0010ffd0: 6865 203c 636f 6465 3e5f 5f70 7472 3c2f he __ptr member is \n-0010fff0: 4e55 4c4c 2061 6e64 2074 6865 203c 636f NULL and the id mem\n-00110010: 6265 7220 7265 6665 7273 2074 6f20 7468 ber refers to th\n-00110020: 6520 6578 7465 726e 616c 2064 6174 6120 e external data \n-00110030: 736f 7572 6365 2e3c 2f70 3e0a 3c70 3e54 source.

    .

    T\n-00110040: 6865 203c 636f 6465 3e64 696d 655f 6964 he dime_id\n-00110050: 5f66 6f72 6d61 743c 2f63 6f64 653e 2061 _format a\n-00110060: 7474 7269 6275 7465 206f 6620 7468 6520 ttribute of the \n-00110070: 6375 7272 656e 7420 636f 6e74 6578 7420 current context \n-00110080: 6361 6e20 6265 2073 6574 2074 6f20 7468 can be set to th\n-00110090: 6520 6465 6661 756c 7420 666f 726d 6174 e default format\n-001100a0: 206f 6620 4449 4d45 2069 6420 6d65 6d62 of DIME id memb\n-001100b0: 6572 732e 2054 6865 2066 6f72 6d61 7420 ers. The format \n-001100c0: 7374 7269 6e67 206d 7573 7420 636f 6e74 string must cont\n-001100d0: 6169 6e20 6120 3c63 6f64 653e 643c 2f63 ain a d format spec\n-001100f0: 6966 6965 7220 286f 7220 616e 7920 6f74 ifier (or any ot\n-00110100: 6865 7220 3c63 6f64 653e 696e 743c 2f63 her int-based forma\n-00110120: 7420 7370 6563 6966 6965 7229 2e20 5468 t specifier). Th\n-00110130: 6520 7661 6c75 6520 6f66 2074 6869 7320 e value of this \n-00110140: 7370 6563 6966 6965 7220 6973 2061 206e specifier is a n\n-00110150: 6f6e 2d6e 6567 6174 6976 6520 696e 7465 on-negative inte\n-00110160: 6765 722c 2077 6974 6820 7a65 726f 2062 ger, with zero b\n-00110170: 6569 6e67 2074 6865 2076 616c 7565 206f eing the value o\n-00110180: 6620 7468 6520 4449 4d45 2061 7474 6163 f the DIME attac\n-00110190: 686d 656e 7420 6964 2066 6f72 2074 6865 hment id for the\n-001101a0: 2053 4f41 5020 6d65 7373 6167 652e 2046 SOAP message. F\n-001101b0: 6f72 2065 7861 6d70 6c65 2c3c 2f70 3e0a or example,

    .\n-001101c0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n-00110200: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-00110270: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00110280: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00110290: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001102a0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001102b0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001102c0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001102d0: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
    .
    soap->\n-00110320: 3c61 2063 6c61 7373 3d22 636f 6465 2220 dime_id\n-00110370: 5f66 6f72 6d61 743c 2f61 3e20 3d20 3c73 _format = "\n-001103a0: 6964 2d25 7826 7175 6f74 3b3c 2f73 7061 id-%x";
    .
    soap::dime_i\n-00110460: 645f 666f 726d 6174 3c2f 613e 3c2f 6469 d_format
    const char\n-00110490: 202a 2064 696d 655f 6964 5f66 6f72 6d61 * dime_id_forma\n-001104a0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    User-d\n-001104c0: 6566 696e 6162 6c65 2066 6f72 6d61 7420 efinable format \n-001104d0: 7374 7269 6e67 2074 6f20 6765 6e65 7261 string to genera\n-001104e0: 7465 2044 494d 4520 636f 6e74 656e 7420 te DIME content \n-001104f0: 4944 732e 3c2f 6469 763e 3c64 6976 2063 IDs.
    \n-00110510: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00110520: 7374 6473 6f61 7032 2e68 3a34 3137 323c stdsoap2.h:4172<\n-00110530: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    As a resul\n-00110560: 742c 2061 6c6c 2061 7474 6163 686d 656e t, all attachmen\n-00110570: 7473 2077 6974 6820 6120 4e55 4c4c 203c ts with a NULL <\n-00110580: 636f 6465 3e69 643c 2f63 6f64 653e 206d code>id m\n-00110590: 656d 6265 7220 7769 6c6c 2075 7365 2061 ember will use a\n-001105a0: 2061 7574 6f2d 6765 6e65 7261 7465 6420 auto-generated \n-001105b0: 6964 2076 616c 7565 2062 6173 6564 206f id value based o\n-001105c0: 6e20 7468 6520 666f 726d 6174 2073 7472 n the format str\n-001105d0: 696e 672e 3c2f 703e 0a3c 646c 2063 6c61 ing.

    .
    Warning\n-00110600: 3c2f 6474 3e3c 6464 3e43 6172 6520 6d75
    Care mu\n-00110610: 7374 2062 6520 7461 6b65 6e20 6e6f 7420 st be taken not \n-00110620: 746f 2069 6e74 726f 6475 6365 2064 7570 to introduce dup\n-00110630: 6c69 6361 7465 2063 6f6e 7465 6e74 2069 licate content i\n-00110640: 6420 7661 6c75 6573 2c20 7768 656e 2061 d values, when a\n-00110650: 7373 6967 6e69 6e67 2063 6f6e 7465 6e74 ssigning content\n-00110660: 2069 6420 7661 6c75 6573 2074 6f20 7468 id values to th\n-00110670: 6520 6964 206d 656d 6265 7273 206f 6620 e id members of \n-00110680: 4449 4d45 2065 7874 656e 6465 6420 6269 DIME extended bi\n-00110690: 6e61 7279 2064 6174 6120 7479 7065 732e nary data types.\n-001106a0: 2043 6f6e 7465 6e74 2069 6473 206d 7573 Content ids mus\n-001106b0: 7420 6265 2075 6e69 7175 652e 3c2f 6464 t be unique.
    .

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

    ..Strea\n-00110730: 6d69 6e67 2044 494d 453c 2f68 323e 0a3c ming DIME.<\n-00110740: 703e 5374 7265 616d 696e 6720 4449 4d45 p>Streaming DIME\n-00110750: 2069 7320 6163 6869 6576 6564 2077 6974 is achieved wit\n-00110760: 6820 6361 6c6c 6261 636b 2066 756e 6374 h callback funct\n-00110770: 696f 6e73 2074 6f20 6665 7463 6820 616e ions to fetch an\n-00110780: 6420 7374 6f72 6520 6461 7461 2064 7572 d store data dur\n-00110790: 696e 6720 7472 616e 736d 6973 7369 6f6e ing transmission\n-001107a0: 2e20 5468 7265 6520 6675 6e63 7469 6f6e . Three function\n-001107b0: 2063 616c 6c62 6163 6b73 2066 6f72 2073 callbacks for s\n-001107c0: 7472 6561 6d69 6e67 2044 494d 4520 6f75 treaming DIME ou\n-001107d0: 7470 7574 2061 6e64 2074 6872 6565 2063 tput and three c\n-001107e0: 616c 6c62 6163 6b73 2066 6f72 2073 7472 allbacks for str\n-001107f0: 6561 6d69 6e67 2044 494d 4520 696e 7075 eaming DIME inpu\n-00110800: 7420 6172 6520 6176 6169 6c61 626c 652e t are available.\n-00110810: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 3c63

    .
    .

    I\n-00112f70: 6e20 6164 6469 7469 6f6e 2c20 6120 3c63 n addition, a void* soap::user\n-00113050: 3c2f 636f 6465 3e20 6d65 6d62 6572 2069 member i\n-00113060: 7320 6176 6169 6c61 626c 6520 746f 2070 s available to p\n-00113070: 6173 7320 7573 6572 2d64 6566 696e 6564 ass user-defined\n-00113080: 2064 6174 6120 746f 2074 6865 2063 616c data to the cal\n-00113090: 6c62 6163 6b73 2e20 5468 6973 2077 6179 lbacks. This way\n-001130a0: 2c20 796f 7520 6361 6e20 7365 7420 3c63 , you can set void* soap::user\n-00113180: 3c2f 636f 6465 3e20 746f 2070 6f69 6e74 to point\n-00113190: 2074 6f20 6170 706c 6963 6174 696f 6e20 to application \n-001131a0: 6461 7461 2074 6861 7420 7468 6520 6361 data that the ca\n-001131b0: 6c6c 6261 636b 7320 6e65 6564 2073 7563 llbacks need suc\n-001131c0: 6820 6173 2061 2066 696c 6520 6e61 6d65 h as a file name\n-001131d0: 2066 6f72 2065 7861 6d70 6c65 2e3c 2f70 for example..

    The followi\n-001131f0: 6e67 2065 7861 6d70 6c65 2069 6c6c 7573 ng example illus\n-00113200: 7472 6174 6573 2074 6865 2063 6c69 656e trates the clien\n-00113210: 742d 7369 6465 2069 6e69 7469 616c 697a t-side initializ\n-00113220: 6174 696f 6e20 6f66 2061 6e20 696d 6167 ation of an imag\n-00113230: 6520 6174 7461 6368 6d65 6e74 2073 7472 e attachment str\n-00113240: 7563 7420 746f 2073 7472 6561 6d20 6120 uct to stream a \n-00113250: 6669 6c65 2069 6e74 6f20 6120 4449 4d45 file into a DIME\n-00113260: 2061 7474 6163 686d 656e 743a 3c2f 703e attachment:

    \n-00113270: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ma\n-001132c0: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n-001132e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00113310: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n-00113380: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001133b0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct xsd__base64\n-00113400: 4269 6e61 7279 3c2f 613e 2069 6d61 6765 Binary image\n-00113410: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    FIL\n-00113430: 4520 2a66 643b 203c 2f64 6976 3e0a 3c64 E *fd;
    .\n-00113450: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-00113470: 2f73 7061 6e3e 7374 6174 2073 623b 203c /span>stat sb; <\n-00113480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-001134f0: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n-00113500: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    <\n-00113550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00113560: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!fstat(filen\n-00113580: 6f28 6664 292c 2026 616d 703b 7362 2920 o(fd), &sb) \n-00113590: 2661 6d70 3b26 616d 703b 2073 622e 7374 && sb.st\n-001135a0: 5f73 697a 6520 2667 743b 2030 2920 3c2f _size > 0) .
    {
    \n-001135d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n-00113600: 6265 6361 7573 6520 7765 2063 616e 2067 because we can g\n-00113610: 6574 2074 6865 206c 656e 6774 6820 6f66 et the length of\n-00113620: 2074 6865 2066 696c 652c 2077 6520 6361 the file, we ca\n-00113630: 6e20 7374 7265 616d 2069 7420 3c2f 7370 n stream it
    .
    .
    \n-001138b0: 2069 6d61 6765 2e5f 5f70 7472 203d 2028 image.__ptr = (\n-001138c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n-001138e0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char*\n-00113910: 2966 643b 203c 7370 616e 2063 6c61 7373 )fd; // mu\n-00113930: 7374 2073 6574 2074 6f20 6e6f 6e2d 4e55 st set to non-NU\n-00113940: 4c4c 2028 7468 6973 2069 7320 6f75 7220 LL (this is our \n-00113950: 6664 2068 616e 646c 6520 7768 6963 6820 fd handle which \n-00113960: 7765 206e 6565 6420 696e 2074 6865 2063 we need in the c\n-00113970: 616c 6c62 6163 6b73 2920 3c2f 7370 616e allbacks)
    .
    im\n-001139a0: 6167 652e 5f5f 7369 7a65 203d 2073 622e age.__size = sb.\n-001139b0: 7374 5f73 697a 653b 203c 7370 616e 2063 st_size; /\n-001139d0: 2f20 6d75 7374 2073 6574 2073 697a 6520 / must set size \n-001139e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00113a00: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n-00113a20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00113a30: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n-00113a60: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    // don't\n-00113aa0: 206b 6e6f 7720 7468 6520 7369 7a65 2c20 know the size, \n-00113ab0: 736f 2062 7566 6665 7220 6974 203c 2f73 so buffer it
    .
    \n-00113ae0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n-00113b00: 743c 2f73 7061 6e3e 2069 3b20 3c2f 6469 t i; .
    int c;\n-00113b50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    im\n-00113b70: 6167 652e 5f5f 7074 7220 3d20 283c 7370 age.__ptr = (unsigned<\n-00113ba0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char*)soap_malloc(&s\n-00113c60: 6f61 703c 2f61 3e2c 204d 4158 5f46 494c oap, MAX_FIL\n-00113c70: 455f 5349 5a45 293b 203c 2f64 6976 3e0a E_SIZE);
    .\n-00113c80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00113cb0: 666f 723c 2f73 7061 6e3e 2028 6920 3d20 for (i = \n-00113cc0: 303b 2069 2026 6c74 3b20 4d41 585f 4649 0; i < MAX_FI\n-00113cd0: 4c45 5f53 495a 453b 2069 2b2b 2920 3c2f LE_SIZE; i++) .
    {.
    if (\n-00113d40: 2863 203d 2066 6765 7463 2866 6429 2920 (c = fgetc(fd)) \n-00113d50: 3d3d 2045 4f46 2920 3c2f 6469 763e 0a3c == EOF)
    .<\n-00113d60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00113d70: 3e20 2020 2020 2020 203c 7370 616e 2063 > break;\n-00113da0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-00113dc0: 696d 6167 652e 5f5f 7074 725b 695d 203d image.__ptr[i] =\n-00113dd0: 2063 3b20 3c2f 6469 763e 0a3c 6469 7620 c;
    .
    \n-00113df0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n-00113e10: 6663 6c6f 7365 2866 6429 3b20 3c2f 6469 fclose(fd); .
    image._\n-00113e40: 5f73 697a 6520 3d20 693b 203c 2f64 6976 _size = i; .
    }
    .<\n-00113e70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00113e80: 3e20 2069 6d61 6765 2e74 7970 6520 3d20 > image.type = \n-00113e90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00113eb0: 743b 696d 6167 652f 6a70 6567 2671 756f t;image/jpeg&quo\n-00113ec0: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; ... \n-00114080: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-001140a0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    \n-001140e0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... // success
    .
    } .
    .<\n-00114170: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114180: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-001141a0: 2f73 7061 6e3e 202a 6469 6d65 5f72 6561 /span> *dime_rea\n-001141b0: 645f 6f70 656e 283c 7370 616e 2063 6c61 d_open(str\n-001141d0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle, const <\n-00114290: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001142a0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *\n-001142d0: 6964 3c2f 7370 616e 3e2c 203c 7370 616e id, const char *type, const char *options) .
    {
    .<\n-001143a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001143b0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-001143d0: 7572 6e3c 2f73 7061 6e3e 2068 616e 646c urn handl\n-001143e0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    } .
    .<\n-00114420: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114430: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00114450: 2f73 7061 6e3e 2064 696d 655f 7265 6164 /span> dime_read\n-00114460: 5f63 6c6f 7365 283c 7370 616e 2063 6c61 _close(str\n-00114480: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle) .
    {
    . \n-00114550: 2066 636c 6f73 6528 2846 494c 452a 2968 fclose((FILE*)h\n-00114560: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n-00114570: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114580: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    \n-001145d0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6469 size_t di\n-001145e0: 6d65 5f72 6561 6428 3c73 7061 6e20 636c me_read(st\n-00114600: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, void *handle, char *buf, size_t\n-001146f0: 206c 656e 2920 3c2f 6469 763e 0a3c 6469 len)
    .{\n-00114710: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return fread(buf, 1,\n-00114760: 206c 656e 2c20 2846 494c 452a 2968 616e len, (FILE*)han\n-00114770: 646c 6529 3b20 3c2f 6469 763e 0a3c 6469 dle);
    .}\n-00114790: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    voi\n-00114880: 6420 2a28 2a20 6664 696d 6572 6561 646f d *(* fdimereado\n-00114890: 7065 6e29 2873 7472 7563 7420 736f 6170 pen)(struct soap\n-001148a0: 202a 736f 6170 2c20 766f 6964 202a 6861 *soap, void *ha\n-001148b0: 6e64 6c65 2c20 636f 6e73 7420 6368 6172 ndle, const char\n-001148c0: 202a 6964 2c20 636f 6e73 7420 6368 6172 *id, const char\n-001148d0: 202a 7479 7065 2c20 636f 6e73 7420 6368 *type, const ch\n-001148e0: 6172 202a 6f70 7469 6f6e 7329 3c2f 6469 ar *options)
    .\n-00114c20: 7369 7a65 5f74 282a 2066 6469 6d65 7265 size_t(* fdimere\n-00114c30: 6164 2928 7374 7275 6374 2073 6f61 7020 ad)(struct soap \n-00114c40: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han\n-00114c50: 646c 652c 2063 6861 7220 2a62 7566 2c20 dle, char *buf, \n-00114c60: 7369 7a65 5f74 206c 656e 293c 2f64 6976 size_t len)
    Callback to \n-00114c90: 7265 6164 2064 6174 6120 696e 2061 2044 read data in a D\n-00114ca0: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n-00114cb0: 7472 6561 6d2e 3c2f 6469 763e 3c64 6976 tream.
    <\n-00114cd0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:472\n-00114cf0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .
    s\n-00114db0: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 3c2f oap_malloc
    void * s\n-00114de0: 6f61 705f 6d61 6c6c 6f63 2873 7472 7563 oap_malloc(struc\n-00114df0: 7420 736f 6170 202a 736f 6170 2c20 7369 t soap *soap, si\n-00114e00: 7a65 5f74 206c 656e 293c 2f64 6976 3e3c ze_t len)
    <\n-00114e10: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00114e20: 223e 416c 6c6f 6361 7465 2061 2062 6c6f \">Allocate a blo\n-00114e30: 636b 206f 6620 6865 6170 206d 656d 6f72 ck of heap memor\n-00114e40: 7920 6d61 6e61 6765 6420 6279 2074 6865 y managed by the\n-00114e50: 2073 7065 6369 6669 6564 2073 6f61 7020 specified soap \n-00114e60: 636f 6e74 6578 742e 3c2f 6469 763e 3c2f context.
    .

    T\n-00114e90: 6865 2066 6f6c 6c6f 7769 6e67 2065 7861 he following exa\n-00114ea0: 6d70 6c65 2069 6c6c 7573 7472 6174 6573 mple illustrates\n-00114eb0: 2074 6865 2073 7472 6561 6d69 6e67 206f the streaming o\n-00114ec0: 6620 6120 4449 4d45 2061 7474 6163 686d f a DIME attachm\n-00114ed0: 656e 7420 696e 746f 2061 2066 696c 6520 ent into a file \n-00114ee0: 6279 2061 2063 6c69 656e 743a 3c2f 703e by a client:

    \n-00114ef0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ma\n-00114f40: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n-00114f60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00114f90: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n-00115000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-00115070: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n-00115080: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    <\n-001150d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001150e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001150f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-00115100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115110: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00115120: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-00115130: 6c23 6761 3362 3165 3461 6130 3436 6236 l#ga3b1e4aa046b6\n-00115140: 3833 3533 3531 3130 6133 3466 6334 3661 83535110a34fc46a\n-00115150: 6231 6562 223e 6664 696d 6577 7269 7465 b1eb\">fdimewrite\n-00115160: 6f70 656e 3c2f 613e 203d 2064 696d 655f open = dime_\n-00115170: 7772 6974 655f 6f70 656e 3b20 3c2f 6469 write_open; .. \n-00115260: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00115290: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fdimewri\n-001152f0: 7465 3c2f 613e 203d 2064 696d 655f 7772 te = dime_wr\n-00115300: 6974 653b 203c 2f64 6976 3e0a 3c64 6976 ite;
    . \n-00115320: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-00115350: 735f 5f77 6562 6d65 7468 6f64 2826 616d s__webmethod(&am\n-00115360: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, ...))
    .<\n-001153a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001153b0: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n-001153d0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else.
    ... <\n-00115440: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00115450: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n-00115460: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-00115480: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    vo\n-001154d0: 6964 3c2f 7370 616e 3e20 2a64 696d 655f id *dime_\n-001154e0: 7772 6974 655f 6f70 656e 283c 7370 616e write_open(struct <\n-00115510: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115520: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115530: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-00115540: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00115570: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-001155b0: 6172 3c2f 7370 616e 3e20 2a3c 7370 616e ar *id, \n-001155e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00115620: 723c 2f73 7061 6e3e 202a 7479 7065 2c20 r *type, \n-00115630: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00115670: 723c 2f73 7061 6e3e 202a 6f70 7469 6f6e r *option\n-00115680: 7329 203c 2f64 6976 3e0a 3c64 6976 2063 s)
    .
    {.
    FILE *ha\n-001156c0: 6e64 6c65 203d 203c 6120 636c 6173 733d ndle = fo\n-00115720: 7065 6e3c 2f61 3e28 3c73 7061 6e20 636c pen("somefi\n-00115750: 6c65 2671 756f 743b 3c2f 7370 616e 3e2c le",\n-00115760: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00115780: 6f74 3b77 6226 7175 6f74 3b3c 2f73 7061 ot;wb");
    . \n-001157b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!handle) .
    {
    \n-00115800: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n-00115840: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error = \n-001158a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOF\n-00115900: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-00115920: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115930: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115940: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00115950: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;errn\n-001159a0: 756d 3c2f 613e 203d 2065 7272 6e6f 3b20 um = errno; \n-001159b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get rea\n-001159d0: 736f 6e20 3c2f 7370 616e 3e3c 2f64 6976 son .
    }
    .<\n-00115a00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00115a10: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-00115a30: 7572 6e3c 2f73 7061 6e3e 2028 3c73 7061 urn (void*)handle; .
    }
    . \n-00115aa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void d\n-00115ae0: 696d 655f 7772 6974 655f 636c 6f73 6528 ime_write_close(\n-00115af0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00115b40: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-00115b70: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n-00115b90: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han\n-00115ba0: 646c 6529 203c 2f64 6976 3e0a 3c64 6976 dle)
    .{<\n-00115bc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fclose((FIL\n-00115c40: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    }
    .\n-00115c80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int d\n-00115cc0: 696d 655f 7772 6974 6528 3c73 7061 6e20 ime_write(\n-00115ce0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-00115d20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115d30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115d40: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00115d50: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle, <\n-00115d80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00115d90: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00115dc0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *buf, size_t len)
    .<\n-00115e50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00115e60: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    size_t nwritten; <\n-00115eb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    while\n-00115ef0: 2028 6c65 6e29 203c 2f64 6976 3e0a 3c64 (len)
    .\n-00115f10: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-00115f30: 6e77 7269 7474 656e 203d 2066 7772 6974 nwritten = fwrit\n-00115f40: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(buf, 1, len, (FIL\n-00115fa0: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    if (!n\n-00115ff0: 7772 6974 7465 6e29 203c 2f64 6976 3e0a written)
    .\n-00116000: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n-00116030: 2020 2020 2020 3c61 2063 6c61 7373 3d22
    soa\n-00116060: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->errnum = \n-001160c0: 6572 726e 6f3b 203c 7370 616e 2063 6c61 errno; // \n-001160e0: 6765 7420 7265 6173 6f6e 203c 2f73 7061 get reason
    .
    \n-00116110: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00116130: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-00116190: 505f 454f 463c 2f61 3e3b 203c 2f64 6976 P_EOF; .
    }
    \n-001161c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    len -= nw\n-001161e0: 7269 7474 656e 3b20 3c2f 6469 763e 0a3c ritten;
    .<\n-001161f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00116200: 3e20 2020 203c 6120 636c 6173 733d 2263 > bu\n-00116250: 663c 2f61 3e20 2b3d 206e 7772 6974 7465 f += nwritte\n-00116260: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    } \n-00116280: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_OK;
    .
    }.
    \n-001163b0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n-00116400: 6664 696d 6577 7269 7465 3c2f 613e 3c2f fdimewrite
    int(* fd\n-00116430: 696d 6577 7269 7465 2928 7374 7275 6374 imewrite)(struct\n-00116440: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n-00116450: 6420 2a2c 2063 6f6e 7374 2063 6861 7220 d *, const char \n-00116460: 2a2c 2073 697a 655f 7429 3c2f 6469 763e *, size_t)
    \n-00116470: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback to w\n-00116490: 7269 7465 2064 6174 6120 696e 2061 2044 rite data in a D\n-001164a0: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n-001164b0: 7472 6561 6d2e 3c2f 6469 763e 3c64 6976 tream.
    <\n-001164d0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:482\n-001164f0: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .
    soap::fdimewr\n-001165c0: 6974 6563 6c6f 7365 3c2f 613e 3c2f 6469 iteclose
    void(* fdi\n-001165f0: 6d65 7772 6974 6563 6c6f 7365 2928 7374 mewriteclose)(st\n-00116600: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-00116610: 2076 6f69 6420 2a68 616e 646c 6529 3c2f void *handle)
    Callback \n-00116640: 746f 2063 6c6f 7365 2061 2044 494d 4520 to close a DIME \n-00116650: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n-00116660: 6d20 6166 7465 7220 7772 6974 696e 672e m after writing.\n-00116670: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-00116690: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-001166a0: 6f61 7032 2e68 3a34 3833 333c 2f64 6976 oap2.h:4833
    .
    <\n-00116710: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00116720: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n-00116770: 703a 3a66 6469 6d65 7772 6974 656f 7065 p::fdimewriteope\n-00116780: 6e3c 2f61 3e3c 2f64 6976 3e3c 6469 7620 n
    v\n-001167a0: 6f69 6420 2a28 2a20 6664 696d 6577 7269 oid *(* fdimewri\n-001167b0: 7465 6f70 656e 2928 7374 7275 6374 2073 teopen)(struct s\n-001167c0: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n-001167d0: 2063 6861 7220 2a69 642c 2063 6f6e 7374 char *id, const\n-001167e0: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con\n-001167f0: 7374 2063 6861 7220 2a6f 7074 696f 6e73 st char *options\n-00116800: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n-00116820: 636b 2074 6f20 6f70 656e 2061 2073 7472 ck to open a str\n-00116830: 6561 6d69 6e67 2044 494d 4520 6174 7461 eaming DIME atta\n-00116840: 6368 6d65 6e74 2066 6f72 2077 7269 7469 chment for writi\n-00116850: 6e67 2e3c 2f64 6976 3e3c 6469 7620 636c ng.
    D\n-00116870: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-00116880: 7464 736f 6170 322e 683a 3438 3130 3c2f tdsoap2.h:4810
    .
    \n-00116950: 736f 6170 3a3a 666f 7065 6e3c 2f61 3e3c soap::fopen<\n-00116960: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    SOAP_SO\n-00116980: 434b 4554 282a 2066 6f70 656e 2928 7374 CKET(* fopen)(st\n-00116990: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-001169a0: 2063 6f6e 7374 2063 6861 7220 2a65 6e64 const char *end\n-001169b0: 706f 696e 742c 2063 6f6e 7374 2063 6861 point, const cha\n-001169c0: 7220 2a68 6f73 742c 2069 6e74 2070 6f72 r *host, int por\n-001169d0: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    Callb\n-001169f0: 6163 6b20 7468 6174 206f 7065 6e73 2061 ack that opens a\n-00116a00: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti\n-00116a10: 6f6e 2074 6f20 6120 7365 7276 6572 2065 on to a server e\n-00116a20: 6e64 706f 696e 742e 3c2f 6469 763e 3c64 ndpoint.
    Definition:<\n-00116a50: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n-00116a60: 3439 353c 2f64 6976 3e3c 2f64 6976 3e0a 495
    .\n-00116a70: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    i\n-00116b50: 6e74 282a 2066 636c 6f73 6529 2873 7472 nt(* fclose)(str\n-00116b60: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-00116b70: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n-00116b90: 2074 6861 7420 636c 6f73 6573 2074 6865 that closes the\n-00116ba0: 2063 7572 7265 6e74 2073 6f63 6b65 7420 current socket \n-00116bb0: 636f 6e6e 6563 7469 6f6e 2e3c 2f64 6976 connection.
    Definitio\n-00116be0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-00116bf0: 683a 3435 3230 3c2f 6469 763e 3c2f 6469 h:4520
    .
    SOAP_EOF
    #define \n-00116ce0: 534f 4150 5f45 4f46 3c2f 6469 763e 3c64 SOAP_EOF
    A soap_status e\n-00116d10: 7272 6f72 2063 6f64 653a 2075 6e65 7870 rror code: unexp\n-00116d20: 6563 7465 6420 656e 6420 6f66 2066 696c ected end of fil\n-00116d30: 652c 206e 6f20 696e 7075 742c 2074 7261 e, no input, tra\n-00116d40: 6e73 6d69 7373 696f 6e20 696e 7465 7272 nsmission interr\n-00116d50: 7570 7465 6420 6f72 2074 696d 6564 206f upted or timed o\n-00116d60: 7574 2028 7361 2e2e 2e3c 2f64 6976 3e3c ut (sa...
    <\n-00116d70: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-00116d80: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-00116d90: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-00116da0: 3233 3635 3c2f 6469 763e 3c2f 6469 763e 2365
    \n-00116db0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Messa\n-00116dd0: 6765 2063 6f6d 7072 6573 7369 6f6e 2077 ge compression w\n-00116de0: 6974 6820 3c63 6f64 653e 2353 4f41 505f ith #SOAP_\n-00116df0: 454e 435f 5a4c 4942 3c2f 636f 6465 3e20 ENC_ZLIB \n-00116e00: 6361 6e20 6265 2075 7365 6420 7769 7468 can be used with\n-00116e10: 2044 494d 4520 746f 2063 6f6d 7072 6573 DIME to compres\n-00116e20: 7320 7468 6520 656e 7469 7265 206d 6573 s the entire mes\n-00116e30: 7361 6765 2e20 486f 7765 7665 722c 2063 sage. However, c\n-00116e40: 6f6d 7072 6573 7369 6f6e 2072 6571 7569 ompression requi\n-00116e50: 7265 7320 6275 6666 6572 696e 6720 746f res buffering to\n-00116e60: 2064 6574 6572 6d69 6e65 2074 6865 2048 determine the H\n-00116e70: 5454 5020 636f 6e74 656e 7420 6c65 6e67 TTP content leng\n-00116e80: 7468 2068 6561 6465 722c 2077 6869 6368 th header, which\n-00116e90: 2063 616e 6365 6c73 2074 6865 2062 656e cancels the ben\n-00116ea0: 6566 6974 7320 6f66 2073 7472 6561 6d69 efits of streami\n-00116eb0: 6e67 2044 494d 452e 2054 6f20 6176 6f69 ng DIME. To avoi\n-00116ec0: 6420 7468 6973 2c20 796f 7520 7368 6f75 d this, you shou\n-00116ed0: 6c64 2075 7365 2063 6875 6e6b 6564 2048 ld use chunked H\n-00116ee0: 5454 5020 2877 6974 6820 7468 6520 6f75 TTP (with the ou\n-00116ef0: 7470 7574 2d6d 6f64 6520 3c63 6f64 653e tput-mode \n-00116f00: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK flag) with\n-00116f20: 2063 6f6d 7072 6573 7369 6f6e 2061 6e64 compression and\n-00116f30: 2073 7472 6561 6d69 6e67 2044 494d 452e streaming DIME.\n-00116f40: 2041 7420 7468 6520 7365 7276 6572 2073 At the server s\n-00116f50: 6964 652c 2077 6865 6e20 796f 7520 7365 ide, when you se\n-00116f60: 7420 3c63 6f64 653e 2353 4f41 505f 494f t #SOAP_IO\n-00116f70: 5f43 4855 4e4b 3c2f 636f 6465 3e20 6265 _CHUNK be\n-00116f80: 666f 7265 2063 616c 6c69 6e67 203c 636f fore calling soap_serve\n-00117010: 3c2f 636f 6465 3e2c 2074 6865 2065 6e67 , the eng\n-00117020: 696e 6520 7769 6c6c 2061 7574 6f6d 6174 ine will automat\n-00117030: 6963 616c 6c79 2072 6576 6572 7420 746f ically revert to\n-00117040: 2062 7566 6665 7269 6e67 2028 3c63 6f64 buffering (#SOAP_IO_STORE\n-00117060: 3c2f 636f 6465 3e20 666c 6167 2069 7320 flag is \n-00117070: 7365 7429 2e20 596f 7520 6361 6e20 6368 set). You can ch\n-00117080: 6563 6b20 7468 6973 2066 6c61 6720 7769 eck this flag wi\n-00117090: 7468 203c 636f 6465 3e28 736f 6170 2d26 th (soap-&\n-001170a0: 6774 3b6f 6d6f 6465 2026 616d 703b 2053 gt;omode & S\n-001170b0: 4f41 505f 494f 2920 3d3d 2053 4f41 505f OAP_IO) == SOAP_\n-001170c0: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e20 IO_CHUNK \n-001170d0: 746f 2073 6565 2069 6620 7468 6520 636c to see if the cl\n-001170e0: 6965 6e74 2061 6363 6570 7473 2063 6875 ient accepts chu\n-001170f0: 6e6b 696e 672e 204d 6f72 6520 696e 666f nking. More info\n-00117100: 726d 6174 696f 6e20 6162 6f75 7420 7374 rmation about st\n-00117110: 7265 616d 696e 6720 6368 756e 6b65 6420 reaming chunked \n-00117120: 4449 4d45 2063 616e 2062 6520 666f 756e DIME can be foun\n-00117130: 6420 696e 2053 6563 7469 6f6e 203c 6120 d in Section Stream\n-00117170: 696e 6720 6368 756e 6b65 6420 4449 4d45 ing chunked DIME\n-00117180: 3c2f 613e 202e 3c2f 703e 0a3c 646c 2063 .

    .
    Warni\n-001171b0: 6e67 3c2f 6474 3e3c 6464 3e54 6865 203c ng
    The <\n-001171c0: 636f 6465 3e6f 7074 696f 6e73 3c2f 636f code>options member is a \n-001171e0: 4449 4d45 2d73 7065 6369 6669 6320 6461 DIME-specific da\n-001171f0: 7461 2073 7472 7563 7475 7265 2c20 636f ta structure, co\n-00117200: 6e73 6973 7469 6e67 206f 6620 6120 3420 nsisting of a 4 \n-00117210: 6279 7465 2068 6561 6465 7220 636f 6e74 byte header cont\n-00117220: 6169 6e69 6e67 2074 6865 206f 7074 696f aining the optio\n-00117230: 6e20 7479 7065 2069 6e66 6f20 2868 6920 n type info (hi \n-00117240: 6279 7465 2c20 6c6f 2062 7974 6529 2c20 byte, lo byte), \n-00117250: 6f70 7469 6f6e 2073 7472 696e 6720 6c65 option string le\n-00117260: 6e67 7468 2028 6869 2062 7974 652c 206c ngth (hi byte, l\n-00117270: 6f20 6279 7465 292c 2066 6f6c 6c6f 7765 o byte), followe\n-00117280: 6420 6279 2061 206e 6f6e 2d27 5c30 2720 d by a non-'\\0' \n-00117290: 7465 726d 696e 6174 6564 2073 7472 696e terminated strin\n-001172a0: 672e 2054 6865 2044 494d 4520 6861 6e64 g. The DIME hand\n-001172b0: 6c65 7220 7265 636f 676e 697a 6573 206f ler recognizes o\n-001172c0: 6e65 206f 7074 696f 6e20 6174 206d 6f73 ne option at mos\n-001172d0: 742e 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e t.
    .

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

    .\n-00117340: 5374 7265 616d 696e 6720 6368 756e 6b65 Streaming chunke\n-00117350: 6420 4449 4d45 3c2f 6832 3e0a 3c70 3e54 d DIME

    .

    T\n-00117360: 6f20 7365 6e64 2044 494d 4520 6174 7461 o send DIME atta\n-00117370: 6368 6d65 6e74 732c 2074 6865 2061 7474 chments, the att\n-00117380: 6163 686d 656e 7420 7369 7a65 7320 6d75 achment sizes mu\n-00117390: 7374 2062 6520 6465 7465 726d 696e 6564 st be determined\n-001173a0: 2069 6e20 6164 7661 6e63 6520 746f 2063 in advance to c\n-001173b0: 616c 6375 6c61 7465 2048 5454 5020 6d65 alculate HTTP me\n-001173c0: 7373 6167 6520 6c65 6e67 7468 2072 6571 ssage length req\n-001173d0: 7569 7265 6420 746f 2073 7472 6561 6d20 uired to stream \n-001173e0: 4449 4d45 206f 7665 7220 4854 5450 2e20 DIME over HTTP. \n-001173f0: 486f 7765 7665 722c 2063 6875 6e6b 6564 However, chunked\n-00117400: 2044 494d 4520 746f 6765 7468 6572 2077 DIME together w\n-00117410: 6974 6820 6368 756e 6b65 6420 4854 5450 ith chunked HTTP\n-00117420: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n-00117430: 6f6d 6974 2074 6869 7320 7374 6570 2e20 omit this step. \n-00117440: 4669 7273 7420 7365 7420 7468 6520 3c63 First set the #SOAP_IO_CHU\n-00117460: 4e4b 3c2f 636f 6465 3e20 666c 6167 2e20 NK flag. \n-00117470: 5468 656e 2c20 746f 2073 7472 6561 6d20 Then, to stream \n-00117480: 6368 756e 6b65 6420 4449 4d45 2c20 7365 chunked DIME, se\n-00117490: 7420 7468 6520 3c63 6f64 653e 5f5f 7369 t the __si\n-001174a0: 7a65 3c2f 636f 6465 3e20 6d65 6d62 6572 ze member\n-001174b0: 206f 6620 616e 2061 7474 6163 686d 656e of an attachmen\n-001174c0: 7420 746f 207a 6572 6f20 616e 6420 656e t to zero and en\n-001174d0: 6162 6c65 2044 494d 4520 6368 756e 6b69 able DIME chunki\n-001174e0: 6e67 2e20 5468 6520 4449 4d45 203c 636f ng. The DIME soap::fdimere\n-00117590: 6164 3c2f 613e 3c2f 636f 6465 3e20 6361 ad ca\n-001175a0: 6c6c 6261 636b 2074 6865 6e20 6665 7463 llback then fetc\n-001175b0: 6865 7320 6461 7461 2069 6e20 6368 756e hes data in chun\n-001175c0: 6b73 2061 6e64 2069 7420 6973 2069 6d70 ks and it is imp\n-001175d0: 6f72 7461 6e74 2074 6f20 6669 6c6c 2074 ortant to fill t\n-001175e0: 6865 2065 6e74 6972 6520 6275 6666 6572 he entire buffer\n-001175f0: 2075 6e6c 6573 7320 7468 6520 656e 6420 unless the end \n-00117600: 6f66 2074 6865 2064 6174 6120 6861 7320 of the data has \n-00117610: 6265 656e 2072 6561 6368 6564 2061 6e64 been reached and\n-00117620: 2074 6865 206c 6173 7420 6368 756e 6b20 the last chunk \n-00117630: 6973 2074 6f20 6265 2073 656e 642e 2054 is to be send. T\n-00117640: 6861 7420 6973 2c20 3c63 6f64 653e 3c61 hat is, so\n-001176e0: 6170 3a3a 6664 696d 6572 6561 643c 2f61 ap::fdimeread should \n-00117700: 7265 7475 726e 2074 6865 2076 616c 7565 return the value\n-00117710: 206f 6620 7468 6520 6c61 7374 203c 636f of the last len pa\n-00117730: 7261 6d65 7465 7220 616e 6420 6669 6c6c rameter and fill\n-00117740: 2074 6865 2065 6e74 6972 6520 6275 6666 the entire buff\n-00117750: 6572 203c 636f 6465 3e62 7566 3c2f 636f er buf for all chun\n-00117770: 6b73 2065 7863 6570 7420 7468 6520 6c61 ks except the la\n-00117780: 7374 2e20 466f 7220 7468 6520 6c61 7374 st. For the last\n-00117790: 2069 7420 7265 7475 726e 7320 302e 3c2f it returns 0..

    You can al\n-001177b0: 736f 2075 7365 2074 6865 203c 636f 6465 so use the #SOAP_IO_STORE<\n-001177d0: 2f63 6f64 653e 2066 6c61 672c 2062 7574 /code> flag, but\n-001177e0: 2074 6861 7420 6361 6e63 656c 7320 7468 that cancels th\n-001177f0: 6520 6265 6e65 6669 7473 206f 6620 7374 e benefits of st\n-00117800: 7265 616d 696e 6720 4449 4d45 2e3c 2f70 reaming DIME..

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

    .

    \n-00117870: 0a57 5344 4c20 6269 6e64 696e 6773 2066 .WSDL bindings f\n-00117880: 6f72 2044 494d 4520 6174 7461 6368 6d65 or DIME attachme\n-00117890: 6e74 733c 2f68 323e 0a3c 703e 5468 6520 nts

    .

    The \n-001178a0: 7773 646c 3268 2074 6f6f 6c20 7265 636f wsdl2h tool reco\n-001178b0: 676e 697a 6573 2044 494d 4520 6174 7461 gnizes DIME atta\n-001178c0: 6368 6d65 6e74 7320 616e 6420 7072 6f64 chments and prod\n-001178d0: 7563 6573 2061 6e20 616e 6e6f 7461 7465 uces an annotate\n-001178e0: 6420 6865 6164 6572 2066 696c 652e 2042 d header file. B\n-001178f0: 6f74 6820 6f70 656e 2061 6e64 2063 6c6f oth open and clo\n-00117900: 7365 6420 6c61 796f 7574 7320 6172 6520 sed layouts are \n-00117910: 7375 7070 6f72 7465 6420 666f 7220 7472 supported for tr\n-00117920: 616e 736d 6974 7469 6e67 2044 494d 4520 ansmitting DIME \n-00117930: 6174 7461 6368 6d65 6e74 732e 2046 6f72 attachments. For\n-00117940: 2063 6c6f 7365 6420 666f 726d 6174 732c closed formats,\n-00117950: 2061 6c6c 2044 494d 4520 6174 7461 6368 all DIME attach\n-00117960: 6d65 6e74 7320 6d75 7374 2062 6520 7265 ments must be re\n-00117970: 6665 7265 6e63 6564 2066 726f 6d20 7468 ferenced from th\n-00117980: 6520 534f 4150 206d 6573 7361 6765 2c20 e SOAP message, \n-00117990: 652e 672e 2075 7369 6e67 2068 7265 6673 e.g. using hrefs\n-001179a0: 2077 6974 6820 534f 4150 2065 6e63 6f64 with SOAP encod\n-001179b0: 696e 6720 616e 6420 7573 696e 6720 7468 ing and using th\n-001179c0: 6520 6170 706c 6963 6174 696f 6e2d 7370 e application-sp\n-001179d0: 6563 6966 6963 2072 6566 6572 656e 6365 ecific reference\n-001179e0: 2061 7474 7269 6275 7465 2069 6e63 6c75 attribute inclu\n-001179f0: 6465 6420 696e 2074 6865 203c 636f 6465 ded in the x\n-00117a70: 7364 5f5f 6261 7365 3634 4269 6e61 7279 sd__base64Binary\n-00117a80: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n-00117a90: 6374 206f 7220 636c 6173 7320 666f 7220 ct or class for \n-00117aa0: 646f 6375 6d65 6e74 2f6c 6974 6572 616c document/literal\n-00117ab0: 206d 6573 7361 6769 6e67 2e3c 2f70 3e0a messaging.

    .\n-00117ac0: 3c70 3e54 6865 2073 6f61 7063 7070 3220

    The soapcpp2 \n-00117ad0: 746f 6f6c 2064 6f65 7320 6e6f 7420 7072 tool does not pr\n-00117ae0: 6f64 7563 6520 6120 5753 444c 2077 6974 oduce a WSDL wit\n-00117af0: 6820 4449 4d45 2065 7874 656e 7369 6f6e h DIME extension\n-00117b00: 732e 2044 494d 4520 6973 2061 6e20 6f6c s. DIME is an ol\n-00117b10: 6465 7220 6269 6e61 7279 2066 6f72 6d61 der binary forma\n-00117b20: 7420 7468 6174 2068 6173 206e 6f20 5753 t that has no WS\n-00117b30: 444c 2070 726f 746f 636f 6c20 7375 7070 DL protocol supp\n-00117b40: 6f72 742c 2075 6e6c 696b 6520 4d49 4d45 ort, unlike MIME\n-00117b50: 2061 6e64 204d 544f 4d2e 3c2f 703e 0a3c and MTOM.

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

    .

    .MTOM a\n-00117bc0: 7474 6163 686d 656e 7473 3c2f 6831 3e0a ttachments

    .\n-00117bd0: 3c70 3e4d 544f 4d20 284d 6573 7361 6765

    MTOM (Message\n-00117be0: 2054 7261 6e73 6d69 7373 696f 6e20 4f70 Transmission Op\n-00117bf0: 7469 6d69 7a61 7469 6f6e 204d 6563 6861 timization Mecha\n-00117c00: 6e69 736d 2920 6973 2061 2072 656c 6174 nism) is a relat\n-00117c10: 6976 656c 7920 6e65 7720 666f 726d 6174 ively new format\n-00117c20: 2066 6f72 2074 7261 6e73 6d69 7474 696e for transmittin\n-00117c30: 6720 6174 7461 6368 6d65 6e74 7320 7769 g attachments wi\n-00117c40: 7468 2053 4f41 5020 6d65 7373 6167 6573 th SOAP messages\n-00117c50: 2028 7365 6520 3c61 2068 7265 663d 2268 (see http://www.w3.o\n-00117c90: 7267 2f54 522f 736f 6170 3132 2d6d 746f rg/TR/soap12-mto\n-00117ca0: 6d3c 2f61 3e29 2e20 4d54 4f4d 2061 7474 m). MTOM att\n-00117cb0: 6163 686d 656e 7473 2061 7265 2065 7373 achments are ess\n-00117cc0: 656e 7469 616c 6c79 204d 494d 4520 6174 entially MIME at\n-00117cd0: 7461 6368 6d65 6e74 7320 7769 7468 2073 tachments with s\n-00117ce0: 7461 6e64 6172 6469 7a65 6420 6d65 6368 tandardized mech\n-00117cf0: 616e 6973 6d73 2066 6f72 2063 726f 7373 anisms for cross\n-00117d00: 2072 6566 6572 656e 6369 6e67 2061 7474 referencing att\n-00117d10: 6163 686d 656e 7473 2066 726f 6d20 7468 achments from th\n-00117d20: 6520 534f 4150 2062 6f64 792c 2077 6869 e SOAP body, whi\n-00117d30: 6368 2069 7320 6162 7365 6e74 2069 6e20 ch is absent in \n-00117d40: 2870 6c61 696e 2920 4d49 4d45 2061 7474 (plain) MIME att\n-00117d50: 6163 686d 656e 7473 2061 6e64 206f 7074 achments and opt\n-00117d60: 696f 6e61 6c20 7769 7468 2044 494d 4520 ional with DIME \n-00117d70: 6174 7461 6368 6d65 6e74 732e 3c2f 703e attachments.

    \n-00117d80: 0a3c 703e 556e 6c69 6b65 2074 6865 206e .

    Unlike the n\n-00117d90: 616d 6520 7375 6767 6573 7473 2c20 7468 ame suggests, th\n-00117da0: 6520 7370 6565 6420 6279 2077 6869 6368 e speed by which\n-00117db0: 2061 7474 6163 6865 6420 6461 7461 2069 attached data i\n-00117dc0: 7320 7472 616e 736d 6974 7465 6420 6973 s transmitted is\n-00117dd0: 206e 6f74 2069 6e63 7265 6173 6564 2063 not increased c\n-00117de0: 6f6d 7061 7265 6420 746f 204d 494d 452c ompared to MIME,\n-00117df0: 2044 494d 452c 206f 7220 6576 656e 2058 DIME, or even X\n-00117e00: 4d4c 2065 6e63 6f64 6564 2062 6173 6536 ML encoded base6\n-00117e10: 3420 6461 7461 2c20 6265 6361 7573 6520 4 data, because \n-00117e20: 7468 6520 7065 7266 6f72 6d61 6e63 6520 the performance \n-00117e30: 6469 6666 6572 656e 6365 7320 7768 656e differences when\n-00117e40: 2075 7369 6e67 2067 534f 4150 2077 696c using gSOAP wil\n-00117e50: 6c20 6265 2073 6d61 6c6c 2e20 5468 6520 l be small. The \n-00117e60: 6164 7661 6e74 6167 6520 6f66 2074 6865 advantage of the\n-00117e70: 2066 6f72 6d61 7420 6973 2074 6865 2073 format is the s\n-00117e80: 7461 6e64 6172 6469 7a65 6420 6174 7461 tandardized atta\n-00117e90: 6368 6d65 6e74 2072 6566 6572 656e 6365 chment reference\n-00117ea0: 206d 6563 6861 6e69 736d 2c20 7768 6963 mechanism, whic\n-00117eb0: 6820 7368 6f75 6c64 2069 6d70 726f 7665 h should improve\n-00117ec0: 2069 6e74 6572 6f70 6572 6162 696c 6974 interoperabilit\n-00117ed0: 792e 3c2f 703e 0a3c 703e 5468 6520 4d54 y.

    .

    The MT\n-00117ee0: 4f4d 2073 7065 6369 6669 6361 7469 6f6e OM specification\n-00117ef0: 206d 616e 6461 7465 7320 534f 4150 2031 mandates SOAP 1\n-00117f00: 2e32 2061 6e64 2074 6865 2075 7365 206f .2 and the use o\n-00117f10: 6620 7468 6520 584f 5020 6e61 6d65 7370 f the XOP namesp\n-00117f20: 6163 652e 2054 6865 2058 4f50 2049 6e63 ace. The XOP Inc\n-00117f30: 6c75 6465 2065 6c65 6d65 6e74 203c 656d lude element xop:Inclu\n-00117f50: 6465 3c2f 636f 6465 3e3c 2f65 6d3e 2069 de i\n-00117f60: 7320 6465 6669 6e65 6420 696e 2074 6865 s defined in the\n-00117f70: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-00117f80: 7220 6669 6c65 2061 7320 6120 3c63 6f64 r file as a _xop__In\n-00118000: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude\n-00118010: 2073 7472 7563 7420 6f72 2063 6c61 7373 struct or class\n-00118020: 2c20 7468 6174 2069 7320 7573 6564 2074 , that is used t\n-00118030: 6f20 7265 6665 7265 6e63 6520 6174 7461 o reference atta\n-00118040: 6368 6d65 6e74 2873 2920 6672 6f6d 2074 chment(s) from t\n-00118050: 6865 2053 4f41 5020 6d65 7373 6167 6520 he SOAP message \n-00118060: 626f 6479 2e3c 2f70 3e0a 3c70 3e42 6563 body.

    .

    Bec\n-00118070: 6175 7365 2072 6566 6572 656e 6365 7320 ause references \n-00118080: 6672 6f6d 2077 6974 6869 6e20 7468 6520 from within the \n-00118090: 534f 4150 206d 6573 7361 6765 2062 6f64 SOAP message bod\n-001180a0: 7920 746f 2061 7474 6163 686d 656e 7473 y to attachments\n-001180b0: 2061 7265 206d 616e 6461 746f 7279 2077 are mandatory w\n-001180c0: 6974 6820 4d54 4f4d 2c20 7468 6520 696d ith MTOM, the im\n-001180d0: 706c 656d 656e 7461 7469 6f6e 206f 6620 plementation of \n-001180e0: 7468 6520 7365 7269 616c 697a 6174 696f the serializatio\n-001180f0: 6e20 616e 6420 6465 7365 7269 616c 697a n and deserializ\n-00118100: 6174 696f 6e20 6f66 204d 544f 4d20 4d49 ation of MTOM MI\n-00118110: 4d45 2061 7474 6163 686d 656e 7473 2075 ME attachments u\n-00118120: 7365 7320 7468 6520 6578 7465 6e64 6564 ses the extended\n-00118130: 2062 696e 6172 7920 7479 7065 2063 6f6d binary type com\n-00118140: 7061 7261 626c 6520 746f 2044 494d 4520 parable to DIME \n-00118150: 7375 7070 6f72 742e 2054 6869 7320 6269 support. This bi\n-00118160: 6e61 7279 2074 7970 6520 6973 2070 7265 nary type is pre\n-00118170: 6465 6669 6e65 6420 696e 2074 6865 203c defined in the <\n-00118180: 656d 3e3c 636f 6465 3e69 6d70 6f72 742f em>import/\n-00118190: 786f 702e 683c 2f63 6f64 653e 3c2f 656d xop.h file:

    .
    //gsoa\n-001181f0: 7020 786f 7020 7363 6865 6d61 2069 6d70 p xop schema imp\n-00118200: 6f72 743a 2068 7474 703a 2f2f 7777 772e ort: http://www.\n-00118210: 7733 2e6f 7267 2f32 3030 342f 3038 2f78 w3.org/2004/08/x\n-00118220: 6f70 2f69 6e63 6c75 6465 203c 2f73 7061 op/include
    .
    struct <\n-00118270: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00118280: 7265 663d 2273 7472 7563 745f 5f78 6f70 ref=\"struct__xop\n-00118290: 5f5f 5f5f 5f69 6e63 6c75 6465 2e68 746d _____include.htm\n-001182a0: 6c22 3e5f 786f 705f 5f49 6e63 6c75 6465 l\">_xop__Include\n-001182b0: 3c2f 613e 203c 2f64 6976 3e0a 3c64 6976
    .{<\n-001182d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned \n-00118330: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *__ptr; .
    int \n-001183e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 __size\n-00118440: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-00118460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00118470: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *id;
    ..<\n-00118590: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001185a0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-001185c0: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *options; <\n-00118630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }; .
    typede\n-00118680: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f s\n-001186a0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct _xop__Include _xop__Inc\n-00118730: 6c75 6465 3c2f 613e 3b3c 2f64 6976 3e0a lude;
    .\n-00118740: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    _\n-001187b0: 786f 705f 5f49 6e63 6c75 6465 3c2f 613e xop__Include\n-001187c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    XOP inc\n-001187e0: 6c75 6465 2073 7472 7563 7475 7265 2077 lude structure w\n-001187f0: 6974 6820 6174 7461 6368 6d65 6e74 2064 ith attachment d\n-00118800: 6174 612e 3c2f 6469 763e 3c64 6976 2063 ata.
    \n-00118820: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00118830: 7374 6473 6f61 7032 2e68 3a39 3838 333c stdsoap2.h:9883<\n-00118840: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n-00118930: 6368 6172 202a 2074 7970 653c 2f64 6976 char * type
    MIME type of\n-00118960: 2074 6865 2064 6174 612e 3c2f 6469 763e the data.
    \n-00118970: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00118990: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-001189a0: 3a39 3838 373c 2f64 6976 3e3c 2f64 6976 :9887
    .
    \n-00118a80: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    char * id
    NULL to ge\n-00118ac0: 6e65 7261 7465 2061 6e20 6964 206f 7220 nerate an id or \n-00118ad0: 6173 7369 676e 2074 6869 7320 6d65 6d62 assign this memb\n-00118ae0: 6572 2076 6172 6961 626c 6520 6120 756e er variable a un\n-00118af0: 6971 7565 2055 5549 442e 3c2f 6469 763e ique UUID.
    \n-00118b00: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00118b20: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00118b30: 3a39 3838 363c 2f64 6976 3e3c 2f64 6976 :9886
    .
    _xop__Inclu\n-00118c00: 6465 3a3a 6f70 7469 6f6e 733c 2f61 3e3c de::options<\n-00118c10: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    char * \n-00118c30: 6f70 7469 6f6e 733c 2f64 6976 3e3c 6469 options
    \n-00118c50: 6465 7363 7269 7074 696f 6e20 6f66 2074 description of t\n-00118c60: 6865 204d 494d 452f 4d54 4f4d 2061 7474 he MIME/MTOM att\n-00118c70: 6163 686d 656e 7420 6f72 204e 554c 4c3c achment or NULL<\n-00118c80: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-00118ca0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-00118cb0: 6170 322e 683a 3938 3838 3c2f 6469 763e ap2.h:9888
    \n-00118cc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .\n-00118dd0: 7369 7a65 206f 6620 7468 6520 6269 6e61 size of the bina\n-00118de0: 7279 2064 6174 613c 2f64 6976 3e3c 6469 ry data
    \n-00118e00: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:98\n-00118e20: 3835 3c2f 6469 763e 3c2f 6469 763e 0a3c 85
    .<\n-00118e30: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00118e40: 6964 3d22 6173 7472 7563 745f 5f78 6f70 id=\"astruct__xop\n-00118e50: 5f5f 5f5f 5f69 6e63 6c75 6465 5f68 746d _____include_htm\n-00118e60: 6c5f 6162 3433 3838 6537 3962 6339 3835 l_ab4388e79bc985\n-00118e70: 3935 6665 6662 6465 3266 6263 6635 3438 95fefbde2fbcf548\n-00118e80: 3962 6122 3e3c 6469 7620 636c 6173 733d 9ba\">\n-00118f00: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    unsigned cha\n-00118f20: 7220 2a20 5f5f 7074 723c 2f64 6976 3e3c r * __ptr
    <\n-00118f30: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00118f40: 223e 706f 696e 7465 7220 746f 2062 696e \">pointer to bin\n-00118f50: 6172 7920 6461 7461 3c2f 6469 763e 3c64 ary data
    Definition:<\n-00118f80: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-00118f90: 3838 343c 2f64 6976 3e3c 2f64 6976 3e0a 884
    .\n-00118fa0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ad\n-00118fc0: 6469 7469 6f6e 616c 203c 636f 6465 3e69 ditional i\n-00118fd0: 643c 2f63 6f64 653e 2c20 3c63 6f64 653e d, \n-00118fe0: 7479 7065 3c2f 636f 6465 3e2c 2061 6e64 type, and\n-00118ff0: 203c 636f 6465 3e6f 7074 696f 6e3c 2f63 option members ena\n-00119010: 626c 6520 4d54 4f4d 2061 7474 6163 686d ble MTOM attachm\n-00119020: 656e 7473 2066 6f72 2074 6865 2064 6174 ents for the dat\n-00119030: 6120 706f 696e 7465 6420 746f 2062 7920 a pointed to by \n-00119040: 3c63 6f64 653e 5f5f 7074 723c 2f63 6f64 __ptr of size __size. \n-00119070: 5468 6520 7072 6f63 6573 7320 666f 7220 The process for \n-00119080: 7365 6e64 696e 6720 616e 6420 7265 6365 sending and rece\n-00119090: 6976 696e 6720 4d54 4f4d 2058 4f50 2061 iving MTOM XOP a\n-001190a0: 7474 6163 686d 656e 7473 2069 7320 6675 ttachments is fu\n-001190b0: 6c6c 7920 6175 746f 6d61 7465 642e 2054 lly automated. T\n-001190c0: 6865 203c 636f 6465 3e69 643c 2f63 6f64 he id member refere\n-001190e0: 6e63 6573 2074 6865 2061 7474 6163 686d nces the attachm\n-001190f0: 656e 742c 2074 7970 6963 616c 6c79 2061 ent, typically a\n-00119100: 2063 6f6e 7465 6e74 2069 6420 4349 4420 content id CID \n-00119110: 6f72 2055 5549 4420 7768 6963 6820 6361 or UUID which ca\n-00119120: 6e20 6265 206f 6274 6169 6e65 6420 7769 n be obtained wi\n-00119130: 7468 203c 636f 6465 3e3c 6120 636c 6173 th soap_r\n-001191c0: 616e 645f 7575 6964 3c2f 613e 3c2f 636f and_uuid. When set to\n-001191e0: 204e 554c 4c2c 2061 2075 6e69 7175 6520 NULL, a unique \n-001191f0: 4349 4420 6973 2061 7574 6f6d 6174 6963 CID is automatic\n-00119200: 616c 6c79 2075 7365 642e 2054 6865 203c ally used. The <\n-00119210: 636f 6465 3e74 7970 653c 2f63 6f64 653e code>type\n-00119220: 2066 6965 6c64 2073 7065 6369 6669 6573 field specifies\n-00119230: 2074 6865 2072 6571 7569 7265 6420 4d49 the required MI\n-00119240: 4d45 2074 7970 6520 6f66 2074 6865 2062 ME type of the b\n-00119250: 696e 6172 7920 6461 7461 2c20 616e 6420 inary data, and \n-00119260: 7468 6520 6f70 7469 6f6e 616c 203c 636f the optional options member can be \n-00119290: 7573 6564 2074 6f20 7069 6767 792d 6261 used to piggy-ba\n-001192a0: 636b 2064 6573 6372 6970 7469 7665 2074 ck descriptive t\n-001192b0: 6578 7420 7769 7468 2061 6e20 6174 7461 ext with an atta\n-001192c0: 6368 6d65 6e74 2e20 5468 6520 6f72 6465 chment. The orde\n-001192d0: 7220 6f66 2074 6865 2064 6563 6c61 7261 r of the declara\n-001192e0: 7469 6f6e 206f 6620 7468 6520 6d65 6d62 tion of the memb\n-001192f0: 6572 7320 6973 2073 6967 6e69 6669 6361 ers is significa\n-00119300: 6e74 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 nt.

    .

    You c\n-00119310: 616e 2069 6d70 6f72 7420 3c65 6d3e 3c63 an import xop.h\n-00119330: 3c2f 656d 3e20 696e 2079 6f75 7220 696e in your in\n-00119340: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-00119350: 696c 6520 746f 2075 7365 2074 6865 204d ile to use the M\n-00119360: 544f 4d20 6174 7461 6368 6d65 6e74 732c TOM attachments,\n-00119370: 2066 6f72 2065 7861 6d70 6c65 3a3c 2f70 for example:.

    #import &qu\n-001193d0: 6f74 3b69 6d70 6f72 742f 786f 702e 6826 ot;import/xop.h&\n-001193e0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "i\n-00119430: 6d70 6f72 742f 786d 696d 6535 2e68 2671 mport/xmime5.h&q\n-00119440: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; .
    \n-00119480: 2369 6d70 6f72 7420 2671 756f 743b 696d #import "im\n-00119490: 706f 7274 2f73 6f61 7031 322e 6826 7175 port/soap12.h&qu\n-001194a0: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .
    /* alt\n-001194e0: 6572 6e61 7469 7665 6c79 2c20 7769 7468 ernatively, with\n-001194f0: 6f75 7420 7468 6520 696d 706f 7274 2061 out the import a\n-00119500: 626f 7665 2c20 7573 653a 203c 2f73 7061 bove, use:
    .
    //gsoap SOAP-EN\n-00119550: 5620 7363 6865 6d61 206e 616d 6573 7061 V schema namespa\n-00119560: 6365 3a20 6874 7470 3a2f 2f77 7777 2e77 ce: http://www.w\n-00119570: 332e 6f72 672f 3230 3033 2f30 352f 736f 3.org/2003/05/so\n-00119580: 6170 2d65 6e76 656c 6f70 6520 3c2f 7370 ap-envelope
    .
    //gsoap SOAP-E\n-001195d0: 4e43 2073 6368 656d 6120 6e61 6d65 7370 NC schema namesp\n-001195e0: 6163 653a 2068 7474 703a 2f2f 7777 772e ace: http://www.\n-001195f0: 7733 2e6f 7267 2f32 3030 332f 3035 2f73 w3.org/2003/05/s\n-00119600: 6f61 702d 656e 636f 6469 6e67 203c 2f73 oap-encoding
    .
    */ .
    .\n-00119680: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap x \n-001196a0: 7363 6865 6d61 206e 616d 6573 7061 6365 schema namespace\n-001196b0: 3a20 6874 7470 3a2f 2f6d 792e 6669 7273 : http://my.firs\n-001196c0: 742e 6d74 6f6d 2e6e 6574 203c 2f73 7061 t.mtom.net
    .
    struct x\n-00119710: 5f5f 6d79 4461 7461 203c 2f64 6976 3e0a __myData
    .\n-00119720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n-00119750: 3c61 2063 6c61 7373 3d22 636f 6465 2220 _xop__Includ\n-00119790: 653c 2f61 3e20 786f 705f 5f49 6e63 6c75 e xop__Inclu\n-001197a0: 6465 3b20 3c73 7061 6e20 636c 6173 733d de; // att\n-001197c0: 6163 686d 656e 7420 3c2f 7370 616e 3e3c achment <\n-001197d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    @ char *xmime5__conte\n-00119820: 6e74 5479 7065 3b20 203c 7370 616e 2063 ntType; /\n-00119840: 2f20 616e 6420 6974 7320 636f 6e74 656e / and its conten\n-00119850: 7454 7970 6520 3c2f 7370 616e 3e3c 2f64 tType .
    };
    .\n-00119880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-001198b0: 2f73 7061 6e3e 2078 5f5f 6d79 4d54 4f4d /span> x__myMTOM\n-001198c0: 7465 7374 283c 7370 616e 2063 6c61 7373 test(struc\n-001198e0: 743c 2f73 7061 6e3e 2078 5f5f 6d79 4461 t x__myDa\n-001198f0: 7461 202a 696e 2c20 3c73 7061 6e20 636c ta *in, st\n-00119910: 7275 6374 3c2f 7370 616e 3e20 785f 5f6d ruct x__m\n-00119920: 7944 6174 6120 2a6f 7574 293b 3c2f 6469 yData *out);.

    Whe\n-00119950: 6e20 616e 2069 6e73 7461 6e63 6520 6f66 n an instance of\n-00119960: 203c 636f 6465 3e78 5f5f 6d79 4461 7461 x__myData\n-00119970: 5479 7065 3c2f 636f 6465 3e20 6973 2073 Type is s\n-00119980: 6572 6961 6c69 7a65 6420 616e 6420 6569 erialized and ei\n-00119990: 7468 6572 206f 7220 626f 7468 2074 6865 ther or both the\n-001199a0: 203c 636f 6465 3e69 643c 2f63 6f64 653e id\n-001199b0: 2061 6e64 203c 636f 6465 3e74 7970 653c and type<\n-001199c0: 2f63 6f64 653e 206d 656d 6265 7273 2061 /code> members a\n-001199d0: 7265 206e 6f6e 2d4e 554c 4c2c 2074 6865 re non-NULL, the\n-001199e0: 2064 6174 6120 6973 2074 7261 6e73 6d69 data is transmi\n-001199f0: 7474 6564 2061 7320 4d54 4f4d 204d 494d tted as MTOM MIM\n-00119a00: 4520 6174 7461 6368 6d65 6e74 2069 6620 E attachment if \n-00119a10: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n-00119a20: 454e 435f 4d54 4f4d 3c2f 636f 6465 3e20 ENC_MTOM \n-00119a30: 666c 6167 2069 7320 7365 7420 696e 2074 flag is set in t\n-00119a40: 6865 2067 534f 4150 2773 2073 6f61 7020 he gSOAP's soap \n-00119a50: 7374 7275 6374 2063 6f6e 7465 7874 3a3c struct context:<\n-00119a60: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct \n-00119ab0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00119ae0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00119b10: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n-00119b70: 313c 2f61 3e28 3c61 2063 6c61 7373 3d22 1(SOAP_EN\n-00119bd0: 435f 4d54 4f4d 3c2f 613e 293b 3c2f 6469 C_MTOM);.\n-00119d90: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    \n-0011a240: 5468 6973 2064 6972 6563 7469 7665 2064 This directive d\n-0011a250: 6972 6563 7469 7665 2063 616e 2062 6520 irective can be \n-0011a260: 7265 7065 6174 6564 2066 6f72 2065 6163 repeated for eac\n-0011a270: 6820 6174 7461 6368 6d65 6e74 2079 6f75 h attachment you\n-0011a280: 2077 616e 7420 746f 2061 7373 6f63 6961 want to associa\n-0011a290: 7465 2077 6974 6820 6120 6d65 7468 6f64 te with a method\n-0011a2a0: 2773 2072 6571 7565 7374 2061 6e64 2072 's request and r\n-0011a2b0: 6573 706f 6e73 6520 6d65 7373 6167 652e esponse message.\n-0011a2c0: 2073 6565 2061 6c73 6f20 5365 6374 696f see also Sectio\n-0011a2d0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Dir\n-0011a300: 6563 7469 7665 733c 2f61 3e20 2e3c 2f70 ectives ..

    For example\n-0011a320: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #import\n-0011a370: 2026 7175 6f74 3b69 6d70 6f72 742f 786f "import/xo\n-0011a380: 702e 6826 7175 6f74 3b3c 2f73 7061 6e3e p.h"\n-0011a390: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    #import &qu\n-0011a3d0: 6f74 3b69 6d70 6f72 742f 786d 696d 6535 ot;import/xmime5\n-0011a3e0: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n-0011a3f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #import &quo\n-0011a430: 743b 696d 706f 7274 2f73 6f61 7031 322e t;import/soap12.\n-0011a440: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n-0011a450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-0011a470: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-0011a4a0: 7820 7363 6865 6d61 206e 616d 6573 7061 x schema namespa\n-0011a4b0: 6365 3a20 6874 7470 3a2f 2f6d 792e 6669 ce: http://my.fi\n-0011a4c0: 7273 742e 6d74 6f6d 2e6e 6574 203c 2f73 rst.mtom.net
    .
    struct x__myData .
    {
    . \n-0011a550: 2020 3c61 2063 6c61 7373 3d22 636f 6465 _xop__Incl\n-0011a590: 7564 653c 2f61 3e20 786f 705f 5f49 6e63 ude xop__Inc\n-0011a5a0: 6c75 6465 3b20 3c73 7061 6e20 636c 6173 lude; // a\n-0011a5c0: 7474 6163 686d 656e 7420 3c2f 7370 616e ttachment
    .
    @ char *xmime5__con\n-0011a620: 7465 6e74 5479 7065 3b20 203c 7370 616e tentType; // and its cont\n-0011a650: 656e 7454 7970 6520 3c2f 7370 616e 3e3c entType <\n-0011a660: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }; .
    //gsoa\n-0011a6b0: 7020 7820 7365 7276 6963 6520 6d65 7468 p x service meth\n-0011a6c0: 6f64 2d6d 696d 652d 7479 7065 3a20 6d79 od-mime-type: my\n-0011a6d0: 4d54 4f4d 7465 7374 2074 6578 742f 786d MTOMtest text/xm\n-0011a6e0: 6c20 3c2f 7370 616e 3e3c 2f64 6976 3e0a l
    .\n-0011a6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-0011a720: 2f73 7061 6e3e 2078 5f5f 6d79 4d54 4f4d /span> x__myMTOM\n-0011a730: 7465 7374 283c 7370 616e 2063 6c61 7373 test(struc\n-0011a750: 743c 2f73 7061 6e3e 2078 5f5f 6d79 4461 t x__myDa\n-0011a760: 7461 202a 696e 2c20 3c73 7061 6e20 636c ta *in, st\n-0011a780: 7275 6374 3c2f 7370 616e 3e20 785f 5f6d ruct x__m\n-0011a790: 7944 6174 6120 2a6f 7574 293b 3c2f 6469 yData *out);.

    The\n-0011a7c0: 203c 636f 6465 3e2f 2f67 736f 6170 2078 //gsoap x\n-0011a7d0: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n-0011a7e0: 6d69 6d65 2d74 7970 653a 3c2f 636f 6465 mime-type: directive indi\n-0011a800: 6361 7465 7320 7468 6174 2074 6869 7320 cates that this \n-0011a810: 6f70 6572 6174 696f 6e20 6163 6365 7074 operation accept\n-0011a820: 7320 3c65 6d3e 3c63 6f64 653e 7465 7874 s text\n-0011a830: 2f78 6d6c 3c2f 636f 6465 3e3c 2f65 6d3e /xml\n-0011a840: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n-0011a850: 732e 2053 6565 2074 6865 2053 4f41 502d s. See the SOAP-\n-0011a860: 7769 7468 2d41 7474 6163 686d 656e 7420 with-Attachment \n-0011a870: 7370 6563 6966 6963 6174 696f 6e20 666f specification fo\n-0011a880: 7220 7468 6520 4d49 4d45 2074 7970 6573 r the MIME types\n-0011a890: 2074 6f20 7573 6520 2866 6f72 2065 7861 to use (for exa\n-0011a8a0: 6d70 6c65 2c20 3c63 6f64 653e 2a2f 2a3c mple, */*<\n-0011a8b0: 2f63 6f64 653e 2069 7320 6120 7769 6c64 /code> is a wild\n-0011a8c0: 6361 7264 292e 2049 6620 7468 6520 6f70 card). If the op\n-0011a8d0: 6572 6174 696f 6e20 6861 7320 6d6f 7265 eration has more\n-0011a8e0: 2074 6861 6e20 6f6e 6520 6174 7461 6368 than one attach\n-0011a8f0: 6d65 6e74 2c20 6a75 7374 2072 6570 6561 ment, just repea\n-0011a900: 7420 7468 6973 2064 6972 6563 7469 7665 t this directive\n-0011a910: 2066 6f72 2065 6163 6820 6174 7461 6368 for each attach\n-0011a920: 6d65 6e74 2079 6f75 2077 616e 7420 746f ment you want to\n-0011a930: 2062 696e 6420 746f 2074 6865 206f 7065 bind to the ope\n-0011a940: 7261 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 ration.

    .

    T\n-0011a950: 6f20 6269 6e64 2061 7474 6163 686d 656e o bind attachmen\n-0011a960: 7473 206f 6e6c 7920 746f 2074 6865 2072 ts only to the r\n-0011a970: 6571 7565 7374 206d 6573 7361 6765 206f equest message o\n-0011a980: 6620 616e 206f 7065 7261 7469 6f6e 2c20 f an operation, \n-0011a990: 7573 653c 2f70 3e0a 3c64 6976 2063 6c61 use

    .
    \n-0011a9c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap &l\n-0011a9e0: 743b 7072 6566 6978 2667 743b 2073 6572 t;prefix> ser\n-0011a9f0: 7669 6365 206d 6574 686f 642d 696e 7075 vice method-inpu\n-0011aa00: 742d 6d69 6d65 2d74 7970 653a 202e 2e2e t-mime-type: ...\n-0011aa10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

    Similarl\n-0011aa40: 792c 2074 6f20 6269 6e64 2061 7474 6163 y, to bind attac\n-0011aa50: 686d 656e 7473 206f 6e6c 7920 746f 2074 hments only to t\n-0011aa60: 6865 2072 6573 706f 6e73 6520 6d65 7373 he response mess\n-0011aa70: 6167 6520 6f66 2061 6e20 6f70 6572 6174 age of an operat\n-0011aa80: 696f 6e2c 2075 7365 3a3c 2f70 3e0a 3c64 ion, use:

    .
    //gs\n-0011aad0: 6f61 7020 266c 743b 7072 6566 6978 2667 oap <prefix&g\n-0011aae0: 743b 2073 6572 7669 6365 206d 6574 686f t; service metho\n-0011aaf0: 642d 6f75 7470 7574 2d6d 696d 652d 7479 d-output-mime-ty\n-0011ab00: 7065 3a20 2e2e 2e3c 2f73 7061 6e3e 3c2f pe: ....

    T\n-0011ab30: 6865 2077 7364 6c32 6820 746f 6f6c 2072 he wsdl2h tool r\n-0011ab40: 6563 6f67 6e69 7a65 7320 4d49 4d45 2061 ecognizes MIME a\n-0011ab50: 7474 6163 686d 656e 7473 2061 6e64 2070 ttachments and p\n-0011ab60: 726f 6475 6365 7320 616e 2061 6e6e 6f74 roduces an annot\n-0011ab70: 6174 6564 2068 6561 6465 7220 6669 6c65 ated header file\n-0011ab80: 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 616e .

    .

    You can\n-0011ab90: 2072 6570 6561 7420 7468 6573 6520 6469 repeat these di\n-0011aba0: 7265 6374 6976 6573 2066 6f72 2061 6c6c rectives for all\n-0011abb0: 206d 756c 7469 7061 7274 5265 6c61 7465 multipartRelate\n-0011abc0: 6420 4d49 4d45 2061 7474 6163 686d 656e d MIME attachmen\n-0011abd0: 7473 2079 6f75 2077 616e 7420 746f 2061 ts you want to a\n-0011abe0: 7373 6f63 6961 7465 2077 6974 6820 7468 ssociate with th\n-0011abf0: 6520 7365 7276 6963 6520 6f70 6572 6174 e service operat\n-0011ac00: 696f 6e20 696e 7075 7420 616e 6420 6f75 ion input and ou\n-0011ac10: 7470 7574 2e3c 2f70 3e0a 3c70 3ef0 9f94 tput.

    .

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

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

    \n-0011ac80: 3c2f 613e 0a53 656e 6469 6e67 2061 6e64 .Sending and\n-0011ac90: 2072 6563 6569 7669 6e67 204d 544f 4d20 receiving MTOM \n-0011aca0: 6174 7461 6368 6d65 6e74 733c 2f68 323e attachments

    \n-0011acb0: 0a3c 703e 4120 7265 6365 6976 6572 206d .

    A receiver m\n-0011acc0: 7573 7420 6265 2069 6e66 6f72 6d65 6420 ust be informed \n-0011acd0: 746f 2072 6563 6f67 6e69 7a65 204d 544f to recognize MTO\n-0011ace0: 4d20 6174 7461 6368 6d65 6e74 7320 6279 M attachments by\n-0011acf0: 2073 6574 7469 6e67 2074 6865 203c 636f setting the #SOAP_ENC_MTO\n-0011ad10: 4d3c 2f63 6f64 653e 2066 6c61 6720 6f66 M flag of\n-0011ad20: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap<\n-0011ad80: 2f63 6f64 653e 2063 6f6e 7465 7874 2e20 /code> context. \n-0011ad90: 4f74 6865 7277 6973 652c 2074 6865 2072 Otherwise, the r\n-0011ada0: 6567 756c 6172 204d 494d 4520 6174 7461 egular MIME atta\n-0011adb0: 6368 6d65 6e74 206d 6563 6861 6e69 736d chment mechanism\n-0011adc0: 2028 5377 4129 2077 696c 6c20 6265 2075 (SwA) will be u\n-0011add0: 7365 6420 746f 2073 746f 7265 2061 7474 sed to store att\n-0011ade0: 6163 686d 656e 7473 2e3c 2f70 3e0a 3c70 achments.

    .When using wsdl\n-0011ae00: 3268 2074 6f20 6275 696c 6420 636c 6965 2h to build clie\n-0011ae10: 6e74 7320 616e 642f 6f72 2073 6572 7669 nts and/or servi\n-0011ae20: 6365 732c 2079 6f75 2073 686f 756c 6420 ces, you should \n-0011ae30: 7573 6520 7468 6520 3c65 6d3e 3c63 6f64 use the typemap.dat file i\n-0011ae60: 6e63 6c75 6465 6420 696e 2074 6865 2067 ncluded in the g\n-0011ae70: 534f 4150 2073 6f75 7263 6520 636f 6465 SOAP source code\n-0011ae80: 2070 6163 6b61 6765 2e20 5468 6520 3c65 package. The typemap.\n-0011aea0: 6461 743c 2f63 6f64 653e 3c2f 656d 3e20 dat \n-0011aeb0: 6669 6c65 2064 6566 696e 6573 2074 6865 file defines the\n-0011aec0: 2058 4f50 206e 616d 6573 7061 6365 2061 XOP namespace a\n-0011aed0: 6e64 2058 4d4c 204d 494d 4520 6e61 6d65 nd XML MIME name\n-0011aee0: 7370 6163 6573 2061 7320 696d 706f 7274 spaces as import\n-0011aef0: 6564 206e 616d 6573 7061 6365 733a 203c ed namespaces: <\n-0011af00: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>
    xop    \n-0011af20: 3d20 266c 743b 6874 7470 3a2f 2f77 7777  = <http://www\n-0011af30: 2e77 332e 6f72 672f 3230 3034 2f30 382f  .w3.org/2004/08/\n-0011af40: 786f 702f 696e 636c 7564 6526 6774 3b20  xop/include> \n-0011af50: 0a78 6d69 6d65 3520 3d20 266c 743b 6874  .xmime5 = <ht\n-0011af60: 7470 3a2f 2f77 7777 2e77 332e 6f72 672f  tp://www.w3.org/\n-0011af70: 3230 3035 2f30 352f 786d 6c6d 696d 6526  2005/05/xmlmime&\n-0011af80: 6774 3b20 0a78 6d69 6d65 3420 3d20 266c  gt; .xmime4 = &l\n-0011af90: 743b 6874 7470 3a2f 2f77 7777 2e77 332e  t;http://www.w3.\n-0011afa0: 6f72 672f 3230 3034 2f31 312f 786d 6c6d  org/2004/11/xmlm\n-0011afb0: 696d 6526 6774 3b0a 3c2f 7072 653e 3c70  ime>.
    The wsdl2h too\n-0011afd0: 6c20 7573 6573 2074 6865 203c 656d 3e3c l uses the <\n-0011afe0: 636f 6465 3e74 7970 656d 6170 2e64 6174 code>typemap.dat\n-0011aff0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c
    fil\n-0011b000: 6520 746f 2063 6f6e 7665 7274 2057 5344 e to convert WSD\n-0011b010: 4c20 696e 746f 2061 6e20 696e 7465 7266 L into an interf\n-0011b020: 6163 6520 6865 6164 6572 2066 696c 652e ace header file.\n-0011b030: 2049 6e20 7468 6973 2063 6173 6520 7765 In this case we\n-0011b040: 2064 6f6e 2774 2077 616e 7420 7468 6520 don't want the \n-0011b050: 7773 646c 3268 2074 6f6f 6c20 746f 2072 wsdl2h tool to r\n-0011b060: 6561 6420 7468 6520 584f 5020 7363 6865 ead the XOP sche\n-0011b070: 6d61 2061 6e64 2074 7261 6e73 6c61 7465 ma and translate\n-0011b080: 2069 742c 2073 696e 6365 2077 6520 6861 it, since we ha\n-0011b090: 7665 2061 2070 7265 2d64 6566 696e 6564 ve a pre-defined\n-0011b0a0: 203c 636f 6465 3e3c 6120 636c 6173 733d _xo\n-0011b110: 705f 5f49 6e63 6c75 6465 3c2f 613e 3c2f p__Include element to\n-0011b130: 2068 616e 646c 6520 584f 5020 666f 7220 handle XOP for \n-0011b140: 4d54 4f4d 2e20 5468 6973 203c 636f 6465 MTOM. This _xop__Inc\n-0011b1c0: 6c75 6465 3c2f 613e 3c2f 636f 6465 3e20 lude \n-0011b1d0: 656c 656d 656e 7420 6973 2064 6566 696e element is defin\n-0011b1e0: 6564 2069 6e20 3c65 6d3e 3c63 6f64 653e ed in \n-0011b1f0: 786f 702e 683c 2f63 6f64 653e 3c2f 656d xop.h. Therefore, th\n-0011b210: 6520 6269 6e64 696e 6773 2073 686f 776e e bindings shown\n-0011b220: 2061 626f 7665 2077 696c 6c20 6e6f 7420 above will not \n-0011b230: 7472 616e 736c 6174 6520 7468 6520 584f translate the XO\n-0011b240: 5020 616e 6420 584d 4c20 4d49 4d45 2073 P and XML MIME s\n-0011b250: 6368 656d 6173 2074 6f20 636f 6465 2c20 chemas to code, \n-0011b260: 6275 7420 6765 6e65 7261 7465 7320 3c63 but generates #import statements in\n-0011b290: 7374 6561 6420 696e 2074 6865 2067 656e stead in the gen\n-0011b2a0: 6572 6174 6564 2069 6e74 6572 6661 6365 erated interface\n-0011b2b0: 2068 6561 6465 7220 6669 6c65 3a3c 2f70 header file:.
    #import &qu\n-0011b310: 6f74 3b78 6f70 2e68 2671 756f 743b 3c2f ot;xop.h"
    .<\n-0011b340: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-0011b350: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor\">#impor\n-0011b360: 7420 2671 756f 743b 786d 696d 6535 2e68 t "xmime5.h\n-0011b370: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".

    Th\n-0011b3a0: 6520 3c63 6f64 653e 2369 6d70 6f72 743c e #import<\n-0011b3b0: 2f63 6f64 653e 2073 7461 7465 6d65 6e74 /code> statement\n-0011b3c0: 7320 6172 6520 6f6e 6c79 2061 6464 6564 s are only added\n-0011b3d0: 2066 6f72 2074 686f 7365 206e 616d 6573 for those names\n-0011b3e0: 7061 6365 7320 7468 6174 2061 7265 2061 paces that are a\n-0011b3f0: 6374 7561 6c6c 7920 7573 6564 2e3c 2f70 ctually used..

    Let's take \n-0011b410: 6120 6c6f 6f6b 2061 7420 616e 2065 7861 a look at an exa\n-0011b420: 6d70 6c65 2e20 5468 6520 7773 646c 3268 mple. The wsdl2h\n-0011b430: 2069 6d70 6f72 7465 7220 6765 6e65 7261 importer genera\n-0011b440: 7465 7320 6120 6865 6164 6572 2066 696c tes a header fil\n-0011b450: 6520 7769 7468 203c 636f 6465 3e23 696d e with #im\n-0011b460: 706f 7274 2022 786f 702e 6822 3c2f 636f port \"xop.h\" from a WSDL \n-0011b480: 7468 6174 2072 6566 6572 656e 6365 7320 that references \n-0011b490: 584f 502c 2066 6f72 2065 7861 6d70 6c65 XOP, for example\n-0011b4a0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #import\n-0011b4f0: 2026 7175 6f74 3b78 6f70 2e68 2671 756f "xop.h&quo\n-0011b500: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    \n-0011b510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n-0011b540: 6d70 6f72 7420 2671 756f 743b 786d 696d mport "xmim\n-0011b550: 6535 2e68 2671 756f 743b 3c2f 7370 616e e5.h"
    .
    struct n\n-0011b5a0: 735f 5f44 6174 6120 3c2f 6469 763e 0a3c s__Data
    .<\n-0011b5b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0011b5c0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n-0011b5e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0011b5f0: 7265 663d 2273 7472 7563 745f 5f78 6f70 ref=\"struct__xop\n-0011b600: 5f5f 5f5f 5f69 6e63 6c75 6465 2e68 746d _____include.htm\n-0011b610: 6c22 3e5f 786f 705f 5f49 6e63 6c75 6465 l\">_xop__Include\n-0011b620: 3c2f 613e 2078 6f70 5f5f 496e 636c 7564 xop__Includ\n-0011b630: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    @ \n-0011b650: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *xmime5__c\n-0011b680: 6f6e 7465 6e74 5479 7065 3b20 203c 2f64 ontentType; .
    };
    .<\n-0011b6b0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Suppose\n-0011b6d0: 2074 6865 2057 5344 4c20 6465 6669 6e65 the WSDL define\n-0011b6e0: 7320 616e 206f 7065 7261 7469 6f6e 3a3c s an operation:<\n-0011b6f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n-0011b740: 206e 735f 5f65 6368 6f44 6174 6128 3c73 ns__echoData(struct ns__Data *in, \n-0011b780: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__Data *ou\n-0011b7b0: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
    .
    \n-0011b7c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Note th\n-0011c180: 6174 2074 6865 203c 636f 6465 3e78 6f70 at the xop\n-0011c190: 5f5f 496e 636c 7564 652e 7479 7065 3c2f __Include.type member mus\n-0011c1b0: 7420 6265 2073 6574 2074 6f20 7472 616e t be set to tran\n-0011c1c0: 736d 6974 204d 544f 4d20 6174 7461 6368 smit MTOM attach\n-0011c1d0: 6d65 6e74 732c 206f 7468 6572 7769 7365 ments, otherwise\n-0011c1e0: 2069 6e6c 696e 6520 6261 7365 3634 2058 inline base64 X\n-0011c1f0: 4d4c 2077 696c 6c20 6265 2073 656e 742e ML will be sent.\n-0011c200: 3c2f 703e 0a3c 703e 4174 2074 6865 2073

    .

    At the s\n-0011c210: 6572 7665 7220 7369 6465 2c20 7765 2073 erver side, we s\n-0011c220: 686f 7720 616e 2065 7861 6d70 6c65 206f how an example o\n-0011c230: 6620 616e 206f 7065 7261 7469 6f6e 2068 f an operation h\n-0011c240: 616e 646c 6572 2074 6861 7420 6a75 7374 andler that just\n-0011c250: 2063 6f70 6965 7320 7468 6520 696e 7075 copies the inpu\n-0011c260: 7420 6461 7461 2074 6f20 6f75 7470 7574 t data to output\n-0011c270: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int ns__echoData(\n-0011c2d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-0011c320: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-0011c350: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , stru\n-0011c370: 6374 3c2f 7370 616e 3e20 6e73 5f5f 4461 ct ns__Da\n-0011c380: 7461 202a 696e 2c20 3c73 7061 6e20 636c ta *in, st\n-0011c3a0: 7275 6374 3c2f 7370 616e 3e20 6e73 5f5f ruct ns__\n-0011c3b0: 6461 7461 202a 6f75 7429 203c 2f64 6976 data *out) .
    {
    . \n-0011c3f0: 2a6f 7574 203d 202a 696e 3b20 3c2f 6469 *out = *in; .
    return <\n-0011c440: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0011c450: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0011c460: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-0011c470: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n-0011c480: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n-0011c490: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0\">SOAP_OK; \n-0011c4a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-0011c4c0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The s\n-0011c4e0: 6572 7665 7220 6d75 7374 2075 7365 2074 erver must use t\n-0011c4f0: 6865 203c 636f 6465 3e23 534f 4150 5f45 he #SOAP_E\n-0011c500: 4e43 5f4d 544f 4d3c 2f63 6f64 653e 2066 NC_MTOM f\n-0011c510: 6c61 6720 746f 2069 6e69 7469 616c 697a lag to initializ\n-0011c520: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the soap\n-0011c580: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n-0011c590: 746f 2072 6563 6569 7665 2061 6e64 2073 to receive and s\n-0011c5a0: 656e 6420 4d54 4f4d 2061 7474 6163 686d end MTOM attachm\n-0011c5b0: 656e 7473 2e3c 2f70 3e0a 3c70 3ef0 9f94 ents.

    .

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

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

    .St\n-0011c620: 7265 616d 696e 6720 4d49 4d45 2f4d 544f reaming MIME/MTO\n-0011c630: 4d3c 2f68 323e 0a3c 703e 5374 7265 616d M

    .

    Stream\n-0011c640: 696e 6720 4d49 4d45 2f4d 544f 4d20 6973 ing MIME/MTOM is\n-0011c650: 2061 6368 6965 7665 6420 7769 7468 2063 achieved with c\n-0011c660: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function\n-0011c670: 7320 746f 2066 6574 6368 2061 6e64 2073 s to fetch and s\n-0011c680: 746f 7265 2064 6174 6120 6475 7269 6e67 tore data during\n-0011c690: 2074 7261 6e73 6d69 7373 696f 6e2e 2054 transmission. T\n-0011c6a0: 6872 6565 2066 756e 6374 696f 6e20 6361 hree function ca\n-0011c6b0: 6c6c 6261 636b 7320 666f 7220 7374 7265 llbacks for stre\n-0011c6c0: 616d 696e 6720 4d49 4d45 2f4d 544f 4d20 aming MIME/MTOM \n-0011c6d0: 6f75 7470 7574 2061 6e64 2074 6872 6565 output and three\n-0011c6e0: 2063 616c 6c62 6163 6b73 2066 6f72 2073 callbacks for s\n-0011c6f0: 7472 6561 6d69 6e67 204d 494d 452f 4d54 treaming MIME/MT\n-0011c700: 4f4d 2069 6e70 7574 2061 7265 2061 7661 OM input are ava\n-0011c710: 696c 6162 6c65 2e3c 2f70 3e0a 3c75 6c3e ilable.

    .
    . \n-00121180: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_call_\n-001211b0: 6e73 5f5f 7765 626d 6574 686f 6428 2661 ns__webmethod(&a\n-001211c0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, ...))
    .\n-00121200: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... \n-00121230: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-00121240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else<\n-00121280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n-001212a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // success\n-001212c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001212e0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    v\n-00121330: 6f69 643c 2f73 7061 6e3e 202a 6d69 6d65 oid *mime\n-00121340: 5f77 7269 7465 5f6f 7065 6e28 3c73 7061 _write_open(struct \n-00121370: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001213a0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001213d0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n-00121410: 6861 723c 2f73 7061 6e3e 202a 3c73 7061 har *id,\n-00121440: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-00121480: 6172 3c2f 7370 616e 3e20 2a74 7970 652c ar *type,\n-00121490: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-001214d0: 6172 3c2f 7370 616e 3e20 2a64 6573 6372 ar *descr\n-001214e0: 6970 7469 6f6e 2c20 3c73 7061 6e20 636c iption, en\n-00121500: 756d 3c2f 7370 616e 3e20 3c61 2063 6c61 um soap\n-00121560: 5f6d 696d 655f 656e 636f 6469 6e67 3c2f _mime_encoding encoding) .
    {
    .\n-001215b0: 2020 4649 4c45 202a 6861 6e64 6c65 203d FILE *handle =\n-001215c0: 203c 6120 636c 6173 733d 2263 6f64 6522
    fopen(&q\n-00121640: 756f 743b 736f 6d65 6669 6c65 2671 756f uot;somefile&quo\n-00121650: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "wb&\n-00121680: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;
    ); <\n-00121690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001216c0: 2f2f 2057 6520 6967 6e6f 7265 2074 6865 // We ignore the\n-001216d0: 204d 494d 4520 636f 6e74 656e 7420 7472 MIME content tr\n-001216e0: 616e 7366 6572 2065 6e63 6f64 696e 6720 ansfer encoding \n-001216f0: 6865 7265 2c20 6275 7420 7368 6f75 6c64 here, but should\n-00121700: 2063 6865 636b 203c 2f73 7061 6e3e 3c2f check .
    if (!h\n-00121750: 616e 646c 6529 203c 2f64 6976 3e0a 3c64 andle)
    .\n-00121770: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-00121790: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001217c0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n-00121810: 6f72 3c2f 613e 203d 203c 6120 636c 6173 or = SOA\n-00121870: 505f 454f 463c 2f61 3e3b 203c 2f64 6976 P_EOF; .
    s\n-001218c0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->errnum \n-00121920: 3d20 6572 726e 6f3b 203c 7370 616e 2063 = errno; /\n-00121940: 2f20 6765 7420 7265 6173 6f6e 203c 2f73 / get reason
    .
    }\n-00121970: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return (v\n-001219d0: 6f69 643c 2f73 7061 6e3e 2a29 6861 6e64 oid*)hand\n-001219e0: 6c65 3b20 3c2f 6469 763e 0a3c 6469 7620 le;
    .
    } <\n-00121a00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-00121a20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-00121a50: 3c2f 7370 616e 3e20 6d69 6d65 5f77 7269 mime_wri\n-00121a60: 7465 5f63 6c6f 7365 283c 7370 616e 2063 te_close(s\n-00121a80: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-00121af0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00121b00: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *handle) .
    {
    .<\n-00121b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00121b50: 3e20 203c 6120 636c 6173 733d 2263 6f64 > fclose\n-00121bb0: 3c2f 613e 2828 4649 4c45 2a29 6861 6e64 ((FILE*)hand\n-00121bc0: 6c65 293b 203c 2f64 6976 3e0a 3c64 6976 le);
    .} \n-00121be0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00121c00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-00121c30: 3c2f 7370 616e 3e20 6d69 6d65 5f77 7269 mime_wri\n-00121c40: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(struct<\n-00121c60: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-00121c90: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-00121cc0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, void *\n-00121cf0: 6861 6e64 6c65 2c20 3c73 7061 6e20 636c handle, co\n-00121d10: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-00121d40: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *buf, si\n-00121db0: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e29 ze_t len)\n-00121dc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n-00121e10: 7369 7a65 5f74 3c2f 7370 616e 3e20 6e77 size_t nw\n-00121e20: 7269 7474 656e 3b20 3c2f 6469 763e 0a3c ritten;
    .<\n-00121e30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00121e40: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > whi\n-00121e60: 6c65 3c2f 7370 616e 3e20 286c 656e 2920 le (len) \n-00121e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    nwritte\n-00121eb0: 6e20 3d20 6677 7269 7465 283c 6120 636c n = fwrite(buf, 1, \n-00121f10: 6c65 6e2c 2028 4649 4c45 2a29 6861 6e64 len, (FILE*)hand\n-00121f20: 6c65 293b 203c 2f64 6976 3e0a 3c64 6976 le);
    . \n-00121f40: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!nwritten\n-00121f70: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {\n-00121f90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-00121fb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00121fc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00121fd0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00121fe0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;errn\n-00122030: 756d 3c2f 613e 203d 2065 7272 6e6f 3b20 um = errno; \n-00122040: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get rea\n-00122060: 736f 6e20 3c2f 7370 616e 3e3c 2f64 6976 son .
    return SOAP_EOF;
    .
    \n-00122130: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n-00122150: 6c65 6e20 2d3d 206e 7772 6974 7465 6e3b len -= nwritten;\n-00122160: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    buf +\n-001221d0: 3d20 6e77 7269 7474 656e 3b20 3c2f 6469 = nwritten; .
    }
    .\n-00122200: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-00122230: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-00122290: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .
    soap::fmimewr\n-00122380: 6974 6563 6c6f 7365 3c2f 613e 3c2f 6469 iteclose
    void(* fmi\n-001223b0: 6d65 7772 6974 6563 6c6f 7365 2928 7374 mewriteclose)(st\n-001223c0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-001223d0: 2076 6f69 6420 2a68 616e 646c 6529 3c2f void *handle)
    Callback \n-00122400: 746f 2063 6c6f 7365 2061 204d 494d 452f to close a MIME/\n-00122410: 4d54 4f4d 2061 7474 6163 686d 656e 7420 MTOM attachment \n-00122420: 7374 7265 616d 2061 6674 6572 2077 7269 stream after wri\n-00122430: 7469 6e67 2e3c 2f64 6976 3e3c 6469 7620 ting.
    Definition:\n-00122460: 2073 7464 736f 6170 322e 683a 3530 3230 stdsoap2.h:5020\n-00122470: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .\n-00122560: 696e 7428 2a20 666d 696d 6577 7269 7465 int(* fmimewrite\n-00122570: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-00122580: 6f61 702c 2076 6f69 6420 2a68 616e 646c oap, void *handl\n-00122590: 652c 2063 6f6e 7374 2063 6861 7220 2a62 e, const char *b\n-001225a0: 7566 2c20 7369 7a65 5f74 206c 656e 293c uf, size_t len)<\n-001225b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n-001225d0: 2074 6f20 7772 6974 6520 6461 7461 2069 to write data i\n-001225e0: 6e20 6120 4d49 4d45 2061 7474 6163 686d n a MIME attachm\n-001225f0: 656e 7420 7374 7265 616d 2e3c 2f64 6976 ent stream.
    Definitio\n-00122620: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-00122630: 683a 3530 3039 3c2f 6469 763e 3c2f 6469 h:5009
    .
    soap::fm\n-00122700: 696d 6577 7269 7465 6f70 656e 3c2f 613e imewriteopen\n-00122710: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void *\n-00122730: 282a 2066 6d69 6d65 7772 6974 656f 7065 (* fmimewriteope\n-00122740: 6e29 2873 7472 7563 7420 736f 6170 202a n)(struct soap *\n-00122750: 736f 6170 2c20 766f 6964 202a 6861 6e64 soap, void *hand\n-00122760: 6c65 2c20 636f 6e73 7420 6368 6172 202a le, const char *\n-00122770: 6964 2c20 636f 6e73 7420 6368 6172 202a id, const char *\n-00122780: 7479 7065 2c20 636f 6e73 7420 6368 6172 type, const char\n-00122790: 202a 6465 7363 7269 7074 696f 6e2c 2065 *description, e\n-001227a0: 6e75 6d20 736f 6170 5f6d 696d 655f 656e num soap_mime_en\n-001227b0: 636f 6469 6e67 2065 6e63 6f64 696e 6729 coding encoding)\n-001227c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac\n-001227e0: 6b20 746f 206f 7065 6e20 6120 7374 7265 k to open a stre\n-001227f0: 616d 696e 6720 4d49 4d45 2f4d 544f 4d20 aming MIME/MTOM \n-00122800: 6174 7461 6368 6d65 6e74 2066 6f72 2077 attachment for w\n-00122810: 7269 7469 6e67 2e3c 2f64 6976 3e3c 6469 riting.
    \n-00122830: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:49\n-00122850: 3938 3c2f 6469 763e 3c2f 6469 763e 0a3c 98
    .<\n-00122860: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00122870: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-00122880: 705f 5f6d 696d 655f 6874 6d6c 5f67 6133 p__mime_html_ga3\n-00122890: 6665 6337 3633 3364 6130 3762 6666 3262 fec7633da07bff2b\n-001228a0: 6635 6664 3633 3330 6265 6631 3834 3422 f5fd6330bef1844\"\n-001228b0: 3e3c 6469 7620 636c 6173 733d 2274 746e >
    soap_m\n-00122910: 696d 655f 656e 636f 6469 6e67 3c2f 613e ime_encoding\n-00122920: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    soap_m\n-00122940: 696d 655f 656e 636f 6469 6e67 3c2f 6469 ime_encoding
    RFC2045 MIM\n-00122970: 4520 636f 6e74 656e 7420 7472 616e 7366 E content transf\n-00122980: 6572 2065 6e63 6f64 696e 6773 2e3c 2f64 er encodings.
    Definit\n-001229b0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-001229c0: 322e 683a 3130 3232 333c 2f64 6976 3e3c 2.h:10223
    <\n-001229d0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001229f0: 4d65 7373 6167 6520 636f 6d70 7265 7373 Message compress\n-00122a00: 696f 6e20 7769 7468 203c 636f 6465 3e23 ion with #\n-00122a10: 534f 4150 5f45 4e43 5f5a 4c49 423c 2f63 SOAP_ENC_ZLIB can be used\n-00122a30: 2077 6974 6820 4d49 4d45 2074 6f20 636f with MIME to co\n-00122a40: 6d70 7265 7373 2074 6865 2065 6e74 6972 mpress the entir\n-00122a50: 6520 6d65 7373 6167 652e 2048 6f77 6576 e message. Howev\n-00122a60: 6572 2c20 636f 6d70 7265 7373 696f 6e20 er, compression \n-00122a70: 7265 7175 6972 6573 2062 7566 6665 7269 requires bufferi\n-00122a80: 6e67 2074 6f20 6465 7465 726d 696e 6520 ng to determine \n-00122a90: 7468 6520 4854 5450 2063 6f6e 7465 6e74 the HTTP content\n-00122aa0: 206c 656e 6774 6820 6865 6164 6572 2c20 length header, \n-00122ab0: 7768 6963 6820 6361 6e63 656c 7320 7468 which cancels th\n-00122ac0: 6520 6265 6e65 6669 7473 206f 6620 7374 e benefits of st\n-00122ad0: 7265 616d 696e 6720 4d49 4d45 2e20 546f reaming MIME. To\n-00122ae0: 2061 766f 6964 2074 6869 732c 2079 6f75 avoid this, you\n-00122af0: 2073 686f 756c 6420 7573 6520 6368 756e should use chun\n-00122b00: 6b65 6420 4854 5450 2028 7769 7468 2074 ked HTTP (with t\n-00122b10: 6865 206f 7574 7075 742d 6d6f 6465 203c he output-mode <\n-00122b20: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n-00122b30: 554e 4b3c 2f63 6f64 653e 2066 6c61 6729 UNK flag)\n-00122b40: 2077 6974 6820 636f 6d70 7265 7373 696f with compressio\n-00122b50: 6e20 616e 6420 7374 7265 616d 696e 6720 n and streaming \n-00122b60: 4d49 4d45 2e20 4174 2074 6865 2073 6572 MIME. At the ser\n-00122b70: 7665 7220 7369 6465 2c20 7768 656e 2079 ver side, when y\n-00122b80: 6f75 2073 6574 203c 636f 6465 3e23 534f ou set #SO\n-00122b90: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK before callin\n-00122bb0: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g soap_serv\n-00122c30: 653c 2f61 3e3c 2f63 6f64 653e 2c20 7468 e, th\n-00122c40: 6520 656e 6769 6e65 2077 696c 6c20 6175 e engine will au\n-00122c50: 746f 6d61 7469 6361 6c6c 7920 7265 7665 tomatically reve\n-00122c60: 7274 2074 6f20 6275 6666 6572 696e 6720 rt to buffering \n-00122c70: 283c 636f 6465 3e23 534f 4150 5f49 4f5f (#SOAP_IO_\n-00122c80: 5354 4f52 453c 2f63 6f64 653e 2066 6c61 STORE fla\n-00122c90: 6720 6973 2073 6574 292e 2059 6f75 2063 g is set). You c\n-00122ca0: 616e 2063 6865 636b 2074 6869 7320 666c an check this fl\n-00122cb0: 6167 2077 6974 6820 3c63 6f64 653e 2873 ag with (s\n-00122cc0: 6f61 702d 2667 743b 6f6d 6f64 6520 2661 oap->omode &a\n-00122cd0: 6d70 3b20 534f 4150 5f49 4f29 203d 3d20 mp; SOAP_IO) == \n-00122ce0: 534f 4150 5f49 4f5f 4348 554e 4b3c 2f63 SOAP_IO_CHUNK to see if t\n-00122d00: 6865 2063 6c69 656e 7420 6163 6365 7074 he client accept\n-00122d10: 7320 6368 756e 6b69 6e67 2e20 4d6f 7265 s chunking. More\n-00122d20: 2069 6e66 6f72 6d61 7469 6f6e 2061 626f information abo\n-00122d30: 7574 2073 7472 6561 6d69 6e67 2063 6875 ut streaming chu\n-00122d40: 6e6b 6564 204d 494d 4520 6361 6e20 6265 nked MIME can be\n-00122d50: 2066 6f75 6e64 2069 6e20 5365 6374 696f found in Sectio\n-00122d60: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n S\n-00122d90: 7472 6561 6d69 6e67 2063 6875 6e6b 6564 treaming chunked\n-00122da0: 204d 494d 452f 4d54 4f4d 3c2f 613e 202e MIME/MTOM .\n-00122db0: 2e3c 2f70 3e0a 3c70 3e4e 6f74 6520 7468 .

    .

    Note th\n-00122dc0: 6174 2074 6865 2065 7861 6d70 6c65 2061 at the example a\n-00122dd0: 626f 7665 2066 6f72 203c 636f 6465 3e6d bove for m\n-00122de0: 696d 655f 7265 6164 3c2f 636f 6465 3e20 ime_read \n-00122df0: 7573 6573 2061 2068 616e 646c 6520 7468 uses a handle th\n-00122e00: 6174 2070 6f69 6e74 7320 746f 2074 6865 at points to the\n-00122e10: 206f 7065 6e20 6669 6c65 203c 636f 6465 open file FILE*. T\n-00122e30: 6865 2073 696d 706c 6520 6578 616d 706c he simple exampl\n-00122e40: 6520 6162 6f76 6520 6973 206e 6f74 2072 e above is not r\n-00122e50: 6563 6f6d 6d65 6e64 6564 2077 6865 6e20 ecommended when \n-00122e60: 7468 6520 706c 6174 666f 726d 2069 6d70 the platform imp\n-00122e70: 6f73 6573 2061 206c 696d 6974 206f 6e20 oses a limit on \n-00122e80: 7468 6520 6e75 6d62 6572 206f 6620 6f70 the number of op\n-00122e90: 656e 2066 696c 6520 6465 7363 7269 7074 en file descript\n-00122ea0: 6f72 732e 2059 6f75 2063 616e 2075 7365 ors. You can use\n-00122eb0: 2074 6865 2068 616e 646c 6520 746f 2070 the handle to p\n-00122ec0: 6173 7320 616c 6f6e 6720 6d6f 7265 2069 ass along more i\n-00122ed0: 6e66 6f72 6d61 7469 6f6e 2074 6861 6e20 nformation than \n-00122ee0: 6a75 7374 2074 6865 2066 696c 6520 6465 just the file de\n-00122ef0: 7363 7269 7074 6f72 2e20 536f 2066 6f72 scriptor. So for\n-00122f00: 2065 7861 6d70 6c65 2c20 7768 656e 2074 example, when t\n-00122f10: 6865 206e 756d 6265 7220 6f66 206f 7065 he number of ope\n-00122f20: 6e20 6669 6c65 2064 6573 6372 6970 746f n file descripto\n-00122f30: 7273 2069 7320 6c69 6d69 7465 6420 6f6e rs is limited on\n-00122f40: 2079 6f75 7220 706c 6174 666f 726d 2c20 your platform, \n-00122f50: 796f 7520 7368 6f75 6c64 206c 6574 2074 you should let t\n-00122f60: 6865 2068 616e 646c 6520 706f 696e 7420 he handle point \n-00122f70: 746f 2061 2073 7472 7563 7475 7265 2077 to a structure w\n-00122f80: 6974 6820 6669 6c65 2d72 656c 6174 6564 ith file-related\n-00122f90: 2069 6e66 6f72 6d61 7469 6f6e 2e20 5468 information. Th\n-00122fa0: 6520 432b 2b20 6578 616d 706c 6520 6265 e C++ example be\n-00122fb0: 6c6f 7720 696c 6c75 7374 7261 7465 7320 low illustrates \n-00122fc0: 7468 6973 3a3c 2f70 3e0a 3c64 6976 2063 this:

    .
    \n-00122fe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    file.xop__Incl\n-00123000: 7564 6520 3d20 736f 6170 5f6e 6577 5f5f ude = soap_new__\n-00123010: 786f 705f 5f49 6e63 6c75 6465 283c 6120 xop__Include(soap); <\n-00123050: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    file.xop\n-00123070: 5f5f 496e 636c 7564 652d 2667 743b 6964 __Include->id\n-00123080: 203d 204e 554c 4c3b 203c 2f64 6976 3e0a = NULL;
    .\n-00123090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    file.xop__Incl\n-001230b0: 7564 652d 2667 743b 7479 7065 203d 2074 ude->type = t\n-001230c0: 7970 653b 203c 2f64 6976 3e0a 3c64 6976 ype;
    .fi\n-001230e0: 6c65 2e78 6f70 5f5f 496e 636c 7564 652d le.xop__Include-\n-001230f0: 2667 743b 6f70 7469 6f6e 7320 3d20 4e55 >options = NU\n-00123100: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
    .
    .
    file.xmim\n-00123140: 6535 5f5f 636f 6e74 656e 7454 7970 6520 e5__contentType \n-00123150: 3d20 7479 7065 3b20 3c2f 6469 763e 0a3c = type;
    .<\n-00123160: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00123170: 3e66 696c 652e 6669 6c65 6e61 6d65 203d >file.filename =\n-00123180: 2066 696c 656e 616d 653b 203c 2f64 6976 filename; .
    .// The objec\n-001231e0: 7420 686f 6c64 696e 6720 616c 6c20 696e t holding all in\n-001231f0: 666f 726d 6174 696f 6e20 746f 2072 6561 formation to rea\n-00123200: 6420 6461 7461 203c 2f73 7061 6e3e 3c2f d data .
    FileStrea\n-00123230: 6d49 6e20 2a69 6e73 203d 203c 7370 616e mIn *ins = new File\n-00123260: 5374 7265 616d 496e 2865 7272 6f72 6861 StreamIn(errorha\n-00123270: 6e64 6c65 7229 3b20 3c2f 6469 763e 0a3c ndler);
    .<\n-00123280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00123290: 3e69 6e73 2d26 6774 3b73 6574 4669 6c65 >ins->setFile\n-001232a0: 5061 7468 283c 6120 636c 6173 733d 2263 Path(pa\n-001232f0: 7468 3c2f 613e 293b 203c 2f64 6976 3e0a th);
    .\n-00123300: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ins->setFil\n-00123320: 654e 616d 6528 6669 6c65 6e61 6d65 293b eName(filename);\n-00123330: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    file.xop__In\n-00123370: 636c 7564 652d 2667 743b 5f5f 7369 7a65 clude->__size\n-00123380: 203d 2073 697a 653b 203c 2f64 6976 3e0a = size;
    .\n-00123390: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    file.xop__Incl\n-001233b0: 7564 652d 2667 743b 5f5f 7074 7220 3d20 ude->__ptr = \n-001233c0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (unsig\n-001233e0: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned char\n-00123410: 2a29 696e 733b 3c2f 6469 763e 0a3c 6469 *)ins;
    .
    ch\n-001234e0: 6172 2070 6174 685b 534f 4150 5f54 4147 ar path[SOAP_TAG\n-001234f0: 4c45 4e5d 3c2f 6469 763e 3c64 6976 2063 LEN]
    The\n-00123510: 2063 6c69 656e 7420 7265 7175 6573 7420 client request \n-00123520: 7061 7468 2061 7320 7265 6365 6976 6564 path as received\n-00123530: 206f 6e20 7468 6520 7365 7276 6572 2073 on the server s\n-00123540: 6964 652e 3c2f 6469 763e 3c64 6976 2063 ide.
    \n-00123560: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00123570: 7374 6473 6f61 7032 2e68 3a34 3033 323c stdsoap2.h:4032<\n-00123580: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    To read th\n-001235b0: 6520 4d54 4f4d 2064 6174 6120 666f 7220 e MTOM data for \n-001235c0: 7472 616e 736d 6973 7369 6f6e 3a3c 2f70 transmission:.

    void \n-00123620: 2a6d 696d 655f 7265 6164 5f6f 7065 6e28 *mime_read_open(\n-00123630: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00123680: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-001236b0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n-001236d0: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han\n-001236e0: 646c 652c 203c 7370 616e 2063 6c61 7373 dle, const\n-00123700: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *<\n-00123730: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00123740: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype\">id, const<\n-00123770: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty\n-001237a0: 7065 2c20 3c73 7061 6e20 636c 6173 733d pe, const<\n-001237c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *de\n-001237f0: 7363 7269 7074 696f 6e29 203c 2f64 6976 scription) .
    {
    . \n-00123830: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!handle) .
    return NULL;
    .\n-001238b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    FileStreamIn\n-001238d0: 202a 696e 7320 3d20 2846 696c 6553 7472 *ins = (FileStr\n-001238e0: 6561 6d49 6e2a 2968 616e 646c 653b 203c eamIn*)handle; <\n-001238f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!\n-00123930: 696e 732d 2667 743b 6f70 656e 2829 2920 ins->open()) \n-00123940: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    \n-001239a0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->error \n-00123a00: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = SOAP_ERR;
    ..
    if (\n-00123c90: 2168 616e 646c 6529 203c 2f64 6976 3e0a !handle)
    .\n-00123ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00123cd0: 7265 7475 726e 3c2f 7370 616e 3e3b 203c return; <\n-00123ce0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    FileSt\n-00123d00: 7265 616d 496e 202a 696e 7320 3d20 2846 reamIn *ins = (F\n-00123d10: 696c 6553 7472 6561 6d49 6e2a 2968 616e ileStreamIn*)han\n-00123d20: 646c 653b 203c 2f64 6976 3e0a 3c64 6976 dle;
    . \n-00123d40: 3c73 7061 6e20 636c 6173 733d 226b 6579 delete ins;
    .\n-00123d70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    size_t mime_read(<\n-00123dd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00123de0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-00123e50: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, v\n-00123e70: 6f69 643c 2f73 7061 6e3e 202a 6861 6e64 oid *hand\n-00123e80: 6c65 2c20 3c73 7061 6e20 636c 6173 733d le, ch\n-00123ea0: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *buf, size_t len)
    \n-00123f30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00123f60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00123f70: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!handle) .
    return 0;
    . \n-00123ff0: 4669 6c65 5374 7265 616d 496e 202a 696e FileStreamIn *in\n-00124000: 7320 3d20 2846 696c 6553 7472 6561 6d49 s = (FileStreamI\n-00124010: 6e2a 2968 616e 646c 653b 203c 2f64 6976 n*)handle; .
    \n-00124050: 7369 7a65 5f74 3c2f 7370 616e 3e20 6e72 size_t nr\n-00124060: 6561 6420 3d20 696e 732d 2667 743b 7265 ead = ins->re\n-00124070: 6164 283c 6120 636c 6173 733d 2263 6f64 ad(buf<\n-001240c0: 2f61 3e2c 206c 656e 293b 203c 2f64 6976 /a>, len); .
    \n-00124100: 6966 3c2f 7370 616e 3e20 2869 6e73 2d26 if (ins-&\n-00124110: 6774 3b73 7472 6561 6d45 7272 6f72 2829 gt;streamError()\n-00124120: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    soap-><\n-00124190: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001241a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001241b0: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n-001241c0: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n-001241d0: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error = ins->stre\n-001241f0: 616d 4572 726f 7228 293b 203c 2f64 6976 amError(); .
    return \n-00124240: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
    .
    } \n-00124260: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return nread;
    \n-001242b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    <\n-00124320: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00124330: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">SOAP_E\n-00124380: 5252 3c2f 613e 3c2f 6469 763e 3c64 6976 RR
    \n-001243a0: 2364 6566 696e 6520 534f 4150 5f45 5252 #define SOAP_ERR\n-001243b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    A soap_\n-001243d0: 7374 6174 7573 2065 7272 6f72 2063 6f64 status error cod\n-001243e0: 653a 2061 6e20 756e 7370 6563 6966 6965 e: an unspecifie\n-001243f0: 6420 6572 726f 7220 6f63 6375 7272 6564 d error occurred\n-00124400: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-00124420: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-00124430: 736f 6170 322e 683a 3233 3734 3c2f 6469 soap2.h:2374
    .
    <\n-00124450: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00124460: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

    .

    .Redirect\n-001244d0: 696e 6720 696e 626f 756e 6420 4d49 4d45 ing inbound MIME\n-001244e0: 2f4d 544f 4d20 7374 7265 616d 7320 6261 /MTOM streams ba\n-001244f0: 7365 6420 6f6e 2053 4f41 5020 626f 6479 sed on SOAP body\n-00124500: 2063 6f6e 7465 6e74 3c2f 6832 3e0a 3c70 content

    .When it is pref\n-00124520: 6572 6162 6c65 206f 7220 7265 7175 6972 erable or requir\n-00124530: 6564 2074 6f20 7265 6469 7265 6374 2069 ed to redirect i\n-00124540: 6e62 6f75 6e64 204d 494d 452f 4d54 4f4d nbound MIME/MTOM\n-00124550: 2061 7474 6163 686d 656e 7420 7374 7265 attachment stre\n-00124560: 616d 7320 6261 7365 6420 6f6e 2053 4f41 ams based on SOA\n-00124570: 5020 6d65 7373 6167 6520 626f 6479 2063 P message body c\n-00124580: 6f6e 7465 6e74 2c20 7768 6572 6520 666f ontent, where fo\n-00124590: 7220 6578 616d 706c 6520 7468 6520 6e61 r example the na\n-001245a0: 6d65 7320 6f66 2074 6865 2072 6573 6f75 mes of the resou\n-001245b0: 7263 6573 2061 7265 206c 6973 7465 6420 rces are listed \n-001245c0: 696e 2074 6865 2053 4f41 5020 6d65 7373 in the SOAP mess\n-001245d0: 6167 6520 626f 6479 2c20 616e 2061 6c74 age body, an alt\n-001245e0: 6572 6e61 7469 7665 206d 6563 6861 6e69 ernative mechani\n-001245f0: 736d 206d 7573 7420 6265 2075 7365 6420 sm must be used \n-00124600: 746f 2068 616e 646c 6520 7468 6520 6174 to handle the at\n-00124610: 7461 6368 6d65 6e74 732e 2054 6869 7320 tachments. This \n-00124620: 6d65 6368 616e 6973 6d20 6361 6e20 6265 mechanism can be\n-00124630: 2075 7365 6420 6174 2074 6865 2063 6c69 used at the cli\n-00124640: 656e 7420 616e 6420 7365 7276 6572 2073 ent and server s\n-00124650: 6964 652e 3c2f 703e 0a3c 703e 4265 6361 ide.

    .

    Beca\n-00124660: 7573 6520 7468 6520 726f 7574 696e 6720 use the routing \n-00124670: 6f66 2074 6865 2073 7472 6561 6d73 2069 of the streams i\n-00124680: 7320 6163 636f 6d70 6c69 7368 6564 2077 s accomplished w\n-00124690: 6974 6820 6578 706c 6963 6974 2066 756e ith explicit fun\n-001246a0: 6374 696f 6e20 6361 6c6c 732c 2074 6869 ction calls, thi\n-001246b0: 7320 6d65 7468 6f64 2073 686f 756c 6420 s method should \n-001246c0: 6f6e 6c79 2062 6520 7573 6564 2077 6865 only be used whe\n-001246d0: 6e20 7265 7175 6972 6564 2061 6e64 2073 n required and s\n-001246e0: 686f 756c 6420 6e6f 7420 6265 2063 6f6e hould not be con\n-001246f0: 7369 6465 7265 6420 6f70 7469 6f6e 616c sidered optional\n-00124700: 2e20 5468 6174 2069 732c 2077 6865 6e20 . That is, when \n-00124710: 796f 7520 656e 6162 6c65 2074 6869 7320 you enable this \n-00124720: 6d65 7468 6f64 2c20 796f 7520 6d75 7374 method, you must\n-00124730: 2063 6865 636b 2066 6f72 2070 656e 6469 check for pendi\n-00124740: 6e67 204d 494d 452f 4d54 4f4d 2061 7474 ng MIME/MTOM att\n-00124750: 6163 686d 656e 7473 2061 6e64 2068 616e achments and han\n-00124760: 646c 6520 7468 656d 2061 7070 726f 7072 dle them appropr\n-00124770: 6961 7465 6c79 2e20 5468 6973 2069 7320 iately. This is \n-00124780: 7472 7565 2065 7665 6e20 7768 656e 2079 true even when y\n-00124790: 6f75 2064 6f6e 2774 2065 7870 6563 7420 ou don't expect \n-001247a0: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n-001247b0: 6d65 6e74 7320 696e 2074 6865 2070 6179 ments in the pay\n-001247c0: 6c6f 6164 2c20 6265 6361 7573 6520 7468 load, because th\n-001247d0: 6520 7065 6572 206d 6179 2074 7269 636b e peer may trick\n-001247e0: 2079 6f75 2062 7920 7365 6e64 696e 6720 you by sending \n-001247f0: 6174 7461 6368 6d65 6e74 7320 616e 7977 attachments anyw\n-00124800: 6179 2061 6e64 2079 6f75 2073 686f 756c ay and you shoul\n-00124810: 6420 6265 2070 7265 7061 7265 6420 746f d be prepared to\n-00124820: 2061 6363 6570 7420 6f72 2072 656a 6563 accept or rejec\n-00124830: 7420 7468 656d 2e3c 2f70 3e0a 3c70 3e54 t them.

    .

    T\n-00124840: 6865 2065 7870 6c69 6369 7420 4d49 4d45 he explicit MIME\n-00124850: 2f4d 544f 4d20 7374 7265 616d 696e 6720 /MTOM streaming \n-00124860: 6d65 6368 616e 6973 6d20 636f 6e73 6973 mechanism consis\n-00124870: 7473 206f 6620 7468 7265 6520 4150 4920 ts of three API \n-00124880: 6675 6e63 7469 6f6e 733a 3c2f 703e 0a3c functions:

    .<\n-00124890: 756c 3e0a 3c6c 693e 3c63 6f64 653e 766f ul>.
  • vo\n-001248a0: 6964 203c 6120 636c 6173 733d 2265 6c22 id soap\n-00124930: 5f70 6f73 745f 6368 6563 6b5f 6d69 6d65 _post_check_mime\n-00124940: 5f61 7474 6163 686d 656e 7473 2873 7472 _attachments(str\n-00124950: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-00124960: 2f61 3e3c 2f63 6f64 653e 2054 6869 7320 /a> This \n-00124970: 6675 6e63 7469 6f6e 2065 6e61 626c 6573 function enables\n-00124980: 2070 6f73 742d 7072 6f63 6573 7369 6e67 post-processing\n-00124990: 206f 6620 4d49 4d45 2f4d 544f 4d20 6174 of MIME/MTOM at\n-001249a0: 7461 6368 6d65 6e74 7320 7265 6365 6976 tachments receiv\n-001249b0: 6564 2e20 5468 6973 206d 6561 6e73 2074 ed. This means t\n-001249c0: 6861 7420 7468 6520 7072 6573 656e 6365 hat the presence\n-001249d0: 206f 6620 4d49 4d45 2f4d 544f 4d20 6174 of MIME/MTOM at\n-001249e0: 7461 6368 6d65 6e74 7320 6d75 7374 2062 tachments must b\n-001249f0: 6520 6578 706c 6963 6974 6c79 2063 6865 e explicitly che\n-00124a00: 636b 6564 2062 7920 6361 6c6c 696e 6720 cked by calling \n-00124a10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 \n-00124a90: 736f 6170 5f63 6865 636b 5f6d 696d 655f soap_check_mime_\n-00124aa0: 6174 7461 6368 6d65 6e74 733c 2f61 3e3c attachments<\n-00124ab0: 2f63 6f64 653e 2061 6674 6572 2074 6865 /code> after the\n-00124ac0: 206d 6573 7361 6765 2077 6173 2072 6563 message was rec\n-00124ad0: 6569 7665 642e 2057 6865 6e20 7468 6973 eived. When this\n-00124ae0: 2066 756e 6374 696f 6e20 7265 7475 726e function return\n-00124af0: 7320 6e6f 6e7a 6572 6f20 2874 7275 6529 s nonzero (true)\n-00124b00: 2c20 7468 656e 2074 6865 2061 7474 6163 , then the attac\n-00124b10: 686d 656e 7473 2063 616e 2062 6520 7265 hments can be re\n-00124b20: 7472 6965 7665 6420 6279 2063 616c 6c69 trieved by calli\n-00124b30: 6e67 203c 636f 6465 3e3c 6120 636c 6173 ng soa\n-00124bb0: 705f 7265 6376 5f6d 696d 655f 6174 7461 p_recv_mime_atta\n-00124bc0: 6368 6d65 6e74 3c2f 613e 3c2f 636f 6465 chment repeatedly to \n-00124be0: 7265 7472 6965 7665 2065 6163 6820 6174 retrieve each at\n-00124bf0: 7461 6368 6d65 6e74 2075 6e74 696c 2074 tachment until t\n-00124c00: 6869 7320 6675 6e63 7469 6f6e 2072 6574 his function ret\n-00124c10: 7572 6e73 204e 554c 4c2e 2054 6869 7320 urns NULL. This \n-00124c20: 6675 6e63 7469 6f6e 2072 6574 7572 6e73 function returns\n-00124c30: 2061 2070 6f69 6e74 6572 2074 6f20 6120 a pointer to a \n-00124c40: 3c63 6f64 653e 7374 7275 6374 203c 6120 struct soap\n-00124cc0: 5f6d 756c 7469 7061 7274 3c2f 613e 3c2f _multipart attachment\n-00124ce0: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
  • .
  • int s\n-00124d70: 6f61 705f 6368 6563 6b5f 6d69 6d65 5f61 oap_check_mime_a\n-00124d80: 7474 6163 686d 656e 7473 2873 7472 7563 ttachments(struc\n-00124d90: 7420 736f 6170 202a 736f 6170 293c 2f61 t soap *soap) This fu\n-00124db0: 6e63 7469 6f6e 2063 6865 636b 7320 7468 nction checks th\n-00124dc0: 6520 7072 6573 656e 6365 206f 6620 6120 e presence of a \n-00124dd0: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n-00124de0: 6d65 6e74 2061 6674 6572 2063 616c 6c69 ment after calli\n-00124df0: 6e67 2061 2073 6572 7669 6365 206f 7065 ng a service ope\n-00124e00: 7261 7469 6f6e 2062 7920 7265 7475 726e ration by return\n-00124e10: 696e 6720 6e6f 6e7a 6572 6f20 7768 656e ing nonzero when\n-00124e20: 2061 7474 6163 686d 656e 7473 2061 7265 attachments are\n-00124e30: 2070 7265 7365 6e74 2e20 5265 7475 726e present. Return\n-00124e40: 7320 6e6f 6e7a 6572 6f20 6966 2061 7474 s nonzero if att\n-00124e50: 6163 686d 656e 7473 2061 7265 2070 7265 achments are pre\n-00124e60: 7365 6e74 2e20 5265 7175 6972 6573 203c sent. Requires <\n-00124e70: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>so\n-00124f00: 6170 5f70 6f73 745f 6368 6563 6b5f 6d69 ap_post_check_mi\n-00124f10: 6d65 5f61 7474 6163 686d 656e 7473 3c2f me_attachments.
  • .\n-00124f30: 3c6c 693e 3c63 6f64 653e 7374 7275 6374
  • struct\n-00124f40: 203c 6120 636c 6173 733d 2265 6c22 2068 \n-00124fb0: 736f 6170 5f6d 756c 7469 7061 7274 3c2f soap_multipart *soap_recv_mi\n-00124fd0: 6d65 5f61 7474 6163 686d 656e 7428 7374 me_attachment(st\n-00124fe0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-00124ff0: 2076 6f69 6420 2a68 616e 646c 6529 3c2f void *handle) This funct\n-00125010: 696f 6e20 7061 7273 6573 2061 6e20 6174 ion parses an at\n-00125020: 7461 6368 6d65 6e74 2061 6e64 2069 6e76 tachment and inv\n-00125030: 6f6b 6573 2074 6865 204d 494d 4520 6361 okes the MIME ca\n-00125040: 6c6c 6261 636b 7320 7768 656e 2073 6574 llbacks when set\n-00125050: 2e20 5468 6520 3c63 6f64 653e 6861 6e64 . The hand\n-00125060: 6c65 3c2f 636f 6465 3e20 7061 7261 6d65 le parame\n-00125070: 7465 7220 6973 2070 6173 7365 6420 746f ter is passed to\n-00125080: 203c 636f 6465 3e66 6d69 6d65 7772 6974 fmimewrit\n-00125090: 656f 7065 6e3c 2f63 6f64 653e 2e20 5468 eopen. Th\n-001250a0: 6520 6861 6e64 6c65 206d 6179 2063 6f6e e handle may con\n-001250b0: 7461 696e 2061 6e79 2064 6174 6120 7468 tain any data th\n-001250c0: 6174 2069 7320 6578 7472 6163 7465 6420 at is extracted \n-001250d0: 6672 6f6d 2074 6865 2053 4f41 5020 6d65 from the SOAP me\n-001250e0: 7373 6167 6520 626f 6479 2074 6f20 6775 ssage body to gu\n-001250f0: 6964 6520 7468 6520 7265 6469 7265 6374 ide the redirect\n-00125100: 696f 6e20 6f66 2074 6865 2073 7472 6561 ion of the strea\n-00125110: 6d20 696e 2074 6865 2063 616c 6c62 6163 m in the callbac\n-00125120: 6b73 2e20 5265 7475 726e 7320 6120 7374 ks. Returns a st\n-00125130: 7275 6374 2077 6974 6820 6120 3c63 6f64 ruct with a char *ptr member that c\n-00125160: 6f6e 7461 696e 7320 7468 6520 6861 6e64 ontains the hand\n-00125170: 6c65 2076 616c 7565 2072 6574 7572 6e65 le value returne\n-00125180: 6420 6279 2074 6865 203c 636f 6465 3e66 d by the f\n-00125190: 6d69 6d65 7772 6974 656f 7065 6e3c 2f63 mimewriteopen callback, a\n-001251b0: 6e64 203c 636f 6465 3e63 6861 7220 2a69 nd char *i\n-001251c0: 643c 2f63 6f64 653e 2c20 3c63 6f64 653e d, \n-001251d0: 6368 6172 202a 7479 7065 3c2f 636f 6465 char *type, and cha\n-001251f0: 7220 2a64 6573 6372 6970 7469 6f6e 3c2f r *description member var\n-00125210: 6961 626c 6573 2077 6974 6820 7468 6520 iables with the \n-00125220: 4d49 4d45 2069 642c 2074 7970 652c 2061 MIME id, type, a\n-00125230: 6e64 2064 6573 6372 6970 7469 6f6e 2069 nd description i\n-00125240: 6e66 6f20 7768 656e 2070 7265 7365 6e74 nfo when present\n-00125250: 2069 6e20 7468 6520 6174 7461 6368 6d65 in the attachme\n-00125260: 6e74 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c nt.
  • ..<\n-00125270: 703e 4578 616d 706c 6520 636c 6965 6e74 p>Example client\n-00125280: 2069 6e20 433a 3c2f 703e 0a3c 6469 7620 in C:

    .
    .
    {.
    soap_p\n-001255e0: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-001255f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00125600: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00125610: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00125620: 7374 6465 7272 293b 203c 7370 616e 2063 stderr); /\n-00125640: 2f20 616e 2065 7272 6f72 206f 6363 7572 / an error occur\n-00125650: 7265 6420 3c2f 7370 616e 3e3c 2f64 6976 red .
    }
    .else
    .
    {.
    if (\n-00125760: 736f 6170 5f63 6865 636b 5f6d 696d 655f soap_check_mime_\n-00125770: 6174 7461 6368 6d65 6e74 733c 2f61 3e28 attachments(\n-00125780: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-001257b0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    \n-00125800: 2f2f 2061 7474 6163 686d 656e 7473 2061 // attachments a\n-00125810: 7265 2070 7265 7365 6e74 2c20 6368 616e re present, chan\n-00125820: 6e65 6c20 6973 2073 7469 6c6c 206f 7065 nel is still ope\n-00125830: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n-00125840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00125870: 646f 3c2f 7370 616e 3e3c 2f64 6976 3e0a do
    .\n-00125880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n-001258b0: 2020 2020 2020 2e2e 2e20 3c73 7061 6e20 ... \n-001258d0: 2f2f 2067 6574 2064 6174 6120 2623 3339 // get data '\n-001258e0: 3b68 616e 646c 6526 2333 393b 2066 726f ;handle' fro\n-001258f0: 6d20 534f 4150 2072 6573 706f 6e73 6520 m SOAP response \n-00125900: 616e 6420 7061 7373 2074 6f20 6361 6c6c and pass to call\n-00125910: 6261 636b 7320 3c2f 7370 616e 3e3c 2f64 backs .
    ... \n-00125940: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set the\n-00125960: 2066 6d69 6d65 2063 616c 6c62 6163 6b73 fmime callbacks\n-00125970: 2c20 6966 206e 6565 6465 6420 3c2f 7370 , if needed
    .
    \n-001259a0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-001259c0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soap_mul\n-00125a00: 7469 7061 7274 3c2f 613e 202a 636f 6e74 tipart *cont\n-00125a10: 656e 7420 3d20 3c61 2063 6c61 7373 3d22 ent = soap_rec\n-00125a70: 765f 6d69 6d65 5f61 7474 6163 686d 656e v_mime_attachmen\n-00125a80: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-00125ab0: 703c 2f61 3e2c 2028 3c73 7061 6e20 636c p, (void*)h\n-00125ae0: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n-00125af0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00125b00: 3e20 2020 2020 2070 7269 6e74 6628 3c73 > printf("\n-00125b30: 5265 6365 6976 6564 2061 7474 6163 686d Received attachm\n-00125b40: 656e 7420 7769 7468 2069 643d 2573 2061 ent with id=%s a\n-00125b50: 6e64 2074 7970 653d 2573 5c6e 2671 756f nd type=%s\\n&quo\n-00125b60: 743b 3c2f 7370 616e 3e2c 2063 6f6e 7465 t;, conte\n-00125b70: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->id?content->id:""\n-00125c60: 3b3c 2f73 7061 6e3e 2c20 636f 6e74 656e ;, conten\n-00125c70: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->type?content-><\n-00125ce0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00125cf0: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n-00125d00: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n-00125d10: 6134 3935 6338 6432 3065 3033 3334 6265 a495c8d20e0334be\n-00125d20: 3162 3133 3435 3139 3363 6132 6662 3736 1b1345193ca2fb76\n-00125d30: 3422 3e74 7970 653c 2f61 3e3a 3c73 7061 4\">type:"&q\n-00125d60: 756f 743b 3c2f 7370 616e 3e29 3b20 3c2f uot;); .
    } while (content); <\n-00125dc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if \n-00125e00: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00125e30: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n-00125e80: 726f 723c 2f61 3e29 203c 2f64 6976 3e0a ror)
    .\n-00125e90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_\n-00125f00: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-00125f10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00125f40: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n-00125f50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .}\n-00125f80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s\n-00125ff0: 6f61 705f 6465 7374 726f 793c 2f61 3e28 oap_destroy(\n-00126000: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00126030: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-001260a0: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); <\n-001260e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n-00126150: 705f 6672 6565 3c2f 613e 283c 6120 636c p_free(soap);.
    so\n-00126240: 6170 5f72 6563 765f 6d69 6d65 5f61 7474 ap_recv_mime_att\n-00126250: 6163 686d 656e 743c 2f61 3e3c 2f64 6976 achment
    struct soap\n-00126280: 5f6d 756c 7469 7061 7274 202a 2073 6f61 _multipart * soa\n-00126290: 705f 7265 6376 5f6d 696d 655f 6174 7461 p_recv_mime_atta\n-001262a0: 6368 6d65 6e74 2873 7472 7563 7420 736f chment(struct so\n-001262b0: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void *\n-001262c0: 6861 6e64 6c65 293c 2f64 6976 3e3c 6469 handle)
    \n-001262e0: 4765 7420 6120 4d49 4d45 2f4d 544f 4d20 Get a MIME/MTOM \n-001262f0: 6174 7461 6368 6d65 6e74 2e3c 2f64 6976 attachment.
    .
    soap_post_che\n-001263c0: 636b 5f6d 696d 655f 6174 7461 6368 6d65 ck_mime_attachme\n-001263d0: 6e74 733c 2f61 3e3c 2f64 6976 3e3c 6469 nts
    int soap_post_c\n-00126400: 6865 636b 5f6d 696d 655f 6174 7461 6368 heck_mime_attach\n-00126410: 6d65 6e74 7328 7374 7275 6374 2073 6f61 ments(struct soa\n-00126420: 7020 2a73 6f61 7029 3c2f 6469 763e 3c64 p *soap)
    Enable post-pro\n-00126450: 6365 7373 696e 6720 6f66 204d 494d 452f cessing of MIME/\n-00126460: 4d54 4f4d 2061 7474 6163 686d 656e 7473 MTOM attachments\n-00126470: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .\n-001264d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 int soap_check\n-00126570: 5f6d 696d 655f 6174 7461 6368 6d65 6e74 _mime_attachment\n-00126580: 7328 7374 7275 6374 2073 6f61 7020 2a73 s(struct soap *s\n-00126590: 6f61 7029 3c2f 6469 763e 3c64 6976 2063 oap)
    Che\n-001265b0: 636b 2066 6f72 2061 204d 494d 452f 4d54 ck for a MIME/MT\n-001265c0: 4f4d 2061 7474 6163 686d 656e 742e 3c2f OM attachment.
    .

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

    .

    .Streaming\n-00127580: 2063 6875 6e6b 6564 204d 494d 452f 4d54 chunked MIME/MT\n-00127590: 4f4d 3c2f 6832 3e0a 3c70 3e54 6f20 7365 OM

    .

    To se\n-001275a0: 6e64 204d 494d 452f 4d54 4f4d 2061 7474 nd MIME/MTOM att\n-001275b0: 6163 686d 656e 7473 2c20 7468 6520 6174 achments, the at\n-001275c0: 7461 6368 6d65 6e74 2073 697a 6573 206d tachment sizes m\n-001275d0: 7573 7420 6265 2064 6574 6572 6d69 6e65 ust be determine\n-001275e0: 6420 696e 2061 6476 616e 6365 2074 6f20 d in advance to \n-001275f0: 6361 6c63 756c 6174 6520 4854 5450 206d calculate HTTP m\n-00127600: 6573 7361 6765 206c 656e 6774 6820 7265 essage length re\n-00127610: 7175 6972 6564 2074 6f20 7374 7265 616d quired to stream\n-00127620: 204d 494d 452f 4d54 4f4d 206f 7665 7220 MIME/MTOM over \n-00127630: 4854 5450 2e20 486f 7765 7665 722c 2063 HTTP. However, c\n-00127640: 6875 6e6b 6564 204d 494d 452f 4d54 4f4d hunked MIME/MTOM\n-00127650: 2074 6f67 6574 6865 7220 7769 7468 2063 together with c\n-00127660: 6875 6e6b 6564 2048 5454 5020 6361 6e20 hunked HTTP can \n-00127670: 6265 2075 7365 6420 746f 206f 6d69 7420 be used to omit \n-00127680: 7468 6973 2073 7465 702e 2046 6972 7374 this step. First\n-00127690: 2073 6574 2074 6865 203c 636f 6465 3e23 set the #\n-001276a0: 534f 4150 5f49 4f5f 4348 554e 4b3c 2f63 SOAP_IO_CHUNK flag. Then,\n-001276c0: 2074 6f20 7374 7265 616d 2063 6875 6e6b to stream chunk\n-001276d0: 6564 204d 494d 452f 4d54 4f4d 2c20 7365 ed MIME/MTOM, se\n-001276e0: 7420 7468 6520 3c63 6f64 653e 5f5f 7369 t the __si\n-001276f0: 7a65 3c2f 636f 6465 3e20 6d65 6d62 6572 ze member\n-00127700: 206f 6620 616e 2061 7474 6163 686d 656e of an attachmen\n-00127710: 7420 746f 207a 6572 6f20 616e 6420 656e t to zero and en\n-00127720: 6162 6c65 204d 494d 452f 4d54 4f4d 2063 able MIME/MTOM c\n-00127730: 6875 6e6b 696e 672e 2054 6865 204d 494d hunking. The MIM\n-00127740: 452f 4d54 4f4d 203c 636f 6465 3e3c 6120 E/MTOM soap::fmimerea\n-001277f0: 643c 2f61 3e3c 2f63 6f64 653e 2063 616c d cal\n-00127800: 6c62 6163 6b20 7468 656e 2066 6574 6368 lback then fetch\n-00127810: 6573 2064 6174 6120 696e 2063 6875 6e6b es data in chunk\n-00127820: 7320 616e 6420 6974 2069 7320 696d 706f s and it is impo\n-00127830: 7274 616e 7420 746f 2066 696c 6c20 7468 rtant to fill th\n-00127840: 6520 656e 7469 7265 2062 7566 6665 7220 e entire buffer \n-00127850: 756e 6c65 7373 2074 6865 2065 6e64 206f unless the end o\n-00127860: 6620 7468 6520 6461 7461 2068 6173 2062 f the data has b\n-00127870: 6565 6e20 7265 6163 6865 6420 616e 6420 een reached and \n-00127880: 7468 6520 6c61 7374 2063 6875 6e6b 2069 the last chunk i\n-00127890: 7320 746f 2062 6520 7365 6e64 2e20 5468 s to be send. Th\n-001278a0: 6174 2069 732c 203c 636f 6465 3e3c 6120 at is, soap::fmimerea\n-00127950: 643c 2f61 3e3c 2f63 6f64 653e 2073 686f d sho\n-00127960: 756c 6420 7265 7475 726e 2074 6865 2076 uld return the v\n-00127970: 616c 7565 206f 6620 7468 6520 6c61 7374 alue of the last\n-00127980: 203c 636f 6465 3e6c 656e 3c2f 636f 6465 len parameter and \n-001279a0: 6669 6c6c 2074 6865 2065 6e74 6972 6520 fill the entire \n-001279b0: 6275 6666 6572 203c 636f 6465 3e62 7566 buffer buf\n-001279c0: 3c2f 636f 6465 3e20 666f 7220 616c 6c20 for all \n-001279d0: 6368 756e 6b73 2065 7863 6570 7420 7468 chunks except th\n-001279e0: 6520 6c61 7374 2e20 466f 7220 7468 6520 e last. For the \n-001279f0: 6c61 7374 2069 7420 7265 7475 726e 7320 last it returns \n-00127a00: 302e 3c2f 703e 0a3c 703e f09f 949d 203c 0.

    .

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

    .\n-00127a60: 0a53 4f41 502f 584d 4c20 6f76 6572 2055 .SOAP/XML over U\n-00127a70: 4450 3c2f 6831 3e0a 3c70 3e55 4450 2069 DP.

    UDP i\n-00127a80: 7320 6120 7369 6d70 6c65 2c20 756e 7265 s a simple, unre\n-00127a90: 6c69 6162 6c65 2064 6174 6167 7261 6d20 liable datagram \n-00127aa0: 7072 6f74 6f63 6f6c 3a20 5544 5020 736f protocol: UDP so\n-00127ab0: 636b 6574 7320 6172 6520 636f 6e6e 6563 ckets are connec\n-00127ac0: 7469 6f6e 6c65 7373 2e20 5544 5020 6164 tionless. UDP ad\n-00127ad0: 6472 6573 7320 666f 726d 6174 7320 6172 dress formats ar\n-00127ae0: 6520 6964 656e 7469 6361 6c20 746f 2074 e identical to t\n-00127af0: 686f 7365 2075 7365 6420 6279 2054 4350 hose used by TCP\n-00127b00: 2e20 496e 2070 6172 7469 6375 6c61 7220 . In particular \n-00127b10: 5544 5020 7072 6f76 6964 6573 2061 2070 UDP provides a p\n-00127b20: 6f72 7420 6964 656e 7469 6669 6572 2069 ort identifier i\n-00127b30: 6e20 6164 6469 7469 6f6e 2074 6f20 7468 n addition to th\n-00127b40: 6520 6e6f 726d 616c 2049 6e74 6572 6e65 e normal Interne\n-00127b50: 7420 6164 6472 6573 7320 666f 726d 6174 t address format\n-00127b60: 2e20 5468 6520 5544 5020 706f 7274 2073 . The UDP port s\n-00127b70: 7061 6365 2069 7320 7365 7061 7261 7465 pace is separate\n-00127b80: 2066 726f 6d20 7468 6520 5443 5020 706f from the TCP po\n-00127b90: 7274 2073 7061 6365 2028 692e 652e 2061 rt space (i.e. a\n-00127ba0: 2055 4450 2070 6f72 7420 6d61 7920 6e6f UDP port may no\n-00127bb0: 7420 6265 2022 636f 6e6e 6563 7465 6422 t be \"connected\"\n-00127bc0: 2074 6f20 6120 5443 5020 706f 7274 292e to a TCP port).\n-00127bd0: 2049 6e20 6164 6469 7469 6f6e 2062 726f In addition bro\n-00127be0: 6164 6361 7374 2070 6163 6b65 7473 206d adcast packets m\n-00127bf0: 6179 2062 6520 7365 6e74 2028 6173 7375 ay be sent (assu\n-00127c00: 6d69 6e67 2074 6865 2075 6e64 6572 6c79 ming the underly\n-00127c10: 696e 6720 6e65 7477 6f72 6b20 7375 7070 ing network supp\n-00127c20: 6f72 7473 2074 6869 7329 2062 7920 7573 orts this) by us\n-00127c30: 696e 6720 6120 7265 7365 7276 6564 2022 ing a reserved \"\n-00127c40: 6272 6f61 6463 6173 740a 6164 6472 6573 broadcast.addres\n-00127c50: 7322 3b20 7468 6973 2061 6464 7265 7373 s\"; this address\n-00127c60: 2069 7320 6e65 7477 6f72 6b20 696e 7465 is network inte\n-00127c70: 7266 6163 6520 6465 7065 6e64 656e 742e rface dependent.\n-00127c80: 3c2f 703e 0a3c 703e 436c 6965 6e74 2d73

    .

    Client-s\n-00127c90: 6964 6520 6d65 7373 6167 6573 2077 6974 ide messages wit\n-00127ca0: 6820 534f 4150 2d6f 7665 722d 5544 5020 h SOAP-over-UDP \n-00127cb0: 656e 6470 6f69 6e74 2055 524c 7320 283c endpoint URLs (<\n-00127cc0: 636f 6465 3e73 6f61 702e 7564 703a 2f2f code>soap.udp://\n-00127cd0: 2e2e 2e3c 2f63 6f64 653e 2920 6172 6520 ...) are \n-00127ce0: 6175 746f 6d61 7469 6361 6c6c 7920 7472 automatically tr\n-00127cf0: 616e 736d 6974 7465 6420 6173 2064 6174 ansmitted as dat\n-00127d00: 6167 7261 6d73 2e20 5365 7276 6572 2d73 agrams. Server-s\n-00127d10: 6964 6520 6170 706c 6963 6174 696f 6e73 ide applications\n-00127d20: 2073 686f 756c 6420 7365 7420 7468 6520 should set the \n-00127d30: 3c63 6f64 653e 2353 4f41 505f 494f 5f55 #SOAP_IO_U\n-00127d40: 4450 3c2f 636f 6465 3e20 6d6f 6465 2066 DP mode f\n-00127d50: 6c61 6720 746f 2061 6363 6570 7420 5544 lag to accept UD\n-00127d60: 5020 7265 7175 6573 7473 2c20 652e 672e P requests, e.g.\n-00127d70: 2075 7369 6e67 203c 636f 6465 3e3c 6120 using soap_n\n-00127e30: 6577 313c 2f61 3e3c 2f63 6f64 653e 2c20 ew1, \n-00127e40: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_init1\n-00127f00: 3c2f 636f 6465 3e2c 206f 7220 3c63 6f64 , or soa\n-00127fb0: 705f 7365 745f 6d6f 6465 3c2f 613e 3c2f p_set_mode.

    .

    Th\n-00127fd0: 6520 6d61 7869 6d75 6d20 6d65 7373 6167 e maximum messag\n-00127fe0: 6520 6c65 6e67 7468 2066 6f72 2064 6174 e length for dat\n-00127ff0: 6167 7261 6d20 7061 636b 6574 7320 6973 agram packets is\n-00128000: 2072 6573 7472 6963 7465 6420 6279 2074 restricted by t\n-00128010: 6865 2062 7566 6665 7220 7369 7a65 203c he buffer size <\n-00128020: 636f 6465 3e23 534f 4150 5f42 5546 4c45 code>#SOAP_BUFLE\n-00128030: 4e3c 2f63 6f64 653e 2c20 7768 6963 6820 N, which \n-00128040: 6973 2036 3535 3336 2062 7920 6465 6661 is 65536 by defa\n-00128050: 756c 742c 2075 6e6c 6573 7320 636f 6d70 ult, unless comp\n-00128060: 696c 6564 2077 6974 6820 3c63 6f64 653e iled with \n-00128070: 2357 4954 485f 4c45 414e 3c2f 636f 6465 #WITH_LEAN to support sma\n-00128090: 6c6c 2d73 6361 6c65 2065 6d62 6564 6465 ll-scale embedde\n-001280a0: 6420 7379 7374 656d 732e 2046 6f72 2055 d systems. For U\n-001280b0: 4450 2074 7261 6e73 706f 7274 203c 636f DP transport #SOAP_BUFLEN<\n-001280d0: 2f63 6f64 653e 206d 7573 7420 6e6f 7420 /code> must not \n-001280e0: 6578 6365 6564 2074 6865 206d 6178 696d exceed the maxim\n-001280f0: 756d 2055 4450 2070 6163 6b65 7420 7369 um UDP packet si\n-00128100: 7a65 2036 3535 3336 2028 7468 6520 7369 ze 65536 (the si\n-00128110: 7a65 206f 6620 6461 7461 6772 616d 206d ze of datagram m\n-00128120: 6573 7361 6765 7320 6973 2063 6f6e 7374 essages is const\n-00128130: 7261 696e 6564 2062 7920 7468 6520 5544 rained by the UD\n-00128140: 5020 7061 636b 6574 2073 697a 6520 325e P packet size 2^\n-00128150: 3136 3d36 3535 3336 2061 7320 7065 7220 16=65536 as per \n-00128160: 5544 5020 7374 616e 6461 7264 292e 2059 UDP standard). Y\n-00128170: 6f75 2063 616e 2075 7365 2063 6f6d 7072 ou can use compr\n-00128180: 6573 7369 6f6e 2077 6974 6820 3c63 6f64 ession with #SOAP_ENC_ZLIB\n-001281a0: 3c2f 636f 6465 3e20 746f 2072 6564 7563 to reduc\n-001281b0: 6520 7468 6520 6d65 7373 6167 6520 7369 e the message si\n-001281c0: 7a65 2c20 6275 7420 6e6f 7465 2074 6861 ze, but note tha\n-001281d0: 7420 636f 6d70 7265 7373 6564 2053 4f41 t compressed SOA\n-001281e0: 502d 6f76 6572 2d55 4450 2069 7320 6120 P-over-UDP is a \n-001281f0: 6753 4f41 502d 7370 6563 6966 6963 2066 gSOAP-specific f\n-00128200: 6561 7475 7265 2062 6563 6175 7365 2069 eature because i\n-00128210: 7420 6973 206e 6f74 2070 6172 7420 6f66 t is not part of\n-00128220: 2074 6865 2053 4f41 502d 6f76 6572 2d55 the SOAP-over-U\n-00128230: 4450 2073 7065 6369 6669 6361 7469 6f6e DP specification\n-00128240: 2e3c 2f70 3e0a 3c70 3e54 6865 2053 4f41 .

    .

    The SOA\n-00128250: 502d 6f76 6572 2d55 4450 2073 7065 6369 P-over-UDP speci\n-00128260: 6669 6361 7469 6f6e 2072 656c 6965 7320 fication relies \n-00128270: 6f6e 2057 532d 4164 6472 6573 7369 6e67 on WS-Addressing\n-00128280: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The \n-00128290: 7773 612e 683c 2f63 6f64 653e 3c2f 656d wsa.h file in the import directory defi\n-001282d0: 6e65 7320 7468 6520 5753 2d41 6464 7265 nes the WS-Addre\n-001282e0: 7373 696e 6720 656c 656d 656e 7473 2066 ssing elements f\n-001282f0: 6f72 2063 6c69 656e 7420 616e 6420 7365 or client and se\n-00128300: 7276 6572 2061 7070 6c69 6361 7469 6f6e rver application\n-00128310: 732e 3c2f 703e 0a3c 703e 5468 6520 6753 s.

    .

    The gS\n-00128320: 4f41 5020 696d 706c 656d 656e 7461 7469 OAP implementati\n-00128330: 6f6e 2063 6f6e 666f 726d 7320 746f 2074 on conforms to t\n-00128340: 6865 2053 4f41 502d 6f76 6572 2d55 4450 he SOAP-over-UDP\n-00128350: 2072 6571 7569 7265 6d65 6e74 733a 3c2f requirements:.

      .
    • SOAP\n-00128370: 2d6f 7665 722d 5544 5020 7365 7276 6572 -over-UDP server\n-00128380: 2065 6e64 706f 696e 7420 5552 4c20 666f endpoint URL fo\n-00128390: 726d 6174 3a20 3c65 6d3e 3c63 6f64 653e rmat: \n-001283a0: 736f 6170 2e75 6470 3a2f 2f68 6f73 743a soap.udp://host:\n-001283b0: 706f 7274 2f70 6174 683c 2f63 6f64 653e port/path\n-001283c0: 3c2f 656d 3e3c 2f6c 693e 0a3c 6c69 3e53
    • .
    • S\n-001283d0: 7570 706f 7274 206f 6e65 2d77 6179 206d upport one-way m\n-001283e0: 6573 7361 6765 2d65 7863 6861 6e67 6520 essage-exchange \n-001283f0: 7061 7474 6572 6e20 284d 4550 2920 7768 pattern (MEP) wh\n-00128400: 6572 6520 6120 534f 4150 2065 6e76 656c ere a SOAP envel\n-00128410: 6f70 6520 6973 2063 6172 7269 6564 2069 ope is carried i\n-00128420: 6e20 6120 7573 6572 2064 6174 6167 7261 n a user datagra\n-00128430: 6d2e 3c2f 6c69 3e0a 3c6c 693e 5375 7070 m.
    • .
    • Supp\n-00128440: 6f72 7420 7265 7175 6573 742d 7265 7370 ort request-resp\n-00128450: 6f6e 7365 206d 6573 7361 6765 2d65 7863 onse message-exc\n-00128460: 6861 6e67 6520 7061 7474 6572 6e20 284d hange pattern (M\n-00128470: 4550 2920 7768 6572 6520 534f 4150 2065 EP) where SOAP e\n-00128480: 6e76 656c 6f70 6573 2061 7265 2063 6172 nvelopes are car\n-00128490: 7269 6564 2069 6e20 7573 6572 2064 6174 ried in user dat\n-001284a0: 6167 7261 6d73 2e3c 2f6c 693e 0a3c 6c69 agrams.
    • .Support multica\n-001284c0: 7374 2074 7261 6e73 6d69 7373 696f 6e20 st transmission \n-001284d0: 6f66 2053 4f41 5020 656e 7665 6c6f 7065 of SOAP envelope\n-001284e0: 7320 6361 7272 6965 6420 696e 2075 7365 s carried in use\n-001284f0: 7220 6461 7461 6772 616d 732e 3c2f 6c69 r datagrams..
    • Support bo\n-00128510: 7468 2053 4f41 5020 312e 3120 616e 6420 th SOAP 1.1 and \n-00128520: 534f 4150 2031 2e32 2065 6e76 656c 6f70 SOAP 1.2 envelop\n-00128530: 6573 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c es.
    • .
    .<\n-00128540: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following \n-00128550: 6164 6469 7469 6f6e 616c 2066 6561 7475 additional featu\n-00128560: 7265 7320 6172 6520 616c 736f 2061 7661 res are also ava\n-00128570: 696c 6162 6c65 2c20 6275 7420 6172 6520 ilable, but are \n-00128580: 6e6f 7420 7375 7070 6f72 7465 6420 6279 not supported by\n-00128590: 2074 6865 2053 4f41 502d 6f76 6572 2d55 the SOAP-over-U\n-001285a0: 4450 2073 7065 6369 6669 6361 7469 6f6e DP specification\n-001285b0: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e5a :

    .
    .// Send the \n-00129c70: 6d65 7373 6167 6520 6f76 6572 2055 4450 message over UDP\n-00129c80: 3a20 3c2f 7370 616e 3e3c 2f64 6976 3e0a :
    .\n-00129c90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (soap_send\n-00129cd0: 5f6e 735f 5f65 6368 6f53 7472 696e 6728 _ns__echoString(\n-00129ce0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00129d10: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "soap.udp\n-00129d40: 3a2f 2f65 6e64 706f 696e 7426 7175 6f74 ://endpoint"\n-00129d50: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "SOAP\n-00129d80: 2061 6374 696f 6e26 7175 6f74 3b3c 2f73 action", "hello wo\n-00129dc0: 726c 6421 2671 756f 743b 3c2f 7370 616e rld!"))
    .
    <\n-00129df0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00129e00: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00129e10: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-00129e20: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-00129e30: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-00129e40: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-00129e50: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n-00129e90: 6572 7229 3b20 3c73 7061 6e20 636c 6173 err); // e\n-00129eb0: 7272 6f72 203c 2f73 7061 6e3e 3c2f 6469 rror .
    soap_d\n-00129f30: 6573 7472 6f79 3c2f 613e 2826 616d 703b estroy(&\n-00129f40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00129f70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    s\n-00129fe0: 6f61 705f 656e 643c 2f61 3e28 2661 6d70 oap_end(&\n-00129ff0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012a020: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n-0012a090: 736f 6170 5f64 6f6e 653c 2f61 3e28 2661 soap_done(&a\n-0012a0a0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    ..

    Please\n-0012b870: 2072 6566 6572 2074 6f20 7468 6520 736f refer to the so\n-0012b880: 636b 6574 206f 7074 696f 6e73 2066 6f72 cket options for\n-0012b890: 203c 636f 6465 3e49 5050 524f 544f 5f49 IPPROTO_I\n-0012b8a0: 503c 2f63 6f64 653e 203c 636f 6465 3e49 P I\n-0012b8b0: 505f 4d55 4c54 4943 4153 545f 4946 3c2f P_MULTICAST_IF to specify\n-0012b8d0: 2074 6865 2064 6566 6175 6c74 2069 6e74 the default int\n-0012b8e0: 6572 6661 6365 2066 6f72 206d 756c 7469 erface for multi\n-0012b8f0: 6361 7374 2064 6174 6167 7261 6d73 2074 cast datagrams t\n-0012b900: 6f20 6265 2073 656e 7420 6672 6f6d 2e20 o be sent from. \n-0012b910: 5468 6973 2069 7320 6120 3c63 6f64 653e This is a \n-0012b920: 7374 7275 6374 2069 6e5f 6164 6472 3c2f struct in_addr (in_\n-0012b940: 6164 6472 5f74 3c2f 636f 6465 3e20 666f addr_t fo\n-0012b950: 7220 3c63 6f64 653e 7369 6e36 5f73 636f r sin6_sco\n-0012b960: 7065 5f69 643c 2f63 6f64 653e 2920 696e pe_id) in\n-0012b970: 7465 7266 6163 6520 7661 6c75 652e 204f terface value. O\n-0012b980: 7468 6572 7769 7365 2c20 7468 6520 6465 therwise, the de\n-0012b990: 6661 756c 7420 696e 7465 7266 6163 6520 fault interface \n-0012b9a0: 7365 7420 6279 2074 6865 2073 7973 7465 set by the syste\n-0012b9b0: 6d20 6164 6d69 6e69 7374 7261 746f 7220 m administrator \n-0012b9c0: 7769 6c6c 2062 6520 7573 6564 2028 6966 will be used (if\n-0012b9d0: 2061 6e79 292e 3c2f 703e 0a3c 703e 506c any).

    .

    Pl\n-0012b9e0: 6561 7365 2072 6566 6572 2074 6f20 7468 ease refer to th\n-0012b9f0: 6520 736f 636b 6574 206f 7074 696f 6e73 e socket options\n-0012ba00: 2066 6f72 203c 636f 6465 3e49 5050 524f for IPPRO\n-0012ba10: 544f 5f49 503c 2f63 6f64 653e 203c 636f TO_IP IP_MULTICAST_\n-0012ba30: 5454 4c3c 2f63 6f64 653e 2074 6f20 6c69 TTL to li\n-0012ba40: 6d69 7420 7468 6520 6c69 6665 7469 6d65 mit the lifetime\n-0012ba50: 206f 6620 7468 6520 7061 636b 6574 2e20 of the packet. \n-0012ba60: 4d75 6c74 6963 6173 7420 6461 7461 6772 Multicast datagr\n-0012ba70: 616d 7320 6172 6520 7365 6e74 2077 6974 ams are sent wit\n-0012ba80: 6820 6120 6465 6661 756c 7420 7661 6c75 h a default valu\n-0012ba90: 6520 6f66 2031 2c20 746f 2070 7265 7665 e of 1, to preve\n-0012baa0: 6e74 2074 6865 6d20 746f 2062 6520 666f nt them to be fo\n-0012bab0: 7277 6172 6465 6420 6265 796f 6e64 2074 rwarded beyond t\n-0012bac0: 6865 206c 6f63 616c 206e 6574 776f 726b he local network\n-0012bad0: 2e20 5468 6973 2070 6172 616d 6574 6572 . This parameter\n-0012bae0: 2063 616e 2062 6520 7365 7420 6265 7477 can be set betw\n-0012baf0: 6565 6e20 3120 746f 2032 3535 2e3c 2f70 een 1 to 255..

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

    .

    .C\n-0012bb70: 6c69 656e 742d 7369 6465 2072 6571 7565 lient-side reque\n-0012bb80: 7374 2d72 6573 706f 6e73 6520 5544 5020 st-response UDP \n-0012bb90: 756e 6963 6173 743c 2f68 333e 0a3c 703e unicast

    .

    \n-0012bba0: 5468 6973 2065 7861 6d70 6c65 2061 7373 This example ass\n-0012bbb0: 756d 6573 2074 6861 7420 7468 6520 696e umes that the in\n-0012bbc0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-0012bbd0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n-0012bbe0: 2069 6e63 6c75 6465 7320 7468 6520 534f includes the SO\n-0012bbf0: 4150 2048 6561 6465 7220 7769 7468 2057 AP Header with W\n-0012bc00: 532d 4164 6472 6573 7369 6e67 2065 6c65 S-Addressing ele\n-0012bc10: 6d65 6e74 7320 696d 706f 7274 6564 2077 ments imported w\n-0012bc20: 6974 6820 3c63 6f64 653e 2369 6d70 6f72 ith #impor\n-0012bc30: 7420 2277 7361 2e68 223c 2f63 6f64 653e t \"wsa.h\"\n-0012bc40: 2061 6e64 2074 6865 203c 636f 6465 3e6e and the n\n-0012bc50: 735f 5f65 6368 6f53 7472 696e 673c 2f63 s__echoString function di\n-0012bc70: 7363 7573 7365 6420 696e 2053 6563 7469 scussed in Secti\n-0012bc80: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Using \n-0012bcb0: 5753 2d41 6464 7265 7373 696e 6720 7769 WS-Addressing wi\n-0012bcc0: 7468 2053 4f41 502d 6f76 6572 2d55 4450 th SOAP-over-UDP\n-0012bcd0: 3c2f 613e 202e 3c2f 703e 0a3c 6469 7620 .

    .
    #i\n-0012bd20: 6e63 6c75 6465 2026 7175 6f74 3b70 6c75 nclude "plu\n-0012bd30: 6769 6e2f 7773 6161 7069 2e68 2671 756f gin/wsaapi.h&quo\n-0012bd40: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-0012bd50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    struct \n-0012bda0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0012bdd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n-0012be00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-0012be30: 7374 7275 6374 203c 2f73 7061 6e3e 7773 struct ws\n-0012be40: 615f 5f45 6e64 706f 696e 7452 6566 6572 a__EndpointRefer\n-0012be50: 656e 6365 5479 7065 2072 6570 6c79 546f enceType replyTo\n-0012be60: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // (anon\n-0012be80: 796d 6f75 7329 2072 6570 6c79 2061 6464 ymous) reply add\n-0012be90: 7265 7373 203c 2f73 7061 6e3e 3c2f 6469 ress .
    c\n-0012bed0: 6861 723c 2f73 7061 6e3e 202a 7265 733b har *res;\n-0012bee0: 203c 7370 616e 2063 6c61 7373 3d22 636f // server\n-0012bf00: 2072 6573 706f 6e73 6520 3c2f 7370 616e response
    .
    s\n-0012bf80: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n-0012bf90: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    soap_register_p\n-0012c040: 6c75 6769 6e3c 2f61 3e28 2661 6d70 3b3c lugin(&<\n-0012c050: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012c060: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012c070: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012c080: 736f 6170 5f77 7361 293b 3c2f 6469 763e soap_wsa);
    \n-0012c090: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.send\n-0012c120: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5\n-0012c130: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec\n-0012c150: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket \n-0012c160: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    soa\n-0012c1b0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.r\n-0012c200: 6563 765f 7469 6d65 6f75 743c 2f61 3e20 ecv_timeout \n-0012c210: 3d20 353b 203c 7370 616e 2063 6c61 7373 = 5; // 5 \n-0012c230: 7365 636f 6e64 7320 6d61 7820 736f 636b seconds max sock\n-0012c240: 6574 2064 656c 6179 203c 2f73 7061 6e3e et delay \n-0012c250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-0012c280: 2f20 7365 7420 7570 2057 532d 4164 6472 / set up WS-Addr\n-0012c290: 6573 7369 6e67 2068 6561 6465 723c 2f73 essing header
    ..
    soa\n-0012c3d0: 705f 7773 615f 6164 645f 5265 706c 7954 p_wsa_add_ReplyT\n-0012c3e0: 6f28 2661 6d70 3b3c 6120 636c 6173 733d o(&so\n-0012c410: 6170 3c2f 613e 2c20 4e55 4c4c 293b 203c ap, NULL); <\n-0012c420: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012c430: 656e 7422 3e2f 2f20 616e 6f6e 796d 6f75 ent\">// anonymou\n-0012c440: 7320 5265 706c 7954 6f20 6164 6472 6573 s ReplyTo addres\n-0012c450: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-0012c460: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012c470: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// Send a\n-0012c490: 6e64 2072 6563 6569 7665 206d 6573 7361 nd receive messa\n-0012c4a0: 6765 7320 6f76 6572 2055 4450 3a20 3c2f ges over UDP:
    .if (soap_call_ns_\n-0012c500: 5f65 6368 6f53 7472 696e 6728 2661 6d70 _echoString(&\n-0012c510: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012c540: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0012c560: 756f 743b 736f 6170 2e75 6470 3a2f 2f65 uot;soap.udp://e\n-0012c570: 6e64 706f 696e 7420 2671 756f 743b 3c2f ndpoint "SOAP action\n-0012c590: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0012c5b0: 743b 2c20 2671 756f 743b 3c2f 7370 616e t;, "hello world!",\n-0012c5f0: 2026 616d 703b 7265 7329 2920 3c2f 7370 &res))
    .
    {\n-0012c640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (soap.\n-0012c680: 6572 726f 7220 3d3d 2053 4f41 505f 454f error == SOAP_EO\n-0012c690: 4620 2661 6d70 3b26 616d 703b 2073 6f61 F && soa\n-0012c6a0: 702e 6572 726e 756d 203d 3d20 3029 203c p.errnum == 0) <\n-0012c6b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0012c6d0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012c6e0: 6e67 6c69 7465 7261 6c22 3e20 2020 202e ngliteral\"> .\n-0012c6f0: 2e2e 202f 2f20 5469 6d65 6f75 743a 206e .. // Timeout: n\n-0012c700: 6f20 7265 7370 6f6e 7365 2066 726f 6d20 o response from \n-0012c710: 7365 7276 6572 2028 6d65 7373 6167 6520 server (message \n-0012c720: 616c 7265 6164 7920 6465 6c69 7665 7265 already delivere\n-0012c730: 643f 2920 3c2f 7370 616e 3e3c 2f64 6976 d?) .
    \n-0012c770: 2020 656c 7365 203c 2f73 7061 6e3e 3c2f else .
    soap_prin\n-0012c7c0: 745f 6661 756c 7428 2661 6d70 3b73 6f61 t_fault(&soa\n-0012c7d0: 702c 2073 7464 6572 7229 3b20 3c2f 7370 p, stderr);
    .
    }
    .
    else
    .
    ... // \n-0012c8a0: 5544 5020 7365 7276 6572 2072 6573 706f UDP server respo\n-0012c8b0: 6e73 6520 6973 2073 746f 7265 6420 696e nse is stored in\n-0012c8c0: 2026 2333 393b 7265 7326 2333 393b 203c 'res' <\n-0012c8d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0012c8f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012c900: 6e67 6c69 7465 7261 6c22 3e2f 2f20 6368 ngliteral\">// ch\n-0012c910: 6563 6b20 534f 4150 2068 6561 6465 7220 eck SOAP header \n-0012c920: 7265 6365 6976 6564 2c20 6966 2061 7070 received, if app\n-0012c930: 6c69 6361 626c 6520 3c2f 7370 616e 3e3c licable <\n-0012c940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    check_header\n-0012c980: 2826 616d 703b 736f 6170 2e68 6561 6465 (&soap.heade\n-0012c990: 7229 3b20 3c2f 7370 616e 3e3c 2f64 6976 r); .
    \n-0012c9d0: 736f 6170 5f64 6573 7472 6f79 2826 616d soap_destroy(&am\n-0012c9e0: 703b 736f 6170 293b 3c2f 7370 616e 3e3c p;soap);<\n-0012c9f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_end(&am\n-0012ca30: 703b 736f 6170 293b 3c2f 7370 616e 3e3c p;soap);<\n-0012ca40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_done(&a\n-0012ca80: 6d70 3b73 6f61 7029 3b3c 2f73 7061 6e3e mp;soap);\n-0012ca90: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    .... Back to table \n-0012cad0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-0012cae0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    .Cli\n-0012cb20: 656e 742d 7369 6465 2072 6571 7565 7374 ent-side request\n-0012cb30: 2d72 6573 706f 6e73 6520 6d75 6c74 6963 -response multic\n-0012cb40: 6173 743c 2f68 333e 0a3c 703e 5468 6973 ast

    .

    This\n-0012cb50: 2065 7861 6d70 6c65 2069 7320 7369 6d69 example is simi\n-0012cb60: 6c61 7220 746f 2074 6865 2072 6571 7565 lar to the reque\n-0012cb70: 7374 2d72 6573 706f 6e73 6520 756e 6963 st-response unic\n-0012cb80: 6173 7420 6578 616d 706c 6520 6469 7363 ast example disc\n-0012cb90: 7573 7365 6420 6162 6f76 652c 2062 7574 ussed above, but\n-0012cba0: 2075 7365 7320 6120 6272 6f61 6463 6173 uses a broadcas\n-0012cbb0: 7420 6164 6472 6573 7320 616e 6420 7468 t address and th\n-0012cbc0: 6520 3c63 6f64 653e 534f 5f42 524f 4144 e SO_BROAD\n-0012cbd0: 4341 5354 3c2f 636f 6465 3e20 736f 636b CAST sock\n-0012cbe0: 6574 206f 7074 696f 6e2e 2042 6563 6175 et option. Becau\n-0012cbf0: 7365 2077 6520 6578 7065 6374 2074 6f20 se we expect to \n-0012cc00: 7265 6365 6976 6520 6d75 6c74 6970 6c65 receive multiple\n-0012cc10: 2072 6573 706f 6e73 6573 2c20 7765 2061 responses, we a\n-0012cc20: 6c73 6f20 6e65 6564 2074 6f20 7573 6520 lso need to use \n-0012cc30: 7365 7061 7261 7465 2072 6571 7565 7374 separate request\n-0012cc40: 2d72 6573 706f 6e73 6520 6d65 7373 6167 -response messag\n-0012cc50: 6573 2074 6f20 7365 6e64 206f 6e65 2072 es to send one r\n-0012cc60: 6571 7565 7374 2061 6e64 2063 6f6e 7375 equest and consu\n-0012cc70: 6d65 206d 756c 7469 706c 6520 7265 7370 me multiple resp\n-0012cc80: 6f6e 7365 732e 2049 6e20 7468 6973 2065 onses. In this e\n-0012cc90: 7861 6d70 6c65 2077 6520 6465 6669 6e65 xample we define\n-0012cca0: 6420 6120 3c63 6f64 653e 6263 6173 7453 d a bcastS\n-0012ccb0: 7472 696e 673c 2f63 6f64 653e 2072 6571 tring req\n-0012ccc0: 7565 7374 2061 6e64 2061 203c 636f 6465 uest and a bcastStringResp\n-0012cce0: 6f6e 7365 3c2f 636f 6465 3e20 7265 7370 onse resp\n-0012ccf0: 6f6e 7365 206d 6573 7361 6765 2c20 7768 onse message, wh\n-0012cd00: 6963 6820 6172 6520 6573 7365 6e74 6961 ich are essentia\n-0012cd10: 6c6c 7920 6465 636c 6172 6564 2061 7320 lly declared as \n-0012cd20: 6f6e 652d 7761 7920 6d65 7373 6167 6573 one-way messages\n-0012cd30: 2069 6e20 7468 6520 6865 6164 6572 2066 in the header f\n-0012cd40: 696c 653a 3c2f 703e 0a3c 6469 7620 636c ile:

    .
    <\n-0012cd60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012cd70: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-0012cd90: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n-0012cda0: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: \n-0012cdb0: 2020 2020 2020 2062 6361 7374 5374 7269 bcastStri\n-0012cdc0: 6e67 2077 7361 5f5f 4d65 7373 6167 6549 ng wsa__MessageI\n-0012cdd0: 4420 3c2f 7370 616e 3e3c 2f64 6976 3e0a D
    .\n-0012cde0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-0012ce10: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n-0012ce20: 642d 6865 6164 6572 2d70 6172 743a 2020 d-header-part: \n-0012ce30: 2020 2020 2020 2020 6263 6173 7453 7472 bcastStr\n-0012ce40: 696e 6720 7773 615f 5f54 6f20 3c2f 7370 ing wsa__To
    .
    //gsoap ns ser\n-0012ce90: 7669 6365 206d 6574 686f 642d 6865 6164 vice method-head\n-0012cea0: 6572 2d70 6172 743a 2020 2020 2020 2020 er-part: \n-0012ceb0: 2020 6263 6173 7453 7472 696e 6720 7773 bcastString ws\n-0012cec0: 615f 5f41 6374 696f 6e20 3c2f 7370 616e a__Action
    .
    \n-0012cf00: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-0012cf10: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header\n-0012cf20: 2d70 6172 743a 2020 2020 2020 2020 2020 -part: \n-0012cf30: 6263 6173 7453 7472 696e 6720 7773 615f bcastString wsa_\n-0012cf40: 5f52 6570 6c79 546f 203c 2f73 7061 6e3e _ReplyTo \n-0012cf50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n-0012cf90: 5f5f 6263 6173 7453 7472 696e 6728 3c73 __bcastString(char *str, void)\n-0012cff0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    //gsoap ns serv\n-0012d030: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade\n-0012d040: 722d 7061 7274 3a20 2020 2020 2020 2020 r-part: \n-0012d050: 2062 6361 7374 5374 7269 6e67 5265 7370 bcastStringResp\n-0012d060: 6f6e 7365 2077 7361 5f5f 4d65 7373 6167 onse wsa__Messag\n-0012d070: 6549 4420 3c2f 7370 616e 3e3c 2f64 6976 eID .
    //gsoa\n-0012d0b0: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n-0012d0c0: 686f 642d 6865 6164 6572 2d70 6172 743a hod-header-part:\n-0012d0d0: 2020 2020 2020 2020 2020 6263 6173 7453 bcastS\n-0012d0e0: 7472 696e 6752 6573 706f 6e73 6520 7773 tringResponse ws\n-0012d0f0: 615f 5f54 6f20 3c2f 7370 616e 3e3c 2f64 a__To .
    //gs\n-0012d130: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n-0012d140: 6574 686f 642d 6865 6164 6572 2d70 6172 ethod-header-par\n-0012d150: 743a 2020 2020 2020 2020 2020 6263 6173 t: bcas\n-0012d160: 7453 7472 696e 6752 6573 706f 6e73 6520 tStringResponse \n-0012d170: 7773 615f 5f41 6374 696f 6e20 3c2f 7370 wsa__Action
    .
    //gsoap ns ser\n-0012d1c0: 7669 6365 206d 6574 686f 642d 6865 6164 vice method-head\n-0012d1d0: 6572 2d70 6172 743a 2020 2020 2020 2020 er-part: \n-0012d1e0: 2020 6263 6173 7453 7472 696e 6752 6573 bcastStringRes\n-0012d1f0: 706f 6e73 6520 7773 615f 5f52 656c 6174 ponse wsa__Relat\n-0012d200: 6573 546f 203c 2f73 7061 6e3e 3c2f 6469 esTo .
    i\n-0012d240: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6263 nt ns__bc\n-0012d250: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons\n-0012d260: 6528 3c73 7061 6e20 636c 6173 733d 226b e(char\n-0012d280: 3c2f 7370 616e 3e20 2a72 6573 2c20 3c73 *res, void);
    .

    To obtain \n-0012d2e0: 7265 7370 6f6e 7365 206f 6e65 2d77 6179 response one-way\n-0012d2f0: 206f 7065 7261 7469 6f6e 732c 2075 7365 operations, use\n-0012d300: 203c 6120 6872 6566 3d22 2377 7364 6c32 ws\n-0012d320: 646c 3268 202d 623c 2f63 6f64 653e 3c2f dl2h -b option -b\n-0012d350: 3c2f 613e 2e3c 2f70 3e0a 3c70 3e54 6865 .

    .

    The\n-0012d360: 2063 6c69 656e 7420 636f 6465 2069 6e63 client code inc\n-0012d370: 6c75 6465 7320 6120 6c6f 6f70 2074 6f20 ludes a loop to \n-0012d380: 7265 6365 6976 6520 7265 7370 6f6e 7365 receive response\n-0012d390: 206d 6573 7361 6765 7320 756e 7469 6c20 messages until \n-0012d3a0: 6120 7469 6d65 6f75 7420 6f63 6375 7273 a timeout occurs\n-0012d3b0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ\n-0012d400: 6520 2671 756f 743b 706c 7567 696e 2f77 e "plugin/w\n-0012d410: 7361 6170 692e 6826 7175 6f74 3b3c 2f73 saapi.h"
    .
    .
    str\n-0012d470: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    struc\n-0012d510: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t SOAP_ENV_\n-0012d560: 5f48 6561 6465 723c 2f61 3e20 6865 6164 _Header head\n-0012d570: 6572 3b20 3c2f 6469 763e 0a3c 6469 7620 er;
    .
    struct wsa__EndpointRe\n-0012d5c0: 6665 7265 6e63 6554 7970 6520 7265 706c ferenceType repl\n-0012d5d0: 7954 6f3b 203c 2f64 6976 3e0a 3c64 6976 yTo;
    .char *res;
    \n-0012d620: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_ini\n-0012d690: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); ..
    soap.connect_fla\n-0012d830: 6773 3c2f 613e 203d 2053 4f5f 4252 4f41 gs = SO_BROA\n-0012d840: 4443 4153 543b 203c 2f64 6976 3e0a 3c64 DCAST;
    .\n-0012d860: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-0012d890: 3c61 2063 6c61 7373 3d22 636f 6465 2220 send_ti\n-0012d8e0: 6d65 6f75 743c 2f61 3e20 3d20 353b 203c meout = 5; <\n-0012d8f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012d900: 656e 7422 3e2f 2f20 3520 7365 636f 6e64 ent\">// 5 second\n-0012d910: 7320 6d61 7820 736f 636b 6574 2064 656c s max socket del\n-0012d920: 6179 203c 2f73 7061 6e3e 3c2f 6469 763e ay
    \n-0012d930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.recv\n-0012d9c0: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5\n-0012d9d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec\n-0012d9f0: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket \n-0012da00: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    // s\n-0012da40: 6574 2075 7020 5753 2d41 6464 7265 7373 et up WS-Address\n-0012da50: 696e 6720 6865 6164 6572 3c2f 7370 616e ing header
    .
    soap_w\n-0012da80: 7361 5f72 6571 7565 7374 2826 616d 703b sa_request(&\n-0012da90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012dac0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0012dae0: 6f74 3b6d 6573 7361 6765 2049 4426 7175 ot;message ID&qu\n-0012daf0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "en\n-0012db20: 6470 6f69 6e74 2671 756f 743b 3c2f 7370 dpoint", "SOAP acti\n-0012db60: 6f6e 2671 756f 743b 3c2f 7370 616e 3e29 on")\n-0012db70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_w\n-0012db90: 7361 5f61 6464 5f52 6570 6c79 546f 2826 sa_add_ReplyTo(&\n-0012dba0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-0012dbd0: 2f61 3e2c 204e 554c 4c29 3b20 3c73 7061 /a>, NULL); // anonymous R\n-0012dc00: 6570 6c79 546f 2061 6464 7265 7373 3c2f eplyTo address
    .if (soap_send_ns_\n-0012dc60: 5f62 6361 7374 5374 7269 6e67 2826 616d _bcastString(&am\n-0012dc70: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, &\n-0012dcc0: 7175 6f74 3b73 6f61 702e 7564 703a 2f2f quot;soap.udp://\n-0012dcd0: 656e 6470 6f69 6e74 2671 756f 743b 3c2f endpoint", "SOAP ac\n-0012dd10: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion", &\n-0012dd40: 7175 6f74 3b68 656c 6c6f 2077 6f72 6c64 quot;hello world\n-0012dd50: 2126 7175 6f74 3b3c 2f73 7061 6e3e 2929 !"))\n-0012dd60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    while (1)
    . \n-0012df10: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .. \n-0012dfd0: 2020 2020 203c 7370 616e 2063 6c61 7373 b\n-0012dff0: 7265 616b 3c2f 7370 616e 3e3b 203c 2f64 reak; .
    ... // Got respo\n-0012e040: 6e73 6520 2623 3339 3b72 6573 2623 3339 nse 'res'\n-0012e050: 3b20 6672 6f6d 2061 2073 6572 7665 7220 ; from a server \n-0012e060: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0012e080: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n-0012e0a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0012e0b0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n-0012e0f0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.err\n-0012e140: 6f72 3c2f 613e 203d 3d20 3c61 2063 6c61 or == SO\n-0012e1a0: 4150 5f45 4f46 3c2f 613e 2026 616d 703b AP_EOF &\n-0012e1b0: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & soa\n-0012e1e0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.e\n-0012e230: 7272 6e75 6d3c 2f61 3e20 3d3d 2030 2920 rrnum == 0) \n-0012e240: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n-0012e260: 203c 7370 616e 2063 6c61 7373 3d22 636f // Timeou\n-0012e280: 743a 206e 6f20 6d6f 7265 206d 6573 7361 t: no more messa\n-0012e290: 6765 7320 7265 6365 6976 6564 203c 2f73 ges received
    .
    <\n-0012e2c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0012e2d0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n-0012e300: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-0012e360: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n-0012e370: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012e380: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012e390: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012e3a0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-0012e3b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    ..\n-0012e480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n-0012e530: 0a3c 6469 7620 636c 6173 733d 226c 696e .

    Not\n-0012e600: 6520 7468 6174 2061 2073 6572 7665 7220 e that a server \n-0012e610: 666f 7220 7468 6520 3c63 6f64 653e 6263 for the bc\n-0012e620: 6173 7453 7472 696e 673c 2f63 6f64 653e astString\n-0012e630: 2064 6f65 7320 6e6f 7420 6e65 6564 2074 does not need t\n-0012e640: 6f20 7573 6520 7477 6f2d 6f6e 6520 7761 o use two-one wa\n-0012e650: 7920 6d65 7373 6167 6573 2e20 5468 7573 y messages. Thus\n-0012e660: 2c20 6d75 6c74 6963 6173 7420 7265 7175 , multicast requ\n-0012e670: 6573 742d 7265 7370 6f6e 7365 206d 6573 est-response mes\n-0012e680: 7361 6765 2070 6174 7465 726e 2063 616e sage pattern can\n-0012e690: 2062 6520 6465 636c 6172 6564 2061 6e64 be declared and\n-0012e6a0: 2069 6d70 6c65 6d65 6e74 6564 2061 7320 implemented as \n-0012e6b0: 7265 7175 6573 742d 7265 7370 6f6e 7365 request-response\n-0012e6c0: 206f 7065 7261 7469 6f6e 7320 6174 2074 operations at t\n-0012e6d0: 6865 2073 6572 7665 7220 7369 6465 2e3c he server side.<\n-0012e6e0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .SOAP-over-\n-0012e750: 5544 5020 7365 7276 6572 3c2f 6832 3e0a UDP server

    .\n-0012e760: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n-0012e770: 2065 7861 6d70 6c65 2063 6f64 6520 696c example code il\n-0012e780: 6c75 7374 7261 7465 7320 6120 534f 4150 lustrates a SOAP\n-0012e790: 2d6f 7665 722d 5544 5020 7365 7276 6572 -over-UDP server\n-0012e7a0: 2066 6f72 206f 6e65 2d77 6179 203c 636f for one-way sendString and request\n-0012e7d0: 2d72 6573 706f 6e73 6520 3c63 6f64 653e -response \n-0012e7e0: 6563 686f 5374 7269 6e67 3c2f 636f 6465 echoString messages. This\n-0012e800: 2065 7861 6d70 6c65 2061 7373 756d 6573 example assumes\n-0012e810: 2074 6861 7420 7468 6520 696e 7465 7266 that the interf\n-0012e820: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-0012e830: 696e 636c 7564 6573 2074 6865 2053 4f41 includes the SOA\n-0012e840: 5020 4865 6164 6572 2077 6974 6820 5753 P Header with WS\n-0012e850: 2d41 6464 7265 7373 696e 6720 656c 656d -Addressing elem\n-0012e860: 656e 7473 2069 6d70 6f72 7465 6420 7769 ents imported wi\n-0012e870: 7468 203c 636f 6465 3e23 696d 706f 7274 th #import\n-0012e880: 2022 7773 612e 6822 3c2f 636f 6465 3e20 \"wsa.h\" \n-0012e890: 616e 6420 7468 6520 3c63 6f64 653e 6e73 and the ns\n-0012e8a0: 5f5f 6563 686f 5374 7269 6e67 3c2f 636f __echoString function dis\n-0012e8c0: 6375 7373 6564 2069 6e20 5365 6374 696f cussed in Sectio\n-0012e8d0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Using W\n-0012e900: 532d 4164 6472 6573 7369 6e67 2077 6974 S-Addressing wit\n-0012e910: 6820 534f 4150 2d6f 7665 722d 5544 503c h SOAP-over-UDP<\n-0012e920: 2f61 3e20 2e3c 2f70 3e0a 3c64 6976 2063 /a> .

    .
    \n-0012e940: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n-0012e970: 636c 7564 6520 2671 756f 743b 706c 7567 clude "plug\n-0012e980: 696e 2f77 7361 6170 692e 6826 7175 6f74 in/wsaapi.h"\n-0012e990: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n-0012e9a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012e9b0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-0012e9f0: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    .\n-0012ea10: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-0012ea50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0012ea80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n-0012eab0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_init1(\n-0012eb30: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-0012eb60: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , SOAP_IO\n-0012ebc0: 5f55 4450 3c2f 613e 293b 203c 7370 616e _UDP); // must set UDP\n-0012ebf0: 2066 6c61 6720 3c2f 7370 616e 3e3c 2f64 flag .. \n-0012ece0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // bind to\n-0012ed00: 2068 6f73 7420 284e 554c 4c20 3d20 6375 host (NULL = cu\n-0012ed10: 7272 656e 7420 686f 7374 2920 616e 6420 rrent host) and \n-0012ed20: 706f 7274 3a20 3c2f 7370 616e 3e3c 2f64 port: .
    if (!\n-0012edc0: 736f 6170 5f76 616c 6964 5f73 6f63 6b65 soap_valid_socke\n-0012edd0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soap_bind<\n-0012ee30: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0012ee60: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, host, port, \n-0012ef10: 4241 434b 4c4f 4729 2929 203c 2f64 6976 BACKLOG))) .
    {
    .\n-0012ef50: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n-0012efb0: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(&\n-0012efc0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012eff0: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    exit(EXI\n-0012f020: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    }
    .\n-0012f050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    wh\n-0012f080: 696c 653c 2f73 7061 6e3e 2028 3129 3c2f ile (1).
    {
    \n-0012f0b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (soap\n-0012f140: 5f73 6572 7665 3c2f 613e 2826 616d 703b _serve(&\n-0012f150: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0012f180: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    \n-0012f1a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n-0012f200: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n-0012f240: 7464 6572 7229 3b20 3c73 7061 6e20 636c tderr); //\n-0012f260: 2072 6570 6f72 7420 7468 6520 7072 6f62 report the prob\n-0012f270: 6c65 6d20 3c2f 7370 616e 3e3c 2f64 6976 lem .
    soa\n-0012f2f0: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a\n-0012f300: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    . \n-0012f350: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n-0012f3b0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0012f3e0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    }
    .<\n-0012f410: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f420: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_don\n-0012f480: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap); // close conn\n-0012f4e0: 6563 7469 6f6e 203c 2f73 7061 6e3e 3c2f ection .
    }
    .\n-0012f510: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n-0012f560: 206e 735f 5f65 6368 6f53 7472 696e 6728 ns__echoString(\n-0012f570: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-0012f5c0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-0012f5f0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n-0012f610: 6368 6172 3c2f 7370 616e 3e20 2a73 7472 char *str\n-0012f620: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n-0012f640: 3c2f 7370 616e 3e20 2a2a 7265 7329 203c **res) <\n-0012f650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-0012f670: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // che\n-0012f6a0: 636b 2069 6620 5753 2d41 6464 7265 7373 ck if WS-Address\n-0012f6b0: 696e 6720 6865 6164 6572 7320 6172 6520 ing headers are \n-0012f6c0: 7072 6573 656e 7420 616e 6420 636f 7272 present and corr\n-0012f6d0: 6563 743c 2f73 7061 6e3e 3c2f 6469 763e ect
    \n-0012f6e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-0012f710: 663c 2f73 7061 6e3e 2028 736f 6170 5f77 f (soap_w\n-0012f720: 7361 5f63 6865 636b 283c 6120 636c 6173 sa_check(\n-0012f750: 736f 6170 3c2f 613e 2929 3c2f 6469 763e soap))
    \n-0012f760: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return <\n-0012f7a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012f7b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012f7c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0012f7d0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-0012f820: 723c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 r;
    . \n-0012f840: 203c 7370 616e 2063 6c61 7373 3d22 636f // should\n-0012f860: 2063 6865 636b 2066 6f72 2064 7570 6c69 check for dupli\n-0012f870: 6361 7465 206d 6573 7361 6765 7320 2873 cate messages (s\n-0012f880: 6f6d 6574 6869 6e67 2074 6861 7420 5753 omething that WS\n-0012f890: 2d52 656c 6961 626c 654d 6573 7361 6769 -ReliableMessagi\n-0012f8a0: 6e67 2064 6f65 7320 746f 6f29 3c2f 7370 ng does too)
    .
    if (check_receive\n-0012f900: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap->h\n-0012f980: 6561 6465 723c 2f61 3e2d 2667 743b 7773 eader->ws\n-0012f990: 615f 5f4d 6573 7361 6765 4944 2929 203c a__MessageID)) <\n-0012f9a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    //\n-0012f9f0: 2052 6571 7565 7374 206d 6573 7361 6765 Request message\n-0012fa00: 2061 6c72 6561 6479 2072 6563 6569 7665 already receive\n-0012fa10: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n-0012fa20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-0012fa50: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_STOP;\n-0012fac0: 203c 7370 616e 2063 6c61 7373 3d22 636f // don\n-0012fae0: 393b 7420 7265 7475 726e 2072 6573 706f 9;t return respo\n-0012faf0: 6e73 6520 3c2f 7370 616e 3e3c 2f64 6976 nse .
    }
    .<\n-0012fb20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012fb30: 3e20 202a 7265 7320 3d20 7374 723b 203c > *res = str; <\n-0012fb40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-0012fb70: 2f2f 2072 6574 7572 6e20 4f4b 2077 6974 // return OK wit\n-0012fb80: 6820 5753 2d41 6464 7265 7373 696e 6720 h WS-Addressing \n-0012fb90: 7265 706c 7920 6865 6164 6572 732c 206d reply headers, m\n-0012fba0: 6573 7361 6765 2049 4420 6973 2069 645f essage ID is id_\n-0012fbb0: 636f 756e 742b 313c 2f73 7061 6e3e 3c2f count+1.
    return\n-0012fc00: 2073 6f61 705f 7773 615f 7265 706c 7928 soap_wsa_reply(\n-0012fc10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012fc40: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_int2s\n-0012fca0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0012fcd0: 2c20 6964 5f63 6f75 6e74 2b2b 292c 203c , id_count++), <\n-0012fce0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012fcf0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0012fd00: 3b68 7474 703a 2f2f 6765 6e69 7669 612e ;http://genivia.\n-0012fd10: 636f 6d2f 7564 702f 6563 686f 5374 7269 com/udp/echoStri\n-0012fd20: 6e67 5265 7370 6f6e 7365 2671 756f 743b ngResponse"\n-0012fd30: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    .\n-0012fd40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int ns__\n-0012fdb0: 7365 6e64 5374 7269 6e67 283c 7370 616e sendString(struct <\n-0012fde0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012fdf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012fe00: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-0012fe10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012fe40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0012fe60: 2f73 7061 6e3e 202a 7374 7229 203c 2f64 /span> *str) .
    {
    .\n-0012fea0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_wsa_\n-0012fed0: 6368 6563 6b28 3c61 2063 6c61 7373 3d22 check(soa\n-0012ff00: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
    .\n-0012ff20: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-0012ff40: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn soap->\n-0012ff80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error;
    .
    // should ch\n-00130010: 6563 6b20 666f 7220 6475 706c 6963 6174 eck for duplicat\n-00130020: 6520 6d65 7373 6167 6573 203c 2f73 7061 e messages
    .
    if\n-00130070: 2028 6368 6563 6b5f 7265 6365 6976 6564 (check_received\n-00130080: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001300b0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->he\n-00130100: 6164 6572 3c2f 613e 2d26 6774 3b77 7361 ader->wsa\n-00130110: 5f5f 4d65 7373 6167 6549 4429 2920 3c2f __MessageID)) .
    {
    \n-00130140: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n-00130170: 5265 7175 6573 7420 6d65 7373 6167 6520 Request message \n-00130180: 616c 7265 6164 7920 7265 6365 6976 6564 already received\n-00130190: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001301a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001301b0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-001301d0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_STOP;<\n-00130240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    return <\n-001302a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001302b0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001302c0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-001302d0: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n-001302e0: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n-001302f0: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b3c 0\">SOAP_OK;<\n-00130300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n-00130320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int ns__sendString\n-00130380: 5265 7370 6f6e 7365 283c 7370 616e 2063 Response(s\n-001303a0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-00130410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00130420: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *res) .
    {
    . \n-00130470: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00130490: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-001304f0: 5f4e 4f5f 4d45 5448 4f44 3c2f 613e 3b20 _NO_METHOD; \n-00130500: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // we don&\n-00130520: 2333 393b 7420 7365 7276 6520 7468 6973 #39;t serve this\n-00130530: 206f 7065 7261 7469 6f6e 3c2f 7370 616e operation
    .
    }.
    S\n-00130610: 4f41 505f 494f 5f55 4450 3c2f 613e 3c2f OAP_IO_UDP
    #define \n-00130640: 534f 4150 5f49 4f5f 5544 503c 2f64 6976 SOAP_IO_UDP
    soap_mode IO\n-00130670: 2069 6e70 7574 2f6f 7574 7075 7420 666c input/output fl\n-00130680: 6167 2076 616c 7565 2074 6f20 7573 6520 ag value to use \n-00130690: 5544 5020 6461 7461 6772 616d 732c 206d UDP datagrams, m\n-001306a0: 6573 7361 6765 2073 697a 6520 6973 206c essage size is l\n-001306b0: 696d 6974 6564 2074 6f20 5544 5020 7061 imited to UDP pa\n-001306c0: 636b 6574 2073 697a 653c 2f64 6976 3e3c cket size
    <\n-001306d0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-001306e0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-001306f0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-00130700: 3135 3936 3c2f 6469 763e 3c2f 6469 763e 1596
    \n-00130710: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    const char * s\n-001307f0: 6f61 705f 696e 7432 7328 7374 7275 6374 oap_int2s(struct\n-00130800: 2073 6f61 7020 2a73 6f61 702c 2069 6e74 soap *soap, int\n-00130810: 2076 616c 7565 293c 2f64 6976 3e3c 6469 value)
    \n-00130830: 436f 6e76 6572 7420 6120 7369 676e 6564 Convert a signed\n-00130840: 2033 3220 6269 7420 696e 7465 6765 7220 32 bit integer \n-00130850: 746f 2061 2064 6563 696d 616c 2073 7472 to a decimal str\n-00130860: 696e 672e 3c2f 6469 763e 3c2f 6469 763e ing.
    \n-00130870: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The s\n-00130890: 6572 7665 7220 6269 6e64 7320 746f 2061 erver binds to a\n-001308a0: 2068 6f73 7420 616e 6420 706f 7274 2061 host and port a\n-001308b0: 6e64 2061 6363 6570 7473 206d 6573 7361 nd accepts messa\n-001308c0: 6765 7320 696e 2061 206c 6f6f 702e 2042 ges in a loop. B\n-001308d0: 6563 6175 7365 2055 4450 2064 6f65 7320 ecause UDP does \n-001308e0: 6e6f 7420 6861 7665 2074 6865 2065 7175 not have the equ\n-001308f0: 6976 616c 656e 7420 6f66 2061 6e20 6163 ivalent of an ac\n-00130900: 6365 7074 2c20 7468 6520 6d65 7373 6167 cept, the messag\n-00130910: 6573 2063 616e 6e6f 7420 6265 2064 6973 es cannot be dis\n-00130920: 7061 7463 6865 6420 746f 2074 6872 6561 patched to threa\n-00130930: 6473 2e20 496e 7374 6561 6420 7468 6520 ds. Instead the \n-00130940: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_serve<\n-001309c0: 2f61 3e3c 2f63 6f64 653e 2077 6169 7473 /a> waits\n-001309d0: 2066 6f72 2061 206d 6573 7361 6765 2061 for a message a\n-001309e0: 6e64 2069 6d6d 6564 6961 7465 6c79 2061 nd immediately a\n-001309f0: 6363 6570 7473 2069 742e 2059 6f75 2063 ccepts it. You c\n-00130a00: 616e 2075 7365 2061 2072 6563 6569 7665 an use a receive\n-00130a10: 2074 696d 656f 7574 2076 616c 7565 2066 timeout value f\n-00130a20: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap::recv_t\n-00130ae0: 696d 656f 7574 3c2f 613e 3c2f 636f 6465 imeout to make \n-00130b00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n-00130b70: 6f61 705f 7365 7276 653c 2f61 3e3c 2f63 oap_serve non-blockin\n-00130b90: 672e 3c2f 703e 0a3c 703e 546f 206f 6274 g.

    .

    To obt\n-00130ba0: 6169 6e20 7265 7370 6f6e 7365 206f 6e65 ain response one\n-00130bb0: 2d77 6179 206f 7065 7261 7469 6f6e 7320 -way operations \n-00130bc0: 6672 6f6d 2061 2057 5344 4c2c 2075 7365 from a WSDL, use\n-00130bd0: 203c 6120 6872 6566 3d22 2377 7364 6c32 ws\n-00130bf0: 646c 3268 202d 623c 2f63 6f64 653e 3c2f dl2h -b option -b\n-00130c20: 3c2f 613e 2e20 5468 6973 2070 726f 6475 . This produ\n-00130c30: 6365 7320 6164 6469 7469 6f6e 616c 206f ces additional o\n-00130c40: 6e65 2d77 6179 206f 7065 7261 7469 6f6e ne-way operation\n-00130c50: 7320 746f 2073 7570 706f 7274 2061 7379 s to support asy\n-00130c60: 6e63 6872 6f6e 6f75 7320 6861 6e64 6c69 nchronous handli\n-00130c70: 6e67 206f 6620 7265 7370 6f6e 7365 206d ng of response m\n-00130c80: 6573 7361 6765 7320 696e 2074 6865 2073 essages in the s\n-00130c90: 616d 6520 7761 7920 7265 7175 6573 7473 ame way requests\n-00130ca0: 2061 7265 2068 616e 646c 6564 2e3c 2f70 are handled..

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

    .

    .SOA\n-00130d20: 502d 6f76 6572 2d55 4450 206d 756c 7469 P-over-UDP multi\n-00130d30: 6361 7374 2072 6563 6569 7669 6e67 2073 cast receiving s\n-00130d40: 6572 7665 723c 2f68 333e 0a3c 703e 466f erver

    .

    Fo\n-00130d50: 7220 5544 5020 6d75 6c74 6963 6173 7420 r UDP multicast \n-00130d60: 7375 7070 6f72 742c 2066 6f6c 6c6f 7720 support, follow \n-00130d70: 7468 6520 7375 6767 6573 7469 6f6e 7320 the suggestions \n-00130d80: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section SOAP-over\n-00130dc0: 2d55 4450 2073 6572 7665 723c 2f61 3e20 -UDP server \n-00130dd0: 616e 6420 6368 616e 6765 2074 6865 2069 and change the i\n-00130de0: 6e69 7469 616c 697a 6174 696f 6e20 7061 nitialization pa\n-00130df0: 7274 7320 6f66 2074 6865 2063 6f64 6520 rts of the code \n-00130e00: 746f 2065 6e61 626c 6520 5544 5020 6d75 to enable UDP mu\n-00130e10: 6c74 6963 6173 7420 706f 7274 2062 696e lticast port bin\n-00130e20: 6469 6e67 2062 7920 746f 2074 656c 6c69 ding by to telli\n-00130e30: 6e67 2074 6865 206b 6572 6e65 6c20 7768 ng the kernel wh\n-00130e40: 6963 6820 6d75 6c74 6963 6173 7420 6772 ich multicast gr\n-00130e50: 6f75 7073 2079 6f75 2061 7265 2069 6e74 oups you are int\n-00130e60: 6572 6573 7465 6420 696e 3a3c 2f70 3e0a erested in:

    .\n-00130e70: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n-00130ec0: 743b 706c 7567 696e 2f77 7361 6170 692e t;plugin/wsaapi.\n-00130ed0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 3c2f h".
    .<\n-00130f00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00130f10: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main() .
    {
    .\n-00130f70: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-00130f90: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-00130fc0: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa\n-00130ff0: 703c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 p;
    .\n-00131010: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-00131030: 2f73 7061 6e3e 6970 5f6d 7265 7120 6d63 /span>ip_mreq mc\n-00131040: 6173 743b 203c 2f64 6976 3e0a 3c64 6976 ast;
    . \n-00131060: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_init1<\n-001310c0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-001310f0: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, SOA\n-00131150: 505f 494f 5f55 4450 3c2f 613e 293b 203c P_IO_UDP); <\n-00131160: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n-00131240: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!soap_v\n-001312c0: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket(\n-001312d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-00131320: 736f 6170 5f62 696e 643c 2f61 3e28 2661 soap_bind(&a\n-00131330: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, host, port, \n-00131370: 4241 434b 4c4f 4729 2929 203c 2f64 6976 BACKLOG))) .
    {
    .\n-001313b0: 2020 2020 3c61 2063 6c61 7373 3d22 636f
    soap_prin\n-00131410: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(&\n-00131420: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-00131450: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    exit(EXI\n-00131480: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    }
    .\n-001314b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    mcast.imr_mu\n-001314d0: 6c74 6961 6464 722e 735f 6164 6472 203d ltiaddr.s_addr =\n-001314e0: 2069 6e65 745f 6164 6472 2870 7574 2049 inet_addr(put I\n-001314f0: 5020 6d75 6c74 6963 6173 7420 6164 6472 P multicast addr\n-00131500: 6573 7320 6f66 2067 726f 7570 2068 6572 ess of group her\n-00131510: 6529 3b20 3c2f 6469 763e 0a3c 6469 7620 e);
    .
    m\n-00131530: 6361 7374 2e69 6d72 5f69 6e74 6572 6661 cast.imr_interfa\n-00131540: 6365 2e73 5f61 6464 7220 3d20 6874 6f6e ce.s_addr = hton\n-00131550: 6c28 494e 4144 4452 5f41 4e59 293b 203c l(INADDR_ANY); <\n-00131560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (s\n-001315a0: 6574 736f 636b 6f70 7428 3c61 2063 6c61 etsockopt(soap.master, I\n-00131630: 5050 524f 544f 5f49 502c 2049 505f 4144 PPROTO_IP, IP_AD\n-00131640: 445f 4d45 4d42 4552 5348 4950 2c20 2661 D_MEMBERSHIP, &a\n-00131650: 6d70 3b6d 6361 7374 2c20 3c73 7061 6e20 mp;mcast, \n-00131670: 7369 7a65 6f66 3c2f 7370 616e 3e28 6d63 sizeof(mc\n-00131680: 6173 7429 2926 6c74 3b30 2920 3c2f 6469 ast))<0) .
    ... // error
    .
    ...\n-001316f0: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-00131710: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n-001317e0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n-00131840: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-00131870: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n-00131880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-001318f0: 6f6e 653c 2f61 3e28 2661 6d70 3b3c 6120 one(&soap);.
    }
    .<\n-00131950: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00131960: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-00131970: 6874 6d6c 5f61 6236 3439 6238 6633 6237 html_ab649b8f3b7\n-00131980: 3130 3831 6431 3465 6336 3335 3061 6234 1081d14ec6350ab4\n-00131990: 6230 3637 3934 223e 3c64 6976 2063 6c61 b06794\">SOAP_SOCKET ma\n-00131a20: 7374 6572 3c2f 6469 763e 3c64 6976 2063 ster
    The\n-00131a40: 2073 6f63 6b65 7420 7365 7420 6279 2073 socket set by s\n-00131a50: 6f61 705f 6269 6e64 2028 6f72 2074 6865 oap_bind (or the\n-00131a60: 2043 2b2b 2073 6572 7669 6365 2063 6c61 C++ service cla\n-00131a70: 7373 2062 696e 6420 6d65 7468 6f64 2920 ss bind method) \n-00131a80: 746f 2073 6572 7665 2061 7320 7468 6520 to serve as the \n-00131a90: 6d61 7374 6572 2073 6f63 6b65 7420 626f master socket bo\n-00131aa0: 756e 2e2e 2e3c 2f64 6976 3e3c 6469 7620 un...
    Definition:\n-00131ad0: 2073 7464 736f 6170 322e 683a 3330 3233 stdsoap2.h:3023\n-00131ae0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    .... Back to \n-00131b20: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n-00131b30: 733c 2f61 3e3c 2f70 3e0a 3c68 313e 3c61 s

    .

    .Compile-\n-00131b70: 7469 6d65 2066 6c61 6773 3c2f 6831 3e0a time flags

    .\n-00131b80: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n-00131b90: 206d 6163 726f 7320 6172 6520 6465 6669 macros are defi\n-00131ba0: 6e65 6420 696e 2074 6865 2041 5049 2064 ned in the API d\n-00131bb0: 6f63 756d 656e 7461 7469 6f6e 204d 6f64 ocumentation Mod\n-00131bc0: 756c 6520 3c61 2063 6c61 7373 3d22 656c ule WITH_MACRO comp\n-00131c00: 696c 652d 7469 6d65 2066 6c61 6773 3c2f ile-time flags. These macros\n-00131c20: 2061 7265 2075 7365 6420 746f 2065 6e61 are used to ena\n-00131c30: 626c 6520 6f72 2064 6973 6162 6c65 2066 ble or disable f\n-00131c40: 6561 7475 7265 7320 6173 2073 7065 6369 eatures as speci\n-00131c50: 6669 6564 2062 656c 6f77 2c20 6279 2063 fied below, by c\n-00131c60: 6f6d 7069 6c69 6e67 2073 6f75 7263 6520 ompiling source \n-00131c70: 636f 6465 2066 696c 6573 2077 6974 6820 code files with \n-00131c80: 636f 6d70 696c 6572 206f 7074 696f 6e20 compiler option \n-00131c90: 3c62 3e3c 636f 6465 3e2d 443c 2f63 6f64 -D to set th\n-00131cb0: 6520 6d61 6372 6f3a 3c2f 703e 0a3c 7461 e macro:

    ...defi\n-00131d20: 6e65 2020 203c 2f74 683e 3c74 6820 636c ne resu\n-00131d50: 6c74 2020 2020 3c2f 7468 3e3c 2f74 723e lt \n-00131d60: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAPD\n-00131db0: 4546 535f 483c 2f63 6f64 653e 2020 203c EFS_H <\n-00131dc0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>the header\n-00131df0: 2066 696c 6520 746f 2069 6e63 6c75 6465 file to include\n-00131e00: 2c20 6966 2064 6966 6665 7265 6e74 2066 , if different f\n-00131e10: 726f 6d20 3c63 6f64 653e 736f 6170 6465 rom soapde\n-00131e20: 6673 2e68 3c2f 636f 6465 3e20 2020 203c fs.h <\n-00131e30: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#WITH_SOAPDE\n-00131e90: 4653 5f48 3c2f 636f 6465 3e20 2020 3c2f FS_H includes th\n-00131ed0: 6520 3c63 6f64 653e 736f 6170 6465 6673 e soapdefs\n-00131ee0: 2e68 3c2f 636f 6465 3e20 6669 6c65 2066 .h file f\n-00131ef0: 6f72 2063 7573 746f 6d20 7365 7474 696e or custom settin\n-00131f00: 6773 2c20 7365 6520 5365 6374 696f 6e20 gs, see Section \n-00131f10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Using t\n-00131f40: 6865 2073 6f61 7064 6566 732e 6820 6865 he soapdefs.h he\n-00131f50: 6164 6572 2066 696c 653c 2f61 3e20 2020 ader file \n-00131f60: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-00131fb0: 636f 6465 3e23 5749 5448 5f43 4f4d 5041 code>#WITH_COMPA\n-00131fc0: 543c 2f63 6f64 653e 2020 203c 2f74 643e T
    \n-00131fd0: 3c74 6420 636c 6173 733d 226d 6172 6b64 removes depend\n-00132000: 656e 6379 206f 6e20 432b 2b20 7374 7265 ency on C++ stre\n-00132010: 616d 206c 6962 7261 7269 6573 2061 6e64 am libraries and\n-00132020: 2043 2b2b 2065 7863 6570 7469 6f6e 7320 C++ exceptions \n-00132030: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n-00132060: 3c74 6420 636c 6173 733d 226d 6172 6b64 #WITH_LE\n-00132090: 414e 3c2f 636f 6465 3e20 2020 3c2f 7464 AN creates a sma\n-001320d0: 6c6c 2d66 6f6f 7470 7269 6e74 2065 7865 ll-footprint exe\n-001320e0: 6375 7461 626c 652c 2073 6565 2053 6563 cutable, see Sec\n-001320f0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion How to\n-00132120: 206d 696e 696d 697a 6520 6170 706c 6963 minimize applic\n-00132130: 6174 696f 6e20 6d65 6d6f 7279 2066 6f6f ation memory foo\n-00132140: 7470 7269 6e74 3c2f 613e 2020 2020 3c2f tprint ..#WITH_LEANER c\n-001321e0: 7265 6174 6573 2061 6e20 6576 656e 2073 reates an even s\n-001321f0: 6d61 6c6c 6572 2066 6f6f 7470 7269 6e74 maller footprint\n-00132200: 2065 7865 6375 7461 626c 652c 2073 6565 executable, see\n-00132210: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Ho\n-00132240: 7720 746f 206d 696e 696d 697a 6520 6170 w to minimize ap\n-00132250: 706c 6963 6174 696f 6e20 6d65 6d6f 7279 plication memory\n-00132260: 2066 6f6f 7470 7269 6e74 3c2f 613e 2020 footprint \n-00132270: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-001322a0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001322b0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001322c0: 3e3c 636f 6465 3e23 5749 5448 5f46 4153 >#WITH_FAS\n-001322d0: 543c 2f63 6f64 653e 2020 203c 2f74 643e T \n-001322e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 use faster mem\n-00132310: 6f72 7920 616c 6c6f 6361 7469 6f6e 2077 ory allocation w\n-00132320: 6865 6e20 7573 6564 2077 6974 6820 3c63 hen used with #WITH_LEAN or #\n-00132350: 5749 5448 5f4c 4541 4e45 523c 2f63 6f64 WITH_LEANER \n-00132370: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#WITH_\n-001323c0: 434f 4f4b 4945 533c 2f63 6f64 653e 2020 COOKIES \n-001323d0: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n-00132400: 4854 5450 2063 6f6f 6b69 6573 2c20 7365 HTTP cookies, se\n-00132410: 6520 5365 6374 696f 6e73 203c 6120 636c e Sections Client-s\n-00132450: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo\n-00132460: 7274 3c2f 613e 2061 6e64 203c 6120 636c rt and Server-s\n-001324a0: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo\n-001324b0: 7274 3c2f 613e 2020 2020 3c2f 7464 3e3c rt <\n-001324c0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#\n-00132510: 5749 5448 5f49 4e53 4543 5552 455f 434f WITH_INSECURE_CO\n-00132520: 4f4b 4945 533c 2f63 6f64 653e 2020 203c OKIES <\n-00132530: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables HT\n-00132560: 5450 2063 6f6f 6b69 6573 2061 6e64 2061 TP cookies and a\n-00132570: 6c6c 6f77 7320 636f 6f6b 6965 7320 7769 llows cookies wi\n-00132580: 7468 2074 6865 6972 2053 6563 7572 6520 th their Secure \n-00132590: 666c 6167 2073 6574 2074 6f20 6265 2073 flag set to be s\n-001325a0: 656e 7420 6f76 6572 2069 6e73 6563 7572 ent over insecur\n-001325b0: 6520 6368 616e 6e65 6c73 2020 2020 3c2f e channels ..#WITH_IPV6 ena\n-00132650: 626c 6573 2049 5076 3620 7375 7070 6f72 bles IPv6 suppor\n-00132660: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t .\n-00132670: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#WITH_\n-001326c0: 4950 5636 5f56 364f 4e4c 593c 2f63 6f64 IPV6_V6ONLY enab\n-00132700: 6c65 7320 4950 7636 2073 7570 706f 7274 les IPv6 support\n-00132710: 2077 6974 6820 4950 7636 2d6f 6e6c 7920 with IPv6-only \n-00132720: 7365 7276 6572 206f 7074 696f 6e20 2020 server option \n-00132730: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-00132780: 636f 6465 3e23 5749 5448 5f4f 5045 4e53 code>#WITH_OPENS\n-00132790: 534c 3c2f 636f 6465 3e20 2020 3c2f 7464 SL enables OpenS\n-001327d0: 534c 2c20 7365 6520 5365 6374 696f 6e73 SL, see Sections\n-001327e0: 203c 6120 636c 6173 733d 2265 6c22 2068 S\n-00132810: 6563 7572 6520 636c 6965 6e74 7320 7769 ecure clients wi\n-00132820: 7468 2048 5454 5053 3c2f 613e 2061 6e64 th HTTPS and\n-00132830: 203c 6120 636c 6173 733d 2265 6c22 2068 S\n-00132860: 6563 7572 6520 5765 6220 7365 7276 6963 ecure Web servic\n-00132870: 6573 2077 6974 6820 4854 5450 533c 2f61 es with HTTPS .\n-00132890: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#WITH_\n-001328e0: 474e 5554 4c53 3c2f 636f 6465 3e20 2020 GNUTLS \n-001328f0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 enables G\n-00132920: 4e55 544c 532c 2073 6565 2053 6563 7469 NUTLS, see Secti\n-00132930: 6f6e 7320 3c61 2063 6c61 7373 3d22 656c ons Secure clients\n-00132970: 2077 6974 6820 4854 5450 533c 2f61 3e20 with HTTPS \n-00132980: 616e 6420 3c61 2063 6c61 7373 3d22 656c and Secure Web ser\n-001329c0: 7669 6365 7320 7769 7468 2048 5454 5053 vices with HTTPS\n-001329d0: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74 ..#WIT\n-00132a30: 485f 475a 4950 3c2f 636f 6465 3e20 2020 H_GZIP \n-00132a40: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 enables g\n-00132a70: 7a69 7020 616e 6420 6465 666c 6174 6520 zip and deflate \n-00132a80: 636f 6d70 7265 7373 696f 6e2c 2073 6565 compression, see\n-00132a90: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Zlib compre\n-00132ad0: 7373 696f 6e3c 2f61 3e20 2020 203c 2f74 ssion ..#WITH_ZLIB ena\n-00132b70: 626c 6573 2064 6566 6c61 7465 2063 6f6d bles deflate com\n-00132b80: 7072 6573 7369 6f6e 206f 6e6c 792c 2073 pression only, s\n-00132b90: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Zlib comp\n-00132bd0: 7265 7373 696f 6e3c 2f61 3e20 2020 203c ression <\n-00132be0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#WITH_NTLM en\n-00132c70: 6162 6c65 7320 4e54 4c4d 2073 7570 706f ables NTLM suppo\n-00132c80: 7274 2020 2020 3c2f 7464 3e3c 2f74 723e rt \n-00132c90: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#WITH\n-00132ce0: 5f43 5f4c 4f43 414c 453c 2f63 6f64 653e _C_LOCALE\n-00132cf0: 2020 203c 2f74 643e 3c74 6420 636c 6173 force \n-00132d20: 7468 6520 7573 6520 6c6f 6361 6c65 2066 the use locale f\n-00132d30: 756e 6374 696f 6e73 2077 6865 6e20 6176 unctions when av\n-00132d40: 6169 6c61 626c 6520 746f 2065 6e73 7572 ailable to ensur\n-00132d50: 6520 6c6f 6361 6c65 2d69 6e64 6570 656e e locale-indepen\n-00132d60: 6465 6e74 206e 756d 6265 7220 636f 6e76 dent number conv\n-00132d70: 6572 7369 6f6e 7320 2020 203c 2f74 643e ersions \n-00132d80: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..#\n-00132dd0: 5749 5448 5f4e 4f5f 435f 4c4f 4341 4c45 WITH_NO_C_LOCALE\n-00132de0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-00132df0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00132e00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00132e10: 3e72 656d 6f76 6520 7468 6520 7573 6520 >remove the use \n-00132e20: 6f66 206c 6f63 616c 6520 6675 6e63 7469 of locale functi\n-00132e30: 6f6e 7320 746f 2069 6d70 726f 7665 2070 ons to improve p\n-00132e40: 6f72 7461 6269 6c69 7479 2020 2020 3c2f ortability ..#WITH_INCLUDE\n-00132eb0: 5f58 4c4f 4341 4c45 5f48 3c2f 636f 6465 _XLOCALE_H force\n-00132ef0: 2074 6865 2069 6e63 6c75 7369 6f6e 206f the inclusion o\n-00132f00: 6620 3c63 6f64 653e 266c 743b 786c 6f63 f <xloc\n-00132f10: 616c 652e 6826 6774 3b3c 2f63 6f64 653e ale.h>\n-00132f20: 2074 6f20 6465 6669 6e65 203c 636f 6465 to define locale_t\n-00132f40: 2061 6e64 203c 636f 6465 3e5f 6c3c 2f63 and _l functions, \n-00132f60: 746f 2069 6d70 726f 7665 2070 6f72 7461 to improve porta\n-00132f70: 6269 6c69 7479 2020 2020 3c2f 7464 3e3c bility <\n-00132f80: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#W\n-00132fd0: 4954 485f 444f 4d3c 2f63 6f64 653e 2020 ITH_DOM \n-00132fe0: 203c 2f74 643e 3c74 6420 636c 6173 733d enable D\n-00133010: 4f4d 2070 6172 7369 6e67 2069 6e20 7468 OM parsing in th\n-00133020: 6520 656e 6769 6e65 2c20 7265 7175 6972 e engine, requir\n-00133030: 6564 2062 7920 7468 6520 5753 2d53 6563 ed by the WS-Sec\n-00133040: 7572 6974 7920 706c 7567 696e 2020 2020 urity plugin \n-00133050: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-001330a0: 636f 6465 3e23 5749 5448 5f52 4550 4c41 code>#WITH_REPLA\n-001330b0: 4345 5f49 4c4c 4547 414c 5f55 5446 383c CE_ILLEGAL_UTF8<\n-001330c0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-001330f0: 656e 6162 6c65 2073 7472 6963 7420 5554 enable strict UT\n-00133100: 462d 382c 2072 6570 6c61 6365 7320 5554 F-8, replaces UT\n-00133110: 462d 3820 636f 6e74 656e 7420 7468 6174 F-8 content that\n-00133120: 2069 7320 6f75 7473 6964 6520 7468 6520 is outside the \n-00133130: 616c 6c6f 7765 6420 7261 6e67 6520 7769 allowed range wi\n-00133140: 7468 2055 2b46 4646 4420 2020 203c 2f74 th U+FFFD ..#WITH_FASTCGI e\n-001331e0: 6e61 626c 6573 2046 6173 7443 4749 2c20 nables FastCGI, \n-001331f0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section FastCGI \n-00133230: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n-00133260: 3c74 6420 636c 6173 733d 226d 6172 6b64 #WITH_NO\n-00133290: 494f 3c2f 636f 6465 3e20 2020 3c2f 7464 IO removes IO op\n-001332d0: 6572 6174 696f 6e73 2c20 746f 2065 6c69 erations, to eli\n-001332e0: 6d69 6e61 7465 2074 6865 2075 7365 206f minate the use o\n-001332f0: 6620 4253 4420 736f 636b 6574 732c 2073 f BSD sockets, s\n-00133300: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section \n-00133330: 486f 7720 746f 2072 656d 6f76 6520 7468 How to remove th\n-00133340: 6520 4253 4420 736f 636b 6574 206c 6962 e BSD socket lib\n-00133350: 7261 7279 2072 6571 7569 7265 6d65 6e74 rary requirement\n-00133360: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74 ..#WIT\n-001333c0: 485f 4e4f 4944 5245 463c 2f63 6f64 653e H_NOIDREF\n-001333d0: 2020 203c 2f74 643e 3c74 6420 636c 6173 remove\n-00133400: 7320 6964 2061 6e64 2068 7265 662f 7265 s id and href/re\n-00133410: 6620 6d75 6c74 692d 7265 6665 7265 6e63 f multi-referenc\n-00133420: 6520 6461 7461 2c20 6d6f 7265 2061 6767 e data, more agg\n-00133430: 7265 7373 6976 6520 7468 616e 2075 7369 ressive than usi\n-00133440: 6e67 2074 6865 203c 636f 6465 3e23 534f ng the #SO\n-00133450: 4150 5f58 4d4c 5f54 5245 453c 2f63 6f64 AP_XML_TREE runtime flag \n-00133470: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n-001334a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #WITH_NO\n-001334d0: 4854 5450 3c2f 636f 6465 3e20 2020 3c2f HTTP removes the\n-00133510: 2048 5454 5020 7374 6163 6b20 746f 2072 HTTP stack to r\n-00133520: 6564 7563 6520 636f 6465 2073 697a 6520 educe code size \n-00133530: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n-00133560: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00133570: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00133580: 3e3c 636f 6465 3e23 5749 5448 5f4e 4f5a >#WITH_NOZ\n-00133590: 4f4e 453c 2f63 6f64 653e 2020 203c 2f74 ONE disables and\n-001335d0: 2069 676e 6f72 6573 2074 6865 2074 696d ignores the tim\n-001335e0: 657a 6f6e 6520 696e 203c 636f 6465 3e78 ezone in x\n-001335f0: 7364 3a64 6174 6554 696d 653c 2f63 6f64 sd:dateTime values ..#WITH_NOEMPTYN\n-00133670: 414d 4553 5041 4345 533c 2f63 6f64 653e AMESPACES\n-00133680: 2020 203c 2f74 643e 3c74 6420 636c 6173 disabl\n-001336b0: 6573 2078 6d6c 6e73 3d22 2220 6465 6661 es xmlns=\"\" defa\n-001336c0: 756c 7420 656d 7074 7920 6e61 6d65 7370 ult empty namesp\n-001336d0: 6163 6573 2066 726f 6d20 584d 4c20 6d65 aces from XML me\n-001336e0: 7373 6167 6573 2020 2020 3c2f 7464 3e3c ssages <\n-001336f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#W\n-00133740: 4954 485f 4e4f 454d 5054 5953 5452 5543 ITH_NOEMPTYSTRUC\n-00133750: 543c 2f63 6f64 653e 2020 203c 2f74 643e T \n-00133760: 3c74 6420 636c 6173 733d 226d 6172 6b64 inserts a dumm\n-00133790: 7920 6d65 6d62 6572 2069 6e20 656d 7074 y member in empt\n-001337a0: 7920 7374 7275 6374 7320 746f 2061 6c6c y structs to all\n-001337b0: 6f77 2063 6f6d 7069 6c61 7469 6f6e 2020 ow compilation \n-001337c0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-001337f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00133800: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00133810: 3e3c 636f 6465 3e23 5749 5448 5f4e 4f47 >#WITH_NOG\n-00133820: 4c4f 4241 4c3c 2f63 6f64 653e 2020 203c LOBAL <\n-00133830: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>omit SOAP \n-00133860: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n-00133870: 2073 6572 6961 6c69 7a61 7469 6f6e 2063 serialization c\n-00133880: 6f64 652c 2070 7265 7665 6e74 7320 6475 ode, prevents du\n-00133890: 706c 6963 6174 6520 6465 6669 6e69 7469 plicate definiti\n-001338a0: 6f6e 7320 7769 7468 2067 656e 6572 6174 ons with generat\n-001338b0: 6564 2073 6f61 7058 595a 4c69 6220 636f ed soapXYZLib co\n-001338c0: 6465 2020 2020 3c2f 7464 3e3c 2f74 723e de \n-001338d0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#WITH_\n-00133920: 4e4f 4e41 4d45 5350 4143 4553 3c2f 636f NONAMESPACES dis\n-00133960: 6162 6c65 7320 6465 7065 6e64 656e 6365 ables dependence\n-00133970: 206f 6e20 676c 6f62 616c 203c 636f 6465 on global namespaces table, a tabl\n-001339a0: 6520 6d75 7374 2062 6520 7365 7420 6578 e must be set ex\n-001339b0: 706c 6963 6974 6c79 2077 6974 6820 3c63 plicitly with soap_set_nam\n-00133a90: 6573 7061 6365 733c 2f61 3e3c 2f63 6f64 espaces see also Sect\n-00133ab0: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion XML \n-00133ae0: 6e61 6d65 7370 6163 6573 2061 6e64 2074 namespaces and t\n-00133af0: 6865 206e 616d 6573 7061 6365 206d 6170 he namespace map\n-00133b00: 7069 6e67 2074 6162 6c65 3c2f 613e 2020 ping table \n-00133b10: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00133b40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00133b50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00133b60: 3e3c 636f 6465 3e23 5749 5448 5f43 4441 >#WITH_CDA\n-00133b70: 5441 3c2f 636f 6465 3e20 2020 3c2f 7464 TA retains the p\n-00133bb0: 6172 7365 6420 4344 4154 4120 7365 6374 arsed CDATA sect\n-00133bc0: 696f 6e73 2069 6e20 6c69 7465 7261 6c20 ions in literal \n-00133bd0: 584d 4c20 7374 7269 6e67 7320 2020 203c XML strings <\n-00133be0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#WITH_PURE_VI\n-00133c40: 5254 5541 4c3c 2f63 6f64 653e 2020 203c RTUAL <\n-00133c50: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables C+\n-00133c80: 2b20 6162 7374 7261 6374 2073 6572 7669 + abstract servi\n-00133c90: 6365 2063 6c61 7373 6573 2077 6974 6820 ce classes with \n-00133ca0: 7075 7265 2076 6972 7475 616c 206d 6574 pure virtual met\n-00133cb0: 686f 6473 2c20 7265 7175 6972 6573 2073 hods, requires s\n-00133cc0: 6f61 7063 7070 3220 6f70 7469 6f6e 203c oapcpp2 option <\n-00133cd0: 636f 6465 3e2d 693c 2f63 6f64 653e 206f code>-i o\n-00133ce0: 7220 3c63 6f64 653e 2d6a 3c2f 636f 6465 r -j .\n-00133d00: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#WITH_\n-00133d50: 4445 4641 554c 545f 5649 5254 5541 4c3c DEFAULT_VIRTUAL<\n-00133d60: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00133d90: 656e 6162 6c65 7320 432b 2b20 6261 7365 enables C++ base\n-00133da0: 2073 6572 7669 6365 2063 6c61 7373 6573 service classes\n-00133db0: 2077 6974 6820 6465 6661 756c 7420 7669 with default vi\n-00133dc0: 7274 7561 6c20 6d65 7468 6f64 7320 7265 rtual methods re\n-00133dd0: 7475 726e 696e 6720 6661 756c 7420 3c63 turning fault #SOAP_NO_MET\n-00133df0: 484f 443c 2f63 6f64 653e 2c20 7265 7175 HOD, requ\n-00133e00: 6972 6573 2073 6f61 7063 7070 3220 6f70 ires soapcpp2 op\n-00133e10: 7469 6f6e 203c 636f 6465 3e2d 693c 2f63 tion -i or -j\n-00133e30: 3c2f 636f 6465 3e20 2020 203c 2f74 643e \n-00133e40: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..#\n-00133e90: 5749 5448 5f43 4153 4549 4e53 454e 5349 WITH_CASEINSENSI\n-00133ea0: 5449 5645 5441 4753 3c2f 636f 6465 3e20 TIVETAGS \n-00133eb0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enables\n-00133ee0: 2063 6173 6520 696e 7365 6e73 6974 6976 case insensitiv\n-00133ef0: 6520 584d 4c20 7061 7273 696e 6720 2020 e XML parsing \n-00133f00: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n-00133f50: 3c63 6f64 653e 2357 4954 485f 534f 434b #WITH_SOCK\n-00133f60: 4554 5f43 4c4f 5345 5f4f 4e5f 4558 4954 ET_CLOSE_ON_EXIT\n-00133f70: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-00133f80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00133f90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00133fa0: 3e70 7265 7665 6e74 7320 6120 7365 7276 >prevents a serv\n-00133fb0: 6572 2070 6f72 7420 6672 6f6d 2073 7461 er port from sta\n-00133fc0: 7969 6e67 2069 6e20 6c69 7374 656e 696e ying in listenin\n-00133fd0: 6720 6d6f 6465 2061 6674 6572 2065 7869 g mode after exi\n-00133fe0: 7420 6279 2069 6e74 6572 6e61 6c6c 7920 t by internally \n-00133ff0: 7365 7474 696e 6720 3c63 6f64 653e 6663 setting fc\n-00134000: 6e74 6c28 736f 636b 2c20 465f 5345 5446 ntl(sock, F_SETF\n-00134010: 442c 2046 445f 434c 4f45 5845 4329 3c2f D, FD_CLOEXEC) ..#WI\n-00134080: 5448 5f54 4350 4649 4e3c 2f63 6f64 653e TH_TCPFIN\n-00134090: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n-001340c0: 7320 5443 5020 4649 4e20 6166 7465 7220 s TCP FIN after \n-001340d0: 7365 6e64 7320 7768 656e 2073 6f63 6b65 sends when socke\n-001340e0: 7420 6973 2072 6561 6479 2074 6f20 636c t is ready to cl\n-001340f0: 6f73 6520 2020 203c 2f74 643e 3c2f 7472 ose ..#WIT\n-00134150: 485f 5345 4c46 5f50 4950 453c 2f63 6f64 H_SELF_PIPE enab\n-00134190: 6c65 7320 6120 2273 656c 6620 7069 7065 les a \"self pipe\n-001341a0: 2220 746f 2065 6e61 626c 6520 7468 6520 \" to enable the \n-001341b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n-00134250: 705f 636c 6f73 655f 636f 6e6e 6563 7469 p_close_connecti\n-00134260: 6f6e 3c2f 613e 3c2f 636f 6465 3e20 6675 on fu\n-00134270: 6e63 7469 6f6e 2028 6753 4f41 5020 322e nction (gSOAP 2.\n-00134280: 382e 3731 206f 7220 6772 6561 7465 7229 8.71 or greater)\n-00134290: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c2f ..

    The fo\n-001342b0: 6c6c 6f77 696e 6720 7375 6273 6574 206f llowing subset o\n-001342c0: 6620 6d61 6372 6f73 2061 7265 2064 6566 f macros are def\n-001342d0: 696e 6564 2069 6e20 7468 6520 4150 4920 ined in the API \n-001342e0: 646f 6375 6d65 6e74 6174 696f 6e20 4d6f documentation Mo\n-001342f0: 6475 6c65 203c 6120 636c 6173 733d 2265 dule SOAP_MACRO com\n-00134330: 7069 6c65 2d74 696d 6520 7661 6c75 6573 pile-time values\n-00134340: 3c2f 613e 2e20 5468 6573 6520 6d61 6372 . These macr\n-00134350: 6f73 2061 7265 2075 7365 6420 746f 2065 os are used to e\n-00134360: 6e61 626c 6520 6f72 2064 6973 6162 6c65 nable or disable\n-00134370: 2066 6561 7475 7265 7320 6173 2073 7065 features as spe\n-00134380: 6369 6669 6564 2062 656c 6f77 2c20 6279 cified below, by\n-00134390: 2063 6f6d 7069 6c69 6e67 2073 6f75 7263 compiling sourc\n-001343a0: 6520 636f 6465 2066 696c 6573 2077 6974 e code files wit\n-001343b0: 6820 636f 6d70 696c 6572 206f 7074 696f h compiler optio\n-001343c0: 6e20 3c62 3e3c 636f 6465 3e2d 443c 2f63 n -D to set \n-001343e0: 7468 6520 6d61 6372 6f3a 3c2f 703e 0a3c the macro:

    .<\n-001343f0: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n-00134400: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..de\n-00134450: 6669 6e65 2020 203c 2f74 683e 3c74 6820 fine re\n-00134480: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult ..#SOA\n-001344e0: 505f 4e4f 5448 524f 573c 2f63 6f64 653e P_NOTHROW\n-001344f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 expand\n-00134520: 7320 746f 203c 636f 6465 3e28 7374 643a s to (std:\n-00134530: 3a6e 6f74 6872 6f77 293c 2f63 6f64 653e :nothrow)\n-00134540: 2074 6f20 7072 6576 656e 7420 6d65 6d6f to prevent memo\n-00134550: 7279 2061 6c6c 6f63 6174 696f 6e20 6578 ry allocation ex\n-00134560: 6365 7074 696f 6e73 2028 3c63 6f64 653e ceptions (\n-00134570: 2353 4f41 505f 454f 4d3c 2f63 6f64 653e #SOAP_EOM\n-00134580: 2069 7320 7573 6564 2069 6e73 7465 6164 is used instead\n-00134590: 292c 2074 6869 7320 6d61 6372 6f20 6361 ), this macro ca\n-001345a0: 6e20 6265 2063 6861 6e67 6564 2020 2020 n be changed \n-001345b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-00134600: 636f 6465 3e23 534f 4150 5f42 5546 4c45 code>#SOAP_BUFLE\n-00134610: 4e3c 2f63 6f64 653e 2020 203c 2f74 643e N \n-00134620: 3c74 6420 636c 6173 733d 226d 6172 6b64 the length of \n-00134650: 7468 6520 696e 7465 726e 616c 206d 6573 the internal mes\n-00134660: 7361 6765 2062 7566 6665 722c 2069 6d70 sage buffer, imp\n-00134670: 6163 7473 2063 6f6d 6d75 6e69 6361 7469 acts communicati\n-00134680: 6f6e 7320 7065 7266 6f72 6d61 6e63 6520 ons performance \n-00134690: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n-001346c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001346d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001346e0: 3e3c 636f 6465 3e23 534f 4150 5f48 4452 >#SOAP_HDR\n-001346f0: 4c45 4e3c 2f63 6f64 653e 2020 203c 2f74 LEN the maximum \n-00134730: 6c65 6e67 7468 206f 6620 4854 5450 2068 length of HTTP h\n-00134740: 6561 6465 7273 2020 2020 3c2f 7464 3e3c eaders <\n-00134750: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#\n-001347a0: 534f 4150 5f54 4147 4c45 4e3c 2f63 6f64 SOAP_TAGLEN the \n-001347e0: 6d61 7869 6d75 6d20 6c65 6e67 7468 206f maximum length o\n-001347f0: 6620 584d 4c20 7461 6773 2061 6e64 2055 f XML tags and U\n-00134800: 524c 7320 2020 203c 2f74 643e 3c2f 7472 RLs ..#SOAP\n-00134860: 5f54 4d50 4c45 4e3c 2f63 6f64 653e 2020 _TMPLEN \n-00134870: 203c 2f74 643e 3c74 6420 636c 6173 733d the maxi\n-001348a0: 6d75 6d20 6c65 6e67 7468 206f 6620 7465 mum length of te\n-001348b0: 6d70 6f72 6172 7920 7374 7269 6e67 2076 mporary string v\n-001348c0: 616c 7565 732c 2073 686f 7274 2073 7472 alues, short str\n-001348d0: 696e 6773 2061 6e64 2062 7269 6566 2065 ings and brief e\n-001348e0: 7272 6f72 206d 6573 7361 6765 7320 2020 rror messages \n-001348f0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n-00134940: 3c63 6f64 653e 2353 4f41 505f 4d41 5841 #SOAP_MAXA\n-00134950: 4c4c 4f43 5349 5a45 3c2f 636f 6465 3e20 LLOCSIZE \n-00134960: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 the max\n-00134990: 696d 756d 2073 697a 6520 6f66 2061 2062 imum size of a b\n-001349a0: 6c6f 636b 206f 6620 6d65 6d6f 7279 2074 lock of memory t\n-001349b0: 6861 7420 3c63 6f64 653e 6d61 6c6c 6f63 hat malloc\n-001349c0: 3c2f 636f 6465 3e20 6361 6e20 616c 6c6f can allo\n-001349d0: 6361 7465 2020 2020 3c2f 7464 3e3c 2f74 cate ..#SOA\n-00134a30: 505f 4d41 5841 5252 4159 5349 5a45 3c2f P_MAXARRAYSIZE t\n-00134a70: 6865 206d 6178 696d 756d 2061 6c6c 6f63 he maximum alloc\n-00134a80: 6174 696f 6e20 7468 7265 7368 6f6c 6420 ation threshold \n-00134a90: 746f 2070 7265 2d61 6c6c 6f63 6174 6520 to pre-allocate \n-00134aa0: 534f 4150 2061 7272 6179 7320 696e 206d SOAP arrays in m\n-00134ab0: 656d 6f72 7920 2020 203c 2f74 643e 3c2f emory ..#S\n-00134b10: 4f41 505f 4d41 5844 494d 4553 495a 453c OAP_MAXDIMESIZE<\n-00134b20: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00134b50: 7468 6520 6d61 7869 6d75 6d20 4449 4d45 the maximum DIME\n-00134b60: 2061 7474 6163 686d 656e 7420 7369 7a65 attachment size\n-00134b70: 2061 6c6c 6f77 6564 2074 6f20 7265 6365 allowed to rece\n-00134b80: 6976 6520 2020 203c 2f74 643e 3c2f 7472 ive ..#SOAP\n-00134be0: 5f4d 4158 4549 4e54 523c 2f63 6f64 653e _MAXEINTR\n-00134bf0: 2020 203c 2f74 643e 3c74 6420 636c 6173 maximu\n-00134c20: 6d20 6e75 6d62 6572 206f 6620 4549 4e54 m number of EINT\n-00134c30: 5220 696e 7465 7272 7570 7473 2074 6f20 R interrupts to \n-00134c40: 6967 6e6f 7265 2077 6869 6c65 2070 6f6c ignore while pol\n-00134c50: 6c69 6e67 2061 2073 6f63 6b65 7420 666f ling a socket fo\n-00134c60: 7220 7065 6e64 696e 6720 6163 7469 7669 r pending activi\n-00134c70: 7479 2020 2020 3c2f 7464 3e3c 2f74 723e ty \n-00134c80: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP\n-00134cd0: 5f4d 4158 494e 464c 4154 4553 495a 453c _MAXINFLATESIZE<\n-00134ce0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00134d10: 7472 7573 7465 6420 696e 666c 6174 6564 trusted inflated\n-00134d20: 2063 6f6e 7465 6e74 2073 697a 6520 2831 content size (1\n-00134d30: 204d 4220 6279 2064 6566 6175 6c74 2920 MB by default) \n-00134d40: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n-00134d70: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00134d80: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00134d90: 3e3c 636f 6465 3e23 534f 4150 5f4d 4158 >#SOAP_MAX\n-00134da0: 4b45 4550 414c 4956 453c 2f63 6f64 653e KEEPALIVE\n-00134db0: 2020 203c 2f74 643e 3c74 6420 636c 6173 maximu\n-00134de0: 6d20 6974 6572 6174 696f 6e73 2069 6e20 m iterations in \n-00134df0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap_se\n-00134e70: 7276 653c 2f61 3e3c 2f63 6f64 653e 206c rve l\n-00134e80: 6f6f 7020 6f6e 2048 5454 5020 6b65 6570 oop on HTTP keep\n-00134e90: 2d61 6c69 7665 2063 6f6e 6e65 6374 696f -alive connectio\n-00134ea0: 6e73 2020 2020 3c2f 7464 3e3c 2f74 723e ns \n-00134eb0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP\n-00134f00: 5f4d 4158 4c45 4e47 5448 3c2f 636f 6465 _MAXLENGTH maxim\n-00134f40: 756d 2073 7472 696e 6720 636f 6e74 656e um string conten\n-00134f50: 7420 6c65 6e67 7468 2066 6f72 2073 7472 t length for str\n-00134f60: 696e 6773 206e 6f74 2061 6c72 6561 6479 ings not already\n-00134f70: 2063 6f6e 7374 7261 696e 6564 2062 7920 constrained by \n-00134f80: 584d 4c20 7363 6865 6d61 2076 616c 6964 XML schema valid\n-00134f90: 6174 696f 6e20 636f 6e73 7472 6169 6e74 ation constraint\n-00134fa0: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n-00134fb0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-00134fd0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_M\n-00135000: 4158 4c45 5645 4c3c 2f63 6f64 653e 2020 AXLEVEL \n-00135010: 203c 2f74 643e 3c74 6420 636c 6173 733d maximum \n-00135040: 584d 4c20 6e65 7374 696e 6720 6465 7074 XML nesting dept\n-00135050: 6820 6c65 7665 6c20 7065 726d 6974 7465 h level permitte\n-00135060: 6420 6279 2074 6865 2058 4d4c 2070 6172 d by the XML par\n-00135070: 7365 7220 2020 203c 2f74 643e 3c2f 7472 ser ..#SOA\n-001350d0: 505f 4d41 584f 4343 5552 533c 2f63 6f64 P_MAXOCCURS maxi\n-00135110: 6d75 6d20 6e75 6d62 6572 206f 6620 6172 mum number of ar\n-00135120: 7261 7920 6f72 2063 6f6e 7461 696e 6572 ray or container\n-00135130: 2065 6c65 6d65 6e74 7320 666f 7220 636f elements for co\n-00135140: 6e74 6169 6e65 7273 2074 6861 7420 6172 ntainers that ar\n-00135150: 6520 6e6f 7420 616c 7265 6164 7920 636f e not already co\n-00135160: 6e73 7472 6169 6e65 6420 6279 2058 4d4c nstrained by XML\n-00135170: 2073 6368 656d 6120 7661 6c69 6461 7469 schema validati\n-00135180: 6f6e 2063 6f6e 7374 7261 696e 7473 2020 on constraints \n-00135190: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n-001351e0: 3c63 6f64 653e 2353 4f41 505f 4d49 4e44 #SOAP_MIND\n-001351f0: 4546 4c41 5445 5241 5449 4f3c 2f63 6f64 EFLATERATIO trus\n-00135230: 7465 6420 6465 666c 6174 696f 6e20 7261 ted deflation ra\n-00135240: 7469 6f20 6166 7465 7220 3c63 6f64 653e tio after \n-00135250: 2353 4f41 505f 4d41 5849 4e46 4c41 5445 #SOAP_MAXINFLATE\n-00135260: 5349 5a45 3c2f 636f 6465 3e20 6973 2072 SIZE is r\n-00135270: 6561 6368 6564 2020 2020 3c2f 7464 3e3c eached <\n-00135280: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#\n-001352d0: 534f 4150 5f50 5552 455f 5649 5254 5541 SOAP_PURE_VIRTUA\n-001352e0: 4c3c 2f63 6f64 653e 2020 203c 2f74 643e L \n-001352f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 set to =\n-00135320: 2030 3c2f 636f 6465 3e20 7768 656e 203c 0 when <\n-00135330: 636f 6465 3e23 5749 5448 5f50 5552 455f code>#WITH_PURE_\n-00135340: 5649 5254 5541 4c3c 2f63 6f64 653e 2069 VIRTUAL i\n-00135350: 7320 6465 6669 6e65 6420 2020 203c 2f74 s defined ..#SOAP_SSL_RSA_B\n-001353c0: 4954 533c 2f63 6f64 653e 2020 203c 2f74 ITS length of th\n-00135400: 6520 5253 4120 6b65 7920 2832 3034 3820 e RSA key (2048 \n-00135410: 6279 2064 6566 6175 6c74 2920 2020 203c by default) <\n-00135420: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_UNKNOW\n-00135480: 4e5f 4348 4152 3c2f 636f 6465 3e20 2020 N_CHAR \n-00135490: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 an 8 bit \n-001354c0: 696e 7465 6765 7220 7468 6174 2072 6570 integer that rep\n-001354d0: 7265 7365 6e74 7320 6120 6368 6172 6163 resents a charac\n-001354e0: 7465 7220 7468 6174 2063 6f75 6c64 206e ter that could n\n-001354f0: 6f74 2062 6520 636f 6e76 6572 7465 6420 ot be converted \n-00135500: 746f 2061 6e20 4153 4349 4920 6368 6172 to an ASCII char\n-00135510: 2c20 692e 652e 2077 6865 6e20 636f 6e76 , i.e. when conv\n-00135520: 6572 7469 6e67 2061 6e20 584d 4c20 556e erting an XML Un\n-00135530: 6963 6f64 6520 6368 6172 6163 7465 7220 icode character \n-00135540: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n-00135570: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00135580: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00135590: 3e3c 636f 6465 3e23 534f 4150 5f55 4e4b >#SOAP_UNK\n-001355a0: 4e4f 574e 5f55 4e49 434f 4445 5f43 4841 NOWN_UNICODE_CHA\n-001355b0: 523c 2f63 6f64 653e 2020 203c 2f74 643e R \n-001355c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 integer Unicod\n-001355f0: 6520 7661 6c75 6520 7265 7072 6573 656e e value represen\n-00135600: 7469 6e67 2061 2063 6861 7261 6374 6572 ting a character\n-00135610: 2074 6861 7420 7265 706c 6163 6573 2061 that replaces a\n-00135620: 6e20 696e 7661 6c69 6420 556e 6963 6f64 n invalid Unicod\n-00135630: 6520 636f 6465 2070 6f69 6e74 2020 2020 e code point \n-00135640: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-00135690: 636f 6465 3e23 534f 4150 5f4c 4f4e 475f code>#SOAP_LONG_\n-001356a0: 464f 524d 4154 3c2f 636f 6465 3e20 2020 FORMAT \n-001356b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 macro tha\n-001356e0: 7420 7265 7072 6573 656e 7473 2074 6865 t represents the\n-001356f0: 203c 636f 6465 3e23 4c4f 4e47 3634 3c2f #LONG64 printf %-f\n-00135710: 6f72 6d61 7420 2020 203c 2f74 643e 3c2f ormat ..#SO\n-00135770: 4150 5f55 4c4f 4e47 5f46 4f52 4d41 543c AP_ULONG_FORMAT<\n-00135780: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-001357b0: 6d61 6372 6f20 7468 6174 2072 6570 7265 macro that repre\n-001357c0: 7365 6e74 7320 7468 6520 3c63 6f64 653e sents the \n-001357d0: 2355 4c4f 4e47 3634 3c2f 636f 6465 3e20 #ULONG64 \n-001357e0: 7072 696e 7466 2025 2d66 6f72 6d61 7420 printf %-format \n-001357f0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n-00135820: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_IN\n-00135850: 5641 4c49 445f 534f 434b 4554 3c2f 636f VALID_SOCKET por\n-00135890: 7461 626c 6520 696e 7661 6c69 6420 736f table invalid so\n-001358a0: 636b 6574 2076 616c 7565 2c20 6361 6e20 cket value, can \n-001358b0: 616c 736f 2075 7365 203c 636f 6465 3e23 also use #\n-001358c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa\n-00135970: 705f 7661 6c69 645f 736f 636b 6574 2873 p_valid_socket(s\n-00135980: 6f63 6b29 3c2f 613e 3c2f 636f 6465 3e20 ock) \n-00135990: 746f 2063 6865 636b 2069 6620 3c63 6f64 to check if sock is\n-001359b0: 2076 616c 6964 2020 203c 2f74 643e 3c2f valid ..
    War\n-001359f0: 6e69 6e67 3c2f 6474 3e3c 6464 3e49 7420 ning
    It \n-00135a00: 6973 2069 6d70 6f72 7461 6e74 2074 6861 is important tha\n-00135a10: 7420 616e 7920 6f66 2074 6865 7365 206d t any of these m\n-00135a20: 6163 726f 7320 7768 656e 2064 6566 696e acros when defin\n-00135a30: 6564 2073 686f 756c 6420 6265 2063 6f6e ed should be con\n-00135a40: 7369 7374 656e 746c 7920 6465 6669 6e65 sistently define\n-00135a50: 6420 7768 656e 2063 6f6d 7069 6c69 6e67 d when compiling\n-00135a60: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil\n-00135a70: 6573 2c20 7375 6368 2061 7320 3c65 6d3e es, such as \n-00135a80: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-00135a90: 6f61 7032 2e63 7070 3c2f 636f 6465 3e3c oap2.cpp<\n-00135aa0: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n-00135ab0: 736f 6170 432e 6370 703c 2f63 6f64 653e soapC.cpp\n-00135ac0: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , soapClient.cpp<\n-00135ae0: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, soapServe\n-00135b00: 722e 6370 703c 2f63 6f64 653e 3c2f 656d r.cpp, and all appli\n-00135b20: 6361 7469 6f6e 2073 6f75 7263 6520 636f cation source co\n-00135b30: 6465 2066 696c 6573 2074 6861 7420 696e de files that in\n-00135b40: 636c 7564 6520 3c65 6d3e 3c63 6f64 653e clude \n-00135b50: 6773 6f61 702f 7374 6473 6f61 7032 2e68 gsoap/stdsoap2.h\n-00135b60: 3c2f 636f 6465 3e3c 2f65 6d3e 206f 7220 or \n-00135b70: 3c65 6d3e 3c63 6f64 653e 736f 6170 482e soapH.\n-00135b80: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2049 h. I\n-00135b90: 6620 7468 6520 6d61 6372 6f73 2061 7265 f the macros are\n-00135ba0: 206e 6f74 2063 6f6e 7369 7374 656e 746c not consistentl\n-00135bb0: 7920 6465 6669 6e65 6420 6174 2063 6f6d y defined at com\n-00135bc0: 7069 6c65 2074 696d 6520 7468 656e 2074 pile time then t\n-00135bd0: 6865 2061 7070 6c69 6361 7469 6f6e 2077 he application w\n-00135be0: 696c 6c20 6c69 6b65 6c79 2063 7261 7368 ill likely crash\n-00135bf0: 2064 7565 2074 6f20 6120 6d69 736d 6174 due to a mismat\n-00135c00: 6368 6573 2069 6e20 7468 6520 6465 636c ches in the decl\n-00135c10: 6172 6174 696f 6e20 616e 6420 7573 6520 aration and use \n-00135c20: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the soap context\n-00135c90: 2074 6861 7420 6973 2063 7573 746f 6d69 that is customi\n-00135ca0: 7a65 6420 6279 2074 6865 7365 2066 6c61 zed by these fla\n-00135cb0: 6773 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 gs.
    ..... Back to table \n-00135ce0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-00135cf0: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .Usi\n-00135d20: 6e67 2074 6865 2073 6f61 7064 6566 732e ng the soapdefs.\n-00135d30: 6820 6865 6164 6572 2066 696c 653c 2f68 h header file.

    The soapdefs.h heade\n-00135d70: 7220 6669 6c65 2069 7320 696e 636c 7564 r file is includ\n-00135d80: 6564 2069 6e20 3c65 6d3e 3c63 6f64 653e ed in \n-00135d90: 6773 6f61 702f 7374 6473 6f61 7032 2e68 gsoap/stdsoap2.h\n-00135da0: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 6865 whe\n-00135db0: 6e20 636f 6d70 696c 696e 6720 7769 7468 n compiling with\n-00135dc0: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl\n-00135dd0: 6167 203c 636f 6465 3e23 5749 5448 5f53 ag #WITH_S\n-00135de0: 4f41 5044 4546 535f 483c 2f63 6f64 653e OAPDEFS_H\n-00135df0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     c++\n-00135e10: 202d 4420 5749 5448 5f53 4f41 5044 4546   -D WITH_SOAPDEF\n-00135e20: 535f 4820 2d63 2073 7464 736f 6170 322e  S_H -c stdsoap2.\n-00135e30: 6370 700a 3c2f 7072 653e 3c70 3e20 5468  cpp.

    Th\n-00135e40: 6520 3c65 6d3e 3c63 6f64 653e 736f 6170 e soap\n-00135e50: 6465 6673 2e68 3c2f 636f 6465 3e3c 2f65 defs.h file allows u\n-00135e70: 7365 7273 2074 6f20 696e 636c 7564 6520 sers to include \n-00135e80: 6465 6669 6e69 7469 6f6e 7320 616e 6420 definitions and \n-00135e90: 6164 6420 696e 636c 7564 6573 2077 6974 add includes wit\n-00135ea0: 686f 7574 2072 6571 7569 7269 6e67 2063 hout requiring c\n-00135eb0: 6861 6e67 6573 2074 6f20 3c65 6d3e 3c63 hanges to gsoap/stdsoa\n-00135ed0: 7032 2e68 3c2f 636f 6465 3e3c 2f65 6d3e p2.h\n-00135ee0: 2e20 596f 7520 6361 6e20 616c 736f 2073 . You can also s\n-00135ef0: 7065 6369 6679 2074 6865 2068 6561 6465 pecify the heade\n-00135f00: 7220 6669 6c65 206e 616d 6520 746f 2069 r file name to i\n-00135f10: 6e63 6c75 6465 2061 7320 6120 6d61 6372 nclude as a macr\n-00135f20: 6f20 3c63 6f64 653e 534f 4150 4445 4653 o SOAPDEFS\n-00135f30: 5f48 3c2f 636f 6465 3e20 746f 206f 7665 _H to ove\n-00135f40: 7272 6964 6520 7468 6520 6e61 6d65 203c rride the name <\n-00135f50: 656d 3e3c 636f 6465 3e73 6f61 7064 6566 em>soapdef\n-00135f60: 732e 683c 2f63 6f64 653e 3c2f 656d 3e3a s.h:\n-00135f70: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     c++ \n-00135f90: 2d44 2053 4f41 5044 4546 535f 483d 6d79  -D SOAPDEFS_H=my\n-00135fa0: 6465 6673 2e68 202d 6320 7374 6473 6f61  defs.h -c stdsoa\n-00135fb0: 7032 2e63 7070 0a3c 2f70 7265 3e3c 703e  p2.cpp.

    \n-00135fc0: 2046 6f72 2065 7861 6d70 6c65 2c3c 2f70 For example,.

    \n-00136010: 2f2f 2043 6f6e 7465 6e74 7320 6f66 2066 // Contents of f\n-00136020: 696c 6520 2671 756f 743b 736f 6170 6465 ile "soapde\n-00136030: 6673 2e68 2671 756f 743b 3c2f 7370 616e fs.h"
    .
    #include &l\n-00136080: 743b 6f73 7472 6561 6d26 6774 3b3c 2f73 t;ostream>
    .

    The follow\n-001360c0: 696e 6720 6865 6164 6572 2066 696c 6520 ing header file \n-001360d0: 666f 7220 736f 6170 6370 7032 2072 6566 for soapcpp2 ref\n-001360e0: 6572 7320 746f 203c 636f 6465 3e73 7464 ers to std\n-001360f0: 3a3a 6f73 7472 6561 6d3c 2f63 6f64 653e ::ostream\n-00136100: 2077 6974 686f 7574 2073 6f61 7063 7070 without soapcpp\n-00136110: 3220 7468 726f 7769 6e67 2065 7272 6f72 2 throwing error\n-00136120: 732c 2062 7920 7573 696e 6720 3c63 6f64 s, by using extern \n-00136140: 746f 2064 6563 6c61 7265 203c 636f 6465 to declare class std::ostr\n-00136160: 6561 6d3c 2f63 6f64 653e 3a3c 2f70 3e0a eam:

    .\n-00136170: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n-001361b0: 2073 7464 3a3a 6f73 7472 6561 6d20 6361 std::ostream ca\n-001361c0: 6e26 2333 393b 7420 6265 2073 6572 6961 n't be seria\n-001361d0: 6c69 7a65 642c 2062 7574 206e 6565 6420 lized, but need \n-001361e0: 746f 2062 6520 6465 636c 6172 6564 2074 to be declared t\n-001361f0: 6f20 6d61 6b65 2069 7420 7669 7369 626c o make it visibl\n-00136200: 6520 746f 2067 534f 4150 203c 2f73 7061 e to gSOAP
    .
    extern <\n-00136250: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00136260: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class std::ostream;<\n-00136280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-001362a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    class ns__myClass\n-001362e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { public:\n-00136320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    virtual void\n-00136380: 3c2f 7370 616e 3e20 7072 696e 7428 7374 print(st\n-00136390: 643a 3a6f 7374 7265 616d 2026 616d 703b d::ostream &\n-001363a0: 7329 203c 7370 616e 2063 6c61 7373 3d22 s) const; // \n-001363e0: 7765 206e 6565 6420 7374 643a 3a6f 7374 we need std::ost\n-001363f0: 7265 616d 2068 6572 6520 3c2f 7370 616e ream here
    .
    ..\n-00136420: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    };.

    See\n-00136480: 2061 6c73 6f20 5365 6374 696f 6e20 3c61 also Section Transien\n-001364c0: 7420 6461 7461 2074 7970 6573 3c2f 613e t data types\n-001364d0: 202c 206e 6f6e 2d73 6572 6961 6c69 7a61 , non-serializa\n-001364e0: 626c 6520 6461 7461 2074 7970 6573 2e3c ble data types.<\n-001364f0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .\n-00136550: 5275 6e2d 7469 6d65 2066 6c61 6773 3c2f Run-time flags.

    The gSOAP\n-00136570: 2065 6e67 696e 6520 7374 6174 6520 6973 engine state is\n-00136580: 2073 746f 7265 6420 696e 2074 6865 203c stored in the <\n-00136590: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-001365f0: 2063 6f6e 7465 7874 2074 6861 7420 6973 context that is\n-00136600: 2069 6e69 7469 616c 697a 6564 2061 6e64 initialized and\n-00136610: 2063 6f6e 7472 6f6c 6c65 6420 6279 2076 controlled by v\n-00136620: 6172 696f 7573 206f 7074 696f 6e61 6c20 arious optional \n-00136630: 7275 6e74 696d 6520 666c 6167 732e 204d runtime flags. M\n-00136640: 6f73 7420 666c 6167 7320 6172 6520 6170 ost flags are ap\n-00136650: 706c 6963 6162 6c65 2074 6f20 6569 7468 plicable to eith\n-00136660: 6572 2070 726f 6365 7373 696e 6720 696e er processing in\n-00136670: 7075 7420 6f72 2074 6f20 7072 6f63 6573 put or to proces\n-00136680: 7369 6e67 206f 7574 7075 742c 2062 7574 sing output, but\n-00136690: 2073 6f6d 6520 6172 6520 6170 706c 6963 some are applic\n-001366a0: 6162 6c65 2074 6f20 626f 7468 2069 6e70 able to both inp\n-001366b0: 7574 2061 6e64 206f 7574 7075 7420 6d65 ut and output me\n-001366c0: 7373 6167 6520 616e 6420 646f 6375 6d65 ssage and docume\n-001366d0: 6e74 2070 726f 6365 7373 696e 672e 3c2f nt processing..

    Furthermor\n-001366f0: 652c 2074 6865 7365 2066 6c61 6773 2061 e, these flags a\n-00136700: 7265 2064 6976 6964 6564 2069 6e74 6f20 re divided into \n-00136710: 666f 7572 2063 6174 6567 6f72 6965 733a four categories:\n-00136720: 2074 7261 6e73 706f 7274 2028 494f 292c transport (IO),\n-00136730: 2063 6f6e 7465 6e74 2065 6e63 6f64 696e content encodin\n-00136740: 6720 2845 4e43 292c 2058 4d4c 2070 6172 g (ENC), XML par\n-00136750: 7369 6e67 2061 6e64 2067 656e 6572 6174 sing and generat\n-00136760: 696f 6e20 2858 4d4c 292c 2061 6e64 2043 ion (XML), and C\n-00136770: 2f43 2b2b 2075 7361 6765 2028 4329 2e3c /C++ usage (C).<\n-00136780: 2f70 3e0a 3c70 3e54 6865 2069 6e70 7574 /p>.

    The input\n-00136790: 2d6d 6f64 6520 616e 6420 6f75 7470 7574 -mode and output\n-001367a0: 2d6d 6f64 6520 666c 6167 7320 666f 7220 -mode flags for \n-001367b0: 696e 626f 756e 6420 2869 6e29 2061 6e64 inbound (in) and\n-001367c0: 206f 7574 626f 756e 6420 286f 7574 2920 outbound (out) \n-001367d0: 6d65 7373 6167 6520 7072 6f63 6573 7369 message processi\n-001367e0: 6e67 2061 7265 3a3c 2f70 3e0a 3c74 6162 ng are:

    ...mode \n-00136850: 666c 6167 2020 203c 2f74 683e 3c74 6820 flag in\n-00136880: 2f6f 7574 2020 203c 2f74 683e 3c74 6820 /out re\n-001368b0: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult ..#SOA\n-00136910: 505f 494f 5f46 4c55 5348 3c2f 636f 6465 P_IO_FLUSH out \n-00136950: 203c 2f74 643e 3c74 6420 636c 6173 733d flush ou\n-00136980: 7470 7574 2069 6d6d 6564 6961 7465 6c79 tput immediately\n-00136990: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n-001369a0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-001369b0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-001369c0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_I\n-001369f0: 4f5f 4255 4646 4552 3c2f 636f 6465 3e20 O_BUFFER \n-00136a00: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 out <\n-00136a30: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enable out\n-00136a60: 7075 7420 6275 6666 6572 696e 672c 2074 put buffering, t\n-00136a70: 6865 2064 6566 6175 6c74 206d 6f64 6520 he default mode \n-00136a80: 666f 7220 736f 636b 6574 2063 6f6e 6e65 for socket conne\n-00136a90: 6374 696f 6e73 2020 2020 3c2f 7464 3e3c ctions <\n-00136aa0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S\n-00136af0: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE out\n-00136b30: 2020 203c 2f74 643e 3c74 6420 636c 6173 store \n-00136b60: 7468 6520 656e 7469 7265 206f 7574 626f the entire outbo\n-00136b70: 756e 6420 6d65 7373 6167 6520 746f 2063 und message to c\n-00136b80: 616c 6375 6c61 7465 2048 5454 5020 636f alculate HTTP co\n-00136b90: 6e74 656e 7420 6c65 6e67 7468 2020 2020 ntent length \n-00136ba0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-00136bf0: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n-00136c00: 554e 4b3c 2f63 6f64 653e 2020 203c 2f74 UNK out <\n-00136c40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00136c50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00136c60: 3e65 6e61 626c 6520 4854 5450 2063 6875 >enable HTTP chu\n-00136c70: 6e6b 696e 6720 2020 203c 2f74 643e 3c2f nking ..#SO\n-00136cd0: 4150 5f49 4f5f 4c45 4e47 5448 3c2f 636f AP_IO_LENGTH out\n-00136d10: 2020 203c 2f74 643e 3c74 6420 636c 6173 used w\n-00136d40: 6974 6820 7477 6f2d 7068 6173 6520 7365 ith two-phase se\n-00136d50: 7269 616c 697a 6174 696f 6e2c 2066 6972 rialization, fir\n-00136d60: 7374 2070 6861 7365 2077 6974 6820 7468 st phase with th\n-00136d70: 6973 2066 6c61 6720 746f 2063 616c 6375 is flag to calcu\n-00136d80: 6c61 7465 2048 5454 5020 636f 6e74 656e late HTTP conten\n-00136d90: 7420 6c65 6e67 7468 2020 2020 3c2f 7464 t length ..#SOAP_IO_KEEPAL\n-00136e00: 4956 453c 2f63 6f64 653e 2020 203c 2f74 IVE in+out keep socket \n-00136e70: 636f 6e6e 6563 7469 6f6e 7320 616c 6976 connections aliv\n-00136e80: 652c 2077 6865 6e20 7375 7070 6f72 7465 e, when supporte\n-00136e90: 6420 6279 2074 6865 2048 5454 5020 7065 d by the HTTP pe\n-00136ea0: 6572 2020 2020 3c2f 7464 3e3c 2f74 723e er \n-00136eb0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP_\n-00136f00: 494f 5f55 4450 3c2f 636f 6465 3e20 2020 IO_UDP \n-00136f10: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 in+out \n-00136f40: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 use UDP (\n-00136f70: 6461 7461 6772 616d 2920 7472 616e 7370 datagram) transp\n-00136f80: 6f72 742c 206d 6178 696d 756d 206d 6573 ort, maximum mes\n-00136f90: 7361 6765 206c 656e 6774 6820 6973 203c sage length is <\n-00136fa0: 636f 6465 3e23 534f 4150 5f42 5546 4c45 code>#SOAP_BUFLE\n-00136fb0: 4e3c 2f63 6f64 653e 2020 2020 3c2f 7464 N ..#SOAP_ENC_PLAIN\n-00137020: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-00137030: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00137040: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00137050: 3e69 6e2b 6f75 7420 2020 3c2f 7464 3e3c >in+out <\n-00137060: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00137070: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00137080: 3e75 7365 2070 6c61 696e 206d 6573 7361 >use plain messa\n-00137090: 6765 7320 7769 7468 6f75 7420 7061 7273 ges without pars\n-001370a0: 696e 6720 6f72 2065 6d69 7474 696e 6720 ing or emitting \n-001370b0: 4854 5450 2068 6561 6465 7273 2020 2020 HTTP headers \n-001370c0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..#SOAP_ENC_XM\n-00137120: 4c3c 2f63 6f64 653e 2020 203c 2f74 643e L \n-00137130: 3c74 6420 636c 6173 733d 226d 6172 6b64 alias f\n-00137180: 6f72 203c 636f 6465 3e23 534f 4150 5f45 or #SOAP_E\n-00137190: 4e43 5f50 4c41 494e 3c2f 636f 6465 3e20 NC_PLAIN \n-001371a0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n-001371d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_EN\n-00137200: 435f 4449 4d45 3c2f 636f 6465 3e20 2020 C_DIME \n-00137210: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 out use DIME enc\n-00137270: 6f64 696e 672c 2061 7574 6f6d 6174 6963 oding, automatic\n-00137280: 2077 6865 6e20 4449 4d45 2061 7474 6163 when DIME attac\n-00137290: 686d 656e 7473 2061 7265 2075 7365 6420 hments are used \n-001372a0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n-001372d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001372e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001372f0: 3e3c 636f 6465 3e23 534f 4150 5f45 4e43 >#SOAP_ENC\n-00137300: 5f4d 494d 453c 2f63 6f64 653e 2020 203c _MIME <\n-00137310: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>out use MIME enco\n-00137370: 6469 6e67 2069 6e73 7465 6164 206f 6620 ding instead of \n-00137380: 4449 4d45 2c20 6163 7469 7661 7465 6420 DIME, activated \n-00137390: 7573 696e 6720 3c63 6f64 653e 3c61 2063 using soa\n-00137410: 705f 7365 745f 6d69 6d65 3c2f 613e 3c2f p_set_mime ..#S\n-00137480: 4f41 505f 454e 435f 4d54 4f4d 3c2f 636f OAP_ENC_MTOM out\n-001374c0: 2020 203c 2f74 643e 3c74 6420 636c 6173 use MT\n-001374f0: 4f4d 2058 4f50 2061 7474 6163 686d 656e OM XOP attachmen\n-00137500: 7473 2069 6e73 7465 6164 206f 6620 4449 ts instead of DI\n-00137510: 4d45 2061 6e64 204d 494d 4520 2020 203c ME and MIME <\n-00137520: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_ENC_ZLI\n-00137580: 423c 2f63 6f64 653e 2020 203c 2f74 643e B \n-00137590: 3c74 6420 636c 6173 733d 226d 6172 6b64 out c\n-001375e0: 6f6d 7072 6573 7320 6f75 7470 7574 2077 ompress output w\n-001375f0: 6974 6820 5a6c 6962 2c20 7573 696e 6720 ith Zlib, using \n-00137600: 6465 666c 6174 6520 6f72 2067 7a69 7020 deflate or gzip \n-00137610: 666f 726d 6174 2020 2020 3c2f 7464 3e3c format <\n-00137620: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#\n-00137670: 534f 4150 5f45 4e43 5f53 534c 3c2f 636f SOAP_ENC_SSL in+\n-001376b0: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out use\n-001376e0: 2053 534c 2f54 4c53 2c20 6175 746f 6d61 SSL/TLS, automa\n-001376f0: 7469 6320 7768 656e 2063 6f6e 6e65 6374 tic when connect\n-00137700: 696e 6720 2268 7474 7073 3a22 2065 6e64 ing \"https:\" end\n-00137710: 706f 696e 7473 2020 2020 3c2f 7464 3e3c points <\n-00137720: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S\n-00137770: 4f41 505f 584d 4c5f 494e 4445 4e54 3c2f OAP_XML_INDENT o\n-001377b0: 7574 2020 203c 2f74 643e 3c74 6420 636c ut outp\n-001377e0: 7574 2069 6e64 656e 7465 6420 584d 4c20 ut indented XML \n-001377f0: 616e 6420 4a53 4f4e 2020 2020 3c2f 7464 and JSON ..#SOAP_XML_CANON\n-00137860: 4943 414c 3c2f 636f 6465 3e20 2020 3c2f ICAL out \n-001378a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 output canonic\n-001378d0: 616c 2058 4d4c 2020 2020 3c2f 7464 3e3c al XML <\n-001378e0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S\n-00137930: 4f41 505f 584d 4c5f 4445 4641 554c 544e OAP_XML_DEFAULTN\n-00137940: 533c 2f63 6f64 653e 2020 203c 2f74 643e S \n-00137950: 3c74 6420 636c 6173 733d 226d 6172 6b64 out o\n-001379a0: 7574 7075 7420 584d 4c20 7769 7468 2064 utput XML with d\n-001379b0: 6566 6175 6c74 206e 616d 6573 7061 6365 efault namespace\n-001379c0: 2062 696e 6469 6e67 7320 3c63 6f64 653e bindings \n-001379d0: 786d 6c6e 733d 222e 2e2e 223c 2f63 6f64 xmlns=\"...\" \n-001379f0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP\n-00137a40: 5f58 4d4c 5f49 474e 4f52 454e 533c 2f63 _XML_IGNORENS in\n-00137a80: 2020 203c 2f74 643e 3c74 6420 636c 6173 ignore\n-00137ab0: 7320 584d 4c20 6e61 6d65 7370 6163 6573 s XML namespaces\n-00137ac0: 2069 6e20 584d 4c20 696e 7075 7420 2020 in XML input \n-00137ad0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-00137b20: 636f 6465 3e23 534f 4150 5f58 4d4c 5f53 code>#SOAP_XML_S\n-00137b30: 5452 4943 543c 2f63 6f64 653e 2020 203c TRICT <\n-00137b40: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>in \n-00137b70: 3c74 6420 636c 6173 733d 226d 6172 6b64 apply strict v\n-00137ba0: 616c 6964 6174 696f 6e20 6f66 2058 4d4c alidation of XML\n-00137bb0: 2069 6e70 7574 2020 2020 3c2f 7464 3e3c input <\n-00137bc0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#\n-00137c10: 534f 4150 5f58 4d4c 5f54 5245 453c 2f63 SOAP_XML_TREE in\n-00137c50: 2b6f 7574 2020 203c 2f74 643e 3c74 6420 +out ou\n-00137c80: 743a 2073 6572 6961 6c69 7a65 2064 6174 t: serialize dat\n-00137c90: 6120 6173 2058 4d4c 2074 7265 6573 2028 a as XML trees (\n-00137ca0: 6e6f 206d 756c 7469 2d72 6566 2c20 6475 no multi-ref, du\n-00137cb0: 706c 6963 6174 6520 6461 7461 2077 6865 plicate data whe\n-00137cc0: 6e20 6e65 6365 7373 6172 7929 3b20 696e n necessary); in\n-00137cd0: 3a20 6967 6e6f 7265 2069 6420 6174 7472 : ignore id attr\n-00137ce0: 6962 7574 6573 2028 646f 206e 6f74 2072 ibutes (do not r\n-00137cf0: 6573 6f6c 7665 2069 642d 7265 6629 2020 esolve id-ref) \n-00137d00: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n-00137d50: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n-00137d60: 4752 4150 483c 2f63 6f64 653e 2020 203c GRAPH <\n-00137d70: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>out serialize app\n-00137dd0: 6c69 6361 7469 6f6e 2064 6174 6120 6173 lication data as\n-00137de0: 2061 6e20 584d 4c20 6772 6170 6820 7769 an XML graph wi\n-00137df0: 7468 206d 756c 7469 2d72 6566 2069 642f th multi-ref id/\n-00137e00: 7265 6620 6174 7472 6962 7574 6573 2020 ref attributes \n-00137e10: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00137e40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00137e50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00137e60: 3e3c 636f 6465 3e23 534f 4150 5f58 4d4c >#SOAP_XML\n-00137e70: 5f4e 494c 3c2f 636f 6465 3e20 2020 3c2f _NIL out \n-00137eb0: 3c74 6420 636c 6173 733d 226d 6172 6b64 serialize NULL\n-00137ee0: 2064 6174 6120 6173 2078 7369 3a6e 696c data as xsi:nil\n-00137ef0: 2061 7474 7269 6275 7465 6420 656c 656d attributed elem\n-00137f00: 656e 7473 2020 2020 3c2f 7464 3e3c 2f74 ents ..#SOA\n-00137f60: 505f 584d 4c5f 4e4f 5459 5045 3c2f 636f P_XML_NOTYPE out\n-00137fa0: 2020 203c 2f74 643e 3c74 6420 636c 6173 disabl\n-00137fd0: 6520 3c65 6d3e 3c63 6f64 653e 7873 693a e xsi:\n-00137fe0: 7479 7065 3c2f 636f 6465 3e3c 2f65 6d3e type\n-00137ff0: 2061 7474 7269 6275 7465 7320 2020 203c attributes <\n-00138000: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_C_NOIO\n-00138060: 423c 2f63 6f64 653e 2020 203c 2f74 643e B \n-00138070: 3c74 6420 636c 6173 733d 226d 6172 6b64 in do\n-001380c0: 206e 6f74 2066 6175 6c74 2077 6974 6820 not fault with \n-001380d0: 3c63 6f64 653e 2353 4f41 505f 494f 423c #SOAP_IOB<\n-001380e0: 2f63 6f64 653e 2020 2020 3c2f 7464 3e3c /code> <\n-001380f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S\n-00138140: 4f41 505f 435f 5554 4653 5452 494e 473c OAP_C_UTFSTRING<\n-00138150: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00138180: 696e 2b6f 7574 2020 203c 2f74 643e 3c74 in+out \n-001381b0: 7365 7269 616c 697a 6520 382d 6269 7420 serialize 8-bit \n-001381c0: 6368 6172 6163 7465 7220 7374 7269 6e67 character string\n-001381d0: 7320 2261 7320 6973 222c 206d 6561 6e69 s \"as is\", meani\n-001381e0: 6e67 2038 2d62 6974 2073 7472 696e 6773 ng 8-bit strings\n-001381f0: 2068 6176 6520 5554 462d 3820 636f 6e74 have UTF-8 cont\n-00138200: 656e 7420 2020 203c 2f74 643e 3c2f 7472 ent ..#SOA\n-00138260: 505f 435f 4d42 5354 5249 4e47 3c2f 636f P_C_MBSTRING in+\n-001382a0: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ena\n-001382d0: 626c 6520 6d75 6c74 6962 7974 6520 6368 ble multibyte ch\n-001382e0: 6172 6163 7465 7220 7375 7070 6f72 7420 aracter support \n-001382f0: 666f 7220 382d 6269 7420 6368 6172 6163 for 8-bit charac\n-00138300: 7465 7220 7374 7269 6e67 7320 7769 7468 ter strings with\n-00138310: 203c 636f 6465 3e77 6374 6f6d 623c 2f63 wctomb and m\n-00138330: 6274 6f77 633c 2f63 6f64 653e 2075 7369 btowc usi\n-00138340: 6e67 2074 6865 2063 7572 7265 6e74 206c ng the current l\n-00138350: 6f63 616c 6520 2020 203c 2f74 643e 3c2f ocale ..#SO\n-001383b0: 4150 5f43 5f4e 494c 5354 5249 4e47 3c2f AP_C_NILSTRING o\n-001383f0: 7574 2020 203c 2f74 643e 3c74 6420 636c ut seri\n-00138420: 616c 697a 6520 656d 7074 7920 7374 7269 alize empty stri\n-00138430: 6e67 7320 6173 2078 7369 3a6e 696c 2061 ngs as xsi:nil a\n-00138440: 7474 7269 6275 7465 6420 656c 656d 656e ttributed elemen\n-00138450: 7473 2020 203c 2f74 643e 3c2f 7472 3e0a ts .\n-00138460: 3c2f 7461 626c 653e 0a3c 703e 416c 6c20 .

    All \n-00138470: 666c 6167 7320 6172 6520 696e 6465 7065 flags are indepe\n-00138480: 6e64 656e 7420 616e 6420 6361 6e20 6265 ndent and can be\n-00138490: 2063 6f6d 6269 6e65 6420 7573 696e 6720 combined using \n-001384a0: 6120 6269 7477 6973 6520 6f72 2028 3c63 a bitwise or (|), e\n-001384c0: 7863 6570 7420 666f 7220 3c63 6f64 653e xcept for \n-001384d0: 2353 4f41 505f 494f 5f46 4c55 5348 3c2f #SOAP_IO_FLUSH, #SO\n-001384f0: 4150 5f49 4f5f 4255 4646 4552 3c2f 636f AP_IO_BUFFER, #SOAP\n-00138510: 5f49 4f5f 5354 4f52 453c 2f63 6f64 653e _IO_STORE\n-00138520: 2c20 616e 6420 3c63 6f64 653e 2353 4f41 , and #SOA\n-00138530: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK which are enum\n-00138550: 6572 6174 696f 6e73 2061 6e64 206f 6e6c erations and onl\n-00138560: 7920 6f6e 6520 6f66 2074 6865 7365 2049 y one of these I\n-00138570: 2f4f 2066 6c61 6773 2063 616e 2062 6520 /O flags can be \n-00138580: 7573 6564 2e20 416c 736f 2074 6865 2058 used. Also the X\n-00138590: 4d4c 2073 6572 6961 6c69 7a61 7469 6f6e ML serialization\n-001385a0: 2066 6c61 6773 203c 636f 6465 3e23 534f flags #SO\n-001385b0: 4150 5f58 4d4c 5f54 5245 453c 2f63 6f64 AP_XML_TREE and #SO\n-001385d0: 4150 5f58 4d4c 5f47 5241 5048 3c2f 636f AP_XML_GRAPH should not b\n-001385f0: 6520 6d69 7865 642e 3c2f 703e 0a3c 703e e mixed.

    .

    \n-00138600: 546f 2061 6c6c 6f63 6174 6520 616e 6420 To allocate and \n-00138610: 696e 6974 6961 6c69 7a65 2061 203c 636f initialize a s\n-00138670: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n-00138680: 6f6e 7465 7874 2077 6974 6820 696e 7075 ontext with inpu\n-00138690: 7420 616e 6420 6f75 7470 7574 206d 6f64 t and output mod\n-001386a0: 6520 666c 6167 733a 3c2f 703e 0a3c 6469 e flags:

    .
    struc\n-001386f0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-00138720: 736f 6170 3c2f 613e 202a 203c 6120 636c soap * \n-00138780: 736f 6170 5f6e 6577 313c 2f61 3e28 3c61 soap_new1(soap_mode i\n-001387f0: 6f6d 6f64 6529 3b3c 2f64 6976 3e0a 3c64 omode);
    .\n-00138810: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00138860: 2f61 3e20 2a20 3c61 2063 6c61 7373 3d22 /a> * soap_\n-001388c0: 6e65 7732 3c2f 613e 283c 6120 636c 6173 new2(soap\n-00138920: 5f6d 6f64 653c 2f61 3e20 3c61 2063 6c61 _mode imode, soap_mode <\n-001389e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001389f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00138a00: 6874 6d6c 2361 3066 3763 6662 3464 6433 html#a0f7cfb4dd3\n-00138a10: 3261 3762 6531 6563 3633 6132 3066 3535 2a7be1ec63a20f55\n-00138a20: 6531 3235 3231 223e 6f6d 6f64 653c 2f61 e12521\">omode);

    .
    <\n-00138a90: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00138aa0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_\n-00138af0: 6e65 7732 3c2f 613e 3c2f 6469 763e 3c64 new2
    struct soap * \n-00138b20: 736f 6170 5f6e 6577 3228 736f 6170 5f6d soap_new2(soap_m\n-00138b30: 6f64 6520 696e 7075 745f 6d6f 6465 2c20 ode input_mode, \n-00138b40: 736f 6170 5f6d 6f64 6520 6f75 7470 7574 soap_mode output\n-00138b50: 5f6d 6f64 6529 3c2f 6469 763e 3c64 6976 _mode)
    A\n-00138b70: 6c6c 6f63 6174 6520 616e 6420 696e 6974 llocate and init\n-00138b80: 6961 6c69 7a65 2061 206e 6577 2073 6f61 ialize a new soa\n-00138b90: 7020 636f 6e74 6578 7420 7769 7468 2073 p context with s\n-00138ba0: 6570 6172 6174 6520 696e 7075 7420 616e eparate input an\n-00138bb0: 6420 6f75 7470 7574 2073 6f61 705f 6d6f d output soap_mo\n-00138bc0: 6465 2066 6c61 6773 2e3c 2f64 6976 3e3c de flags.
    <\n-00138bd0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-00138bf0: 546f 2069 6e69 7469 616c 697a 6520 6120 To initialize a \n-00138c00: 7374 6163 6b2d 616c 6c6f 6361 7465 6420 stack-allocated \n-00138c10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with i\n-00138c80: 6e70 7574 2061 6e64 206f 7574 7075 7420 nput and output \n-00138c90: 6d6f 6465 2066 6c61 6773 3a3c 2f70 3e0a mode flags:

    .\n-00138ca0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .
    void \n-00138e80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_init2<\n-00138ee0: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(struct\n-00138f00: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-00138f30: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-00138f60: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, soa\n-00138fc0: 705f 6d6f 6465 3c2f 613e 203c 6120 636c p_mode imode, <\n-00139020: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00139030: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00139040: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n-00139050: 3732 6230 3439 3163 3963 6266 3230 3731 72b0491c9cbf2071\n-00139060: 6630 6339 3663 3764 3239 6237 3139 6262 f0c96c7d29b719bb\n-00139070: 223e 736f 6170 5f6d 6f64 653c 2f61 3e20 \">soap_mode \n-00139080: 3c61 2063 6c61 7373 3d22 636f 6465 2220 omode);
    .
    \n-00139130: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n-001391a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_in\n-001391c0: 6974 3228 7374 7275 6374 2073 6f61 7020 it2(struct soap \n-001391d0: 2a73 6f61 702c 2073 6f61 705f 6d6f 6465 *soap, soap_mode\n-001391e0: 2069 6e70 7574 5f6d 6f64 652c 2073 6f61 input_mode, soa\n-001391f0: 705f 6d6f 6465 206f 7574 7075 745f 6d6f p_mode output_mo\n-00139200: 6465 293c 2f64 6976 3e3c 6469 7620 636c de)
    Init\n-00139220: 6961 6c69 7a65 2061 2073 7461 636b 2d61 ialize a stack-a\n-00139230: 6c6c 6f63 6174 6564 2073 6f61 7020 636f llocated soap co\n-00139240: 6e74 6578 7420 7769 7468 2069 6e70 7574 ntext with input\n-00139250: 2061 6e64 206f 7574 7075 7420 736f 6170 and output soap\n-00139260: 5f6d 6f64 6520 666c 6167 732e 3c2f 6469 _mode flags.
    .
    <\n-00139280: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00139290: 3c70 3e54 6f20 7365 7420 616e 6420 636c

    To set and cl\n-001392a0: 6561 7220 6d6f 6465 2066 6c61 6773 2075 ear mode flags u\n-001392b0: 7365 3a3c 2f70 3e0a 3c64 6976 2063 6c61 se:

    .
    \n-001392e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void soap_\n-00139360: 7365 745f 6d6f 6465 3c2f 613e 283c 7370 set_mode(struct\n-00139390: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001393c0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, soap_mode<\n-00139450: 2f61 3e20 696f 6d6f 6465 293b 203c 7370 /a> iomode); // set input \n-00139480: 616e 6420 6f75 7470 7574 206d 6f64 6520 and output mode \n-00139490: 666c 6167 733c 2f73 7061 6e3e 3c2f 6469 flags..
    void soap_set_\n-00139750: 6f6d 6f64 653c 2f61 3e28 3c73 7061 6e20 omode(\n-00139770: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001397b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001397c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001397d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001397e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_mode\n-00139840: 203c 6120 636c 6173 733d 2263 6f64 6522 omode<\n-00139890: 2f61 3e29 3b20 3c73 7061 6e20 636c 6173 /a>); // s\n-001398b0: 6574 206f 7574 7075 7420 6d6f 6465 2066 et output mode f\n-001398c0: 6c61 6773 3c2f 7370 616e 3e3c 2f64 6976 lags.
    vo\n-00139900: 6964 3c2f 7370 616e 3e20 3c61 2063 6c61 id s\n-00139960: 6f61 705f 636c 725f 6d6f 6465 3c2f 613e oap_clr_mode\n-00139970: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n-001399c0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-001399f0: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, soap_m\n-00139a50: 6f64 653c 2f61 3e20 696f 6d6f 6465 293b ode iomode);\n-00139a60: 203c 7370 616e 2063 6c61 7373 3d22 636f // clear \n-00139a80: 696e 7075 7420 616e 6420 6f75 7470 7574 input and output\n-00139a90: 206d 6f64 6520 666c 6167 733c 2f73 7061 mode flags
    .
    void\n-00139ae0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_clr_i\n-00139b40: 6d6f 6465 3c2f 613e 283c 7370 616e 2063 mode(s\n-00139b60: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-00139bd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00139be0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00139bf0: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n-00139c00: 3732 6230 3439 3163 3963 6266 3230 3731 72b0491c9cbf2071\n-00139c10: 6630 6339 3663 3764 3239 6237 3139 6262 f0c96c7d29b719bb\n-00139c20: 223e 736f 6170 5f6d 6f64 653c 2f61 3e20 \">soap_mode \n-00139c30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 imode); // cl\n-00139ca0: 6561 7220 696e 7075 7420 6d6f 6465 2066 ear input mode f\n-00139cb0: 6c61 6773 3c2f 7370 616e 3e3c 2f64 6976 lags..
    soa\n-00139f90: 705f 636c 725f 6d6f 6465 3c2f 613e 3c2f p_clr_mode
    void soa\n-00139fc0: 705f 636c 725f 6d6f 6465 2873 7472 7563 p_clr_mode(struc\n-00139fd0: 7420 736f 6170 202a 736f 6170 2c20 736f t soap *soap, so\n-00139fe0: 6170 5f6d 6f64 6520 696e 7075 745f 616e ap_mode input_an\n-00139ff0: 645f 6f75 7470 7574 5f6d 6f64 6529 3c2f d_output_mode)
    Clear inp\n-0013a020: 7574 2061 6e64 206f 7574 7075 7420 736f ut and output so\n-0013a030: 6170 5f6d 6f64 6520 666c 6167 7320 6f66 ap_mode flags of\n-0013a040: 2074 6865 2067 6976 656e 2073 6f61 7020 the given soap \n-0013a050: 636f 6e74 6578 742e 3c2f 6469 763e 3c2f context.
    .
    soap_clr_i\n-0013a120: 6d6f 6465 3c2f 613e 3c2f 6469 763e 3c64 mode
    void soap_clr_\n-0013a150: 696d 6f64 6528 7374 7275 6374 2073 6f61 imode(struct soa\n-0013a160: 7020 2a73 6f61 702c 2073 6f61 705f 6d6f p *soap, soap_mo\n-0013a170: 6465 2069 6e70 7574 5f6d 6f64 6529 3c2f de input_mode)
    Clear inp\n-0013a1a0: 7574 2073 6f61 705f 6d6f 6465 2066 6c61 ut soap_mode fla\n-0013a1b0: 6773 206f 6620 7468 6520 6769 7665 6e20 gs of the given \n-0013a1c0: 736f 6170 2063 6f6e 7465 7874 2e3c 2f64 soap context.
    .
    <\n-0013a230: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0013a240: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_\n-0013a290: 636c 725f 6f6d 6f64 653c 2f61 3e3c 2f64 clr_omode
    void soap\n-0013a2c0: 5f63 6c72 5f6f 6d6f 6465 2873 7472 7563 _clr_omode(struc\n-0013a2d0: 7420 736f 6170 202a 736f 6170 2c20 736f t soap *soap, so\n-0013a2e0: 6170 5f6d 6f64 6520 6f75 7470 7574 5f6d ap_mode output_m\n-0013a2f0: 6f64 6529 3c2f 6469 763e 3c64 6976 2063 ode)
    Cle\n-0013a310: 6172 206f 7574 7075 7420 736f 6170 5f6d ar output soap_m\n-0013a320: 6f64 6520 666c 6167 7320 6f66 2074 6865 ode flags of the\n-0013a330: 2067 6976 656e 2073 6f61 7020 636f 6e74 given soap cont\n-0013a340: 6578 742e 3c2f 6469 763e 3c2f 6469 763e ext.
    \n-0013a350: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    vo\n-0013a430: 6964 2073 6f61 705f 7365 745f 696d 6f64 id soap_set_imod\n-0013a440: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n-0013a450: 6f61 702c 2073 6f61 705f 6d6f 6465 2069 oap, soap_mode i\n-0013a460: 6e70 7574 5f6d 6f64 6529 3c2f 6469 763e nput_mode)
    \n-0013a470: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Set input soa\n-0013a490: 705f 6d6f 6465 2066 6c61 6773 206f 6620 p_mode flags of \n-0013a4a0: 7468 6520 6769 7665 6e20 736f 6170 2063 the given soap c\n-0013a4b0: 6f6e 7465 7874 2e3c 2f64 6976 3e3c 2f64 ontext.
    .
    void soap_set_o\n-0013a5b0: 6d6f 6465 2873 7472 7563 7420 736f 6170 mode(struct soap\n-0013a5c0: 202a 736f 6170 2c20 736f 6170 5f6d 6f64 *soap, soap_mod\n-0013a5d0: 6520 6f75 7470 7574 5f6d 6f64 6529 3c2f e output_mode)
    Set outpu\n-0013a600: 7420 736f 6170 5f6d 6f64 6520 666c 6167 t soap_mode flag\n-0013a610: 7320 6f66 2074 6865 2067 6976 656e 2073 s of the given s\n-0013a620: 6f61 7020 636f 6e74 6578 742e 3c2f 6469 oap context.
    .
    <\n-0013a640: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0013a650: 3c64 6c20 636c 6173 733d 2273 6563 7469
    Not\n-0013a670: 653c 2f64 743e 3c64 643e 5468 6520 3c63 e
    The #SOAP_XML_TR\n-0013a690: 4545 3c2f 636f 6465 3e20 6d6f 6465 2066 EE mode f\n-0013a6a0: 6c61 6720 6361 6e20 6265 2075 7365 6420 lag can be used \n-0013a6b0: 746f 2069 6d70 726f 7665 2069 6e74 6572 to improve inter\n-0013a6c0: 6f70 6572 6162 696c 6974 7920 7769 7468 operability with\n-0013a6d0: 2053 4f41 5020 696d 706c 656d 656e 7461 SOAP implementa\n-0013a6e0: 7469 6f6e 7320 7468 6174 2061 7265 206e tions that are n\n-0013a6f0: 6f74 2066 756c 6c79 2053 4f41 5020 312e ot fully SOAP 1.\n-0013a700: 312f 312e 3220 5250 4320 656e 636f 6469 1/1.2 RPC encodi\n-0013a710: 6e67 2063 6f6d 706c 6961 6e74 2077 6974 ng compliant wit\n-0013a720: 6820 7265 7370 6563 7420 746f 2070 726f h respect to pro\n-0013a730: 6365 7373 696e 6720 6964 2d68 7265 662f cessing id-href/\n-0013a740: 7265 6620 6174 7472 6962 7574 6573 2e20 ref attributes. \n-0013a750: 486f 7765 7665 722c 2074 7265 6520 7365 However, tree se\n-0013a760: 7269 616c 697a 6174 696f 6e20 7769 6c6c rialization will\n-0013a770: 2064 7570 6c69 6361 7465 2064 6174 6120 duplicate data \n-0013a780: 7768 656e 2074 6869 7320 6461 7461 2069 when this data i\n-0013a790: 7320 636f 2d72 6566 6572 656e 6365 642e s co-referenced.\n-0013a7a0: 2043 7963 6c65 7320 6172 6520 6465 7465 Cycles are dete\n-0013a7b0: 6374 6564 2061 6e64 2062 726f 6b65 6e20 cted and broken \n-0013a7c0: 746f 2061 766f 6964 2069 6e66 696e 6974 to avoid infinit\n-0013a7d0: 6520 7365 7269 616c 697a 6174 696f 6e2e e serialization.\n-0013a7e0: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e 496e
    .

    In\n-0013a7f0: 2061 6464 6974 696f 6e20 746f 2074 6865 addition to the\n-0013a800: 2063 6f6e 7465 7874 206d 6f64 6520 666c context mode fl\n-0013a810: 6167 732c 2074 6865 2066 6f6c 6c6f 7769 ags, the followi\n-0013a820: 6e67 2063 6f6e 7465 7874 2066 6c61 6773 ng context flags\n-0013a830: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n-0013a840: 7365 7420 3c63 6f64 653e 7365 7473 6f63 set setsoc\n-0013a850: 6b6f 7074 3c2f 636f 6465 3e20 6c65 7665 kopt leve\n-0013a860: 6c20 3c63 6f64 653e 534f 4c5f 534f 434b l SOL_SOCK\n-0013a870: 4554 3c2f 636f 6465 3e20 6f70 7469 6f6e ET option\n-0013a880: 7320 7768 656e 2073 6f63 6b65 7473 2061 s when sockets a\n-0013a890: 7265 2063 7265 6174 6564 2c20 7468 6f75 re created, thou\n-0013a8a0: 6768 2073 6f6d 6520 6f70 7469 6f6e 7320 gh some options \n-0013a8b0: 6d61 7920 6e6f 7420 6265 2061 7070 6c69 may not be appli\n-0013a8c0: 6361 626c 6520 746f 2079 6f75 7220 6f70 cable to your op\n-0013a8d0: 6572 6174 696e 6720 7379 7374 656d 3a3c erating system:<\n-0013a8e0: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>..\n-0013a920: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b .\n-0013a990: 7265 7375 6c74 2020 2020 3c2f 7468 3e3c result <\n-0013a9a0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.........\n-0013b120: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-0013b140: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..\n-0013b2c0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ......<\n-0013b8a0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0013b8b0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-0013b8c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-0013ba60: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-0013bb80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013bb90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013bba0: 3e65 6e61 626c 6573 206c 6f63 616c 2061 >enables local a\n-0013bbb0: 6464 7265 7373 2072 6575 7365 2069 6d6d ddress reuse imm\n-0013bbc0: 6564 6961 7465 6c79 2c20 7573 6520 7769 ediately, use wi\n-0013bbd0: 7468 2063 6175 7469 6f6e 2020 2020 3c2f th caution ...
    context flag \n-0013a950: 7769 7468 2073 6574 736f 636b 6f70 7420 with setsockopt \n-0013a960: 6f70 7469 6f6e 2020 203c 2f74 683e 3c74 option
    soap::conn\n-0013aab0: 6563 745f 666c 6167 733c 2f61 3e3c 2f63 ect_flags = SO_\n-0013aad0: 4e4f 5349 4750 4950 453c 2f63 6f64 653e NOSIGPIPE\n-0013aae0: 2020 203c 2f74 643e 3c74 6420 636c 6173 disabl\n-0013ab10: 6573 2053 4947 5049 5045 2020 2020 3c2f es SIGPIPE
    soap:\n-0013ac30: 3a63 6f6e 6e65 6374 5f66 6c61 6773 3c2f :connect_flags = SO_DEBUG turns\n-0013ac90: 206f 6e20 7265 636f 7264 696e 6720 6f66 on recording of\n-0013aca0: 2064 6562 7567 6769 6e67 2069 6e66 6f72 debugging infor\n-0013acb0: 6d61 7469 6f6e 2069 6e20 7468 6520 756e mation in the un\n-0013acc0: 6465 726c 7969 6e67 2070 726f 746f 636f derlying protoco\n-0013acd0: 6c20 6d6f 6475 6c65 7320 2020 203c 2f74 l modules
    soap::c\n-0013adf0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n-0013ae00: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n-0013ae10: 534f 5f42 524f 4144 4341 5354 3c2f 636f SO_BROADCAST per\n-0013ae50: 6d69 7473 2073 656e 6469 6e67 206f 6620 mits sending of \n-0013ae60: 6272 6f61 6463 6173 7420 6d65 7373 6167 broadcast messag\n-0013ae70: 6573 2c20 666f 7220 6578 616d 706c 6520 es, for example \n-0013ae80: 7769 7468 2055 4450 2c20 7768 656e 2070 with UDP, when p\n-0013ae90: 6572 6d69 7474 6564 2020 2020 3c2f 7464 ermitted
    soap::c\n-0013afb0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n-0013afc0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n-0013afd0: 534f 5f4c 494e 4745 523c 2f63 6f64 653e SO_LINGER\n-0013afe0: 2020 203c 2f74 643e 3c74 6420 636c 6173 sets c\n-0013b010: 6c69 656e 742d 7369 6465 206c 696e 6765 lient-side linge\n-0013b020: 7220 7469 6d65 2074 6f20 7468 6520 7661 r time to the va\n-0013b030: 6c75 6520 6f66 203c 636f 6465 3e3c 6120 lue of soap::linge\n-0013b100: 725f 7469 6d65 3c2f 613e 3c2f 636f 6465 r_time
    soap::connect_f\n-0013b230: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n-0013b240: 3d20 3c63 6f64 653e 534f 5f44 4f4e 5452 = SO_DONTR\n-0013b250: 4f55 5445 3c2f 636f 6465 3e20 2020 3c2f OUTE enables rou\n-0013b290: 7469 6e67 2062 7970 6173 7320 666f 7220 ting bypass for \n-0013b2a0: 6f75 7467 6f69 6e67 206d 6573 7361 6765 outgoing message\n-0013b2b0: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    soap::accept_f\n-0013b3d0: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n-0013b3e0: 3d20 3c63 6f64 653e 534f 5f4e 4f53 4947 = SO_NOSIG\n-0013b3f0: 5049 5045 3c2f 636f 6465 3e20 2020 3c2f PIPE disables SI\n-0013b430: 4750 4950 4520 2863 6865 636b 2079 6f75 GPIPE (check you\n-0013b440: 7220 4f53 2c20 7468 6973 2069 7320 6e6f r OS, this is no\n-0013b450: 7420 706f 7274 6162 6c65 2920 2020 203c t portable) <\n-0013b460: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    soap:\n-0013b570: 3a61 6363 6570 745f 666c 6167 733c 2f61 :accept_flags = SO_DEBUG\n-0013b5a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 turns \n-0013b5d0: 6f6e 2072 6563 6f72 6469 6e67 206f 6620 on recording of \n-0013b5e0: 6465 6275 6767 696e 6720 696e 666f 726d debugging inform\n-0013b5f0: 6174 696f 6e20 696e 2074 6865 2075 6e64 ation in the und\n-0013b600: 6572 6c79 696e 6720 7072 6f74 6f63 6f6c erlying protocol\n-0013b610: 206d 6f64 756c 6573 2020 2020 3c2f 7464 modules
    soap::a\n-0013b730: 6363 6570 745f 666c 6167 733c 2f61 3e3c ccept_flags<\n-0013b740: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n-0013b750: 4f5f 4c49 4e47 4552 3c2f 636f 6465 3e20 O_LINGER \n-0013b760: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 sets se\n-0013b790: 7276 6572 2d73 6964 6520 6c69 6e67 6572 rver-side linger\n-0013b7a0: 2074 696d 6520 746f 2074 6865 2076 616c time to the val\n-0013b7b0: 7565 206f 6620 3c63 6f64 653e 3c61 2063 ue of soap::linger\n-0013b880: 5f74 696d 653c 2f61 3e3c 2f63 6f64 653e _time\n-0013b890: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    \n-0013b9a0: 736f 6170 3a3a 6163 6365 7074 5f66 6c61 soap::accept_fla\n-0013b9b0: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n-0013b9c0: 3c63 6f64 653e 534f 5f44 4f4e 5452 4f55 SO_DONTROU\n-0013b9d0: 5445 3c2f 636f 6465 3e20 2020 3c2f 7464 TE enables routi\n-0013ba10: 6e67 2062 7970 6173 7320 666f 7220 6f75 ng bypass for ou\n-0013ba20: 7467 6f69 6e67 206d 6573 7361 6765 7320 tgoing messages \n-0013ba30: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    \n-0013bb40: 736f 6170 3a3a 6269 6e64 5f66 6c61 6773 soap::bind_flags\n-0013bb50: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_REUSEADDR\n-0013bb70: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    soap::\n-0013bcf0: 6269 6e64 5f66 6c61 6773 3c2f 613e 3c2f bind_flags = SO\n-0013bd10: 5f52 4555 5345 504f 5254 3c2f 636f 6465 _REUSEPORT enabl\n-0013bd50: 6573 2064 7570 6c69 6361 7465 2061 6464 es duplicate add\n-0013bd60: 7265 7373 2061 6e64 2070 6f72 7420 6269 ress and port bi\n-0013bd70: 6e64 696e 6773 2020 203c 2f74 643e 3c2f ndings
    .

    \n-0013bd90: 466f 7220 6578 616d 706c 652c 2077 6865 For example, whe\n-0013bda0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n \n-0013be60: 736f 6170 3a3a 6163 6365 7074 5f66 6c61 soap::accept_fla\n-0013be70: 6773 3c2f 613e 3c2f 636f 6465 3e20 6973 gs is\n-0013be80: 2073 6574 2074 6f20 3c63 6f64 653e 2853 set to (S\n-0013be90: 4f5f 4e4f 5349 4750 4950 4520 7c20 534f O_NOSIGPIPE | SO\n-0013bea0: 5f4c 494e 4745 5229 3c2f 636f 6465 3e20 _LINGER) \n-0013beb0: 7468 6973 2064 6973 6162 6c65 7320 5349 this disables SI\n-0013bec0: 4750 4950 4520 7369 676e 616c 7320 616e GPIPE signals an\n-0013bed0: 6420 7365 7420 6c69 6e67 6572 2074 696d d set linger tim\n-0013bee0: 6520 7661 6c75 6520 6769 7665 6e20 6279 e value given by\n-0013bef0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-0013bfb0: 6f61 703a 3a6c 696e 6765 725f 7469 6d65 oap::linger_time\n-0013bfc0: 3c2f 613e 3c2f 636f 6465 3e2c 2077 6869 , whi\n-0013bfd0: 6368 2069 7320 7a65 726f 2062 7920 6465 ch is zero by de\n-0013bfe0: 6661 756c 742e 3c2f 703e 0a3c 703e 5468 fault.

    .

    Th\n-0013bff0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n-0013c0b0: 736f 6170 3a3a 736f 636b 6574 5f66 6c61 soap::socket_fla\n-0013c0c0: 6773 3c2f 613e 3c2f 636f 6465 3e20 636f gs co\n-0013c0d0: 6e74 6578 7420 666c 6167 2063 616e 2062 ntext flag can b\n-0013c0e0: 6520 7573 6564 2074 6f20 7061 7373 206f e used to pass o\n-0013c0f0: 7074 696f 6e73 2074 6f20 7468 6520 3c63 ptions to the <sys/sock\n-0013c110: 6574 2e68 2667 743b 3c2f 636f 6465 3e20 et.h> \n-0013c120: 3c63 6f64 653e 7365 6e64 3c2f 636f 6465 send, sendto<\n-0013c140: 2f63 6f64 653e 2c20 3c63 6f64 653e 7265 /code>, re\n-0013c150: 6376 3c2f 636f 6465 3e2c 2061 6e64 203c cv, and <\n-0013c160: 636f 6465 3e72 6563 7666 726f 6d3c 2f63 code>recvfrom calls made \n-0013c180: 6279 2074 6865 2065 6e67 696e 652c 2074 by the engine, t\n-0013c190: 686f 7567 6820 736f 6d65 206f 7074 696f hough some optio\n-0013c1a0: 6e73 206d 6179 206e 6f74 2062 6520 6170 ns may not be ap\n-0013c1b0: 706c 6963 6162 6c65 2074 6f20 796f 7572 plicable to your\n-0013c1c0: 206f 7065 7261 7469 6e67 2073 7973 7465 operating syste\n-0013c1d0: 6d3a 3c2f 703e 0a3c 7461 626c 6520 636c m:

    ...<\n-0013c260: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n-0013c270: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n-0013c280: 3e72 6573 756c 7420 2020 203c 2f74 683e >result \n-0013c290: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....e\n-0013c580: 6e61 626c 6573 2072 6f75 7469 6e67 2062 nables routing b\n-0013c590: 7970 6173 7320 666f 7220 6f75 7467 6f69 ypass for outgoi\n-0013c5a0: 6e67 206d 6573 7361 6765 7320 2020 3c2f ng messages ..

    Furthermore\n-0013c5d0: 2c20 7468 6520 3c63 6f64 653e 7365 7473 , the sets\n-0013c5e0: 6f63 6b6f 7074 3c2f 636f 6465 3e20 6c65 ockopt le\n-0013c5f0: 7665 6c20 3c63 6f64 653e 534f 4c5f 534f vel SOL_SO\n-0013c600: 434b 4554 3c2f 636f 6465 3e20 6f70 7469 CKET opti\n-0013c610: 6f6e 7320 3c63 6f64 653e 534f 5f53 4e44 ons SO_SND\n-0013c620: 4255 463c 2f63 6f64 653e 2061 6e64 203c BUF and <\n-0013c630: 636f 6465 3e53 4f5f 5243 5642 5546 3c2f code>SO_RCVBUF are set th\n-0013c650: 6520 656e 6769 6e65 2077 6865 6e20 3c63 e engine when soap:\n-0013c710: 3a73 6e64 6275 663c 2f61 3e3c 2f63 6f64 :sndbuf and soap::rcvbuf\n-0013c7e0: 3c2f 613e 3c2f 636f 6465 3e20 6172 6520 are \n-0013c7f0: 7365 7420 746f 2061 206e 6f6e 7a65 726f set to a nonzero\n-0013c800: 2076 616c 7565 2e20 5468 6520 6465 6661 value. The defa\n-0013c810: 756c 7420 7661 6c75 6520 6973 203c 636f ult value is #SOAP_BUFLEN<\n-0013c830: 2f63 6f64 653e 2c20 7768 6963 6820 6973 /code>, which is\n-0013c840: 2074 6865 2073 616d 6520 7369 7a65 2075 the same size u\n-0013c850: 7365 6420 6279 2074 6865 2069 6e74 6572 sed by the inter\n-0013c860: 6e61 6c20 6275 6666 6572 203c 636f 6465 nal buffer soap::b\n-0013c930: 7566 3c2f 613e 3c2f 636f 6465 3e20 746f uf to\n-0013c940: 2073 656e 6420 616e 6420 7265 6365 6976 send and receiv\n-0013c950: 6520 6d65 7373 6167 6573 2e20 4120 7a65 e messages. A ze\n-0013c960: 726f 2076 616c 7565 206f 6d69 7473 2074 ro value omits t\n-0013c970: 6865 2069 6e74 6572 6e61 6c20 3c63 6f64 he internal setsockopt call to set \n-0013c9a0: 7468 6573 6520 6f70 7469 6f6e 732e 2053 these options. S\n-0013c9b0: 6574 7469 6e67 2074 6865 7365 2076 616c etting these val\n-0013c9c0: 7565 7320 746f 207a 6572 6f20 6163 7469 ues to zero acti\n-0013c9d0: 7661 7465 7320 6175 746f 2d74 756e 696e vates auto-tunin\n-0013c9e0: 6720 7769 7468 204c 696e 7578 2032 2e34 g with Linux 2.4\n-0013c9f0: 2061 6e64 2067 7265 6174 6572 2e3c 2f70 and greater..

    The s\n-0013ca10: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt\n-0013ca20: 206c 6576 656c 203c 636f 6465 3e53 4f4c level SOL\n-0013ca30: 5f53 4f43 4b45 543c 2f63 6f64 653e 206f _SOCKET o\n-0013ca40: 7074 696f 6e20 3c63 6f64 653e 534f 5f4b ption SO_K\n-0013ca50: 4545 5041 4c49 5645 3c2f 636f 6465 3e20 EEPALIVE \n-0013ca60: 6973 2073 6574 2077 6865 6e20 6b65 6570 is set when keep\n-0013ca70: 2d61 6c69 7665 2069 7320 656e 6162 6c65 -alive is enable\n-0013ca80: 6420 7769 7468 2063 6f6e 7465 7874 2066 d with context f\n-0013ca90: 6c61 6720 3c63 6f64 653e 2353 4f41 505f lag #SOAP_\n-0013caa0: 494f 5f4b 4545 5041 4c49 5645 3c2f 636f IO_KEEPALIVE or when soap::\n-0013cb80: 7463 705f 6b65 6570 5f61 6c69 7665 3c2f tcp_keep_alive is non\n-0013cba0: 7a65 726f 2e20 5769 7468 203c 636f 6465 zero. With soap::t\n-0013cc70: 6370 5f6b 6565 705f 616c 6976 653c 2f61 cp_keep_alive additio\n-0013cc90: 6e61 6c20 6f70 7469 6f6e 7320 6361 6e20 nal options can \n-0013cca0: 6265 2073 7065 6369 6669 6564 2077 6974 be specified wit\n-0013ccb0: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap::tcp\n-0013cd60: 5f6b 6565 705f 6964 6c65 3c2f 613e 3c2f _keep_idle, soa\n-0013ce20: 703a 3a74 6370 5f6b 6565 705f 696e 7476 p::tcp_keep_intv\n-0013ce30: 6c3c 2f61 3e3c 2f63 6f64 653e 2c20 616e l, an\n-0013ce40: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap::tcp_\n-0013cef0: 6b65 6570 5f63 6e74 3c2f 613e 3c2f 636f keep_cnt. For example\n-0013cf10: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    ..\n-0013d030: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    \n-0013d150: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->tcp_keep_i\n-0013d1b0: 646c 653c 2f61 3e20 3d20 3330 3b20 2020 dle = 30; \n-0013d1c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // time in\n-0013d1e0: 2073 6563 6f6e 6473 2074 6865 2063 6f6e seconds the con\n-0013d1f0: 6e65 6374 696f 6e20 6e65 6564 7320 746f nection needs to\n-0013d200: 2072 656d 6169 6e20 6964 6c65 2062 6566 remain idle bef\n-0013d210: 6f72 6520 5443 5020 7374 6172 7473 2073 ore TCP starts s\n-0013d220: 656e 6469 6e67 206b 6565 7061 6c69 7665 ending keepalive\n-0013d230: 2070 726f 6265 733c 2f73 7061 6e3e 3c2f probes.
    so\n-0013d280: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->tcp_keep_int\n-0013d2e0: 766c 3c2f 613e 203d 2031 3230 3b20 3c73 vl = 120; // time in s\n-0013d310: 6563 6f6e 6473 2062 6574 7765 656e 2069 econds between i\n-0013d320: 6e64 6976 6964 7561 6c20 6b65 6570 616c ndividual keepal\n-0013d330: 6976 6520 7072 6f62 6573 3c2f 7370 616e ive probes
    .
    soap->tcp_keep_\n-0013d3e0: 636e 743c 2f61 3e20 3d20 353b 2020 2020 cnt = 5; \n-0013d3f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // maximu\n-0013d410: 6d20 6e75 6d62 6572 206f 6620 6b65 6570 m number of keep\n-0013d420: 616c 6976 6520 7072 6f62 6573 2054 4350 alive probes TCP\n-0013d430: 2073 686f 756c 6420 7365 6e64 2062 6566 should send bef\n-0013d440: 6f72 6520 6472 6f70 7069 6e67 2074 6865 ore dropping the\n-0013d450: 2063 6f6e 6e65 6374 696f 6e3c 2f73 7061 connection
    .
    unsigned int t\n-0013d540: 6370 5f6b 6565 705f 636e 743c 2f64 6976 cp_keep_cnt
    User-definab\n-0013d570: 6c65 2076 616c 7565 2074 6f20 7365 7420 le value to set \n-0013d580: 5443 505f 4b45 4550 434e 5420 7365 7473 TCP_KEEPCNT sets\n-0013d590: 6f63 6b6f 7074 2028 7468 6520 7661 6c75 ockopt (the valu\n-0013d5a0: 6520 6973 2030 2062 7920 6465 6661 756c e is 0 by defaul\n-0013d5b0: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    De\n-0013d5d0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0013d5e0: 6473 6f61 7032 2e68 3a33 3538 343c 2f64 dsoap2.h:3584
    .
    soap::tcp_kee\n-0013d6a0: 705f 696e 7476 6c3c 2f61 3e3c 2f64 6976 p_intvl
    unsigned in\n-0013d6d0: 7420 7463 705f 6b65 6570 5f69 6e74 766c t tcp_keep_intvl\n-0013d6e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    User-de\n-0013d700: 6669 6e61 626c 6520 7661 6c75 6520 746f finable value to\n-0013d710: 2073 6574 2054 4350 5f4b 4545 5049 4e54 set TCP_KEEPINT\n-0013d720: 564c 2073 6574 736f 636b 6f70 7420 2874 VL setsockopt (t\n-0013d730: 6865 2076 616c 7565 2069 7320 3020 6279 he value is 0 by\n-0013d740: 2064 6566 6175 6c74 293c 2f64 6976 3e3c default)
    <\n-0013d750: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-0013d760: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-0013d770: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-0013d780: 3335 3539 3c2f 6469 763e 3c2f 6469 763e 3559
    \n-0013d790: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n-0013d830: 7463 705f 6b65 6570 5f69 646c 653c 2f61 tcp_keep_idle
    unsig\n-0013d860: 6e65 6420 696e 7420 7463 705f 6b65 6570 ned int tcp_keep\n-0013d870: 5f69 646c 653c 2f64 6976 3e3c 6469 7620 _idle
    Us\n-0013d890: 6572 2d64 6566 696e 6162 6c65 2076 616c er-definable val\n-0013d8a0: 7565 2074 6f20 7365 7420 5443 505f 4b45 ue to set TCP_KE\n-0013d8b0: 4550 4944 4c45 2073 6574 736f 636b 6f70 EPIDLE setsockop\n-0013d8c0: 7420 2874 6865 2076 616c 7565 2069 7320 t (the value is \n-0013d8d0: 3020 6279 2064 6566 6175 6c74 293c 2f64 0 by default)
    Definit\n-0013d900: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0013d910: 322e 683a 3335 3334 3c2f 6469 763e 3c2f 2.h:3534
    .\n-0013d9f0: 696e 7420 7463 705f 6b65 6570 5f61 6c69 int tcp_keep_ali\n-0013da00: 7665 3c2f 6469 763e 3c64 6976 2063 6c61 ve
    User-\n-0013da20: 6465 6669 6e61 626c 6520 7661 6c75 6520 definable value \n-0013da30: 746f 2073 6574 2053 4f5f 4b45 4550 414c to set SO_KEEPAL\n-0013da40: 4956 4520 7365 7473 6f63 6b6f 7074 2028 IVE setsockopt (\n-0013da50: 3020 6279 2064 6566 6175 6c74 2075 6e6c 0 by default unl\n-0013da60: 6573 7320 7468 6520 2353 4f41 505f 494f ess the #SOAP_IO\n-0013da70: 5f4b 4545 5041 4c49 5645 206d 6f64 6520 _KEEPALIVE mode \n-0013da80: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-0013daa0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0013dab0: 7464 736f 6170 322e 683a 3335 3039 3c2f tdsoap2.h:3509
    .

    Sinc\n-00149b40: 6520 7468 6520 3c63 6f64 653e 6e61 6d65 e the name\n-00149b50: 3c2f 636f 6465 3e20 6d65 6d62 6572 2069 member i\n-00149b60: 7320 6120 6368 6172 6163 7465 7220 706f s a character po\n-00149b70: 696e 7465 7220 746f 2061 2073 7472 696e inter to a strin\n-00149b80: 672c 2077 6865 7265 2073 686f 756c 6420 g, where should \n-00149b90: 7765 2061 6c6c 6f63 6174 6520 7468 6973 we allocate this\n-00149ba0: 2073 7472 696e 673f 2049 6e20 6d6f 7374 string? In most\n-00149bb0: 2063 6173 6573 2077 6520 7769 6c6c 2061 cases we will a\n-00149bc0: 6464 2061 2063 6f6e 7374 7275 6374 6f72 dd a constructor\n-00149bd0: 2074 6861 7420 696e 6974 6961 6c6c 7920 that initially \n-00149be0: 7365 7473 203c 636f 6465 3e6e 616d 653c sets name<\n-00149bf0: 2f63 6f64 653e 2074 6f20 4e55 4c4c 2061 /code> to NULL a\n-00149c00: 6e64 2061 2064 6573 7472 7563 746f 7220 nd a destructor \n-00149c10: 7468 6174 2064 656c 6574 6573 203c 636f that deletes name w\n-00149c30: 6865 6e20 6e6f 6e2d 4e55 4c4c 2c20 6c69 hen non-NULL, li\n-00149c40: 6b65 2073 6f3a 3c2f 703e 0a3c 6469 7620 ke so:

    .
    Class::Class(\n-00149c80: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    so\n-00149ce0: 6170 3c2f 613e 203d 204e 554c 4c3b 3c2f ap = NULL;.
    name = \n-00149d10: 4e55 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 NULL;
    .} \n-00149d30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Class::\n-00149d50: 7e43 6c61 7373 2829 203c 2f64 6976 3e0a ~Class()
    .\n-00149d60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (name)
    .<\n-00149dc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00149dd0: 3e20 2020 2066 7265 6528 6e61 6d65 293b > free(name);\n-00149de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-00149e00: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Howev\n-00149e20: 6572 2c20 7768 656e 2069 6e73 7461 6e63 er, when instanc\n-00149e30: 6573 206f 6620 3c63 6f64 653e 436c 6173 es of Clas\n-00149e40: 733c 2f63 6f64 653e 2061 7265 2064 6573 s are des\n-00149e50: 6572 6961 6c69 7a65 6420 7765 2068 6176 erialized we hav\n-00149e60: 6520 6120 7072 6f62 6c65 6d20 7769 7468 e a problem with\n-00149e70: 2074 6869 7320 6170 7072 6f61 6368 2062 this approach b\n-00149e80: 6563 6175 7365 203c 636f 6465 3e66 7265 ecause fre\n-00149e90: 6528 6e61 6d65 293c 2f63 6f64 653e 2064 e(name) d\n-00149ea0: 656c 6574 6573 2061 206d 616e 6167 6564 eletes a managed\n-00149eb0: 2073 7472 696e 672c 2077 6869 6368 2069 string, which i\n-00149ec0: 7320 6d61 6e61 6765 6420 6279 2074 6865 s managed by the\n-00149ed0: 2063 6f6e 7465 7874 2e20 4265 6361 7573 context. Becaus\n-00149ee0: 6520 7468 6520 6465 7365 7269 616c 697a e the deserializ\n-00149ef0: 6572 2061 6c73 6f20 7365 7473 2074 6865 er also sets the\n-00149f00: 203c 636f 6465 3e73 6f61 703c 2f63 6f64 soap member of thi\n-00149f20: 7320 636c 6173 732c 2074 6865 7265 2069 s class, there i\n-00149f30: 7320 616e 2065 6173 7920 736f 6c75 7469 s an easy soluti\n-00149f40: 6f6e 2074 6f20 7468 6973 2070 726f 626c on to this probl\n-00149f50: 656d 3a3c 2f70 3e0a 3c64 6976 2063 6c61 em:

    .
    \n-00149f80: 436c 6173 733a 3a7e 436c 6173 7328 2920 Class::~Class() \n-00149f90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00149fb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-00149fe0: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soap &\n-0014a020: 2661 6d70 3b20 6e61 6d65 293c 2f64 6976 & name).
    free(nam\n-0014a050: 6529 3b3c 2f64 6976 3e0a 3c64 6976 2063 e);
    .
    }.

    Th\n-0014a090: 6973 206f 6e6c 7920 6672 6565 7320 3c63 is only frees name \n-0014a0b0: 6966 2074 6865 203c 636f 6465 3e73 6f61 if the soa\n-0014a0c0: 703c 2f63 6f64 653e 2063 6f6e 7465 7874 p context\n-0014a0d0: 2070 6f69 6e74 6572 206d 656d 6265 7220 pointer member \n-0014a0e0: 6973 204e 554c 4c2c 206d 6561 6e69 6e67 is NULL, meaning\n-0014a0f0: 2074 6861 7420 6120 6d61 6e61 6765 6420 that a managed \n-0014a100: 7374 7269 6e67 203c 636f 6465 3e6e 616d string nam\n-0014a110: 653c 2f63 6f64 653e 2077 696c 6c20 6265 e will be\n-0014a120: 2064 656c 6574 6564 2061 7320 7573 7561 deleted as usua\n-0014a130: 6c20 7769 7468 2074 6865 2064 6573 6572 l with the deser\n-0014a140: 6961 6c69 7a65 6420 636c 6173 7320 7573 ialized class us\n-0014a150: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing soap_de\n-0014a210: 7374 726f 793c 2f61 3e3c 2f63 6f64 653e stroy\n-0014a220: 2061 6e64 203c 636f 6465 3e3c 6120 636c and s\n-0014a2f0: 6f61 705f 656e 643c 2f61 3e3c 2f63 6f64 oap_end.

    .

    The o\n-0014a310: 7468 6572 206d 6574 686f 6473 2061 7265 ther methods are\n-0014a320: 2061 6c73 6f20 6d61 6465 2063 6f67 6e69 also made cogni\n-0014a330: 7a61 6e74 206f 6620 7468 6520 7072 6573 zant of the pres\n-0014a340: 656e 6365 206f 6620 6120 636f 6e74 6578 ence of a contex\n-0014a350: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

    .
    <\n-0014a380: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0014a390: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void Class::setN\n-0014a3b0: 616d 6528 3c73 7061 6e20 636c 6173 733d ame(const<\n-0014a3d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *s)\n-0014a400: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-0014a420: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-0014a450: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap)
    \n-0014a490: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    name = soap_strdup(soap, s);
    .\n-0014a560: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n-0014a580: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0014a5a0: 2020 2020 6e61 6d65 203d 2073 7472 6475 name = strdu\n-0014a5b0: 7028 7329 3b3c 2f64 6976 3e0a 3c64 6976 p(s);
    .}<\n-0014a5d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n-0014a600: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-0014a630: 202a 6765 744e 616d 6528 293c 2f64 6976 *getName().
    {
    . \n-0014a670: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-0014a690: 3c2f 7370 616e 3e20 6e61 6d65 3b3c 2f64 name;.
    }
    .

    Another \n-0014a6e0: 6170 7072 6f61 6368 2069 7320 746f 2075 approach is to u\n-0014a6f0: 7365 203c 636f 6465 3e3c 6120 636c 6173 se soa\n-0014a7c0: 705f 756e 6c69 6e6b 3c2f 613e 3c2f 636f p_unlink to unlink da\n-0014a7e0: 7461 206d 616e 6167 6564 2062 7920 7468 ta managed by th\n-0014a7f0: 6520 636f 6e74 6578 7420 616e 6420 6d61 e context and ma\n-0014a800: 6b65 2061 6c6c 2061 6c6c 6f63 6174 696f ke all allocatio\n-0014a810: 6e73 2065 7870 6c69 6369 746c 793a 3c2f ns explicitly:.

    Class\n-0014a850: 3a3a 7e43 6c61 7373 2829 203c 2f64 6976 ::~Class() .
    {
    . \n-0014a890: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (name)
    \n-0014a8c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n-0014a8f0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_unl\n-0014a950: 696e 6b3c 2f61 3e28 3c61 2063 6c61 7373 ink(s\n-0014a980: 6f61 703c 2f61 3e2c 206e 616d 6529 3b20 oap, name); \n-0014a990: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // unlinks\n-0014a9b0: 2074 6865 206e 616d 6520 6966 2073 6f61 the name if soa\n-0014a9c0: 7020 6973 206e 6f6e 2d4e 554c 4c3c 2f73 p is non-NULL
    .
    \n-0014a9f0: 2066 7265 6528 6e61 6d65 293b 3c2f 6469 free(name);.
    }
    .<\n-0014aa20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0014aa30: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    void\n-0014aa70: 2043 6c61 7373 3a3a 7365 744e 616d 6528 Class::setName(\n-0014aa80: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-0014aac0: 723c 2f73 7061 6e3e 202a 7329 3c2f 6469 r *s).
    {
    . \n-0014ab00: 206e 616d 6520 3d20 7374 7264 7570 2873 name = strdup(s\n-0014ab10: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    }.
    const\n-0014ab60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *g\n-0014ab90: 6574 4e61 6d65 2829 3c2f 6469 763e 0a3c etName()
    .<\n-0014aba0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0014abb0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    return name;
    \n-0014ac00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    \n-0014ac70: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    soap\n-0014acd0: 5f75 6e6c 696e 6b3c 2f61 3e3c 2f64 6976 _unlink
    int soap_un\n-0014ad00: 6c69 6e6b 2873 7472 7563 7420 736f 6170 link(struct soap\n-0014ad10: 202a 736f 6170 2c20 636f 6e73 7420 766f *soap, const vo\n-0014ad20: 6964 202a 7074 7229 3c2f 6469 763e 3c64 id *ptr)
    Unlink a block \n-0014ad50: 6f66 2068 6561 7020 6d65 6d6f 7279 206d of heap memory m\n-0014ad60: 616e 6167 6564 2062 7920 7468 6520 7370 anaged by the sp\n-0014ad70: 6563 6966 6965 6420 736f 6170 2063 6f6e ecified soap con\n-0014ad80: 7465 7874 2c20 746f 2072 656c 6561 7365 text, to release\n-0014ad90: 2074 6865 206d 656d 6f72 7920 6578 706c the memory expl\n-0014ada0: 6963 6974 6c79 2e2e 2e3c 2f64 6976 3e3c icitly...
    <\n-0014adb0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-0014add0: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The so\n-0014aea0: 6170 5f75 6e6c 696e 6b3c 2f61 3e3c 2f63 ap_unlink call unlink\n-0014aec0: 7320 6461 7461 2061 6e64 206f 626a 6563 s data and objec\n-0014aed0: 7473 2066 726f 6d20 6d61 6e61 6765 6420 ts from managed \n-0014aee0: 6d65 6d6f 7279 2e20 496e 2074 6869 7320 memory. In this \n-0014aef0: 7761 7920 3c63 6f64 653e 3c61 2063 6c61 way soap_de\n-0014afb0: 7374 726f 793c 2f61 3e3c 2f63 6f64 653e stroy\n-0014afc0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and s\n-0014b090: 6f61 705f 656e 643c 2f61 3e3c 2f63 6f64 oap_end can be called\n-0014b0b0: 206c 6174 6572 2065 7665 6e20 7768 656e later even when\n-0014b0c0: 2074 6869 7320 636c 6173 7320 7761 7320 this class was \n-0014b0d0: 6465 7365 7269 616c 697a 6564 2e3c 2f70 deserialized..

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

    .

    .Debugging

    \n-0014b150: 0a3c 703e 546f 2061 6374 6976 6174 6520 .

    To activate \n-0014b160: 6465 6275 6767 696e 6720 616e 6420 6d65 debugging and me\n-0014b170: 7373 6167 6520 6c6f 6767 696e 6720 636f ssage logging co\n-0014b180: 6d70 696c 6520 7468 6520 736f 7572 6365 mpile the source\n-0014b190: 2063 6f64 6520 7769 7468 2063 6f6d 7069 code with compi\n-0014b1a0: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #DEBUG\n-0014b1c0: 2e20 4f72 2077 6865 6e20 7573 696e 6720 . Or when using \n-0014b1d0: 3c62 3e3c 636f 6465 3e2d 6c67 736f 6170 -lgsoap\n-0014b1e0: 3c2f 636f 6465 3e3c 2f62 3e20 6f72 203c or <\n-0014b1f0: 623e 3c63 6f64 653e 2d6c 6773 6f61 702b b>-lgsoap+\n-0014b200: 2b3c 2f63 6f64 653e 3c2f 623e 2074 6865 + the\n-0014b210: 6e20 7265 696e 7374 616c 6c20 6753 4f41 n reinstall gSOA\n-0014b220: 5020 7769 7468 203c 623e 3c63 6f64 653e P with \n-0014b230: 2e2f 636f 6e66 6967 7572 6520 2d2d 656e ./configure --en\n-0014b240: 6162 6c65 2d64 6562 7567 3c2f 636f 6465 able-debug and make.

    .

    When \n-0014b280: 796f 7572 2067 534f 4150 2063 6c69 656e your gSOAP clien\n-0014b290: 7420 6f72 2073 6572 7665 7220 6170 706c t or server appl\n-0014b2a0: 6963 6174 696f 6e73 2072 756e 2c20 7468 ications run, th\n-0014b2b0: 6579 2077 696c 6c20 6c6f 6720 7468 6569 ey will log thei\n-0014b2c0: 7220 6163 7469 7669 7479 2069 6e20 7468 r activity in th\n-0014b2d0: 7265 6520 7365 7061 7261 7465 2066 696c ree separate fil\n-0014b2e0: 6573 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 es:

    .
      .SENT.\n-0014b300: 6c6f 673c 2f63 6f64 653e 3c2f 656d 3e20 log \n-0014b310: 6120 636f 6e63 6174 656e 6174 696f 6e20 a concatenation \n-0014b320: 6f66 2061 6c6c 206d 6573 7361 6765 7320 of all messages \n-0014b330: 7365 6e74 3c2f 6c69 3e0a 3c6c 693e 3c65 sent.
    • RECV.log\n-0014b350: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 2063 a c\n-0014b360: 6f6e 6361 7465 6e61 7469 6f6e 206f 6620 oncatenation of \n-0014b370: 616c 6c20 6d65 7373 6167 6573 2072 6563 all messages rec\n-0014b380: 6569 7665 643c 2f6c 693e 0a3c 6c69 3e3c eived
    • .
    • <\n-0014b390: 656d 3e3c 636f 6465 3e54 4553 542e 6c6f em>TEST.lo\n-0014b3a0: 673c 2f63 6f64 653e 3c2f 656d 3e20 6120 g a \n-0014b3b0: 6c6f 6720 6f66 2074 6865 2065 6e67 696e log of the engin\n-0014b3c0: 6527 7320 6f70 6572 6174 696f 6e73 3c2f e's operations.
    .
    Warnin\n-0014b400: 673c 2f64 743e 3c64 643e 5468 6520 6753 g
    The gS\n-0014b410: 4f41 5020 636c 6965 6e74 2061 6e64 2073 OAP client and s\n-0014b420: 6572 7665 7220 6170 706c 6963 6174 696f erver applicatio\n-0014b430: 6e73 2077 696c 6c20 7275 6e20 736c 6f77 ns will run slow\n-0014b440: 2064 7565 2074 6f20 6465 6275 6767 696e due to debuggin\n-0014b450: 6720 616e 6420 6d65 7373 6167 6520 6c6f g and message lo\n-0014b460: 6767 696e 672e 3c2f 6464 3e3c 2f64 6c3e gging.
    \n-0014b470: 0a3c 703e 596f 7520 6361 6e20 7365 7420 .

    You can set \n-0014b480: 6d61 6372 6f20 3c63 6f64 653e 2344 4542 macro #DEB\n-0014b490: 5547 5f53 5441 4d50 3c2f 636f 6465 3e20 UG_STAMP \n-0014b4a0: 696e 7374 6561 6420 6f66 203c 636f 6465 instead of #DEBUG t\n-0014b4c0: 6f20 6164 6420 7469 6d65 2073 7461 6d70 o add time stamp\n-0014b4d0: 7320 746f 203c 636f 6465 3e54 4553 542e s to TEST.\n-0014b4e0: 6c6f 673c 2f63 6f64 653e 2e20 5468 6973 log. This\n-0014b4f0: 2077 6f72 6b73 206f 6e20 616c 6c20 6f70 works on all op\n-0014b500: 6572 6174 696e 6720 7379 7374 656d 7320 erating systems \n-0014b510: 7375 7070 6f72 7469 6e67 2074 6865 203c supporting the <\n-0014b520: 636f 6465 3e67 6574 7469 6d65 6f66 6461 code>gettimeofda\n-0014b530: 793c 2f63 6f64 653e 2066 756e 6374 696f y functio\n-0014b540: 6e2e 3c2f 703e 0a3c 703e 5768 656e 2069 n.

    .

    When i\n-0014b550: 6e73 7461 6c6c 696e 6720 6120 4347 4920 nstalling a CGI \n-0014b560: 7365 7276 6963 6520 6170 706c 6963 6174 service applicat\n-0014b570: 696f 6e20 636f 6d70 696c 6564 2077 6974 ion compiled wit\n-0014b580: 6820 6465 6275 6767 696e 6720 656e 6162 h debugging enab\n-0014b590: 6c65 642c 2074 6865 206c 6f67 2066 696c led, the log fil\n-0014b5a0: 6573 206d 6179 2073 6f6d 6574 696d 6573 es may sometimes\n-0014b5b0: 206e 6f74 2062 6520 6372 6561 7465 6420 not be created \n-0014b5c0: 6475 6520 746f 2066 696c 6520 6163 6365 due to file acce\n-0014b5d0: 7373 2070 6572 6d69 7373 696f 6e20 7265 ss permission re\n-0014b5e0: 7374 7269 6374 696f 6e73 2069 6d70 6f73 strictions impos\n-0014b5f0: 6564 206f 6e20 4347 4920 6170 706c 6963 ed on CGI applic\n-0014b600: 6174 696f 6e73 2e20 546f 2067 6574 2061 ations. To get a\n-0014b610: 726f 756e 6420 7468 6973 2c20 6372 6561 round this, crea\n-0014b620: 7465 2065 6d70 7479 206c 6f67 2066 696c te empty log fil\n-0014b630: 6573 2077 6974 6820 756e 6976 6572 7361 es with universa\n-0014b640: 6c20 7772 6974 6520 7065 726d 6973 7369 l write permissi\n-0014b650: 6f6e 732e 2042 6520 6361 7265 6675 6c20 ons. Be careful \n-0014b660: 6162 6f75 7420 7468 6520 7365 6375 7269 about the securi\n-0014b670: 7479 2069 6d70 6c69 6361 7469 6f6e 206f ty implication o\n-0014b680: 6620 7468 6973 2e3c 2f70 3e0a 3c70 3e59 f this.

    .

    Y\n-0014b690: 6f75 2063 616e 2061 6374 7561 6c6c 7920 ou can actually \n-0014b6a0: 7465 7374 2061 2043 4749 2073 6572 7669 test a CGI servi\n-0014b6b0: 6365 2061 7070 6c69 6361 7469 6f6e 2077 ce application w\n-0014b6c0: 6974 686f 7574 2064 6570 6c6f 7969 6e67 ithout deploying\n-0014b6d0: 2069 7420 6f6e 2074 6865 2057 6562 2e20 it on the Web. \n-0014b6e0: 546f 2064 6f20 7468 6973 2c20 6372 6561 To do this, crea\n-0014b6f0: 7465 2074 6865 2043 4749 2073 6572 7669 te the CGI servi\n-0014b700: 6365 2061 7070 6c69 6361 7469 6f6e 2061 ce application a\n-0014b710: 6e64 2073 656e 6420 6974 2061 2072 6571 nd send it a req\n-0014b720: 7565 7374 206d 6573 7361 6765 2075 7369 uest message usi\n-0014b730: 6e67 2072 6564 6972 6563 7469 6f6e 2061 ng redirection a\n-0014b740: 7320 666f 6c6c 6f77 733a 203c 2f70 3e3c s follows:

    <\n-0014b750: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-0014b760: 656e 7422 3e2e 2f73 6572 7669 6365 2e63 ent\">./service.c\n-0014b770: 6769 2026 6c74 3b20 6e73 2e61 6464 2e72 gi < ns.add.r\n-0014b780: 6571 2e78 6d6c 0a3c 2f70 7265 3e3c 703e eq.xml.

    \n-0014b790: 2074 6869 7320 7368 6f75 6c64 2064 6973 this should dis\n-0014b7a0: 706c 6179 2074 6865 2073 6572 7669 6365 play the service\n-0014b7b0: 2072 6573 706f 6e73 6520 6f6e 2074 6865 response on the\n-0014b7c0: 2074 6572 6d69 6e61 6c2c 2077 6865 7265 terminal, where\n-0014b7d0: 203c 656d 3e3c 636f 6465 3e6e 732e 6164 ns.ad\n-0014b7e0: 642e 7265 712e 786d 6c3c 2f63 6f64 653e d.req.xml\n-0014b7f0: 3c2f 656d 3e20 7761 7320 6765 6e65 7261 was genera\n-0014b800: 7465 6420 6279 2073 6f61 7063 7070 3220 ted by soapcpp2 \n-0014b810: 6f72 2061 206d 6f64 6966 6965 6420 7665 or a modified ve\n-0014b820: 7273 696f 6e20 6f66 2074 6869 7320 6669 rsion of this fi\n-0014b830: 6c65 2e20 596f 7520 6361 6e20 616c 736f le. You can also\n-0014b840: 2075 7365 2061 203c 656d 3e3c 636f 6465 use a SENT.log\n-0014b860: 3c2f 656d 3e20 6669 6c65 2070 726f 6475 file produ\n-0014b870: 6365 6420 6279 2061 2063 6c69 656e 7420 ced by a client \n-0014b880: 6170 706c 6963 6174 696f 6e20 746f 2072 application to r\n-0014b890: 6564 6972 6563 7420 746f 2074 6865 2043 edirect to the C\n-0014b8a0: 4749 2073 6572 7669 6365 2061 7070 6c69 GI service appli\n-0014b8b0: 6361 7469 6f6e 2e20 596f 7520 6361 6e20 cation. You can \n-0014b8c0: 616c 736f 2075 7365 2074 6865 2067 534f also use the gSO\n-0014b8d0: 4150 203c 6120 6872 6566 3d22 2e2e 2f2e AP Test\n-0014b900: 204d 6573 7365 6e67 6572 3c2f 613e 2061 Messenger a\n-0014b910: 7070 6c69 6361 7469 6f6e 2074 6f20 6765 pplication to ge\n-0014b920: 6e65 7261 7465 2072 616e 646f 6d69 7a65 nerate randomize\n-0014b930: 6420 6d65 7373 6167 6573 2074 6f20 7465 d messages to te\n-0014b940: 7374 2079 6f75 7220 7365 7276 6572 732e st your servers.\n-0014b950: 3c2f 703e 0a3c 703e 5468 6520 6669 6c65

    .

    The file\n-0014b960: 206e 616d 6573 206f 6620 7468 6520 6c6f names of the lo\n-0014b970: 6720 6669 6c65 7320 616e 6420 7468 6520 g files and the \n-0014b980: 6c6f 6767 696e 6720 6163 7469 7669 7479 logging activity\n-0014b990: 2063 616e 2062 6520 636f 6e74 726f 6c6c can be controll\n-0014b9a0: 6564 2061 7420 7468 6520 6170 706c 6963 ed at the applic\n-0014b9b0: 6174 696f 6e20 6c65 7665 6c2e 2054 6869 ation level. Thi\n-0014b9c0: 7320 616c 6c6f 7773 2074 6865 2063 7265 s allows the cre\n-0014b9d0: 6174 696f 6e20 6f66 2073 6570 6172 6174 ation of separat\n-0014b9e0: 6520 6c6f 6720 6669 6c65 7320 6279 2073 e log files by s\n-0014b9f0: 6570 6172 6174 6520 7365 7276 6963 6573 eparate services\n-0014ba00: 2c20 636c 6965 6e74 732c 2061 6e64 2074 , clients, and t\n-0014ba10: 6872 6561 6473 2e20 466f 7220 6578 616d hreads. For exam\n-0014ba20: 706c 652c 2074 6865 2066 6f6c 6c6f 7769 ple, the followi\n-0014ba30: 6e67 2073 6572 7669 6365 206c 6f67 7320 ng service logs \n-0014ba40: 616c 6c20 6d65 7373 6167 6573 2028 6275 all messages (bu\n-0014ba50: 7420 6e6f 2064 6562 7567 206d 6573 7361 t no debug messa\n-0014ba60: 6765 7329 2069 6e20 7365 7061 7261 7465 ges) in separate\n-0014ba70: 2064 6972 6563 746f 7269 6573 3a3c 2f70 directories:.

    \n-0014bac0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-0014bb00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0014bb10: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0014bb20: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n-0014bb30: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    .<\n-0014bbb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0014bbc0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0014bbd0: 705f 5f64 6562 7567 2e68 746d 6c23 6761 p__debug.html#ga\n-0014bbe0: 3363 6331 6364 6462 6137 6463 6263 3338 3cc1cddba7dcbc38\n-0014bbf0: 6364 6231 6263 3636 6334 6530 3866 6563 cdb1bc66c4e08fec\n-0014bc00: 223e 736f 6170 5f73 6574 5f72 6563 765f \">soap_set_recv_\n-0014bc10: 6c6f 6766 696c 653c 2f61 3e28 3c61 2063 logfile(soap, "l\n-0014bc70: 6f67 732f 7265 6376 2f73 6572 7669 6365 ogs/recv/service\n-0014bc80: 3132 2e6c 6f67 2671 756f 743b 3c2f 7370 12.log"); // a\n-0014bcb0: 7070 656e 6420 616c 6c20 6d65 7373 6167 ppend all messag\n-0014bcc0: 6573 2072 6563 6569 7665 6420 696e 202f es received in /\n-0014bcd0: 6c6f 6773 2f72 6563 762f 7365 7276 6963 logs/recv/servic\n-0014bce0: 6531 322e 6c6f 6720 3c2f 7370 616e 3e3c e12.log <\n-0014bcf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_\n-0014bd60: 7365 745f 7365 6e74 5f6c 6f67 6669 6c65 set_sent_logfile\n-0014bd70: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-0014bda0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "logs/sen\n-0014bdd0: 742f 7365 7276 6963 6531 322e 6c6f 6726 t/service12.log&\n-0014bde0: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); <\n-0014bdf0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0014be00: 656e 7422 3e2f 2f20 6170 7065 6e64 2061 ent\">// append a\n-0014be10: 6c6c 206d 6573 7361 6765 7320 7365 6e74 ll messages sent\n-0014be20: 2069 6e20 2f6c 6f67 732f 7365 6e74 2f73 in /logs/sent/s\n-0014be30: 6572 7669 6365 3132 2e6c 6f67 203c 2f73 ervice12.log
    .
    \n-0014beb0: 736f 6170 5f73 6574 5f74 6573 745f 6c6f soap_set_test_lo\n-0014bec0: 6766 696c 653c 2f61 3e28 3c61 2063 6c61 gfile(soap, NULL)\n-0014bf00: 3b20 2020 2020 2020 2020 2020 2020 2020 ; \n-0014bf10: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-0014bf30: 6e6f 2066 696c 6520 6e61 6d65 3a20 646f no file name: do\n-0014bf40: 206e 6f74 2073 6176 6520 6465 6275 6720 not save debug \n-0014bf50: 6d65 7373 6167 6573 203c 2f73 7061 6e3e messages \n-0014bf60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    \n-0014c0f0: 736f 6170 5f66 7265 653c 2f61 3e28 3c61 soap_free(soap);<\n-0014c130: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_recv\n-0014c1f0: 5f6c 6f67 6669 6c65 3c2f 613e 3c2f 6469 _logfile
    void soap_\n-0014c220: 7365 745f 7265 6376 5f6c 6f67 6669 6c65 set_recv_logfile\n-0014c230: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0014c240: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n-0014c250: 6c6f 6766 696c 6529 3c2f 6469 763e 3c64 logfile)
    Specify a file \n-0014c280: 6e61 6d65 2074 6f20 7361 7665 206d 6573 name to save mes\n-0014c290: 7361 6765 7320 7265 6365 6976 6564 2e3c sages received.<\n-0014c2a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .<\n-0014c300: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0014c310: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_se\n-0014c360: 745f 7465 7374 5f6c 6f67 6669 6c65 3c2f t_test_logfile
    .<\n-0014c420: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0014c430: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-0014c440: 705f 5f64 6562 7567 5f68 746d 6c5f 6761 p__debug_html_ga\n-0014c450: 3935 3732 3963 3238 6637 3132 6366 3462 95729c28f712cf4b\n-0014c460: 6361 3331 3235 3935 6235 6365 3236 3837 ca312595b5ce2687\n-0014c470: 223e 3c64 6976 2063 6c61 7373 3d22 7474 \">
    v\n-0014c500: 6f69 6420 736f 6170 5f73 6574 5f73 656e oid soap_set_sen\n-0014c510: 745f 6c6f 6766 696c 6528 7374 7275 6374 t_logfile(struct\n-0014c520: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-0014c530: 7374 2063 6861 7220 2a6c 6f67 6669 6c65 st char *logfile\n-0014c540: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Specif\n-0014c560: 7920 6120 6669 6c65 206e 616d 6520 746f y a file name to\n-0014c570: 2073 6176 6520 6d65 7373 6167 6573 2073 save messages s\n-0014c580: 656e 742e 3c2f 6469 763e 3c2f 6469 763e ent.
    \n-0014c590: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Likew\n-0014c5b0: 6973 652c 206d 6573 7361 6765 7320 6361 ise, messages ca\n-0014c5c0: 6e20 6265 206c 6f67 6765 6420 666f 7220 n be logged for \n-0014c5d0: 696e 6469 7669 6475 616c 2063 6c69 656e individual clien\n-0014c5e0: 742d 7369 6465 2073 6572 7669 6365 206f t-side service o\n-0014c5f0: 7065 7261 7469 6f6e 2063 616c 6c73 2069 peration calls i\n-0014c600: 6e20 6120 636c 6965 6e74 2061 7070 6c69 n a client appli\n-0014c610: 6361 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 cation.

    .

    T\n-0014c620: 6f20 6c6f 6720 6d65 7373 6167 6573 206d o log messages m\n-0014c630: 6f72 6520 6566 6669 6369 656e 746c 792c ore efficiently,\n-0014c640: 2075 7365 2074 6865 203c 636f 6465 3e3c use the <\n-0014c650: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0014c660: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0014c670: 5f64 6562 7567 2e68 746d 6c23 6761 6336 _debug.html#gac6\n-0014c680: 3337 3934 3564 3038 3639 6439 3161 3462 37945d0869d91a4b\n-0014c690: 3030 6463 3164 6461 6365 6435 3337 2220 00dc1ddaced537\" \n-0014c6a0: 7469 746c 653d 2254 6865 206c 6f67 6769 title=\"The loggi\n-0014c6b0: 6e67 2070 6c75 6769 6e20 7265 6769 7374 ng plugin regist\n-0014c6c0: 7261 7469 6f6e 2066 756e 6374 696f 6e2e ration function.\n-0014c6d0: 223e 6c6f 6767 696e 673c 2f61 3e3c 2f63 \">logging plugin.

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

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

    .

    .Limitations.

    From the \n-0014c770: 7065 7273 7065 6374 6976 6520 6f66 2074 perspective of t\n-0014c780: 6865 2043 2f43 2b2b 206c 616e 6775 6167 he C/C++ languag\n-0014c790: 652c 2061 2066 6577 2043 2f43 2b2b 206c e, a few C/C++ l\n-0014c7a0: 616e 6775 6167 6520 6665 6174 7572 6573 anguage features\n-0014c7b0: 2061 7265 206e 6f74 2073 7570 706f 7274 are not support\n-0014c7c0: 6564 2062 7920 6753 4f41 5020 616e 6420 ed by gSOAP and \n-0014c7d0: 7468 6573 6520 6665 6174 7572 6573 2063 these features c\n-0014c7e0: 616e 6e6f 7420 6265 2075 7365 6420 696e annot be used in\n-0014c7f0: 2061 6e20 696e 7465 7266 6163 6520 6865 an interface he\n-0014c800: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n-0014c810: 6170 6370 7032 2e3c 2f70 3e0a 3c75 6c3e apcpp2.

    .
      \n-0014c820: 0a3c 6c69 3e53 544c 3a20 7468 6520 736f .
    • STL: the so\n-0014c830: 6170 6370 7032 2074 6f6f 6c20 7375 7070 apcpp2 tool supp\n-0014c840: 6f72 7473 2074 6865 2073 6572 6961 6c69 orts the seriali\n-0014c850: 7a61 7469 6f6e 206f 6620 432b 2b20 7374 zation of C++ st\n-0014c860: 7269 6e67 7320 3c63 6f64 653e 7374 643a rings std:\n-0014c870: 3a73 7472 696e 673c 2f63 6f64 653e 2061 :string a\n-0014c880: 6e64 203c 636f 6465 3e73 7464 3a3a 7773 nd std::ws\n-0014c890: 7472 696e 673c 2f63 6f64 653e 2061 6e64 tring and\n-0014c8a0: 2074 6865 2063 6f6e 7461 696e 6572 7320 the containers \n-0014c8b0: 3c63 6f64 653e 7374 643a 3a64 6571 7565 std::deque\n-0014c8c0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e73 , s\n-0014c8d0: 7464 3a3a 6c69 7374 3c2f 636f 6465 3e2c td::list,\n-0014c8e0: 203c 636f 6465 3e73 7464 3a3a 7665 6374 std::vect\n-0014c8f0: 6f72 3c2f 636f 6465 3e2c 2061 6e64 203c or, and <\n-0014c900: 636f 6465 3e73 7464 3a3a 7365 743c 2f63 code>std::set, (see Secti\n-0014c920: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on STL\n-0014c950: 2063 6f6e 7461 696e 6572 733c 2f61 3e20 containers \n-0014c960: 292e 2041 6c73 6f20 3c63 6f64 653e 7374 ). Also st\n-0014c970: 643a 3a73 6861 7265 645f 7074 723c 2f63 d::shared_ptr, std:\n-0014c990: 3a75 6e69 7175 655f 7074 723c 2f63 6f64 :unique_ptr, and st\n-0014c9b0: 643a 3a61 7574 6f5f 7074 723c 2f63 6f64 d::auto_ptr are supported\n-0014c9d0: 2e20 4f74 6865 7220 5354 4c20 7479 7065 . Other STL type\n-0014c9e0: 7320 6172 6520 6e6f 7420 7365 7269 616c s are not serial\n-0014c9f0: 697a 6162 6c65 2e3c 2f6c 693e 0a3c 6c69 izable.
    • .Templates: the \n-0014ca10: 736f 6170 6370 7032 2074 6f6f 6c20 6173 soapcpp2 tool as\n-0014ca20: 7375 6d65 7320 7468 6174 2074 656d 706c sumes that templ\n-0014ca30: 6174 6573 2063 6c61 7373 6573 2068 6176 ates classes hav\n-0014ca40: 6520 6f6e 6c79 206f 6e65 2074 656d 706c e only one templ\n-0014ca50: 6174 6520 7061 7261 6d65 7465 7220 7479 ate parameter ty\n-0014ca60: 7065 2061 6e64 2074 6865 7365 2074 656d pe and these tem\n-0014ca70: 706c 6174 6573 2061 7265 2063 6f6e 7461 plates are conta\n-0014ca80: 696e 6572 7320 6f66 2076 616c 7565 7320 iners of values \n-0014ca90: 6f66 2074 6869 7320 7465 6d70 6c61 7465 of this template\n-0014caa0: 2070 6172 616d 6574 6572 2074 7970 652e parameter type.\n-0014cab0: 2054 6869 7320 7465 6d70 6c61 7465 2063 This template c\n-0014cac0: 6c61 7373 2073 686f 756c 6420 6465 6669 lass should defi\n-0014cad0: 6e65 203c 636f 6465 3e62 6567 696e 2829 ne begin()\n-0014cae0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e65 , e\n-0014caf0: 6e64 2829 3c2f 636f 6465 3e2c 203c 636f nd(), size()\n-0014cb10: 2c20 3c63 6f64 653e 636c 6561 7228 293c , clear()<\n-0014cb20: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and insert() methods..\n-0014cb50: 3c6c 693e 496e 6865 7269 7461 6e63 653a
    • Inheritance:\n-0014cb60: 2073 696e 676c 6520 636c 6173 7320 696e single class in\n-0014cb70: 6865 7269 7461 6e63 6520 6973 2073 7570 heritance is sup\n-0014cb80: 706f 7274 6564 2e3c 2f6c 693e 0a3c 6c69 ported.
    • .Abstract method\n-0014cba0: 733a 2061 2063 6c61 7373 206d 7573 7420 s: a class must \n-0014cbb0: 6265 2069 6e73 7461 6e74 6961 626c 6520 be instantiable \n-0014cbc0: 746f 2073 7570 706f 7274 2073 6572 6961 to support seria\n-0014cbd0: 6c69 7a61 7469 6f6e 206f 6620 7468 6174 lization of that\n-0014cbe0: 2063 6c61 7373 2e20 416e 2061 6273 7472 class. An abstr\n-0014cbf0: 6163 7420 636c 6173 7320 7768 656e 2075 act class when u\n-0014cc00: 7365 6420 7368 6f75 6c64 2062 6520 6465 sed should be de\n-0014cc10: 636c 6172 6564 2074 7261 6e73 6965 6e74 clared transient\n-0014cc20: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Transien\n-0014cc60: 7420 6461 7461 2074 7970 6573 3c2f 613e t data types\n-0014cc70: 2e3c 2f6c 693e 0a3c 6c69 3e44 6972 6563 ..
    • Direc\n-0014cc80: 7469 7665 733a 2064 6972 6563 7469 7665 tives: directive\n-0014cc90: 7320 616e 6420 7072 6167 6d61 7320 7375 s and pragmas su\n-0014cca0: 6368 2061 7320 3c63 6f64 653e 2369 6e63 ch as #inc\n-0014ccb0: 6c75 6465 3c2f 636f 6465 3e20 616e 6420 lude and \n-0014ccc0: 3c63 6f64 653e 2364 6566 696e 653c 2f63 #define are moved t\n-0014cce0: 6f20 7468 6520 6765 6e65 7261 7465 6420 o the generated \n-0014ccf0: 3c65 6d3e 3c63 6f64 653e 736f 6170 5374 soapSt\n-0014cd00: 7562 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ub.h\n-0014cd10: 2073 6f75 7263 6520 636f 6465 2062 7920 source code by \n-0014cd20: 736f 6170 6370 7032 2e20 5468 6573 6520 soapcpp2. These \n-0014cd30: 6469 7265 6374 6976 6573 2061 7265 2061 directives are a\n-0014cd40: 6c6c 2070 6c61 6365 6420 6174 2074 6865 ll placed at the\n-0014cd50: 2074 6f70 206f 6620 7468 6174 2066 696c top of that fil\n-0014cd60: 652c 2073 6565 203c 6120 636c 6173 733d e, see T\n-0014cd90: 6865 2023 696e 636c 7564 6520 616e 6420 he #include and \n-0014cda0: 2364 6566 696e 6520 6469 7265 6374 6976 #define directiv\n-0014cdb0: 6573 3c2f 613e 2e20 5573 6520 7468 6520 es. Use the \n-0014cdc0: 3c63 6f64 653e 2369 6d70 6f72 743c 2f63 #import directive t\n-0014cde0: 6f20 696d 706f 7274 2069 6e74 6572 6661 o import interfa\n-0014cdf0: 6365 2068 6561 6465 7220 6669 6c65 7320 ce header files \n-0014ce00: 696e 746f 206f 7468 6572 2069 6e74 6572 into other inter\n-0014ce10: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-0014ce20: 732c 2073 6565 2053 6563 7469 6f6e 203c s, see Section <\n-0014ce30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0014ce40: 663d 2269 6e64 6578 2e68 746d 6c23 696d f=\"index.html#im\n-0014ce50: 706f 7274 223e 5468 6520 2369 6d70 6f72 port\">The #impor\n-0014ce60: 7420 6469 7265 6374 6976 653c 2f61 3e20 t directive \n-0014ce70: 2e3c 2f6c 693e 0a3c 6c69 3e43 2061 6e64 .
    • .
    • C and\n-0014ce80: 2043 2b2b 2063 6f64 6520 7374 6174 656d C++ code statem\n-0014ce90: 656e 7473 3a20 6e6f 2063 6f64 6520 7374 ents: no code st\n-0014cea0: 6174 656d 656e 7473 2061 7265 2061 6c6c atements are all\n-0014ceb0: 6f77 7320 696e 2069 6e74 6572 6661 6365 ows in interface\n-0014cec0: 2068 6561 6465 7220 6669 6c65 732e 2043 header files. C\n-0014ced0: 6c61 7373 206d 6574 686f 6473 2073 686f lass methods sho\n-0014cee0: 756c 6420 6265 2064 6563 6c61 7265 6420 uld be declared \n-0014cef0: 7769 7468 6f75 7420 636f 6465 2069 6e20 without code in \n-0014cf00: 3c63 6f64 653e 7b3c 2f63 6f64 653e 2061 { a\n-0014cf10: 6e64 203c 636f 6465 3e7d 3c2f 636f 6465 nd }. Also construc\n-0014cf30: 746f 7220 696e 6974 6961 6c69 7a65 7273 tor initializers\n-0014cf40: 2061 7265 206e 6f74 2061 6c6c 6f77 6564 are not allowed\n-0014cf50: 2e20 436c 6173 7320 6d65 7468 6f64 2069 . Class method i\n-0014cf60: 6d70 6c65 6d65 6e74 6174 696f 6e73 2073 mplementations s\n-0014cf70: 686f 756c 6420 6265 2064 6566 696e 6564 hould be defined\n-0014cf80: 2069 6e20 6120 7365 7061 7261 7465 2043 in a separate C\n-0014cf90: 2b2b 2073 6f75 7263 6520 6669 6c65 2e3c ++ source file.<\n-0014cfa0: 2f6c 693e 0a3c 6c69 3e43 2b2b 2072 6566 /li>.
    • C++ ref\n-0014cfb0: 6572 656e 6365 733a 2074 6865 7365 2063 erences: these c\n-0014cfc0: 616e 6e6f 7420 6265 2073 6572 6961 6c69 annot be seriali\n-0014cfd0: 7a65 642c 2075 7365 2070 6f69 6e74 6572 zed, use pointer\n-0014cfe0: 7320 696e 7374 6561 642e 3c2f 6c69 3e0a s instead.
    • .\n-0014cff0: 3c2f 756c 3e0a 3c70 3e54 6865 2066 6f6c
    .

    The fol\n-0014d000: 6c6f 7769 6e67 2043 2f43 2b2b 2064 6174 lowing C/C++ dat\n-0014d010: 6120 7479 7065 7320 7265 7175 6972 6520 a types require \n-0014d020: 736f 6d65 2061 7474 656e 7469 6f6e 2074 some attention t\n-0014d030: 6f20 656e 7375 7265 2074 6865 7920 6361 o ensure they ca\n-0014d040: 6e20 6265 2073 6572 6961 6c69 7a65 643a n be serialized:\n-0014d050: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 556e

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

    .

    .Ad\n-0014d740: 7661 6e63 6564 2066 6561 7475 7265 733c vanced features<\n-0014d750: 2f68 313e 0a3c 703e f09f 949d 203c 6120 /h1>.

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

    .

    <\n-0014d790: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-0014d7a0: 2069 643d 2269 6e74 6572 6e61 7469 6f6e id=\"internation\n-0014d7b0: 616c 697a 6174 696f 6e22 3e3c 2f61 3e0a alization\">.\n-0014d7c0: 496e 7465 726e 6174 696f 6e61 6c69 7a61 Internationaliza\n-0014d7d0: 7469 6f6e 3c2f 6832 3e0a 3c70 3e52 6567 tion

    .

    Reg\n-0014d7e0: 756c 6172 2038 2d62 6974 2073 7472 696e ular 8-bit strin\n-0014d7f0: 6773 2063 616e 6e6f 7420 686f 6c64 2077 gs cannot hold w\n-0014d800: 6964 6520 6368 6172 6163 7465 7273 206f ide characters o\n-0014d810: 7574 7369 6465 206f 6620 7468 6520 6368 utside of the ch\n-0014d820: 6172 6163 7465 7220 7261 6e67 6520 5b31 aracter range [1\n-0014d830: 2c32 3535 5d2e 204f 6620 636f 7572 7365 ,255]. Of course\n-0014d840: 2079 6f75 2063 616e 2075 7365 2077 6964 you can use wid\n-0014d850: 6520 7374 7269 6e67 7320 696e 7374 6561 e strings instea\n-0014d860: 6420 6f66 2038 2d62 6974 2073 7472 696e d of 8-bit strin\n-0014d870: 6773 2069 6e20 7468 6520 696e 7465 7266 gs in the interf\n-0014d880: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-0014d890: 666f 7220 736f 6170 6370 7032 2e20 416c for soapcpp2. Al\n-0014d8a0: 7465 726e 6174 6976 656c 792c 2073 6574 ternatively, set\n-0014d8b0: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n-0014d8c0: 5f43 5f55 5446 5354 5249 4e47 3c2f 636f _C_UTFSTRING mode flag to\n-0014d8e0: 2065 6e63 6f64 6520 7769 6465 2063 6861 encode wide cha\n-0014d8f0: 7261 6374 6572 7320 696e 2038 2d62 6974 racters in 8-bit\n-0014d900: 2073 7472 696e 6773 2069 6e20 5554 462d strings in UTF-\n-0014d910: 3820 666f 726d 6174 2e3c 2f70 3e0a 3c70 8 format.

    .For example, th\n-0014d930: 6520 3c65 6d3e 3c63 6f64 653e 7873 643a e xsd:\n-0014d940: 7374 7269 6e67 3c2f 636f 6465 3e3c 2f65 string string schema\n-0014d960: 2074 7970 6520 6361 6e20 6265 2064 6563 type can be dec\n-0014d970: 6c61 7265 6420 6173 2061 2077 6964 652d lared as a wide-\n-0014d980: 6368 6172 6163 7465 7220 7374 7269 6e67 character string\n-0014d990: 2061 6e64 2075 7365 6420 7375 6273 6571 and used subseq\n-0014d9a0: 7565 6e74 6c79 3a3c 2f70 3e0a 3c64 6976 uently:

    .
    typede\n-0014d9f0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f wchar_t *xsd__string; \n-0014da30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n-0014da70: 5f5f 6d79 4d65 7468 6f64 2878 7364 5f5f __myMethod(xsd__\n-0014da80: 7374 7269 6e67 2069 6e70 7574 2c20 7873 string input, xs\n-0014da90: 645f 5f73 7472 696e 6720 2a6f 7574 7075 d__string *outpu\n-0014daa0: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
    .

    \n-0014dab0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-0014e050: 703e 506c 6561 7365 2063 6f6e 7375 6c74 p>Please consult\n-0014e060: 2074 6865 2055 5446 2d38 2073 7065 6369 the UTF-8 speci\n-0014e070: 6669 6361 7469 6f6e 2066 6f72 2064 6574 fication for det\n-0014e080: 6169 6c73 206f 6e20 7468 6520 5554 462d ails on the UTF-\n-0014e090: 3820 666f 726d 6174 2077 6865 6e20 7072 8 format when pr\n-0014e0a0: 6f63 6573 7369 6e67 2038 2d62 6974 2073 ocessing 8-bit s\n-0014e0b0: 7472 696e 6773 2077 6974 6820 5554 462d trings with UTF-\n-0014e0c0: 3820 636f 6e74 656e 742e 204e 6f74 6520 8 content. Note \n-0014e0d0: 7468 6174 2074 6865 2041 5343 4949 2063 that the ASCII c\n-0014e0e0: 6861 7261 6374 6572 2073 6574 205b 312d haracter set [1-\n-0014e0f0: 3132 375d 2069 7320 6120 7375 6273 6574 127] is a subset\n-0014e100: 206f 6620 5554 462d 382e 2054 6865 7265 of UTF-8. There\n-0014e110: 666f 7265 2c20 7769 7468 2074 6865 203c fore, with the <\n-0014e120: 636f 6465 3e23 534f 4150 5f43 5f55 5446 code>#SOAP_C_UTF\n-0014e130: 5354 5249 4e47 3c2f 636f 6465 3e20 666c STRING fl\n-0014e140: 6167 2073 6574 2c20 7374 7269 6e67 7320 ag set, strings \n-0014e150: 6d61 7920 686f 6c64 2041 5343 4949 2063 may hold ASCII c\n-0014e160: 6861 7261 6374 6572 2064 6174 6120 616e haracter data an\n-0014e170: 6420 5554 462d 3820 6578 7465 6e73 696f d UTF-8 extensio\n-0014e180: 6e73 2e3c 2f70 3e0a 3c70 3e53 6565 2061 ns.

    .

    See a\n-0014e190: 6c73 6f20 3c61 2068 7265 663d 222e 2e2f lso \n-0014e1c0: 4320 616e 6420 432b 2b20 584d 4c20 6461 C and C++ XML da\n-0014e1d0: 7461 2062 696e 6469 6e67 733c 2f61 3e20 ta bindings \n-0014e1e0: 646f 6375 6d65 6e74 6174 696f 6e20 666f documentation fo\n-0014e1f0: 7220 6d6f 7265 2064 6574 6169 6c73 206f r more details o\n-0014e200: 6e20 7573 696e 6720 3c65 6d3e 3c63 6f64 n using typemap.dat for ws\n-0014e230: 646c 3268 2e3c 2f70 3e0a 3c70 3ef0 9f94 dl2h.

    .

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

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

    .Direc\n-0014e2a0: 7469 7665 733c 2f68 323e 0a3c 703e 416e tives

    .

    An\n-0014e2b0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-0014e2c0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n-0014e2d0: 7070 3220 6d61 7920 696e 636c 7564 6520 pp2 may include \n-0014e2e0: 3c63 6f64 653e 2f2f 6773 6f61 703c 2f63 //gsoap directives \n-0014e300: 746f 2063 6f6e 6669 6775 7265 206d 6573 to configure mes\n-0014e310: 7361 6769 6e67 2070 726f 746f 636f 6c73 saging protocols\n-0014e320: 2073 7563 6820 6173 2053 4f41 5020 6f72 such as SOAP or\n-0014e330: 2052 4553 542c 2074 6f20 6173 736f 6369 REST, to associ\n-0014e340: 6174 6520 534f 4150 2048 6561 6465 7273 ate SOAP Headers\n-0014e350: 2061 6e64 2046 6175 6c74 7320 7769 7468 and Faults with\n-0014e360: 206d 6573 7361 6765 732c 2061 6e64 2074 messages, and t\n-0014e370: 6f20 7365 7420 7072 6f70 6572 7469 6573 o set properties\n-0014e380: 206f 6620 7468 6520 5765 6220 7365 7276 of the Web serv\n-0014e390: 6963 6520 6465 6669 6e65 6420 696e 2074 ice defined in t\n-0014e3a0: 6865 2073 6f61 7063 7070 322d 6765 6e65 he soapcpp2-gene\n-0014e3b0: 7261 7465 6420 5753 444c 2061 6e64 2058 rated WSDL and X\n-0014e3c0: 5344 2066 696c 6573 2e20 4469 7265 6374 SD files. Direct\n-0014e3d0: 6976 6573 2066 6f72 2073 6f61 7063 7070 ives for soapcpp\n-0014e3e0: 3220 6172 6520 7370 6563 6966 6965 6420 2 are specified \n-0014e3f0: 6173 203c 636f 6465 3e2f 2f67 736f 6170 as //gsoap\n-0014e400: 3c2f 636f 6465 3e2d 636f 6d6d 656e 7473 -comments\n-0014e410: 2074 6861 7420 6172 6520 7072 6f63 6573 that are proces\n-0014e420: 7365 6420 6279 2073 6f61 7063 7070 322e sed by soapcpp2.\n-0014e430: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .Service direct\n-0014e470: 6976 6573 3c2f 6833 3e0a 3c70 3e41 2073 ives

    .

    A s\n-0014e480: 6572 7669 6365 2064 6972 6563 7469 7665 ervice directive\n-0014e490: 206d 7573 7420 7374 6172 7420 6174 2061 must start at a\n-0014e4a0: 206e 6577 206c 696e 6520 616e 6420 6973 new line and is\n-0014e4b0: 206f 6620 7468 6520 666f 726d 3a3c 2f70 of the form:.

    \n-0014e500: 2f2f 6773 6f61 7020 266c 743b 7072 6566 //gsoap <pref\n-0014e510: 6978 2667 743b 2073 6572 7669 6365 2026 ix> service &\n-0014e520: 6c74 3b70 726f 7065 7274 7926 6774 3b3a lt;property>:\n-0014e530: 2026 6c74 3b76 616c 7565 2667 743b 3c2f <value>
    .

    where <prefix>\n-0014e580: 3c2f 636f 6465 3e20 6973 2074 6865 2058 is the X\n-0014e590: 4d4c 206e 616d 6573 7061 6365 2070 7265 ML namespace pre\n-0014e5a0: 6669 7820 6f66 2061 2073 6572 7669 6365 fix of a service\n-0014e5b0: 2062 696e 6469 6e67 2e20 5468 6520 3c63 binding. The <property\n-0014e5d0: 2667 743b 3c2f 636f 6465 3e20 616e 6420 > and \n-0014e5e0: 3c63 6f64 653e 266c 743b 7661 6c75 6526 <value&\n-0014e5f0: 6774 3b3c 2f63 6f64 653e 2066 6965 6c64 gt; field\n-0014e600: 7320 6172 6520 6f6e 6520 6f66 2074 6865 s are one of the\n-0014e610: 2066 6f6c 6c6f 7769 6e67 3a3c 2f70 3e0a following:

    .\n-0014e620: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61
    context fl\n-0013c240: 6167 2077 6974 6820 7365 6e74 2f72 6563 ag with sent/rec\n-0013c250: 7620 666c 6167 7320 2020 3c2f 7468 3e3c v flags
    <\n-0013c2e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013c2f0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013c300: 6d6c 2361 6165 3365 6565 3737 3164 3863 ml#aae3eee771d8c\n-0013c310: 3430 3331 6433 3064 3463 6137 3633 3365 4031d30d4ca7633e\n-0013c320: 6466 3966 2220 7469 746c 653d 2255 7365 df9f\" title=\"Use\n-0013c330: 722d 6465 6669 6e61 626c 6520 736f 636b r-definable sock\n-0013c340: 6574 2073 656e 6420 616e 6420 7265 6376 et send and recv\n-0013c350: 2066 6c61 6773 2c20 666f 7220 6578 616d flags, for exam\n-0013c360: 706c 6520 6173 7369 676e 204d 5347 5f4e ple assign MSG_N\n-0013c370: 4f53 4947 4e41 4c20 746f 2064 6973 6162 OSIGNAL to disab\n-0013c380: 6c65 2073 6967 7069 7065 2028 7468 6520 le sigpipe (the \n-0013c390: 7661 2e2e 2e22 3e73 6f61 703a 3a73 6f63 va...\">soap::soc\n-0013c3a0: 6b65 745f 666c 6167 733c 2f61 3e3c 2f63 ket_flags = MSG\n-0013c3c0: 5f4e 4f53 4947 4e41 4c3c 2f63 6f64 653e _NOSIGNAL\n-0013c3d0: 2020 203c 2f74 643e 3c74 6420 636c 6173 disabl\n-0013c400: 6573 2053 4947 5049 5045 2020 2020 3c2f es SIGPIPE
    soap:\n-0013c520: 3a73 6f63 6b65 745f 666c 6167 733c 2f61 :socket_flags = MSG_DONTROUTE
    ..p\n-0014e680: 726f 7065 7274 7920 2020 3c2f 7468 3e3c roperty <\n-0014e690: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n-0014e6a0: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n-0014e6b0: 3e76 616c 7565 2020 2020 3c2f 7468 3e3c >value <\n-0014e6c0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n-0014e8b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......\n-0014eb00: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-0014eb40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014eb50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014eb60: 3e3c 636f 6465 3e6c 6974 6572 616c 3c2f >literal (default),\n-0014eb80: 203c 636f 6465 3e65 6e63 6f64 6564 3c2f encoded for SOAP e\n-0014eba0: 6e63 6f64 696e 672c 206f 7220 6120 6375 ncoding, or a cu\n-0014ebb0: 7374 6f6d 2055 5249 2020 2020 3c2f 7464 stom URI .......<\n-0014ee40: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0014ee50: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-0014ee60: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n-0014eea0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-0014ef40: 636f 6465 3e74 7261 6e73 706f 7274 3c2f code>transport U\n-0014ef80: 5249 2064 6563 6c61 7261 7469 6f6e 206f RI declaration o\n-0014ef90: 6620 7468 6520 7472 616e 7370 6f72 742c f the transport,\n-0014efa0: 2075 7375 616c 6c79 203c 636f 6465 3e3c usually <\n-0014efb0: 6120 6872 6566 3d22 6874 7470 3a2f 2f73 a href=\"http://s\n-0014efc0: 6368 656d 6173 2e78 6d6c 736f 6170 2e6f chemas.xmlsoap.o\n-0014efd0: 7267 2f73 6f61 702f 6874 7470 223e 6874 rg/soap/http\">ht\n-0014efe0: 7470 3a2f 2f73 6368 656d 6173 2e78 6d6c tp://schemas.xml\n-0014eff0: 736f 6170 2e6f 7267 2f73 6f61 702f 6874 soap.org/soap/ht\n-0014f000: 7470 3c2f 613e 3c2f 636f 6465 3e20 2020 tp \n-0014f010: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n-0014f060: 3c63 6f64 653e 6465 6669 6e69 7469 6f6e definition\n-0014f070: 733c 2f63 6f64 653e 2020 203c 2f74 643e s \n-0014f080: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-0014f130: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014f140: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014f150: 3e6e 616d 6520 6f66 2074 6865 2057 5344 >name of the WSD\n-0014f160: 4c20 6465 6669 6e69 7469 6f6e 732f 706f L definitions/po\n-0014f170: 7274 5479 7065 2f40 6e61 6d65 2028 5753 rtType/@name (WS\n-0014f180: 444c 322e 3020 696e 7465 7266 6163 652f DL2.0 interface/\n-0014f190: 406e 616d 6529 2020 2020 3c2f 7464 3e3c @name) <\n-0014f1a0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n-0014f2c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014f2d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014f2e0: 3e3c 636f 6465 3e69 6e74 6572 6661 6365 >interface\n-0014f2f0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-0014f300: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014f310: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014f320: 3e61 6e20 616c 6961 7320 666f 7220 7468 >an alias for th\n-0014f330: 6520 3c63 6f64 653e 7479 7065 3c2f 636f e type property (interface follows SOA\n-0014f370: 5020 312e 3220 6e61 6d69 6e67 2063 6f6e P 1.2 naming con\n-0014f380: 7665 6e74 696f 6e73 2920 2020 203c 2f74 ventions) ........

    The serv\n-0014f610: 6963 6520 3c63 6f64 653e 6e61 6d65 3c2f ice name and \n-0014f630: 6e61 6d65 7370 6163 653c 2f63 6f64 653e namespace\n-0014f640: 2070 726f 7065 7274 6965 7320 6172 6520 properties are \n-0014f650: 7265 7175 6972 6564 2069 6e20 6f72 6465 required in orde\n-0014f660: 7220 746f 2067 656e 6572 6174 6520 6120 r to generate a \n-0014f670: 7661 6c69 6420 5753 444c 2077 6974 6820 valid WSDL with \n-0014f680: 736f 6170 6370 7032 2e20 5468 6520 6f74 soapcpp2. The ot\n-0014f690: 6865 7220 7072 6f70 6572 7469 6573 2061 her properties a\n-0014f6a0: 7265 206f 7074 696f 6e61 6c2e 3c2f 703e re optional.

    \n-0014f6b0: 0a3c 703e 5468 6520 3c63 6f64 653e 7374 .

    The st\n-0014f6c0: 796c 653c 2f63 6f64 653e 2061 6e64 203c yle and <\n-0014f6d0: 636f 6465 3e65 6e63 6f64 696e 673c 2f63 code>encoding property de\n-0014f6f0: 6661 756c 7473 2061 7265 2063 6861 6e67 faults are chang\n-0014f700: 6564 2077 6974 6820 3c62 3e3c 636f 6465 ed with soapcpp2 -e option <\n-0014f730: 623e 3c63 6f64 653e 2d65 3c2f 636f 6465 b>-e to r\n-0014f750: 7063 3c2f 636f 6465 3e20 616e 6420 3c63 pc and encoded.

    .

    You c\n-0014f780: 616e 206f 7665 7272 6964 6520 7468 6520 an override the \n-0014f790: 3c63 6f64 653e 706f 7274 3c2f 636f 6465 port endpoint URL a\n-0014f7b0: 7420 7275 6e74 696d 6520 696e 2074 6865 t runtime in the\n-0014f7c0: 2061 7574 6f2d 6765 6e65 7261 7465 6420 auto-generated \n-0014f7d0: 3c63 6f64 653e 736f 6170 5f63 616c 6c5f soap_call_\n-0014f7e0: 7072 6566 6978 5f5f 6675 6e63 3c2f 636f prefix__func service call\n-0014f800: 2028 432f 432b 2b20 636c 6965 6e74 2073 (C/C++ client s\n-0014f810: 6964 6529 2061 6e64 2069 6e20 7468 6520 ide) and in the \n-0014f820: 432b 2b20 7072 6f78 7920 636c 6173 7320 C++ proxy class \n-0014f830: 7365 7276 6963 6520 6361 6c6c 2e3c 2f70 service call..

    Protocol pr\n-0014f850: 6f70 6572 7479 2076 616c 7565 7320 6172 operty values ar\n-0014f860: 653a 3c2f 703e 0a3c 7461 626c 6520 636c e:

    .
    na\n-0014e710: 6d65 3c2f 636f 6465 3e20 2020 3c2f 7464 me name of the s\n-0014e750: 6572 7669 6365 2c20 6f70 7469 6f6e 616c ervice, optional\n-0014e760: 6c79 2066 6f6c 6c6f 7765 6420 6279 2074 ly followed by t\n-0014e770: 6578 7420 6465 7363 7269 6269 6e67 2074 ext describing t\n-0014e780: 6865 2073 6572 7669 6365 2020 2020 3c2f he service
    namespace URI\n-0014e820: 206f 6620 7468 6520 5753 444c 2074 6172 of the WSDL tar\n-0014e830: 6765 744e 616d 6573 7061 6365 2020 2020 getNamespace \n-0014e840: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    documentatio\n-0014e8a0: 6e3c 2f63 6f64 653e 2020 203c 2f74 643e n text describin\n-0014e8e0: 6720 7468 6520 7365 7276 6963 6520 2873 g the service (s\n-0014e8f0: 6565 2061 6c73 6f20 7468 6520 3c63 6f64 ee also the name pr\n-0014e910: 6f70 6572 7479 292c 206d 756c 7469 706c operty), multipl\n-0014e920: 6520 7065 726d 6974 7465 6420 2020 203c e permitted <\n-0014e930: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    doc \n-0014e990: 203c 2f74 643e 3c74 6420 636c 6173 733d an alias\n-0014e9c0: 2066 6f72 2074 6865 203c 636f 6465 3e64 for the d\n-0014e9d0: 6f63 756d 656e 7461 7469 6f6e 3c2f 636f ocumentation property \n-0014e9f0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    style\n-0014ea50: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n-0014ea80: 646f 6375 6d65 6e74 3c2f 636f 6465 3e20 document \n-0014ea90: 2864 6566 6175 6c74 2920 534f 4150 206d (default) SOAP m\n-0014eaa0: 6573 7361 6769 6e67 2073 7479 6c65 206f essaging style o\n-0014eab0: 7220 3c63 6f64 653e 7270 633c 2f63 6f64 r rpc for SOAP RPC \n-0014ead0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    encoding\n-0014eb30: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    \n-0014ec10: 7072 6f74 6f63 6f6c 3c2f 636f 6465 3e20 protocol \n-0014ec20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 specifi\n-0014ec50: 6573 2053 4f41 5020 6f72 2052 4553 542c es SOAP or REST,\n-0014ec60: 2073 6565 2062 656c 6f77 2020 2020 3c2f see below
    port \n-0014ecd0: 203c 2f74 643e 3c74 6420 636c 6173 733d URL of t\n-0014ed00: 6865 2073 6572 7669 6365 2065 6e64 706f he service endpo\n-0014ed10: 696e 742c 2075 7375 616c 6c79 2061 6e20 int, usually an \n-0014ed20: 6874 7470 206f 7220 6874 7470 7320 6164 http or https ad\n-0014ed30: 6472 6573 732c 2074 6f20 7573 6520 696e dress, to use in\n-0014ed40: 2074 6865 2057 5344 4c20 6465 6669 6e69 the WSDL defini\n-0014ed50: 7469 6f6e 732f 7365 7276 6963 652f 706f tions/service/po\n-0014ed60: 7274 2f61 6464 7265 7373 2f40 6c6f 6361 rt/address/@loca\n-0014ed70: 7469 6f6e 2020 2020 3c2f 7464 3e3c 2f74 tion
    loca\n-0014edd0: 7469 6f6e 3c2f 636f 6465 3e20 2020 3c2f tion an alias fo\n-0014ee10: 7220 7468 6520 3c63 6f64 653e 706f 7274 r the port\n-0014ee20: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property\n-0014ee30: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    endpoin\n-0014ee90: 743c 2f63 6f64 653e 2020 203c 2f74 643e t an alias for t\n-0014eed0: 6865 203c 636f 6465 3e70 6f72 743c 2f63 he port property \n-0014eef0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    name of the WS\n-0014f0b0: 444c 2064 6566 696e 6974 696f 6e73 2f40 DL definitions/@\n-0014f0c0: 6e61 6d65 2020 2020 3c2f 7464 3e3c 2f74 name
    type\n-0014f120: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    p\n-0014f1f0: 6f72 7454 7970 653c 2f63 6f64 653e 2020 ortType \n-0014f200: 203c 2f74 643e 3c74 6420 636c 6173 733d an alias\n-0014f230: 2066 6f72 2074 6865 203c 636f 6465 3e74 for the t\n-0014f240: 7970 653c 2f63 6f64 653e 2070 726f 7065 ype prope\n-0014f250: 7274 7920 283c 636f 6465 3e70 6f72 7454 rty (portT\n-0014f260: 7970 653c 2f63 6f64 653e 2066 6f6c 6c6f ype follo\n-0014f270: 7773 2053 4f41 5020 312e 3120 6e61 6d69 ws SOAP 1.1 nami\n-0014f280: 6e67 2063 6f6e 7665 6e74 696f 6e73 2920 ng conventions) \n-0014f290: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    binding\n-0014f3f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 name o\n-0014f420: 6620 7468 6520 5753 444c 2064 6566 696e f the WSDL defin\n-0014f430: 6974 696f 6e73 2f62 696e 6469 6e67 2f40 itions/binding/@\n-0014f440: 6e61 6d65 2020 2020 3c2f 7464 3e3c 2f74 name
    port\n-0014f4a0: 4e61 6d65 3c2f 636f 6465 3e20 2020 3c2f Name name of the\n-0014f4e0: 2057 5344 4c20 6465 6669 6e69 7469 6f6e WSDL definition\n-0014f4f0: 732f 7365 7276 6963 652f 706f 7274 2f40 s/service/port/@\n-0014f500: 6e61 6d65 2020 2020 3c2f 7464 3e3c 2f74 name
    exe\n-0014f560: 6375 7461 626c 653c 2f63 6f64 653e 2020 cutable \n-0014f570: 203c 2f74 643e 3c74 6420 636c 6173 733d name of \n-0014f5a0: 7468 6520 2265 7865 6375 7461 626c 6522 the \"executable\"\n-0014f5b0: 2074 6f20 7573 6520 696e 2074 6865 2057 to use in the W\n-0014f5c0: 5344 4c20 6465 6669 6e69 7469 6f6e 732f SDL definitions/\n-0014f5d0: 7365 7276 6963 652f 706f 7274 2f61 6464 service/port/add\n-0014f5e0: 7265 7373 2f40 6c6f 6361 7469 6f6e 2020 ress/@location \n-0014f5f0: 203c 2f74 643e 3c2f 7472 3e0a 3c2f 7461
    ....<\n-0014f9d0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.....\n-0014fb60: 3c74 7220 636c 6173 733d 226d 6172 6b64 .....o\n-0014fd50: 6e65 2d77 6179 2053 4f41 5020 312e 3220 ne-way SOAP 1.2 \n-0014fd60: 7769 7468 2048 5454 5020 4745 5420 2020 with HTTP GET \n-0014fd70: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-0014fdc0: 636f 6465 3e48 5454 503c 2f63 6f64 653e code>HTTP\n-0014fdd0: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....\n-0014ff40: 3c63 6f64 653e 4745 543c 2f63 6f64 653e GET\n-0014ff50: 2020 203c 2f74 643e 3c74 6420 636c 6173 ..<\n-0014ffd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014ffe0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014fff0: 3e3c 636f 6465 3e50 5554 3c2f 636f 6465 >PUT ..<\n-00150080: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150090: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001500a0: 3e3c 636f 6465 3e44 454c 4554 453c 2f63 >DELETE .
    protocol v\n-0014f8d0: 616c 7565 2020 203c 2f74 683e 3c74 6820 alue de\n-0014f900: 7363 7269 7074 696f 6e20 2020 203c 2f74 scription
    SOAP <\n-0014f970: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>SOAP trans\n-0014f9a0: 706f 7274 2c20 7375 7070 6f72 7469 6e67 port, supporting\n-0014f9b0: 2062 6f74 6820 534f 4150 2031 2e31 2061 both SOAP 1.1 a\n-0014f9c0: 6e64 2031 2e32 2020 2020 3c2f 7464 3e3c nd 1.2
    S\n-0014fa20: 4f41 5031 2e31 3c2f 636f 6465 3e20 2020 OAP1.1 \n-0014fa30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 SOAP 1.1 \n-0014fa60: 7472 616e 7370 6f72 7420 2873 616d 6520 transport (same \n-0014fa70: 6173 203c 636f 6465 3e73 6f61 7063 7070 as soapcpp\n-0014fa80: 3220 2d31 3c2f 636f 6465 3e29 2020 2020 2 -1) \n-0014fa90: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    SOAP1.2 SOAP\n-0014fb20: 2031 2e32 2074 7261 6e73 706f 7274 2028 1.2 transport (\n-0014fb30: 7361 6d65 2061 7320 3c63 6f64 653e 736f same as so\n-0014fb40: 6170 6370 7032 202d 323c 2f63 6f64 653e apcpp2 -2\n-0014fb50: 2920 2020 203c 2f74 643e 3c2f 7472 3e0a )
    SOAP-G\n-0014fbb0: 4554 3c2f 636f 6465 3e20 2020 3c2f 7464 ET one-way SOAP \n-0014fbf0: 312e 3120 6f72 2031 2e32 2077 6974 6820 1.1 or 1.2 with \n-0014fc00: 4854 5450 2047 4554 2020 2020 3c2f 7464 HTTP GET
    \n-0014fc60: 534f 4150 312e 312d 4745 543c 2f63 6f64 SOAP1.1-GET one-\n-0014fca0: 7761 7920 534f 4150 2031 2e31 2077 6974 way SOAP 1.1 wit\n-0014fcb0: 6820 4854 5450 2047 4554 2020 2020 3c2f h HTTP GET
    SOAP1.2-GET
    an ali\n-0014fe00: 6173 2066 6f72 203c 636f 6465 3e50 4f53 as for POS\n-0014fe10: 543c 2f63 6f64 653e 2028 7361 6d65 2061 T (same a\n-0014fe20: 7320 3c63 6f64 653e 736f 6170 6370 7032 s soapcpp2\n-0014fe30: 202d 303c 2f63 6f64 653e 2920 2020 203c -0) <\n-0014fe40: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    POST \n-0014fea0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 non-SOA\n-0014fed0: 5020 5245 5354 2070 726f 746f 636f 6c20 P REST protocol \n-0014fee0: 7769 7468 2048 5454 5020 504f 5354 2020 with HTTP POST \n-0014fef0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    non-SO\n-0014ff80: 4150 2052 4553 5420 7072 6f74 6f63 6f6c AP REST protocol\n-0014ff90: 2077 6974 6820 4854 5450 2047 4554 2020 with HTTP GET \n-0014ffa0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    non-S\n-00150030: 4f41 5020 5245 5354 2070 726f 746f 636f OAP REST protoco\n-00150040: 6c20 7769 7468 2048 5454 5020 5055 5420 l with HTTP PUT \n-00150050: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    no\n-001500e0: 6e2d 534f 4150 2052 4553 5420 7072 6f74 n-SOAP REST prot\n-001500f0: 6f63 6f6c 2077 6974 6820 4854 5450 2044 ocol with HTTP D\n-00150100: 454c 4554 4520 2020 3c2f 7464 3e3c 2f74 ELETE
    .

    T\n-00150120: 6865 203c 636f 6465 3e70 726f 746f 636f he protoco\n-00150130: 6c3c 2f63 6f64 653e 2070 726f 7065 7274 l propert\n-00150140: 7920 6973 203c 636f 6465 3e53 4f41 503c y is SOAP<\n-00150150: 2f63 6f64 653e 2062 7920 6465 6661 756c /code> by defaul\n-00150160: 742e 2054 6865 2064 6566 6175 6c74 2069 t. The default i\n-00150170: 7320 6368 616e 6765 6420 7769 7468 203c s changed with <\n-00150180: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2\n-00150190: 202d 313c 2f63 6f64 653e 3c2f 623e 206f -1 o\n-001501a0: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n-001501b0: 313c 2f63 6f64 653e 3c2f 623e 2074 6f20 1 to \n-001501c0: 534f 4150 2031 2e31 2c20 3c62 3e3c 636f SOAP 1.1, soapcpp2 -2 option\n-001501f0: 203c 623e 3c63 6f64 653e 2d32 3c2f 636f -2 to SOAP \n-00150210: 312e 322c 2061 6e64 206e 6f6e 2d53 4f41 1.2, and non-SOA\n-00150220: 5020 5245 5354 2077 6974 6820 3c62 3e3c P REST with <\n-00150230: 636f 6465 3e73 6f61 7063 7070 3220 2d30 code>soapcpp2 -0\n-00150240: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n-00150250: 6f6e 203c 623e 3c63 6f64 653e 2d30 3c2f on -0

    .The GET protocols \n-00150290: 666f 7220 534f 4150 2061 6e64 2052 4553 for SOAP and RES\n-001502a0: 5420 7265 7175 6972 6520 7468 6174 2074 T require that t\n-001502b0: 6865 2073 6572 7669 6365 206f 7065 7261 he service opera\n-001502c0: 7469 6f6e 7320 6f6e 6c79 2075 7365 2070 tions only use p\n-001502d0: 7269 6d69 7469 7665 2074 7970 6573 2077 rimitive types w\n-001502e0: 6974 6820 7468 6569 7220 696e 7075 7420 ith their input \n-001502f0: 7061 7261 6d65 7465 7273 2c20 6265 6361 parameters, beca\n-00150300: 7573 6520 7468 6573 6520 7061 7261 6d65 use these parame\n-00150310: 7465 7273 2061 7265 2065 6e63 6f64 6564 ters are encoded\n-00150320: 2077 6974 6820 7468 6520 5552 4c20 6173 with the URL as\n-00150330: 2055 524c 2071 7565 7279 2076 616c 7565 URL query value\n-00150340: 732e 3c2f 703e 0a3c 703e 546f 206c 6574 s.

    .

    To let\n-00150350: 2064 6972 6563 7469 7665 7320 7461 6b65 directives take\n-00150360: 2065 6666 6563 7420 7769 7468 2073 6572 effect with ser\n-00150370: 7669 6365 206f 7065 7261 7469 6f6e 732c vice operations,\n-00150380: 2079 6f75 2073 686f 756c 6420 6269 6e64 you should bind\n-00150390: 2074 6865 2073 6572 7669 6365 206f 7065 the service ope\n-001503a0: 7261 7469 6f6e 7320 746f 2074 6865 2057 rations to the W\n-001503b0: 5344 4c20 6e61 6d65 7370 6163 6520 6f66 SDL namespace of\n-001503c0: 2061 2073 6572 7669 6365 2062 7920 7573 a service by us\n-001503d0: 696e 6720 7468 6520 6e61 6d65 7370 6163 ing the namespac\n-001503e0: 6520 7072 6566 6978 2061 7320 7061 7274 e prefix as part\n-001503f0: 206f 6620 7468 6520 6964 656e 7469 6669 of the identifi\n-00150400: 6572 206e 616d 6520 6f66 2074 6865 2066 er name of the f\n-00150410: 756e 6374 696f 6e20 7468 6174 2064 6566 unction that def\n-00150420: 696e 6573 2074 6865 2073 6572 7669 6365 ines the service\n-00150430: 206f 7065 7261 7469 6f6e 3a3c 2f70 3e0a operation:

    .\n-00150440: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int pre\n-00150490: 6669 785f 5f66 756e 6328 6172 6731 2c20 fix__func(arg1, \n-001504a0: 6172 6732 2c20 2e2e 2e2c 2061 7267 6e2c arg2, ..., argn,\n-001504b0: 2072 6573 756c 7429 3b3c 2f64 6976 3e0a result);
    .\n-001504c0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where \n-001504e0: 3c63 6f64 653e 7072 6566 6978 3c2f 636f prefix can now be u\n-00150500: 7365 6420 746f 206c 6574 2064 6972 6563 sed to let direc\n-00150510: 7469 7665 7320 7461 6b65 2065 6666 6563 tives take effec\n-00150520: 7420 6f6e 2074 6869 7320 7365 7276 6963 t on this servic\n-00150530: 6520 6f70 6572 6174 696f 6e2e 3c2f 703e e operation.

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

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

    .

    <\n-001505a0: 2f61 3e0a 5365 7276 6963 6520 6d65 7468 /a>.Service meth\n-001505b0: 6f64 2064 6972 6563 7469 7665 733c 2f68 od directives.

    Service pr\n-001505d0: 6f70 6572 7469 6573 2061 7265 2061 7070 operties are app\n-001505e0: 6c69 6361 626c 6520 746f 2061 2073 6572 licable to a ser\n-001505f0: 7669 6365 2061 6e64 2074 6f20 616c 6c20 vice and to all \n-00150600: 6f66 2069 7473 206f 7065 7261 7469 6f6e of its operation\n-00150610: 732e 2053 6572 7669 6365 206d 6574 686f s. Service metho\n-00150620: 6420 6469 7265 6374 6976 6573 2061 7265 d directives are\n-00150630: 2073 7065 6369 6669 6361 6c6c 7920 6170 specifically ap\n-00150640: 706c 6963 6162 6c65 2074 6f20 6120 7365 plicable to a se\n-00150650: 7276 6963 6520 6f70 6572 6174 696f 6e2e rvice operation.\n-00150660: 3c2f 703e 0a3c 703e 4120 7365 7276 6963

    .

    A servic\n-00150670: 6520 6d65 7468 6f64 2064 6972 6563 7469 e method directi\n-00150680: 7665 2069 7320 6f66 2074 6865 2066 6f72 ve is of the for\n-00150690: 6d3a 3c2f 703e 0a3c 6469 7620 636c 6173 m:

    .
    <\n-001506c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001506d0: 656e 7422 3e2f 2f67 736f 6170 2026 6c74 ent\">//gsoap <\n-001506e0: 3b70 7265 6669 7826 6774 3b20 7365 7276 ;prefix> serv\n-001506f0: 6963 6520 6d65 7468 6f64 2d26 6c74 3b70 ice method-<p\n-00150700: 726f 7065 7274 7926 6774 3b3a 2026 6c74 roperty>: <\n-00150710: 3b6d 6574 686f 6426 6774 3b20 266c 743b ;method> <\n-00150720: 7661 6c75 6526 6774 3b3c 2f73 7061 6e3e value>\n-00150730: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    where <\n-00150760: 3b70 7265 6669 7826 6774 3b3c 2f63 6f64 ;prefix> is the XML na\n-00150780: 6d65 7370 6163 6520 7072 6566 6978 206f mespace prefix o\n-00150790: 6620 6120 7365 7276 6963 6520 6269 6e64 f a service bind\n-001507a0: 696e 6720 616e 6420 3c63 6f64 653e 266c ing and &l\n-001507b0: 743b 6d65 7468 6f64 2667 743b 3c2f 636f t;method> is the unqua\n-001507d0: 6c69 6669 6564 206e 616d 6520 6f66 2061 lified name of a\n-001507e0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n-001507f0: 6f6e 2e20 5468 6520 3c63 6f64 653e 266c on. The &l\n-00150800: 743b 7072 6f70 6572 7479 2667 743b 3c2f t;property> and \n-00150820: 266c 743b 7661 6c75 6526 6774 3b3c 2f63 <value> fields are \n-00150840: 6f6e 6520 6f66 2074 6865 2066 6f6c 6c6f one of the follo\n-00150850: 7769 6e67 3a3c 2f70 3e0a 3c74 6162 6c65 wing:

    ...method \n-001508c0: 7072 6f70 6572 7479 2020 203c 2f74 683e property \n-001508d0: 3c74 6820 636c 6173 733d 226d 6172 6b64 value \n-00150900: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..m\n-00150950: 6574 686f 642d 646f 6375 6d65 6e74 6174 ethod-documentat\n-00150960: 696f 6e3c 2f63 6f64 653e 2020 203c 2f74 ion text describ\n-001509a0: 696e 6720 7468 6520 7365 7276 6963 6520 ing the service \n-001509b0: 6f70 6572 6174 696f 6e20 2020 203c 2f74 operation ..method
    \n-00150a20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 same as\n-00150a50: 2061 626f 7665 2c20 7368 6f72 7468 616e above, shorthan\n-00150a60: 6420 666f 726d 2020 2020 3c2f 7464 3e3c d form <\n-00150a70: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..me\n-00150ac0: 7468 6f64 2d61 6374 696f 6e3c 2f63 6f64 thod-action \"\" or U\n-00150b10: 5249 2053 4f41 5041 6374 696f 6e20 4854 RI SOAPAction HT\n-00150b20: 5450 2068 6561 6465 722c 206f 7220 5552 TP header, or UR\n-00150b30: 4c20 7175 6572 7920 7374 7269 6e67 2066 L query string f\n-00150b40: 6f72 2052 4553 5420 7072 6f74 6f63 6f6c or REST protocol\n-00150b50: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n-00150b60: 3c74 7220 636c 6173 733d 226d 6172 6b64 .method\n-00150bb0: 2d69 6e70 7574 2d61 6374 696f 6e3c 2f63 -input-action \"\" or\n-00150c00: 2055 5249 2053 4f41 5041 6374 696f 6e20 URI SOAPAction \n-00150c10: 4854 5450 2068 6561 6465 7220 6f66 2073 HTTP header of s\n-00150c20: 6572 7669 6365 2072 6571 7565 7374 206d ervice request m\n-00150c30: 6573 7361 6765 7320 2020 203c 2f74 643e essages \n-00150c40: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..m\n-00150c90: 6574 686f 642d 6f75 7470 7574 2d61 6374 ethod-output-act\n-00150ca0: 696f 6e3c 2f63 6f64 653e 2020 203c 2f74 ion \"\" or URI SOAPA\n-00150cf0: 6374 696f 6e20 4854 5450 2068 6561 6465 ction HTTP heade\n-00150d00: 7220 6f66 2073 6572 7669 6365 2072 6573 r of service res\n-00150d10: 706f 6e73 6520 6d65 7373 6167 6573 2020 ponse messages \n-00150d20: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00150d50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150d60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00150d70: 3e3c 636f 6465 3e6d 6574 686f 642d 6661 >method-fa\n-00150d80: 756c 742d 6163 7469 6f6e 3c2f 636f 6465 ult-action \"\" or UR\n-00150dd0: 4920 534f 4150 4163 7469 6f6e 2048 5454 I SOAPAction HTT\n-00150de0: 5020 6865 6164 6572 206f 6620 7365 7276 P header of serv\n-00150df0: 6963 6520 6661 756c 7420 6d65 7373 6167 ice fault messag\n-00150e00: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es \n-00150e10: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..method\n-00150e60: 2d68 6561 6465 722d 7061 7274 3c2f 636f -header-part mem\n-00150ea0: 6265 7220 6e61 6d65 206f 6620 7468 6520 ber name of the \n-00150eb0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22
    SOAP_ENV__Heade\n-00150f20: 723c 2f61 3e3c 2f63 6f64 653e 2073 7472 r str\n-00150f30: 7563 7420 7573 6564 2069 6e20 534f 4150 uct used in SOAP\n-00150f40: 2048 6561 6465 7220 2020 203c 2f74 643e Header \n-00150f50: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-00150fa0: 6d65 7468 6f64 2d69 6e70 7574 2d68 6561 method-input-hea\n-00150fb0: 6465 722d 7061 7274 3c2f 636f 6465 3e20 der-part \n-00150fc0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 member \n-00150ff0: 6e61 6d65 206f 6620 7468 6520 3c63 6f64 name of the SOA\n-00151060: 505f 454e 565f 5f48 6561 6465 723c 2f61 P_ENV__Header struct \n-00151080: 7573 6564 2069 6e20 534f 4150 2048 6561 used in SOAP Hea\n-00151090: 6465 7273 206f 6620 7265 7175 6573 7473 ders of requests\n-001510a0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n-001510b0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-001510c0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-001510d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 method-o\n-00151100: 7574 7075 742d 6865 6164 6572 2d70 6172 utput-header-par\n-00151110: 743c 2f63 6f64 653e 2020 203c 2f74 643e t \n-00151120: 3c74 6420 636c 6173 733d 226d 6172 6b64 member name of\n-00151150: 2074 6865 203c 636f 6465 3e3c 6120 636c the SOAP_ENV__\n-001511c0: 4865 6164 6572 3c2f 613e 3c2f 636f 6465 Header struct used in\n-001511e0: 2053 4f41 5020 4865 6164 6572 7320 6f66 SOAP Headers of\n-001511f0: 2072 6573 706f 6e73 6573 2020 2020 3c2f responses ..method-fault<\n-00151260: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00151290: 7479 7065 206e 616d 6520 6f66 2061 2073 type name of a s\n-001512a0: 7472 7563 7420 6f72 2063 6c61 7373 206d truct or class m\n-001512b0: 656d 6265 7220 7573 6564 2069 6e20 3c63 ember used in SOAP_ENV__De\n-001512d0: 7461 696c 733c 2f63 6f64 653e 2073 7472 tails str\n-001512e0: 7563 7420 2020 203c 2f74 643e 3c2f 7472 uct ..metho\n-00151340: 642d 6d69 6d65 2d74 7970 653c 2f63 6f64 d-mime-type REST\n-00151380: 2063 6f6e 7465 6e74 2074 7970 6520 6f72 content type or\n-00151390: 2053 4f41 5020 4d49 4d45 2061 7474 6163 SOAP MIME attac\n-001513a0: 686d 656e 7420 636f 6e74 656e 7420 7479 hment content ty\n-001513b0: 7065 2873 2920 2020 203c 2f74 643e 3c2f pe(s) ..me\n-00151410: 7468 6f64 2d69 6e70 7574 2d6d 696d 652d thod-input-mime-\n-00151420: 7479 7065 3c2f 636f 6465 3e20 2020 3c2f type REST conten\n-00151460: 7420 7479 7065 206f 7220 534f 4150 204d t type or SOAP M\n-00151470: 494d 4520 6174 7461 6368 6d65 6e74 2063 IME attachment c\n-00151480: 6f6e 7465 6e74 2074 7970 6528 7329 206f ontent type(s) o\n-00151490: 6620 7265 7175 6573 7420 6d65 7373 6167 f request messag\n-001514a0: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n-001514b0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-001514d0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .method-\n-00151500: 6f75 7470 7574 2d6d 696d 652d 7479 7065 output-mime-type\n-00151510: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-00151520: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00151530: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00151540: 3e52 4553 5420 636f 6e74 656e 7420 7479 >REST content ty\n-00151550: 7065 206f 7220 534f 4150 204d 494d 4520 pe or SOAP MIME \n-00151560: 6174 7461 6368 6d65 6e74 2063 6f6e 7465 attachment conte\n-00151570: 6e74 2074 7970 6528 7329 206f 6620 7265 nt type(s) of re\n-00151580: 7370 6f6e 7365 206d 6573 7361 6765 2020 sponse message \n-00151590: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-001515c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001515d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001515e0: 3e3c 636f 6465 3e6d 6574 686f 642d 7374 >method-st\n-001515f0: 796c 653c 2f63 6f64 653e 2020 203c 2f74 yle docume\n-00151630: 6e74 3c2f 636f 6465 3e20 6f72 203c 636f nt or rpc \n-00151650: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-001516a0: 636f 6465 3e6d 6574 686f 642d 656e 636f code>method-enco\n-001516b0: 6469 6e67 3c2f 636f 6465 3e20 2020 3c2f ding liter\n-001516f0: 616c 3c2f 636f 6465 3e2c 203c 636f 6465 al, encoded,\n-00151710: 206f 7220 6120 6375 7374 6f6d 2055 5249 or a custom URI\n-00151720: 2066 6f72 2065 6e63 6f64 696e 6753 7479 for encodingSty\n-00151730: 6c65 206f 6620 6d65 7373 6167 6573 2020 le of messages \n-00151740: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00151770: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00151780: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00151790: 3e3c 636f 6465 3e6d 6574 686f 642d 7265 >method-re\n-001517a0: 7370 6f6e 7365 2d65 6e63 6f64 696e 673c sponse-encoding<\n-001517b0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-001517e0: 3c63 6f64 653e 6c69 7465 7261 6c3c 2f63 literal, enco\n-00151800: 6465 643c 2f63 6f64 653e 2c20 6f72 2061 ded, or a\n-00151810: 2063 7573 746f 6d20 5552 4920 666f 7220 custom URI for \n-00151820: 656e 636f 6469 6e67 5374 796c 6520 6f66 encodingStyle of\n-00151830: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag\n-00151840: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es \n-00151850: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..method\n-001518a0: 2d70 726f 746f 636f 6c3c 2f63 6f64 653e -protocol\n-001518b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 SOAP o\n-001518e0: 7220 5245 5354 2c20 7365 6520 3c61 2063 r REST, see Service\n-00151920: 2064 6972 6563 7469 7665 733c 2f61 3e20 directives \n-00151930: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 ..

    The method-header\n-00151960: 2d70 6172 743c 2f63 6f64 653e 2070 726f -part pro\n-00151970: 7065 7274 6965 7320 6361 6e20 6265 2072 perties can be r\n-00151980: 6570 6561 7465 6420 666f 7220 6120 7365 epeated for a se\n-00151990: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n-001519a0: 746f 2064 6563 6c61 7265 206d 756c 7469 to declare multi\n-001519b0: 706c 6520 534f 4150 2048 6561 6465 7220 ple SOAP Header \n-001519c0: 7061 7274 7320 7468 6174 2074 6865 2073 parts that the s\n-001519d0: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n-001519e0: 2072 6571 7569 7265 732e 2059 6f75 2063 requires. You c\n-001519f0: 616e 2075 7365 203c 636f 6465 3e6d 6574 an use met\n-00151a00: 686f 642d 696e 7075 742d 6865 6164 6572 hod-input-header\n-00151a10: 2d70 6172 743c 2f63 6f64 653e 2061 6e64 -part and\n-00151a20: 203c 636f 6465 3e6d 6574 686f 642d 6f75 method-ou\n-00151a30: 7470 7574 2d68 6561 6465 722d 7061 7274 tput-header-part\n-00151a40: 3c2f 636f 6465 3e20 746f 2064 6966 6665 to diffe\n-00151a50: 7265 6e74 6961 7465 2062 6574 7765 656e rentiate between\n-00151a60: 2072 6571 7565 7374 2061 6e64 2072 6573 request and res\n-00151a70: 706f 6e73 6520 6d65 7373 6167 6573 2e3c ponse messages.<\n-00151a80: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The method-fault property ca\n-00151ab0: 6e20 6265 2072 6570 6561 7465 6420 666f n be repeated fo\n-00151ac0: 7220 6120 7365 7276 6963 6520 6f70 6572 r a service oper\n-00151ad0: 6174 696f 6e20 746f 2064 6563 6c61 7265 ation to declare\n-00151ae0: 206d 756c 7469 706c 6520 6661 756c 7473 multiple faults\n-00151af0: 2074 6861 7420 7468 6520 7365 7276 6963 that the servic\n-00151b00: 6520 6f70 6572 6174 696f 6e20 6d61 7920 e operation may \n-00151b10: 7265 7475 726e 2e3c 2f70 3e0a 3c70 3e54 return.

    .

    T\n-00151b20: 6865 203c 636f 6465 3e6d 6574 686f 642d he method-\n-00151b30: 6163 7469 6f6e 3c2f 636f 6465 3e20 7072 action pr\n-00151b40: 6f70 6572 7479 2073 6572 7665 7320 7477 operty serves tw\n-00151b50: 6f20 7075 7270 6f73 6573 3a3c 2f70 3e0a o purposes:

    .\n-00151b60: 3c6f 6c20 7479 7065 3d22 3122 3e0a 3c6c
      .To set the SOA\n-00151b80: 5041 6374 696f 6e20 6865 6164 6572 2066 PAction header f\n-00151b90: 6f72 2053 4f41 5020 7072 6f74 6f63 6f6c or SOAP protocol\n-00151ba0: 732c 2069 2e65 2e20 7365 7473 2074 6865 s, i.e. sets the\n-00151bb0: 2064 6566 696e 6974 696f 6e73 2f62 696e definitions/bin\n-00151bc0: 6469 6e67 2f6f 7065 7261 7469 6f6e 2f53 ding/operation/S\n-00151bd0: 4f41 503a 6f70 6572 6174 696f 6e2f 4073 OAP:operation/@s\n-00151be0: 6f61 7041 6374 696f 6e2e 3c2f 6c69 3e0a oapAction..\n-00151bf0: 3c6c 693e 546f 2073 6574 2074 6865 2055
    1. To set the U\n-00151c00: 524c 2071 7565 7279 2073 7472 696e 6720 RL query string \n-00151c10: 666f 7220 656e 6470 6f69 6e74 7320 7769 for endpoints wi\n-00151c20: 7468 2052 4553 5420 7072 6f74 6f63 6f6c th REST protocol\n-00151c30: 732c 2069 2e65 2e20 7365 7473 2074 6865 s, i.e. sets the\n-00151c40: 2064 6566 696e 6974 696f 6e73 2f62 696e definitions/bin\n-00151c50: 6469 6e67 2f6f 7065 7261 7469 6f6e 2f48 ding/operation/H\n-00151c60: 5454 503a 6f70 6572 6174 696f 6e2f 406c TTP:operation/@l\n-00151c70: 6f63 6174 696f 6e2c 2077 6869 6368 2073 ocation, which s\n-00151c80: 7065 6369 6669 6573 2061 2055 524c 2071 pecifies a URL q\n-00151c90: 7565 7279 2073 7472 696e 6720 2873 7461 uery string (sta\n-00151ca0: 7274 7320 7769 7468 2061 203c 636f 6465 rts with a ?) to co\n-00151cc0: 6d70 6c65 7465 2074 6865 2073 6572 7669 mplete the servi\n-00151cd0: 6365 2065 6e64 706f 696e 7420 5552 4c20 ce endpoint URL \n-00151ce0: 6f72 2065 7874 656e 6473 2074 6865 2065 or extends the e\n-00151cf0: 6e64 706f 696e 7420 5552 4c20 7769 7468 ndpoint URL with\n-00151d00: 2061 206c 6f63 616c 2070 6174 6820 2873 a local path (s\n-00151d10: 7461 7274 7320 7769 7468 2061 203c 636f tarts with a /)..
    .

    Use \n-00151d40: 3c63 6f64 653e 6d65 7468 6f64 2d69 6e70 method-inp\n-00151d50: 7574 2d61 6374 696f 6e3c 2f63 6f64 653e ut-action\n-00151d60: 2061 6e64 203c 636f 6465 3e6d 6574 686f and metho\n-00151d70: 642d 6f75 7470 7574 2d61 6374 696f 6e3c d-output-action<\n-00151d80: 2f63 6f64 653e 2074 6f20 6469 6666 6572 /code> to differ\n-00151d90: 656e 7469 6174 6520 7468 6520 534f 4150 entiate the SOAP\n-00151da0: 4163 7469 6f6e 2062 6574 7765 656e 2053 Action between S\n-00151db0: 4f41 5020 7265 7175 6573 7420 616e 6420 OAP request and \n-00151dc0: 7265 7370 6f6e 7365 206d 6573 7361 6765 response message\n-00151dd0: 732e 3c2f 703e 0a3c 703e 596f 7520 6361 s.

    .

    You ca\n-00151de0: 6e20 616c 7761 7973 206f 7665 7272 6964 n always overrid\n-00151df0: 6520 7468 6520 706f 7274 2065 6e64 706f e the port endpo\n-00151e00: 696e 7420 5552 4c20 616e 6420 6163 7469 int URL and acti\n-00151e10: 6f6e 2076 616c 7565 7320 6174 2072 756e on values at run\n-00151e20: 7469 6d65 2069 6e20 7468 6520 6175 746f time in the auto\n-00151e30: 2d67 656e 6572 6174 6564 203c 636f 6465 -generated soap_call_prefi\n-00151e50: 785f 5f66 756e 633c 2f63 6f64 653e 2073 x__func s\n-00151e60: 6572 7669 6365 2063 616c 6c20 2843 2f43 ervice call (C/C\n-00151e70: 2b2b 2063 6c69 656e 7420 7369 6465 2920 ++ client side) \n-00151e80: 616e 6420 696e 2074 6865 2061 7574 6f2d and in the auto-\n-00151e90: 6765 6e65 7261 7465 6420 432b 2b20 7072 generated C++ pr\n-00151ea0: 6f78 7920 636c 6173 7320 7365 7276 6963 oxy class servic\n-00151eb0: 6520 6361 6c6c 732e 2041 2072 756e 7469 e calls. A runti\n-00151ec0: 6d65 204e 554c 4c20 656e 6470 6f69 6e74 me NULL endpoint\n-00151ed0: 2055 524c 2061 6e64 2f6f 7220 6163 7469 URL and/or acti\n-00151ee0: 6f6e 2075 7365 7320 7468 6520 6465 6661 on uses the defa\n-00151ef0: 756c 7473 2073 6574 2062 7920 7468 6573 ults set by thes\n-00151f00: 6520 6469 7265 6374 6976 6573 2e3c 2f70 e directives..

    The m\n-00151f20: 6574 686f 642d 6d69 6d65 2d74 7970 653c ethod-mime-type<\n-00151f30: 2f63 6f64 653e 2070 726f 7065 7274 7920 /code> property \n-00151f40: 7365 7276 6573 2074 776f 2070 7572 706f serves two purpo\n-00151f50: 7365 733a 3c2f 703e 0a3c 6f6c 2074 7970 ses:

    .
      .
    1. To se\n-00151f70: 7420 7468 6520 7479 7065 206f 6620 4d49 t the type of MI\n-00151f80: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n-00151f90: 6e74 7320 7573 6564 2077 6974 6820 534f nts used with SO\n-00151fa0: 4150 2070 726f 746f 636f 6c73 2e20 4d75 AP protocols. Mu\n-00151fb0: 6c74 6970 6c65 2061 7474 6163 686d 656e ltiple attachmen\n-00151fc0: 7420 7479 7065 7320 6361 6e20 6265 2064 t types can be d\n-00151fd0: 6563 6c61 7265 6420 666f 7220 6120 534f eclared for a SO\n-00151fe0: 4150 2073 6572 7669 6365 206f 7065 7261 AP service opera\n-00151ff0: 7469 6f6e 2c20 692e 652e 2061 6464 7320 tion, i.e. adds \n-00152000: 6465 6669 6e69 7469 6f6e 732f 6269 6e64 definitions/bind\n-00152010: 696e 672f 6f70 6572 6174 696f 6e2f 696e ing/operation/in\n-00152020: 7075 742f 4d49 4d45 3a6d 756c 7469 7061 put/MIME:multipa\n-00152030: 7274 5265 6c61 7465 642f 4d49 4d45 3a70 rtRelated/MIME:p\n-00152040: 6172 742f 4d49 4d45 3a63 6f6e 7465 6e74 art/MIME:content\n-00152050: 2f40 7479 7065 2066 6f72 2065 6163 6820 /@type for each \n-00152060: 7479 7065 2073 7065 6369 6669 6564 2e3c type specified.<\n-00152070: 2f6c 693e 0a3c 6c69 3e54 6f20 7365 7420 /li>.
    2. To set \n-00152080: 7468 6520 4d49 4d45 2074 7970 6520 6f66 the MIME type of\n-00152090: 2061 2052 4553 5420 6f70 6572 6174 696f a REST operatio\n-001520a0: 6e2e 2054 6869 7320 7265 706c 6163 6573 n. This replaces\n-001520b0: 2058 4d4c 2064 6563 6c61 7265 6420 696e XML declared in\n-001520c0: 2057 5344 4c20 6279 2064 6566 696e 6974 WSDL by definit\n-001520d0: 696f 6e73 2f62 696e 6469 6e67 2f6f 7065 ions/binding/ope\n-001520e0: 7261 7469 6f6e 2f28 696e 7075 747c 6f75 ration/(input|ou\n-001520f0: 7470 7574 292f 4d49 4d45 3a6d 696d 6558 tput)/MIME:mimeX\n-00152100: 6d6c 2077 6974 6820 4d49 4d45 3a63 6f6e ml with MIME:con\n-00152110: 7465 6e74 2f40 7479 7065 2e20 5573 6520 tent/@type. Use \n-00152120: 3c63 6f64 653e 6170 706c 6963 6174 696f applicatio\n-00152130: 6e2f 782d 7777 772d 666f 726d 2d75 726c n/x-www-form-url\n-00152140: 656e 636f 6465 643c 2f63 6f64 653e 2077 encoded w\n-00152150: 6974 6820 5245 5354 2050 4f53 5420 616e ith REST POST an\n-00152160: 6420 5055 5420 7072 6f74 6f63 6f6c 7320 d PUT protocols \n-00152170: 746f 2073 656e 6420 656e 636f 6465 6420 to send encoded \n-00152180: 666f 726d 2064 6174 6120 6175 746f 6d61 form data automa\n-00152190: 7469 6361 6c6c 7920 696e 7374 6561 6420 tically instead \n-001521a0: 6f66 2058 4d4c 2e20 4f6e 6c79 2070 7269 of XML. Only pri\n-001521b0: 6d69 7469 7665 2074 7970 6520 7661 6c75 mitive type valu\n-001521c0: 6573 2063 616e 2062 6520 7472 616e 736d es can be transm\n-001521d0: 6974 7465 6420 7769 7468 2066 6f72 6d20 itted with form \n-001521e0: 6461 7461 2c20 7375 6368 2061 7320 6e75 data, such as nu\n-001521f0: 6d62 6572 7320 616e 6420 7374 7269 6e67 mbers and string\n-00152200: 732c 2069 2e65 2e20 6f6e 6c79 2074 7970 s, i.e. only typ\n-00152210: 6573 2074 6861 7420 6172 6520 6c65 6761 es that are lega\n-00152220: 6c20 746f 2075 7365 2061 7320 6174 7472 l to use as attr\n-00152230: 6962 7574 6573 206d 656d 6265 7273 2e3c ibutes members.<\n-00152240: 2f6c 693e 0a3c 2f6f 6c3e 0a3c 703e 5573 /li>.
    .

    Us\n-00152250: 6520 3c63 6f64 653e 6d65 7468 6f64 2d69 e method-i\n-00152260: 6e70 7574 2d6d 696d 652d 7479 7065 3c2f nput-mime-type and \n-00152280: 6d65 7468 6f64 2d6f 7574 7075 742d 6d69 method-output-mi\n-00152290: 6d65 2d74 7970 653c 2f63 6f64 653e 2074 me-type t\n-001522a0: 6f20 6469 6666 6572 656e 7469 6174 6520 o differentiate \n-001522b0: 7468 6520 6174 7461 6368 6d65 6e74 2074 the attachment t\n-001522c0: 7970 6573 2062 6574 7765 656e 2072 6571 ypes between req\n-001522d0: 7565 7374 2061 6e64 2072 6573 706f 6e73 uest and respons\n-001522e0: 6520 6d65 7373 6167 6573 2e3c 2f70 3e0a e messages.

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

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

    .

    .Schema direct\n-00152360: 6976 6573 3c2f 6833 3e0a 3c70 3e41 2073 ives

    .

    A s\n-00152370: 6368 656d 6120 6469 7265 6374 6976 6520 chema directive \n-00152380: 6973 206f 6620 7468 6520 666f 726d 3a3c is of the form:<\n-00152390: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    //gsoap <pr\n-001523e0: 6566 6978 2667 743b 2073 6368 656d 6120 efix> schema \n-001523f0: 266c 743b 7072 6f70 6572 7479 2667 743b <property>\n-00152400: 3a20 266c 743b 7661 6c75 6526 6774 3b3c : <value><\n-00152410: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

    where <prefix>\n-00152450: 3b3c 2f63 6f64 653e 2069 7320 7468 6520 ; is the \n-00152460: 584d 4c20 6e61 6d65 7370 6163 6520 7072 XML namespace pr\n-00152470: 6566 6978 206f 6620 6120 7363 6865 6d61 efix of a schema\n-00152480: 2e20 5468 6520 3c63 6f64 653e 266c 743b . The <\n-00152490: 7072 6f70 6572 7479 2667 743b 3c2f 636f property> and &l\n-001524b0: 743b 7661 6c75 6526 6774 3b3c 2f63 6f64 t;value> fields are on\n-001524d0: 6520 6f66 2074 6865 2066 6f6c 6c6f 7769 e of the followi\n-001524e0: 6e67 3a3c 2f70 3e0a 3c74 6162 6c65 2063 ng:

    .....\n-001525d0: 3c63 6f64 653e 6e61 6d65 7370 6163 653c namespace<\n-001525e0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00152610: 5552 4920 6f66 2074 6865 2058 5344 2074 URI of the XSD t\n-00152620: 6172 6765 744e 616d 6573 7061 6365 2020 argetNamespace \n-00152630: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00152660: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00152670: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00152680: 3e3c 636f 6465 3e6e 616d 6573 7061 6365 >namespace\n-00152690: 323c 2f63 6f64 653e 2020 203c 2f74 643e 2 \n-001526a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....\n-001528b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......<\n-00152b80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00152b90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00152ba0: 3e3c 636f 6465 3e6e 6f3c 2f63 6f64 653e >no\n-00152bb0: 2028 6465 6661 756c 7429 206f 7220 3c63 (default) or yes f\n-00152bd0: 6f72 2073 6572 6961 6c69 7a65 7273 2074 or serializers t\n-00152be0: 6f20 6164 6420 3c63 6f64 653e 7873 693a o add xsi:\n-00152bf0: 7479 7065 3c2f 636f 6465 3e20 6174 7472 type attr\n-00152c00: 6962 7574 6573 2074 6f20 584d 4c20 2020 ibutes to XML \n-00152c10: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162 ..

    The namespace2 URI is a patt\n-00152c50: 6572 6e20 7769 7468 203c 636f 6465 3e2a ern with *\n-00152c60: 3c2f 636f 6465 3e20 6d61 7463 6869 6e67 matching\n-00152c70: 2061 6e79 2073 6571 7565 6e63 6520 6f66 any sequence of\n-00152c80: 2063 6861 7261 6374 6572 7320 616e 6420 characters and \n-00152c90: 3c63 6f64 653e 2d3c 2f63 6f64 653e 206d - m\n-00152ca0: 6174 6368 696e 6720 616e 7920 6368 6172 atching any char\n-00152cb0: 6163 7465 722e 2054 6869 7320 7061 7474 acter. This patt\n-00152cc0: 6572 6e20 696e 7374 7275 6374 7320 7468 ern instructs th\n-00152cd0: 6520 584d 4c20 7061 7273 6572 2061 6e64 e XML parser and\n-00152ce0: 2076 616c 6964 6174 6f72 2074 6f20 616c validator to al\n-00152cf0: 736f 2061 6363 6570 7420 7468 6520 5552 so accept the UR\n-00152d00: 4920 7061 7474 6572 6e20 6173 2061 2076 I pattern as a v\n-00152d10: 616c 6964 206e 616d 6573 7061 6365 2066 alid namespace f\n-00152d20: 6f72 2074 6865 2073 7065 6369 6669 6564 or the specified\n-00152d30: 203c 636f 6465 3e26 6c74 3b70 7265 6669 <prefi\n-00152d40: 7826 6774 3b3c 2f63 6f64 653e 2e3c 2f70 x>..

    The t\n-00152d60: 7970 6564 3c2f 636f 6465 3e20 7072 6f70 yped prop\n-00152d70: 6572 7479 2069 7320 3c63 6f64 653e 6e6f erty is no\n-00152d80: 3c2f 636f 6465 3e20 6279 2064 6566 6175 by defau\n-00152d90: 6c74 2061 6e64 2063 616e 2062 6520 6368 lt and can be ch\n-00152da0: 616e 6765 6420 746f 203c 636f 6465 3e79 anged to y\n-00152db0: 6573 3c2f 636f 6465 3e20 7769 7468 203c es with <\n-00152dc0: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2\n-00152dd0: 202d 743c 2f63 6f64 653e 3c2f 623e 206f -t o\n-00152de0: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n-00152df0: 743c 2f63 6f64 653e 3c2f 623e 2e3c 2f70 t..

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

    .

    \n-00152e60: 3c2f 613e 0a53 6368 656d 6120 7479 7065 .Schema type\n-00152e70: 2064 6972 6563 7469 7665 733c 2f68 333e directives

    \n-00152e80: 0a3c 703e 4120 7363 6865 6d61 2074 7970 .

    A schema typ\n-00152e90: 6520 6469 7265 6374 6976 6520 6973 206f e directive is o\n-00152ea0: 6620 7468 6520 666f 726d 3a3c 2f70 3e0a f the form:

    .\n-00152eb0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n-00152ef0: 6773 6f61 7020 266c 743b 7072 6566 6978 gsoap <prefix\n-00152f00: 2667 743b 2073 6368 656d 6120 7479 7065 > schema type\n-00152f10: 2d26 6c74 3b70 726f 7065 7274 7926 6774 -<property>\n-00152f20: 3b3a 2026 6c74 3b6e 616d 6526 6774 3b20 ;: <name> \n-00152f30: 266c 743b 7661 6c75 6526 6774 3b3c 2f73 <value>
    .
    //gsoap <p\n-00152f80: 7265 6669 7826 6774 3b20 7363 6865 6d61 refix> schema\n-00152f90: 2074 7970 652d 266c 743b 7072 6f70 6572 type-<proper\n-00152fa0: 7479 2667 743b 3a20 266c 743b 6e61 6d65 ty>: <name\n-00152fb0: 2667 743b 3a3a 266c 743b 6d65 6d62 6572 >::<member\n-00152fc0: 2667 743b 2026 6c74 3b76 616c 7565 2667 > <value&g\n-00152fd0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-00152fe0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where \n-00153000: 3c63 6f64 653e 266c 743b 7072 6566 6978 <prefix\n-00153010: 2667 743b 3c2f 636f 6465 3e20 6973 2074 > is t\n-00153020: 6865 2058 4d4c 206e 616d 6573 7061 6365 he XML namespace\n-00153030: 2070 7265 6669 7820 6f66 2061 2073 6368 prefix of a sch\n-00153040: 656d 6120 616e 6420 3c63 6f64 653e 266c ema and &l\n-00153050: 743b 6e61 6d65 2667 743b 3c2f 636f 6465 t;name> is an unqualif\n-00153070: 6965 6420 6e61 6d65 206f 6620 6120 432f ied name of a C/\n-00153080: 432b 2b20 7479 7065 2c20 616e 6420 7468 C++ type, and th\n-00153090: 6520 6f70 7469 6f6e 616c 203c 636f 6465 e optional <member><\n-001530b0: 2f63 6f64 653e 2069 7320 6120 636c 6173 /code> is a clas\n-001530c0: 732f 7374 7275 6374 206d 656d 6265 7273 s/struct members\n-001530d0: 206f 7220 656e 756d 2063 6f6e 7374 616e or enum constan\n-001530e0: 742e 3c2f 703e 0a3c 703e 596f 7520 6361 t.

    .

    You ca\n-001530f0: 6e20 6465 7363 7269 6265 2061 2074 7970 n describe a typ\n-00153100: 6520 7769 7468 206f 6e65 206f 6620 7468 e with one of th\n-00153110: 6520 666f 6c6c 6f77 696e 673a 3c2f 703e e following:

    \n-00153120: 0a3c 7461 626c 6520 636c 6173 733d 226d .
    property \n-00152550: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 value \n-00152580: 2020 3c2f 7468 3e3c 2f74 723e 0a3c 7472
    alternate URI \n-001526d0: 7061 7474 6572 6e20 666f 7220 7468 6520 pattern for the \n-001526e0: 5853 4420 6e61 6d65 7370 6163 6520 2869 XSD namespace (i\n-001526f0: 2e65 2e20 5552 4920 6973 2061 6c73 6f20 .e. URI is also \n-00152700: 6163 6365 7074 6564 2062 7920 7468 6520 accepted by the \n-00152710: 584d 4c20 7061 7273 6572 2920 2020 203c XML parser) <\n-00152720: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    import\n-00152780: 2020 203c 2f74 643e 3c74 6420 636c 6173 URI of\n-001527b0: 2061 6e20 696d 706f 7274 6564 206e 616d an imported nam\n-001527c0: 6573 7061 6365 2c20 6173 2061 6e20 616c espace, as an al\n-001527d0: 7465 726e 6174 6976 6520 6f72 2069 6e20 ternative or in \n-001527e0: 6164 6469 7469 6f6e 2074 6f20 3c63 6f64 addition to namespace, adds x\n-00152810: 7364 3a69 6d70 6f72 743c 2f63 6f64 653e sd:import\n-00152820: 2074 6f20 7468 6520 6765 6e65 7261 7465 to the generate\n-00152830: 6420 5753 444c 2061 6e64 2058 5344 2066 d WSDL and XSD f\n-00152840: 696c 6573 2020 2020 3c2f 7464 3e3c 2f74 iles
    for\n-001528a0: 6d3c 2f63 6f64 653e 2020 203c 2f74 643e m unqualif\n-001528e0: 6965 643c 2f63 6f64 653e 2028 6465 6661 ied (defa\n-001528f0: 756c 7429 206f 7220 3c63 6f64 653e 7175 ult) or qu\n-00152900: 616c 6966 6965 643c 2f63 6f64 653e 206c alified l\n-00152910: 6f63 616c 2065 6c65 6d65 6e74 2061 6e64 ocal element and\n-00152920: 2061 7474 7269 6275 7465 2066 6f72 6d20 attribute form \n-00152930: 6465 6661 756c 7473 2020 2020 3c2f 7464 defaults
    \n-00152990: 656c 656d 656e 7446 6f72 6d3c 2f63 6f64 elementForm unqualified (default) o\n-001529f0: 7220 3c63 6f64 653e 7175 616c 6966 6965 r qualifie\n-00152a00: 643c 2f63 6f64 653e 206c 6f63 616c 2065 d local e\n-00152a10: 6c65 6d65 6e74 2066 6f72 6d20 6465 6661 lement form defa\n-00152a20: 756c 7420 2020 203c 2f74 643e 3c2f 7472 ult
    attr\n-00152a80: 6962 7574 6546 6f72 6d3c 2f63 6f64 653e ibuteForm\n-00152a90: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n-00152ac0: 756e 7175 616c 6966 6965 643c 2f63 6f64 unqualified (default) or \n-00152ae0: 3c63 6f64 653e 7175 616c 6966 6965 643c qualified<\n-00152af0: 2f63 6f64 653e 206c 6f63 616c 2061 7474 /code> local att\n-00152b00: 7269 6275 7465 2066 6f72 6d20 6465 6661 ribute form defa\n-00152b10: 756c 7420 2020 203c 2f74 643e 3c2f 7472 ult
    typed\n-00152b70: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    .<\n-00153140: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00153150: 776e 5461 626c 6548 6561 6422 3e0a 3c74 wnTableHead\">.\n-00153180: 7479 7065 2070 726f 7065 7274 7920 2020 type property \n-00153190: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 ..<\n-00153280: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....

    For examp\n-00153360: 6c65 2c20 796f 7520 6361 6e20 6164 6420 le, you can add \n-00153370: 6120 6465 7363 7269 7074 696f 6e20 746f a description to\n-00153380: 2061 6e20 656e 756d 6572 6174 696f 6e3a an enumeration:\n-00153390: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns sc\n-001533e0: 6865 6d61 2074 7970 653a 2056 6f77 656c hema type: Vowel\n-001533f0: 7320 5468 6520 6c65 7474 6572 7320 412c s The letters A,\n-00153400: 2045 2c20 492c 204f 2c20 552c 2061 6e64 E, I, O, U, and\n-00153410: 2073 6f6d 6574 696d 6573 2059 3c2f 7370 sometimes Y
    .
    //gsoap ns sch\n-00153460: 656d 6120 7479 7065 3a20 566f 7765 6c73 ema type: Vowels\n-00153470: 3a3a 5920 4120 766f 7765 6c2c 2073 6f6d ::Y A vowel, som\n-00153480: 6574 696d 6573 3c2f 7370 616e 3e3c 2f64 etimes.
    enum\n-001534c0: 2063 6c61 7373 3c2f 7370 616e 3e20 6e73 class ns\n-001534d0: 5f5f 566f 7765 6c73 203a 2063 6861 7220 __Vowels : char \n-001534e0: 7b20 4120 3d20 3c73 7061 6e20 636c 6173 { A = \n-00153500: 2623 3339 3b41 2623 3339 3b3c 2f73 7061 'A', E = 'E', I = 'I'<\n-00153570: 2f73 7061 6e3e 2c20 4f20 3d20 3c73 7061 /span>, O = 'O'\n-001535a0: 3b3c 2f73 7061 6e3e 2c20 5520 3d20 3c73 ;, U = 'U&#\n-001535d0: 3339 3b3c 2f73 7061 6e3e 2c20 5920 3d20 39;, Y = \n-001535e0: 3c73 7061 6e20 636c 6173 733d 2263 6861 'Y\n-00153600: 2623 3339 3b3c 2f73 7061 6e3e 207d 3b3c ' };<\n-00153610: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-00153630: 5468 6973 2064 6f63 756d 656e 7465 6420 This documented \n-00153640: 656e 756d 6572 6174 696f 6e20 6d61 7073 enumeration maps\n-00153650: 2074 6f20 6120 7369 6d70 6c65 5479 7065 to a simpleType\n-00153660: 2072 6573 7472 6963 7469 6f6e 206f 6620 restriction of \n-00153670: 3c65 6d3e 3c63 6f64 653e 7873 643a 7374 xsd:st\n-00153680: 7269 6e67 3c2f 636f 6465 3e3c 2f65 6d3e ring\n-00153690: 2069 6e20 7468 6520 736f 6170 6370 7032 in the soapcpp2\n-001536a0: 2d67 656e 6572 6174 6564 2073 6368 656d -generated schem\n-001536b0: 613a 3c2f 703e 0a3c 6469 7620 636c 6173 a:

    .
    <\n-001536e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001536f0: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><s\n-00153710: 696d 706c 6554 7970 653c 2f73 7061 6e3e impleType\n-00153720: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n-00153760: 7175 6f74 3b56 6f77 656c 7326 7175 6f74 quot;Vowels"\n-00153770: 3b3c 2f73 7061 6e3e 2667 743b 3c2f 6469 ;>.
    <annotation<\n-001537c0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n-001537d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <documentati\n-00153810: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 7370 on>The letters A, E, I, O, U, and someti\n-00153940: 6d65 733c 2f73 7061 6e3e 203c 7370 616e mes Y</document\n-00153990: 6174 696f 6e3c 2f73 7061 6e3e 2667 743b ation>\n-001539a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </\n-001539c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 annota\n-001539e0: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b3c tion><\n-001539f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <restrict\n-00153a30: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion base="x\n-00153a80: 7364 3a73 7472 696e 6726 7175 6f74 3b3c sd:string"<\n-00153a90: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n-00153aa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <enumeration\n-00153ae0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c va\n-00153b00: 6c75 653c 2f73 7061 6e3e 3d3c 7370 616e lue="A&q\n-00153b30: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n-00153b40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-00153b60: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;enume\n-00153b80: 7261 7469 6f6e 3c2f 7370 616e 3e20 3c73 ration value\n-00153bb0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-00153bd0: 6f74 3b45 2671 756f 743b 3c2f 7370 616e ot;E"/>
    . \n-00153c00: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <enumeration value<\n-00153c50: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="I"\n-00153c80: 3c2f 7370 616e 3e2f 2667 743b 3c2f 6469 />.
    <enumerati\n-00153cd0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-00153cf0: 7661 6c75 653c 2f73 7061 6e3e 3d3c 7370 value="O\n-00153d20: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n-00153d30: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    &\n-00153d50: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;enu\n-00153d70: 6d65 7261 7469 6f6e 3c2f 7370 616e 3e20 meration \n-00153d80: 3c73 7061 6e20 636c 6173 733d 226b 6579 value=&\n-00153dc0: 7175 6f74 3b55 2671 756f 743b 3c2f 7370 quot;U"/>
    .<\n-00153de0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00153df0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <enumeration valu\n-00153e40: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="Y&quo\n-00153e70: 743b 3c2f 7370 616e 3e26 6774 3b3c 2f64 t;>.
    <\n-00153ea0: 3c73 7061 6e20 636c 6173 733d 226b 6579 annota\n-00153ec0: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b3c tion><\n-00153ed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00153ef0: 266c 743b 3c73 7061 6e20 636c 6173 733d <do\n-00153f10: 6375 6d65 6e74 6174 696f 6e3c 2f73 7061 cumentation>A vowel\n-00153f60: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , s\n-00153f80: 6f6d 6574 696d 6573 3c2f 7370 616e 3e26 ometimes&\n-00153f90: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/do\n-00153fb0: 6375 6d65 6e74 6174 696f 6e3c 2f73 7061 cumentation>
    . \n-00153fe0: 2020 2020 2026 6c74 3b2f 3c73 7061 6e20 </annotation>
    .\n-00154020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <enumeration<\n-00154060: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>.
    </restriction\n-001540b0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    </simpleType>
    .<\n-00154110: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

    .Exa\n-00154190: 6d70 6c65 3c2f 6833 3e0a 3c70 3e54 6865 mple

    .

    The\n-001541a0: 2075 7365 206f 6620 6469 7265 6374 6976 use of directiv\n-001541b0: 6573 2069 7320 6265 7374 2069 6c6c 7573 es is best illus\n-001541c0: 7472 6174 6564 2077 6974 6820 616e 2065 trated with an e\n-001541d0: 7861 6d70 6c65 2e20 5468 6520 6578 616d xample. The exam\n-001541e0: 706c 6520 7573 6573 2061 2068 7970 6f74 ple uses a hypot\n-001541f0: 6865 7469 6361 6c20 7374 6f63 6b20 7175 hetical stock qu\n-00154200: 6f74 6520 7365 7276 6963 6520 616e 6420 ote service and \n-00154210: 6578 6368 616e 6765 2072 6174 6520 7365 exchange rate se\n-00154220: 7276 6963 652c 2061 6374 7561 6c20 7365 rvice, actual se\n-00154230: 7276 6963 6573 2073 7563 6820 6173 2074 rvices such as t\n-00154240: 6865 7365 2061 7265 2061 7661 696c 6162 hese are availab\n-00154250: 6c65 2066 6f72 2066 7265 6520 6f6e 2074 le for free on t\n-00154260: 6865 2077 6562 2e3c 2f70 3e0a 3c64 6976 he web.

    .
    //gsoa\n-001542b0: 7020 6e73 3120 7365 7276 6963 6520 6e61 p ns1 service na\n-001542c0: 6d65 7370 6163 653a 2020 7572 6e3a 4765 mespace: urn:Ge\n-001542d0: 7451 756f 7465 203c 2f73 7061 6e3e 3c2f tQuote .
    int ns1_\n-00154320: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(char \n-00154350: 2a73 796d 626f 6c2c 203c 7370 616e 2063 *symbol, float \n-00154380: 2661 6d70 3b72 6573 756c 7429 3b20 3c2f &result); .
    .<\n-001543b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001543c0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-001543e0: 7332 2073 6572 7669 6365 206e 616d 6573 s2 service names\n-001543f0: 7061 6365 3a20 2075 726e 3a43 7572 7265 pace: urn:Curre\n-00154400: 6e63 7945 7863 6861 6e67 6520 3c2f 7370 ncyExchange
    .
    int\n-00154450: 206e 7332 5f5f 6765 7452 6174 6528 3c73 ns2__getRate(char *country1, <\n-00154490: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001544a0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *country2, \n-001544c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n-001544e0: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu\n-001544f0: 6c74 293b 203c 2f64 6976 3e0a 3c64 6976 lt);
    . <\n-00154510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-00154540: 6773 6f61 7020 6e73 3320 7365 7276 6963 gsoap ns3 servic\n-00154550: 6520 6e61 6d65 3a20 2020 2020 2020 7175 e name: qu\n-00154560: 6f74 6578 203c 2f73 7061 6e3e 3c2f 6469 otex .
    //gso\n-001545a0: 6170 206e 7333 2073 6572 7669 6365 2073 ap ns3 service s\n-001545b0: 7479 6c65 3a20 2020 2020 2072 7063 203c tyle: rpc <\n-001545c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001545e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001545f0: 656e 7422 3e2f 2f67 736f 6170 206e 7333 ent\">//gsoap ns3\n-00154600: 2073 6572 7669 6365 2065 6e63 6f64 696e service encodin\n-00154610: 673a 2020 2065 6e63 6f64 6564 203c 2f73 g: encoded
    .
    //gsoap ns3 s\n-00154660: 6572 7669 6365 2070 6f72 743a 2020 2020 ervice port: \n-00154670: 2020 2068 7474 703a 2f2f 7777 772e 6d79 http://www.my\n-00154680: 646f 6d61 696e 2e63 6f6d 2f71 756f 7465 domain.com/quote\n-00154690: 782e 6367 6920 3c2f 7370 616e 3e3c 2f64 x.cgi .
    //gs\n-001546d0: 6f61 7020 6e73 3320 7365 7276 6963 6520 oap ns3 service \n-001546e0: 6e61 6d65 7370 6163 653a 2020 7572 6e3a namespace: urn:\n-001546f0: 7175 6f74 6578 203c 2f73 7061 6e3e 3c2f quotex .
    int ns3_\n-00154740: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(char \n-00154770: 2a73 796d 626f 6c2c 203c 7370 616e 2063 *symbol, char *\n-001547a0: 636f 756e 7472 792c 203c 7370 616e 2063 country, float \n-001547d0: 2661 6d70 3b72 6573 756c 7429 3b3c 2f64 &result);.

    Th\n-00154800: 6520 3c65 6d3e 3c63 6f64 653e 7175 6f74 e quot\n-00154810: 6578 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ex.h\n-00154820: 2065 7861 6d70 6c65 2069 7320 6120 6e65 example is a ne\n-00154830: 7720 5765 6220 5365 7276 6963 6520 6372 w Web Service cr\n-00154840: 6561 7465 6420 6279 2063 6f6d 6269 6e69 eated by combini\n-00154850: 6e67 2074 776f 2065 7869 7374 696e 6720 ng two existing \n-00154860: 5765 6220 5365 7276 6963 6573 3a20 6120 Web Services: a \n-00154870: 5374 6f63 6b20 5175 6f74 6520 7365 7276 Stock Quote serv\n-00154880: 6963 6520 616e 6420 6120 4375 7272 656e ice and a Curren\n-00154890: 6379 2045 7863 6861 6e67 6520 7365 7276 cy Exchange serv\n-001548a0: 6963 652e 3c2f 703e 0a3c 703e 5468 6520 ice.

    .

    The \n-001548b0: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n-001548c0: 203c 636f 6465 3e6e 7333 3c2f 636f 6465 ns3 is used for th\n-001548e0: 6520 6e65 7720 3c63 6f64 653e 7175 6f74 e new quot\n-001548f0: 6578 3c2f 636f 6465 3e20 5765 6220 5365 ex Web Se\n-00154900: 7276 6963 6520 7769 7468 206e 616d 6573 rvice with names\n-00154910: 7061 6365 2055 5249 203c 656d 3e3c 636f pace URI urn:quotex, servi\n-00154940: 6365 206e 616d 6520 3c63 6f64 653e 7175 ce name qu\n-00154950: 6f74 6578 3c2f 636f 6465 3e2c 2061 6e64 otex, and\n-00154960: 2065 6e64 706f 696e 7420 706f 7274 203c endpoint port <\n-00154970: 656d 3e3c 636f 6465 3e3c 6120 6872 6566 em>http://www\n-001549b0: 2e6d 7964 6f6d 6169 6e2e 636f 6d2f 7175 .mydomain.com/qu\n-001549c0: 6f74 6578 2e63 6769 3c2f 613e 3c2f 636f otex.cgi.

    .Since the new W\n-001549f0: 6562 2053 6572 7669 6365 2069 6e76 6f6b eb Service invok\n-00154a00: 6573 2074 6865 203c 636f 6465 3e6e 7331 es the ns1\n-00154a10: 5f5f 6765 7451 756f 7465 3c2f 636f 6465 __getQuote and ns2_\n-00154a30: 5f67 6574 5261 7465 3c2f 636f 6465 3e20 _getRate \n-00154a40: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-00154a50: 6e73 2c20 7468 6520 7365 7276 6963 6520 ns, the service \n-00154a60: 6e61 6d65 7370 6163 6573 2061 6e64 206f namespaces and o\n-00154a70: 7468 6572 2064 6574 6169 6c73 2073 7563 ther details suc\n-00154a80: 6820 6173 2073 7479 6c65 2061 6e64 2065 h as style and e\n-00154a90: 6e63 6f64 696e 6720 6f66 2074 6865 7365 ncoding of these\n-00154aa0: 206d 6574 686f 6473 2061 7265 2067 6976 methods are giv\n-00154ab0: 656e 2062 7920 6469 7265 6374 6976 6573 en by directives\n-00154ac0: 2e20 4166 7465 7220 696e 766f 6b69 6e67 . After invoking\n-00154ad0: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to\n-00154ae0: 6f6c 206f 6e20 7468 6520 3c65 6d3e 3c63 ol on the quotex.h header \n-00154b10: 6669 6c65 3a20 3c2f 703e 3c70 7265 2063 file:

    \n-00154b30: 2073 6f61 7063 7070 3220 7175 6f74 6578   soapcpp2 quotex\n-00154b40: 2e68 0a3c 2f70 7265 3e3c 703e 2074 6865  .h.

    the\n-00154b50: 2057 5344 4c20 6f66 2074 6865 206e 6577 WSDL of the new\n-00154b60: 203c 636f 6465 3e71 756f 7465 783c 2f63 quotex Web Service\n-00154b80: 2069 7320 7361 7665 6420 6173 203c 656d is saved as quotex.ws\n-00154ba0: 646c 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 dl. \n-00154bb0: 5369 6e63 6520 7468 6520 7365 7276 6963 Since the servic\n-00154bc0: 6520 6e61 6d65 2c20 656e 6470 6f69 6e74 e name, endpoint\n-00154bd0: 2070 6f72 742c 2061 6e64 206e 616d 6573 port, and names\n-00154be0: 7061 6365 2055 5249 2077 6572 6520 7072 pace URI were pr\n-00154bf0: 6f76 6964 6564 2069 6e20 7468 6520 6865 ovided in the he\n-00154c00: 6164 6572 2066 696c 652c 2074 6865 2067 ader file, the g\n-00154c10: 656e 6572 6174 6564 2057 5344 4c20 6669 enerated WSDL fi\n-00154c20: 6c65 2063 616e 2062 6520 7075 626c 6973 le can be publis\n-00154c30: 6865 6420 746f 6765 7468 6572 2077 6974 hed together wit\n-00154c40: 6820 7468 6520 636f 6d70 696c 6564 2057 h the compiled W\n-00154c50: 6562 2053 6572 7669 6365 2069 6e73 7461 eb Service insta\n-00154c60: 6c6c 6564 2061 7320 6120 4347 4920 6170 lled as a CGI ap\n-00154c70: 706c 6963 6174 696f 6e2e 3c2f 703e 0a3c plication.

    .<\n-00154c80: 703e 5468 6520 6e61 6d65 7370 6163 6520 p>The namespace \n-00154c90: 6d61 7070 696e 6720 7461 626c 6520 666f mapping table fo\n-00154ca0: 7220 7468 6520 3c65 6d3e 3c63 6f64 653e r the \n-00154cb0: 7175 6f74 6578 2e63 7070 3c2f 636f 6465 quotex.cpp Web Servi\n-00154cd0: 6365 2069 6d70 6c65 6d65 6e74 6174 696f ce implementatio\n-00154ce0: 6e20 6973 2073 6176 6564 2061 7320 3c65 n is saved as quotex.n\n-00154d00: 736d 6170 3c2f 636f 6465 3e3c 2f65 6d3e smap\n-00154d10: 2e20 5468 6973 2066 696c 6520 6361 6e20 . This file can \n-00154d20: 6265 2064 6972 6563 746c 7920 696e 636c be directly incl\n-00154d30: 7564 6564 2069 6e20 3c65 6d3e 3c63 6f64 uded in quotex.cpp instead\n-00154d60: 206f 6620 7370 6563 6966 6965 6420 6279 of specified by\n-00154d70: 2068 616e 6420 696e 2074 6865 2073 6f75 hand in the sou\n-00154d80: 7263 6520 6f66 203c 656d 3e3c 636f 6465 rce of quotex.cpp.

    .

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

    .Tra\n-00154e10: 6e73 6965 6e74 2064 6174 6120 7479 7065 nsient data type\n-00154e20: 733c 2f68 323e 0a3c 703e 5468 6572 6520 s

    .

    There \n-00154e30: 6172 6520 7369 7475 6174 696f 6e73 2077 are situations w\n-00154e40: 6865 6e20 6365 7274 6169 6e20 7479 7065 hen certain type\n-00154e50: 7320 6861 7665 2074 6f20 6265 2075 7365 s have to be use\n-00154e60: 6420 696e 2061 6e20 696e 7465 7266 6163 d in an interfac\n-00154e70: 6520 6865 6164 6572 2066 696c 652c 2062 e header file, b\n-00154e80: 7574 2074 6865 2074 7970 6573 2061 7265 ut the types are\n-00154e90: 206e 6f74 2073 6572 6961 6c69 7a61 626c not serializabl\n-00154ea0: 6520 616e 6420 7468 6572 6566 6f72 6520 e and therefore \n-00154eb0: 6861 7665 2074 6f20 6265 2022 696e 7669 have to be \"invi\n-00154ec0: 7369 626c 6522 2074 6f20 7468 6520 736f sible\" to the so\n-00154ed0: 6170 6370 7032 2074 6f6f 6c2e 2054 6865 apcpp2 tool. The\n-00154ee0: 7365 2074 7970 6573 2061 7265 2063 616c se types are cal\n-00154ef0: 6c65 6420 7472 616e 7369 656e 742e 3c2f led transient..

    This featu\n-00154f10: 7265 2069 7320 7573 6566 756c 2077 6865 re is useful whe\n-00154f20: 6e20 6120 6c69 6272 6172 7920 7479 7065 n a library type\n-00154f30: 2069 7320 7573 6564 2069 6e20 7468 6520 is used in the \n-00154f40: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n-00154f50: 2066 696c 6520 6173 2070 6172 7420 6f66 file as part of\n-00154f60: 2061 2073 7472 7563 7420 6f72 2063 6c61 a struct or cla\n-00154f70: 7373 2c20 666f 7220 6578 616d 706c 6520 ss, for example \n-00154f80: 7468 6520 3c63 6f64 653e 4649 4c45 3c2f the FILE type or std::ostream\n-00154fb0: 3c2f 636f 6465 3e20 7468 6174 2061 7265 that are\n-00154fc0: 2063 6c65 6172 6c79 206e 6f74 2073 6572 clearly not ser\n-00154fd0: 6961 6c69 7a61 626c 652e 2049 6620 7468 ializable. If th\n-00154fe0: 6573 6520 7479 7065 7320 6172 6520 696e ese types are in\n-00154ff0: 7472 6f64 7563 6564 2069 6e20 616e 2069 troduced in an i\n-00155000: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-00155010: 6669 6c65 2074 6865 6e20 7468 6573 6520 file then these \n-00155020: 7479 7065 7320 6d75 7374 2062 6520 6465 types must be de\n-00155030: 636c 6172 6564 2074 7261 6e73 6965 6e74 clared transient\n-00155040: 2e20 4f74 6865 7277 6973 652c 2073 6f61 . Otherwise, soa\n-00155050: 7063 7070 3220 7769 6c6c 2074 6872 6f77 pcpp2 will throw\n-00155060: 2061 6e20 6572 726f 722e 3c2f 703e 0a3c an error.

    .<\n-00155070: 703e 546f 2064 6563 6c61 7265 2061 2074 p>To declare a t\n-00155080: 7261 6e73 6965 6e74 2074 7970 6520 7573 ransient type us\n-00155090: 6520 3c63 6f64 653e 6578 7465 726e 3c2f e extern. For examp\n-001550b0: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

    .
    \n-001550e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 extern class \n-00155120: 3c2f 7370 616e 3e46 494c 453b 3c2f 6469 FILE;.

    Eve\n-00155150: 6e20 7468 6f75 6768 203c 636f 6465 3e46 n though F\n-00155160: 494c 453c 2f63 6f64 653e 2069 7320 6e6f ILE is no\n-00155170: 7420 6120 636c 6173 732c 2074 6869 7320 t a class, this \n-00155180: 6465 636c 6172 6174 696f 6e20 6d65 7265 declaration mere\n-00155190: 6c79 2069 6e74 726f 6475 6365 7320 7468 ly introduces th\n-001551a0: 6520 3c63 6f64 653e 4649 4c45 3c2f 636f e FILE type name wi\n-001551c0: 7468 6f75 7420 7370 6563 6966 7969 6e67 thout specifying\n-001551d0: 2069 7473 2064 6574 6169 6c73 2e3c 2f70 its details..

    In C we can\n-001551f0: 2073 7469 6c6c 2075 7365 2074 6865 2063 still use the c\n-00155200: 6c61 7373 206b 6579 776f 7264 2c20 6265 lass keyword, be\n-00155210: 6361 7573 6520 6e6f 2063 6f64 6520 6973 cause no code is\n-00155220: 2067 656e 6572 6174 6564 2062 7920 736f generated by so\n-00155230: 6170 6370 7032 2066 6f72 2074 6869 7320 apcpp2 for this \n-00155240: 7472 616e 7369 656e 7420 7479 7065 2e3c transient type.<\n-00155250: 2f70 3e0a 3c70 3e57 6520 6361 6e20 7468 /p>.

    We can th\n-00155260: 656e 2075 7365 2074 6869 7320 7479 7065 en use this type\n-00155270: 2065 6c73 6577 6865 7265 2c20 666f 7220 elsewhere, for \n-00155280: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    .
    struc\n-001552d0: 7420 3c2f 7370 616e 3e6e 735f 5f72 6563 t ns__rec\n-001552e0: 6f72 643c 2f64 6976 3e0a 3c64 6976 2063 ord
    .
    {.
    FILE *\n-00155320: 6664 3b3c 2f64 6976 3e0a 3c64 6976 2063 fd;
    .
    \n-00155340: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00155380: 723c 2f73 7061 6e3e 202a 6e61 6d65 3b3c r *name;<\n-00155390: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    \n-001553b0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Only \n-001553d0: 7468 6520 3c63 6f64 653e 6e61 6d65 3c2f the name member is \n-001553f0: 7365 7269 616c 697a 6564 206f 6620 3c63 serialized of ns__record.

    .

    An\n-00155420: 6f74 6865 7220 6578 616d 706c 653a 3c2f other example:.

    extern <\n-00155480: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00155490: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class std::ostream; \n-001554b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // std::os\n-001554d0: 7472 6561 6d20 6361 6e26 2333 393b 7420 tream can't \n-001554e0: 6265 2073 6572 6961 6c69 7a65 642c 2062 be serialized, b\n-001554f0: 7574 206e 6565 6420 746f 2062 6520 6465 ut need to be de\n-00155500: 636c 6172 6564 3c2f 7370 616e 3e3c 2f64 clared.
    clas\n-00155540: 7320 3c2f 7370 616e 3e6e 735f 5f6d 7943 s ns__myC\n-00155550: 6c61 7373 203c 2f64 6976 3e0a 3c64 6976 lass
    .{ \n-00155570: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
    .
    \n-001555b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 virtual \n-001555f0: 766f 6964 3c2f 7370 616e 3e20 7072 696e void prin\n-00155600: 7428 7374 643a 3a6f 7374 7265 616d 2026 t(std::ostream &\n-00155610: 616d 703b 7329 203c 7370 616e 2063 6c61 amp;s) con\n-00155630: 7374 3c2f 7370 616e 3e3b 203c 7370 616e st; // need ostream\n-00155660: 2068 6572 6520 3c2f 7370 616e 3e3c 2f64 here .
    ... //.
    };
    .<\n-001556d0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    In othe\n-001556f0: 7220 6361 7365 7320 7765 2064 6f20 7761 r cases we do wa\n-00155700: 6e74 2074 6f20 6465 636c 6172 6520 6120 nt to declare a \n-00155710: 7479 7065 2074 6861 7420 736f 6170 6370 type that soapcp\n-00155720: 7032 2073 686f 756c 6420 636f 7079 2069 p2 should copy i\n-00155730: 6e74 6f20 3c65 6d3e 3c63 6f64 653e 736f nto so\n-00155740: 6170 5374 7562 2e68 3c2f 636f 6465 3e3c apStub.h<\n-00155750: 2f65 6d3e 2066 6f72 2074 6865 2061 7070 /em> for the app\n-00155760: 6c69 6361 7469 6f6e 2073 6f75 7263 6520 lication source \n-00155770: 636f 6465 2c20 6275 7420 7768 6963 6820 code, but which \n-00155780: 7368 6f75 6c64 206e 6f74 2062 6520 7365 should not be se\n-00155790: 7269 616c 697a 6162 6c65 2e20 5765 2063 rializable. We c\n-001557a0: 616e 2075 7365 203c 636f 6465 3e65 7874 an use ext\n-001557b0: 6572 6e3c 2f63 6f64 653e 2066 6f72 2074 ern for t\n-001557c0: 6869 7320 6f72 2070 7574 2074 6865 2064 his or put the d\n-001557d0: 6563 6c61 7261 7469 6f6e 2069 6e20 3c63 eclaration in [ and\n-001557f0: 203c 636f 6465 3e5d 3c2f 636f 6465 3e20 ] \n-00155800: 6272 6163 6b65 7473 3a3c 2f70 3e0a 3c64 brackets:

    .
    [
    .<\n-00155840: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00155850: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > class <\n-00155870: 2f73 7061 6e3e 6e73 5f5f 6d79 4261 7365 /span>ns__myBase\n-00155880: 203c 7370 616e 2063 6c61 7373 3d22 636f // base c\n-001558a0: 6c61 7373 206e 6565 6420 6e6f 7420 6265 lass need not be\n-001558b0: 2073 6572 6961 6c69 7a61 626c 653c 2f73 serializable
    .
    {\n-001558e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n-00155900: 203c 7370 616e 2063 6c61 7373 3d22 636f // member\n-00155920: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-00155930: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00155940: 3e20 207d 3b20 3c2f 6469 763e 0a3c 6469 > };
    .]\n-00155960: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-00155990: 636c 6173 7320 3c2f 7370 616e 3e6e 735f class ns_\n-001559a0: 5f6d 7944 6572 6976 6564 203a 206e 735f _myDerived : ns_\n-001559b0: 5f6d 7942 6173 6520 3c2f 6469 763e 0a3c _myBase
    .<\n-001559c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001559d0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    ...\n-001559f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // member\n-00155a10: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-00155a20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00155a30: 3e7d 3b20 3c2f 6469 763e 0a3c 2f64 6976 >};
    .

    In this \n-00156050: 6578 616d 706c 652c 203c 636f 6465 3e6e example, n\n-00156060: 735f 5f6d 7943 6c61 7373 3c2f 636f 6465 s__myClass has three tran\n-00156080: 7369 656e 7420 6d65 6d62 6572 733a 203c sient members: <\n-00156090: 636f 6465 3e62 3c2f 636f 6465 3e2c 203c code>b, <\n-001560a0: 636f 6465 3e73 3c2f 636f 6465 3e2c 2061 code>s, a\n-001560b0: 6e64 203c 636f 6465 3e6e 3c2f 636f 6465 nd n which will not\n-001560d0: 2062 6520 7365 7269 616c 697a 6564 2e20 be serialized. \n-001560e0: 4d65 6d62 6572 203c 636f 6465 3e6e 3c2f Member n is transie\n-00156100: 6e74 2062 6563 6175 7365 2074 6865 2074 nt because the t\n-00156110: 7970 6520 6973 2064 6563 6c61 7265 6420 ype is declared \n-00156120: 7769 7468 696e 2061 2074 7261 6e73 6965 within a transie\n-00156130: 6e74 2062 6c6f 636b 2e20 506f 696e 7465 nt block. Pointe\n-00156140: 7273 2c20 7265 6665 7265 6e63 6573 2c20 rs, references, \n-00156150: 616e 6420 6172 7261 7973 206f 6620 7472 and arrays of tr\n-00156160: 616e 7369 656e 7420 7479 7065 7320 6172 ansient types ar\n-00156170: 6520 7472 616e 7369 656e 742e 2054 6865 e transient. The\n-00156180: 2073 696e 676c 6520 636c 6173 7320 6d65 single class me\n-00156190: 7468 6f64 2069 7320 656e 6361 7073 756c thod is encapsul\n-001561a0: 6174 6564 2077 6974 6869 6e20 3c63 6f64 ated within [ and <\n-001561c0: 636f 6465 3e5d 3c2f 636f 6465 3e20 746f code>] to\n-001561d0: 2070 7265 7665 6e74 2073 6f61 7063 7070 prevent soapcpp\n-001561e0: 3220 6672 6f6d 2063 7265 6174 696e 6720 2 from creating \n-001561f0: 7365 7269 616c 697a 6572 7320 666f 7220 serializers for \n-00156200: 7468 6520 3c63 6f64 653e 6368 6172 5b31 the char[1\n-00156210: 3032 345d 3c2f 636f 6465 3e20 7479 7065 024] type\n-00156220: 2e3c 2f70 3e0a 3c70 3e57 6520 616c 736f .

    .

    We also\n-00156230: 2075 7365 203c 636f 6465 3e5b 3c2f 636f use [ and ]<\n-00156250: 2f63 6f64 653e 2062 7261 636b 6574 7320 /code> brackets \n-00156260: 746f 2069 6e74 726f 6475 6365 2061 2074 to introduce a t\n-00156270: 7261 6e73 6965 6e74 2069 6e74 6567 6572 ransient integer\n-00156280: 2074 7970 6520 3c63 6f64 653e 7472 616e type tran\n-00156290: 7369 656e 7449 6e74 3c2f 636f 6465 3e20 sientInt \n-001562a0: 7573 696e 6720 6120 7479 7065 6465 662e using a typedef.\n-001562b0: 2057 6520 6361 6e6e 6f74 2075 7365 203c We cannot use <\n-001562c0: 636f 6465 3e65 7874 6572 6e3c 2f63 6f64 code>extern with ty\n-001562e0: 7065 6465 663c 2f63 6f64 653e 2062 6563 pedef bec\n-001562f0: 6175 7365 2074 6869 7320 636f 6e73 7472 ause this constr\n-00156300: 7563 7420 6973 2072 6573 6572 7665 6420 uct is reserved \n-00156310: 666f 7220 6375 7374 6f6d 2073 6572 6961 for custom seria\n-00156320: 6c69 7a65 7273 2e3c 2f70 3e0a 3c70 3ef0 lizers.

    .

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

    .Seria\n-00156390: 6c69 7a61 7469 6f6e 2022 6173 2069 7322 lization \"as is\"\n-001563a0: 206f 6620 766f 6c61 7469 6c65 2064 6174 of volatile dat\n-001563b0: 6120 7479 7065 733c 2f68 323e 0a3c 703e a types

    .

    \n-001563c0: 5479 7065 7320 6465 636c 6172 6564 203c Types declared <\n-001563d0: 636f 6465 3e76 6f6c 6174 696c 653c 2f63 code>volatile in an inter\n-001563f0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-00156400: 2061 7265 2073 6572 6961 6c69 7a61 626c are serializabl\n-00156410: 6520 6275 7420 6e6f 7420 636f 7069 6564 e but not copied\n-00156420: 2062 7920 736f 6170 6370 7032 2074 6f20 by soapcpp2 to \n-00156430: 3c65 6d3e 3c63 6f64 653e 736f 6170 5374 soapSt\n-00156440: 7562 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ub.h\n-00156450: 2e20 5468 6573 6520 7479 7065 7320 6172 . These types ar\n-00156460: 6520 7479 7069 6361 6c6c 7920 6c69 6272 e typically libr\n-00156470: 6172 7920 7479 7065 7320 7468 6174 2061 ary types that a\n-00156480: 7265 2069 6e63 6c75 6465 6420 696e 2074 re included in t\n-00156490: 6865 2073 6f75 7263 6520 636f 6465 2061 he source code a\n-001564a0: 6e64 2073 686f 756c 6420 6e6f 7420 6265 nd should not be\n-001564b0: 2072 6564 6566 696e 6564 2069 6e20 7468 redefined in th\n-001564c0: 6520 6170 706c 6963 6174 696f 6e20 736f e application so\n-001564d0: 7572 6365 2063 6f64 652e 2057 6520 7761 urce code. We wa\n-001564e0: 6e74 2074 6f20 7365 7269 616c 697a 6520 nt to serialize \n-001564f0: 7468 6573 6520 6c69 6272 6172 7920 7479 these library ty\n-00156500: 7065 7320 2261 7320 6973 2220 7769 7468 pes \"as is\" with\n-00156510: 6f75 7420 7265 6465 6669 6e69 6e67 2074 out redefining t\n-00156520: 6865 6d2e 3c2f 703e 0a3c 703e 436f 6e73 hem.

    .

    Cons\n-00156530: 6964 6572 2066 6f72 2065 7861 6d70 6c65 ider for example\n-00156540: 203c 636f 6465 3e73 7472 7563 7420 746d struct tm\n-00156550: 3c2f 636f 6465 3e2c 2064 6563 6c61 7265 , declare\n-00156560: 6420 696e 203c 656d 3e3c 636f 6465 3e74 d in t\n-00156570: 696d 652e 683c 2f63 6f64 653e 3c2f 656d ime.h. The structure\n-00156590: 206d 6179 2061 6374 7561 6c6c 7920 7661 may actually va\n-001565a0: 7279 2062 6574 7765 656e 2070 6c61 7466 ry between platf\n-001565b0: 6f72 6d73 2c20 6275 7420 7468 6520 3c63 orms, but the tm st\n-001565d0: 7275 6374 7572 6520 696e 636c 7564 6573 ructure includes\n-001565e0: 2061 7420 6c65 6173 7420 7468 6520 666f at least the fo\n-001565f0: 6c6c 6f77 696e 6720 6d65 6d62 6572 7320 llowing members \n-00156600: 6173 2064 6563 6c61 7265 6420 696e 2074 as declared in t\n-00156610: 6865 2066 6f6c 6c6f 7769 6e67 2069 6e74 he following int\n-00156620: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n-00156630: 6c65 2066 6f72 2073 6f61 7063 7070 323a le for soapcpp2:\n-00156640: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n-00156690: 2026 6c74 3b74 696d 652e 6826 6774 3b3c <time.h><\n-001566a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001566c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001566d0: 6f72 6422 3e76 6f6c 6174 696c 653c 2f73 ord\">volatile struc\n-00156700: 7420 3c2f 7370 616e 3e74 6d20 3c2f 6469 t tm .
    {
    . \n-00156740: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-00156760: 3c2f 7370 616e 3e20 746d 5f73 6563 3b20 tm_sec; \n-00156770: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00156790: 2073 6563 6f6e 6473 2028 3020 2d20 3630 seconds (0 - 60\n-001567a0: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    int tm\n-001567f0: 5f6d 696e 3b20 2020 2020 2020 2020 3c73 _min; /* minutes (\n-00156820: 3020 2d20 3539 2920 2a2f 3c2f 7370 616e 0 - 59) */
    .
    <\n-00156850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00156860: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int tm_hour; \n-00156880: 2020 2020 3c73 7061 6e20 636c 6173 733d /* hou\n-001568a0: 7273 2028 3020 2d20 3233 2920 2a2f 3c2f rs (0 - 23) */
    . \n-001568d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-001568f0: 3c2f 7370 616e 3e20 746d 5f6d 6461 793b tm_mday;\n-00156900: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00156920: 2064 6179 206f 6620 6d6f 6e74 6820 2831 day of month (1\n-00156930: 202d 2033 3129 202a 2f3c 2f73 7061 6e3e - 31) */\n-00156940: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int tm_mon; \n-00156990: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* mont\n-001569b0: 6820 6f66 2079 6561 7220 2830 202d 2031 h of year (0 - 1\n-001569c0: 3129 202a 2f3c 2f73 7061 6e3e 203c 2f64 1) */ .
    int t\n-00156a10: 6d5f 7965 6172 3b20 2020 2020 2020 203c m_year; <\n-00156a20: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00156a30: 656e 7422 3e2f 2a20 7965 6172 202d 2031 ent\">/* year - 1\n-00156a40: 3930 3020 2a2f 3c2f 7370 616e 3e20 3c2f 900 */ .
    int \n-00156a90: 746d 5f77 6461 793b 2020 2020 2020 2020 tm_wday; \n-00156aa0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* day of \n-00156ac0: 7765 656b 2028 5375 6e64 6179 203d 2030 week (Sunday = 0\n-00156ad0: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    int tm\n-00156b20: 5f79 6461 793b 2020 2020 2020 2020 3c73 _yday; /* day of ye\n-00156b50: 6172 2028 3020 2d20 3336 3529 202a 2f3c ar (0 - 365) */<\n-00156b60: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00156b80: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-00156ba0: 743c 2f73 7061 6e3e 2074 6d5f 6973 6473 t tm_isds\n-00156bb0: 743b 2020 2020 2020 203c 7370 616e 2063 t; /\n-00156bd0: 2a20 6973 2073 756d 6d65 7220 7469 6d65 * is summer time\n-00156be0: 2069 6e20 6566 6665 6374 3f20 2a2f 3c2f in effect? */
    . \n-00156c10: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-00156c30: 723c 2f73 7061 6e3e 202a 746d 5f7a 6f6e r *tm_zon\n-00156c40: 653b 2020 2020 2020 2020 3c73 7061 6e20 e; \n-00156c60: 2f2a 2061 6262 7265 7669 6174 696f 6e20 /* abbreviation \n-00156c70: 6f66 2074 696d 657a 6f6e 6520 6e61 6d65 of timezone name\n-00156c80: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    long tm\n-00156cd0: 5f67 6d74 6f66 663b 2020 2020 2020 3c73 _gmtoff; /* offset fr\n-00156d00: 6f6d 2055 5443 2069 6e20 7365 636f 6e64 om UTC in second\n-00156d10: 7320 2a2f 3c2f 7370 616e 3e20 3c2f 6469 s */ .
    };
    .

    By decla\n-00156d60: 7269 6e67 2073 7472 7563 7420 3c63 6f64 ring struct tm vola\n-00156d80: 7469 6c65 2c20 736f 6170 6370 7032 2064 tile, soapcpp2 d\n-00156d90: 6f65 7320 6e6f 7420 7265 6465 6669 6e65 oes not redefine\n-00156da0: 2069 7420 696e 2074 6865 206f 7574 7075 it in the outpu\n-00156db0: 7420 736f 7572 6365 2063 6f64 652e 2054 t source code. T\n-00156dc0: 6865 203c 636f 6465 3e23 696e 636c 7564 he #includ\n-00156dd0: 6520 266c 743b 7469 6d65 2e68 2667 743b e <time.h>\n-00156de0: 3c2f 636f 6465 3e20 6973 2063 6f70 6965 is copie\n-00156df0: 6420 746f 2074 6865 2073 6f75 7263 6520 d to the source \n-00156e00: 636f 6465 206f 7574 7075 742e 2057 6520 code output. We \n-00156e10: 6361 6e20 6e6f 7720 7365 7269 616c 697a can now serializ\n-00156e20: 6520 7468 6520 3c63 6f64 653e 746d 3c2f e the tm structure.\n-00156e40: 2054 6865 2066 6f6c 6c6f 7769 6e67 2065 The following e\n-00156e50: 7861 6d70 6c65 2073 6572 6961 6c69 7a65 xample serialize\n-00156e60: 7320 7468 6520 6c6f 6361 6c20 7469 6d65 s the local time\n-00156e70: 2073 746f 7265 6420 696e 2061 203c 636f stored in a tm str\n-00156e90: 7563 7475 7265 2074 6f20 7374 646f 7574 ucture to stdout\n-00156ea0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .\n-00156fc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    time_t T = ti\n-00156fe0: 6d65 284e 554c 4c29 3b20 3c2f 6469 763e me(NULL);
    \n-00156ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struct \n-00157020: 3c2f 7370 616e 3e74 6d20 2a74 203d 206c tm *t = l\n-00157030: 6f63 616c 7469 6d65 2826 616d 703b 5429 ocaltime(&T)\n-00157040: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_\n-00157060: 7772 6974 655f 746d 283c 6120 636c 6173 write_tm(\n-00157090: 736f 6170 3c2f 613e 2c20 7429 3b20 3c2f soap, t); .
    soap\n-00157110: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap); <\n-00157150: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

    It is \n-001572d0: 616c 736f 2070 6f73 7369 626c 6520 746f also possible to\n-001572e0: 2073 6572 6961 6c69 7a65 2074 6865 203c serialize the <\n-001572f0: 636f 6465 3e74 6d3c 2f63 6f64 653e 206d code>tm m\n-00157300: 656d 6265 7273 2061 7320 584d 4c20 6174 embers as XML at\n-00157310: 7472 6962 7574 6573 2062 7920 6465 636c tributes by decl\n-00157320: 6172 696e 6720 7468 6520 6d65 6d62 6572 aring the member\n-00157330: 7320 6173 2061 7474 7269 6275 7465 7320 s as attributes \n-00157340: 7769 7468 2074 6865 203c 636f 6465 3e40 with the @\n-00157350: 3c2f 636f 6465 3e20 7175 616c 6966 6965 qualifie\n-00157360: 722c 2073 6565 2053 6563 7469 6f6e 203c r, see Section <\n-00157370: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00157380: 663d 2269 6e64 6578 2e68 746d 6c23 6174 f=\"index.html#at\n-00157390: 7472 6962 7574 6573 223e 486f 7720 746f tributes\">How to\n-001573a0: 2064 6563 6c61 7265 2058 4d4c 2061 7474 declare XML att\n-001573b0: 7269 6275 7465 733c 2f61 3e20 2e3c 2f70 ributes ..

    If you want\n-001573d0: 2074 6f20 7072 6f64 7563 6520 6120 7363 to produce a sc\n-001573e0: 6865 6d61 2066 696c 652c 2073 6179 203c hema file, say <\n-001573f0: 656d 3e3c 636f 6465 3e74 696d 652e 7873 em>time.xs\n-00157400: 643c 2f63 6f64 653e 3c2f 656d 3e2c 2074 d, t\n-00157410: 6861 7420 6465 6669 6e65 7320 616e 2058 hat defines an X\n-00157420: 4d4c 2073 6368 656d 6120 616e 6420 6e61 ML schema and na\n-00157430: 6d65 7370 6163 6520 666f 7220 7468 6520 mespace for the \n-00157440: 3c63 6f64 653e 746d 3c2f 636f 6465 3e20 tm \n-00157450: 7374 7275 6374 2c20 796f 7520 6361 6e20 struct, you can \n-00157460: 6164 6420 6120 3c63 6f64 653e 7479 7065 add a type\n-00157470: 6465 663c 2f63 6f64 653e 2064 6563 6c61 def decla\n-00157480: 7261 7469 6f6e 2074 6f20 7468 6520 6865 ration to the he\n-00157490: 6164 6572 2066 696c 653a 3c2f 703e 0a3c ader file:

    .<\n-001574a0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-001574b0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #include <t\n-001574f0: 696d 652e 6826 6774 3b3c 2f73 7061 6e3e ime.h>\n-00157500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    v\n-00157530: 6f6c 6174 696c 653c 2f73 7061 6e3e 203c olatile <\n-00157540: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00157550: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct tm
    .{<\n-00157580: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n-001575a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // see abo\n-001575c0: 7665 3c2f 7370 616e 3e3c 2f64 6976 3e0a ve
    .\n-001575d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .
    typedef struct <\n-00157640: 2f73 7061 6e3e 746d 2074 696d 655f 5f73 /span>tm time__s\n-00157650: 7472 7563 745f 746d 3b3c 2f64 6976 3e0a truct_tm;
    .\n-00157660: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    or sim\n-00157680: 706c 7920 7573 6520 636f 6c6f 6e20 6e6f ply use colon no\n-00157690: 7461 7469 6f6e 2073 696e 6365 2077 6520 tation since we \n-001576a0: 6b65 6570 2074 6865 203c 636f 6465 3e74 keep the t\n-001576b0: 6d3c 2f63 6f64 653e 206e 616d 653a 3c2f m name:.

    #include &\n-00157710: 6c74 3b74 696d 652e 6826 6774 3b3c 2f73 lt;time.h>
    .
    volatile struct \n-00157780: 3c2f 7370 616e 3e74 696d 653a 746d 203c time:tm <\n-00157790: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001577b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-001577e0: 696e 743c 2f73 7061 6e3e 2074 6d5f 7365 int tm_se\n-001577f0: 633b 2020 2020 2020 2020 203c 7370 616e c; /* seconds (0 -\n-00157820: 2036 3029 202a 2f3c 2f73 7061 6e3e 203c 60) */ <\n-00157830: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n-00157870: 2074 6d5f 6d69 6e3b 2020 2020 2020 2020 tm_min; \n-00157880: 203c 7370 616e 2063 6c61 7373 3d22 636f /* minute\n-001578a0: 7320 2830 202d 2035 3929 202a 2f3c 2f73 s (0 - 59) */
    . \n-001578d0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-001578f0: 2f73 7061 6e3e 2074 6d5f 686f 7572 3b20 /span> tm_hour; \n-00157900: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n-00157920: 686f 7572 7320 2830 202d 2032 3329 202a hours (0 - 23) *\n-00157930: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00157940: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00157970: 696e 743c 2f73 7061 6e3e 2074 6d5f 6d64 int tm_md\n-00157980: 6179 3b20 2020 2020 2020 203c 7370 616e ay; /* day of month\n-001579b0: 2028 3120 2d20 3331 2920 2a2f 3c2f 7370 (1 - 31) */
    .
    \n-001579e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_mon; \n-00157a10: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* m\n-00157a30: 6f6e 7468 206f 6620 7965 6172 2028 3020 onth of year (0 \n-00157a40: 2d20 3131 2920 2a2f 3c2f 7370 616e 3e20 - 11) */ \n-00157a50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int tm_year; \n-00157aa0: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* year \n-00157ac0: 2d20 3139 3030 202a 2f3c 2f73 7061 6e3e - 1900 */\n-00157ad0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int tm_wday; \n-00157b20: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* day \n-00157b40: 6f66 2077 6565 6b20 2853 756e 6461 7920 of week (Sunday \n-00157b50: 3d20 3029 202a 2f3c 2f73 7061 6e3e 203c = 0) */ <\n-00157b60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n-00157ba0: 2074 6d5f 7964 6179 3b20 2020 2020 2020 tm_yday; \n-00157bb0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* day of\n-00157bd0: 2079 6561 7220 2830 202d 2033 3635 2920 year (0 - 365) \n-00157be0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00157bf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_i\n-00157c30: 7364 7374 3b20 2020 2020 2020 3c73 7061 sdst; /* is summer t\n-00157c60: 696d 6520 696e 2065 6666 6563 743f 202a ime in effect? *\n-00157c70: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00157c80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00157cb0: 6368 6172 3c2f 7370 616e 3e20 2a74 6d5f char *tm_\n-00157cc0: 7a6f 6e65 3b20 2020 2020 203c 7370 616e zone; /* abbreviation\n-00157cf0: 206f 6620 7469 6d65 7a6f 6e65 206e 616d of timezone nam\n-00157d00: 6520 2a2f 3c2f 7370 616e 3e20 3c2f 6469 e */ .
    long t\n-00157d50: 6d5f 676d 746f 6666 3b20 2020 2020 3c73 m_gmtoff; /* offset fr\n-00157d80: 6f6d 2055 5443 2069 6e20 7365 636f 6e64 om UTC in second\n-00157d90: 7320 2a2f 3c2f 7370 616e 3e20 3c2f 6469 s */ .
    };
    .

    We used \n-00157de0: 7468 6520 7479 7065 6465 6620 6e61 6d65 the typedef name\n-00157df0: 203c 636f 6465 3e74 696d 655f 5f73 7472 time__str\n-00157e00: 7563 745f 746d 3c2f 636f 6465 3e20 7261 uct_tm ra\n-00157e10: 7468 6572 2074 6861 6e20 3c63 6f64 653e ther than \n-00157e20: 7469 6d65 5f5f 746d 3c2f 636f 6465 3e2c time__tm,\n-00157e30: 2062 6563 6175 7365 2061 2073 6368 656d because a schem\n-00157e40: 6120 6e61 6d65 2063 6c61 7368 2077 696c a name clash wil\n-00157e50: 6c20 6f63 6375 7220 666f 7220 7468 6520 l occur for the \n-00157e60: 6669 7273 7420 6578 616d 706c 6520 6162 first example ab\n-00157e70: 6f76 6520 7468 6174 2068 6173 203c 636f ove that has tm alr\n-00157e90: 6561 6479 2064 6563 6c61 7265 6420 6173 eady declared as\n-00157ea0: 2073 6572 6961 6c69 7a61 626c 6520 7479 serializable ty\n-00157eb0: 7065 2069 6e20 7468 6520 7363 6865 6d61 pe in the schema\n-00157ec0: 206f 6620 7468 6520 6765 6e65 7261 7465 of the generate\n-00157ed0: 6420 5753 444c 2e20 5468 6520 7365 636f d WSDL. The seco\n-00157ee0: 6e64 2065 7861 6d70 6c65 2077 6974 6820 nd example with \n-00157ef0: 7468 6520 636f 6c6f 6e20 6e6f 7461 7469 the colon notati\n-00157f00: 6f6e 2061 766f 6964 7320 7468 6973 2061 on avoids this a\n-00157f10: 6c74 6f67 6574 6865 722e 3c2f 703e 0a3c ltogether.

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

    .

    .How \n-00157f80: 746f 2064 6563 6c61 7265 2063 7573 746f to declare custo\n-00157f90: 6d20 7365 7269 616c 697a 6572 7320 616e m serializers an\n-00157fa0: 6420 6465 7365 7269 616c 697a 6572 733c d deserializers<\n-00157fb0: 2f68 323e 0a3c 703e 596f 7520 6361 6e20 /h2>.

    You can \n-00157fc0: 696d 706c 656d 656e 7420 796f 7572 206f implement your o\n-00157fd0: 776e 2063 7573 746f 6d20 7365 7269 616c wn custom serial\n-00157fe0: 697a 6572 7320 666f 7220 6461 7461 2074 izers for data t\n-00157ff0: 7970 6573 2e20 4120 6375 7374 6f6d 2073 ypes. A custom s\n-00158000: 6572 6961 6c69 7a65 7220 6973 2064 6563 erializer is dec\n-00158010: 6c61 7265 6420 696e 2061 6e20 696e 7465 lared in an inte\n-00158020: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-00158030: 6520 666f 7220 736f 6170 6370 7032 2075 e for soapcpp2 u\n-00158040: 7369 6e67 2074 6865 2070 6169 7220 6f66 sing the pair of\n-00158050: 206b 6579 776f 7264 7320 3c63 6f64 653e keywords \n-00158060: 6578 7465 726e 2074 7970 6564 6566 3c2f extern typedef. For examp\n-00158080: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

    .
    \n-001580b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 extern typede\n-001580f0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f char *\n-00158120: 4d79 4461 7461 3b20 3c2f 6469 763e 0a3c MyData;
    .<\n-00158130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00158140: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct Sample .
    {
    . \n-001581a0: 2020 204d 7944 6174 6120 733b 203c 7370 MyData s; // use custom\n-001581d0: 2073 6572 6961 6c69 7a65 7220 666f 7220 serializer for \n-001581e0: 7468 6973 206d 656d 6265 7220 3c2f 7370 this member

    .
    \n-00158210: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *t; // use auto-gen\n-00158260: 6572 6174 6564 2073 6572 6961 6c69 7a65 erated serialize\n-00158270: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n-00158280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00158290: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    \n-001582a0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The fu\n-00158860: 6e63 7469 6f6e 2070 726f 746f 7479 7065 nction prototype\n-00158870: 7320 6f66 2074 6865 7365 2066 756e 6374 s of these funct\n-00158880: 696f 6e73 2063 616e 2062 6520 666f 756e ions can be foun\n-00158890: 6420 696e 2074 6865 2073 6f61 7063 7070 d in the soapcpp\n-001588a0: 322d 6765 6e65 7261 7465 6420 3c65 6d3e 2-generated \n-001588b0: 3c63 6f64 653e 736f 6170 482e 683c 2f63 soapH.h file.<\n-001588d0: 2f70 3e0a 3c70 3e46 6f72 2065 7861 6d70 /p>.

    For examp\n-001588e0: 6c65 2c20 7468 6520 7365 7269 616c 697a le, the serializ\n-001588f0: 6174 696f 6e20 6f66 203c 636f 6465 3e4d ation of M\n-00158900: 7944 6174 613c 2f63 6f64 653e 2063 616e yData can\n-00158910: 2062 6520 646f 6e65 2077 6974 6820 7468 be done with th\n-00158920: 6520 666f 6c6c 6f77 696e 6720 636f 6465 e following code\n-00158930: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int soap_serializ\n-00158990: 655f 4d79 4461 7461 283c 7370 616e 2063 e_MyData(s\n-001589b0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, M\n-00158a20: 7944 6174 6120 3c73 7061 6e20 636c 6173 yData cons\n-00158a40: 743c 2f73 7061 6e3e 2a61 2920 3c2f 6469 t*a) .
    {
    . \n-00158a80: 203c 7370 616e 2063 6c61 7373 3d22 636f // no nee\n-00158aa0: 6420 746f 206d 6172 6b20 7468 6973 206e d to mark this n\n-00158ab0: 6f64 6520 2866 6f72 206d 756c 7469 2d72 ode (for multi-r\n-00158ac0: 6566 2061 6e64 2063 7963 6c65 2064 6574 ef and cycle det\n-00158ad0: 6563 7469 6f6e 2920 3c2f 7370 616e 3e3c ection) <\n-00158ae0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    }..
    {
    \n-00158ca0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    *a = NULL;<\n-00158cc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n-00158ce0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-00158d10: 3c2f 7370 616e 3e20 736f 6170 5f6f 7574 soap_out\n-00158d20: 5f4d 7944 6174 6128 3c73 7061 6e20 636c _MyData(st\n-00158d40: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n-00158dd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00158df0: 2f73 7061 6e3e 202a 7461 672c 203c 7370 /span> *tag, int id, MyData const\n-00158e70: 2a61 2c20 3c73 7061 6e20 636c 6173 733d *a, const<\n-00158e90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty\n-00158ec0: 7065 2920 3c2f 6469 763e 0a3c 6469 7620 pe)
    .
    {.
    if (so\n-00158f20: 6170 5f65 6c65 6d65 6e74 5f62 6567 696e ap_element_begin\n-00158f30: 5f6f 7574 283c 6120 636c 6173 733d 2263 _out(soap\n-00158f60: 3c2f 613e 2c20 7461 672c 203c 7370 616e , tag, id, \n-00158f90: 7479 7065 2920 3c73 7061 6e20 636c 6173 type) // p\n-00158fb0: 7269 6e74 2058 4d4c 2062 6567 696e 6e69 rint XML beginni\n-00158fc0: 6e67 2074 6167 203c 2f73 7061 6e3e 3c2f ng tag .
    || soa\n-00159040: 705f 7365 6e64 3c2f 613e 283c 6120 636c p_send(soap, *a) \n-00159080: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // just pr\n-001590a0: 696e 7420 7468 6520 7374 7269 6e67 2028 int the string (\n-001590b0: 6e6f 2058 4d4c 2063 6f6e 7665 7273 696f no XML conversio\n-001590c0: 6e29 203c 2f73 7061 6e3e 3c2f 6469 763e n)
    \n-001590d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    || soap_el\n-001590f0: 656d 656e 745f 656e 645f 6f75 7428 3c61 ement_end_out(soap, t\n-00159130: 6167 2929 203c 7370 616e 2063 6c61 7373 ag)) // pr\n-00159150: 696e 7420 584d 4c20 656e 6469 6e67 2074 int XML ending t\n-00159160: 6167 203c 2f73 7061 6e3e 3c2f 6469 763e ag
    \n-00159170: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return <\n-001591b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001591c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001591d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-001591e0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-00159230: 723c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 r;
    .\n-00159250: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-00159270: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-001592d0: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK; .
    }
    .M\n-00159310: 7944 6174 6120 2a2a 736f 6170 5f69 6e5f yData **soap_in_\n-00159320: 4d79 4461 7461 283c 7370 616e 2063 6c61 MyData(str\n-00159340: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n-001593d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tag, MyDa\n-00159400: 7461 202a 612c 203c 7370 616e 2063 6c61 ta *a, con\n-00159420: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n-00159450: 2a74 7970 6529 203c 2f64 6976 3e0a 3c64 *type)
    .\n-00159470: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n-001594b0: 2873 6f61 705f 656c 656d 656e 745f 6265 (soap_element_be\n-001594c0: 6769 6e5f 696e 283c 6120 636c 6173 733d gin_in(so\n-001594f0: 6170 3c2f 613e 2c20 7461 6729 2920 3c2f ap, tag)) .
    return NULL;
    .\n-00159550: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-00159580: 3c2f 7370 616e 3e20 2821 6129 203c 2f64 (!a) .
    a = (M\n-001595b0: 7944 6174 612a 293c 6120 636c 6173 733d yData*)soap\n-00159610: 5f6d 616c 6c6f 633c 2f61 3e28 3c61 2063 _malloc(soap, sizeof\n-00159670: 284d 7944 6174 6129 293b 203c 2f64 6976 (MyData)); .
    \n-001596b0: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap-><\n-001596f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00159700: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00159710: 6874 6d6c 2361 6464 6630 3939 6363 6365 html#addf099ccce\n-00159720: 3736 3463 6633 3866 3936 6265 3330 3562 764cf38f96be305b\n-00159730: 3434 3430 3661 223e 6e75 6c6c 3c2f 613e 44406a\">null\n-00159740: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    *\n-00159760: 6120 3d20 4e55 4c4c 3b20 3c73 7061 6e20 a = NULL; \n-00159780: 2f2f 2078 7369 3a6e 696c 2065 6c65 6d65 // xsi:nil eleme\n-00159790: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    \n-001597a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001597d0: 663c 2f73 7061 6e3e 2028 2a3c 6120 636c f (*soap->t\n-00159810: 7970 6520 2661 6d70 3b26 616d 703b 203c ype && <\n-00159820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00159830: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00159840: 705f 5f6d 6973 632e 6874 6d6c 2367 6139 p__misc.html#ga9\n-00159850: 3161 3335 6432 6636 3765 6565 6138 6463 1a35d2f67eeea8dc\n-00159860: 3331 6664 3233 6133 6365 6136 3564 3422 31fd23a3cea65d4\"\n-00159870: 3e73 6f61 705f 6d61 7463 685f 7461 673c >soap_match_tag<\n-00159880: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001598b0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap\n-001598e0: 3c2f 613e 2d26 6774 3b74 7970 652c 2074 ->type, t\n-001598f0: 7970 6529 2920 3c2f 6469 763e 0a3c 6469 ype))
    . \n-00159910: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n-00159930: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00159940: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00159950: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00159960: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-001599b0: 723c 2f61 3e20 3d20 3c61 2063 6c61 7373 r = SOAP\n-00159a10: 5f54 5950 453c 2f61 3e3b 203c 2f64 6976 _TYPE; .
    return \n-00159a60: 4e55 4c4c 3b20 3c73 7061 6e20 636c 6173 NULL; // t\n-00159a80: 7970 6520 6d69 736d 6174 6368 203c 2f73 ype mismatch
    .
    }\n-00159ab0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n-00159af0: 282a 3c61 2063 6c61 7373 3d22 636f 6465 (*soap->href) .
    a = (My\n-00159b50: 4461 7461 2a2a 2973 6f61 705f 6964 5f66 Data**)soap_id_f\n-00159b60: 6f72 7761 7264 283c 6120 636c 6173 733d orward(so\n-00159b90: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, s\n-00159bc0: 6f61 703c 2f61 3e2d 2667 743b 6872 6566 oap->href\n-00159bd0: 2c20 612c 2030 2c20 534f 4150 5f54 5950 , a, 0, SOAP_TYP\n-00159be0: 455f 4d79 4461 7461 2c20 302c 203c 7370 E_MyData, 0, sizeof\n-00159c10: 284d 7944 6174 6129 2c20 302c 204e 554c (MyData), 0, NUL\n-00159c20: 4c2c 204e 554c 4c29 203c 2f64 6976 3e0a L, NULL)
    .\n-00159c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n-00159c60: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se if (<\n-00159c90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00159ca0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00159cb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00159cc0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;body\n-00159d10: 3c2f 613e 2920 3c2f 6469 763e 0a3c 6469 )
    . \n-00159d30: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n-00159d50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00159d60: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *s = soap_v\n-00159d80: 616c 7565 283c 6120 636c 6173 733d 2263 alue(soap\n-00159db0: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n-00159dd0: 6669 6c6c 2062 7566 6665 7220 3c2f 7370 fill buffer
    .
    \n-00159e00: 2a61 203d 2028 3c73 7061 6e20 636c 6173 *a = (\n-00159e20: 6368 6172 3c2f 7370 616e 3e2a 293c 6120 char*)soap_malloc(soap, strlen(s)+1);\n-00159ed0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    st\n-00159ef0: 7263 7079 282a 612c 2073 293b 203c 2f64 rcpy(*a, s); .
    }
    \n-00159f20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-00159f50: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->body \n-00159fe0: 2661 6d70 3b26 616d 703b 2073 6f61 705f && soap_\n-00159ff0: 656c 656d 656e 745f 656e 645f 696e 283c element_end_in(<\n-0015a000: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0015a010: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0015a020: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0015a030: 7461 6729 2920 3c2f 6469 763e 0a3c 6469 tag))
    . \n-0015a050: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n-0015a070: 7572 6e3c 2f73 7061 6e3e 204e 554c 4c3b urn NULL;\n-0015a080: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return a;
    .\n-0015a0e0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    \n-0015a150: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_TYPE\n-0015a1a0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    #d\n-0015a1c0: 6566 696e 6520 534f 4150 5f54 5950 453c efine SOAP_TYPE<\n-0015a1d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    A soap_s\n-0015a1f0: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code\n-0015a200: 3a20 584d 4c20 656c 656d 656e 7420 6f72 : XML element or\n-0015a210: 2061 7474 7269 6275 7465 2068 6173 2061 attribute has a\n-0015a220: 206d 6973 6d61 7463 6869 6e67 2074 7970 mismatching typ\n-0015a230: 6520 6f72 2076 616c 7565 2074 6861 7420 e or value that \n-0015a240: 6973 2063 6175 7369 6e67 2061 202e 2e2e is causing a ...\n-0015a250: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0015a270: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0015a280: 6f61 7032 2e68 3a32 3630 373c 2f64 6976 oap2.h:2607
    .
    s\n-0015a340: 6f61 705f 7365 6e64 3c2f 613e 3c2f 6469 oap_send
    int soap_s\n-0015a370: 656e 6428 7374 7275 6374 2073 6f61 7020 end(struct soap \n-0015a380: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n-0015a390: 7220 2a73 293c 2f64 6976 3e3c 6469 7620 r *s)
    Se\n-0015a3b0: 6e64 2061 2073 7472 696e 672e 3c2f 6469 nd a string.
    .
    <\n-0015a430: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-0015a440: 726f 7570 5f5f 6d69 7363 2e68 746d 6c23 roup__misc.html#\n-0015a450: 6761 3931 6133 3564 3266 3637 6565 6561 ga91a35d2f67eeea\n-0015a460: 3864 6333 3166 6432 3361 3363 6561 3635 8dc31fd23a3cea65\n-0015a470: 6434 223e 736f 6170 5f6d 6174 6368 5f74 d4\">soap_match_t\n-0015a480: 6167 3c2f 613e 3c2f 6469 763e 3c64 6976 ag
    \n-0015a4a0: 696e 7420 736f 6170 5f6d 6174 6368 5f74 int soap_match_t\n-0015a4b0: 6167 2873 7472 7563 7420 736f 6170 202a ag(struct soap *\n-0015a4c0: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-0015a4d0: 202a 7461 6731 2c20 636f 6e73 7420 6368 *tag1, const ch\n-0015a4e0: 6172 202a 7461 6732 293c 2f64 6976 3e3c ar *tag2)
    <\n-0015a4f0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0015a500: 223e 4d61 7463 6820 616e 2058 4d4c 2074 \">Match an XML t\n-0015a510: 6167 206e 616d 652e 3c2f 6469 763e 3c2f ag name.
    .
    so\n-0015a5c0: 6170 3a3a 626f 6479 3c2f 613e 3c2f 6469 ap::body
    short body\n-0015a5f0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    The soa\n-0015a610: 703a 3a62 6f64 7920 666c 6167 2069 7320 p::body flag is \n-0015a620: 7365 7420 7768 656e 2061 6e20 656c 656d set when an elem\n-0015a630: 656e 7420 6861 7320 656c 656d 656e 7420 ent has element \n-0015a640: 636f 6e74 656e 7420 6475 7269 6e67 2058 content during X\n-0015a650: 4d4c 2070 6172 7369 6e67 206f 7220 7768 ML parsing or wh\n-0015a660: 656e 2061 2048 5454 5020 6d65 7373 2e2e en a HTTP mess..\n-0015a670: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-0015a690: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0015a6a0: 736f 6170 322e 683a 3239 3635 3c2f 6469 soap2.h:2965
    .
    soap::null\n-0015a760: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    short \n-0015a780: 6e75 6c6c 3c2f 6469 763e 3c64 6976 2063 null
    The\n-0015a7a0: 2073 6f61 703a 3a6e 756c 6c20 666c 6167 soap::null flag\n-0015a7b0: 2069 7320 7365 7420 7768 656e 2061 6e20 is set when an \n-0015a7c0: 656c 656d 656e 7420 6361 7272 6965 7320 element carries \n-0015a7d0: 6120 7873 693a 6e69 6c20 6174 7472 6962 a xsi:nil attrib\n-0015a7e0: 7574 6520 7468 6174 2069 7320 7472 7565 ute that is true\n-0015a7f0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-0015a810: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0015a820: 736f 6170 322e 683a 3239 3633 3c2f 6469 soap2.h:2963
    .
    <\n-0015a840: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0015a850: 3c70 3e4d 6f72 6520 696e 666f 726d 6174

    More informat\n-0015a860: 696f 6e20 6f6e 2063 7573 746f 6d20 7365 ion on custom se\n-0015a870: 7269 616c 697a 6174 696f 6e20 6973 2061 rialization is a\n-0015a880: 7661 696c 6162 6c65 2069 6e20 7468 6520 vailable in the \n-0015a890: 6753 4f41 5020 736f 7572 6365 2063 6f64 gSOAP source cod\n-0015a8a0: 6520 7061 636b 6167 6520 696e 2074 6865 e package in the\n-0015a8b0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-0015a8c0: 2f63 7573 746f 6d3c 2f63 6f64 653e 3c2f /custom directory, w\n-0015a8e0: 6865 7265 2079 6f75 2063 616e 2061 6c73 here you can als\n-0015a8f0: 6f20 6669 6e64 2073 6576 6572 616c 2063 o find several c\n-0015a900: 7573 746f 6d20 7365 7269 616c 697a 6572 ustom serializer\n-0015a910: 7320 746f 2075 7365 2077 6974 6820 796f s to use with yo\n-0015a920: 7572 2070 726f 6a65 6374 732e 3c2f 703e ur projects.

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

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

    .

    .\n-0015a990: 4675 6e63 7469 6f6e 2063 616c 6c62 6163 Function callbac\n-0015a9a0: 6b73 2066 6f72 2063 7573 746f 6d69 7a65 ks for customize\n-0015a9b0: 6420 492f 4f20 616e 6420 4854 5450 2068 d I/O and HTTP h\n-0015a9c0: 616e 646c 696e 673c 2f68 323e 0a3c 703e andling

    .

    \n-0015a9d0: 5468 6520 666f 6c6c 6f77 696e 6720 6c69 The following li\n-0015a9e0: 7374 206f 6620 6675 6e63 7469 6f6e 7320 st of functions \n-0015a9f0: 6361 6e20 6265 2075 7365 6420 666f 7220 can be used for \n-0015aa00: 6375 7374 6f6d 697a 6564 2048 5454 5020 customized HTTP \n-0015aa10: 6861 6e64 6c69 6e67 2061 6e64 2049 2f4f handling and I/O\n-0015aa20: 2e3c 2f70 3e0a 3c70 3e53 6565 2061 6c73 .

    .

    See als\n-0015aa30: 6f20 4150 4920 646f 6375 6d65 6e74 6174 o API documentat\n-0015aa40: 696f 6e20 4d6f 6475 6c65 203c 6120 636c ion Module Cal\n-0015aa80: 6c62 6163 6b20 6675 6e63 7469 6f6e 733c lback functions<\n-0015aa90: 2f61 3e2e 3c2f 703e 0a3c 703e 546f 2072 /a>.

    .

    To r\n-0015aaa0: 6573 6574 2074 6865 2063 616c 6c62 6163 eset the callbac\n-0015aab0: 6b20 6675 6e63 7469 6f6e 7320 746f 2074 k functions to t\n-0015aac0: 6865 2069 6e74 6572 6e61 6c20 6675 6e63 he internal func\n-0015aad0: 7469 6f6e 7320 6f66 2074 6865 2065 6e67 tions of the eng\n-0015aae0: 696e 652c 2075 7365 203c 636f 6465 3e3c ine, use <\n-0015aaf0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015ab00: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015ab10: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-0015ab20: 3238 6565 3866 6463 6635 3030 3434 3365 28ee8fdcf500443e\n-0015ab30: 3065 3531 3735 3033 3234 6161 3661 3161 0e51750324aa6a1a\n-0015ab40: 2220 7469 746c 653d 2246 696e 616c 697a \" title=\"Finaliz\n-0015ab50: 6520 7468 6520 6769 7665 6e20 736f 6170 e the given soap\n-0015ab60: 2063 6f6e 7465 7874 2c20 692e 652e 2077 context, i.e. w\n-0015ab70: 6865 6e20 7468 6520 736f 6170 2063 6f6e hen the soap con\n-0015ab80: 7465 7874 2069 7320 7374 6163 6b20 616c text is stack al\n-0015ab90: 6c6f 6361 7465 642c 2061 7574 6f6d 6174 located, automat\n-0015aba0: 6963 616c 6c79 2069 6e76 6f6b 6564 2e2e ically invoked..\n-0015abb0: 2e22 3e73 6f61 705f 646f 6e65 3c2f 613e .\">soap_done\n-0015abc0: 3c2f 636f 6465 3e20 666f 6c6c 6f77 6564 followed\n-0015abd0: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by \n-0015ac60: 736f 6170 5f69 6e69 743c 2f61 3e3c 2f63 soap_init. This re-in\n-0015ac80: 6974 6961 6c69 7a65 7320 7468 6520 3c63 itializes the \n-0015ace0: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n-0015acf0: 636f 6e74 6578 742c 2072 656d 6f76 6573 context, removes\n-0015ad00: 2061 6c6c 2070 6c75 6769 6e73 2c20 616e all plugins, an\n-0015ad10: 6420 7265 7365 7473 2066 756e 6374 696f d resets functio\n-0015ad20: 6e20 6361 6c6c 6261 636b 732e 3c2f 703e n callbacks.

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

    .fp\n-0015ad60: 6f73 743c 2f68 333e 0a3c 703e 3c63 6f64 ost

    .

    int (soap::f\n-0015ae40: 706f 7374 3c2f 613e 2928 7374 7275 6374 post)(struct\n-0015ae50: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-0015ae60: 7374 2063 6861 7220 2a65 6e64 706f 696e st char *endpoin\n-0015ae70: 742c 2063 6f6e 7374 2063 6861 7220 2a68 t, const char *h\n-0015ae80: 6f73 742c 2069 6e74 2070 6f72 742c 2063 ost, int port, c\n-0015ae90: 6f6e 7374 2063 6861 7220 2a70 6174 682c onst char *path,\n-0015aea0: 2063 6f6e 7374 2063 6861 7220 2a61 6374 const char *act\n-0015aeb0: 696f 6e2c 2055 4c4f 4e47 3634 2063 6f75 ion, ULONG64 cou\n-0015aec0: 6e74 293c 2f63 6f64 653e 3c2f 703e 0a3c nt)

    .<\n-0015aed0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-0015aee0: 6973 2063 616c 6c65 6420 6174 2074 6865 is called at the\n-0015aef0: 2073 6572 7665 7220 7369 6465 2062 7920 server side by \n-0015af00: 7468 6520 656e 6769 6e65 2074 6f20 7365 the engine to se\n-0015af10: 6e64 2074 6865 2048 5454 5020 6865 6164 nd the HTTP head\n-0015af20: 6572 7320 746f 2074 6865 2063 6f6e 6e65 ers to the conne\n-0015af30: 6374 6564 2063 6c69 656e 742e 2054 6865 cted client. The\n-0015af40: 2070 6172 616d 6574 6572 203c 636f 6465 parameter status
    s\n-0015af60: 686f 756c 6420 6265 2061 6e20 4854 5450 hould be an HTTP\n-0015af70: 2073 7461 7475 7320 6572 726f 7220 636f status error co\n-0015af80: 6465 206f 7220 3c63 6f64 653e 2353 4f41 de or #SOA\n-0015af90: 505f 4f4b 3c2f 636f 6465 3e20 2832 3030 P_OK (200\n-0015afa0: 204f 4b29 206f 7220 3c63 6f64 653e 2353 OK) or #S\n-0015afb0: 4f41 505f 4854 4d4c 3c2f 636f 6465 3e20 OAP_HTML \n-0015afc0: 6f72 203c 636f 6465 3e23 534f 4150 5f46 or #SOAP_F\n-0015afd0: 494c 453c 2f63 6f64 653e 2e20 5573 696e ILE. Usin\n-0015afe0: 6720 3c63 6f64 653e 2353 4f41 505f 4854 g #SOAP_HT\n-0015aff0: 4d4c 3c2f 636f 6465 3e20 7365 7473 2074 ML sets t\n-0015b000: 6865 2063 6f6e 7465 6e74 2d74 7970 6520 he content-type \n-0015b010: 6865 6164 6572 2074 6f20 3c63 6f64 653e header to \n-0015b020: 7465 7874 2f68 746d 6c3b 2063 6861 7273 text/html; chars\n-0015b030: 6574 3d75 7466 2d38 3c2f 636f 6465 3e2e et=utf-8.\n-0015b040: 2055 7369 6e67 203c 636f 6465 3e23 534f Using #SO\n-0015b050: 4150 5f46 494c 453c 2f63 6f64 653e 2073 AP_FILE s\n-0015b060: 6574 7320 7468 6520 636f 6e74 656e 742d ets the content-\n-0015b070: 7479 7065 2068 6561 6465 7220 746f 2074 type header to t\n-0015b080: 6865 2076 616c 7565 206f 6620 3c63 6f64 he value of soap::\n-0015b150: 6874 7470 5f63 6f6e 7465 6e74 3c2f 613e http_content\n-0015b160: 3c2f 636f 6465 3e2e 2045 7874 7261 2048 . Extra H\n-0015b170: 5454 5020 6865 6164 6572 7320 6172 6520 TTP headers are \n-0015b180: 6164 6465 6420 7768 656e 203c 636f 6465 added when \n-0015b240: 736f 6170 3a3a 6874 7470 5f65 7874 7261 soap::http_extra\n-0015b250: 5f68 6561 6465 723c 2f61 3e3c 2f63 6f64 _header is set to one\n-0015b270: 206f 7220 6d6f 7265 2068 6561 6465 7220 or more header \n-0015b280: 6c69 6e65 7320 7365 7061 7261 7465 6420 lines separated \n-0015b290: 6279 2043 524c 462e 2057 6865 6e20 7265 by CRLF. When re\n-0015b2a0: 6465 6669 6e69 6e67 2074 6869 7320 6361 defining this ca\n-0015b2b0: 6c6c 6261 636b 2c20 7573 6520 6675 6e63 llback, use func\n-0015b2c0: 7469 6f6e 203c 636f 6465 3e3c 6120 636c tion \n-0015b330: 736f 6170 5f73 656e 643c 2f61 3e3c 2f63 soap_send to write th\n-0015b350: 6520 6865 6164 6572 2063 6f6e 7465 6e74 e header content\n-0015b360: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK\n-0015b380: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n-0015b440: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status error code. \n-0015b460: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-0015b470: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-0015b480: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fresp\n-0015b550: 6f6e 7365 3c2f 613e 3c2f 636f 6465 3e20 onse \n-0015b560: 6973 203c 636f 6465 3e68 7474 705f 7265 is http_re\n-0015b570: 7370 6f6e 7365 3c2f 636f 6465 3e2e 3c2f sponse..

    .\n-0015b5b0: 6672 6573 706f 6e73 653c 2f68 333e 0a3c fresponse

    .<\n-0015b5c0: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (soap::\n-0015b690: 6672 6573 706f 6e73 653c 2f61 3e29 2873 fresponse)(s\n-0015b6a0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0015b6b0: 2c20 696e 7420 736f 6170 5f65 7272 6f72 , int soap_error\n-0015b6c0: 5f63 6f64 652c 2055 4c4f 4e47 3634 2063 _code, ULONG64 c\n-0015b6d0: 6f75 6e74 293c 2f63 6f64 653e 3c2f 703e ount)

    \n-0015b6e0: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

    This callbac\n-0015b6f0: 6b20 6973 2063 616c 6c65 6420 6174 2074 k is called at t\n-0015b700: 6865 2073 6572 7665 7220 7369 6465 2062 he server side b\n-0015b710: 7920 7468 6520 656e 6769 6e65 2074 6f20 y the engine to \n-0015b720: 7365 6e64 2074 6865 2048 5454 5020 6865 send the HTTP he\n-0015b730: 6164 6572 7320 746f 2074 6865 2063 6f6e aders to the con\n-0015b740: 6e65 6374 6564 2063 6c69 656e 742e 2054 nected client. T\n-0015b750: 6865 2070 6172 616d 6574 6572 203c 636f he parameter status\n-0015b770: 2073 686f 756c 6420 6265 2061 6e20 4854 should be an HT\n-0015b780: 5450 2073 7461 7475 7320 6572 726f 7220 TP status error \n-0015b790: 636f 6465 206f 7220 3c63 6f64 653e 2353 code or #S\n-0015b7a0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 2832 OAP_OK (2\n-0015b7b0: 3030 204f 4b29 206f 7220 3c63 6f64 653e 00 OK) or \n-0015b7c0: 2353 4f41 505f 4854 4d4c 3c2f 636f 6465 #SOAP_HTML or #SOAP\n-0015b7e0: 5f46 494c 453c 2f63 6f64 653e 2e20 5573 _FILE. Us\n-0015b7f0: 696e 6720 3c63 6f64 653e 2353 4f41 505f ing #SOAP_\n-0015b800: 4854 4d4c 3c2f 636f 6465 3e20 7365 7473 HTML sets\n-0015b810: 2074 6865 2063 6f6e 7465 6e74 2d74 7970 the content-typ\n-0015b820: 6520 6865 6164 6572 2074 6f20 3c63 6f64 e header to text/html; cha\n-0015b840: 7273 6574 3d75 7466 2d38 3c2f 636f 6465 rset=utf-8. Using #\n-0015b860: 534f 4150 5f46 494c 453c 2f63 6f64 653e SOAP_FILE\n-0015b870: 2073 6574 7320 7468 6520 636f 6e74 656e sets the conten\n-0015b880: 742d 7479 7065 2068 6561 6465 7220 746f t-type header to\n-0015b890: 2074 6865 2076 616c 7565 206f 6620 3c63 the value of soap\n-0015b960: 3a3a 6874 7470 5f63 6f6e 7465 6e74 3c2f ::http_content. Extra\n-0015b980: 2048 5454 5020 6865 6164 6572 7320 6172 HTTP headers ar\n-0015b990: 6520 6164 6465 6420 7768 656e 203c 636f e added when soap::http_ext\n-0015ba60: 7261 5f68 6561 6465 723c 2f61 3e3c 2f63 ra_header is set to o\n-0015ba80: 6e65 206f 7220 6d6f 7265 2068 6561 6465 ne or more heade\n-0015ba90: 7220 6c69 6e65 7320 7365 7061 7261 7465 r lines separate\n-0015baa0: 6420 6279 2043 524c 462e 2057 6865 6e20 d by CRLF. When \n-0015bab0: 7265 6465 6669 6e69 6e67 2074 6869 7320 redefining this \n-0015bac0: 6361 6c6c 6261 636b 2c20 7573 6520 6675 callback, use fu\n-0015bad0: 6e63 7469 6f6e 203c 636f 6465 3e3c 6120 nction soap_send<\n-0015bb50: 2f63 6f64 653e 2074 6f20 7772 6974 6520 /code> to write \n-0015bb60: 7468 6520 6865 6164 6572 2063 6f6e 7465 the header conte\n-0015bb70: 6e74 732e 2052 6574 7572 6e73 203c 636f nts. Returns #SOAP_OK or a s\n-0015bc50: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status error code\n-0015bc70: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n-0015bc80: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n-0015bc90: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fre\n-0015bd60: 7370 6f6e 7365 3c2f 613e 3c2f 636f 6465 sponse is http_\n-0015bd80: 7265 7370 6f6e 7365 3c2f 636f 6465 3e2e response.\n-0015bd90: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fposthdr

    .\n-0015bdd0: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap\n-0015be80: 3a3a 6670 6f73 7468 6472 3c2f 613e 2928 ::fposthdr)(\n-0015be90: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-0015bea0: 702c 2063 6f6e 7374 2063 6861 7220 2a6b p, const char *k\n-0015beb0: 6579 2c20 636f 6e73 7420 6368 6172 202a ey, const char *\n-0015bec0: 7661 6c29 3c2f 636f 6465 3e3c 2f70 3e0a val)

    .\n-0015bed0: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n-0015bee0: 2069 7320 6361 6c6c 6564 2062 7920 3c63 is called by soap::fpos\n-0015bfc0: 743c 2f61 3e3c 2f63 6f64 653e 2061 6e64 t and\n-0015bfd0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::frespo\n-0015c0a0: 6e73 653c 2f61 3e3c 2f63 6f64 653e 2074 nse t\n-0015c0b0: 6f20 7365 6e64 2061 6e20 4854 5450 2068 o send an HTTP h\n-0015c0c0: 6561 6465 7220 7769 7468 2061 206b 6579 eader with a key\n-0015c0d0: 2061 6e64 2061 6e20 6f70 7469 6f6e 616c and an optional\n-0015c0e0: 2076 616c 7565 2e20 5265 7475 726e 7320 value. Returns \n-0015c0f0: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n-0015c1e0: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n-0015c1f0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-0015c200: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::fposthdr<\n-0015c2c0: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is http_post_he\n-0015c2e0: 6164 6572 3c2f 636f 6465 3e2e 3c2f 703e ader.

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

    .fp\n-0015c320: 6172 7365 3c2f 6833 3e0a 3c70 3e3c 636f arse

    .

    int (soap:\n-0015c3d0: 3a66 7061 7273 653c 2f61 3e29 2873 7472 :fparse)(str\n-0015c3e0: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-0015c3f0: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-0015c400: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-0015c410: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n-0015c420: 696e 6520 2861 7320 6120 636c 6965 6e74 ine (as a client\n-0015c430: 206f 7220 7365 7276 6572 2920 746f 2072 or server) to r\n-0015c440: 6561 6420 616e 6420 7061 7273 6520 4854 ead and parse HT\n-0015c450: 5450 2068 6561 6465 7273 206f 7220 4d49 TP headers or MI\n-0015c460: 4d45 2068 6561 6465 7273 2e20 5768 656e ME headers. When\n-0015c470: 2072 6564 6566 696e 6564 2c20 7468 6973 redefined, this\n-0015c480: 2066 756e 6374 696f 6e20 7368 6f75 6c64 function should\n-0015c490: 2061 7420 7265 6164 206f 7220 736b 6970 at read or skip\n-0015c4a0: 2074 6865 2065 6e74 6972 6520 4854 5450 the entire HTTP\n-0015c4b0: 2068 6561 6465 7220 746f 2072 6561 6368 header to reach\n-0015c4c0: 2074 6865 206d 6573 7361 6765 2062 6f64 the message bod\n-0015c4d0: 792e 2046 756e 6374 696f 6e20 3c63 6f64 y. Function soap_\n-0015c550: 6765 746c 696e 653c 2f61 3e3c 2f63 6f64 getline is used by th\n-0015c570: 6973 2063 616c 6c62 6163 6b20 746f 2072 is callback to r\n-0015c580: 6561 6420 6561 6368 2068 6561 6465 7220 ead each header \n-0015c590: 6c69 6e65 2069 6e74 6f20 616e 2069 6e74 line into an int\n-0015c5a0: 6572 6e61 6c20 6275 6666 6572 203c 636f ernal buffer soap:\n-0015c670: 3a6d 7367 6275 663c 2f61 3e3c 2f63 6f64 :msgbuf with soap_getl\n-0015c700: 696e 653c 2f61 3e28 736f 6170 2c20 736f ine(soap, so\n-0015c710: 6170 2d26 6774 3b6d 7367 6275 662c 2073 ap->msgbuf, s\n-0015c720: 697a 656f 6628 736f 6170 2d26 6774 3b6d izeof(soap->m\n-0015c730: 7367 6275 6629 293c 2f63 6f64 653e 2e20 sgbuf)). \n-0015c740: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-0015c750: 4f41 505f 4f4b 3c2f 636f 6465 3e2c 206f OAP_OK, o\n-0015c760: 7220 6120 6753 4f41 5020 6572 726f 7220 r a gSOAP error \n-0015c770: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n-0015c780: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n-0015c790: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fparse is http_parse.

    .

    .fparsehdr<\n-0015c8a0: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-0015c8b0: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n-0015c960: 7061 7273 6568 6472 3c2f 613e 2928 7374 parsehdr)(st\n-0015c970: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-0015c980: 2063 6f6e 7374 2063 6861 7220 2a6b 6579 const char *key\n-0015c990: 2c20 636f 6e73 7420 6368 6172 202a 7661 , const char *va\n-0015c9a0: 6c29 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 l)

    .This callback i\n-0015c9c0: 7320 6361 6c6c 6564 2062 7920 3c63 6f64 s called by soap::fpars\n-0015ca70: 653c 2f61 3e3c 2f63 6f64 653e 2c20 636f e, co\n-0015ca80: 6e73 756d 6573 2061 6e20 4854 5450 2068 nsumes an HTTP h\n-0015ca90: 6561 6465 7220 7468 6174 2069 7320 7370 eader that is sp\n-0015caa0: 6c69 7420 696e 2061 206b 6579 2d76 616c lit in a key-val\n-0015cab0: 7565 2070 6169 7220 616e 6420 7570 6461 ue pair and upda\n-0015cac0: 7465 7320 7468 6520 3c63 6f64 653e 3c61 tes the soap contex\n-0015cb30: 7420 7374 6174 6520 6163 636f 7264 696e t state accordin\n-0015cb40: 676c 792e 2054 6865 2063 6f6e 7465 7874 gly. The context\n-0015cb50: 2069 7320 7570 6461 7465 6420 7769 7468 is updated with\n-0015cb60: 2074 6865 2048 5454 5020 6865 6164 6572 the HTTP header\n-0015cb70: 2069 6e66 6f72 6d61 7469 6f6e 2072 6563 information rec\n-0015cb80: 6569 7665 642c 2062 7574 2048 5454 5020 eived, but HTTP \n-0015cb90: 6865 6164 6572 7320 6172 6520 6e6f 7420 headers are not \n-0015cba0: 6c69 7465 7261 6c6c 7920 7265 7461 696e literally retain\n-0015cbb0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-0015cbc0: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns \n-0015cbd0: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK \n-0015cbe0: 6f72 203c 636f 6465 3e23 534f 4150 5f53 or #SOAP_S\n-0015cbf0: 544f 503c 2f63 6f64 653e 2074 6f20 7072 TOP to pr\n-0015cc00: 6576 656e 7420 6675 7274 6865 7220 7265 event further re\n-0015cc10: 6164 696e 6720 6f66 2074 6865 2048 5454 ading of the HTT\n-0015cc20: 5020 626f 6479 2c20 6f72 2061 203c 636f P body, or a soap_status<\n-0015ccf0: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-0015cd00: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n-0015cd10: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n-0015cd20: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n-0015cd30: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n-0015cde0: 3a66 7061 7273 6568 6472 3c2f 613e 3c2f :fparsehdr is h\n-0015ce00: 7474 705f 7061 7273 655f 6865 6164 6572 ttp_parse_header\n-0015ce10: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..fget.

    int\n-0015ce60: 2028 3c61 2063 6c61 7373 3d22 656c 2220 (soap::fget)(struct soap \n-0015cf40: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap).

    This callba\n-0015cf60: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-0015cf70: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp\n-0015cf80: 6174 6368 6572 2077 6865 6e20 616e 2048 atcher when an H\n-0015cf90: 5454 5020 4745 5420 7265 7175 6573 7420 TTP GET request \n-0015cfa0: 6973 2070 656e 6469 6e67 2e20 5265 6465 is pending. Rede\n-0015cfb0: 6669 6e65 2074 6869 7320 6361 6c6c 6261 fine this callba\n-0015cfc0: 636b 2074 6f20 7265 7370 6f6e 6420 746f ck to respond to\n-0015cfd0: 2048 5454 5020 4745 5420 7265 7175 6573 HTTP GET reques\n-0015cfe0: 7473 2077 6974 6820 636f 6e74 656e 742c ts with content,\n-0015cff0: 2073 6565 2074 6865 203c 636f 6465 3e3c see the <\n-0015d000: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015d010: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015d020: 5f69 6f2e 6874 6d6c 2367 6130 6563 6463 _io.html#ga0ecdc\n-0015d030: 3433 6135 3365 3439 3465 6463 3466 3834 43a53e494edc4f84\n-0015d040: 6538 6331 3335 3635 3962 6122 2074 6974 e8c135659ba\" tit\n-0015d050: 6c65 3d22 5468 6520 4854 5450 2047 4554 le=\"The HTTP GET\n-0015d060: 2070 6c75 6769 6e20 7265 6769 7374 7261 plugin registra\n-0015d070: 7469 6f6e 2066 756e 6374 696f 6e2e 223e tion function.\">\n-0015d080: 6874 7470 5f67 6574 3c2f 613e 3c2f 636f http_get HTTP GET plu\n-0015d0a0: 6769 6e20 666f 7220 6d6f 7265 2064 6574 gin for more det\n-0015d0b0: 6169 6c73 2e20 5265 7475 726e 7320 3c63 ails. Returns #SOAP_OK or a <\n-0015d0e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015d0f0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015d100: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n-0015d110: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n-0015d120: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n-0015d130: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n-0015d140: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n-0015d150: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n-0015d160: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n-0015d170: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n-0015d180: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n-0015d190: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n-0015d1a0: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n-0015d1b0: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n-0015d1c0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n-0015d1d0: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fget is the \n-0015d2c0: 696e 7465 726e 616c 2073 7461 7469 6320 internal static \n-0015d2d0: 6675 6e63 7469 6f6e 203c 636f 6465 3e68 function h\n-0015d2e0: 7474 705f 6765 743c 2f63 6f64 653e 2074 ttp_get t\n-0015d2f0: 6861 7420 7265 7475 726e 7320 7468 6520 hat returns the \n-0015d300: 3c63 6f64 653e 2353 4f41 505f 4745 545f #SOAP_GET_\n-0015d310: 4d45 5448 4f44 3c2f 636f 6465 3e20 6572 METHOD er\n-0015d320: 726f 722e 3c2f 703e 0a3c 6833 3e3c 6120 ror.

    .

    .fput

    .\n-0015d360: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (\n-0015d430: 736f 6170 3a3a 6670 7574 3c2f 613e 2928 soap::fput)(\n-0015d440: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-0015d450: 7029 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 p)

    .This callback i\n-0015d470: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n-0015d480: 7365 7276 6963 6520 6469 7370 6174 6368 service dispatch\n-0015d490: 6572 2077 6865 6e20 616e 2048 5454 5020 er when an HTTP \n-0015d4a0: 5055 5420 7265 7175 6573 7420 6973 2070 PUT request is p\n-0015d4b0: 656e 6469 6e67 2e20 5265 6465 6669 6e65 ending. Redefine\n-0015d4c0: 2074 6869 7320 6361 6c6c 6261 636b 2074 this callback t\n-0015d4d0: 6f20 7265 7370 6f6e 6420 746f 2048 5454 o respond to HTT\n-0015d4e0: 5020 5055 5420 7265 7175 6573 7473 2c20 P PUT requests, \n-0015d4f0: 7365 6520 7468 6520 3c63 6f64 653e 3c61 see the \n-0015d580: 6874 7470 5f70 6f73 743c 2f61 3e3c 2f63 http_post HTTP POST p\n-0015d5a0: 6c75 6769 6e20 666f 7220 6d6f 7265 2064 lugin for more d\n-0015d5b0: 6574 6169 6c73 2e20 5265 7475 726e 7320 etails. Returns \n-0015d5c0: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status error c\n-0015d6b0: 6f64 652e 2054 6865 2062 7569 6c74 2d69 ode. The built-i\n-0015d6c0: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig\n-0015d6d0: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to s\n-0015d7a0: 6f61 703a 3a66 7075 743c 2f61 3e3c 2f63 oap::fput is the inte\n-0015d7c0: 726e 616c 2073 7461 7469 6320 6675 6e63 rnal static func\n-0015d7d0: 7469 6f6e 203c 636f 6465 3e68 7474 705f tion http_\n-0015d7e0: 7075 743c 2f63 6f64 653e 2074 6861 7420 put that \n-0015d7f0: 7265 7475 726e 7320 7468 6520 3c63 6f64 returns the #SOAP_PUT_METH\n-0015d810: 4f44 3c2f 636f 6465 3e20 6572 726f 722e OD error.\n-0015d820: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fpatch

    .int (soap::fpatch)(struct soap \n-0015d950: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap).

    This callba\n-0015d970: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-0015d980: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp\n-0015d990: 6174 6368 6572 2077 6865 6e20 616e 2048 atcher when an H\n-0015d9a0: 5454 5020 5041 5443 4820 7265 7175 6573 TTP PATCH reques\n-0015d9b0: 7420 6973 2070 656e 6469 6e67 2e20 5265 t is pending. Re\n-0015d9c0: 6465 6669 6e65 2074 6869 7320 6361 6c6c define this call\n-0015d9d0: 6261 636b 2074 6f20 7265 7370 6f6e 6420 back to respond \n-0015d9e0: 746f 2048 5454 5020 5041 5443 4820 7265 to HTTP PATCH re\n-0015d9f0: 7175 6573 7473 2c20 7365 6520 7468 6520 quests, see the \n-0015da00: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_pos\n-0015da90: 743c 2f61 3e3c 2f63 6f64 653e 2048 5454 t HTT\n-0015daa0: 5020 504f 5354 2070 6c75 6769 6e20 666f P POST plugin fo\n-0015dab0: 7220 6d6f 7265 2064 6574 6169 6c73 2e20 r more details. \n-0015dac0: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-0015dad0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-0015dae0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-0015dba0: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-0015dbb0: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n-0015dbc0: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n-0015dbd0: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n-0015dbe0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n-0015dcb0: 3a66 7061 7463 683c 2f61 3e3c 2f63 6f64 :fpatch is the intern\n-0015dcd0: 616c 2073 7461 7469 6320 6675 6e63 7469 al static functi\n-0015dce0: 6f6e 203c 636f 6465 3e68 7474 705f 7061 on http_pa\n-0015dcf0: 7463 683c 2f63 6f64 653e 2074 6861 7420 tch that \n-0015dd00: 7265 7475 726e 7320 7468 6520 3c63 6f64 returns the #SOAP_PATCH_ME\n-0015dd20: 5448 4f44 3c2f 636f 6465 3e20 6572 726f THOD erro\n-0015dd30: 722e 3c2f 703e 0a3c 6833 3e3c 6120 636c r.

    .

    <\n-0015dd60: 2f61 3e0a 6664 656c 3c2f 6833 3e0a 3c70 /a>.fdel

    .int (soap::fdel\n-0015de50: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-0015de60: 6f61 7029 3c2f 636f 6465 3e3c 2f70 3e0a oap)

    .\n-0015de70: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n-0015de80: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n-0015de90: 6520 7365 7276 6963 6520 6469 7370 6174 e service dispat\n-0015dea0: 6368 6572 2077 6865 6e20 616e 2048 5454 cher when an HTT\n-0015deb0: 5020 4445 4c45 5445 2072 6571 7565 7374 P DELETE request\n-0015dec0: 2069 7320 7065 6e64 696e 672e 2052 6564 is pending. Red\n-0015ded0: 6566 696e 6520 7468 6973 2063 616c 6c62 efine this callb\n-0015dee0: 6163 6b20 746f 2072 6573 706f 6e64 2074 ack to respond t\n-0015def0: 6f20 4854 5450 2044 454c 4554 4520 7265 o HTTP DELETE re\n-0015df00: 7175 6573 7473 2c20 7365 6520 7468 6520 quests, see the \n-0015df10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_pos\n-0015dfa0: 743c 2f61 3e3c 2f63 6f64 653e 2048 5454 t HTT\n-0015dfb0: 5020 504f 5354 2070 6c75 6769 6e20 666f P POST plugin fo\n-0015dfc0: 7220 6d6f 7265 2064 6574 6169 6c73 2e20 r more details. \n-0015dfd0: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-0015dfe0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-0015dff0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-0015e0b0: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-0015e0c0: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n-0015e0d0: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n-0015e0e0: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n-0015e0f0: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fdel<\n-0015e1d0: 2f63 6f64 653e 2069 7320 7468 6520 696e /code> is the in\n-0015e1e0: 7465 726e 616c 2073 7461 7469 6320 6675 ternal static fu\n-0015e1f0: 6e63 7469 6f6e 203c 636f 6465 3e68 7474 nction htt\n-0015e200: 705f 6465 6c3c 2f63 6f64 653e 2074 6861 p_del tha\n-0015e210: 7420 7265 7475 726e 7320 7468 6520 3c63 t returns the #SOAP_DEL_ME\n-0015e230: 5448 4f44 3c2f 636f 6465 3e20 6572 726f THOD erro\n-0015e240: 722e 3c2f 703e 0a3c 6833 3e3c 6120 636c r.

    .

    <\n-0015e270: 2f61 3e0a 666f 7074 3c2f 6833 3e0a 3c70 /a>.fopt

    .int (soap::fopt\n-0015e360: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-0015e370: 6f61 7029 3c2f 636f 6465 3e3c 2f70 3e0a oap)

    .\n-0015e380: 3c70 3e43 616c 6c65 6420 6279 2074 6865

    Called by the\n-0015e390: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-0015e3a0: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP\n-0015e3b0: 204f 5054 494f 4e20 7265 7175 6573 7420 OPTION request \n-0015e3c0: 6973 2070 656e 6469 6e67 2e20 5265 6465 is pending. Rede\n-0015e3d0: 6669 6e65 2074 6869 7320 6361 6c6c 6261 fine this callba\n-0015e3e0: 636b 2074 6f20 7265 7370 6f6e 6420 746f ck to respond to\n-0015e3f0: 2048 5454 5020 4f50 5449 4f4e 2072 6571 HTTP OPTION req\n-0015e400: 7565 7374 732c 2073 6565 2074 6865 203c uests, see the <\n-0015e410: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>http_post\n-0015e4a0: 3c2f 613e 3c2f 636f 6465 3e20 4854 5450 HTTP\n-0015e4b0: 2050 4f53 5420 706c 7567 696e 2066 6f72 POST plugin for\n-0015e4c0: 206d 6f72 6520 6465 7461 696c 732e 2052 more details. R\n-0015e4d0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n-0015e4e0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n-0015e4f0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n-0015e5b0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n-0015e5c0: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n-0015e5d0: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n-0015e5e0: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n-0015e5f0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to \n-0015e6c0: 736f 6170 3a3a 666f 7074 3c2f 613e 3c2f soap::fopt is the int\n-0015e6e0: 6572 6e61 6c20 7374 6174 6963 2066 756e ernal static fun\n-0015e6f0: 6374 696f 6e20 3c63 6f64 653e 6874 7470 ction http\n-0015e700: 5f32 3030 3c2f 636f 6465 3e20 7468 6174 _200 that\n-0015e710: 2072 6574 7572 6e73 2048 5454 5020 3230 returns HTTP 20\n-0015e720: 3020 4f4b 2e3c 2f70 3e0a 3c68 333e 3c61 0 OK.

    .

    .fhead.

    int (\n-0015e770: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fhead)(struct soap \n-0015e850: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap).

    This callba\n-0015e870: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-0015e880: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp\n-0015e890: 6174 6368 6572 2077 6865 6e20 616e 2048 atcher when an H\n-0015e8a0: 5454 5020 4845 4144 2072 6571 7565 7374 TTP HEAD request\n-0015e8b0: 2069 7320 7065 6e64 696e 672e 2052 6564 is pending. Red\n-0015e8c0: 6566 696e 6520 7468 6973 2063 616c 6c62 efine this callb\n-0015e8d0: 6163 6b20 746f 2072 6573 706f 6e64 2074 ack to respond t\n-0015e8e0: 6f20 4854 5450 2048 4541 4420 7265 7175 o HTTP HEAD requ\n-0015e8f0: 6573 7473 206d 6f72 6520 7370 6563 6966 ests more specif\n-0015e900: 6963 616c 6c79 2e20 5265 7475 726e 7320 ically. Returns \n-0015e910: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n-0015ea00: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n-0015ea10: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-0015ea20: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::fhea\n-0015eb00: 643c 2f61 3e3c 2f63 6f64 653e 2069 7320 d is \n-0015eb10: 7468 6520 696e 7465 726e 616c 2073 7461 the internal sta\n-0015eb20: 7469 6320 6675 6e63 7469 6f6e 203c 636f tic function http_200 that returns \n-0015eb50: 4854 5450 2032 3030 204f 4b2e 3c2f 703e HTTP 200 OK.

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

    .ff\n-0015eb90: 6f72 6d3c 2f68 333e 0a3c 703e 3c63 6f64 orm

    .

    int (soa\n-0015ec70: 703a 3a66 666f 726d 3c2f 613e 2928 7374 p::fform)(st\n-0015ec80: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n-0015ec90: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-0015eca0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-0015ecb0: 6361 6c6c 6564 2062 7920 7468 6520 4854 called by the HT\n-0015ecc0: 5450 2046 4f52 4d20 6861 6e64 6c65 7220 TP FORM handler \n-0015ecd0: 706c 7567 696e 2074 6f20 7061 7273 6520 plugin to parse \n-0015ece0: 4854 4d4c 2066 6f72 6d73 2072 6563 6569 HTML forms recei\n-0015ecf0: 7665 6420 7769 7468 2048 5454 5020 504f ved with HTTP PO\n-0015ed00: 5354 2061 6e64 2050 5554 2072 6571 7565 ST and PUT reque\n-0015ed10: 7374 732c 2073 6565 2074 6865 203c 636f sts, see the ;:http_form HTTP FORM \n-0015ed40: 706c 7567 696e 2066 6f72 206d 6f72 6520 plugin for more \n-0015ed50: 6465 7461 696c 732e 2054 6865 2048 5454 details. The HTT\n-0015ed60: 5020 626f 6479 2077 6974 6820 7468 6520 P body with the \n-0015ed70: 666f 726d 2064 6174 6120 7368 6f75 6c64 form data should\n-0015ed80: 2062 6520 7061 7273 6564 2062 7920 7468 be parsed by th\n-0015ed90: 6973 2063 616c 6c62 6163 6b2c 206f 7468 is callback, oth\n-0015eda0: 6572 7769 7365 2048 5454 5020 6b65 6570 erwise HTTP keep\n-0015edb0: 2d61 6c69 7665 206d 6573 7361 6765 7320 -alive messages \n-0015edc0: 7769 6c6c 2065 6e64 2075 7020 6f75 7420 will end up out \n-0015edd0: 6f66 2073 796e 6320 6173 2061 2072 6573 of sync as a res\n-0015ede0: 756c 7420 6f66 2074 6865 2063 7572 7265 ult of the curre\n-0015edf0: 6e74 2070 6f73 6974 696f 6e20 6e6f 7420 nt position not \n-0015ee00: 6265 696e 6720 6164 7661 6e63 6564 2074 being advanced t\n-0015ee10: 6f20 7468 6520 656e 6420 6f66 2074 6865 o the end of the\n-0015ee20: 2048 5454 5020 626f 6479 2e20 5265 7475 HTTP body. Retu\n-0015ee30: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-0015ee40: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-0015ee50: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-0015ef10: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-0015ef20: 7429 2065 7272 6f72 2063 6f64 652e 204e t) error code. N\n-0015ef30: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n-0015ef40: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n-0015ef50: 746f 203c 636f 6465 3e3c 6120 636c 6173 to s\n-0015f020: 6f61 703a 3a66 666f 726d 3c2f 613e 3c2f oap::fform.

    .

    <\n-0015f040: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-0015f050: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n-0015f060: 3022 3e3c 2f61 3e0a 6668 6561 6465 723c 0\">.fheader<\n-0015f070: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-0015f080: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n-0015f150: 6865 6164 6572 3c2f 613e 2928 7374 7275 header)(stru\n-0015f160: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)

    .

    Thi\n-0015f180: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n-0015f190: 6c6c 6564 2069 6d6d 6564 6961 7465 6c79 lled immediately\n-0015f1a0: 2061 6674 6572 2070 6172 7369 6e67 2061 after parsing a\n-0015f1b0: 2053 4f41 5020 4865 6164 6572 2069 6e74 SOAP Header int\n-0015f1c0: 6f20 7468 6520 3c63 6f64 653e 3c61 2063 o the soap::header\n-0015f290: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n-0015f2a0: 6374 7572 652e 2054 6865 2053 4f41 5020 cture. The SOAP \n-0015f2b0: 4865 6164 6572 2073 7472 7563 7475 7265 Header structure\n-0015f2c0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-0015f380: 6f61 703a 3a68 6561 6465 723c 2f61 3e3c oap::header<\n-0015f390: 2f63 6f64 653e 2063 616e 2062 6520 696e /code> can be in\n-0015f3a0: 7370 6563 7465 6420 6279 2074 6869 7320 spected by this \n-0015f3b0: 6675 6e63 7469 6f6e 2061 6e64 2076 6572 function and ver\n-0015f3c0: 6966 6965 6420 6f72 2072 656a 6563 7465 ified or rejecte\n-0015f3d0: 6420 6265 666f 7265 2074 6865 2072 6573 d before the res\n-0015f3e0: 7420 6f66 2074 6865 206d 6573 7361 6765 t of the message\n-0015f3f0: 2077 6974 6820 7468 6520 534f 4150 2042 with the SOAP B\n-0015f400: 6f64 7920 6973 2063 6f6e 7375 6d65 642e ody is consumed.\n-0015f410: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n-0015f420: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n-0015f430: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n-0015f4f0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n-0015f510: 6465 2e20 4e6f 2062 7569 6c74 2d69 6e20 de. No built-in \n-0015f520: 6675 6e63 7469 6f6e 2069 7320 6173 7369 function is assi\n-0015f530: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fheade\n-0015f610: 723c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 r..

    .f\n-0015f650: 6967 6e6f 7265 3c2f 6833 3e0a 3c70 3e3c ignore

    .

    <\n-0015f660: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n-0015f730: 736f 6170 3a3a 6669 676e 6f72 653c 2f61 soap::fignore)(struct soap *\n-0015f750: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-0015f760: 202a 7461 6729 3c2f 636f 6465 3e3c 2f70 *tag).

    This callba\n-0015f780: 636b 2069 7320 6361 6c6c 6564 2077 6865 ck is called whe\n-0015f790: 6e20 616e 2075 6e72 6563 6f67 6e69 7a65 n an unrecognize\n-0015f7a0: 6420 584d 4c20 656c 656d 656e 7420 7761 d XML element wa\n-0015f7b0: 7320 656e 636f 756e 7465 7265 6420 6f6e s encountered on\n-0015f7c0: 2074 6865 2069 6e70 7574 2074 6861 7420 the input that \n-0015f7d0: 636f 756c 6420 6265 2069 676e 6f72 6564 could be ignored\n-0015f7e0: 2064 6570 656e 6469 6e67 206f 6e20 736f depending on so\n-0015f7f0: 6d65 2073 7065 6369 6669 6564 206c 6f67 me specified log\n-0015f800: 6963 2e20 5468 6520 3c63 6f64 653e 7461 ic. The ta\n-0015f810: 673c 2f63 6f64 653e 2070 6172 616d 6574 g paramet\n-0015f820: 6572 2069 7320 7468 6520 6f66 6665 6e64 er is the offend\n-0015f830: 696e 6720 584d 4c20 656c 656d 656e 7420 ing XML element \n-0015f840: 7461 6720 6e61 6d65 2073 7472 696e 672e tag name string.\n-0015f850: 2054 6865 2063 616c 6c62 6163 6b20 7368 The callback sh\n-0015f860: 6f75 6c64 2072 6574 7572 6e20 3c63 6f64 ould return #SOAP_OK to ignore the \n-0015f890: 656c 656d 656e 7420 6f72 2072 6574 7572 element or retur\n-0015f8a0: 6e20 616e 203c 636f 6465 3e3c 6120 636c n an soap\n-0015f960: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status error code su\n-0015f980: 6368 2061 7320 3c63 6f64 653e 2353 4f41 ch as #SOA\n-0015f990: 505f 5441 475f 4d49 534d 4154 4348 3c2f P_TAG_MISMATCH to trigger\n-0015f9b0: 2061 2076 616c 6964 6174 696f 6e20 6572 a validation er\n-0015f9c0: 726f 722e 2054 6869 7320 6361 6c6c 6261 ror. This callba\n-0015f9d0: 636b 2061 6c73 6f20 6f76 6572 7269 6465 ck also override\n-0015f9e0: 7320 3c63 6f64 653e 6d75 7374 556e 6465 s mustUnde\n-0015f9f0: 7273 7461 6e64 3c2f 636f 6465 3e20 6174 rstand at\n-0015fa00: 7472 6962 7574 6573 206f 6e20 756e 7265 tributes on unre\n-0015fa10: 636f 676e 697a 6564 2053 4f41 5020 4865 cognized SOAP He\n-0015fa20: 6164 6572 2065 6c65 6d65 6e74 7320 7468 ader elements th\n-0015fa30: 6174 206e 6f72 6d61 6c6c 7920 7261 6973 at normally rais\n-0015fa40: 6520 6661 756c 7473 2e20 4974 2069 7320 e faults. It is \n-0015fa50: 7374 726f 6e67 6c79 2072 6563 6f6d 6d65 strongly recomme\n-0015fa60: 6e64 6564 2074 6861 7420 7468 6520 6361 nded that the ca\n-0015fa70: 6c6c 6261 636b 2072 6574 7572 6e73 203c llback returns <\n-0015fa80: 636f 6465 3e23 534f 4150 5f4d 5553 5455 code>#SOAP_MUSTU\n-0015fa90: 4e44 4552 5354 414e 443c 2f63 6f64 653e NDERSTAND\n-0015faa0: 2077 6865 6e20 3c63 6f64 653e 3c61 2063 when soap::mustUn\n-0015fb70: 6465 7273 7461 6e64 3c2f 613e 3c2f 636f derstand != 0. Returns <\n-0015fba0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n-0015fbc0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n-0015fc80: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n-0015fc90: 726f 7220 636f 6465 2e20 4e6f 2062 7569 ror code. No bui\n-0015fca0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i\n-0015fcb0: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to soap::\n-0015fd90: 6669 676e 6f72 653c 2f61 3e3c 2f63 6f64 fignore.

    .

    \n-0015fdd0: 3c2f 613e 0a66 7376 616c 6964 6174 653c .fsvalidate<\n-0015fde0: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-0015fdf0: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n-0015fe90: 7376 616c 6964 6174 653c 2f61 3e29 2873 svalidate)(s\n-0015fea0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0015feb0: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa\n-0015fec0: 7474 6572 6e2c 2063 6f6e 7374 2063 6861 ttern, const cha\n-0015fed0: 7220 2a73 7472 696e 6729 3c2f 636f 6465 r *string)

    .

    This ca\n-0015fef0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n-0015ff00: 2074 6f20 7661 6c69 6461 7465 2061 2073 to validate a s\n-0015ff10: 7472 696e 6720 6167 6169 6e73 7420 616e tring against an\n-0015ff20: 2058 4d4c 2072 6567 6578 2070 6174 7465 XML regex patte\n-0015ff30: 726e 2e20 5061 7474 6572 6e73 2075 7365 rn. Patterns use\n-0015ff40: 2058 4d4c 2073 6368 656d 6120 7265 6765 XML schema rege\n-0015ff50: 7820 7379 6e74 6178 2e20 5468 6973 2063 x syntax. This c\n-0015ff60: 616c 6c62 6163 6b20 616c 6c6f 7773 2075 allback allows u\n-0015ff70: 7365 722d 6465 6669 6e65 6420 7061 7474 ser-defined patt\n-0015ff80: 6572 6e20 7661 6c69 6461 7469 6f6e 2074 ern validation t\n-0015ff90: 6861 7420 6973 206e 6f72 6d61 6c6c 7920 hat is normally \n-0015ffa0: 6469 7361 626c 6564 2e20 5265 7475 726e disabled. Return\n-0015ffb0: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-0015ffc0: 3c2f 636f 6465 3e20 7768 656e 2074 6865 when the\n-0015ffd0: 2073 7472 696e 6720 6d61 7463 6865 7320 string matches \n-0015ffe0: 7468 6520 7061 7474 6572 6e20 6f72 203c the pattern or <\n-0015fff0: 636f 6465 3e23 534f 4150 5f54 5950 453c code>#SOAP_TYPE<\n-00160000: 2f63 6f64 653e 2077 6865 6e20 7468 6520 /code> when the \n-00160010: 7374 7269 6e67 2064 6f65 7320 6e6f 7420 string does not \n-00160020: 6d61 7463 682e 204e 6f20 6275 696c 742d match. No built-\n-00160030: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a\n-00160040: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fsv\n-001600f0: 616c 6964 6174 653c 2f61 3e3c 2f63 6f64 alidate.

    .

    \n-00160130: 3c2f 613e 0a66 7776 616c 6964 6174 653c .fwvalidate<\n-00160140: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-00160150: 7420 283c 6120 636c 6173 733d 2265 6c22 t (so\n-001601f0: 6170 3a3a 6677 7661 6c69 6461 7465 3c2f ap::fwvalidate)(struct soap \n-00160210: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n-00160220: 7220 2a70 6174 7465 726e 2c20 636f 6e73 r *pattern, cons\n-00160230: 7420 7763 6861 725f 7420 2a73 7472 696e t wchar_t *strin\n-00160240: 6729 3c2f 636f 6465 3e20 5468 6973 2063 g) This c\n-00160250: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-00160260: 6420 746f 2076 616c 6964 6174 6520 6120 d to validate a \n-00160270: 7769 6465 2073 7472 696e 6720 6167 6169 wide string agai\n-00160280: 6e73 7420 616e 2058 4d4c 2072 6567 6578 nst an XML regex\n-00160290: 2070 6174 7465 726e 2e20 5061 7474 6572 pattern. Patter\n-001602a0: 6e73 2075 7365 2058 4d4c 2073 6368 656d ns use XML schem\n-001602b0: 6120 7265 6765 7820 7379 6e74 6178 2e20 a regex syntax. \n-001602c0: 5468 6973 2063 616c 6c62 6163 6b20 616c This callback al\n-001602d0: 6c6f 7773 2075 7365 722d 6465 6669 6e65 lows user-define\n-001602e0: 6420 7061 7474 6572 6e20 7661 6c69 6461 d pattern valida\n-001602f0: 7469 6f6e 2074 6861 7420 6973 206e 6f72 tion that is nor\n-00160300: 6d61 6c6c 7920 6469 7361 626c 6564 2e20 mally disabled. \n-00160310: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-00160320: 4f41 505f 4f4b 3c2f 636f 6465 3e20 7768 OAP_OK wh\n-00160330: 656e 2074 6865 2073 7472 696e 6720 6d61 en the string ma\n-00160340: 7463 6865 7320 7468 6520 7061 7474 6572 tches the patter\n-00160350: 6e20 6f72 203c 636f 6465 3e23 534f 4150 n or #SOAP\n-00160360: 5f54 5950 453c 2f63 6f64 653e 2077 6865 _TYPE whe\n-00160370: 6e20 7468 6520 7374 7269 6e67 2064 6f65 n the string doe\n-00160380: 7320 6e6f 7420 6d61 7463 682e 204e 6f20 s not match. No \n-00160390: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n-001603a0: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n-001603b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fwvalida\n-00160460: 7465 3c2f 613e 3c2f 636f 6465 3e2e 3c2f te..

    .\n-001604a0: 6673 6574 6572 726f 723c 2f68 333e 0a3c fseterror

    .<\n-001604b0: 703e 3c63 6f64 653e 766f 6964 2028 3c61 p>void (\n-00160560: 736f 6170 3a3a 6673 6574 6572 726f 723c soap::fseterror<\n-00160570: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n-00160580: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-00160590: 6172 202a 2a63 6f64 652c 2063 6f6e 7374 ar **code, const\n-001605a0: 2063 6861 7220 2a2a 7374 7269 6e67 293c char **string)<\n-001605b0: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-001605c0: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-001605d0: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n-001605e0: 696e 6520 7768 656e 2061 6e20 6572 726f ine when an erro\n-001605f0: 7220 6973 2072 6169 7365 6420 746f 2061 r is raised to a\n-00160600: 6c6c 6f77 2069 6e73 7065 6374 696f 6e20 llow inspection \n-00160610: 6f72 206f 7665 7272 6964 696e 6720 6f66 or overriding of\n-00160620: 2074 6865 2066 6175 6c74 2063 6f64 6520 the fault code \n-00160630: 6f72 2066 6175 6c74 2073 7472 696e 6720 or fault string \n-00160640: 6d65 7373 6167 6573 2062 6566 6f72 6520 messages before \n-00160650: 7468 6520 6572 726f 7220 6973 2072 6570 the error is rep\n-00160660: 6f72 7465 6420 6f72 2074 7261 6e73 6d69 orted or transmi\n-00160670: 7474 6564 2e20 4e6f 2062 7569 6c74 2d69 tted. No built-i\n-00160680: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as\n-00160690: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-001606a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fseterro\n-00160750: 723c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 r..

    .f\n-00160790: 6f70 656e 3c2f 6833 3e0a 3c70 3e3c 636f open

    .

    SOAP_SOCKET (\n-001607b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n-00160850: 3a66 6f70 656e 3c2f 613e 2928 7374 7275 :fopen)(stru\n-00160860: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-00160870: 6f6e 7374 2063 6861 7220 2a65 6e64 706f onst char *endpo\n-00160880: 696e 742c 2063 6f6e 7374 2063 6861 7220 int, const char \n-00160890: 2a68 6f73 742c 2069 6e74 2070 6f72 7429 *host, int port)\n-001608a0: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-001608b0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-001608c0: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en\n-001608d0: 6769 6e65 2061 7420 7468 6520 636c 6965 gine at the clie\n-001608e0: 6e74 2d73 6964 6520 6279 203c 636f 6465 nt-side by soap\n-00160970: 5f63 6f6e 6e65 6374 3c2f 613e 3c2f 636f _connect or soap_con\n-00160a00: 6e65 6374 5f63 6f6d 6d61 6e64 3c2f 613e nect_command\n-00160a10: 3c2f 636f 6465 3e20 746f 206f 7065 6e20 to open \n-00160a20: 6120 5443 5020 6f72 2055 4450 2063 6f6e a TCP or UDP con\n-00160a30: 6e65 6374 696f 6e20 746f 2061 2073 6572 nection to a ser\n-00160a40: 7665 7220 7370 6563 6966 6965 6420 6174 ver specified at\n-00160a50: 2061 6e20 656e 6470 6f69 6e74 2e20 5061 an endpoint. Pa\n-00160a60: 7261 6d65 7465 7273 203c 636f 6465 3e68 rameters h\n-00160a70: 6f73 743c 2f63 6f64 653e 2061 6e64 203c ost and <\n-00160a80: 636f 6465 3e70 6f72 743c 2f63 6f64 653e code>port\n-00160a90: 2061 7265 206d 6963 726f 2d70 6172 7365 are micro-parse\n-00160aa0: 6420 6672 6f6d 203c 636f 6465 3e65 6e64 d from end\n-00160ab0: 706f 696e 743c 2f63 6f64 653e 2062 6566 point bef\n-00160ac0: 6f72 6520 6265 696e 6720 7061 7373 6564 ore being passed\n-00160ad0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fopen\n-00160b80: 3c2f 613e 3c2f 636f 6465 3e2e 2052 6574 . Ret\n-00160b90: 7572 6e73 2061 2076 616c 6964 2073 6f63 urns a valid soc\n-00160ba0: 6b65 7420 6f72 203c 636f 6465 3e23 534f ket or #SO\n-00160bb0: 4150 5f49 4e56 414c 4944 5f53 4f43 4b45 AP_INVALID_SOCKE\n-00160bc0: 543c 2f63 6f64 653e 2077 6974 6820 6120 T with a \n-00160bd0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n-00160c80: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error set to a soap_status (int) \n-00160d70: 6572 726f 7220 636f 6465 2061 6e64 203c error code and <\n-00160d80: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::errnu\n-00160e10: 6d3c 2f61 3e3c 2f63 6f64 653e 2073 6574 m set\n-00160e20: 2074 6f20 3c63 6f64 653e 6572 726e 6f3c to errno<\n-00160e30: 2f63 6f64 653e 206f 6620 7468 6520 636f /code> of the co\n-00160e40: 6e6e 6563 7469 6f6e 2066 6169 6c75 7265 nnection failure\n-00160e50: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n-00160e60: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n-00160e70: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fopen\n-00160f20: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is <\n-00160f30: 636f 6465 3e74 6370 5f63 6f6e 6e65 6374 code>tcp_connect\n-00160f40: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..faccep\n-00160f80: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

    .

    \n-00160f90: 534f 4150 5f53 4f43 4b45 5420 283c 6120 SOAP_SOCKET (soap::f\n-00161050: 6163 6365 7074 3c2f 613e 2928 7374 7275 accept)(stru\n-00161060: 6374 2073 6f61 7020 2a73 6f61 702c 2053 ct soap *soap, S\n-00161070: 4f41 505f 534f 434b 4554 2073 2c20 7374 OAP_SOCKET s, st\n-00161080: 7275 6374 2073 6f63 6b61 6464 7220 2a61 ruct sockaddr *a\n-00161090: 2c20 696e 7420 2a6e 293c 2f63 6f64 653e , int *n)\n-001610a0: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-001610b0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-001610c0: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap_accept (or the\n-00161160: 2043 2b2b 2073 6572 7669 6365 2063 6c61 C++ service cla\n-00161170: 7373 203c 636f 6465 3e61 6363 6570 743c ss accept<\n-00161180: 2f63 6f64 653e 206d 6574 686f 6429 2074 /code> method) t\n-00161190: 6f20 7761 6974 2066 6f72 2061 6e64 2061 o wait for and a\n-001611a0: 6363 6570 7420 6120 736f 636b 6574 2063 ccept a socket c\n-001611b0: 6f6e 6e65 6374 696f 6e20 7265 7175 6573 onnection reques\n-001611c0: 7465 6420 6279 2061 2063 6c69 656e 742e ted by a client.\n-001611d0: 2052 6574 7572 6e73 2061 2076 616c 6964 Returns a valid\n-001611e0: 2073 6f63 6b65 7420 6f72 203c 636f 6465 socket or #SOAP_INVALID_S\n-00161200: 4f43 4b45 543c 2f63 6f64 653e 2077 6865 OCKET whe\n-00161210: 6e20 616e 2065 7272 6f72 206f 6363 7572 n an error occur\n-00161220: 7265 6420 616e 6420 7365 7473 203c 636f red and sets soap::e\n-001612e0: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e20 rror \n-001612f0: 746f 2061 203c 636f 6465 3e3c 6120 636c to a soap\n-001613b0: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status value. The bu\n-001613d0: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n-001613e0: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to so\n-001614a0: 6170 3a3a 6661 6363 6570 743c 2f61 3e3c ap::faccept<\n-001614b0: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n-001614c0: 7463 705f 6163 6365 7074 3c2f 636f 6465 tcp_accept.

    .

    <\n-00161500: 2f61 3e0a 6663 6c6f 7365 3c2f 6833 3e0a /a>.fclose

    .\n-00161510: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (s\n-001615b0: 6f61 703a 3a66 636c 6f73 653c 2f61 3e29 oap::fclose)\n-001615c0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-001615d0: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .<\n-001615e0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-001615f0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n-00161600: 2065 6e67 696e 6520 6174 2074 6865 2063 engine at the c\n-00161610: 6c69 656e 742d 7369 6465 2074 6f20 636c lient-side to cl\n-00161620: 6f73 6520 7468 6520 6375 7272 656e 7420 ose the current \n-00161630: 736f 636b 6574 2063 6f6e 6e65 6374 696f socket connectio\n-00161640: 6e20 6265 666f 7265 2061 206e 6577 2073 n before a new s\n-00161650: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n-00161660: 2069 7320 6573 7461 626c 6973 6865 642e is established.\n-00161670: 2054 6869 7320 6361 6c6c 6261 636b 206d This callback m\n-00161680: 6179 2062 6520 6361 6c6c 6564 206d 756c ay be called mul\n-00161690: 7469 706c 6520 7469 6d65 7320 2865 2e67 tiple times (e.g\n-001616a0: 2e20 6279 2074 6865 2065 6e67 696e 6520 . by the engine \n-001616b0: 616e 6420 6279 2070 6c75 6769 6e73 2920 and by plugins) \n-001616c0: 746f 2063 6c6f 7365 2074 6865 2073 616d to close the sam\n-001616d0: 6520 736f 636b 6574 203c 636f 6465 3e3c e socket <\n-001616e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001616f0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00161700: 6d6c 2361 3135 3739 6264 3862 6431 3036 ml#a1579bd8bd106\n-00161710: 6166 6339 6139 3036 6136 3733 6361 3437 afc9a906a673ca47\n-00161720: 3330 3436 2220 7469 746c 653d 2254 6865 3046\" title=\"The\n-00161730: 2073 6f63 6b65 7420 7365 7420 6279 2073 socket set by s\n-00161740: 6f61 705f 6163 6365 7074 2028 6f72 2074 oap_accept (or t\n-00161750: 6865 2043 2b2b 2073 6572 7669 6365 2063 he C++ service c\n-00161760: 6c61 7373 2061 6363 6570 7420 6d65 7468 lass accept meth\n-00161770: 6f64 2920 6f72 2073 6f61 705f 636f 6e6e od) or soap_conn\n-00161780: 6563 7420 6f72 2073 6f61 705f 636f 6e6e ect or soap_conn\n-00161790: 6563 2e2e 2e22 3e73 6f61 703a 3a73 6f63 ec...\">soap::soc\n-001617a0: 6b65 743c 2f61 3e3c 2f63 6f64 653e 2e20 ket. \n-001617b0: 4368 6563 6b73 2069 6e74 6572 6e61 6c6c Checks internall\n-001617c0: 7920 6966 203c 636f 6465 3e3c 6120 636c y if soap::socket<\n-00161890: 2f61 3e3c 2f63 6f64 653e 203d 3d20 3c63 /a> == #SOAP_INVALI\n-001618b0: 445f 534f 434b 4554 3c2f 636f 6465 3e20 D_SOCKET
    \n-001618c0: 6265 666f 7265 2063 6c6f 7369 6e67 2c20 before closing, \n-001618d0: 7768 6963 6820 6d65 616e 7320 7468 6174 which means that\n-001618e0: 2074 6865 2073 6f63 6b65 7420 7761 7320 the socket was \n-001618f0: 616c 7265 6164 7920 636c 6f73 6564 2e20 already closed. \n-00161900: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-00161910: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-00161920: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-001619e0: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-001619f0: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n-00161a00: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n-00161a10: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n-00161a20: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap\n-00161ac0: 3a3a 6663 6c6f 7365 3c2f 613e 3c2f 636f ::fclose is tcp\n-00161ae0: 5f64 6973 636f 6e6e 6563 743c 2f63 6f64 _disconnect.

    .

    \n-00161b20: 3c2f 613e 0a66 7265 736f 6c76 653c 2f68 .fresolve.

    int \n-00161b40: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::f\n-00161be0: 7265 736f 6c76 653c 2f61 3e29 2873 7472 resolve)(str\n-00161bf0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-00161c00: 636f 6e73 7420 6368 6172 202a 6164 6472 const char *addr\n-00161c10: 2c20 7374 7275 6374 2069 6e5f 6164 6472 , struct in_addr\n-00161c20: 202a 696e 6164 6472 293c 2f63 6f64 653e *inaddr)\n-00161c30: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-00161c40: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00161c50: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap_b\n-00161cd0: 696e 643c 2f61 3e3c 2f63 6f64 653e 2028 ind (\n-00161ce0: 6f72 2074 6865 2043 2b2b 2073 6572 7669 or the C++ servi\n-00161cf0: 6365 2063 6c61 7373 203c 636f 6465 3e62 ce class b\n-00161d00: 696e 643c 2f63 6f64 653e 206d 6574 686f ind metho\n-00161d10: 6429 2061 7420 7468 6520 7365 7276 6572 d) at the server\n-00161d20: 2d73 6964 6520 616e 6420 6279 203c 636f -side and by so\n-00161db0: 6170 5f63 6f6e 6e65 6374 3c2f 613e 3c2f ap_connect or <\n-00161dd0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00161de0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00161df0: 5f69 6f2e 6874 6d6c 2367 6133 3135 6236 _io.html#ga315b6\n-00161e00: 6531 6435 3838 3837 3830 6266 3465 6633 e1d5888780bf4ef3\n-00161e10: 3230 6335 3066 3233 3739 3622 2074 6974 20c50f23796\" tit\n-00161e20: 6c65 3d22 436f 6e6e 6563 7420 746f 2061 le=\"Connect to a\n-00161e30: 2073 6572 7665 722e 223e 736f 6170 5f63 server.\">soap_c\n-00161e40: 6f6e 6e65 6374 5f63 6f6d 6d61 6e64 3c2f onnect_command at the\n-00161e60: 2063 6c69 656e 742d 7369 6465 2077 6974 client-side wit\n-00161e70: 6820 6120 686f 7374 203c 636f 6465 3e6e h a host n\n-00161e80: 616d 653c 2f63 6f64 653e 2070 6172 616d ame param\n-00161e90: 6574 6572 2074 6f20 7265 736f 6c76 6520 eter to resolve \n-00161ea0: 746f 2061 6464 7265 7373 203c 636f 6465 to address inaddr b\n-00161ec0: 7920 6164 6472 6573 7320 7472 616e 736c y address transl\n-00161ed0: 6174 696f 6e2e 2057 6865 6e20 7375 6363 ation. When succ\n-00161ee0: 6573 7366 756c 2073 6574 7320 7061 7261 essful sets para\n-00161ef0: 6d65 7465 7220 3c63 6f64 653e 696e 6164 meter inad\n-00161f00: 6472 3c2f 636f 6465 3e20 616e 6420 7265 dr and re\n-00161f10: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-00161f20: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-00161f30: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-00161ff0: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n-00162000: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n-00162010: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n-00162020: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n-00162030: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::fresolve<\n-001620e0: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is tcp_gethost<\n-00162100: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    \n-00162110: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fconnec\n-00162140: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

    .

    \n-00162150: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fconnect<\n-00162200: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n-00162210: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-00162220: 6172 202a 656e 6470 6f69 6e74 2c20 636f ar *endpoint, co\n-00162230: 6e73 7420 6368 6172 202a 686f 7374 2c20 nst char *host, \n-00162240: 696e 7420 706f 7274 293c 2f63 6f64 653e int port)\n-00162250: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-00162260: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00162270: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n-00162280: 206f 7074 696f 6e61 6c6c 7920 6f76 6572 optionally over\n-00162290: 7269 6465 2063 6c69 656e 742d 7369 6465 ride client-side\n-001622a0: 2063 6f6e 6e65 6374 696e 672e 2054 6865 connecting. The\n-001622b0: 2070 6172 616d 6574 6572 7320 3c63 6f64 parameters host an\n-001622d0: 6420 3c63 6f64 653e 706f 7274 3c2f 636f d port were micro-p\n-001622f0: 6172 7365 6420 6672 6f6d 2074 6865 203c arsed from the <\n-00162300: 636f 6465 3e65 6e64 706f 696e 743c 2f63 code>endpoint prior to pa\n-00162320: 7373 696e 6720 7468 656d 2074 6f20 7468 ssing them to th\n-00162330: 6973 2063 616c 6c62 6163 6b2e 2052 6574 is callback. Ret\n-00162340: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00162350: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00162360: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-00162420: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00162430: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00162440: 4e6f 2062 7569 6c74 2d69 6e20 6675 6e63 No built-in func\n-00162450: 7469 6f6e 2069 7320 6173 7369 676e 6564 tion is assigned\n-00162460: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fcon\n-00162510: 6e65 6374 3c2f 613e 3c2f 636f 6465 3e2e nect.\n-00162520: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fdisconnect.

    int \n-00162570: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fdis\n-00162610: 636f 6e6e 6563 743c 2f61 3e29 2873 7472 connect)(str\n-00162620: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-00162630: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-00162640: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-00162650: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n-00162660: 696e 6520 3c63 6f64 653e 3c61 2063 6c61 ine soa\n-001626e0: 705f 636c 6f73 6573 6f63 6b3c 2f61 3e3c p_closesock<\n-001626f0: 2f63 6f64 653e 2062 6566 6f72 6520 7468 /code> before th\n-00162700: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::f\n-001627a0: 636c 6f73 653c 2f61 3e3c 2f63 6f64 653e close\n-001627b0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-001627c0: 6c65 6420 746f 2073 6875 7464 6f77 6e2f led to shutdown/\n-001627d0: 6469 7363 6f6e 6e65 6374 2e20 5265 7475 disconnect. Retu\n-001627e0: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-001627f0: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-00162800: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-001628c0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-001628d0: 7429 2065 7272 6f72 2063 6f64 652e 204e t) error code. N\n-001628e0: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n-001628f0: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n-00162900: 746f 203c 636f 6465 3e3c 6120 636c 6173 to so\n-001629a0: 6170 3a3a 6664 6973 636f 6e6e 6563 743c ap::fdisconnect<\n-001629b0: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n-001629c0: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fcl\n-001629f0: 6f73 6573 6f63 6b65 743c 2f68 333e 0a3c osesocket

    .<\n-00162a00: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (s\n-00162a90: 6f61 703a 3a66 636c 6f73 6573 6f63 6b65 oap::fclosesocke\n-00162aa0: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so\n-00162ab0: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S\n-00162ac0: 4f43 4b45 5420 736f 636b 293c 2f63 6f64 OCKET sock)

    .

    This c\n-00162ae0: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-00162af0: 6420 746f 2063 6c6f 7365 2061 2073 6f63 d to close a soc\n-00162b00: 6b65 7420 6279 2074 6865 2065 6e67 696e ket by the engin\n-00162b10: 652e 2052 6574 7572 6e73 203c 636f 6465 e. Returns #SOAP_OK\n-00162b30: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n-00162bf0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n-00162c10: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n-00162c20: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n-00162c30: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to \n-00162cc0: 736f 6170 3a3a 6663 6c6f 7365 736f 636b soap::fclosesock\n-00162cd0: 6574 3c2f 613e 3c2f 636f 6465 3e20 6973 et is\n-00162ce0: 203c 636f 6465 3e74 6370 5f63 6c6f 7365 tcp_close\n-00162cf0: 736f 636b 6574 3c2f 636f 6465 3e2e 3c2f socket..

    .\n-00162d30: 6673 6875 7464 6f77 6e73 6f63 6b65 743c fshutdownsocket<\n-00162d40: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-00162d50: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n-00162de0: 7368 7574 646f 776e 736f 636b 6574 3c2f shutdownsocket)(struct soap \n-00162e00: 2a73 6f61 702c 2053 4f41 505f 534f 434b *soap, SOAP_SOCK\n-00162e10: 4554 2073 6f63 6b2c 2069 6e74 2068 6f77 ET sock, int how\n-00162e20: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n-00162e30: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n-00162e40: 2063 616c 6c65 6420 746f 2073 6875 7420 called to shut \n-00162e50: 646f 776e 2061 2073 6f63 6b65 7420 6279 down a socket by\n-00162e60: 2074 6865 2065 6e67 696e 652e 2052 6574 the engine. Ret\n-00162e70: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00162e80: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00162e90: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-00162f50: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00162f60: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00162f70: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00162f80: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-00162f90: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so\n-00163020: 6170 3a3a 6673 6875 7464 6f77 6e73 6f63 ap::fshutdownsoc\n-00163030: 6b65 743c 2f61 3e3c 2f63 6f64 653e 2069 ket i\n-00163040: 7320 3c63 6f64 653e 7463 705f 7368 7574 s tcp_shut\n-00163050: 646f 776e 736f 636b 6574 3c2f 636f 6465 downsocket.

    .

    <\n-00163090: 2f61 3e0a 6670 6f6c 6c3c 2f68 333e 0a3c /a>.fpoll

    .<\n-001630a0: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (soap::f\n-00163170: 706f 6c6c 3c2f 613e 2928 7374 7275 6374 poll)(struct\n-00163180: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This \n-001631a0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n-001631b0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-001631c0: 2074 6f20 7761 6974 2066 6f72 2061 6374 to wait for act\n-001631d0: 6976 6974 7920 6f6e 2074 6865 203c 636f ivity on the soap:\n-001632a0: 3a73 6f63 6b65 743c 2f61 3e3c 2f63 6f64 :socket or soap::master\n-00163380: 3c2f 613e 3c2f 636f 6465 3e20 736f 636b sock\n-00163390: 6574 2075 7369 6e67 203c 636f 6465 3e70 et using p\n-001633a0: 6f6c 6c3c 2f63 6f64 653e 206f 7220 3c63 oll or select. Times out whe\n-001633d0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n \n-00163480: 736f 6170 3a3a 7365 6e64 5f74 696d 656f soap::send_timeo\n-00163490: 7574 3c2f 613e 3c2f 636f 6465 3e20 6f72 ut or\n-001634a0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::recv_tim\n-00163560: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout \n-00163570: 6172 6520 6e6f 6e7a 6572 6f2e 2052 6574 are nonzero. Ret\n-00163580: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00163590: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-001635a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-00163660: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00163670: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00163680: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00163690: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-001636a0: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fpoll<\n-00163770: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is soap_poll.

    .

    .frecv.

    size_\n-001637e0: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap\n-00163880: 3a3a 6672 6563 763c 2f61 3e29 2873 7472 ::frecv)(str\n-00163890: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-001638a0: 6368 6172 202a 6275 662c 2073 697a 655f char *buf, size_\n-001638b0: 7420 6c65 6e29 3c2f 636f 6465 3e3c 2f70 t len).

    This callba\n-001638d0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-001638e0: 7468 6520 656e 6769 6e65 2074 6f20 7265 the engine to re\n-001638f0: 6365 6976 6520 286f 7220 7265 6164 2920 ceive (or read) \n-00163900: 6461 7461 2069 6e74 6f20 6120 7370 6563 data into a spec\n-00163910: 6966 6965 6420 6275 6666 6572 203c 636f ified buffer buf an\n-00163930: 6420 3c63 6f64 653e 6c65 6e3c 2f63 6f64 d len. The source f\n-00163950: 6f72 2074 6865 2064 6174 6120 746f 2072 or the data to r\n-00163960: 6561 6420 6279 2074 6869 7320 6361 6c6c ead by this call\n-00163970: 6261 636b 2069 7320 3c63 6f64 653e 3c61 back is soap::is when n\n-00163a50: 6f6e 2d4e 554c 4c2c 203c 636f 6465 3e3c on-NULL, <\n-00163a60: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00163a70: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00163a80: 6d6c 2361 3135 3739 6264 3862 6431 3036 ml#a1579bd8bd106\n-00163a90: 6166 6339 6139 3036 6136 3733 6361 3437 afc9a906a673ca47\n-00163aa0: 3330 3436 2220 7469 746c 653d 2254 6865 3046\" title=\"The\n-00163ab0: 2073 6f63 6b65 7420 7365 7420 6279 2073 socket set by s\n-00163ac0: 6f61 705f 6163 6365 7074 2028 6f72 2074 oap_accept (or t\n-00163ad0: 6865 2043 2b2b 2073 6572 7669 6365 2063 he C++ service c\n-00163ae0: 6c61 7373 2061 6363 6570 7420 6d65 7468 lass accept meth\n-00163af0: 6f64 2920 6f72 2073 6f61 705f 636f 6e6e od) or soap_conn\n-00163b00: 6563 7420 6f72 2073 6f61 705f 636f 6e6e ect or soap_conn\n-00163b10: 6563 2e2e 2e22 3e73 6f61 703a 3a73 6f63 ec...\">soap::soc\n-00163b20: 6b65 743c 2f61 3e3c 2f63 6f64 653e 2077 ket w\n-00163b30: 6865 6e20 7661 6c69 642c 206f 7220 3c63 hen valid, or soap\n-00163c00: 3a3a 7265 6376 6664 3c2f 613e 3c2f 636f ::recvfd. Returns #SOAP_OK or a s\n-00163cf0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n-00163d10: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n-00163d20: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n-00163d30: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-00163d40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::f\n-00163de0: 7265 6376 3c2f 613e 3c2f 636f 6465 3e20 recv \n-00163df0: 6973 203c 636f 6465 3e66 7265 6376 3c2f is frecv.

    .

    <\n-00163e10: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-00163e20: 2069 643d 2261 7574 6f74 6f63 5f6d 6435 id=\"autotoc_md5\n-00163e30: 3522 3e3c 2f61 3e0a 6673 656e 643c 2f68 5\">.fsend.

    int \n-00163e50: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap:\n-00163ee0: 3a66 7365 6e64 3c2f 613e 2928 7374 7275 :fsend)(stru\n-00163ef0: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-00163f00: 6f6e 7374 2063 6861 7220 2a62 7566 2c20 onst char *buf, \n-00163f10: 7369 7a65 5f74 206c 656e 293c 2f63 6f64 size_t len)

    .

    This c\n-00163f30: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-00163f40: 6420 6279 2074 6865 2065 6e67 696e 6520 d by the engine \n-00163f50: 746f 2073 656e 6420 286f 7220 7772 6974 to send (or writ\n-00163f60: 6529 2064 6174 6120 7370 6563 6966 6965 e) data specifie\n-00163f70: 6420 6279 203c 636f 6465 3e64 6174 613c d by data<\n-00163f80: 2f63 6f64 653e 2062 7974 6573 206f 6620 /code> bytes of \n-00163f90: 6c65 6e67 7468 203c 636f 6465 3e6c 656e length len\n-00163fa0: 3c2f 636f 6465 3e2e 2054 6865 2073 696e . The sin\n-00163fb0: 6b20 666f 7220 7468 6520 6461 7461 2074 k for the data t\n-00163fc0: 6f20 6265 2073 656e 7420 746f 2069 7320 o be sent to is \n-00163fd0: 7479 7069 6361 6c6c 7920 3c63 6f64 653e typically \n-00163fe0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so\n-001640a0: 636b 6574 3c2f 613e 3c2f 636f 6465 3e2c cket,\n-001640b0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-00164170: 6f61 703a 3a73 656e 6466 643c 2f61 3e3c oap::sendfd<\n-00164180: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n-00164190: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::os\n-00164250: 3c2f 613e 3c2f 636f 6465 3e2e 2052 6574 . Ret\n-00164260: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00164270: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00164280: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-00164340: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00164350: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00164360: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00164370: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-00164380: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fsend is fsend.<\n-00164440: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n-00164470: 0a66 7365 7276 6572 6c6f 6f70 3c2f 6833 .fserverloop.

    int (\n-00164490: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fser\n-00164560: 7665 6c6f 6f70 3c2f 613e 2928 7374 7275 veloop)(stru\n-00164570: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)

    .

    Thi\n-00164590: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n-001645a0: 6c6c 6564 2061 6674 6572 2065 6163 6820 lled after each \n-001645b0: 7375 6363 6573 7366 756c 2063 6f6d 706c successful compl\n-001645c0: 6574 696f 6e20 6f66 2061 2073 6572 7665 etion of a serve\n-001645d0: 7220 6f70 6572 6174 696f 6e20 696e 2074 r operation in t\n-001645e0: 6865 2073 6572 7665 7220 6c6f 6f70 2e20 he server loop. \n-001645f0: 4578 6563 7574 6573 2069 6d6d 6564 6961 Executes immedia\n-00164600: 7465 6c79 2061 6674 6572 2073 656e 6469 tely after sendi\n-00164610: 6e67 2074 6865 2072 6573 706f 6e73 6520 ng the response \n-00164620: 746f 2061 2063 6c69 656e 7420 616e 6420 to a client and \n-00164630: 6265 666f 7265 2074 6865 206e 6578 7420 before the next \n-00164640: 6b65 6570 2d61 6c69 7665 2073 6572 7665 keep-alive serve\n-00164650: 7220 6c6f 6f70 2069 7465 7261 7469 6f6e r loop iteration\n-00164660: 2077 6865 6e20 656e 6162 6c65 6420 7769 when enabled wi\n-00164670: 7468 203c 636f 6465 3e23 534f 4150 5f49 th #SOAP_I\n-00164680: 4f5f 4b45 4550 414c 4956 453c 2f63 6f64 O_KEEPALIVE. This callbac\n-001646a0: 6b20 6361 6e20 6265 2075 7365 6420 746f k can be used to\n-001646b0: 2072 6563 6c61 696d 2072 6573 6f75 7263 reclaim resourc\n-001646c0: 6573 2069 6e20 7468 6520 6b65 6570 2d61 es in the keep-a\n-001646d0: 6c69 7665 2073 6572 7665 7220 6c6f 6f70 live server loop\n-001646e0: 2c20 666f 7220 6578 616d 706c 6520 6d61 , for example ma\n-001646f0: 6e61 6765 6420 6d65 6d6f 7279 2063 616e naged memory can\n-00164700: 2062 6520 7265 636c 6169 6d65 6420 6279 be reclaimed by\n-00164710: 2063 616c 6c69 6e67 203c 636f 6465 3e3c calling <\n-00164720: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00164730: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00164740: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-00164750: 6637 6430 3137 3631 3631 6539 6465 6633 f7d0176161e9def3\n-00164760: 3639 3831 6532 3466 6161 3139 3133 6439 6981e24faa1913d9\n-00164770: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n-00164780: 616c 6c20 6479 6e61 6d69 6361 6c6c 792d all dynamically-\n-00164790: 616c 6c6f 6361 7465 6420 432b 2b20 6f62 allocated C++ ob\n-001647a0: 6a65 6374 7320 6d61 6e61 6765 6420 6279 jects managed by\n-001647b0: 2074 6865 2073 7065 6369 6669 6564 2073 the specified s\n-001647c0: 6f61 7020 636f 6e74 6578 742e 223e 736f oap context.\">so\n-001647d0: 6170 5f64 6573 7472 6f79 3c2f 613e 3c2f ap_destroy and \n-001647f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end\n-001648c0: 3c2f 636f 6465 3e20 696e 2074 6861 7420 in that \n-001648d0: 6f72 6465 7220 616e 6420 616c 6c20 6465 order and all de\n-001648e0: 7365 7269 616c 697a 6564 2061 6e64 206f serialized and o\n-001648f0: 7468 6572 2064 796e 616d 6963 616c 6c79 ther dynamically\n-00164900: 2d61 6c6c 6f63 6174 6564 2064 6174 6120 -allocated data \n-00164910: 6d61 6e61 6765 6420 6279 2074 6865 2063 managed by the c\n-00164920: 6f6e 7465 7874 2077 696c 6c20 6265 2064 ontext will be d\n-00164930: 6561 6c6c 6f63 6174 6564 2e20 5265 7475 eallocated. Retu\n-00164940: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-00164950: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-00164960: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-00164a20: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-00164a30: 7429 2065 7272 6f72 2063 6f64 652e 204e t) error code. N\n-00164a40: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n-00164a50: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n-00164a60: 746f 203c 636f 6465 3e3c 6120 636c 6173 to s\n-00164b30: 6f61 703a 3a66 7365 7276 656c 6f6f 703c oap::fserveloop<\n-00164b40: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n-00164b50: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fma\n-00164b80: 6c6c 6f63 3c2f 6833 3e0a 3c70 3e3c 636f lloc

    .

    void (soap::fmall\n-00164c40: 6f63 3c2f 613e 2928 7374 7275 6374 2073 oc)(struct s\n-00164c50: 6f61 7020 2a73 6f61 702c 2073 697a 655f oap *soap, size_\n-00164c60: 7420 7369 7a65 293c 2f63 6f64 653e 3c2f t size).

    This callb\n-00164c80: 6163 6b20 6361 6e20 6265 2075 7365 6420 ack can be used \n-00164c90: 746f 206f 7665 7272 6964 6520 6d65 6d6f to override memo\n-00164ca0: 7279 2061 6c6c 6f63 6174 696f 6e20 616e ry allocation an\n-00164cb0: 6420 6d61 6e61 6765 6d65 6e74 2064 6f6e d management don\n-00164cc0: 6520 6279 203c 636f 6465 3e3c 6120 636c e by soa\n-00164d70: 705f 6d61 6c6c 6f63 3c2f 613e 3c2f 636f p_malloc in C. Memory\n-00164d90: 2061 6c6c 6f63 6174 6564 2076 6961 2074 allocated via t\n-00164da0: 6869 7320 6361 6c6c 6261 636b 2077 696c his callback wil\n-00164db0: 6c20 6e6f 7420 6265 206d 616e 6167 6564 l not be managed\n-00164dc0: 2061 6e64 206e 6f74 2062 6520 6175 746f and not be auto\n-00164dd0: 6d61 7469 6361 6c6c 7920 7265 6c65 6173 matically releas\n-00164de0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-00164df0: 2e20 496e 7374 6561 642c 2074 6865 2061 . Instead, the a\n-00164e00: 7070 6c69 6361 7469 6f6e 2075 7369 6e67 pplication using\n-00164e10: 2074 6869 7320 6361 6c6c 6261 636b 2073 this callback s\n-00164e20: 686f 756c 6420 7265 6c65 6173 6520 616c hould release al\n-00164e30: 6c6f 6361 7465 6420 6d65 6d6f 7279 2e20 located memory. \n-00164e40: 416c 6c20 616c 6c6f 6361 7469 6f6e 7320 All allocations \n-00164e50: 646f 6e65 2062 7920 3c63 6f64 653e 3c61 done by \n-00164f00: 736f 6170 5f6d 616c 6c6f 633c 2f61 3e3c soap_malloc<\n-00164f10: 2f63 6f64 653e 2061 7265 2072 6570 6c61 /code> are repla\n-00164f20: 6365 6420 7769 7468 2061 2063 616c 6c20 ced with a call \n-00164f30: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::fmall\n-00164fe0: 6f63 3c2f 613e 3c2f 636f 6465 3e2e 2048 oc. H\n-00164ff0: 6f77 6576 6572 2c20 6e6f 206f 7468 6572 owever, no other\n-00165000: 2061 6c6c 6f63 6174 696f 6e73 2c20 7375 allocations, su\n-00165010: 6368 2061 7320 3c63 6f64 653e 3c61 2063 ch as soap_new<\n-001650b0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_new_T for C++ class\n-001650e0: 6573 203c 636f 6465 3e54 3c2f 636f 6465 es T are affected, \n-00165100: 6265 6361 7573 6520 6f62 6a65 6374 7320 because objects \n-00165110: 6172 6520 616c 6c6f 6361 7465 6420 6469 are allocated di\n-00165120: 6666 6572 656e 746c 792e 2054 6869 7320 fferently. This \n-00165130: 6361 6c6c 6261 636b 2069 7320 7468 6572 callback is ther\n-00165140: 6566 6f72 6520 6e6f 7420 7573 6566 756c efore not useful\n-00165150: 2066 6f72 2043 2b2b 2061 7070 6c69 6361 for C++ applica\n-00165160: 7469 6f6e 732e 2052 6574 7572 6e73 2061 tions. Returns a\n-00165170: 2070 6f69 6e74 6572 2074 6f20 6479 6e61 pointer to dyna\n-00165180: 6d69 6361 6c6c 7920 616c 6c6f 6361 7465 mically allocate\n-00165190: 6420 6d65 6d6f 7279 206f 7220 4e55 4c4c d memory or NULL\n-001651a0: 206f 6e20 6661 696c 7572 6520 746f 2061 on failure to a\n-001651b0: 6c6c 6f63 6174 652e 204e 6f20 6275 696c llocate. No buil\n-001651c0: 742d 696e 2066 756e 6374 696f 6e20 6973 t-in function is\n-001651d0: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to s\n-00165280: 6f61 703a 3a66 6d61 6c6c 6f63 3c2f 613e oap::fmalloc\n-00165290: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 646c .

    .
    War\n-001652c0: 6e69 6e67 3c2f 6474 3e3c 6464 3e44 6570 ning
    Dep\n-001652d0: 7265 6361 7465 6420 7369 6e63 6520 322e recated since 2.\n-001652e0: 382e 3732 2e20 4465 6669 6e65 203c 636f 8.72. Define #SOAP_MALLOC<\n-00165300: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and #SOAP_FREE instead.
    \n-00165330: 3c2f 646c 3e0a 3c68 333e 3c61 2063 6c61 .

    .user variable\n-00165370: 3c2f 6833 3e0a 3c70 3e41 203c 636f 6465

    .

    A void* s\n-00165440: 6f61 703a 3a75 7365 723c 2f61 3e3c 2f63 oap::user variable is\n-00165460: 2061 7661 696c 6162 6c65 2074 6f20 7061 available to pa\n-00165470: 7373 2075 7365 722d 6465 6669 6e65 6420 ss user-defined \n-00165480: 6461 7461 2074 6f20 7468 6520 6361 6c6c data to the call\n-00165490: 6261 636b 732e 3c2f 703e 0a3c 6833 3e3c backs.

    .

    <\n-001654a0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-001654b0: 2069 643d 2261 7574 6f74 6f63 5f6d 6435 id=\"autotoc_md5\n-001654c0: 3922 3e3c 2f61 3e0a 4578 616d 706c 6573 9\">.Examples\n-001654d0: 3c2f 6833 3e0a 3c70 3e54 6865 2066 6f6c

    .

    The fol\n-001654e0: 6c6f 7769 6e67 2065 7861 6d70 6c65 2075 lowing example u\n-001654f0: 7365 7320 492f 4f20 6361 6c6c 6261 636b ses I/O callback\n-00165500: 7320 666f 7220 6375 7374 6f6d 697a 6564 s for customized\n-00165510: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n-00165520: 6620 6461 7461 2069 6e74 6f20 6120 6669 f data into a fi\n-00165530: 7865 642d 7369 7a65 2062 7566 6665 7220 xed-size buffer \n-00165540: 616e 6420 6465 7365 7269 616c 697a 6174 and deserializat\n-00165550: 696f 6e20 6261 636b 2069 6e74 6f20 6120 ion back into a \n-00165560: 6461 7461 2073 7472 7563 7475 7265 3a3c data structure:<\n-00165570: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    char buf[10000]; // XML buffe\n-001655f0: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    .\n-00165600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-00165630: 2f73 7061 6e3e 206c 656e 3120 3d20 303b /span> len1 = 0;\n-00165640: 2020 2020 3c73 7061 6e20 636c 6173 733d // #ch\n-00165660: 6172 7320 7772 6974 7465 6e20 3c2f 7370 ars written
    .
    int\n-001656b0: 206c 656e 3220 3d20 303b 2020 2020 3c73 len2 = 0; // #chars re\n-001656e0: 6164 203c 2f73 7061 6e3e 3c2f 6469 763e ad
    \n-001656f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    // mysend: pu\n-00165740: 7420 584d 4c20 696e 2062 7566 5b5d 203c t XML in buf[] <\n-00165750: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-00165770: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165780: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int mysend(struct <\n-001657c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001657d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001657e0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001657f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00165820: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-00165860: 6172 3c2f 7370 616e 3e20 2a73 2c20 3c73 ar *s, size_t n)
    .\n-001658a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (len1 + n >\n-00165900: 203c 7370 616e 2063 6c61 7373 3d22 6b65 sizeof(buf)) .
    return \n-00165970: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOF\n-001659d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    str\n-001659f0: 6370 7928 6275 6620 2b20 6c65 6e31 2c20 cpy(buf + len1, \n-00165a00: 7329 3b20 3c2f 6469 763e 0a3c 6469 7620 s);
    .
    l\n-00165a20: 656e 3120 2b3d 206e 3b20 3c2f 6469 763e en1 += n;
    \n-00165a30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-00165a60: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK; .
    }
    .\n-00165af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    // myrecv: get\n-00165b40: 2058 4d4c 2066 726f 6d20 6275 665b 5d20 XML from buf[] \n-00165b50: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00165b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n-00165b90: 3c2f 7370 616e 3e20 6d79 7265 6376 283c myrecv(<\n-00165ba0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165bb0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-00165c20: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, c\n-00165c40: 6861 723c 2f73 7061 6e3e 202a 732c 203c har *s, <\n-00165c50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165c60: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n-00165c70: 2f73 7061 6e3e 206e 2920 3c2f 6469 763e /span> n)
    \n-00165c80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00165cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165cc0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (len2 + n >\n-00165ce0: 3b20 6c65 6e31 2920 3c2f 6469 763e 0a3c ; len1)
    .<\n-00165cf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00165d00: 3e20 2020 206e 203d 206c 656e 3120 2d20 > n = len1 - \n-00165d10: 6c65 6e32 3b20 3c2f 6469 763e 0a3c 6469 len2;
    . \n-00165d30: 2073 7472 6e63 7079 2873 2c20 6275 6620 strncpy(s, buf \n-00165d40: 2b20 6c65 6e32 2c20 6e29 3b20 3c2f 6469 + len2, n); .
    len2 += n\n-00165d70: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    return n;
    .<\n-00165dc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00165dd0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}

    .
    .
    \n-00165e20: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-00165e30: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str\n-00165e80: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    str\n-00165f20: 7563 7420 3c2f 7370 616e 3e6e 735f 5f70 uct ns__p\n-00165f30: 6572 736f 6e20 703b 203c 2f64 6976 3e0a erson p;
    .\n-00165f40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n-00166070: 6c65 6e31 203d 206c 656e 3220 3d20 303b len1 = len2 = 0;\n-00166080: 2020 2020 203c 7370 616e 2063 6c61 7373 // re\n-001660a0: 7365 7420 6275 6666 6572 2070 6f69 6e74 set buffer point\n-001660b0: 6572 7320 3c2f 7370 616e 3e3c 2f64 6976 ers .
    p.name = <\n-001660e0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001660f0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00166100: 3b4a 6f68 6e20 446f 6526 7175 6f74 3b3c ;John Doe"<\n-00166110: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-00166120: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00166130: 3e20 2070 2e61 6765 203d 2032 353b 203c > p.age = 25; <\n-00166140: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fsend = mys\n-001661f0: 656e 643b 203c 7370 616e 2063 6c61 7373 end; // as\n-00166210: 7369 676e 2063 616c 6c62 6163 6b20 3c2f sign callback
    . \n-00166240: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-00166270: 3c61 2063 6c61 7373 3d22 636f 6465 2220 frecv\n-001662d0: 203d 206d 7972 6563 763b 203c 7370 616e = myrecv; // assign callb\n-00166300: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack .
    \n-00166340: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-00166350: 7772 6974 655f 6e73 5f5f 7065 7273 6f6e write_ns__person\n-00166360: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00166390: 703c 2f61 3e2c 2026 616d 703b 7029 293c p, &p))<\n-001663a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    soap_\n-00166430: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-00166440: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00166470: 3c2f 613e 2c20 7374 646f 7574 293b 203c , stdout); <\n-00166480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    exit\n-001664a0: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); \n-001664b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    if (soa\n-00166510: 705f 7265 6164 5f6e 735f 5f50 6572 736f p_read_ns__Perso\n-00166520: 6e28 2661 6d70 3b3c 6120 636c 6173 733d n(&so\n-00166550: 6170 3c2f 613e 2c20 2661 6d70 3b70 2929 ap, &p))\n-00166560: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap\n-001665f0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-00166600: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00166630: 703c 2f61 3e2c 2073 7464 6f75 7429 3b20 p, stdout); \n-00166640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi\n-00166660: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n-00166670: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .\n-00166800: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n-00166a40: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00166a60: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00166a70: 3a34 3630 373c 2f64 6976 3e3c 2f64 6976 :4607
    .
    \n-00166b60: 696e 7428 2a20 6673 656e 6429 2873 7472 int(* fsend)(str\n-00166b70: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-00166b80: 636f 6e73 7420 6368 6172 202a 6461 7461 const char *data\n-00166b90: 2c20 7369 7a65 5f74 206c 656e 293c 2f64 , size_t len)
    Callback t\n-00166bc0: 6861 7420 7365 6e64 7320 7468 6520 6769 hat sends the gi\n-00166bd0: 7665 6e20 6279 7465 7320 6f66 2064 6174 ven bytes of dat\n-00166be0: 612e 3c2f 6469 763e 3c64 6976 2063 6c61 a.
    De\n-00166c00: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00166c10: 6473 6f61 7032 2e68 3a34 3632 303c 2f64 dsoap2.h:4620
    .
    \n-00166c30: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The follo\n-00168170: 7769 6e67 2065 7861 6d70 6c65 2069 6c6c wing example ill\n-00168180: 7573 7472 6174 6573 2063 7573 746f 6d69 ustrates customi\n-00168190: 7a65 6420 492f 4f20 616e 6420 4854 5450 zed I/O and HTTP\n-001681a0: 2068 6561 6465 7220 6861 6e64 6c69 6e67 header handling\n-001681b0: 2e20 5468 6520 584d 4c20 6d65 7373 6167 . The XML messag\n-001681c0: 6520 6973 2073 6176 6564 2074 6f20 6120 e is saved to a \n-001681d0: 6669 6c65 2074 6f20 6465 6d6f 6e73 7472 file to demonstr\n-001681e0: 6174 6520 492f 4f20 616e 6420 4854 5450 ate I/O and HTTP\n-001681f0: 2063 616c 6c62 6163 6b73 2e20 5468 6520 callbacks. The \n-00168200: 636c 6965 6e74 2070 726f 7879 2074 6865 client proxy the\n-00168210: 6e20 7265 6164 7320 7468 6520 6669 6c65 n reads the file\n-00168220: 2063 6f6e 7465 6e74 7320 6173 2074 6865 contents as the\n-00168230: 2073 6572 7669 6365 2072 6573 706f 6e73 service respons\n-00168240: 652e 2054 6f20 7065 7266 6f72 6d20 7468 e. To perform th\n-00168250: 6973 2074 7269 636b 2c20 7468 6520 7365 is trick, the se\n-00168260: 7276 6963 6520 7265 7370 6f6e 7365 2068 rvice response h\n-00168270: 6173 2065 7861 6374 6c79 2074 6865 2073 as exactly the s\n-00168280: 616d 6520 7374 7275 6374 7572 6520 6173 ame structure as\n-00168290: 2074 6865 2072 6571 7565 7374 2e20 5468 the request. Th\n-001682a0: 6973 2069 7320 6465 636c 6172 6564 2062 is is declared b\n-001682b0: 7920 7468 6520 3c63 6f64 653e 7374 7275 y the stru\n-001682c0: 6374 206e 735f 5f74 6573 743c 2f63 6f64 ct ns__test output parame\n-001682e0: 7465 7220 7061 7274 206f 6620 7468 6520 ter part of the \n-001682f0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-00168300: 6e20 6465 636c 6172 6174 696f 6e2e 2054 n declaration. T\n-00168310: 6869 7320 7374 7275 6374 2072 6573 656d his struct resem\n-00168320: 626c 6573 2074 6865 2073 6572 7669 6365 bles the service\n-00168330: 2072 6571 7565 7374 2028 7365 6520 7468 request (see th\n-00168340: 6520 6765 6e65 7261 7465 6420 3c65 6d3e e generated \n-00168350: 3c63 6f64 653e 736f 6170 5374 7562 2e68 soapStub.h\n-00168360: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n-00168370: 6520 6765 6e65 7261 7465 6420 6279 2073 e generated by s\n-00168380: 6f61 7063 7070 3220 6672 6f6d 2074 6865 oapcpp2 from the\n-00168390: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-001683a0: 7220 6669 6c65 2069 6e70 7574 292e 3c2f r file input)..

    The interf\n-001683c0: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-001683d0: 666f 7220 736f 6170 6370 7032 2069 733a for soapcpp2 is:\n-001683e0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns se\n-00168430: 7276 6963 6520 6e61 6d65 3a20 6361 6c6c rvice name: call\n-00168440: 6261 636b 203c 2f73 7061 6e3e 3c2f 6469 back .
    //gso\n-00168480: 6170 206e 7320 7365 7276 6963 6520 6e61 ap ns service na\n-00168490: 6d65 7370 6163 653a 2075 726e 3a63 616c mespace: urn:cal\n-001684a0: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    stru\n-001684e0: 6374 203c 2f73 7061 6e3e 6e73 5f5f 7065 ct ns__pe\n-001684f0: 7273 6f6e 203c 2f64 6976 3e0a 3c64 6976 rson
    .{<\n-00168510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *name;
    .\n-00168560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00168590: 696e 743c 2f73 7061 6e3e 2061 6765 3b20 int age; \n-001685a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .
    i\n-001685f0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7465 nt ns__te\n-00168600: 7374 283c 7370 616e 2063 6c61 7373 3d22 st(struct<\n-00168620: 2f73 7061 6e3e 206e 735f 5f70 6572 736f /span> ns__perso\n-00168630: 6e20 696e 2c20 3c73 7061 6e20 636c 6173 n in, stru\n-00168650: 6374 3c2f 7370 616e 3e20 6e73 5f5f 7465 ct ns__te\n-00168660: 7374 2026 616d 703b 6f75 7429 3b3c 2f64 st &out);.

    Th\n-00168690: 6520 636c 6965 6e74 2070 726f 6772 616d e client program\n-001686a0: 2069 733a 3c2f 703e 0a3c 6469 7620 636c is:

    .
    <\n-001686c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001686d0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n-001686f0: 6c75 6465 2026 7175 6f74 3b73 6f61 7048 lude "soapH\n-00168700: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n-00168710: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n-00168750: 6f74 3b6e 732e 6e73 6d61 7026 7175 6f74 ot;ns.nsmap"\n-00168760: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    .\n-00168770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    SO\n-001687f0: 4150 5f53 4f43 4b45 543c 2f61 3e20 6d79 AP_SOCKET my\n-00168800: 6f70 656e 283c 7370 616e 2063 6c61 7373 open(struc\n-00168820: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-00168850: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *endpoint, <\n-001688e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001688f0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00168920: 3c2f 7370 616e 3e20 2a68 6f73 742c 203c *host, <\n-00168930: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00168940: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int port)
    \n-00168960: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00168990: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001689a0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (strncmp(endp\n-001689c0: 6f69 6e74 2c20 3c73 7061 6e20 636c 6173 oint, "file:&qu\n-001689f0: 6f74 3b3c 2f73 7061 6e3e 2c20 3529 2920 ot;, 5)) \n-00168a00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    printf(\n-00168a40: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00168a60: 743b 4669 6c65 206e 616d 6520 6578 7065 t;File name expe\n-00168a70: 6374 6564 5c6e 2671 756f 743b 3c2f 7370 cted\\n");
    . \n-00168aa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n-00168ac0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn SOA\n-00168b20: 505f 494e 5641 4c49 445f 534f 434b 4554 P_INVALID_SOCKET\n-00168b30: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n-00168b50: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    if ((soap<\n-00168bc0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->sendfd = soap-&g\n-00168c50: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;recvf\n-00168ca0: 643c 2f61 3e20 3d20 6f70 656e 2868 6f73 d = open(hos\n-00168cb0: 742c 204f 5f52 4457 527c 4f5f 4352 4541 t, O_RDWR|O_CREA\n-00168cc0: 542c 2053 5f49 5755 5352 7c53 5f49 5255 T, S_IWUSR|S_IRU\n-00168cd0: 5352 2929 2026 6c74 3b20 3029 203c 2f64 SR)) < 0) .
    return SOAP_INVALID\n-00168d80: 5f53 4f43 4b45 543c 2f61 3e3b 203c 2f64 _SOCKET; .
    return \n-00168dd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-00168e00: 2667 743b 3c61 2063 6c61 7373 3d22 636f >sen\n-00168e50: 6466 643c 2f61 3e3b 203c 2f64 6976 3e0a dfd;
    .\n-00168e60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    void myc\n-00168ed0: 6c6f 7365 283c 7370 616e 2063 6c61 7373 lose(struc\n-00168ef0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-00168f20: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap) .
    {
    . \n-00168f90: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap\n-00168fe0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->sendfd >\n-00169040: 3b20 3229 2020 3c73 7061 6e20 636c 6173 ; 2) // s\n-00169060: 7469 6c6c 206f 7065 6e3f 203c 2f73 7061 till open?
    .
    c\n-00169090: 6c6f 7365 283c 6120 636c 6173 733d 2263 lose(soap\n-001690c0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->sendfd); <\n-00169120: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00169130: 656e 7422 3e2f 2f20 7468 656e 2063 6c6f ent\">// then clo\n-00169140: 7365 2069 7420 3c2f 7370 616e 3e3c 2f64 se it .
    s\n-00169190: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->recvfd \n-001691f0: 3d20 303b 2020 2020 2020 3c73 7061 6e20 = 0; \n-00169210: 2f2f 2073 6574 2062 6163 6b20 746f 2073 // set back to s\n-00169220: 7464 696e 203c 2f73 7061 6e3e 3c2f 6469 tdin .
    so\n-00169270: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->sendfd =\n-001692d0: 2031 3b20 2020 2020 203c 7370 616e 2063 1; /\n-001692f0: 2f20 7365 7420 6261 636b 2074 6f20 7374 / set back to st\n-00169300: 646f 7574 203c 2f73 7061 6e3e 3c2f 6469 dout .
    }
    .\n-00169340: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n-00169380: 7970 6f73 7428 3c73 7061 6e20 636c 6173 ypost(stru\n-001693a0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, const <\n-00169430: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00169440: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *endpoint, \n-00169460: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001694a0: 723c 2f73 7061 6e3e 202a 686f 7374 2c20 r *host, \n-001694b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001694f0: 723c 2f73 7061 6e3e 202a 7061 7468 2c20 r *path, \n-00169500: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00169540: 723c 2f73 7061 6e3e 202a 6163 7469 6f6e r *action\n-00169550: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , ULONG64 \n-001695b0: 636f 756e 7429 203c 2f64 6976 3e0a 3c64 count)
    .\n-001695d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..}\n-00169740: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    char buf[256]; ...\n-00169b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-00169b30: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-00169b90: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .<\n-00169bc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00169bd0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-00169c10: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    .\n-00169c30: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-00169c70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00169ca0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n-00169cd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct \n-00169d10: 6e73 5f5f 7465 7374 2072 3b20 3c2f 6469 ns__test r; .
    str\n-00169d50: 7563 7420 3c2f 7370 616e 3e6e 735f 5f70 uct ns__p\n-00169d60: 6572 736f 6e20 703b 203c 2f64 6976 3e0a erson p;
    .\n-00169d70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_in\n-00169de0: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap);.
    p.name =\n-00169e40: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00169e60: 6f74 3b4a 6f68 6e20 446f 6526 7175 6f74 ot;John Doe"\n-00169e70: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n-00169e80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    p.age = 99;\n-00169ea0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap.fopen = m\n-00169f50: 796f 7065 6e3b 2020 203c 7370 616e 2063 yopen; /\n-00169f70: 2f20 7573 6520 6375 7374 6f6d 206f 7065 / use custom ope\n-00169f80: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n-00169f90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n-00169fd0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.fpost\n-0016a030: 3c2f 613e 203d 206d 7970 6f73 743b 2020 = mypost; \n-0016a040: 203c 7370 616e 2063 6c61 7373 3d22 636f // use cu\n-0016a060: 7374 6f6d 2070 6f73 7420 3c2f 7370 616e stom post
    .
    soap.fparse = \n-0016a120: 6d79 7061 7273 653b 203c 7370 616e 2063 myparse; /\n-0016a140: 2f20 7573 6520 6375 7374 6f6d 2072 6573 / use custom res\n-0016a150: 706f 6e73 6520 7061 7273 6572 203c 2f73 ponse parser
    .
    <\n-0016a180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016a190: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016a1a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-0016a1b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016a1c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0016a1d0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-0016a1e0: 6c23 6761 6239 3539 3164 6438 3064 6262 l#gab9591dd80dbb\n-0016a1f0: 3065 3537 3137 3834 6261 6435 3432 3162 0e571784bad5421b\n-0016a200: 3232 3032 223e 6663 6c6f 7365 3c2f 613e 2202\">fclose\n-0016a210: 203d 206d 7963 6c6f 7365 3b20 3c73 7061 = myclose; // use custom \n-0016a240: 636c 6f73 6520 3c2f 7370 616e 3e3c 2f64 close .
    soap_cal\n-0016a270: 6c5f 6e73 5f5f 7465 7374 2826 616d 703b l_ns__test(&\n-0016a280: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0016a2b0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016a2d0: 6f74 3b66 696c 653a 2f2f 7465 7374 2e78 ot;file://test.x\n-0016a2e0: 6d6c 2671 756f 743b 3c2f 7370 616e 3e2c ml",\n-0016a2f0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016a310: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;"\n-0016a320: 2c20 702c 2072 293b 203c 2f64 6976 3e0a , p, r);
    .\n-0016a330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-0016a360: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n-0016a390: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.error) .
    {
    .\n-0016a410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr\n-0016a480: 696e 745f 6661 756c 743c 2f61 3e28 2661 int_fault(&a\n-0016a490: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, stdout); .
    exit(E\n-0016a4f0: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .\n-0016a740: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    \n-0016a810: 736f 6170 3a3a 6670 6f73 743c 2f61 3e3c soap::fpost<\n-0016a820: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int(* f\n-0016a840: 706f 7374 2928 7374 7275 6374 2073 6f61 post)(struct soa\n-0016a850: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-0016a860: 6861 7220 2a65 6e64 706f 696e 742c 2063 har *endpoint, c\n-0016a870: 6f6e 7374 2063 6861 7220 2a68 6f73 742c onst char *host,\n-0016a880: 2069 6e74 2070 6f72 742c 2063 6f6e 7374 int port, const\n-0016a890: 2063 6861 7220 2a70 6174 682c 2063 6f6e char *path, con\n-0016a8a0: 7374 2063 6861 7220 2a61 6374 696f 6e2c st char *action,\n-0016a8b0: 2055 4c4f 4e47 3634 2063 6f75 6e74 293c ULONG64 count)<\n-0016a8c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n-0016a8e0: 2074 6861 7420 706f 7075 6c61 7465 7320 that populates \n-0016a8f0: 616e 6420 7468 656e 2073 656e 6473 2048 and then sends H\n-0016a900: 5454 5020 6865 6164 6572 7320 6672 6f6d TTP headers from\n-0016a910: 2074 6865 2063 6c69 656e 742d 7369 6465 the client-side\n-0016a920: 2074 6f20 6120 636f 6e6e 6563 7465 6420 to a connected \n-0016a930: 4854 5450 2073 6572 7665 722e 3c2f 6469 HTTP server.
    Definiti\n-0016a960: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0016a970: 2e68 3a34 3232 303c 2f64 6976 3e3c 2f64 .h:4220
    .
    <\n-0016a9f0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-0016aa00: 726f 7570 5f5f 6361 6c6c 6261 636b 732e roup__callbacks.\n-0016aa10: 6874 6d6c 2367 6139 6362 3035 6365 3938 html#ga9cb05ce98\n-0016aa20: 6638 3435 6631 3663 3932 3063 3434 3432 f845f16c920c4442\n-0016aa30: 3661 6333 3561 3522 3e73 6f61 703a 3a66 6ac35a5\">soap::f\n-0016aa40: 7061 7273 653c 2f61 3e3c 2f64 6976 3e3c parse
    <\n-0016aa50: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0016aa60: 6922 3e69 6e74 282a 2066 7061 7273 6529 i\">int(* fparse)\n-0016aa70: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0016aa80: 6170 293c 2f64 6976 3e3c 6469 7620 636c ap)
    Call\n-0016aaa0: 6261 636b 2074 6861 7420 7265 6164 7320 back that reads \n-0016aab0: 616e 6420 7061 7273 6573 2048 5454 5020 and parses HTTP \n-0016aac0: 616e 6420 4d49 4d45 2068 6561 6465 7273 and MIME headers\n-0016aad0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-0016aaf0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0016ab00: 736f 6170 322e 683a 3432 3530 3c2f 6469 soap2.h:4250
    .
    \n-0016abc0: 736f 6170 5f67 6574 6c69 6e65 3c2f 613e soap_getline\n-0016abd0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n-0016abf0: 6170 5f67 6574 6c69 6e65 2873 7472 7563 ap_getline(struc\n-0016ac00: 7420 736f 6170 202a 736f 6170 2c20 6368 t soap *soap, ch\n-0016ac10: 6172 202a 6275 662c 2069 6e74 206c 656e ar *buf, int len\n-0016ac20: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Get a \n-0016ac40: 6865 6164 6572 206c 696e 652e 3c2f 6469 header line.
    .
    <\n-0016ac60: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0016ac70: 3c70 3e53 4f41 5020 312e 312f 312e 3220

    SOAP 1.1/1.2 \n-0016ac80: 5250 4320 656e 636f 6469 6e67 2073 7065 RPC encoding spe\n-0016ac90: 6369 6669 6573 2074 6861 7420 534f 4150 cifies that SOAP\n-0016aca0: 2f58 4d4c 2065 6c65 6d65 6e74 7320 6d61 /XML elements ma\n-0016acb0: 7920 6265 2069 676e 6f72 6564 2077 6865 y be ignored whe\n-0016acc0: 6e20 7072 6573 656e 7420 696e 2061 2053 n present in a S\n-0016acd0: 4f41 5020 7061 796c 6f61 6420 6f6e 2074 OAP payload on t\n-0016ace0: 6865 2072 6563 6569 7669 6e67 2073 6964 he receiving sid\n-0016acf0: 652e 2048 6f77 6576 6572 2c20 646f 6375 e. However, docu\n-0016ad00: 6d65 6e74 2f6c 6974 6572 616c 2073 7479 ment/literal sty\n-0016ad10: 6c65 206d 6573 7361 6769 6e67 2076 616c le messaging val\n-0016ad20: 6964 6174 6573 2058 4d4c 206d 6573 7361 idates XML messa\n-0016ad30: 6765 7320 616e 6420 6578 7472 6120 656c ges and extra el\n-0016ad40: 656d 656e 7473 2063 616e 6e6f 7420 6a75 ements cannot ju\n-0016ad50: 7374 2062 6520 6967 6e6f 7265 6420 6173 st be ignored as\n-0016ad60: 2073 7563 682e 2057 6974 6820 534f 4150 such. With SOAP\n-0016ad70: 2064 6f63 756d 656e 742f 6c69 7465 7261 document/litera\n-0016ad80: 6c20 7374 796c 6520 6974 2069 7320 7265 l style it is re\n-0016ad90: 636f 6d6d 656e 6465 6420 746f 2065 6e61 commended to ena\n-0016ada0: 626c 6520 7468 6520 3c63 6f64 653e 2353 ble the #S\n-0016adb0: 4f41 505f 584d 4c5f 5354 5249 4354 3c2f OAP_XML_STRICT mode flag.\n-0016add0: 2057 6974 6820 534f 4150 2052 5043 2065 With SOAP RPC e\n-0016ade0: 6e63 6f64 696e 672c 2074 6865 2065 6e67 ncoding, the eng\n-0016adf0: 696e 6520 6967 6e6f 7265 7320 584d 4c20 ine ignores XML \n-0016ae00: 656c 656d 656e 7473 2074 6861 7420 6172 elements that ar\n-0016ae10: 6520 756e 6b6e 6f77 6e20 6279 2064 6566 e unknown by def\n-0016ae20: 6175 6c74 2c20 756e 6c65 7373 2074 6865 ault, unless the\n-0016ae30: 2058 4d4c 2061 7474 7269 6275 7465 203c XML attribute <\n-0016ae40: 656d 3e3c 636f 6465 3e6d 7573 7455 6e64 em>mustUnd\n-0016ae50: 6572 7374 616e 643d 2274 7275 6522 3c2f erstand=\"true\" is pr\n-0016ae70: 6573 656e 7420 696e 2074 6865 2058 4d4c esent in the XML\n-0016ae80: 2065 6c65 6d65 6e74 2e20 4974 206d 6179 element. It may\n-0016ae90: 2062 6520 756e 6465 7369 7261 626c 6520 be undesirable \n-0016aea0: 666f 7220 656c 656d 656e 7473 2074 6f20 for elements to \n-0016aeb0: 6265 2069 676e 6f72 6564 2077 6865 6e20 be ignored when \n-0016aec0: 7468 6520 6f75 7463 6f6d 6520 6f66 2074 the outcome of t\n-0016aed0: 6865 206f 6d69 7373 696f 6e20 6973 2075 he omission is u\n-0016aee0: 6e63 6572 7461 696e 2e20 5468 6520 3c63 ncertain. The soap::\n-0016afc0: 6669 676e 6f72 653c 2f61 3e3c 2f63 6f64 fignore callback can \n-0016afe0: 6265 2073 6574 2074 6f20 6120 6675 6e63 be set to a func\n-0016aff0: 7469 6f6e 2074 6861 7420 7265 7475 726e tion that return\n-0016b000: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-0016b010: 3c2f 636f 6465 3e20 696e 2063 6173 6520 in case \n-0016b020: 7468 6520 656c 656d 656e 7420 6361 6e20 the element can \n-0016b030: 6265 2073 6166 656c 7920 6967 6e6f 7265 be safely ignore\n-0016b040: 642c 206f 7220 3c63 6f64 653e 2353 4f41 d, or #SOA\n-0016b050: 505f 4d55 5354 554e 4445 5253 5441 4e44 P_MUSTUNDERSTAND\n-0016b060: 3c2f 636f 6465 3e20 746f 2074 6872 6f77 to throw\n-0016b070: 2061 6e20 6578 6365 7074 696f 6e2c 206f an exception, o\n-0016b080: 7220 746f 2070 6572 666f 726d 2073 6f6d r to perform som\n-0016b090: 6520 6170 706c 6963 6174 696f 6e2d 7370 e application-sp\n-0016b0a0: 6563 6966 6963 2061 6374 696f 6e2e 2046 ecific action. F\n-0016b0b0: 6f72 2065 7861 6d70 6c65 2c20 746f 2074 or example, to t\n-0016b0c0: 6872 6f77 2061 6e20 6578 6365 7074 696f hrow an exceptio\n-0016b0d0: 6e20 6173 2073 6f6f 6e20 6173 2061 6e20 n as soon as an \n-0016b0e0: 756e 6b6e 6f77 6e20 656c 656d 656e 7420 unknown element \n-0016b0f0: 6973 2065 6e63 6f75 6e74 6572 6564 206f is encountered o\n-0016b100: 6e20 7468 6520 696e 7075 742c 2075 7365 n the input, use\n-0016b110: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int main()
    .\n-0016b170: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    ..\n-0016b290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-0016b360: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n-0016b380: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n-0016b390: 6d65 7468 6f64 2873 6f61 702c 202e 2e2e method(soap, ...\n-0016b3a0: 2920 6f72 2073 6f61 705f 7365 7276 6528 ) or soap_serve(\n-0016b3b0: 736f 6170 2920 3c2f 7370 616e 3e3c 2f64 soap) .
    }
    .\n-0016b3f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n-0016b430: 7969 676e 6f72 6528 3c73 7061 6e20 636c yignore(st\n-0016b450: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n-0016b4e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0016b500: 2f73 7061 6e3e 202a 7461 6729 203c 2f64 /span> *tag) .
    {
    .\n-0016b540: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-0016b560: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-0016b5c0: 4150 5f4d 5553 5455 4e44 4552 5354 414e AP_MUSTUNDERSTAN\n-0016b5d0: 443c 2f61 3e3b 203c 7370 616e 2063 6c61 D; // \n-0016b5f0: 6e65 7665 7220 736b 6970 2065 6c65 6d65 never skip eleme\n-0016b600: 6e74 7320 2873 6563 7572 6529 203c 2f73 nts (secure)
    .
    } <\n-0016b630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap:\n-0016b6f0: 3a66 6967 6e6f 7265 3c2f 613e 3c2f 6469 :fignore
    int(* fign\n-0016b720: 6f72 6529 2873 7472 7563 7420 736f 6170 ore)(struct soap\n-0016b730: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-0016b740: 6172 202a 7461 6729 3c2f 6469 763e 3c64 ar *tag)
    Callback to cat\n-0016b770: 6368 2075 6e72 6563 6f67 6e69 7a65 6420 ch unrecognized \n-0016b780: 584d 4c20 656c 656d 656e 7473 2061 6e64 XML elements and\n-0016b790: 206f 7665 7272 6964 6573 2023 534f 4150 overrides #SOAP\n-0016b7a0: 5f58 4d4c 5f53 5452 4943 5420 7661 6c69 _XML_STRICT vali\n-0016b7b0: 6461 7469 6f6e 2065 7272 6f72 7320 666f dation errors fo\n-0016b7c0: 7220 7468 6573 2e2e 2e3c 2f64 6976 3e3c r thes...
    <\n-0016b7d0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-0016b7e0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-0016b7f0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-0016b800: 3434 3433 3c2f 6469 763e 3c2f 6469 763e 4443
    \n-0016b810: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    #define SOAP_MU\n-0016b900: 5354 554e 4445 5253 5441 4e44 3c2f 6469 STUNDERSTAND
    A soap_stat\n-0016b930: 7573 2065 7272 6f72 2063 6f64 653a 2061 us error code: a\n-0016b940: 6e20 584d 4c20 656c 656d 656e 7420 6973 n XML element is\n-0016b950: 2070 7265 7365 6e74 2077 6974 6820 6120 present with a \n-0016b960: 6d75 7374 556e 6465 7273 7461 6e64 2061 mustUnderstand a\n-0016b970: 7474 7269 6275 7465 2077 6869 6368 206d ttribute which m\n-0016b980: 7573 7420 6265 2075 6e64 2e2e 2e3c 2f64 ust be und...
    Definit\n-0016b9b0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0016b9c0: 322e 683a 3234 3930 3c2f 6469 763e 3c2f 2.h:2490
    .

    T\n-0016b9f0: 6f20 7365 6c65 6374 6976 656c 7920 7468 o selectively th\n-0016ba00: 726f 7720 616e 2065 7863 6570 7469 6f6e row an exception\n-0016ba10: 2077 6865 6e20 3c65 6d3e 3c63 6f64 653e when \n-0016ba20: 6d75 7374 556e 6465 7273 7461 6e64 3d22 mustUnderstand=\"\n-0016ba30: 7472 7565 223c 2f63 6f64 653e 3c2f 656d true\" SOAP Header el\n-0016ba50: 656d 656e 7420 6973 2065 6e63 6f75 6e74 ement is encount\n-0016ba60: 6572 6564 206f 7220 7768 656e 2061 6e20 ered or when an \n-0016ba70: 756e 6b6e 6f77 6e20 656c 656d 656e 7420 unknown element \n-0016ba80: 6973 2065 6e63 6f75 6e74 6572 6564 2065 is encountered e\n-0016ba90: 7863 6570 7420 666f 7220 656c 656d 656e xcept for elemen\n-0016baa0: 7420 3c65 6d3e 3c63 6f64 653e 6e73 3a78 t ns:x\n-0016bab0: 797a 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 yz, \n-0016bac0: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n-0016bae0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016baf0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main().
    {
    . \n-0016bb50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap\n-0016bba0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-0016bbd0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-0016bc30: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    so\n-0016bc80: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fignore = \n-0016bcf0: 6967 6e6f 7265 3b20 3c2f 6469 763e 0a3c ignore;
    .<\n-0016bd00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016bd10: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-0016bd30: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n-0016bd40: 626d 6574 686f 6428 736f 6170 2c20 2e2e bmethod(soap, ..\n-0016bd50: 2e29 206f 7220 736f 6170 5f73 6572 7665 .) or soap_serve\n-0016bd60: 2873 6f61 7029 203c 2f73 7061 6e3e 3c2f (soap) .
    }
    .<\n-0016bd90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016bda0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-0016bde0: 6967 6e6f 7265 283c 7370 616e 2063 6c61 ignore(str\n-0016be00: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n-0016be90: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tag) .
    {
    . \n-0016bef0: 203c 7370 616e 2063 6c61 7373 3d22 636f // do not\n-0016bf10: 2069 676e 6f72 6520 6d75 7374 556e 6465 ignore mustUnde\n-0016bf20: 7273 7461 6e64 3d26 7175 6f74 3b74 7275 rstand="tru\n-0016bf30: 6526 7175 6f74 3b20 3c2f 7370 616e 3e3c e" <\n-0016bf40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!\n-0016bf80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-0016bfb0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >mus\n-0016c000: 7455 6e64 6572 7374 616e 643c 2f61 3e29 tUnderstand)\n-0016c010: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    /\n-0016c060: 2f20 7461 6773 2026 6c74 3b6e 733a 736f / tags <ns:so\n-0016c070: 6d65 456c 656d 656e 7426 6774 3b20 6361 meElement> ca\n-0016c080: 6e20 6265 2073 6166 656c 7920 6967 6e6f n be safely igno\n-0016c090: 7265 643c 2f73 7061 6e3e 3c2f 6469 763e red
    \n-0016c0a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (so\n-0016c130: 6170 5f6d 6174 6368 5f74 6167 3c2f 613e ap_match_tag\n-0016c140: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0016c170: 2c20 7461 672c 203c 7370 616e 2063 6c61 , tag, "ns:some\n-0016c1a0: 456c 656d 656e 7426 7175 6f74 3b3c 2f73 Element") == SOA\n-0016c210: 505f 4f4b 3c2f 613e 293c 2f64 6976 3e0a P_OK)
    .\n-0016c220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    return \n-0016c260: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n-0016c2c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    return <\n-0016c320: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016c330: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0016c340: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-0016c350: 6136 6536 3834 3966 3532 6533 3634 3166 a6e6849f52e3641f\n-0016c360: 6662 6134 3433 6466 3636 3864 3535 3136 fba443df668d5516\n-0016c370: 3822 3e53 4f41 505f 4d55 5354 554e 4445 8\">SOAP_MUSTUNDE\n-0016c380: 5253 5441 4e44 3c2f 613e 3b20 3c2f 6469 RSTAND; .
    }
    . \n-0016c3c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n-0016c3f0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct Namesp\n-0016c430: 6163 653c 2f61 3e20 3c61 2063 6c61 7373 ace n\n-0016c490: 616d 6573 7061 6365 733c 2f61 3e5b 5d20 amespaces[] \n-0016c4a0: 3d20 3c2f 6469 763e 0a3c 6469 7620 636c =
    .
    {.
    { "SOAP-\n-0016c500: 454e 5626 7175 6f74 3b3c 2f73 7061 6e3e ENV"\n-0016c510: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0016c530: 756f 743b 6874 7470 3a2f 2f73 6368 656d uot;http://schem\n-0016c540: 6173 2e78 6d6c 736f 6170 2e6f 7267 2f73 as.xmlsoap.org/s\n-0016c550: 6f61 702f 656e 7665 6c6f 7065 2f26 7175 oap/envelope/&qu\n-0016c560: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c2f ot; }, .
    { "SOA\n-0016c5b0: 502d 454e 4326 7175 6f74 3b3c 2f73 7061 P-ENC", \n-0016c5e0: 2671 756f 743b 6874 7470 3a2f 2f73 6368 "http://sch\n-0016c5f0: 656d 6173 2e78 6d6c 736f 6170 2e6f 7267 emas.xmlsoap.org\n-0016c600: 2f73 6f61 702f 656e 636f 6469 6e67 2f26 /soap/encoding/&\n-0016c610: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, \n-0016c620: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "x\n-0016c660: 7369 2671 756f 743b 3c2f 7370 616e 3e2c si",\n-0016c670: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w\n-0016c6a0: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X\n-0016c6b0: 4d4c 5363 6865 6d61 2d69 6e73 7461 6e63 MLSchema-instanc\n-0016c6c0: 6526 7175 6f74 3b3c 2f73 7061 6e3e 207d e" }\n-0016c6d0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    { <\n-0016c6f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0016c700: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0016c710: 3b78 7364 2671 756f 743b 3c2f 7370 616e ;xsd", "http:/\n-0016c750: 2f77 7777 2e77 332e 6f72 672f 3230 3031 /www.w3.org/2001\n-0016c760: 2f58 4d4c 5363 6865 6d61 2671 756f 743b /XMLSchema"\n-0016c770: 3c2f 7370 616e 3e20 7d2c 203c 2f64 6976 }, .
    { "ns&quo\n-0016c7c0: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n-0016c7d0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016c7f0: 6f74 3b73 6f6d 652d 5552 4926 7175 6f74 ot;some-URI"\n-0016c800: 3b3c 2f73 7061 6e3e 7d2c 203c 7370 616e ;}, // binds "\n-0016c830: 6e73 2671 756f 743b 206e 616d 6573 7061 ns" namespa\n-0016c840: 6365 2070 7265 6669 7820 746f 2073 6368 ce prefix to sch\n-0016c850: 656d 6120 5552 493c 2f73 7061 6e3e 3c2f ema URI.
    { NULL,\n-0016c880: 204e 554c 4c7d 203c 2f64 6976 3e0a 3c64 NULL}
    .\n-0016c8a0: 5d3b 3c2f 6469 763e 0a3c 6469 7620 636c ];
    .
    \n-0016c960: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    short mustUn\n-0016c980: 6465 7273 7461 6e64 3c2f 6469 763e 3c64 derstand
    The soap::mustU\n-0016c9b0: 6e64 6572 7374 616e 6420 666c 6167 2069 nderstand flag i\n-0016c9c0: 7320 7365 7420 7768 656e 2061 2053 4f41 s set when a SOA\n-0016c9d0: 5020 4865 6164 6572 2065 6c65 6d65 6e74 P Header element\n-0016c9e0: 2063 6172 7269 6573 2061 2053 4f41 502d carries a SOAP-\n-0016c9f0: 454e 563a 6d75 7374 556e 6465 7273 7461 ENV:mustUndersta\n-0016ca00: 6e64 2061 7474 2e2e 2e3c 2f64 6976 3e3c nd att...
    <\n-0016ca10: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-0016ca20: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-0016ca30: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-0016ca40: 3239 3631 3c2f 6469 763e 3c2f 6469 763e 2961
    \n-0016ca50: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Funct\n-0016ca70: 696f 6e20 3c63 6f64 653e 3c61 2063 6c61 ion soap_ma\n-0016caf0: 7463 685f 7461 673c 2f61 3e3c 2f63 6f64 tch_tag compares two \n-0016cb10: 7461 6773 2e20 5468 6520 7468 6972 6420 tags. The third \n-0016cb20: 7061 7261 6d65 7465 7220 6d61 7920 6265 parameter may be\n-0016cb30: 2061 2070 6174 7465 726e 2077 6865 7265 a pattern where\n-0016cb40: 203c 636f 6465 3e2a 3c2f 636f 6465 3e20 * \n-0016cb50: 6973 2061 2077 696c 6463 6172 6420 616e is a wildcard an\n-0016cb60: 6420 3c63 6f64 653e 2d3c 2f63 6f64 653e d -\n-0016cb70: 2069 7320 6120 7369 6e67 6c65 2063 6861 is a single cha\n-0016cb80: 7261 6374 6572 2077 696c 6463 6172 642e racter wildcard.\n-0016cb90: 2053 6f20 666f 7220 6578 616d 706c 6520 So for example \n-0016cba0: 3c63 6f64 653e 736f 6170 5f6d 6174 6368 soap_match\n-0016cbb0: 5f74 6167 2873 6f61 702c 2074 6167 2c20 _tag(soap, tag, \n-0016cbc0: 226e 733a 2a22 293c 2f63 6f64 653e 2077 \"ns:*\") w\n-0016cbd0: 696c 6c20 6d61 7463 6820 616e 7920 656c ill match any el\n-0016cbe0: 656d 656e 7420 696e 206e 616d 6573 7061 ement in namespa\n-0016cbf0: 6365 203c 636f 6465 3e6e 733c 2f63 6f64 ce ns or when no na\n-0016cc10: 6d65 7370 6163 6520 7072 6566 6978 2069 mespace prefix i\n-0016cc20: 7320 7072 6573 656e 7420 696e 2074 6865 s present in the\n-0016cc30: 2058 4d4c 206d 6573 7361 6765 2e3c 2f70 XML message..

    The callbac\n-0016cc50: 6b20 6361 6e20 616c 736f 2062 6520 7573 k can also be us\n-0016cc60: 6564 2074 6f20 6b65 6570 2074 7261 636b ed to keep track\n-0016cc70: 206f 6620 756e 6b6e 6f77 6e20 656c 656d of unknown elem\n-0016cc80: 656e 7473 2069 6e20 616e 2069 6e74 6572 ents in an inter\n-0016cc90: 6e61 6c20 6461 7461 2073 7472 7563 7475 nal data structu\n-0016cca0: 7265 2073 7563 6820 6173 2061 206c 6973 re such as a lis\n-0016ccb0: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

    .
    <\n-0016cce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016ccf0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct Unknown .
    {
    . \n-0016cd40: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tag; .
    str\n-0016cda0: 7563 7420 3c2f 7370 616e 3e55 6e6b 6e6f uct Unkno\n-0016cdb0: 776e 202a 6e65 7874 3b20 3c2f 6469 763e wn *next;
    \n-0016cdc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .<\n-0016cdf0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016ce00: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int myignore(struct
    \n-0016ce40: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-0016ce70: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, const \n-0016cee0: 6368 6172 3c2f 7370 616e 3e20 2a74 6167 char *tag\n-0016cef0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    char *s \n-0016cf50: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (cha\n-0016cf70: 723c 2f73 7061 6e3e 2a29 3c61 2063 6c61 r*)s\n-0016cfd0: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(<\n-0016cfe0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016cff0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016d000: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0016d010: 7374 726c 656e 2874 6167 292b 3129 3b20 strlen(tag)+1); \n-0016d020: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct U\n-0016d060: 6e6b 6e6f 776e 202a 7520 3d20 283c 7370 nknown *u = (struct Unknown*)s\n-0016d0f0: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(<\n-0016d100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016d110: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016d120: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0016d130: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(struct\n-0016d170: 3c2f 7370 616e 3e20 556e 6b6e 6f77 6e29 Unknown)\n-0016d180: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if (s && \n-0016d1d0: 7529 203c 2f64 6976 3e0a 3c64 6976 2063 u)
    .
    {<\n-0016d1f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    strc\n-0016d210: 7079 2873 2c20 7461 6729 3b20 3c2f 6469 py(s, tag); .
    u->t\n-0016d240: 6167 203d 2073 3b20 3c2f 6469 763e 0a3c ag = s;
    .<\n-0016d250: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016d260: 3e20 2020 2075 2d26 6774 3b6e 6578 7420 > u->next \n-0016d270: 3d20 756c 6973 743b 203c 2f64 6976 3e0a = ulist;
    .\n-0016d280: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ulist = u;\n-0016d2a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    }
    .\n-0016d2e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n-0016d330: 206d 6169 6e28 293c 2f64 6976 3e0a 3c64 main()
    .\n-0016d350: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-0016d390: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0016d3c0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap;
    .
    <\n-0016d430: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016d440: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct Unknown *ulis\n-0016d460: 7420 3d20 4e55 4c4c 3b20 3c2f 6469 763e t = NULL;
    \n-0016d470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_i\n-0016d4e0: 6e69 743c 2f61 3e28 2661 6d70 3b3c 6120 nit(&soap); <\n-0016d520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fignore = m\n-0016d5d0: 7969 676e 6f72 653b 203c 2f64 6976 3e0a yignore;
    .\n-0016d5e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-0016d610: 2073 6f61 705f 6361 6c6c 5f6e 735f 5f77 soap_call_ns__w\n-0016d620: 6562 6d65 7468 6f64 2873 6f61 702c 202e ebmethod(soap, .\n-0016d630: 2e2e 2920 6f72 2073 6f61 705f 7365 7276 ..) or soap_serv\n-0016d640: 6528 736f 6170 2920 3c2f 7370 616e 3e3c e(soap) <\n-0016d650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // print the\n-0016d690: 206c 6973 7420 6f66 2075 6e6b 6e6f 776e list of unknown\n-0016d6a0: 2065 6c65 6d65 6e74 7320 7374 6f72 6564 elements stored\n-0016d6b0: 2069 6e20 756c 6973 743c 2f73 7061 6e3e in ulist\n-0016d6c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n-0016d790: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n-0016d7f0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0016d820: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n-0016d830: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-0016d8a0: 6f6e 653c 2f61 3e28 2661 6d70 3b3c 6120 one(&soap);.
    }
    .<\n-0016d900: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

    .

    \n-0016d950: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 <\n-0016d970: 2f61 3e0a 486f 7720 746f 2068 616e 646c /a>.How to handl\n-0016d980: 6520 4854 5450 2033 3037 2074 656d 706f e HTTP 307 tempo\n-0016d990: 7261 7279 2072 6564 6972 6563 743c 2f68 rary redirect.

    The client\n-0016d9b0: 2d73 6964 6520 6861 6e64 6c69 6e67 206f -side handling o\n-0016d9c0: 6620 4854 5450 2033 3037 2063 6f64 6520 f HTTP 307 code \n-0016d9d0: 2254 656d 706f 7261 7279 2052 6564 6972 \"Temporary Redir\n-0016d9e0: 6563 7422 2061 6e64 2061 6e79 206f 6620 ect\" and any of \n-0016d9f0: 7468 6520 7265 6469 7265 6374 2063 6f64 the redirect cod\n-0016da00: 6573 2033 3031 2c20 3330 322c 2061 6e64 es 301, 302, and\n-0016da10: 2033 3033 2061 7265 206e 6f74 2061 7574 303 are not aut\n-0016da20: 6f6d 6174 6564 2e20 436c 6965 6e74 2061 omated. Client a\n-0016da30: 7070 6c69 6361 7469 6f6e 2064 6576 656c pplication devel\n-0016da40: 6f70 6572 7320 6d61 7920 7761 6e74 2074 opers may want t\n-0016da50: 6f20 636f 6e73 6964 6572 2061 6464 696e o consider addin\n-0016da60: 6720 6120 6665 7720 6c69 6e65 7320 6f66 g a few lines of\n-0016da70: 2063 6f64 6520 746f 2073 7570 706f 7274 code to support\n-0016da80: 2072 6564 6972 6563 7473 2e20 4974 2077 redirects. It w\n-0016da90: 6173 2064 6563 6964 6564 206e 6f74 2074 as decided not t\n-0016daa0: 6f20 6175 746f 6d61 7469 6361 6c6c 7920 o automatically \n-0016dab0: 7375 7070 6f72 7420 7265 6469 7265 6374 support redirect\n-0016dac0: 7320 666f 7220 7468 6520 666f 6c6c 6f77 s for the follow\n-0016dad0: 696e 6720 7265 6173 6f6e 733a 3c2f 703e ing reasons:

    \n-0016dae0: 0a3c 756c 3e0a 3c6c 693e 5265 6469 7265 .
      .
    • Redire\n-0016daf0: 6374 696e 6720 6120 7365 6375 7265 2048 cting a secure H\n-0016db00: 5454 5053 2061 6464 7265 7373 2074 6f20 TTPS address to \n-0016db10: 6120 6e6f 6e2d 7365 6375 7265 2048 5454 a non-secure HTT\n-0016db20: 5020 6164 6472 6573 7320 7669 6120 3330 P address via 30\n-0016db30: 3720 6372 6561 7465 7320 6120 7365 6375 7 creates a secu\n-0016db40: 7269 7479 2076 756c 6e65 7261 6269 6c69 rity vulnerabili\n-0016db50: 7479 2e3c 2f6c 693e 0a3c 6c69 3e43 7963 ty.
    • .
    • Cyc\n-0016db60: 6c69 6320 7265 6469 7265 6374 7320 6d75 lic redirects mu\n-0016db70: 7374 2062 6520 6465 7465 6374 6564 2028 st be detected (\n-0016db80: 652e 672e 2061 6c6c 6f77 696e 6720 6f6e e.g. allowing on\n-0016db90: 6c79 2061 206c 696d 6974 6564 206e 756d ly a limited num\n-0016dba0: 6265 7220 6f66 2072 6564 6972 6563 7420 ber of redirect \n-0016dbb0: 6c65 7665 6c73 292e 3c2f 6c69 3e0a 3c6c levels).
    • .Redirecting HT\n-0016dbd0: 5450 2050 4f53 5420 7769 6c6c 2072 6573 TP POST will res\n-0016dbe0: 756c 7420 696e 2072 652d 7365 7269 616c ult in re-serial\n-0016dbf0: 697a 6174 696f 6e20 616e 6420 7265 2d70 ization and re-p\n-0016dc00: 6f73 7420 6f66 2074 6865 2065 6e74 6972 ost of the entir\n-0016dc10: 6520 534f 4150 2072 6571 7565 7374 2e20 e SOAP request. \n-0016dc20: 5468 6520 534f 4150 2072 6571 7565 7374 The SOAP request\n-0016dc30: 206d 6573 7361 6765 206d 7573 7420 6265 message must be\n-0016dc40: 2072 652d 706f 7374 6564 2069 6e20 6974 re-posted in it\n-0016dc50: 7320 656e 7469 7265 7479 2077 6865 6e20 s entirety when \n-0016dc60: 7265 2d69 7373 7569 6e67 2074 6865 2053 re-issuing the S\n-0016dc70: 4f41 5020 6f70 6572 6174 696f 6e20 746f OAP operation to\n-0016dc80: 2061 206e 6577 2061 6464 7265 7373 2e3c a new address.<\n-0016dc90: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e 546f /li>.
    .

    To\n-0016dca0: 2069 6d70 6c65 6d65 6e74 2063 6c69 656e implement clien\n-0016dcb0: 742d 7369 6465 2033 3037 2072 6564 6972 t-side 307 redir\n-0016dcc0: 6563 742c 2061 6464 2074 6865 2066 6f6c ect, add the fol\n-0016dcd0: 6c6f 7769 6e67 206c 696e 6573 206f 6620 lowing lines of \n-0016dce0: 636f 6465 3a3c 2f70 3e0a 3c64 6976 2063 code:

    .
    \n-0016dd00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n-0016dd50: 6861 723c 2f73 7061 6e3e 202a 656e 6470 har *endp\n-0016dd60: 6f69 6e74 203d 204e 554c 4c3b 203c 7370 oint = NULL; // use defaul\n-0016dd90: 7420 656e 6470 6f69 6e74 2067 6976 656e t endpoint given\n-0016dda0: 2069 6e20 5753 444c 206f 7220 7370 6563 in WSDL or spec\n-0016ddb0: 6966 7920 6f6e 6520 6865 7265 3c2f 7370 ify one here
    .
    int\n-0016de00: 2072 6564 6972 6563 7473 203d 2031 303b redirects = 10;\n-0016de10: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-0016de30: 2f2f 206d 6178 2072 6564 6972 6563 7420 // max redirect \n-0016de40: 636f 756e 7420 3c2f 7370 616e 3e3c 2f64 count .
    \n-0016de80: 7768 696c 653c 2f73 7061 6e3e 2028 7265 while (re\n-0016de90: 6469 7265 6374 732d 2d29 203c 2f64 6976 directs--) .
    {
    . \n-0016ded0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-0016df00: 7331 5f5f 6d79 4d65 7468 6f64 283c 6120 s1__myMethod(
    soap, en\n-0016df40: 6470 6f69 6e74 2c20 2e2e 2e29 2920 3c2f dpoint, ...)) .
    {
    \n-0016df70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if ((soap->\n-0016dfe0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;error<\n-0016e030: 2f61 3e20 2667 743b 3d20 3330 3120 2661 /a> >= 301 &a\n-0016e040: 6d70 3b26 616d 703b 203c 6120 636c 6173 mp;& \n-0016e070: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->error \n-0016e0d0: 266c 743b 3d20 3330 3329 207c 7c20 3c61 <= 303) || soap-&g\n-0016e110: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error\n-0016e160: 3c2f 613e 203d 3d20 3330 3729 203c 2f64 == 307) .
    {.
    endpoi\n-0016e1b0: 6e74 203d 203c 6120 636c 6173 733d 2263 nt = soap_s\n-0016e210: 7472 6475 703c 2f61 3e28 3c61 2063 6c61 trdup(soap, soap-><\n-0016e280: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016e290: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016e2a0: 6874 6d6c 2361 6564 3162 3836 6238 6133 html#aed1b86b8a3\n-0016e2b0: 3461 6561 3836 3130 3337 3531 6139 3332 4aea86103751a932\n-0016e2c0: 6339 6463 6539 223e 656e 6470 6f69 6e74 c9dce9\">endpoint\n-0016e2d0: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n-0016e2f0: 656e 6470 6f69 6e74 2066 726f 6d20 4854 endpoint from HT\n-0016e300: 5450 2033 3031 2c20 3330 322c 2033 3033 TP 301, 302, 303\n-0016e310: 2c20 3330 3720 4c6f 6361 7469 6f6e 2068 , 307 Location h\n-0016e320: 6561 6465 7220 3c2f 7370 616e 3e3c 2f64 eader .
    }.
    else .
    {.
    ... <\n-0016e3d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0016e3e0: 656e 7422 3e2f 2f20 6861 6e64 6c65 2065 ent\">// handle e\n-0016e3f0: 7272 6f72 203c 2f73 7061 6e3e 3c2f 6469 rror .
    break;
    .
    \n-0016e460: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    } <\n-0016e480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else \n-0016e4c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    break;\n-0016e520: 203c 7370 616e 2063 6c61 7373 3d22 636f // all OK\n-0016e540: 206e 6f77 3c2f 7370 616e 3e3c 2f64 6976 now.
    }
    .\n-0016e580: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n-0016e5a0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-0016e5c0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-0016e5d0: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .How to \n-0016e600: 696d 706c 656d 656e 7420 4854 5450 2047 implement HTTP G\n-0016e610: 4554 2c20 5055 542c 2061 6e64 2050 4154 ET, PUT, and PAT\n-0016e620: 4348 2073 6572 7669 6365 733c 2f68 323e CH services

    \n-0016e630: 0a3c 703e 546f 2069 6d70 6c65 6d65 6e74 .

    To implement\n-0016e640: 2048 5454 5020 4745 5420 7265 7175 6573 HTTP GET reques\n-0016e650: 7420 7265 7370 6f6e 7365 732c 2064 6566 t responses, def\n-0016e660: 696e 6520 7468 6520 3c63 6f64 653e 3c61 ine the \n-0016e730: 736f 6170 3a3a 6667 6574 3c2f 613e 3c2f soap::fget callback f\n-0016e750: 756e 6374 696f 6e2e 2054 6865 2063 616c unction. The cal\n-0016e760: 6c62 6163 6b20 6973 2072 6571 7569 7265 lback is require\n-0016e770: 6420 746f 2070 726f 6475 6365 2061 2072 d to produce a r\n-0016e780: 6573 706f 6e73 6520 746f 2074 6865 2072 esponse to the r\n-0016e790: 6571 7565 7374 2069 6e20 7465 7874 7561 equest in textua\n-0016e7a0: 6c20 666f 726d 2c20 7375 6368 2061 7320 l form, such as \n-0016e7b0: 6120 5765 6220 7061 6765 206f 7220 616e a Web page or an\n-0016e7c0: 2058 4d4c 206f 7220 4a53 4f4e 2072 6573 XML or JSON res\n-0016e7d0: 706f 6e73 652e 3c2f 703e 0a3c 703e 596f ponse.

    .

    Yo\n-0016e7e0: 7520 6361 6e20 616c 736f 2075 7365 2074 u can also use t\n-0016e7f0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_g\n-0016e880: 6574 3c2f 613e 3c2f 636f 6465 3e20 706c et pl\n-0016e890: 7567 696e 2077 6869 6368 2065 7373 656e ugin which essen\n-0016e8a0: 7469 616c 6c79 2073 6574 7320 7468 6520 tially sets the \n-0016e8b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fg\n-0016e980: 6574 3c2f 613e 3c2f 636f 6465 3e20 6361 et ca\n-0016e990: 6c6c 6261 636b 2061 6e64 2061 6c73 6f20 llback and also \n-0016e9a0: 6b65 6570 7320 7472 6163 6b20 6f66 2074 keeps track of t\n-0016e9b0: 6865 206e 756d 6265 7220 6f66 2048 5454 he number of HTT\n-0016e9c0: 5020 4745 5420 616e 6420 504f 5354 2072 P GET and POST r\n-0016e9d0: 6571 7565 7374 7320 6d61 6465 2061 7420 equests made at \n-0016e9e0: 7468 6520 7365 7276 6572 2073 6964 652e the server side.\n-0016e9f0: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

    .

    The foll\n-0016ea00: 6f77 696e 6720 6578 616d 706c 6520 7072 owing example pr\n-0016ea10: 6f64 7563 6573 2061 2057 6562 2070 6167 oduces a Web pag\n-0016ea20: 6520 7570 6f6e 2061 2048 5454 5020 4745 e upon a HTTP GE\n-0016ea30: 5420 7265 7175 6573 7420 2865 2e67 2e20 T request (e.g. \n-0016ea40: 6672 6f6d 2061 2062 726f 7773 6572 293a from a browser):\n-0016ea50: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main()
    .<\n-0016eab0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016eac0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap\n-0016eb30: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n-0016ebc0: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    .\n-0016ebd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n-0016ece0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016ecf0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... //<\n-0016ed10: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-0016ed30: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_serve(\n-0016ed90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0016edc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    ...\n-0016ede0: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-0016ee00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-0016ee20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int http_get(<\n-0016eed0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016eee0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-0016ef50: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    .{<\n-0016ef70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (<\n-0016efb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016efc0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0016efd0: 705f 5f69 6f2e 6874 6d6c 2367 6130 3339 p__io.html#ga039\n-0016efe0: 3065 3538 6264 3261 3365 6265 3666 6533 0e58bd2a3ebe6fe3\n-0016eff0: 6134 3664 6530 3533 3461 3631 3422 3e73 a46de0534a614\">s\n-0016f000: 6f61 705f 7265 7370 6f6e 7365 3c2f 613e oap_response\n-0016f010: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0016f040: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_HTML)\n-0016f0a0: 203c 7370 616e 2063 6c61 7373 3d22 636f // HTTP r\n-0016f0c0: 6573 706f 6e73 6520 6865 6164 6572 2077 esponse header w\n-0016f0d0: 6974 6820 7465 7874 2f68 746d 6c20 3c2f ith text/html
    . \n-0016f100: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_send(soap, &\n-0016f1b0: 7175 6f74 3b26 6c74 3b48 544d 4c26 6774 quot;<HTML>\n-0016f1c0: 3b4d 7920 5765 6220 7365 7276 6572 2069 ;My Web server i\n-0016f1d0: 7320 6f70 6572 6174 696f 6e61 6c2e 266c s operational.&l\n-0016f1e0: 743b 2f48 544d 4c26 6774 3b26 7175 6f74 t;/HTML>"\n-0016f1f0: 3b3c 2f73 7061 6e3e 293c 2f64 6976 3e0a ;)
    .\n-0016f200: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    || soap_end\n-0016f270: 5f73 656e 643c 2f61 3e28 3c61 2063 6c61 _send(soap)).
    return \n-0016f2f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-0016f340: 736f 6170 5f63 6c6f 7365 736f 636b 3c2f soap_closesock(soap);
    .
    <\n-0016f3a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016f3b0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-0016f3c0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_clos\n-0016f420: 6573 6f63 6b3c 2f61 3e28 3c61 2063 6c61 esock(soap);.
    }
    .
    soap::fget<\n-0016f540: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int(* f\n-0016f560: 6765 7429 2873 7472 7563 7420 736f 6170 get)(struct soap\n-0016f570: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    \n-0016f590: 4361 6c6c 6261 636b 2074 6f20 696d 706c Callback to impl\n-0016f5a0: 656d 656e 7420 6c6f 6769 6320 6174 2074 ement logic at t\n-0016f5b0: 6865 2073 6572 7665 722d 7369 6465 2074 he server-side t\n-0016f5c0: 6f20 7365 7276 6520 7265 7370 6f6e 7365 o serve response\n-0016f5d0: 7320 746f 2048 5454 5020 4745 5420 7265 s to HTTP GET re\n-0016f5e0: 7175 6573 7473 2066 726f 6d20 636c 6965 quests from clie\n-0016f5f0: 6e74 732e 3c2f 6469 763e 3c64 6976 2063 nts.
    \n-0016f610: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-0016f620: 7374 6473 6f61 7032 2e68 3a34 3333 303c stdsoap2.h:4330<\n-0016f630: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n-0016f6a0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_response\n-0016f6f0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    in\n-0016f710: 7420 736f 6170 5f72 6573 706f 6e73 6528 t soap_response(\n-0016f720: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-0016f730: 702c 2069 6e74 2073 7461 7475 7329 3c2f p, int status)
    Initializ\n-0016f760: 6520 7468 6520 636f 6e74 6578 7420 666f e the context fo\n-0016f770: 7220 7365 7276 6572 2d73 6964 6520 7365 r server-side se\n-0016f780: 6e64 696e 6720 616e 6420 7365 6e64 2061 nding and send a\n-0016f790: 2048 5454 5020 7265 7370 6f6e 7365 2068 HTTP response h\n-0016f7a0: 6561 6465 722e 3c2f 6469 763e 3c2f 6469 eader.
    .
    soap_c\n-0016f860: 6c6f 7365 736f 636b 3c2f 613e 3c2f 6469 losesock
    int soap_c\n-0016f890: 6c6f 7365 736f 636b 2873 7472 7563 7420 losesock(struct \n-0016f8a0: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
    Close the so\n-0016f8d0: 636b 6574 2063 6f6e 6e65 6374 696f 6e2e cket connection.\n-0016f8e0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .http_get\n-0016f9a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int ht\n-0016f9c0: 7470 5f67 6574 2873 7472 7563 7420 736f tp_get(struct so\n-0016f9d0: 6170 202a 2c20 7374 7275 6374 2073 6f61 ap *, struct soa\n-0016f9e0: 705f 706c 7567 696e 202a 2c20 766f 6964 p_plugin *, void\n-0016f9f0: 202a 293c 2f64 6976 3e3c 6469 7620 636c *)
    The \n-0016fa10: 4854 5450 2047 4554 2070 6c75 6769 6e20 HTTP GET plugin \n-0016fa20: 7265 6769 7374 7261 7469 6f6e 2066 756e registration fun\n-0016fa30: 6374 696f 6e2e 3c2f 6469 763e 3c2f 6469 ction.
    .
    #define SOAP_HT\n-0016fb20: 4d4c 3c2f 6469 763e 3c64 6976 2063 6c61 ML
    A spe\n-0016fb40: 6369 616c 2073 6f61 705f 7374 6174 7573 cial soap_status\n-0016fb50: 2065 7272 6f72 2063 6f64 6520 746f 2073 error code to s\n-0016fb60: 6967 6e61 6c20 7468 6174 2061 2063 7573 ignal that a cus\n-0016fb70: 746f 6d20 4854 5450 2072 6573 706f 6e73 tom HTTP respons\n-0016fb80: 6520 6973 2070 7265 7365 6e74 2061 6e64 e is present and\n-0016fb90: 206e 6f20 4854 5450 2072 6573 706f 6e73 no HTTP respons\n-0016fba0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-0016fbc0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0016fbd0: 7464 736f 6170 322e 683a 3237 3132 3c2f tdsoap2.h:2712
    .
    <\n-0016fc50: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-0016fc60: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga\n-0016fc70: 3239 3064 6462 3436 6166 6462 6635 6563 290ddb46afdbf5ec\n-0016fc80: 3636 3639 6236 6163 3864 6163 6135 6339 6669b6ac8daca5c9\n-0016fc90: 223e 736f 6170 5f65 6e64 5f73 656e 643c \">soap_end_send<\n-0016fca0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int\n-0016fcc0: 2073 6f61 705f 656e 645f 7365 6e64 2873 soap_end_send(s\n-0016fcd0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0016fce0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Finali\n-0016fd00: 7a65 2074 6865 2063 6f6e 7465 7874 2061 ze the context a\n-0016fd10: 6674 6572 2073 656e 6469 6e67 2e3c 2f64 fter sending.
    .
    \n-0016fd30: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This e\n-00171430: 7861 6d70 6c65 2073 686f 7773 2068 6f77 xample shows how\n-00171440: 206f 6e65 2070 7265 6465 7465 726d 696e one predetermin\n-00171450: 6564 2066 696c 6520 6973 2073 6572 7665 ed file is serve\n-00171460: 642e 2054 6865 203c 656d 3e3c 636f 6465 d. The gsoap/samples/w\n-00171480: 6562 7365 7276 6572 3c2f 636f 6465 3e3c ebserver<\n-00171490: 2f65 6d3e 2064 656d 6f6e 7374 7261 7465 /em> demonstrate\n-001714a0: 7320 686f 7720 6669 6c65 7320 7368 6f75 s how files shou\n-001714b0: 6c64 2062 6520 7365 7276 6564 2069 6e20 ld be served in \n-001714c0: 6765 6e65 7261 6c2c 2062 7920 6164 6469 general, by addi\n-001714d0: 6e67 2074 6865 206e 6563 6573 7361 7279 ng the necessary\n-001714e0: 206c 6f67 6963 2074 6f20 6164 6420 6d65 logic to add me\n-001714f0: 6469 6120 7479 7065 7320 746f 2048 5454 dia types to HTT\n-00171500: 5020 6865 6164 6572 7320 616e 6420 746f P headers and to\n-00171510: 2072 6573 7472 6963 7420 7468 6520 7365 restrict the se\n-00171520: 6c65 6374 696f 6e20 6f66 2066 696c 6573 lection of files\n-00171530: 2074 6861 7420 7368 6f75 6c64 2062 6520 that should be \n-00171540: 7365 7276 6564 2e3c 2f70 3e0a 3c64 6c20 served.

    .
    Warn\n-00171570: 696e 673c 2f64 743e 3c64 643e 5768 656e ing
    When\n-00171580: 2073 6572 7669 6e67 2066 696c 6573 2061 serving files a\n-00171590: 7320 7265 7370 6f6e 7365 7320 746f 2072 s responses to r\n-001715a0: 6571 7565 7374 732c 2077 6520 6e65 6564 equests, we need\n-001715b0: 2074 6f20 6265 2076 6172 7920 6361 7265 to be vary care\n-001715c0: 6675 6c2c 2062 6563 6175 7365 2077 6520 ful, because we \n-001715d0: 646f 6e27 7420 7761 6e74 2072 6571 7565 don't want reque\n-001715e0: 7374 7320 746f 2073 6e6f 6f70 2061 726f sts to snoop aro\n-001715f0: 756e 6420 696e 2064 6972 6563 746f 7269 und in directori\n-00171600: 6573 2061 6e64 2073 6572 7665 2066 696c es and serve fil\n-00171610: 6573 2074 6861 7420 7368 6f75 6c64 2062 es that should b\n-00171620: 6520 7072 6f74 6563 7465 6420 6672 6f6d e protected from\n-00171630: 2070 7562 6c69 6320 7669 6577 2e20 5468 public view. Th\n-00171640: 6572 6566 6f72 652c 2077 6865 6e20 6164 erefore, when ad\n-00171650: 6469 6e67 206c 6f67 6963 2074 6f20 7365 ding logic to se\n-00171660: 7276 6520 6669 6c65 732c 2077 6520 6d75 rve files, we mu\n-00171670: 7374 2072 656a 6563 7420 7265 7175 6573 st reject reques\n-00171680: 7420 7468 6174 2068 6176 6520 3c63 6f64 t that have soap::p\n-00171720: 6174 683c 2f61 3e3c 2f63 6f64 653e 2076 ath v\n-00171730: 616c 7565 7320 7769 7468 2061 203c 636f alues with a / or a\n-00171750: 203c 636f 6465 3e5c 3c2f 636f 6465 3e20 \\ \n-00171760: 283c 636f 6465 3e3c 6120 636c 6173 733d (so\n-001717f0: 6170 3a3a 7061 7468 3c2f 613e 3c2f 636f ap::path is a string \n-00171810: 7769 7468 2074 6865 2070 6174 6820 7061 with the path pa\n-00171820: 7274 206f 6620 7468 6520 5552 4c2c 2073 rt of the URL, s\n-00171830: 7461 7274 696e 6720 7769 7468 2061 203c tarting with a <\n-00171840: 636f 6465 3e2f 3c2f 636f 6465 3e29 2e20 code>/). \n-00171850: 4966 2074 6865 7365 2061 7265 2061 6c6c If these are all\n-00171860: 6f77 6564 2c20 7468 656e 2077 6520 6d75 owed, then we mu\n-00171870: 7374 2061 7420 6c65 6173 7420 6368 6563 st at least chec\n-00171880: 6b20 666f 7220 3c63 6f64 653e 2e2e 3c2f k for .. in the pat\n-001718a0: 6820 746f 2061 766f 6964 2072 6571 7565 h to avoid reque\n-001718b0: 7374 2066 726f 6d20 736e 6f6f 7069 6e67 st from snooping\n-001718c0: 2061 726f 756e 6420 696e 2068 6967 6865 around in highe\n-001718d0: 7220 6469 7265 6374 6f72 6965 7320 616c r directories al\n-001718e0: 6c20 7468 6520 7761 7920 7570 2074 6f20 l the way up to \n-001718f0: 7468 6520 726f 6f74 2e3c 2f64 643e 3c2f the root.
    .

    For a one\n-00171910: 2d77 6179 2053 4f41 502f 584d 4c20 6d65 -way SOAP/XML me\n-00171920: 7373 6167 652c 2079 6f75 2063 616e 2061 ssage, you can a\n-00171930: 6c73 6f20 7265 7475 726e 2061 2053 4f41 lso return a SOA\n-00171940: 502f 584d 4c20 7265 7370 6f6e 7365 3a3c P/XML response:<\n-00171950: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n-001719a0: 203c 6120 636c 6173 733d 2263 6f64 6522 http_get(struct soap *soap)
    .
    {.
    soap_re\n-00171b10: 7370 6f6e 7365 3c2f 613e 283c 6120 636c sponse(soap, \n-00171ba0: 534f 4150 5f4f 4b3c 2f61 3e29 3b20 3c2f SOAP_OK); .
    return\n-00171bf0: 2073 6f61 705f 7365 6e64 5f6e 7331 5f5f soap_send_ns1__\n-00171c00: 6d79 5365 6e64 4d65 7468 6f64 5265 7370 mySendMethodResp\n-00171c10: 6f6e 7365 283c 6120 636c 6173 733d 2263 onse(soap\n-00171c40: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "", NULL, ...\n-00171c80: 2070 6172 616d 7320 2e2e 2e29 3b20 3c2f params ...); .
    }
    .\n-00171cb0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where \n-00171cd0: 3c63 6f64 653e 6e73 315f 5f6d 7953 656e ns1__mySen\n-00171ce0: 644d 6574 686f 6452 6573 706f 6e73 653c dMethodResponse<\n-00171cf0: 2f63 6f64 653e 2069 7320 6120 6f6e 652d /code> is a one-\n-00171d00: 7761 7920 6d65 7373 6167 6520 6465 636c way message decl\n-00171d10: 6172 6564 2069 6e20 6120 696e 7465 7266 ared in a interf\n-00171d20: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-00171d30: 6173 3a3c 2f70 3e0a 3c64 6976 2063 6c61 as:

    .
    \n-00171d60: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns1__mySend\n-00171d90: 4d65 7468 6f64 5265 7370 6f6e 7365 282e MethodResponse(.\n-00171da0: 2e2e 2070 6172 616d 7320 2e2e 2e2c 203c .. params ..., <\n-00171db0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00171dc0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void);
    .

    The gener\n-00171e00: 6174 6564 203c 656d 3e3c 636f 6465 3e73 ated s\n-00171e10: 6f61 7043 6c69 656e 742e 6370 703c 2f63 oapClient.cpp includ\n-00171e30: 6573 2074 6865 2073 656e 6469 6e67 2d73 es the sending-s\n-00171e40: 6964 6520 7374 7562 2066 756e 6374 696f ide stub functio\n-00171e50: 6e2e 3c2f 703e 0a3c 703e 5468 6520 6578 n.

    .

    The ex\n-00171e60: 616d 706c 6573 2061 626f 7665 2061 7265 amples above are\n-00171e70: 2066 6f72 2048 5454 5020 4745 542e 2054 for HTTP GET. T\n-00171e80: 6f20 696d 706c 656d 656e 7420 4854 5450 o implement HTTP\n-00171e90: 2050 5554 2061 6e64 2050 4154 4348 2073 PUT and PATCH s\n-00171ea0: 6574 2074 6865 203c 636f 6465 3e3c 6120 et the s\n-00171f70: 6f61 703a 3a66 7075 743c 2f61 3e3c 2f63 oap::fput and <\n-00171f90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00171fa0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00171fb0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00171fc0: 6761 3830 3861 3661 3962 3765 3664 3137 ga808a6a9b7e6d17\n-00171fd0: 6530 3339 6662 3533 6135 6538 6139 6238 e039fb53a5e8a9b8\n-00171fe0: 3461 2220 7469 746c 653d 2243 616c 6c62 4a\" title=\"Callb\n-00171ff0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n-00172000: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n-00172010: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n-00172020: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n-00172030: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque\n-00172040: 7374 7320 6672 6f6d 2063 6c69 656e 7473 sts from clients\n-00172050: 2e2e 2e22 3e73 6f61 703a 3a66 7061 7463 ...\">soap::fpatc\n-00172060: 683c 2f61 3e3c 2f63 6f64 653e 2063 616c h cal\n-00172070: 6c62 6163 6b20 6675 6e63 7469 6f6e 7320 lback functions \n-00172080: 6f72 2075 7365 2074 6865 203c 636f 6465 or use the http_post\n-00172120: 3c2f 636f 6465 3e20 706c 7567 696e 2077 plugin w\n-00172130: 6869 6368 2069 7320 6d6f 7265 2063 6170 hich is more cap\n-00172140: 6162 6c65 2e3c 2f70 3e0a 3c70 3ef0 9f94 able.

    .

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

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

    .TCP an\n-001721b0: 6420 4854 5450 206b 6565 702d 616c 6976 d HTTP keep-aliv\n-001721c0: 653c 2f68 323e 0a3c 703e 546f 2061 6374 e

    .

    To act\n-001721d0: 6976 6174 6520 4854 5450 206b 6565 702d ivate HTTP keep-\n-001721e0: 616c 6976 652c 2073 6574 2074 6865 203c alive, set the <\n-001721f0: 636f 6465 3e23 534f 4150 5f49 4f5f 4b45 code>#SOAP_IO_KE\n-00172200: 4550 414c 4956 453c 2f63 6f64 653e 2066 EPALIVE f\n-00172210: 6c61 6720 666f 7220 626f 7468 2069 6e70 lag for both inp\n-00172220: 7574 2061 6e64 206f 7574 7075 7420 6d6f ut and output mo\n-00172230: 6465 732c 2073 6565 2053 6563 7469 6f6e des, see Section\n-00172240: 203c 6120 636c 6173 733d 2265 6c22 2068 Run-time \n-00172270: 666c 6167 733c 2f61 3e20 2e20 466f 7220 flags . For \n-00172280: 6578 616d 706c 653c 2f70 3e0a 3c64 6976 example

    ..\n-00172340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .

    When a c\n-00172480: 6c69 656e 7420 6f72 2061 2073 6572 7669 lient or a servi\n-00172490: 6365 2063 6f6d 6d75 6e69 6361 7465 7320 ce communicates \n-001724a0: 7769 7468 2061 6e6f 7468 6572 2063 6c69 with another cli\n-001724b0: 656e 7420 6f72 2073 6572 7669 6365 2074 ent or service t\n-001724c0: 6861 7420 7375 7070 6f72 7473 206b 6565 hat supports kee\n-001724d0: 7020 616c 6976 652c 2074 6865 203c 636f p alive, the soap::keep_aliv\n-001725a0: 653c 2f61 3e3c 2f63 6f64 653e 2076 6172 e var\n-001725b0: 6961 626c 6520 7769 6c6c 2062 6520 7365 iable will be se\n-001725c0: 7420 746f 2031 2c20 6f74 6865 7277 6973 t to 1, otherwis\n-001725d0: 6520 6974 2069 7320 7265 7365 7420 746f e it is reset to\n-001725e0: 2030 2069 6e64 6963 6174 696e 6720 7468 0 indicating th\n-001725f0: 6174 2074 6865 206f 7468 6572 2070 6172 at the other par\n-00172600: 7479 2077 616e 7473 2074 6f20 636c 6f73 ty wants to clos\n-00172610: 6520 7468 6520 636f 6e6e 6563 7469 6f6e e the connection\n-00172620: 2e20 5468 6520 636f 6e6e 6563 7469 6f6e . The connection\n-00172630: 206d 6179 6265 2074 6572 6d69 6e61 7465 maybe terminate\n-00172640: 6420 6f6e 2065 6974 6865 7220 656e 6420 d on either end \n-00172650: 6265 666f 7265 2074 6865 2063 6f6d 6d75 before the commu\n-00172660: 6e69 6361 7469 6f6e 2063 6f6d 706c 6574 nication complet\n-00172670: 6564 2c20 666f 7220 6578 616d 706c 6520 ed, for example \n-00172680: 7768 656e 2074 6865 2073 6572 7665 7220 when the server \n-00172690: 6b65 6570 2d61 6c69 7665 2063 6f6e 6e65 keep-alive conne\n-001726a0: 6374 696f 6e20 6861 7320 7469 6d65 6420 ction has timed \n-001726b0: 6f75 742e 2054 6869 7320 6d61 7920 6765 out. This may ge\n-001726c0: 6e65 7261 7465 2061 2022 4272 6f6b 656e nerate a \"Broken\n-001726d0: 2050 6970 6522 2073 6967 6e61 6c20 6f6e Pipe\" signal on\n-001726e0: 2055 6e69 782f 4c69 6e75 7820 706c 6174 Unix/Linux plat\n-001726f0: 666f 726d 732e 2054 6869 7320 7369 676e forms. This sign\n-00172700: 616c 2063 616e 2062 6520 6361 7567 6874 al can be caught\n-00172710: 2077 6974 6820 6120 7369 676e 616c 2068 with a signal h\n-00172720: 616e 646c 6572 3a3c 2f70 3e0a 3c64 6976 andler:

    .
    signal(SIGPI\n-00172760: 5045 2c20 7369 6770 6970 655f 6861 6e64 PE, sigpipe_hand\n-00172770: 6c65 293b 3c2f 6469 763e 0a3c 2f64 6976 le);
    .

    Alternativ\n-00172860: 656c 792c 2062 726f 6b65 6e20 7069 7065 ely, broken pipe\n-00172870: 7320 6361 6e20 6265 206b 6570 7420 7369 s can be kept si\n-00172880: 6c65 6e74 2062 7920 7365 7474 696e 673a lent by setting:\n-00172890: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    soap.socket_fla\n-00172940: 6773 3c2f 613e 203d 204d 5347 5f4e 4f53 gs = MSG_NOS\n-00172950: 4947 4e41 4c3b 3c2f 6469 763e 0a3c 6469 IGNAL;
    .
    soap::sock\n-00172a00: 6574 5f66 6c61 6773 3c2f 613e 3c2f 6469 et_flags
    int socket\n-00172a30: 5f66 6c61 6773 3c2f 6469 763e 3c64 6976 _flags
    U\n-00172a50: 7365 722d 6465 6669 6e61 626c 6520 736f ser-definable so\n-00172a60: 636b 6574 2073 656e 6420 616e 6420 7265 cket send and re\n-00172a70: 6376 2066 6c61 6773 2c20 666f 7220 6578 cv flags, for ex\n-00172a80: 616d 706c 6520 6173 7369 676e 204d 5347 ample assign MSG\n-00172a90: 5f4e 4f53 4947 4e41 4c20 746f 2064 6973 _NOSIGNAL to dis\n-00172aa0: 6162 6c65 2073 6967 7069 7065 2028 7468 able sigpipe (th\n-00172ab0: 6520 7661 2e2e 2e3c 2f64 6976 3e3c 6469 e va...
    \n-00172ad0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:33\n-00172af0: 3539 3c2f 6469 763e 3c2f 6469 763e 0a3c 59
    .<\n-00172b00: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This se\n-00172b20: 7474 696e 6720 7769 6c6c 206e 6f74 2067 tting will not g\n-00172b30: 656e 6572 6174 6520 6120 5349 4750 4950 enerate a SIGPIP\n-00172b40: 4520 6275 7420 7265 6164 2f77 7269 7465 E but read/write\n-00172b50: 206f 7065 7261 7469 6f6e 7320 7265 7475 operations retu\n-00172b60: 726e 203c 636f 6465 3e23 534f 4150 5f45 rn #SOAP_E\n-00172b70: 4f46 3c2f 636f 6465 3e20 696e 7374 6561 OF instea\n-00172b80: 642e 204e 6f74 6520 7468 6174 2057 696e d. Note that Win\n-00172b90: 646f 7773 2064 6f65 7320 6e6f 7420 7375 dows does not su\n-00172ba0: 7070 6f72 7420 7369 676e 616c 7320 616e pport signals an\n-00172bb0: 6420 6c61 636b 2074 6865 203c 636f 6465 d lack the MSG_NOSIGNAL flag.

    .<\n-00172be0: 703e 4966 2074 6865 2063 6c69 656e 7420 p>If the client \n-00172bf0: 646f 6573 206e 6f74 2063 6c6f 7365 2074 does not close t\n-00172c00: 6865 2063 6f6e 6e65 6374 696f 6e2c 2074 he connection, t\n-00172c10: 6865 2073 6572 7665 7220 7769 6c6c 2077 he server will w\n-00172c20: 6169 7420 666f 7265 7665 7220 7768 656e ait forever when\n-00172c30: 206e 6f20 3c63 6f64 653e 3c61 2063 6c61 no soap::recv_\n-00172cf0: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout is specified,\n-00172d10: 2073 6f20 6265 2063 6172 6566 756c 2074 so be careful t\n-00172d20: 6f20 7365 7420 7469 6d65 6f75 7473 2c20 o set timeouts, \n-00172d30: 5365 6520 5365 6374 696f 6e20 3c61 2063 See Section Timeout mana\n-00172d70: 6765 6d65 6e74 2066 6f72 206e 6f6e 2d62 gement for non-b\n-00172d80: 6c6f 636b 696e 6720 6f70 6572 6174 696f locking operatio\n-00172d90: 6e73 3c2f 613e 2e20 496e 2061 6464 6974 ns. In addit\n-00172da0: 696f 6e2c 206f 7468 6572 2063 6c69 656e ion, other clien\n-00172db0: 7473 2077 696c 6c20 6265 2064 656e 6965 ts will be denie\n-00172dc0: 6420 7365 7276 6963 6520 6173 206c 6f6e d service as lon\n-00172dd0: 6720 6173 2061 2063 6c69 656e 7420 6b65 g as a client ke\n-00172de0: 6570 7320 7468 6520 636f 6e6e 6563 7469 eps the connecti\n-00172df0: 6f6e 2074 6f20 7468 6520 7365 7276 6572 on to the server\n-00172e00: 206f 7065 6e2e 2054 6f20 7072 6576 656e open. To preven\n-00172e10: 7420 7468 6973 2066 726f 6d20 6861 7070 t this from happ\n-00172e20: 656e 696e 672c 2074 6865 2073 6572 7669 ening, the servi\n-00172e30: 6365 2073 686f 756c 6420 6265 206d 756c ce should be mul\n-00172e40: 7469 2d74 6872 6561 6465 6420 7375 6368 ti-threaded such\n-00172e50: 2074 6861 7420 6561 6368 2074 6872 6561 that each threa\n-00172e60: 6420 6861 6e64 6c65 7320 7468 6520 636c d handles the cl\n-00172e70: 6965 6e74 2063 6f6e 6e65 6374 696f 6e3a ient connection:\n-00172e80: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main(int argc\n-00172f00: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n-00172f20: 3c2f 7370 616e 3e20 2a2a 6172 6776 2920 **argv) \n-00172f30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00172f50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n-00172f80: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-00172fb0: 736f 6170 3c2f 613e 203c 6120 636c 6173 soap \n-00172fe0: 736f 6170 3c2f 613e 2c20 2a74 736f 6170 soap, *tsoap\n-00172ff0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..\n-00173090: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-001730b0: 2f73 7061 6e3e 206d 2c20 733b 203c 2f64 /span> m, s; ..\n-00173260: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.max_k\n-001732e0: 6565 705f 616c 6976 653c 2f61 3e20 3d20 eep_alive = \n-001732f0: 3130 303b 203c 7370 616e 2063 6c61 7373 100; // at\n-00173310: 206d 6f73 7420 3130 3020 6361 6c6c 7320 most 100 calls \n-00173320: 7065 7220 6b65 6570 2d61 6c69 7665 2073 per keep-alive s\n-00173330: 6573 7369 6f6e 203c 2f73 7061 6e3e 3c2f ession .
    \n-00173380: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.accept_timeout\n-001733e0: 3c2f 613e 203d 2036 3030 3b20 3c73 7061 = 600; // optional: l\n-00173410: 6574 2073 6572 7665 7220 7469 6d65 206f et server time o\n-00173420: 7574 2061 6674 6572 2074 656e 206d 696e ut after ten min\n-00173430: 7574 6573 206f 6620 696e 6163 7469 7669 utes of inactivi\n-00173440: 7479 203c 2f73 7061 6e3e 3c2f 6469 763e ty
    \n-00173450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    m = soap_bi\n-001734c0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap, NUL\n-00173500: 4c2c 2031 3830 3030 2c20 4241 434b 4c4f L, 18000, BACKLO\n-00173510: 4729 3b20 3c73 7061 6e20 636c 6173 733d G); // use\n-00173530: 2070 6f72 7420 3138 3030 3020 6f6e 2074 port 18000 on t\n-00173540: 6865 2063 7572 7265 6e74 206d 6163 6869 he current machi\n-00173550: 6e65 203c 2f73 7061 6e3e 3c2f 6469 763e ne
    \n-00173560: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-00173590: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soa\n-001735f0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(m))
    .\n-00173620: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    ..\n-00173700: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n-00173710: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .<\n-00173720: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00173730: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00173750: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n-00173760: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00173780: 743b 536f 636b 6574 2063 6f6e 6e65 6374 t;Socket connect\n-00173790: 696f 6e20 7375 6363 6573 7366 756c 2025 ion successful %\n-001737a0: 645c 6e26 7175 6f74 3b3c 2f73 7061 6e3e d\\n"\n-001737b0: 2c20 6d29 3b20 3c2f 6469 763e 0a3c 6469 , m);
    . \n-001737d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 for (\n-00173840: 636f 756e 743c 2f61 3e20 3d20 303b 203c count = 0; <\n-00173850: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00173860: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00173870: 6874 6d6c 2361 3430 3764 6165 3462 6338 html#a407dae4bc8\n-00173880: 3464 3065 3762 3830 3964 3531 6133 6238 4d0e7b809d51a3b8\n-00173890: 3739 3865 3063 223e 636f 756e 743c 2f61 798e0c\">count >= 0; count++)\n-00173900: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {..
    \n-00173c90: 2020 6670 7269 6e74 6628 7374 6465 7272 fprintf(stderr\n-00173ca0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00173cc0: 756f 743b 4163 6365 7074 2073 6f63 6b65 uot;Accept socke\n-00173cd0: 7420 2564 2063 6f6e 6e65 6374 696f 6e20 t %d connection \n-00173ce0: 6672 6f6d 2049 5020 2564 2e25 642e 2564 from IP %d.%d.%d\n-00173cf0: 2e25 645c 6e26 7175 6f74 3b3c 2f73 7061 .%d\\n", s, (int)(soap.ip>\n-00173db0: 3b26 6774 3b32 3429 2661 6d70 3b30 7846 ;>24)&0xF\n-00173dc0: 462c 2028 3c73 7061 6e20 636c 6173 733d F, (in\n-00173de0: 743c 2f73 7061 6e3e 2928 3c61 2063 6c61 t)(soap.ip>>\n-00173e70: 3b31 3629 2661 6d70 3b30 7846 462c 2028 ;16)&0xFF, (\n-00173e80: 3c73 7061 6e20 636c 6173 733d 226b 6579 int)(soa\n-00173ed0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.i\n-00173f20: 703c 2f61 3e26 6774 3b26 6774 3b38 2926 p>>8)&\n-00173f30: 616d 703b 3078 4646 2c20 283c 7370 616e amp;0xFF, (int)\n-00173f60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-00173f90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 ip&\n-00173fe0: 616d 703b 3078 4646 293b 203c 2f64 6976 amp;0xFF); .
    tsoap \n-00174010: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_copy\n-00174070: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); .
    if (\n-001740f0: 2174 736f 6170 293c 2f64 6976 3e0a 3c64 !tsoap)
    .\n-00174110: 2020 2020 2020 2020 3c61 2063 6c61 7373 soap_for\n-00174170: 6365 5f63 6c6f 7365 736f 636b 3c2f 613e ce_closesock\n-00174180: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-001741b0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-001741d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-001741f0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    while (THREAD_\n-001742a0: 4352 4541 5445 3c2f 613e 2826 616d 703b CREATE(&\n-001742b0: 7469 642c 2028 3c73 7061 6e20 636c 6173 tid, (\n-001742d0: 766f 6964 3c2f 7370 616e 3e2a 282a 2928 void*(*)(\n-001742e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void*))process_\n-00174310: 7265 7175 6573 742c 2028 3c73 7061 6e20 request, (void*\n-00174340: 2974 736f 6170 2929 3c2f 6469 763e 0a3c )tsoap))
    .<\n-00174350: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174360: 3e20 2020 2020 2020 2020 2073 6c65 6570 > sleep\n-00174370: 2831 293b 203c 7370 616e 2063 6c61 7373 (1); // fa\n-00174390: 696c 6564 2c20 7472 7920 6167 6169 6e3c iled, try again<\n-001743a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001743c0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    \n-001743e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-00174400: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap.errnum)\n-001744b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // accept\n-001744d0: 2066 6169 6c65 642c 2074 7279 2061 6761 failed, try aga\n-001744e0: 696e 2061 6674 6572 2031 2073 6563 6f6e in after 1 secon\n-001744f0: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
    .<\n-00174500: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174510: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n-00174530: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri\n-00174590: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am\n-001745a0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stderr); .
    sleep\n-00174600: 2831 293b 3c2f 6469 763e 0a3c 6469 7620 (1);
    .
    \n-00174620: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    <\n-00174640: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00174650: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    \n-00174680: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n-001746a0: 2066 7072 696e 7466 2873 7464 6572 722c fprintf(stderr,\n-001746b0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001746d0: 6f74 3b53 6572 7665 7220 7469 6d65 6420 ot;Server timed \n-001746e0: 6f75 745c 6e26 7175 6f74 3b3c 2f73 7061 out\\n");
    .
    \n-00174710: 2020 203c 7370 616e 2063 6c61 7373 3d22 bre\n-00174730: 616b 3c2f 7370 616e 3e3b 203c 2f64 6976 ak; .
    }
    \n-00174760: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-00174790: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-001747b0: 726e 3c2f 7370 616e 3e20 303b 203c 2f64 rn 0; .
    }
    .<\n-001747e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001747f0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    void\n-00174830: 202a 7072 6f63 6573 735f 7265 7175 6573 *process_reques\n-00174840: 7428 3c73 7061 6e20 636c 6173 733d 226b t(void\n-00174860: 3c2f 7370 616e 3e20 2a74 736f 6170 2920 *tsoap) \n-00174870: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00174890: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n-001748c0: 7420 3c2f 7370 616e 3e2a 3c61 2063 6c61 t *soap = (struct soap\n-00174950: 2a29 7473 6f61 703b 3c2f 6469 763e 0a3c *)tsoap;
    .<\n-00174960: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174970: 3e20 203c 6120 636c 6173 733d 2263 6f64 > THREAD_D\n-001749d0: 4554 4143 483c 2f61 3e28 3c61 2063 6c61 ETACH(T\n-00174a30: 4852 4541 445f 4944 3c2f 613e 293b 203c HREAD_ID); <\n-00174a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ((struct \n-00174a80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap*\n-00174ab0: 293c 6120 636c 6173 733d 2263 6f64 6522 )soap\n-00174ae0: 292d 2667 743b 7265 6376 5f74 696d 656f )->recv_timeo\n-00174af0: 7574 203d 2036 303b 203c 7370 616e 2063 ut = 60; /\n-00174b10: 2f20 5469 6d65 6f75 7420 6166 7465 7220 / Timeout after \n-00174b20: 3120 6d69 6e75 7465 2073 7461 6c6c 206f 1 minute stall o\n-00174b30: 6e20 7265 6376 203c 2f73 7061 6e3e 3c2f n recv .
    ((struct <\n-00174b80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00174b90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00174ba0: 6874 6d6c 223e 736f 6170 3c2f 613e 2a29 html\">soap*)\n-00174bb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00174be0: 2d26 6774 3b73 656e 645f 7469 6d65 6f75 ->send_timeou\n-00174bf0: 7420 3d20 3130 3b20 3c73 7061 6e20 636c t = 10; //\n-00174c10: 2054 696d 656f 7574 2061 6674 6572 2031 Timeout after 1\n-00174c20: 3020 7365 636f 6e64 2073 7461 6c6c 206f 0 second stall o\n-00174c30: 6e20 7365 6e64 203c 2f73 7061 6e3e 3c2f n send .\n-00174cf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-00174d60: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .
    soa\n-00174e10: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); .
    soap\n-00174ec0: 5f66 7265 653c 2f61 3e28 3c61 2063 6c61 _free(soap); .
    return N\n-00174f40: 554c 4c3b 203c 2f64 6976 3e0a 3c64 6976 ULL;
    .}<\n-00174f60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-00174fb0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00174fc0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-00175000: 6f61 703a 3a63 6f75 6e74 3c2f 613e 3c2f oap::count
    ULONG64 \n-00175030: 636f 756e 743c 2f64 6976 3e3c 6469 7620 count
    Me\n-00175050: 7373 6167 6520 6c65 6e67 7468 2063 6f75 ssage length cou\n-00175060: 6e74 6572 2076 616c 7565 206f 6620 7468 nter value of th\n-00175070: 6520 6d65 7373 6167 6520 7265 6365 6976 e message receiv\n-00175080: 6564 2061 6e64 2063 6f75 6e74 6572 2076 ed and counter v\n-00175090: 616c 7565 206f 6620 7468 6520 4854 5450 alue of the HTTP\n-001750a0: 2063 6f6e 7465 6e74 206c 656e 6774 6820 content length \n-001750b0: 6865 612e 2e2e 3c2f 6469 763e 3c64 6976 hea...
    <\n-001750d0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:420\n-001750f0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .
    soap::acc\n-001751a0: 6570 745f 666c 6167 733c 2f61 3e3c 2f64 ept_flags
    int accep\n-001751d0: 745f 666c 6167 733c 2f64 6976 3e3c 6469 t_flags
    \n-001751f0: 5573 6572 2d64 6566 696e 6162 6c65 2073 User-definable s\n-00175200: 6574 736f 636b 6f70 7420 6c65 7665 6c20 etsockopt level \n-00175210: 534f 4c5f 534f 434b 4554 2066 6c61 6773 SOL_SOCKET flags\n-00175220: 2028 3020 6279 2064 6566 6175 6c74 292c (0 by default),\n-00175230: 2077 6865 6e20 6e6f 6e7a 6572 6f20 7365 when nonzero se\n-00175240: 7473 2074 6865 2073 6f61 703a 3a73 6f63 ts the soap::soc\n-00175250: 6b65 7420 662e 2e2e 3c2f 6469 763e 3c64 ket f...
    Definition:<\n-00175280: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n-00175290: 3435 333c 2f64 6976 3e3c 2f64 6976 3e0a 453
    .\n-001752a0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    A clie\n-001752c0: 6e74 2063 616c 6c20 7769 6c6c 2061 7574 nt call will aut\n-001752d0: 6f6d 6174 6963 616c 6c79 2061 7474 656d omatically attem\n-001752e0: 7074 2074 6f20 7265 2d65 7374 6162 6c69 pt to re-establi\n-001752f0: 7368 2061 2063 6f6e 6e65 6374 696f 6e20 sh a connection \n-00175300: 746f 2061 2073 6572 7665 7220 7768 656e to a server when\n-00175310: 2074 6865 2073 6572 7665 7220 6861 7320 the server has \n-00175320: 7465 726d 696e 6174 6564 2074 6865 2063 terminated the c\n-00175330: 6f6e 6e65 6374 696f 6e20 666f 7220 616e onnection for an\n-00175340: 7920 7265 6173 6f6e 2e20 5468 6973 2077 y reason. This w\n-00175350: 6179 2c20 6120 7365 7175 656e 6365 206f ay, a sequence o\n-00175360: 6620 6361 6c6c 7320 6361 6e20 6265 206d f calls can be m\n-00175370: 6164 6520 746f 2074 6865 2073 6572 7665 ade to the serve\n-00175380: 7220 7768 696c 6520 6b65 6570 696e 6720 r while keeping \n-00175390: 7468 6520 636f 6e6e 6563 7469 6f6e 206f the connection o\n-001753a0: 7065 6e2e 2043 6c69 656e 7420 7374 7562 pen. Client stub\n-001753b0: 2066 756e 6374 696f 6e73 2070 6f6c 6c20 functions poll \n-001753c0: 7468 6520 7365 7276 6572 2074 6f20 6368 the server to ch\n-001753d0: 6563 6b20 6966 2074 6865 2063 6f6e 6e65 eck if the conne\n-001753e0: 6374 696f 6e20 6973 2073 7469 6c6c 206f ction is still o\n-001753f0: 7065 6e2e 2057 6865 6e20 7468 6520 636f pen. When the co\n-00175400: 6e6e 6563 7469 6f6e 2077 6173 2074 6572 nnection was ter\n-00175410: 6d69 6e61 7465 6420 6279 2074 6865 2073 minated by the s\n-00175420: 6572 7665 722c 2074 6865 2063 6c69 656e erver, the clien\n-00175430: 7420 7769 6c6c 2061 7574 6f6d 6174 6963 t will automatic\n-00175440: 616c 6c79 2072 6563 6f6e 6e65 6374 2e20 ally reconnect. \n-00175450: 3c62 7220 202f 3e0a 3c2f 703e 0a3c 703e
    .

    .

    \n-00175460: 4120 636c 6965 6e74 206d 6179 2063 6c65 A client may cle\n-00175470: 6172 2074 6865 203c 636f 6465 3e23 534f ar the #SO\n-00175480: 4150 5f49 4f5f 4b45 4550 414c 4956 453c AP_IO_KEEPALIVE<\n-00175490: 2f63 6f64 653e 2066 6c61 6720 6a75 7374 /code> flag just\n-001754a0: 2062 6566 6f72 6520 7468 6520 6c61 7374 before the last\n-001754b0: 2063 616c 6c20 746f 2061 2073 6572 7665 call to a serve\n-001754c0: 7220 746f 206c 6574 2074 6865 2073 6572 r to let the ser\n-001754d0: 7665 7220 6b6e 6f77 2069 7420 7761 6e74 ver know it want\n-001754e0: 7320 746f 2063 6c6f 7365 2074 6865 2063 s to close the c\n-001754f0: 6f6e 6e65 6374 696f 6e20 6166 7465 7220 onnection after \n-00175500: 7468 6973 206c 6173 7420 6361 6c6c 2e20 this last call. \n-00175510: 5468 6973 2077 696c 6c20 636c 6f73 6520 This will close \n-00175520: 7468 6520 736f 636b 6574 2061 6674 6572 the socket after\n-00175530: 2074 6865 2063 616c 6c20 616e 6420 616c the call and al\n-00175540: 736f 2069 6e66 6f72 6d73 2074 6865 2073 so informs the s\n-00175550: 6572 7665 7220 746f 2067 7261 6365 6675 erver to gracefu\n-00175560: 6c6c 7920 636c 6f73 6520 7468 6520 636f lly close the co\n-00175570: 6e6e 6563 7469 6f6e 2e3c 2f70 3e0a 3c70 nnection.

    .The client-side\n-00175590: 2063 616e 2061 6c73 6f20 7365 7420 7468 can also set th\n-001755a0: 6520 5443 5020 6b65 6570 2d61 6c69 7665 e TCP keep-alive\n-001755b0: 2073 6f63 6b65 7420 7072 6f70 6572 7469 socket properti\n-001755c0: 6573 2c20 7573 696e 6720 7468 6520 3c63 es, using the soap\n-00175690: 3a3a 7463 705f 6b65 6570 5f61 6c69 7665 ::tcp_keep_alive\n-001756a0: 3c2f 613e 3c2f 636f 6465 3e20 666c 6167 flag\n-001756b0: 2028 7365 7420 746f 2031 2074 6f20 656e (set to 1 to en\n-001756c0: 6162 6c65 292c 203c 636f 6465 3e3c 6120 able), soap\n-00175770: 3a3a 7463 705f 6b65 6570 5f69 646c 653c ::tcp_keep_idle<\n-00175780: 2f61 3e3c 2f63 6f64 653e 2074 6f20 7365 /a> to se\n-00175790: 7420 7468 6520 3c63 6f64 653e 5443 505f t the TCP_\n-001757a0: 4b45 4550 4944 4c45 3c2f 636f 6465 3e20 KEEPIDLE \n-001757b0: 7661 6c75 652c 203c 636f 6465 3e3c 6120 value, soa\n-00175860: 703a 3a74 6370 5f6b 6565 705f 696e 7476 p::tcp_keep_intv\n-00175870: 6c3c 2f61 3e3c 2f63 6f64 653e 2074 6f20 l to \n-00175880: 7365 7420 7468 6520 3c63 6f64 653e 5443 set the TC\n-00175890: 505f 4b45 4550 494e 5456 4c3c 2f63 6f64 P_KEEPINTVL value, and soap::tcp_keep\n-00175960: 5f63 6e74 3c2f 613e 3c2f 636f 6465 3e20 _cnt \n-00175970: 746f 2073 6574 2074 6865 203c 636f 6465 to set the TCP_KEEPCNT value.

    .<\n-001759a0: 703e 4966 2061 2063 6c69 656e 7420 6973 p>If a client is\n-001759b0: 2069 6e20 7468 6520 6d69 6464 6c65 206f in the middle o\n-001759c0: 6620 736f 6170 2063 616c 6c20 7468 6174 f soap call that\n-001759d0: 206d 6967 6874 2074 616b 6520 6120 6c6f might take a lo\n-001759e0: 6e67 2074 696d 6520 616e 6420 7468 6520 ng time and the \n-001759f0: 7365 7276 6572 2067 6f65 7320 6177 6179 server goes away\n-00175a00: 2f64 6f77 6e20 7468 6520 6361 6c6c 6572 /down the caller\n-00175a10: 2064 6f65 7320 6e6f 7420 6765 7420 616e does not get an\n-00175a20: 7920 6665 6564 6261 636b 2075 6e74 696c y feedback until\n-00175a30: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::recv\n-00175af0: 5f74 696d 656f 7574 3c2f 613e 3c2f 636f _timeout is reached. \n-00175b10: 456e 6162 6c69 6e67 2054 4350 206b 6565 Enabling TCP kee\n-00175b20: 7020 616c 6976 6520 6f6e 2073 7973 7465 p alive on syste\n-00175b30: 6d73 2074 6861 7420 7375 7070 6f72 7420 ms that support \n-00175b40: 6974 2061 6c6c 6f77 7320 666f 7220 6120 it allows for a \n-00175b50: 6661 7374 6572 2063 6f6e 6e65 6374 696f faster connectio\n-00175b60: 6e20 7465 6172 646f 776e 2064 6574 6563 n teardown detec\n-00175b70: 7469 6f6e 2066 6f72 2061 7070 6c69 6361 tion for applica\n-00175b80: 7469 6f6e 7320 7468 6174 206e 6565 6420 tions that need \n-00175b90: 6974 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 it.

    .

    .... \n-00175ba0: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n-00175bb0: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n-00175bc0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..HTTP chunk\n-00175c00: 6564 2074 7261 6e73 6665 7220 656e 636f ed transfer enco\n-00175c10: 6469 6e67 3c2f 6832 3e0a 3c70 3e4f 7574 ding

    .

    Out\n-00175c20: 626f 756e 6420 4854 5450 206d 6573 7361 bound HTTP messa\n-00175c30: 6765 7320 6172 6520 6e6f 7420 6368 756e ges are not chun\n-00175c40: 6b65 6420 756e 6c65 7373 2074 6865 203c ked unless the <\n-00175c50: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n-00175c60: 554e 4b3c 2f63 6f64 653e 2066 6c61 6720 UNK flag \n-00175c70: 6973 2065 6e61 626c 6564 2e20 4368 756e is enabled. Chun\n-00175c80: 6b69 6e67 206d 6179 2069 6d70 726f 7665 king may improve\n-00175c90: 2074 6865 2073 7065 6564 206f 6620 6d65 the speed of me\n-00175ca0: 7373 6167 6520 7365 6e64 696e 6720 7769 ssage sending wi\n-00175cb0: 7468 2048 5454 502c 2062 6563 6175 7365 th HTTP, because\n-00175cc0: 2074 6865 206d 6573 7361 6765 206c 656e the message len\n-00175cd0: 6774 6820 646f 6573 206e 6f74 206e 6565 gth does not nee\n-00175ce0: 6420 746f 2062 6520 6465 7465 726d 696e d to be determin\n-00175cf0: 6564 2069 6e20 6164 7661 6e63 6520 666f ed in advance fo\n-00175d00: 7220 7468 6520 4854 5450 2063 6f6e 7465 r the HTTP conte\n-00175d10: 6e74 206c 656e 6774 6820 6865 6164 6572 nt length header\n-00175d20: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-00175d60: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-00175d80: 3c2f 613e 0a48 5454 5020 6275 6666 6572 .HTTP buffer\n-00175d90: 6564 2073 656e 6473 3c2f 6832 3e0a 3c70 ed sends

    .The entire outb\n-00175db0: 6f75 6e64 206d 6573 7361 6765 2063 616e ound message can\n-00175dc0: 2062 6520 7374 6f72 6564 2069 6e20 6120 be stored in a \n-00175dd0: 6275 6666 6572 2074 6f20 6465 7465 726d buffer to determ\n-00175de0: 696e 6520 7468 6520 4854 5450 2063 6f6e ine the HTTP con\n-00175df0: 7465 6e74 206c 656e 6774 6820 7261 7468 tent length rath\n-00175e00: 6572 2074 6861 6e20 7468 6520 7477 6f2d er than the two-\n-00175e10: 7068 6173 6520 656e 636f 6469 6e67 2075 phase encoding u\n-00175e20: 7365 6420 6279 2067 534f 4150 2063 6c69 sed by gSOAP cli\n-00175e30: 656e 742d 7369 6465 2073 7475 6220 6675 ent-side stub fu\n-00175e40: 6e63 7469 6f6e 7320 616e 6420 7365 7276 nctions and serv\n-00175e50: 6572 2d73 6964 6520 736b 656c 6574 6f6e er-side skeleton\n-00175e60: 2066 756e 6374 696f 6e73 2067 656e 6572 functions gener\n-00175e70: 6174 6564 2062 7920 736f 6170 6370 7032 ated by soapcpp2\n-00175e80: 2c20 7768 6963 6820 7065 7266 6f72 6d20 , which perform \n-00175e90: 6120 7365 7061 7261 7465 2070 6173 7320 a separate pass \n-00175ea0: 6f76 6572 2074 6865 2064 6174 6120 746f over the data to\n-00175eb0: 2064 6574 6572 6d69 6e65 2074 6865 206c determine the l\n-00175ec0: 656e 6774 6820 6f66 2074 6865 206f 7574 ength of the out\n-00175ed0: 626f 756e 6420 6d65 7373 6167 652e 2053 bound message. S\n-00175ee0: 6574 7469 6e67 2074 6865 2066 6c61 6720 etting the flag \n-00175ef0: 3c63 6f64 653e 2353 4f41 505f 494f 5f53 #SOAP_IO_S\n-00175f00: 544f 5245 3c2f 636f 6465 3e20 666f 7220 TORE for \n-00175f10: 7468 6520 6f75 7470 7574 206d 6f64 6520 the output mode \n-00175f20: 7769 6c6c 2062 7566 6665 7220 7468 6520 will buffer the \n-00175f30: 656e 7469 7265 206d 6573 7361 6765 2e20 entire message. \n-00175f40: 5468 6973 206d 6179 206f 7220 6d61 7920 This may or may \n-00175f50: 6e6f 7420 7370 6565 6420 7570 2074 6865 not speed up the\n-00175f60: 2074 7261 6e73 6d69 7373 696f 6e20 6f66 transmission of\n-00175f70: 206d 6573 7361 6765 732c 2064 6570 656e messages, depen\n-00175f80: 6469 6e67 206f 6e20 7468 6520 636f 6e74 ding on the cont\n-00175f90: 656e 742c 2062 7574 206d 6179 2072 6571 ent, but may req\n-00175fa0: 7569 7265 2073 6967 6e69 6669 6361 6e74 uire significant\n-00175fb0: 2073 746f 7261 6765 2073 7061 6365 2074 storage space t\n-00175fc0: 6f20 686f 6c64 206c 6172 6765 206d 6573 o hold large mes\n-00175fd0: 7361 6765 7320 7465 6d70 6f72 6172 696c sages temporaril\n-00175fe0: 792e 3c2f 703e 0a3c 703e f09f 949d 203c y.

    .

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

    ..HTTP\n-00176050: 2061 7574 6865 6e74 6963 6174 696f 6e3c authentication<\n-00176060: 2f68 323e 0a3c 703e 5468 6520 666f 6c6c /h2>.

    The foll\n-00176070: 6f77 696e 6720 7365 6374 696f 6e73 2065 owing sections e\n-00176080: 7870 6c61 696e 2068 6f77 2074 6f20 6175 xplain how to au\n-00176090: 7468 656e 7469 6361 7465 2077 6974 6820 thenticate with \n-001760a0: 4854 5450 2062 6561 7265 722c 2062 6173 HTTP bearer, bas\n-001760b0: 6963 2c20 6469 6765 7374 2c20 616e 6420 ic, digest, and \n-001760c0: 4e54 4c4d 2e20 5072 6f78 7920 6175 7468 NTLM. Proxy auth\n-001760d0: 656e 7469 6361 7469 6f6e 2069 7320 616c entication is al\n-001760e0: 736f 2063 6f76 6572 6564 2e3c 2f70 3e0a so covered.

    .\n-001760f0: 3c70 3e59 6f75 2063 6f75 6c64 2061 6c73

    You could als\n-00176100: 6f20 7573 6520 7468 6520 5769 6e49 6e65 o use the WinIne\n-00176110: 7420 706c 7567 696e 2061 7661 696c 6162 t plugin availab\n-00176120: 6c65 2069 6e20 7468 6520 3c65 6d3e 3c63 le in the gsoap/mod_gs\n-00176140: 6f61 703c 2f63 6f64 653e 3c2f 656d 3e20 oap \n-00176150: 6469 7265 6374 6f72 7920 6f66 2074 6865 directory of the\n-00176160: 2067 534f 4150 2073 6f75 7263 6520 636f gSOAP source co\n-00176170: 6465 2070 6163 6b61 6765 2074 6f20 7369 de package to si\n-00176180: 6d70 6c69 6679 2049 6e74 6572 6e65 7420 mplify Internet \n-00176190: 6163 6365 7373 2066 6f72 2067 534f 4150 access for gSOAP\n-001761a0: 2063 6c69 656e 7420 6170 706c 6963 6174 client applicat\n-001761b0: 696f 6e73 2061 6e64 2064 6561 6c20 7769 ions and deal wi\n-001761c0: 7468 2065 6e63 7279 7074 696f 6e2c 2070 th encryption, p\n-001761d0: 726f 7869 6573 2c20 616e 6420 6175 7468 roxies, and auth\n-001761e0: 656e 7469 6361 7469 6f6e 2c20 7365 6520 entication, see \n-001761f0: 7468 6520 6753 4f41 5020 3c61 2068 7265 the gSOAP WinInet plugin\n-00176230: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n-00176240: 6f6e 2e3c 2f70 3e0a 3c70 3e54 6865 2067 on.

    .

    The g\n-00176250: 534f 4150 2043 5552 4c20 706c 7567 696e SOAP CURL plugin\n-00176260: 2063 616e 2061 6c73 6f20 6265 2075 7365 can also be use\n-00176270: 6420 746f 2064 6576 656c 6f70 2067 534f d to develop gSO\n-00176280: 4150 2063 6c69 656e 7420 6170 706c 6963 AP client applic\n-00176290: 6174 696f 6e73 2061 6e64 2043 5552 4c20 ations and CURL \n-001762a0: 696d 706c 656d 656e 7473 2076 6172 696f implements vario\n-001762b0: 7573 2048 5454 5020 6175 7468 656e 7469 us HTTP authenti\n-001762c0: 6361 7469 6f6e 206d 6574 686f 6473 2c20 cation methods, \n-001762d0: 7365 6520 7468 6520 6753 4f41 5020 3c61 see the gSOAP CURL plugin documentation\n-00176320: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-00176360: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-00176390: 0a48 5454 5020 6265 6172 6572 2061 7574 .HTTP bearer aut\n-001763a0: 6865 6e74 6963 6174 696f 6e3c 2f68 333e hentication

    \n-001763b0: 0a3c 703e 4854 5450 2062 6561 7265 7220 .

    HTTP bearer \n-001763c0: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n-001763d0: 7320 656e 6162 6c65 6420 6174 2074 6865 s enabled at the\n-001763e0: 2063 6c69 656e 742d 7369 6465 2062 7920 client-side by \n-001763f0: 7365 7474 696e 6720 7468 6520 3c63 6f64 setting the soap::\n-001764c0: 6265 6172 6572 3c2f 613e 3c2f 636f 6465 bearer string to the \n-001764e0: 6265 6172 6572 2074 6f6b 656e 3a3c 2f70 bearer token:.

    \n-00176530: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-00176570: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00176580: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00176590: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n-001765a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    .<\n-00176620: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00176630: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00176640: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00176650: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;bear\n-001766a0: 6572 3c2f 613e 203d 203c 7370 616e 2063 er = "...&q\n-001766d0: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    \n-00176710: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-00176720: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n-00176730: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    .\n-00176770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-001767a0: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    \n-001767e0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... \n-00176820: 2f2f 204f 4b3c 2f73 7061 6e3e 3c2f 6469 // OK.
    \n-00176890: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-001768d0: 3a3a 6265 6172 6572 3c2f 613e 3c2f 6469 ::bearer
    const char\n-00176900: 202a 2062 6561 7265 723c 2f64 6976 3e3c * bearer
    <\n-00176910: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00176920: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n-00176930: 2048 5454 5020 6175 7468 6f72 697a 6174 HTTP authorizat\n-00176940: 696f 6e20 6265 6172 6572 2074 6f6b 656e ion bearer token\n-00176950: 2076 616c 7565 2074 6f20 6265 2073 656e value to be sen\n-00176960: 7420 6279 2074 6865 2063 6c69 656e 742c t by the client,\n-00176970: 2073 6572 7665 7220 7369 6465 2072 6563 server side rec\n-00176980: 6569 7665 7320 742e 2e2e 3c2f 6469 763e eives t...
    \n-00176990: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-001769b0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-001769c0: 3a33 3735 323c 2f64 6976 3e3c 2f64 6976 :3752
    .

    ....\n-001769f0: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac\n-00176a00: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co\n-00176a10: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .<\n-00176a20: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.HTTP basic au\n-00176a60: 7468 656e 7469 6361 7469 6f6e 3c2f 6833 thentication.

    HTTP basic \n-00176a80: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n-00176a90: 7320 656e 6162 6c65 6420 6174 2074 6865 s enabled at the\n-00176aa0: 2063 6c69 656e 742d 7369 6465 2062 7920 client-side by \n-00176ab0: 7365 7474 696e 6720 7468 6520 3c63 6f64 setting the const char* soap::user\n-00176b90: 6964 3c2f 613e 3c2f 636f 6465 3e20 616e id an\n-00176ba0: 6420 3c63 6f64 653e 636f 6e73 7420 6368 d const ch\n-00176bb0: 6172 2a20 3c61 2063 6c61 7373 3d22 656c ar* soap\n-00176c70: 3a3a 7061 7373 7764 3c2f 613e 3c2f 636f ::passwd strings to a\n-00176c90: 2075 7365 726e 616d 6520 616e 6420 7061 username and pa\n-00176ca0: 7373 776f 7264 2c20 7265 7370 6563 7469 ssword, respecti\n-00176cb0: 7665 6c79 2e20 4120 7365 7276 6572 206d vely. A server m\n-00176cc0: 6179 2072 6571 7565 7374 2075 7365 7220 ay request user \n-00176cd0: 6175 7468 656e 7469 6361 7469 6f6e 2061 authentication a\n-00176ce0: 6e64 2064 656e 6965 7320 6163 6365 7373 nd denies access\n-00176cf0: 2028 4854 5450 2034 3031 2065 7272 6f72 (HTTP 401 error\n-00176d00: 2920 7768 656e 2074 6865 2063 6c69 656e ) when the clien\n-00176d10: 7420 7472 6965 7320 746f 2063 6f6e 6e65 t tries to conne\n-00176d20: 6374 2077 6974 686f 7574 2048 5454 5020 ct without HTTP \n-00176d30: 6175 7468 656e 7469 6361 7469 6f6e 2028 authentication (\n-00176d40: 6f72 2077 6974 6820 7468 6520 7772 6f6e or with the wron\n-00176d50: 6720 6175 7468 656e 7469 6361 7469 6f6e g authentication\n-00176d60: 2069 6e66 6f72 6d61 7469 6f6e 292e 3c2f information)..

    Basic auth\n-00176d80: 656e 7469 6361 7469 6f6e 2073 686f 756c entication shoul\n-00176d90: 6420 6f6e 6c79 2062 6520 7573 6564 206f d only be used o\n-00176da0: 7665 7220 4854 5450 532c 2062 6563 6175 ver HTTPS, becau\n-00176db0: 7365 2074 6865 2063 7265 6465 6e74 6961 se the credentia\n-00176dc0: 6c73 2061 7265 2073 656e 7420 696e 2074 ls are sent in t\n-00176dd0: 6865 2063 6c65 6172 2077 6974 6820 4854 he clear with HT\n-00176de0: 5450 2e20 5365 6520 5365 6374 696f 6e20 TP. See Section \n-00176df0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 The\n-00176e20: 2048 5454 5020 6469 6765 7374 2061 7574 HTTP digest aut\n-00176e30: 6865 6e74 6963 6174 696f 6e20 706c 7567 hentication plug\n-00176e40: 696e 3c2f 613e 2074 6f20 7573 6520 7468 in to use th\n-00176e50: 6520 4854 5450 2064 6967 6573 7420 706c e HTTP digest pl\n-00176e60: 7567 696e 2074 6861 7420 6973 2073 6166 ugin that is saf\n-00176e70: 6520 666f 7220 6175 7468 656e 7469 6361 e for authentica\n-00176e80: 7469 6f6e 206f 7665 7220 4854 5450 2e3c tion over HTTP.<\n-00176e90: 2f70 3e0a 3c70 3e48 6572 6520 6973 2061 /p>.

    Here is a\n-00176ea0: 6e20 6578 616d 706c 6520 636c 6965 6e74 n example client\n-00176eb0: 2063 6f64 6520 6672 6167 6d65 6e74 2074 code fragment t\n-00176ec0: 6f20 7365 7420 7468 6520 4854 5450 2061 o set the HTTP a\n-00176ed0: 7574 6865 6e74 6963 6174 696f 6e20 7573 uthentication us\n-00176ee0: 6572 6e61 6d65 2061 6e64 2070 6173 7377 ername and passw\n-00176ef0: 6f72 643a 3c2f 703e 0a3c 6469 7620 636c ord:

    .
    <\n-00176f10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00176f20: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n-00176f70: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-00176fa0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-00177000: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); .
    soa\n-00177050: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->userid = \n-001770b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001770d0: 743b 6775 6573 7426 7175 6f74 3b3c 2f73 t;guest";
    .<\n-00177100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00177110: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00177120: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00177130: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;pass\n-00177180: 7764 3c2f 613e 203d 203c 7370 616e 2063 wd = "visit\n-001771b0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-001771c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soa\n-00177200: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n-00177210: 7468 6f64 283c 6120 636c 6173 733d 2263 thod(soap\n-00177240: 3c2f 613e 2c20 2e2e 2e29 293c 2f64 6976 , ...)).
    ... \n-00177280: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-00177290: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else.
    ... // success
    .
    .
    <\n-00177670: 703e 4120 636c 6965 6e74 2053 4f41 5020 p>A client SOAP \n-00177680: 7265 7175 6573 7420 7769 6c6c 2068 6176 request will hav\n-00177690: 6520 7468 6520 666f 6c6c 6f77 696e 6720 e the following \n-001776a0: 4854 5450 2068 6561 6465 723a 203c 2f70 HTTP header:
    POST /XXX\n-001776d0: 2048 5454 502f 312e 3120 0a48 6f73 743a   HTTP/1.1 .Host:\n-001776e0: 2059 5959 200a 5573 6572 2d41 6765 6e74   YYY .User-Agent\n-001776f0: 3a20 6753 4f41 502f 322e 3820 0a43 6f6e  : gSOAP/2.8 .Con\n-00177700: 7465 6e74 2d54 7970 653a 2074 6578 742f  tent-Type: text/\n-00177710: 786d 6c3b 2063 6861 7273 6574 3d75 7466  xml; charset=utf\n-00177720: 2d38 200a 436f 6e74 656e 742d 4c65 6e67  -8 .Content-Leng\n-00177730: 7468 3a20 5a5a 5a20 0a41 7574 686f 7269  th: ZZZ .Authori\n-00177740: 7a61 7469 6f6e 3a20 4261 7369 6320 5a33  zation: Basic Z3\n-00177750: 566c 6333 5136 5a33 566c 6333 513d 200a  Vlc3Q6Z3Vlc3Q= .\n-00177760: 3c2f 7072 653e 3c70 3e20 4120 636c 6965  

    A clie\n-00177770: 6e74 206d 7573 7420 7365 7420 7468 6520 nt must set the \n-00177780: 3c63 6f64 653e 636f 6e73 7420 6368 6172 const char\n-00177790: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::\n-00177850: 7573 6572 6964 3c2f 613e 3c2f 636f 6465 userid and cons\n-00177870: 7420 6368 6172 2a20 3c61 2063 6c61 7373 t char* \n-00177930: 736f 6170 3a3a 7061 7373 7764 3c2f 613e soap::passwd\n-00177940: 3c2f 636f 6465 3e20 7374 7269 6e67 7320 strings \n-00177950: 666f 7220 6561 6368 2063 616c 6c20 7468 for each call th\n-00177960: 6174 2072 6571 7569 7265 7320 636c 6965 at requires clie\n-00177970: 6e74 2061 7574 6865 6e74 6963 6174 696f nt authenticatio\n-00177980: 6e2e 2054 6865 2073 7472 696e 6773 2061 n. The strings a\n-00177990: 7265 2072 6573 6574 2061 6674 6572 2065 re reset after e\n-001779a0: 6163 6820 7375 6363 6573 7366 756c 206f ach successful o\n-001779b0: 7220 756e 7375 6363 6573 7366 756c 2063 r unsuccessful c\n-001779c0: 616c 6c2e 3c2f 703e 0a3c 703e 5768 656e all.

    .

    When\n-001779d0: 2070 7265 7365 6e74 2c20 7468 6520 3c63 present, the WWW-Authenti\n-001779f0: 6361 7465 3c2f 636f 6465 3e20 4854 5450 cate HTTP\n-00177a00: 2068 6561 6465 7220 7265 7475 726e 6564 header returned\n-00177a10: 2062 7920 7468 6520 7365 7276 6572 2077 by the server w\n-00177a20: 6974 6820 7468 6520 6175 7468 656e 7469 ith the authenti\n-00177a30: 6361 7469 6f6e 2072 6561 6c6d 2069 7320 cation realm is \n-00177a40: 7374 6f72 6564 2069 6e20 7468 6520 7468 stored in the th\n-00177a50: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n-00177b10: 736f 6170 3a3a 6175 7468 7265 616c 6d3c soap::authrealm<\n-00177b20: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n-00177b30: 672e 2054 6869 7320 6973 2075 7365 6675 g. This is usefu\n-00177b40: 6c20 666f 7220 636c 6965 6e74 7320 746f l for clients to\n-00177b50: 2075 7365 2074 6869 7320 646f 6d61 696e use this domain\n-00177b60: 2069 6e66 6f72 6d61 7469 6f6e 2074 6f20 information to \n-00177b70: 7265 7370 6f6e 6420 746f 2061 7574 6865 respond to authe\n-00177b80: 6e74 6963 6174 696f 6e20 7265 7175 6573 ntication reques\n-00177b90: 7473 2e3c 2f70 3e0a 3c70 3e41 2073 7461 ts.

    .

    A sta\n-00177ba0: 6e64 2d61 6c6f 6e65 2067 534f 4150 2057 nd-alone gSOAP W\n-00177bb0: 6562 2053 6572 7669 6365 2061 7070 6c69 eb Service appli\n-00177bc0: 6361 7469 6f6e 2063 616e 2065 6e66 6f72 cation can enfor\n-00177bd0: 6365 2048 5454 5020 6175 7468 656e 7469 ce HTTP authenti\n-00177be0: 6361 7469 6f6e 206f 6e20 636c 6965 6e74 cation on client\n-00177bf0: 7320 6279 2063 6865 636b 696e 6720 7468 s by checking th\n-00177c00: 6520 3c63 6f64 653e 636f 6e73 7420 6368 e const ch\n-00177c10: 6172 2a20 3c61 2063 6c61 7373 3d22 656c ar* soap\n-00177cd0: 3a3a 7573 6572 6964 3c2f 613e 3c2f 636f ::userid and co\n-00177cf0: 6e73 7420 6368 6172 2a20 3c61 2063 6c61 nst char* soap::passwd string\n-00177dd0: 732e 2054 6865 7365 2073 7472 696e 6773 s. These strings\n-00177de0: 2061 7265 2073 6574 2077 6865 6e20 6120 are set when a \n-00177df0: 636c 6965 6e74 2072 6571 7565 7374 2063 client request c\n-00177e00: 6f6e 7461 696e 7320 4854 5450 2061 7574 ontains HTTP aut\n-00177e10: 6865 6e74 6963 6174 696f 6e20 6865 6164 hentication head\n-00177e20: 6572 732e 2054 6865 2073 7472 696e 6773 ers. The strings\n-00177e30: 2073 686f 756c 6420 6265 2063 6865 636b should be check\n-00177e40: 6564 2069 6e20 6561 6368 2073 6572 7669 ed in each servi\n-00177e50: 6365 206d 6574 686f 6420 2874 6861 7420 ce method (that \n-00177e60: 7265 7175 6972 6573 2061 7574 6865 6e74 requires authent\n-00177e70: 6963 6174 696f 6e20 746f 2065 7865 6375 ication to execu\n-00177e80: 7465 292e 3c2f 703e 0a3c 703e 4865 7265 te).

    .

    Here\n-00177e90: 2069 7320 616e 2065 7861 6d70 6c65 2073 is an example s\n-00177ea0: 6572 7669 6365 206d 6574 686f 6420 696d ervice method im\n-00177eb0: 706c 656d 656e 7461 7469 6f6e 2074 6861 plementation tha\n-00177ec0: 7420 656e 666f 7263 6564 2063 6c69 656e t enforced clien\n-00177ed0: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication\n-00177ee0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int ns__webmethod\n-00177f40: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n-00177f90: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-00177fc0: 703c 2f61 3e2c 202e 2e2e 2920 3c2f 6469 p, ...) .
    {
    . \n-00178000: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!so\n-00178050: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->userid.
    || !soap-&g\n-00178100: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;passw\n-00178150: 643c 2f61 3e3c 2f64 6976 3e0a 3c64 6976 d
    . \n-00178170: 207c 7c20 7374 7263 6d70 283c 6120 636c || strcmp(soap-><\n-001781b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001781c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001781d0: 6874 6d6c 2361 3265 6465 3032 3039 3564 html#a2ede02095d\n-001781e0: 3938 3934 3266 3463 3232 3066 6431 3762 98942f4c220fd17b\n-001781f0: 3439 3537 3033 223e 7573 6572 6964 3c2f 495703\">userid, \n-00178220: 2671 756f 743b 6775 6573 7426 7175 6f74 "guest"\n-00178230: 3b3c 2f73 7061 6e3e 293c 2f64 6976 3e0a ;)
    .\n-00178240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    || strcmp(<\n-00178260: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00178270: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00178280: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00178290: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;pass\n-001782e0: 7764 3c2f 613e 2c20 3c73 7061 6e20 636c wd, "visit&\n-00178310: 7175 6f74 3b3c 2f73 7061 6e3e 2929 203c quot;)) <\n-00178320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    }.
    ... // webmethod l\n-00178510: 6f67 6963 3c2f 7370 616e 3e3c 2f64 6976 ogic.
    \n-00178550: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK;.
    }
    .<\n-001785e0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-001785f0: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-00178600: 6874 6d6c 5f61 3864 6265 3537 6435 3966 html_a8dbe57d59f\n-00178610: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7\n-00178620: 3933 3962 6664 223e 3c64 6976 2063 6c61 939bfd\">
    soap::au\n-00178680: 7468 7265 616c 6d3c 2f61 3e3c 2f64 6976 threalm
    const char \n-001786b0: 2a20 6175 7468 7265 616c 6d3c 2f64 6976 * authrealm
    The HTTP and\n-001786e0: 204e 544c 4d20 6175 7468 6f72 697a 6174 NTLM authorizat\n-001786f0: 696f 6e20 7265 616c 6d2f 646f 6d61 696e ion realm/domain\n-00178700: 2073 7472 696e 6720 7265 6365 6976 6564 string received\n-00178710: 2062 7920 7468 6520 636c 6965 6e74 2077 by the client w\n-00178720: 6974 6820 7468 6520 5757 572d 4175 7468 ith the WWW-Auth\n-00178730: 656e 7469 6361 7465 202e 2e2e 3c2f 6469 enticate ...
    Definiti\n-00178760: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-00178770: 2e68 3a33 3833 323c 2f64 6976 3e3c 2f64 .h:3832
    .

    Wh\n-001787a0: 656e 2074 6865 2061 7574 6865 6e74 6963 en the authentic\n-001787b0: 6174 696f 6e20 6661 696c 732c 2074 6865 ation fails, the\n-001787c0: 2073 6572 7669 6365 2072 6573 706f 6e73 service respons\n-001787d0: 6520 7769 7468 2061 2053 4f41 5020 4661 e with a SOAP Fa\n-001787e0: 756c 7420 6d65 7373 6167 6520 616e 6420 ult message and \n-001787f0: 6120 4854 5450 2065 7272 6f72 2063 6f64 a HTTP error cod\n-00178800: 6520 2234 3031 2055 6e61 7574 686f 7269 e \"401 Unauthori\n-00178810: 7a65 6422 2e20 5468 6520 4854 5450 2065 zed\". The HTTP e\n-00178820: 7272 6f72 2063 6f64 6573 2061 7265 2064 rror codes are d\n-00178830: 6573 6372 6962 6564 2069 6e20 5365 6374 escribed in Sect\n-00178840: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Run\n-00178870: 2d74 696d 6520 6572 726f 7220 636f 6465 -time error code\n-00178880: 733c 2f61 3e20 2e3c 2f70 3e0a 3c70 3e54 s .

    .

    T\n-00178890: 6f20 7265 7475 726e 2061 206e 6f6e 2d53 o return a non-S\n-001788a0: 4f41 5020 6572 726f 722c 2075 7365 3a3c OAP error, use:<\n-001788b0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    return soap_send_em\n-00178960: 7074 795f 7265 7370 6f6e 7365 3c2f 613e pty_response\n-00178970: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001789a0: 2c20 3430 3129 3b20 3c2f 6469 763e 0a3c , 401);
    .<\n-001789b0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

    .

    \n-00178a00: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .H\n-00178a30: 5454 5020 4e54 4c4d 2061 7574 6865 6e74 TTP NTLM authent\n-00178a40: 6963 6174 696f 6e3c 2f68 333e 0a3c 703e ication

    .

    \n-00178a50: 4854 5450 204e 544c 4d20 6175 7468 656e HTTP NTLM authen\n-00178a60: 7469 6361 7469 6f6e 2069 7320 656e 6162 tication is enab\n-00178a70: 6c65 6420 6174 2074 6865 2063 6c69 656e led at the clien\n-00178a80: 742d 7369 6465 2062 7920 696e 7374 616c t-side by instal\n-00178a90: 6c69 6e67 203c 636f 6465 3e6c 6962 6e74 ling libnt\n-00178aa0: 6c6d 3c2f 636f 6465 3e20 6672 6f6d 203c lm from <\n-00178ab0: 6120 6872 6566 3d22 6874 7470 3a2f 2f77 a href=\"http://w\n-00178ac0: 7777 2e6e 6f6e 676e 752e 6f72 672f 6c69 ww.nongnu.org/li\n-00178ad0: 626e 746c 6d22 3e68 7474 703a 2f2f 7777 bntlm\">http://ww\n-00178ae0: 772e 6e6f 6e67 6e75 2e6f 7267 2f6c 6962 w.nongnu.org/lib\n-00178af0: 6e74 6c6d 3c2f 613e 2061 6e64 2063 6f6d ntlm and com\n-00178b00: 7069 6c69 6e67 2061 6c6c 2070 726f 6a65 piling all proje\n-00178b10: 6374 2073 6f75 7263 6520 636f 6465 7320 ct source codes \n-00178b20: 7769 7468 2074 6865 2063 6f6d 7069 6c65 with the compile\n-00178b30: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_NTLM.

    .

    In yo\n-00178b60: 7572 2061 7070 6c69 6361 7469 6f6e 2063 ur application c\n-00178b70: 6f64 6520 7365 7420 7468 6520 3c63 6f64 ode set the const char* soap::user\n-00178c50: 6964 3c2f 613e 3c2f 636f 6465 3e20 616e id an\n-00178c60: 6420 3c63 6f64 653e 636f 6e73 7420 6368 d const ch\n-00178c70: 6172 2a20 3c61 2063 6c61 7373 3d22 656c ar* soap\n-00178d30: 3a3a 7061 7373 7764 3c2f 613e 3c2f 636f ::passwd strings to a\n-00178d50: 2075 7365 726e 616d 6520 616e 6420 7061 username and pa\n-00178d60: 7373 776f 7264 2e20 4120 7365 7276 6572 ssword. A server\n-00178d70: 206d 6179 2072 6571 7565 7374 204e 544c may request NTL\n-00178d80: 4d20 6175 7468 656e 7469 6361 7469 6f6e M authentication\n-00178d90: 2061 6e64 2064 656e 6965 7320 6163 6365 and denies acce\n-00178da0: 7373 2028 4854 5450 2034 3031 2061 7574 ss (HTTP 401 aut\n-00178db0: 6865 6e74 6963 6174 696f 6e20 7265 7175 hentication requ\n-00178dc0: 6972 6564 206f 7220 4854 5450 2034 3037 ired or HTTP 407\n-00178dd0: 2048 5454 5020 7072 6f78 7920 6175 7468 HTTP proxy auth\n-00178de0: 656e 7469 6361 7469 6f6e 2072 6571 7569 entication requi\n-00178df0: 7265 6429 2077 6865 6e20 7468 6520 636c red) when the cl\n-00178e00: 6965 6e74 2074 7269 6573 2074 6f20 636f ient tries to co\n-00178e10: 6e6e 6563 7420 7769 7468 6f75 7420 4854 nnect without HT\n-00178e20: 5450 2061 7574 6865 6e74 6963 6174 696f TP authenticatio\n-00178e30: 6e20 286f 7220 7769 7468 2074 6865 2077 n (or with the w\n-00178e40: 726f 6e67 2061 7574 6865 6e74 6963 6174 rong authenticat\n-00178e50: 696f 6e20 696e 666f 726d 6174 696f 6e29 ion information)\n-00178e60: 2e3c 2f70 3e0a 3c70 3e48 6572 6520 6973 .

    .

    Here is\n-00178e70: 2061 6e20 6578 616d 706c 6520 636c 6965 an example clie\n-00178e80: 6e74 2063 6f64 6520 6672 6167 6d65 6e74 nt code fragment\n-00178e90: 2074 6f20 7365 7420 7468 6520 4e54 4c4d to set the NTLM\n-00178ea0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-00178eb0: 7573 6572 6e61 6d65 2061 6e64 2070 6173 username and pas\n-00178ec0: 7377 6f72 643a 3c2f 703e 0a3c 6469 7620 sword:

    .
    .<\n-00179050: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00179060: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n-00179090: 6e73 5f5f 7765 626d 6574 686f 6428 3c61 ns__webmethod(soap, .\n-001790d0: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    .{<\n-001790f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (<\n-00179130: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00179140: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00179150: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00179160: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-001791b0: 723c 2f61 3e20 3d3d 2034 3031 2920 3c2f r == 401) .
    {
    \n-001791e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n-00179220: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->userid =\n-00179280: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001792a0: 6f74 3b5a 6170 686f 6426 7175 6f74 3b3c ot;Zaphod"<\n-001792b0: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-001792c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001792d0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n-00179300: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->passwd = <\n-00179360: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00179370: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00179380: 3b42 6565 626c 6562 726f 7826 7175 6f74 ;Beeblebrox"\n-00179390: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n-001793a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (soap\n-001793e0: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n-001793f0: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap<\n-00179420: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...)) .
    ... // error
    .
    \n-00179490: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n-001794d0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n-001794f0: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n-00179500: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }.
    }
    .

    The follow\n-00179560: 696e 6720 4e54 4c4d 2068 616e 6473 6861 ing NTLM handsha\n-00179570: 6b65 2062 6574 7765 656e 2074 6865 2063 ke between the c\n-00179580: 6c69 656e 7420 4320 616e 6420 7365 7276 lient C and serv\n-00179590: 6572 2053 2069 7320 7065 7266 6f72 6d65 er S is performe\n-001795a0: 643a 203c 2f70 3e3c 7072 6520 636c 6173 d:

    1: \n-001795c0: 4320 202d 2d26 6774 3b20 5320 2661 6d70  C  --> S &\n-001795d0: 3b20 504f 5354 202e 2e2e 200a 2020 2020  ; POST ... .    \n-001795e0: 2020 2020 2020 2020 2661 6d70 3b20 436f          & Co\n-001795f0: 6e74 656e 742d 5479 7065 3a20 7465 7874  ntent-Type: text\n-00179600: 2f78 6d6c 3b20 6368 6172 7365 743d 7574  /xml; charset=ut\n-00179610: 662d 3820 0a0a 323a 2043 2026 6c74 3b2d  f-8 ..2: C <-\n-00179620: 2d20 2053 2026 616d 703b 2034 3031 2055  -  S & 401 U\n-00179630: 6e61 7574 686f 7269 7a65 6420 0a20 2020  nauthorized .   \n-00179640: 2020 2020 2020 2020 2026 616d 703b 2057           & W\n-00179650: 5757 2d41 7574 6865 6e74 6963 6174 653a  WW-Authenticate:\n-00179660: 204e 544c 4d20 0a0a 333a 2043 2020 2d2d   NTLM ..3: C  --\n-00179670: 2667 743b 2053 2026 616d 703b 2047 4554  > S & GET\n-00179680: 202e 2e2e 200a 2020 2020 2020 2020 2020   ... .          \n-00179690: 2020 2661 6d70 3b20 4175 7468 6f72 697a    & Authoriz\n-001796a0: 6174 696f 6e3a 204e 544c 4d20 266c 743b  ation: NTLM <\n-001796b0: 6261 7365 3634 2d65 6e63 6f64 6564 2074  base64-encoded t\n-001796c0: 7970 652d 312d 6d65 7373 6167 6526 6774  ype-1-message>\n-001796d0: 3b20 0a0a 343a 2043 2026 6c74 3b2d 2d20  ; ..4: C <-- \n-001796e0: 2053 2026 616d 703b 2034 3031 2055 6e61   S & 401 Una\n-001796f0: 7574 686f 7269 7a65 6420 0a20 2020 2020  uthorized .     \n-00179700: 2020 2020 2020 2026 616d 703b 2057 5757         & WWW\n-00179710: 2d41 7574 6865 6e74 6963 6174 653a 204e  -Authenticate: N\n-00179720: 544c 4d20 266c 743b 6261 7365 3634 2d65  TLM <base64-e\n-00179730: 6e63 6f64 6564 2074 7970 652d 322d 6d65  ncoded type-2-me\n-00179740: 7373 6167 6526 6774 3b20 0a0a 353a 2043  ssage> ..5: C\n-00179750: 2020 2d2d 2667 743b 2053 2026 616d 703b    --> S &\n-00179760: 2050 4f53 5420 2e2e 2e20 0a20 2020 2020   POST ... .     \n-00179770: 2020 2020 2020 2026 616d 703b 2043 6f6e         & Con\n-00179780: 7465 6e74 2d54 7970 653a 2074 6578 742f  tent-Type: text/\n-00179790: 786d 6c3b 2063 6861 7273 6574 3d75 7466  xml; charset=utf\n-001797a0: 2d38 200a 2020 2020 2020 2020 2020 2020  -8 .            \n-001797b0: 2661 6d70 3b20 4175 7468 6f72 697a 6174  & Authorizat\n-001797c0: 696f 6e3a 204e 544c 4d20 266c 743b 6261  ion: NTLM <ba\n-001797d0: 7365 3634 2d65 6e63 6f64 6564 2074 7970  se64-encoded typ\n-001797e0: 652d 332d 6d65 7373 6167 6526 6774 3b20  e-3-message> \n-001797f0: 0a0a 363a 2043 2026 6c74 3b2d 2d20 2053  ..6: C <--  S\n-00179800: 2026 616d 703b 2032 3030 204f 4b0a 3c2f   & 200 OK.

    where st\n-00179820: 6167 6573 2031 2061 6e64 2032 2069 6e64 ages 1 and 2 ind\n-00179830: 6963 6174 6573 2061 2063 6c69 656e 7420 icates a client \n-00179840: 6174 7465 6d70 7469 6e67 2074 6f20 636f attempting to co\n-00179850: 6e6e 6563 7420 7769 7468 6f75 7420 6175 nnect without au\n-00179860: 7468 6f72 697a 6174 696f 6e20 696e 666f thorization info\n-00179870: 726d 6174 696f 6e2c 2077 6869 6368 2069 rmation, which i\n-00179880: 7320 7468 6520 6669 7273 7420 6d65 7468 s the first meth\n-00179890: 6f64 2063 616c 6c20 696e 2074 6865 2063 od call in the c\n-001798a0: 6f64 6520 6162 6f76 652e 2053 7461 6765 ode above. Stage\n-001798b0: 2033 2074 6f20 3620 6861 7070 656e 2077 3 to 6 happen w\n-001798c0: 6974 6820 7468 6520 7072 6f70 6572 2063 ith the proper c\n-001798d0: 6c69 656e 7420 6175 7468 656e 7469 6361 lient authentica\n-001798e0: 7469 6f6e 2073 6574 2077 6974 6820 3c63 tion set with const char* \n-00179900: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::us\n-001799c0: 6572 6964 3c2f 613e 3c2f 636f 6465 3e20 erid \n-001799d0: 616e 6420 3c63 6f64 653e 636f 6e73 7420 and const \n-001799e0: 6368 6172 2a20 3c61 2063 6c61 7373 3d22 char* so\n-00179aa0: 6170 3a3a 7061 7373 7764 3c2f 613e 3c2f ap::passwd. Optionall\n-00179ac0: 792c 2074 6865 203c 636f 6465 3e63 6f6e y, the con\n-00179ad0: 7374 2063 6861 722a 203c 6120 636c 6173 st char* soap::authrealm\n-00179ba0: 3c2f 613e 3c2f 636f 6465 3e20 7374 7269 stri\n-00179bb0: 6e67 2073 686f 756c 6420 6265 2073 6574 ng should be set\n-00179bc0: 2061 7320 7765 6c6c 2074 6f20 696e 6469 as well to indi\n-00179bd0: 6361 7465 2074 6865 2064 6f6d 6169 6e20 cate the domain \n-00179be0: 6163 6365 7373 6564 2028 7468 6973 2073 accessed (this s\n-00179bf0: 7472 696e 6720 6973 206e 6f72 6d61 6c6c tring is normall\n-00179c00: 7920 7365 7420 7768 656e 2074 6865 2073 y set when the s\n-00179c10: 6572 7665 7220 7265 7370 6f6e 6473 2077 erver responds w\n-00179c20: 6974 6820 4854 5450 2034 3031 2073 6f20 ith HTTP 401 so \n-00179c30: 7468 6520 636c 6965 6e74 2072 6563 6569 the client recei\n-00179c40: 7665 7320 7468 6973 2073 6572 7665 7220 ves this server \n-00179c50: 646f 6d61 696e 2069 6e66 6f72 6d61 7469 domain informati\n-00179c60: 6f6e 292e 204e 544c 4d20 6175 7468 656e on). NTLM authen\n-00179c70: 7469 6361 7465 7320 636f 6e6e 6563 7469 ticates connecti\n-00179c80: 6f6e 732c 206e 6f74 2072 6571 7565 7374 ons, not request\n-00179c90: 732e 2057 6865 6e20 7468 6520 636f 6e6e s. When the conn\n-00179ca0: 6563 7469 6f6e 2069 7320 6b65 7074 2061 ection is kept a\n-00179cb0: 6c69 7665 2c20 7375 6273 6571 7565 6e74 live, subsequent\n-00179cc0: 206d 6573 7361 6765 7320 6361 6e20 6265 messages can be\n-00179cd0: 2065 7863 6861 6e67 6564 2077 6974 686f exchanged witho\n-00179ce0: 7574 2072 652d 6175 7468 656e 7469 6361 ut re-authentica\n-00179cf0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 6f20 tion.

    .

    To \n-00179d00: 6176 6f69 6420 7468 6520 6f76 6572 6865 avoid the overhe\n-00179d10: 6164 206f 6620 7468 6520 6669 7273 7420 ad of the first \n-00179d20: 7265 6a65 6374 6564 2063 616c 6c2c 2075 rejected call, u\n-00179d30: 7365 3a3c 2f70 3e0a 3c64 6976 2063 6c61 se:

    ..soap-&g\n-00179f00: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;ntlm_\n-00179f50: 6368 616c 6c65 6e67 653c 2f61 3e20 3d20 challenge = \n-00179f60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00179f80: 743b 2671 756f 743b 3c2f 7370 616e 3e3b t;";\n-00179f90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->userid = \n-0017a050: 2671 756f 743b 5a61 7068 6f64 2671 756f "Zaphod&quo\n-0017a060: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    soap<\n-0017a0b0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->passwd = "\n-0017a130: 4265 6562 6c65 6272 6f78 2671 756f 743b Beeblebrox"\n-0017a140: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n-0017a150: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->a\n-0017a1e0: 7574 6872 6561 6c6d 3c2f 613e 203d 203c uthrealm = <\n-0017a1f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0017a200: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0017a210: 3b55 7273 612d 4d69 6e6f 7226 7175 6f74 ;Ursa-Minor"\n-0017a220: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n-0017a230: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n-0017a260: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n-0017a270: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n-0017a280: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0017a2b0: 202e 2e2e 2929 203c 2f64 6976 3e0a 3c64 ...))
    .\n-0017a2d0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-0017a2f0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    el\n-0017a330: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n-0017a340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-0017a370: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n-0017a380: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-0017a3d0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0017a3e0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-0017a420: 6f61 703a 3a6e 746c 6d5f 6368 616c 6c65 oap::ntlm_challe\n-0017a430: 6e67 653c 2f61 3e3c 2f64 6976 3e3c 6469 nge
    const char * nt\n-0017a460: 6c6d 5f63 6861 6c6c 656e 6765 3c2f 6469 lm_challenge
    User-defina\n-0017a490: 626c 6520 4e54 4c4d 2061 7574 6865 6e74 ble NTLM authent\n-0017a4a0: 6963 6174 696f 6e20 6368 616c 6c65 6e67 ication challeng\n-0017a4b0: 6520 6b65 7920 7374 7269 6e67 2e3c 2f64 e key string.
    Definit\n-0017a4e0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0017a4f0: 322e 683a 3338 3738 3c2f 6469 763e 3c2f 2.h:3878
    .

    W\n-0017a520: 6865 6e20 7468 6520 6175 7468 656e 7469 hen the authenti\n-0017a530: 6361 7469 6f6e 2066 6169 6c73 2028 7374 cation fails (st\n-0017a540: 6167 6520 3120 616e 6420 3229 2c20 7468 age 1 and 2), th\n-0017a550: 6520 7365 7276 6963 6520 7265 7370 6f6e e service respon\n-0017a560: 7365 2077 6974 6820 4854 5450 2065 7272 se with HTTP err\n-0017a570: 6f72 2063 6f64 6520 2234 3031 2055 6e61 or code \"401 Una\n-0017a580: 7574 686f 7269 7a65 6422 2061 6e64 203c uthorized\" and <\n-0017a590: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n-0017a640: 3a65 7272 6f72 3c2f 613e 3c2f 636f 6465 :error is set to HTTP\n-0017a660: 2063 6f64 6520 3430 312e 3c2f 703e 0a3c code 401.

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

    .

    .HTT\n-0017a6e0: 5020 7072 6f78 7920 4e54 4c4d 2061 7574 P proxy NTLM aut\n-0017a6f0: 6865 6e74 6963 6174 696f 6e3c 2f68 333e hentication

    \n-0017a700: 0a3c 703e 466f 7220 4854 5450 2034 3037 .

    For HTTP 407\n-0017a710: 2050 726f 7879 2041 7574 6865 6e74 6963 Proxy Authentic\n-0017a720: 6174 696f 6e20 5265 7175 6972 6564 2073 ation Required s\n-0017a730: 6574 2074 6865 203c 636f 6465 3e3c 6120 et the soap\n-0017a7f0: 3a3a 7072 6f78 795f 7573 6572 6964 3c2f ::proxy_userid and soap::proxy_\n-0017a8d0: 7061 7373 7764 3c2f 613e 3c2f 636f 6465 passwd:

    .
    <\n-0017a910: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0017a920: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-0017a990: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-0017a9f0: 6e65 7731 3c2f 613e 283c 6120 636c 6173 new1(SOAP\n-0017aa50: 5f49 4f5f 4b45 4550 414c 4956 453c 2f61 _IO_KEEPALIVE);
    .
    soap->\n-0017aab0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_\n-0017ab00: 686f 7374 3c2f 613e 203d 203c 7370 616e host = "...\n-0017ab30: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-0017ab40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    if\n-0017acd0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e\n-0017ad50: 7272 6f72 3c2f 613e 203d 3d20 3430 3729 rror == 407)\n-0017ad60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap->proxy_use\n-0017ae20: 7269 643c 2f61 3e20 3d20 3c73 7061 6e20 rid = "Zaph\n-0017ae50: 6f64 2671 756f 743b 3c2f 7370 616e 3e3b od";\n-0017ae60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap-&g\n-0017aeb0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;proxy\n-0017af00: 5f70 6173 7377 643c 2f61 3e20 3d20 3c73 _passwd = "\n-0017af30: 4265 6562 6c65 6272 6f78 2671 756f 743b Beeblebrox"\n-0017af40: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n-0017af50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa\n-0017af90: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->authrealm\n-0017aff0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n-0017b010: 7175 6f74 3b55 7273 612d 4d69 6e6f 7226 quot;Ursa-Minor&\n-0017b020: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    if (\n-0017b070: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n-0017b080: 626d 6574 686f 6428 3c61 2063 6c61 7373 bmethod(s\n-0017b0b0: 6f61 703c 2f61 3e2c 202e 2e2e 2929 203c oap, ...)) <\n-0017b0c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ..\n-0017b0e0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // error\n-0017b100: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0017b120: 2020 2020 3c73 7061 6e20 636c 6173 733d el\n-0017b140: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n-0017b150: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // success
    .
    int proxy_port<\n-0017b270: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n-0017b290: 696e 6162 6c65 2070 726f 7879 2070 6f72 inable proxy por\n-0017b2a0: 7420 7768 6963 6820 7368 6f75 6c64 2062 t which should b\n-0017b2b0: 6520 7365 7420 746f 2063 6f6e 6e65 6374 e set to connect\n-0017b2c0: 2074 6872 6f75 6768 2061 6e20 4854 5450 through an HTTP\n-0017b2d0: 2070 726f 7879 2028 7468 6520 7661 6c75 proxy (the valu\n-0017b2e0: 6520 6973 2038 3038 3020 6279 202e 2e2e e is 8080 by ...\n-0017b2f0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0017b310: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0017b320: 6f61 7032 2e68 3a33 3930 363c 2f64 6976 oap2.h:3906
    .
    const char * pr\n-0017b410: 6f78 795f 7573 6572 6964 3c2f 6469 763e oxy_userid
    \n-0017b420: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n-0017b440: 6520 7072 6f78 7920 6175 7468 6f72 697a e proxy authoriz\n-0017b450: 6174 696f 6e20 7573 6572 2069 6420 7374 ation user id st\n-0017b460: 7269 6e67 2074 6f20 6175 7468 656e 7469 ring to authenti\n-0017b470: 6361 7465 2061 6e64 2063 6f6e 6e65 6374 cate and connect\n-0017b480: 2074 6f20 616e 2048 5454 5020 7072 6f78 to an HTTP prox\n-0017b490: 792e 3c2f 6469 763e 3c64 6976 2063 6c61 y.
    De\n-0017b4b0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0017b4c0: 6473 6f61 7032 2e68 3a33 3931 313c 2f64 dsoap2.h:3911
    .
    const char * pr\n-0017b5b0: 6f78 795f 686f 7374 3c2f 6469 763e 3c64 oxy_host
    User-definable \n-0017b5e0: 7072 6f78 7920 686f 7374 206e 616d 6520 proxy host name \n-0017b5f0: 7374 7269 6e67 2077 6869 6368 2073 686f string which sho\n-0017b600: 756c 6420 6265 2073 6574 2074 6f20 636f uld be set to co\n-0017b610: 6e6e 6563 7420 7468 726f 7567 6820 616e nnect through an\n-0017b620: 2048 5454 5020 7072 6f78 792e 3c2f 6469 HTTP proxy.
    Definiti\n-0017b650: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0017b660: 2e68 3a33 3930 313c 2f64 6976 3e3c 2f64 .h:3901
    .U\n-0017b770: 7365 722d 6465 6669 6e61 626c 6520 7072 ser-definable pr\n-0017b780: 6f78 7920 6175 7468 6f72 697a 6174 696f oxy authorizatio\n-0017b790: 6e20 7061 7373 776f 7264 2073 7472 696e n password strin\n-0017b7a0: 6720 746f 2061 7574 6865 6e74 6963 6174 g to authenticat\n-0017b7b0: 6520 616e 6420 636f 6e6e 6563 7420 746f e and connect to\n-0017b7c0: 2061 6e20 4854 5450 2070 726f 7879 2e3c an HTTP proxy.<\n-0017b7d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0017b7f0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0017b800: 6170 322e 683a 3339 3136 3c2f 6469 763e ap2.h:3916
    \n-0017b810: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    To avoid the ov\n-0017b840: 6572 6865 6164 206f 6620 7468 6520 6669 erhead of the fi\n-0017b850: 7273 7420 7265 6a65 6374 6564 2063 616c rst rejected cal\n-0017b860: 6c2c 2075 7365 3a3c 2f70 3e0a 3c64 6976 l, use:

    .
    .\n-0017b9f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p\n-0017ba80: 726f 7879 5f68 6f73 743c 2f61 3e20 3d20 roxy_host = \n-0017ba90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0017bab0: 743b 2e2e 2e26 7175 6f74 3b3c 2f73 7061 t;...";
    .
    soap->\n-0017bb10: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_\n-0017bb60: 706f 7274 3c2f 613e 203d 202e 2e2e 3b20 port = ...; \n-0017bb70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0017bbb0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->proxy_user\n-0017bc10: 6964 3c2f 613e 203d 203c 7370 616e 2063 id = "Zapho\n-0017bc40: 6426 7175 6f74 3b3c 2f73 7061 6e3e 3b20 d"; \n-0017bc50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    soap->\n-0017bd80: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;authre\n-0017bdd0: 616c 6d3c 2f61 3e20 3d20 3c73 7061 6e20 alm = "Ursa\n-0017be00: 2d4d 696e 6f72 2671 756f 743b 3c2f 7370 -Minor";
    .soap-&g\n-0017be60: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;ntlm_\n-0017beb0: 6368 616c 6c65 6e67 653c 2f61 3e20 3d20 challenge = \n-0017bec0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0017bee0: 743b 2671 756f 743b 3c2f 7370 616e 3e3b t;";\n-0017bef0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (s\n-0017bf30: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n-0017bf40: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n-0017bf70: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
    ... // error
    .
    else\n-0017c000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n-0017c020: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0017c030: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n-0017c040: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

    .... Back to \n-0017c080: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n-0017c090: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

    .

    .HT\n-0017c0d0: 5450 2070 726f 7879 2062 6173 6963 2061 TP proxy basic a\n-0017c0e0: 7574 6865 6e74 6963 6174 696f 6e3c 2f68 uthentication.

    HTTP proxy\n-0017c100: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-0017c110: 2862 6173 6963 2920 6973 2065 6e61 626c (basic) is enabl\n-0017c120: 6564 2061 7420 7468 6520 636c 6965 6e74 ed at the client\n-0017c130: 2d73 6964 6520 6279 2073 6574 7469 6e67 -side by setting\n-0017c140: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::\n-0017c200: 7072 6f78 795f 7573 6572 6964 3c2f 613e proxy_userid\n-0017c210: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap::proxy_pa\n-0017c2e0: 7373 7764 3c2f 613e 3c2f 636f 6465 3e20 sswd \n-0017c2f0: 7374 7269 6e67 7320 746f 2061 2075 7365 strings to a use\n-0017c300: 726e 616d 6520 616e 6420 7061 7373 776f rname and passwo\n-0017c310: 7264 2c20 7265 7370 6563 7469 7665 6c79 rd, respectively\n-0017c320: 2e20 466f 7220 6578 616d 706c 652c 2061 . For example, a\n-0017c330: 2070 726f 7879 2073 6572 7665 7220 6d61 proxy server ma\n-0017c340: 7920 7265 7175 6573 7420 7573 6572 2061 y request user a\n-0017c350: 7574 6865 6e74 6963 6174 696f 6e2e 204f uthentication. O\n-0017c360: 7468 6572 7769 7365 2c20 6163 6365 7373 therwise, access\n-0017c370: 2069 7320 6465 6e69 6564 2062 7920 7468 is denied by th\n-0017c380: 6520 7072 6f78 7920 2848 5454 5020 3430 e proxy (HTTP 40\n-0017c390: 3720 6572 726f 7229 2e20 4578 616d 706c 7 error). Exampl\n-0017c3a0: 6520 636c 6965 6e74 2063 6f64 6520 6672 e client code fr\n-0017c3b0: 6167 6d65 6e74 2074 6f20 7365 7420 7072 agment to set pr\n-0017c3c0: 6f78 7920 7365 7276 6572 2c20 7573 6572 oxy server, user\n-0017c3d0: 6e61 6d65 2c20 616e 6420 7061 7373 776f name, and passwo\n-0017c3e0: 7264 3a3c 2f70 3e0a 3c64 6976 2063 6c61 rd:

    .
    \n-0017c410: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-0017c460: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-0017c490: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n-0017c4f0: 5f6e 6577 3c2f 613e 2829 3b20 3c2f 6469 _new(); .
    soap\n-0017c540: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_host\n-0017c5a0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n-0017c5c0: 7175 6f74 3b78 782e 7878 2e78 782e 7878 quot;xx.xx.xx.xx\n-0017c5d0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-0017c5e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0017c5f0: 656e 7422 3e2f 2f20 4950 206f 7220 646f ent\">// IP or do\n-0017c600: 6d61 696e 203c 2f73 7061 6e3e 3c2f 6469 main .
    soap\n-0017c650: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_port\n-0017c6b0: 203d 2038 3038 303b 203c 2f64 6976 3e0a = 8080;
    .\n-0017c6c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p\n-0017c750: 726f 7879 5f75 7365 7269 643c 2f61 3e20 roxy_userid \n-0017c760: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n-0017c780: 756f 743b 6775 6573 7426 7175 6f74 3b3c uot;guest"<\n-0017c790: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-0017c7a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0017c7b0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0017c7e0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pr\n-0017c830: 6f78 795f 7061 7373 7764 3c2f 613e 203d oxy_passwd =\n-0017c840: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0017c860: 6f74 3b67 7565 7374 2671 756f 743b 3c2f ot;guest";
    .

    A client\n-0017c8a0: 2053 4f41 5020 7265 7175 6573 7420 7769 SOAP request wi\n-0017c8b0: 6c6c 2068 6176 6520 7468 6520 666f 6c6c ll have the foll\n-0017c8c0: 6f77 696e 6720 4854 5450 2068 6561 6465 owing HTTP heade\n-0017c8d0: 723a 203c 2f70 3e3c 7072 6520 636c 6173 r:

    POS\n-0017c8f0: 5420 2f58 5858 2048 5454 502f 312e 3120  T /XXX HTTP/1.1 \n-0017c900: 0a48 6f73 743a 2059 5959 200a 5573 6572  .Host: YYY .User\n-0017c910: 2d41 6765 6e74 3a20 6753 4f41 502f 322e  -Agent: gSOAP/2.\n-0017c920: 3820 0a43 6f6e 7465 6e74 2d54 7970 653a  8 .Content-Type:\n-0017c930: 2074 6578 742f 786d 6c3b 2063 6861 7273   text/xml; chars\n-0017c940: 6574 3d75 7466 2d38 200a 436f 6e74 656e  et=utf-8 .Conten\n-0017c950: 742d 4c65 6e67 7468 3a20 5a5a 5a20 0a50  t-Length: ZZZ .P\n-0017c960: 726f 7879 2d41 7574 686f 7269 7a61 7469  roxy-Authorizati\n-0017c970: 6f6e 3a20 4261 7369 6320 5a33 566c 6333  on: Basic Z3Vlc3\n-0017c980: 5136 5a33 566c 6333 513d 200a 3c2f 7072  Q6Z3Vlc3Q= .

    When X-For\n-0017c9a0: 7761 7264 6564 2d46 6f72 2068 6561 6465 warded-For heade\n-0017c9b0: 7273 2061 7265 2072 6574 7572 6e65 6420 rs are returned \n-0017c9c0: 6279 2074 6865 2070 726f 7879 2c20 7468 by the proxy, th\n-0017c9d0: 6520 6865 6164 6572 2063 616e 2062 6520 e header can be \n-0017c9e0: 6163 6365 7373 6564 2069 6e20 7468 6520 accessed in the \n-0017c9f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n-0017ca80: 703a 3a70 726f 7879 5f66 726f 6d3c 2f61 p::proxy_from string.\n-0017caa0: 3c2f 703e 0a3c 703e 5468 6520 434f 4e4e

    .

    The CONN\n-0017cab0: 4543 5420 6d65 7468 6f64 2069 7320 7573 ECT method is us\n-0017cac0: 6564 2066 6f72 2048 5454 5020 7072 6f78 ed for HTTP prox\n-0017cad0: 7920 6175 7468 656e 7469 6361 7469 6f6e y authentication\n-0017cae0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    CONN\n-0017cb00: 4543 5420 7365 7276 6572 2e65 7861 6d70  ECT server.examp\n-0017cb10: 6c65 2e63 6f6d 3a38 3020 4854 5450 2f31  le.com:80 HTTP/1\n-0017cb20: 2e31 0a3c 2f70 7265 3e3c 703e 2049 6e20  .1.

    In \n-0017cb30: 736f 6d65 2063 6173 6573 2c20 796f 7520 some cases, you \n-0017cb40: 7769 6c6c 206e 6f74 6963 6520 7468 6174 will notice that\n-0017cb50: 2074 6865 2048 6f73 7420 4854 5450 2068 the Host HTTP h\n-0017cb60: 6561 6465 7220 7573 6573 2074 6865 2043 eader uses the C\n-0017cb70: 4f4e 4e45 4354 2070 726f 746f 636f 6c3a ONNECT protocol:\n-0017cb80: 203c 2f70 3e3c 7072 6520 636c 6173 733d

    CONNE\n-0017cba0: 4354 2073 6572 7665 722e 6578 616d 706c  CT server.exampl\n-0017cbb0: 652e 636f 6d3a 3830 2048 5454 502f 312e  e.com:80 HTTP/1.\n-0017cbc0: 3120 0a48 6f73 743a 2073 6572 7665 722e  1 .Host: server.\n-0017cbd0: 6578 616d 706c 652e 636f 6d3a 3830 0a3c  example.com:80.<\n-0017cbe0: 2f70 7265 3e3c 703e 20f0 9f94 9d20 3c61  /pre>

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

    .

    \n-0017cc20: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-0017cc40: 0a50 6572 666f 726d 616e 6365 2069 6d70 .Performance imp\n-0017cc50: 726f 7665 6d65 6e74 2074 6970 733c 2f68 rovement tips.

    Here are s\n-0017cc70: 6f6d 6520 7469 7073 2079 6f75 2063 616e ome tips you can\n-0017cc80: 2075 7365 2074 6f20 7370 6565 6420 7570 use to speed up\n-0017cc90: 2067 534f 4150 2e20 5468 6520 6465 6661 gSOAP. The defa\n-0017cca0: 756c 7420 7365 7474 696e 6773 2061 7265 ult settings are\n-0017ccb0: 2063 686f 7365 6e20 746f 206d 6178 696d chosen to maxim\n-0017ccc0: 697a 6520 706f 7274 6162 696c 6974 7920 ize portability \n-0017ccd0: 616e 6420 636f 6d70 6174 6962 696c 6974 and compatibilit\n-0017cce0: 792e 2054 6865 2073 6574 7469 6e67 7320 y. The settings \n-0017ccf0: 6361 6e20 6265 2074 7765 616b 6564 2074 can be tweaked t\n-0017cd00: 6f20 6f70 7469 6d69 7a65 2074 6865 2070 o optimize the p\n-0017cd10: 6572 666f 726d 616e 6365 2061 7320 666f erformance as fo\n-0017cd20: 6c6c 6f77 733a 3c2f 703e 0a3c 756c 3e0a llows:

    .

    <\n-0017fae0: 703e 5768 656e 2061 2074 696d 656f 7574 p>When a timeout\n-0017faf0: 206f 6363 7572 7320 696e 2074 6865 2073 occurs in the s\n-0017fb00: 656e 6420 6f72 2072 6563 6569 7665 206f end or receive o\n-0017fb10: 7065 7261 7469 6f6e 732c 2061 203c 636f perations, a #SOAP_EOF exception wi\n-0017fb40: 6c6c 2062 6520 7261 6973 6564 2028 2265 ll be raised (\"e\n-0017fb50: 6e64 206f 6620 6669 6c65 206f 7220 6e6f nd of file or no\n-0017fb60: 2069 6e70 7574 2229 2e20 4e65 6761 7469 input\"). Negati\n-0017fb70: 7665 2074 696d 656f 7574 2076 616c 7565 ve timeout value\n-0017fb80: 7320 6d65 6173 7572 6520 7469 6d65 6f75 s measure timeou\n-0017fb90: 7473 2069 6e20 6d69 6372 6f73 6563 6f6e ts in microsecon\n-0017fba0: 6473 2c20 666f 7220 6578 616d 706c 653a ds, for example:\n-0017fbb0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #define \n-0017fc00: 7553 6563 202a 2d31 203c 2f73 7061 6e3e uSec *-1 \n-0017fc10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #define mSec\n-0017fc50: 202a 2d31 3030 3020 3c2f 7370 616e 3e3c *-1000 <\n-0017fc60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-0017fc80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-0017fcb0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-0017fce0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-0017fd10: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-0017fd70: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); ..
    soap-><\n-0017fe80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017fe90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017fea0: 6874 6d6c 2361 3731 3162 6233 6135 3364 html#a711bb3a53d\n-0017feb0: 6537 6363 3632 3432 3965 3464 3361 3265 e7cc62429e4d3a2e\n-0017fec0: 3062 3534 3734 223e 7365 6e64 5f74 696d 0b5474\">send_tim\n-0017fed0: 656f 7574 3c2f 613e 203d 2032 3020 6d53 eout = 20 mS\n-0017fee0: 6563 3b20 3c2f 6469 763e 0a3c 6469 7620 ec;
    .
    soap->\n-0017ff30: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;recv_t\n-0017ff80: 696d 656f 7574 3c2f 613e 203d 2032 3020 imeout = 20 \n-0017ff90: 6d53 6563 3b20 3c2f 6469 763e 0a3c 6469 mSec;
    .<\n-0017ffb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017ffc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017ffd0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0017ffe0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;recv\n-00180030: 5f74 696d 656f 7574 3c2f 613e 203d 2031 _timeout = 1\n-00180040: 303b 3c2f 6469 763e 0a3c 2f64 6976 3e3c 0;
    .
    <\n-00180050: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00180060: 3c64 6c20 636c 6173 733d 2273 6563 7469
    \n-00180080: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
    \n-00180090: 4d61 6e79 204c 696e 7578 2076 6572 7369 Many Linux versi\n-001800a0: 6f6e 7320 646f 206e 6f74 2073 7570 706f ons do not suppo\n-001800b0: 7274 206e 6f6e 2d62 6c6f 636b 696e 6720 rt non-blocking \n-001800c0: 3c63 6f64 653e 636f 6e6e 6563 7428 293c connect()<\n-001800d0: 2f63 6f64 653e 2e20 5468 6572 6566 6f72 /code>. Therefor\n-001800e0: 652c 2073 6574 7469 6e67 203c 636f 6465 e, setting soap::c\n-001801b0: 6f6e 6e65 6374 5f74 696d 656f 7574 3c2f onnect_timeout for no\n-001801d0: 6e2d 626c 6f63 6b69 6e67 203c 636f 6465 n-blocking soap_call_ns__w\n-001801f0: 6562 6d65 7468 6f64 3c2f 636f 6465 3e20 ebmethod \n-00180200: 6361 6c6c 7320 6d61 7920 6e6f 7420 776f calls may not wo\n-00180210: 726b 2075 6e64 6572 204c 696e 7578 2e3c rk under Linux.<\n-00180220: 2f64 643e 0a3c 6464 3e0a 496e 7465 7272 /dd>.
    .Interr\n-00180230: 7570 7473 2028 4549 4e54 5229 2063 616e upts (EINTR) can\n-00180240: 2061 6666 6563 7420 7468 6520 626c 6f63 affect the bloc\n-00180250: 6b69 6e67 2074 696d 6520 696e 2049 2f4f king time in I/O\n-00180260: 206f 7065 7261 7469 6f6e 732e 2054 6865 operations. The\n-00180270: 206d 6178 696d 756d 206e 756d 6265 7220 maximum number \n-00180280: 6f66 2045 494e 5452 2074 6861 7420 7769 of EINTR that wi\n-00180290: 6c6c 206e 6f74 2074 7269 6767 6572 2061 ll not trigger a\n-001802a0: 6e20 6572 726f 7220 6973 2073 6574 2062 n error is set b\n-001802b0: 7920 3c63 6f64 653e 2353 4f41 505f 4d41 y #SOAP_MA\n-001802c0: 5845 494e 5452 3c2f 636f 6465 3e20 696e XEINTR in\n-001802d0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-001802e0: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h, which i\n-00180300: 7320 3130 2062 7920 6465 6661 756c 742e s 10 by default.\n-00180310: 2045 6163 6820 4549 4e54 5220 6d61 7920 Each EINTR may \n-00180320: 696e 6372 6561 7365 2074 6865 2062 6c6f increase the blo\n-00180330: 636b 696e 6720 7469 6d65 2062 7920 7570 cking time by up\n-00180340: 2074 6f20 6f6e 6520 7365 636f 6e64 2c20 to one second, \n-00180350: 7570 2074 6f20 3c63 6f64 653e 2353 4f41 up to #SOA\n-00180360: 505f 4d41 5845 494e 5452 3c2f 636f 6465 P_MAXEINTR seconds total.\n-00180380: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e f09f
    .

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

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

    .Clos\n-001803f0: 696e 6720 636f 6e6e 6563 7469 6f6e 7320 ing connections \n-00180400: 6279 2066 6f72 6365 3c2f 6832 3e0a 3c70 by force

    .To close a sock\n-00180420: 6574 2063 6f6e 6e65 6374 696f 6e20 6279 et connection by\n-00180430: 2066 6f72 6365 2c20 796f 7520 6361 6e20 force, you can \n-00180440: 7573 6520 3c63 6f64 653e 736f 6170 5f66 use soap_f\n-00180450: 6f72 6365 5f63 6c6f 7365 736f 636b 2873 orce_closesock(s\n-00180460: 6f61 7029 3c2f 636f 6465 3e2c 2077 6869 oap), whi\n-00180470: 6368 2063 6c6f 7365 7320 7468 6520 636f ch closes the co\n-00180480: 6e6e 6563 7469 6f6e 2072 6567 6172 646c nnection regardl\n-00180490: 6573 7320 6966 206b 6565 702d 616c 6976 ess if keep-aliv\n-001804a0: 6520 6973 2061 6374 6976 652e 2042 7920 e is active. By \n-001804b0: 636f 6e74 7261 7374 2c20 3c63 6f64 653e contrast, \n-001804c0: 736f 6170 5f63 6c6f 7365 736f 636b 2873 soap_closesock(s\n-001804d0: 6f61 7029 3c2f 636f 6465 3e20 6f6e 6c79 oap) only\n-001804e0: 2063 6c6f 7365 7320 7468 6520 636f 6e6e closes the conn\n-001804f0: 6563 7469 6f6e 2077 6865 6e20 6b65 6570 ection when keep\n-00180500: 2d61 6c69 7665 2069 7320 6e6f 7420 6163 -alive is not ac\n-00180510: 7469 7665 2e3c 2f70 3e0a 3c70 3e54 6f20 tive.

    .

    To \n-00180520: 666f 7263 652d 636c 6f73 6520 6120 636f force-close a co\n-00180530: 6e6e 6563 7469 6f6e 2066 726f 6d20 616e nnection from an\n-00180540: 6f74 6865 7220 7468 7265 6164 2c20 636f other thread, co\n-00180550: 6d70 696c 6520 7374 6473 6f61 7032 2e63 mpile stdsoap2.c\n-00180560: 206f 7220 7374 6473 6f61 7032 2e63 7070 or stdsoap2.cpp\n-00180570: 2061 6e64 2079 6f75 7220 7072 6f6a 6563 and your projec\n-00180580: 7420 736f 7572 6365 2063 6f64 6520 7769 t source code wi\n-00180590: 7468 203c 636f 6465 3e23 5749 5448 5f53 th #WITH_S\n-001805a0: 454c 465f 5049 5045 3c2f 636f 6465 3e20 ELF_PIPE \n-001805b0: 746f 2065 6e61 626c 6520 7468 6973 2066 to enable this f\n-001805c0: 6561 7475 7265 2e20 5573 6520 3c63 6f64 eature. Use soap_close_con\n-001805e0: 6e65 6374 696f 6e28 736f 6170 293c 2f63 nection(soap) on the so\n-00180650: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n-00180660: 6e74 6578 7420 7468 6174 206d 7573 7420 ntext that must \n-00180670: 636c 6f73 652e 2059 6f75 2063 616e 206d close. You can m\n-00180680: 616b 6520 7468 6973 2063 616c 6c20 6672 ake this call fr\n-00180690: 6f6d 2061 6e6f 7468 6572 2074 6872 6561 om another threa\n-001806a0: 6420 616e 6420 7061 7373 2074 6865 203c d and pass the <\n-001806b0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-00180710: 2063 6f6e 7465 7874 2074 6f20 7468 6973 context to this\n-00180720: 2066 756e 6374 696f 6e20 6f66 2074 6865 function of the\n-00180730: 2074 6872 6561 6420 7468 6174 206d 7573 thread that mus\n-00180740: 7420 636c 6f73 6520 636f 6e6e 6563 7469 t close connecti\n-00180750: 6f6e 732e 3c2f 703e 0a3c 703e f09f 949d ons.

    .

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

    .<\n-00180790: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Socket \n-001807c0: 6f70 7469 6f6e 7320 616e 6420 666c 6167 options and flag\n-001807d0: 733c 2f68 323e 0a3c 703e 536f 636b 6574 s

    .

    Socket\n-001807e0: 2063 6f6d 6d75 6e69 6361 7469 6f6e 7320 communications \n-001807f0: 6361 6e20 6265 2063 6f6e 7472 6f6c 6c65 can be controlle\n-00180800: 6420 7769 7468 2073 6f63 6b65 7420 6f70 d with socket op\n-00180810: 7469 6f6e 7320 616e 6420 666c 6167 732e tions and flags.\n-00180820: 2054 6865 203c 636f 6465 3e3c 6120 636c The soap<\n-00180880: 2f63 6f64 653e 2063 6f6e 7465 7874 2066 /code> context f\n-00180890: 6c61 6773 2061 7265 3a3c 2f70 3e0a 3c75 lags are:

    ..
  • soap::socke\n-00180970: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags to set flags \n-00180990: 666f 7220 7468 6520 736f 636b 6574 203c for the socket <\n-001809a0: 636f 6465 3e73 656e 643c 2f63 6f64 653e code>send\n-001809b0: 2061 6e64 203c 636f 6465 3e72 6563 763c and recv<\n-001809c0: 2f63 6f64 653e 2063 616c 6c73 2e3c 2f6c /code> calls..
  • soap::conne\n-00180aa0: 6374 5f66 6c61 6773 3c2f 613e 3c2f 636f ct_flags to set clien\n-00180ac0: 742d 7369 6465 203c 636f 6465 3e73 6574 t-side set\n-00180ad0: 736f 636b 6f70 743c 2f63 6f64 653e 203c sockopt <\n-00180ae0: 636f 6465 3e53 4f4c 5f53 4f43 4b45 543c code>SOL_SOCKET<\n-00180af0: 2f63 6f64 653e 2073 6f63 6b65 7420 6f70 /code> socket op\n-00180b00: 7469 6f6e 7320 7768 656e 2063 6f6e 6e65 tions when conne\n-00180b10: 6374 696e 672e 3c2f 6c69 3e0a 3c6c 693e cting.
  • .
  • \n-00180b20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-00180be0: 6170 3a3a 6269 6e64 5f66 6c61 6773 3c2f ap::bind_flags to set\n-00180c00: 2073 6572 7665 722d 7369 6465 203c 636f server-side setsockopt SOL_S\n-00180c30: 4f43 4b45 543c 2f63 6f64 653e 2073 6f63 OCKET soc\n-00180c40: 6b65 7420 6f70 7469 6f6e 7320 7768 656e ket options when\n-00180c50: 2065 7865 6375 7469 6e67 203c 636f 6465 executing soap_bind<\n-00180ce0: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>.
  • .s\n-00180db0: 6f61 703a 3a62 696e 645f 7636 6f6e 6c79 oap::bind_v6only\n-00180dc0: 3c2f 613e 3c2f 636f 6465 3e20 7365 7420 set \n-00180dd0: 746f 2031 2074 6f20 7365 7420 3c63 6f64 to 1 to set setsockopt IPPROT\n-00180e00: 4f5f 4950 5636 3c2f 636f 6465 3e20 3c63 O_IPV6 IPV6_V6ONLY<\n-00180e20: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>..s\n-00180ef0: 6f61 703a 3a61 6363 6570 745f 666c 6167 oap::accept_flag\n-00180f00: 733c 2f61 3e3c 2f63 6f64 653e 2074 6f20 s to \n-00180f10: 7365 7420 666c 6167 7320 746f 2074 6865 set flags to the\n-00180f20: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n-00180f30: 743c 2f63 6f64 653e 2073 6f63 6b65 7420 t socket \n-00180f40: 6f70 7469 6f6e 7320 7768 656e 2065 7865 options when exe\n-00180f50: 6375 7469 6e67 203c 636f 6465 3e3c 6120 cuting soap_accep\n-00180fe0: 743c 2f61 3e3c 2f63 6f64 653e 2e3c 2f6c t...

    See \n-00181000: 7468 6520 6f70 6572 6174 696e 6720 7379 the operating sy\n-00181010: 7374 656d 206d 616e 7561 6c20 7061 6765 stem manual page\n-00181020: 7320 6f66 203c 636f 6465 3e73 656e 643c s of send<\n-00181030: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and recv for\n-00181050: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-00181110: 6f61 703a 3a73 6f63 6b65 745f 666c 6167 oap::socket_flag\n-00181120: 733c 2f61 3e3c 2f63 6f64 653e 2076 616c s val\n-00181130: 7565 7320 616e 6420 7365 6520 7468 6520 ues and see the \n-00181140: 6f70 6572 6174 696e 6720 7379 7374 656d operating system\n-00181150: 206d 616e 7561 6c20 7061 6765 7320 6f66 manual pages of\n-00181160: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n-00181170: 743c 2f63 6f64 653e 2066 6f72 203c 636f t for soap:\n-00181240: 3a63 6f6e 6e65 6374 5f66 6c61 6773 3c2f :connect_flags, soap::b\n-00181320: 696e 645f 666c 6167 733c 2f61 3e3c 2f63 ind_flags, and \n-00181340: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ac\n-00181400: 6365 7074 5f66 6c61 6773 3c2f 613e 3c2f cept_flags (level SOL_SOCKET) values. Th\n-00181440: 6573 6520 3c63 6f64 653e 534f 5f3c 2f63 ese SO_ socket opti\n-00181460: 6f6e 2066 6c61 6773 2028 7365 6520 3c63 on flags (see setsockopt manual pag\n-00181490: 6573 2920 6361 6e20 6265 2062 6974 2d77 es) can be bit-w\n-001814a0: 6973 6520 6f72 2d65 6420 746f 2073 6574 ise or-ed to set\n-001814b0: 206d 756c 7469 706c 6520 736f 636b 6574 multiple socket\n-001814c0: 206f 7074 696f 6e73 2061 7420 6f6e 6365 options at once\n-001814d0: 2e3c 2f70 3e0a 3c70 3e54 6865 2063 6c69 .

    .

    The cli\n-001814e0: 656e 742d 7369 6465 2066 6c61 6720 3c63 ent-side flag soap\n-001815b0: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags<\n-001815c0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_LINGER is supported\n-001815f0: 2077 6974 6820 7661 6c75 6573 203c 636f with values l_onoff = 1 and \n-00181620: 6c5f 6c69 6e67 6572 3c2f 636f 6465 3e20 l_linger \n-00181630: 3d20 3c63 6f64 653e 3c61 2063 6c61 7373 = \n-001816f0: 736f 6170 3a3a 6c69 6e67 6572 5f74 696d soap::linger_tim\n-00181700: 653c 2f61 3e3c 2f63 6f64 653e 2e20 5468 e. Th\n-00181710: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n-001817d0: 736f 6170 3a3a 6c69 6e67 6572 5f74 696d soap::linger_tim\n-001817e0: 653c 2f61 3e3c 2f63 6f64 653e 2064 6574 e det\n-001817f0: 6572 6d69 6e65 7320 7468 6520 7761 6974 ermines the wait\n-00181800: 2074 696d 6520 2874 6865 2074 696d 6520 time (the time \n-00181810: 7265 736f 6c75 7469 6f6e 2069 7320 7379 resolution is sy\n-00181820: 7374 656d 2064 6570 656e 6465 6e74 2c20 stem dependent, \n-00181830: 7468 6f75 6768 2061 6363 6f72 6469 6e67 though according\n-00181840: 2074 6f20 736f 6d65 2065 7870 6572 7473 to some experts\n-00181850: 206f 6e6c 7920 7a65 726f 2061 6e64 206e only zero and n\n-00181860: 6f6e 7a65 726f 2076 616c 7565 7320 6d61 onzero values ma\n-00181870: 7474 6572 292e 2054 6865 206c 696e 6765 tter). The linge\n-00181880: 7220 6f70 7469 6f6e 2063 616e 2062 6520 r option can be \n-00181890: 7573 6564 2074 6f20 6d61 6e61 6765 2074 used to manage t\n-001818a0: 6865 206e 756d 6265 7220 6f66 2063 6f6e he number of con\n-001818b0: 6e65 6374 696f 6e73 2074 6861 7420 7265 nections that re\n-001818c0: 6d61 696e 2069 6e20 3c63 6f64 653e 5449 main in TI\n-001818d0: 4d45 5f57 4149 543c 2f63 6f64 653e 2073 ME_WAIT s\n-001818e0: 7461 7465 2061 7420 7468 6520 7365 7276 tate at the serv\n-001818f0: 6572 2073 6964 652e 3c2f 703e 0a3c 703e er side.

    .

    \n-00181900: 466f 7220 6578 616d 706c 652c 2074 6f20 For example, to \n-00181910: 6469 7361 626c 6520 5349 4750 4950 4520 disable SIGPIPE \n-00181920: 7369 676e 616c 7320 6f6e 2055 6e69 782f signals on Unix/\n-00181930: 4c69 6e75 7820 706c 6174 666f 726d 7320 Linux platforms \n-00181940: 7573 653a 203c 636f 6465 3e3c 6120 636c use: soap::socket_\n-00181a10: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n-00181a20: 203d 203c 636f 6465 3e4d 5347 5f4e 4f53 = MSG_NOS\n-00181a30: 4947 4e41 4c3c 2f63 6f64 653e 2061 6e64 IGNAL and\n-00181a40: 2f6f 7220 3c63 6f64 653e 3c61 2063 6c61 /or soap::connect_\n-00181b10: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n-00181b20: 203d 203c 636f 6465 3e53 4f5f 4e4f 5349 = SO_NOSI\n-00181b30: 4750 4950 453c 2f63 6f64 653e 2028 692e GPIPE (i.\n-00181b40: 652e 2063 6c69 656e 742d 7369 6465 2063 e. client-side c\n-00181b50: 6f6e 6e65 6374 2920 6465 7065 6e64 696e onnect) dependin\n-00181b60: 6720 6f6e 2079 6f75 7220 706c 6174 666f g on your platfo\n-00181b70: 726d 2e3c 2f70 3e0a 3c70 3e55 7365 203c rm.

    .

    Use <\n-00181b80: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-00181c40: 703a 3a62 696e 645f 666c 6167 733c 2f61 p::bind_flags = SO_REUSEADDR to enable s\n-00181c80: 6572 7665 722d 7369 6465 2070 6f72 7420 erver-side port \n-00181c90: 7265 7573 6520 616e 6420 6c6f 6361 6c20 reuse and local \n-00181ca0: 706f 7274 2073 6861 7269 6e67 2028 6275 port sharing (bu\n-00181cb0: 7420 6265 2061 7761 7265 206f 6620 7468 t be aware of th\n-00181cc0: 6520 706f 7373 6962 6c65 2073 6563 7572 e possible secur\n-00181cd0: 6974 7920 696d 706c 6963 6174 696f 6e73 ity implications\n-00181ce0: 2073 7563 6820 6173 2070 6f72 7420 6869 such as port hi\n-00181cf0: 6a61 636b 696e 6729 2e3c 2f70 3e0a 3c70 jacking).

    .Note that you h\n-00181d10: 6176 6520 6163 6365 7373 2074 6f20 7468 ave access to th\n-00181d20: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap->\n-00181d80: 3b6d 6173 7465 723c 2f63 6f64 653e 2073 ;master s\n-00181d90: 6f63 6b65 7420 7661 6c75 6520 7265 7475 ocket value retu\n-00181da0: 726e 6564 2062 7920 3c63 6f64 653e 3c61 rned by s\n-00181e20: 6f61 705f 6269 6e64 3c2f 613e 3c2f 636f oap_bind so you can s\n-00181e40: 6574 206d 756c 7469 706c 6520 736f 636b et multiple sock\n-00181e50: 6574 206f 7074 696f 6e73 2062 7920 6361 et options by ca\n-00181e60: 6c6c 696e 6720 3c63 6f64 653e 7365 7473 lling sets\n-00181e70: 6f63 6b6f 7074 3c2f 636f 6465 3e20 6173 ockopt as\n-00181e80: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 follows:

    .
    \n-00181ed0: 696e 743c 2f73 7061 6e3e 2073 6f63 6b20 int sock \n-00181ee0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_bind(\n-00181f40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00181f70: 203c 6120 636c 6173 733d 2263 6f64 6522 host, por\n-00182010: 743c 2f61 3e2c 2062 6163 6b6c 6f67 293b t, backlog);\n-00182020: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (<\n-00182060: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00182070: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00182080: 705f 5f73 6f61 702e 6874 6d6c 2367 6161 p__soap.html#gaa\n-00182090: 6165 3837 3437 6634 6364 6163 6565 3537 ae8747f4cdacee57\n-001820a0: 3538 3735 6333 6132 3438 3864 3939 6322 5875c3a2488d99c\"\n-001820b0: 3e73 6f61 705f 7661 6c69 645f 736f 636b >soap_valid_sock\n-001820c0: 6574 3c2f 613e 2873 6f63 6b29 2920 3c2f et(sock)) .
    {
    .<\n-001820f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00182100: 3e20 2073 6574 736f 636b 6f70 7428 736f > setsockopt(so\n-00182110: 636b 2c20 2e2e 2e2c 202e 2e2e 2c20 2e2e ck, ..., ..., ..\n-00182120: 2e2c 202e 2e2e 293b 3c2f 6469 763e 0a3c ., ...);
    .<\n-00182130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00182140: 3e20 2073 6574 736f 636b 6f70 7428 736f > setsockopt(so\n-00182150: 636b 2c20 2e2e 2e2c 202e 2e2e 2c20 2e2e ck, ..., ..., ..\n-00182160: 2e2c 202e 2e2e 293b 3c2f 6469 763e 0a3c ., ...);
    .<\n-00182170: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

    .

    \n-001821c0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Over\n-001821f0: 7269 6469 6e67 2074 6865 2068 6f73 7420 riding the host \n-00182200: 616e 6420 706f 7274 2074 6f20 636f 6e6e and port to conn\n-00182210: 6563 743c 2f68 323e 0a3c 703e 546f 206f ect

    .

    To o\n-00182220: 7665 7272 6964 6520 7468 6520 686f 7374 verride the host\n-00182230: 2061 6e64 2070 6f72 7420 6f66 2074 6865 and port of the\n-00182240: 2063 6c69 656e 7420 636f 6e6e 6563 7469 client connecti\n-00182250: 6e67 2074 6f20 6120 7365 7276 6572 2c20 ng to a server, \n-00182260: 7365 7420 3c63 6f64 653e 3c61 2063 6c61 set soap::override\n-00182330: 5f68 6f73 743c 2f61 3e3c 2f63 6f64 653e _host\n-00182340: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::overrid\n-00182410: 655f 706f 7274 3c2f 613e 3c2f 636f 6465 e_port:

    .
    <\n-00182450: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00182460: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00182470: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00182480: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;over\n-001824d0: 7269 6465 5f68 6f73 743c 2f61 3e20 3d20 ride_host = \n-001824e0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00182500: 743b 6578 616d 706c 652e 636f 6d26 7175 t;example.com&qu\n-00182510: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // host name o\n-00182540: 7220 4950 2061 6464 7265 7373 203c 2f73 r IP address
    .
    soap->\n-001825a0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;overri\n-001825f0: 6465 5f70 6f72 743c 2f61 3e20 3d20 3830 de_port = 80\n-00182600: 3b20 2020 2020 2020 2020 2020 203c 7370 ; // port numbe\n-00182630: 7220 746f 2075 7365 2077 6865 6e20 6f76 r to use when ov\n-00182640: 6572 7269 6469 6e67 2074 6865 2061 6464 erriding the add\n-00182650: 7265 7373 3c2f 7370 616e 3e3c 2f64 6976 ress.
    <\n-001826c0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-001826d0: 6170 2e68 746d 6c23 6131 3636 3430 3533 ap.html#a1664053\n-001826e0: 3639 6164 3130 6263 3230 6239 3066 6239 69ad10bc20b90fb9\n-001826f0: 3238 3534 3230 6361 6522 3e73 6f61 703a 285420cae\">soap:\n-00182700: 3a6f 7665 7272 6964 655f 686f 7374 3c2f :override_host
    cons\n-00182730: 7420 6368 6172 202a 206f 7665 7272 6964 t char * overrid\n-00182740: 655f 686f 7374 3c2f 6469 763e 3c64 6976 e_host
    U\n-00182760: 7365 722d 6465 6669 6e61 626c 6520 7374 ser-definable st\n-00182770: 7269 6e67 2074 6f20 6f76 6572 7269 6465 ring to override\n-00182780: 2074 6865 2068 6f73 7420 6e61 6d65 206f the host name o\n-00182790: 7220 4950 2061 6464 7265 7373 2069 6e20 r IP address in \n-001827a0: 7468 6520 4854 5450 2068 6561 6465 7220 the HTTP header \n-001827b0: 7768 656e 2063 6f6e 6e65 6374 696e 6720 when connecting \n-001827c0: 6174 2074 2e2e 2e3c 2f64 6976 3e3c 6469 at t...
    \n-001827e0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:40\n-00182800: 3534 3c2f 6469 763e 3c2f 6469 763e 0a3c 54
    .<\n-00182810: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00182820: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-00182830: 6874 6d6c 5f61 3931 3464 6362 3665 6230 html_a914dcb6eb0\n-00182840: 3637 6632 6664 3361 3437 6639 3230 3732 67f2fd3a47f92072\n-00182850: 3537 6236 3036 223e 3c64 6976 2063 6c61 57b606\">
    soap::ov\n-001828b0: 6572 7269 6465 5f70 6f72 743c 2f61 3e3c erride_port<\n-001828c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int ove\n-001828e0: 7272 6964 655f 706f 7274 3c2f 6469 763e rride_port
    \n-001828f0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n-00182910: 6520 706f 7274 206e 756d 6265 7220 746f e port number to\n-00182920: 206f 7665 7272 6964 6520 7468 6520 706f override the po\n-00182930: 7274 2061 6464 7265 7373 2069 6e20 7468 rt address in th\n-00182940: 6520 4854 5450 2068 6561 6465 7220 7768 e HTTP header wh\n-00182950: 656e 2063 6f6e 6e65 6374 696e 6720 6174 en connecting at\n-00182960: 2074 6865 2063 6c69 2e2e 2e3c 2f64 6976 the cli...
    Definitio\n-00182990: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-001829a0: 683a 3430 3539 3c2f 6469 763e 3c2f 6469 h:4059
    .

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

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

    .Se\n-00182a30: 6375 7265 2057 6562 2073 6572 7669 6365 cure Web service\n-00182a40: 7320 7769 7468 2048 5454 5053 3c2f 6832 s with HTTPS.

    To enable S\n-00182a60: 534c 2066 6f72 2073 7461 6e64 2d61 6c6f SL for stand-alo\n-00182a70: 6e65 2067 534f 4150 2057 6562 2073 6572 ne gSOAP Web ser\n-00182a80: 7665 7273 2c20 6669 7273 7420 696e 7374 vers, first inst\n-00182a90: 616c 6c20 4f70 656e 5353 4c20 616e 6420 all OpenSSL and \n-00182aa0: 7573 6520 6f70 7469 6f6e 2074 6865 2063 use option the c\n-00182ab0: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag\n-00182ac0: 203c 636f 6465 3e23 5749 5448 5f4f 5045 #WITH_OPE\n-00182ad0: 4e53 534c 3c2f 636f 6465 3e20 746f 2063 NSSL to c\n-00182ae0: 6f6d 7069 6c65 2074 6865 2073 6f75 7263 ompile the sourc\n-00182af0: 6573 2077 6974 6820 796f 7572 2043 206f es with your C o\n-00182b00: 7220 432b 2b20 636f 6d70 696c 6572 2028 r C++ compiler (\n-00182b10: 6f72 2075 7365 2074 6865 2063 6f6d 7069 or use the compi\n-00182b20: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_GNUTLS<\n-00182b40: 2f63 6f64 653e 2069 6620 796f 7520 7072 /code> if you pr\n-00182b50: 6566 6572 2047 4e55 544c 5329 2c20 666f efer GNUTLS), fo\n-00182b60: 7220 6578 616d 706c 653a 203c 2f70 3e3c r example:

    <\n-00182b70: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-00182b80: 656e 7422 3e20 632b 2b20 2d44 5749 5448 ent\"> c++ -DWITH\n-00182b90: 5f4f 5045 4e53 534c 202d 6f20 6d79 7072 _OPENSSL -o mypr\n-00182ba0: 6f67 206d 7970 726f 672e 6370 7020 7374 og myprog.cpp st\n-00182bb0: 6473 6f61 7032 2e63 7070 2073 6f61 7043 dsoap2.cpp soapC\n-00182bc0: 2e63 7070 2073 6f61 7053 6572 7665 722e .cpp soapServer.\n-00182bd0: 6370 7020 2d6c 7373 6c20 2d6c 6372 7970 cpp -lssl -lcryp\n-00182be0: 746f 0a3c 2f70 7265 3e3c 703e 2057 6974 to.

    Wit\n-00182bf0: 6820 474e 5554 4c53 3a20 3c2f 703e 3c70 h GNUTLS:

    c++ -DWITH_\n-00182c20: 474e 5554 4c53 202d 6f20 6d79 7072 6f67 GNUTLS -o myprog\n-00182c30: 206d 7970 726f 672e 6370 7020 7374 6473 myprog.cpp stds\n-00182c40: 6f61 7032 2e63 7070 2073 6f61 7043 2e63 oap2.cpp soapC.c\n-00182c50: 7070 2073 6f61 7053 6572 7665 722e 6370 pp soapServer.cp\n-00182c60: 7020 2d6c 676e 7574 6c73 202d 6c67 6372 p -lgnutls -lgcr\n-00182c70: 7970 7420 2d6c 6770 672d 6572 726f 720a ypt -lgpg-error.\n-00182c80: 3c2f 7072 653e 3c70 3e20 5353 4c20 7375

    SSL su\n-00182c90: 7070 6f72 7420 666f 7220 7374 616e 642d pport for stand-\n-00182ca0: 616c 6f6e 6520 6753 4f41 5020 5765 6220 alone gSOAP Web \n-00182cb0: 7365 7276 6963 6573 2069 7320 656e 6162 services is enab\n-00182cc0: 6c65 6420 6279 2063 616c 6c69 6e67 203c led by calling <\n-00182cd0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl_\n-00182d50: 6163 6365 7074 3c2f 613e 3c2f 636f 6465 accept to perform the\n-00182d70: 2053 534c 2f54 4c53 2068 616e 6473 6861 SSL/TLS handsha\n-00182d80: 6b65 2061 6674 6572 203c 636f 6465 3e3c ke after <\n-00182d90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00182da0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00182db0: 5f69 6f2e 6874 6d6c 2367 6165 6330 6531 _io.html#gaec0e1\n-00182dc0: 6165 6363 3264 3534 3739 6438 3039 3937 aecc2d5479d80997\n-00182dd0: 3632 6665 6234 3731 3363 3622 2074 6974 62feb4713c6\" tit\n-00182de0: 6c65 3d22 4163 6365 7074 2061 2063 6f6e le=\"Accept a con\n-00182df0: 6e65 6374 696f 6e20 7769 7468 2061 2063 nection with a c\n-00182e00: 6c69 656e 742e 223e 736f 6170 5f61 6363 lient.\">soap_acc\n-00182e10: 6570 743c 2f61 3e3c 2f63 6f64 653e 2e20 ept. \n-00182e20: 496e 2061 6464 6974 696f 6e2c 2061 206b In addition, a k\n-00182e30: 6579 2066 696c 652c 2061 2043 4120 6669 ey file, a CA fi\n-00182e40: 6c65 2028 6f72 2070 6174 6820 746f 2063 le (or path to c\n-00182e50: 6572 7469 6669 6361 7465 7329 2c20 4448 ertificates), DH\n-00182e60: 2066 696c 6520 2869 6620 5253 4120 6973 file (if RSA is\n-00182e70: 206e 6f74 2075 7365 6429 2c20 616e 6420 not used), and \n-00182e80: 7061 7373 776f 7264 206e 6565 6420 746f password need to\n-00182e90: 2062 6520 7375 7070 6c69 6564 2e20 496e be supplied. In\n-00182ea0: 7374 7275 6374 696f 6e73 206f 6e20 686f structions on ho\n-00182eb0: 7720 746f 2064 6f20 7468 6973 2063 616e w to do this can\n-00182ec0: 2062 6520 666f 756e 6420 696e 2074 6865 be found in the\n-00182ed0: 204f 7065 6e53 534c 2064 6f63 756d 656e OpenSSL documen\n-00182ee0: 7461 7469 6f6e 203c 6120 6872 6566 3d22 tation http://w\n-00182f10: 7777 2e6f 7065 6e73 736c 2e6f 7267 3c2f ww.openssl.org. See also Sec\n-00182f30: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion SSL cer\n-00182f60: 7469 6669 6361 7465 7320 616e 6420 6b65 tificates and ke\n-00182f70: 7920 6669 6c65 733c 2f61 3e20 2e3c 2f70 y files ..

    Let's take \n-00182f90: 6120 6c6f 6f6b 2061 7420 616e 2065 7861 a look at an exa\n-00182fa0: 6d70 6c65 2053 534c 2073 6563 7572 6520 mple SSL secure \n-00182fb0: 6d75 6c74 692d 7468 7265 6164 6564 2073 multi-threaded s\n-00182fc0: 7461 6e64 2d61 6c6f 6e65 2053 4f41 5020 tand-alone SOAP \n-00182fd0: 5765 6220 5365 7276 6963 653a 3c2f 703e Web Service:

    \n-00182fe0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ma\n-00183030: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n-00183050: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP\n-001830c0: 5f53 4f43 4b45 543c 2f61 3e20 6d2c 2073 _SOCKET m, s\n-001830d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..\n-00183170: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-00183190: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-001831c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *\n-00183210: 736f 6170 3c2f 613e 2c20 2a74 736f 6170 soap, *tsoap\n-00183220: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    so\n-00183290: 6170 5f73 736c 5f69 6e69 743c 2f61 3e28 ap_ssl_init(\n-001832a0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); /* init\n-001832c0: 204f 7065 6e53 534c 2028 736b 6970 7069 OpenSSL (skippi\n-001832d0: 6e67 2074 6869 7320 6f72 2063 616c 6c69 ng this or calli\n-001832e0: 6e67 206d 756c 7469 706c 6520 7469 6d65 ng multiple time\n-001832f0: 7320 6973 204f 4b2c 2073 696e 6365 2074 s is OK, since t\n-00183300: 6865 2065 6e67 696e 6520 7769 6c6c 2069 he engine will i\n-00183310: 6e69 7420 5353 4c20 6175 746f 6d61 7469 nit SSL automati\n-00183320: 6361 6c6c 7929 202a 2f3c 2f73 7061 6e3e cally) */\n-00183330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /* soap_ssl_noi\n-00183370: 6e69 7428 293b 202a 2f3c 2f73 7061 6e3e nit(); */\n-00183380: 203c 7370 616e 2063 6c61 7373 3d22 636f /* do not\n-001833a0: 2069 6e69 7420 4f70 656e 5353 4c20 2869 init OpenSSL (i\n-001833b0: 6620 5353 4c20 6973 2061 6c72 6561 6479 f SSL is already\n-001833c0: 2069 6e69 7469 616c 697a 6564 2065 6c73 initialized els\n-001833d0: 6577 6865 7265 2069 6e20 7468 6973 2061 ewhere in this a\n-001833e0: 7070 6c69 6361 7469 6f6e 2920 2a2f 3c2f pplication) */
    . \n-00183410: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (CRYPTO_thr\n-00183490: 6561 645f 7365 7475 703c 2f61 3e28 2929 ead_setup())\n-001834a0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* OpenSS\n-001834c0: 4c20 7468 7265 6164 206d 7574 6578 2073 L thread mutex s\n-001834d0: 6574 7570 202a 2f3c 2f73 7061 6e3e 3c2f etup */.
    {
    \n-00183500: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fprintf(s\n-00183520: 7464 6572 722c 203c 7370 616e 2063 6c61 tderr, "Cannot \n-00183550: 7365 7475 7020 7468 7265 6164 206d 7574 setup thread mut\n-00183560: 6578 5c6e 2671 756f 743b 3c2f 7370 616e ex\\n");
    .
    \n-00183590: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n-001835a0: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    . \n-001835c0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }

    .
    soap = <\n-00183610: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00183620: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00183630: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-00183640: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-00183650: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-00183660: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-00183670: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    <\n-00183690: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001836a0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_ssl_se\n-00183710: 7276 6572 5f63 6f6e 7465 7874 3c2f 613e rver_context\n-00183720: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00183750: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    <\n-00183770: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00183780: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00183790: 705f 5f73 736c 2e68 746d 6c23 6761 3633 p__ssl.html#ga63\n-001837a0: 6431 3062 6463 6232 6236 3738 6439 6435 d10bdcb2b678d9d5\n-001837b0: 3563 6162 3331 6531 6264 6166 3365 223e 5cab31e1bdaf3e\">\n-001837c0: 534f 4150 5f53 534c 5f44 4546 4155 4c54 SOAP_SSL_DEFAULT\n-001837d0: 3c2f 613e 2c20 3c2f 6469 763e 0a3c 6469 ,
    . \n-001837f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 &\n-00183810: 7175 6f74 3b73 6572 7665 722e 7065 6d26 quot;server.pem&\n-00183820: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-00183830: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* keyf\n-00183850: 696c 653a 2072 6571 7569 7265 6420 7768 ile: required wh\n-00183860: 656e 2073 6572 7665 7220 6d75 7374 2061 en server must a\n-00183870: 7574 6865 6e74 6963 6174 6520 746f 2063 uthenticate to c\n-00183880: 6c69 656e 7473 2028 7365 6520 5353 4c20 lients (see SSL \n-00183890: 646f 6373 206f 6e20 686f 7720 746f 206f docs on how to o\n-001838a0: 6274 6169 6e20 7468 6973 2066 696c 6529 btain this file)\n-001838b0: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    "passwo\n-00183900: 7264 2671 756f 743b 3c2f 7370 616e 3e2c rd",\n-00183910: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00183930: 2070 6173 7377 6f72 6420 746f 2072 6561 password to rea\n-00183940: 6420 7468 6520 6b65 7920 6669 6c65 2028 d the key file (\n-00183950: 6e6f 7420 7573 6564 2077 6974 6820 474e not used with GN\n-00183960: 5554 4c53 2920 2a2f 3c2f 7370 616e 3e20 UTLS) */ \n-00183970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "c\n-001839b0: 6163 6572 742e 7065 6d26 7175 6f74 3b3c acert.pem"<\n-001839c0: 2f73 7061 6e3e 2c20 2020 2020 203c 7370 /span>, /* optional c\n-001839f0: 6163 6572 7420 6669 6c65 2074 6f20 7374 acert file to st\n-00183a00: 6f72 6520 7472 7573 7465 6420 6365 7274 ore trusted cert\n-00183a10: 6966 6963 6174 6573 202a 2f3c 2f73 7061 ificates */
    .
    \n-00183a40: 4e55 4c4c 2c20 2020 2020 2020 2020 2020 NULL, \n-00183a50: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* opti\n-00183a70: 6f6e 616c 2063 6170 6174 6820 746f 2064 onal capath to d\n-00183a80: 6972 6563 746f 7279 2077 6974 6820 7472 irectory with tr\n-00183a90: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat\n-00183aa0: 6573 202a 2f3c 2f73 7061 6e3e 203c 2f64 es */ .
    "dh51\n-00183af0: 322e 7065 6d26 7175 6f74 3b3c 2f73 7061 2.pem", \n-00183b20: 2f2a 2044 4820 6669 6c65 206e 616d 6520 /* DH file name \n-00183b30: 6f72 2044 4820 6b65 7920 6c65 6e20 6269 or DH key len bi\n-00183b40: 7473 2028 6d69 6e69 6d75 6d20 6973 2035 ts (minimum is 5\n-00183b50: 3132 2c20 652e 672e 2026 7175 6f74 3b35 12, e.g. "5\n-00183b60: 3132 2671 756f 743b 2920 746f 2067 656e 12") to gen\n-00183b70: 6572 6174 6520 4448 2070 6172 616d 2c20 erate DH param, \n-00183b80: 6966 204e 554c 4c20 7573 6520 5253 4120 if NULL use RSA \n-00183b90: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00183ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL, \n-00183bc0: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-00183be0: 2f2a 2069 6620 7261 6e64 6669 6c65 213d /* if randfile!=\n-00183bf0: 4e55 4c4c 3a20 7573 6520 6120 6669 6c65 NULL: use a file\n-00183c00: 2077 6974 6820 7261 6e64 6f6d 2064 6174 with random dat\n-00183c10: 6120 746f 2073 6565 6420 7261 6e64 6f6d a to seed random\n-00183c20: 6e65 7373 202a 2f3c 2f73 7061 6e3e 2020 ness */ \n-00183c30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    NUL\n-00183c50: 4c20 2020 2020 2020 2020 2020 2020 2020 L \n-00183c60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* optiona\n-00183c80: 6c20 7365 7276 6572 2069 6465 6e74 6966 l server identif\n-00183c90: 6963 6174 696f 6e20 746f 2065 6e61 626c ication to enabl\n-00183ca0: 6520 5353 4c20 7365 7373 696f 6e20 6361 e SSL session ca\n-00183cb0: 6368 696e 6720 746f 2073 7065 6564 2075 ching to speed u\n-00183cc0: 7020 544c 5320 286d 7573 7420 6265 2061 p TLS (must be a\n-00183cd0: 2075 6e69 7175 6520 6e61 6d65 2920 2a2f unique name) */\n-00183ce0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00183d00: 2020 2929 203c 2f64 6976 3e0a 3c64 6976 ))
    . \n-00183d20: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap_print_faul\n-00183da0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-00183dd0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-00183de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi\n-00183e00: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n-00183e10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    m = soa\n-00183ea0: 705f 6269 6e64 3c2f 613e 283c 6120 636c p_bind(soap, NULL\n-00183ee0: 2c20 3138 3030 302c 2042 4143 4b4c 4f47 , 18000, BACKLOG\n-00183ef0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); /* use \n-00183f10: 706f 7274 2031 3830 3030 202a 2f3c 2f73 port 18000 */
    .
    <\n-00183f40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00183f50: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!soap_vali\n-00183fc0: 645f 736f 636b 6574 3c2f 613e 286d 2929 d_socket(m))\n-00183fd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soa\n-00184060: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(soap, stderr); .
    exit(EX\n-001840d0: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    }
    \n-00184100: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fprintf(std\n-00184120: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "Socket co\n-00184150: 6e6e 6563 7469 6f6e 2073 7563 6365 7373 nnection success\n-00184160: 6675 6c3a 206d 6173 7465 7220 736f 636b ful: master sock\n-00184170: 6574 203d 2025 645c 6e26 7175 6f74 3b3c et = %d\\n"<\n-00184180: 2f73 7061 6e3e 2c20 6d29 3b20 3c2f 6469 /span>, m); .
    while (1\n-001841d0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    s = so\n-00184260: 6170 5f61 6363 6570 743c 2f61 3e28 3c61 ap_accept(soap); \n-001842a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    fpr\n-001842c0: 696e 7466 2873 7464 6572 722c 203c 7370 intf(stderr, "S\n-001842f0: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n-00184300: 2073 7563 6365 7373 6675 6c3a 2073 6c61 successful: sla\n-00184310: 7665 2073 6f63 6b65 7420 3d20 2564 5c6e ve socket = %d\\n\n-00184320: 2671 756f 743b 3c2f 7370 616e 3e2c 2073 ", s\n-00184330: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-00184350: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!soap_val\n-001843d0: 6964 5f73 6f63 6b65 743c 2f61 3e28 7329 id_socket(s)\n-001843e0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {\n-00184400: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-00184420: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00184430: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n-00184470: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->errnum) /* accept fai\n-001844f0: 6c65 642c 2074 7279 2061 6761 696e 2061 led, try again a\n-00184500: 6674 6572 2031 2073 6563 6f6e 6420 2a2f fter 1 second */\n-00184510: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00184530: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    .\n-00184550: 2020 2020 2020 2020 3c61 2063 6c61 7373 soap_\n-001845b0: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-001845c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001845f0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n-00184600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    sleep\n-00184620: 2831 293b 3c2f 6469 763e 0a3c 6469 7620 (1);
    .
    \n-00184640: 2020 2020 203c 7370 616e 2063 6c61 7373 c\n-00184660: 6f6e 7469 6e75 653c 2f73 7061 6e3e 3b20 ontinue; \n-00184670: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* retry *\n-00184690: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n-001846a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001846b0: 3e20 2020 2020 207d 3c2f 6469 763e 0a3c > }
    .<\n-001846c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001846d0: 3e20 2020 2020 2066 7072 696e 7466 2873 > fprintf(s\n-001846e0: 7464 6572 722c 203c 7370 616e 2063 6c61 tderr, "Server \n-00184710: 7469 6d65 6420 6f75 745c 6e26 7175 6f74 timed out\\n"\n-00184720: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
    \n-00184730: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    break;\n-00184770: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } \n-00184790: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n-00184850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00184880: 6966 3c2f 7370 616e 3e20 2821 7473 6f61 if (!tsoa\n-00184890: 7029 203c 2f64 6976 3e0a 3c64 6976 2063 p)
    .
    \n-001848b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_force_clo\n-00184910: 7365 736f 636b 3c2f 613e 283c 6120 636c sesock(soap);.
    else.
    while (THREAD\n-00184a30: 5f43 5245 4154 453c 2f61 3e28 2661 6d70 _CREATE(&\n-00184a40: 3b74 6964 2c20 283c 7370 616e 2063 6c61 ;tid, (void*(*)\n-00184a70: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void<\n-00184a90: 2f73 7061 6e3e 2a29 2926 616d 703b 7072 /span>*))&pr\n-00184aa0: 6f63 6573 735f 7265 7175 6573 742c 2028 ocess_request, (\n-00184ab0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void*)tsoap)).
    s\n-00184b00: 6c65 6570 2831 293b 203c 7370 616e 2063 leep(1); /\n-00184b20: 2a20 6661 696c 6564 2c20 7472 7920 6167 * failed, try ag\n-00184b30: 6169 6e20 2a2f 3c2f 7370 616e 3e3c 2f64 ain */.
    }
    \n-00184b60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_f\n-00184bd0: 7265 653c 2f61 3e28 3c61 2063 6c61 7373 ree(s\n-00184c00: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); \n-00184c20: 2f2a 2064 6561 6c6c 6f63 6174 6573 2053 /* deallocates S\n-00184c30: 534c 2063 6f6e 7465 7874 202a 2f3c 2f73 SL context */
    .
    <\n-00184c60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00184c70: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00184c80: 705f 5f73 736c 2e68 746d 6c23 6761 3862 p__ssl.html#ga8b\n-00184c90: 3239 6534 6561 3134 3139 6134 6166 3439 29e4ea1419a4af49\n-00184ca0: 3832 3338 3632 3736 3566 3239 3138 223e 823862765f2918\">\n-00184cb0: 4352 5950 544f 5f74 6872 6561 645f 636c CRYPTO_thread_cl\n-00184cc0: 6561 6e75 703c 2f61 3e28 293b 203c 7370 eanup(); /* OpenSSL th\n-00184cf0: 7265 6164 206d 7574 6578 2063 6c65 616e read mutex clean\n-00184d00: 7570 202a 2f3c 2f73 7061 6e3e 3c2f 6469 up */.
    return 0\n-00184d50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .<\n-00184d90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00184da0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00184dc0: 2f73 7061 6e3e 202a 7072 6f63 6573 735f /span> *process_\n-00184dd0: 7265 7175 6573 7428 3c73 7061 6e20 636c request(void *t\n-00184e00: 736f 6170 2920 3c2f 6469 763e 0a3c 6469 soap)
    .{\n-00184e20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-00184e60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00184e70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00184e80: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-00184e90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00184ec0: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (struct \n-00184ee0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-00184f10: 6170 3c2f 613e 2a29 7473 6f61 703b 3c2f ap*)tsoap;.
    TH\n-00184f90: 5245 4144 5f44 4554 4143 483c 2f61 3e28 READ_DETACH(\n-00184fa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_ID);
    . \n-00185020: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_ssl_a\n-001850a0: 6363 6570 743c 2f61 3e28 3c61 2063 6c61 ccept(soap)) .
    soap\n-00185150: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-00185160: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00185190: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    \n-001851d0: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .\n-00185290: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-00185300: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .
    soa\n-001853b0: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); .
    soap\n-00185460: 5f66 7265 653c 2f61 3e28 3c61 2063 6c61 _free(soap);.
    \n-001854d0: 7265 7475 726e 3c2f 7370 616e 3e20 4e55 return NU\n-001854e0: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
    .
    }.
    <\n-001855d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-001855e0: 6922 3e69 6e74 2073 6f61 705f 7373 6c5f i\">int soap_ssl_\n-001855f0: 7365 7276 6572 5f63 6f6e 7465 7874 2873 server_context(s\n-00185600: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-00185610: 2c20 736f 6170 5f73 736c 5f66 6c61 6773 , soap_ssl_flags\n-00185620: 2066 6c61 6773 2c20 636f 6e73 7420 6368 flags, const ch\n-00185630: 6172 202a 6b65 7966 696c 652c 2063 6f6e ar *keyfile, con\n-00185640: 7374 2063 6861 7220 2a70 6173 7377 6f72 st char *passwor\n-00185650: 642c 2063 6f6e 7374 2063 6861 7220 2a63 d, const char *c\n-00185660: 6166 696c 652c 2063 6f6e 7374 2063 6861 afile, const cha\n-00185670: 7220 2a63 6170 6174 682c 2063 6f6e 7374 r *capath, const\n-00185680: 2063 6861 7220 2a64 6866 696c 652c 2063 char *dhfile, c\n-00185690: 6f6e 7374 2063 6861 7220 2a72 616e 6466 onst char *randf\n-001856a0: 696c 652c 2063 6f6e 7374 2063 6861 7220 ile, const char \n-001856b0: 2a73 6964 293c 2f64 6976 3e3c 6469 7620 *sid)
    In\n-001856d0: 6974 6961 6c69 7a65 2074 6865 2073 6572 itialize the ser\n-001856e0: 7665 722d 7369 6465 2053 534c 2f54 4c53 ver-side SSL/TLS\n-001856f0: 2063 6f6e 7465 7874 2e3c 2f64 6976 3e3c context.
    <\n-00185700: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-001857b0: 6f61 705f 7373 6c5f 696e 6974 3c2f 613e oap_ssl_init\n-001857c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s\n-001857e0: 6f61 705f 7373 6c5f 696e 6974 2876 6f69 oap_ssl_init(voi\n-001857f0: 6429 3c2f 6469 763e 3c64 6976 2063 6c61 d)
    Initi\n-00185810: 616c 697a 6520 7468 6520 5353 4c2f 544c alize the SSL/TL\n-00185820: 5320 6c69 6272 6172 792e 3c2f 6469 763e S library.
    \n-00185830: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #d\n-00185910: 6566 696e 6520 534f 4150 5f53 534c 5f44 efine SOAP_SSL_D\n-00185920: 4546 4155 4c54 3c2f 6469 763e 3c64 6976 EFAULT
    s\n-00185940: 6f61 705f 7373 6c5f 666c 6167 7320 666c oap_ssl_flags fl\n-00185950: 6167 2077 6974 6820 2353 4f41 505f 5353 ag with #SOAP_SS\n-00185960: 4c5f 5245 5155 4952 455f 5345 5256 4552 L_REQUIRE_SERVER\n-00185970: 5f41 5554 4845 4e54 4943 4154 494f 4e20 _AUTHENTICATION \n-00185980: 616e 6420 2353 4f41 505f 544c 5376 3120 and #SOAP_TLSv1 \n-00185990: 656e 6162 6c65 6420 6279 2064 6566 6175 enabled by defau\n-001859a0: 6c74 3c2f 6469 763e 3c64 6976 2063 6c61 lt
    De\n-001859c0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-001859d0: 6473 6f61 7032 2e68 3a35 3832 363c 2f64 dsoap2.h:5826
    .
    <\n-00185a50: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-00185a60: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g\n-00185a70: 6138 6232 3965 3465 6131 3431 3961 3461 a8b29e4ea1419a4a\n-00185a80: 6634 3938 3233 3836 3237 3635 6632 3931 f49823862765f291\n-00185a90: 3822 3e43 5259 5054 4f5f 7468 7265 6164 8\">CRYPTO_thread\n-00185aa0: 5f63 6c65 616e 7570 3c2f 613e 3c2f 6469 _cleanup
    int CRYPTO\n-00185ad0: 5f74 6872 6561 645f 636c 6561 6e75 7028 _thread_cleanup(\n-00185ae0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Cleanu\n-00185b00: 7020 6675 6e63 7469 6f6e 2066 6f72 204f p function for O\n-00185b10: 7065 6e53 534c 2076 6572 7369 6f6e 7320 penSSL versions \n-00185b20: 7072 696f 7220 746f 2031 2e31 2e31 2e3c prior to 1.1.1.<\n-00185b30: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .soap_ssl_ac\n-00185bf0: 6365 7074 3c2f 613e 3c2f 6469 763e 3c64 cept
    int soap_ssl_a\n-00185c20: 6363 6570 7428 7374 7275 6374 2073 6f61 ccept(struct soa\n-00185c30: 7020 2a73 6f61 7029 3c2f 6469 763e 3c64 p *soap)
    Accept SSL/TLS \n-00185c60: 636f 6e6e 6563 7469 6f6e 2e3c 2f64 6976 connection.
    .
    int CRYPTO_thr\n-00185d60: 6561 645f 7365 7475 7028 293c 2f64 6976 ead_setup()
    Setup functi\n-00185d90: 6f6e 2066 6f72 204f 7065 6e53 534c 2076 on for OpenSSL v\n-00185da0: 6572 7369 6f6e 7320 7072 696f 7220 746f ersions prior to\n-00185db0: 2031 2e31 2e31 2074 6f20 7365 7420 6c6f 1.1.1 to set lo\n-00185dc0: 636b 7320 666f 7220 6d75 6c74 692d 7468 cks for multi-th\n-00185dd0: 7265 6164 6564 2053 534c 2f54 4c53 2061 readed SSL/TLS a\n-00185de0: 7070 6c69 6361 7469 6f2e 2e2e 3c2f 6469 pplicatio...
    .
    <\n-00185e00: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00185e10: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The \n-00185ea0: 736f 6170 5f73 736c 5f73 6572 7665 725f soap_ssl_server_\n-00185eb0: 636f 6e74 6578 743c 2f61 3e3c 2f63 6f64 context function init\n-00185ed0: 6961 6c69 7a65 7320 7468 6520 7365 7276 ializes the serv\n-00185ee0: 6572 2d73 6964 6520 5353 4c20 636f 6e74 er-side SSL cont\n-00185ef0: 6578 742e 2054 6865 203c 656d 3e3c 636f ext. The server.pem key fi\n-00185f20: 6c65 2069 7320 7468 6520 7365 7276 6572 le is the server\n-00185f30: 2773 2070 7269 7661 7465 206b 6579 2063 's private key c\n-00185f40: 6f6e 6361 7465 6e61 7465 6420 7769 7468 oncatenated with\n-00185f50: 2069 7473 2063 6572 7469 6669 6361 7465 its certificate\n-00185f60: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The \n-00185f70: 6361 6365 7274 2e70 656d 3c2f 636f 6465 cacert.pem is used t\n-00185f90: 6f20 6175 7468 656e 7469 6361 7465 2063 o authenticate c\n-00185fa0: 6c69 656e 7473 2061 6e64 2063 6f6e 7461 lients and conta\n-00185fb0: 696e 7320 7468 6520 636c 6965 6e74 2063 ins the client c\n-00185fc0: 6572 7469 6669 6361 7465 732e 2041 6c74 ertificates. Alt\n-00185fd0: 6572 6e61 7469 7665 6c79 2061 2064 6972 ernatively a dir\n-00185fe0: 6563 746f 7279 206e 616d 6520 6361 6e20 ectory name can \n-00185ff0: 6265 2073 7065 6369 6669 6564 2e20 5468 be specified. Th\n-00186000: 6973 2064 6972 6563 746f 7279 2069 7320 is directory is \n-00186010: 6173 7375 6d65 6420 746f 2063 6f6e 7461 assumed to conta\n-00186020: 696e 2074 6865 2063 6572 7469 6669 6361 in the certifica\n-00186030: 7465 732e 2054 6865 203c 656d 3e3c 636f tes. The dh512.pem file sp\n-00186060: 6563 6966 6965 7320 7468 6174 2044 4820 ecifies that DH \n-00186070: 7769 6c6c 2062 6520 7573 6564 2066 6f72 will be used for\n-00186080: 206b 6579 2061 6772 6565 6d65 6e74 2069 key agreement i\n-00186090: 6e73 7465 6164 206f 6620 5253 412e 2041 nstead of RSA. A\n-001860a0: 206e 756d 6572 6963 2076 616c 7565 2067 numeric value g\n-001860b0: 7265 6174 6572 2074 6861 6e20 3531 3220 reater than 512 \n-001860c0: 6361 6e20 6265 2070 726f 7669 6465 6420 can be provided \n-001860d0: 696e 7374 6561 6420 6173 2061 2073 7472 instead as a str\n-001860e0: 696e 6720 636f 6e73 7461 6e74 2028 652e ing constant (e.\n-001860f0: 672e 203c 636f 6465 3e22 3531 3222 3c2f g. \"512\") to allow \n-00186110: 7468 6520 656e 6769 6e65 2074 6f20 6765 the engine to ge\n-00186120: 6e65 7261 7465 2074 6865 2044 4820 7061 nerate the DH pa\n-00186130: 7261 6d65 7465 7273 206f 6e20 7468 6520 rameters on the \n-00186140: 666c 7920 2874 6869 7320 6361 6e20 7461 fly (this can ta\n-00186150: 6b65 2061 2077 6869 6c65 2920 7261 7468 ke a while) rath\n-00186160: 6572 2074 6861 6e20 7265 7472 6965 7669 er than retrievi\n-00186170: 6e67 2074 6865 6d20 6672 6f6d 2061 2066 ng them from a f\n-00186180: 696c 652e 2054 6865 2072 616e 6466 696c ile. The randfil\n-00186190: 6520 656e 7472 7920 6361 6e20 6265 2075 e entry can be u\n-001861a0: 7365 6420 746f 2073 6565 6420 7468 6520 sed to seed the \n-001861b0: 5052 4e47 2e20 5468 6520 6c61 7374 2065 PRNG. The last e\n-001861c0: 6e74 7279 2065 6e61 626c 6520 7365 7276 ntry enable serv\n-001861d0: 6572 2d73 6964 6520 7365 7373 696f 6e20 er-side session \n-001861e0: 6361 6368 696e 6720 746f 2073 7065 6564 caching to speed\n-001861f0: 2075 7020 544c 532e 2041 2075 6e69 7175 up TLS. A uniqu\n-00186200: 6520 7365 7276 6572 206e 616d 6520 6973 e server name is\n-00186210: 2072 6571 7569 7265 642e 3c2f 703e 0a3c required.

    .<\n-00186220: 703e 596f 7520 6361 6e20 7370 6563 6966 p>You can specif\n-00186230: 7920 6120 6369 7068 6572 206c 6973 7420 y a cipher list \n-00186240: 746f 2075 7365 2077 6974 6820 544c 5376 to use with TLSv\n-00186250: 312e 3220 616e 6420 6265 6c6f 7720 7769 1.2 and below wi\n-00186260: 7468 203c 636f 6465 3e53 534c 5f43 5458 th SSL_CTX\n-00186270: 5f73 6574 5f63 6970 6865 725f 6c69 7374 _set_cipher_list\n-00186280: 2873 6f61 702d 2667 743b 6374 782c 2022 (soap->ctx, \"\n-00186290: 2e2e 2e22 293c 2f63 6f64 653e 2077 6865 ...\") whe\n-001862a0: 7265 203c 636f 6465 3e73 6f61 702d 2667 re soap-&g\n-001862b0: 743b 6374 783c 2f63 6f64 653e 2069 7320 t;ctx is \n-001862c0: 7468 6520 5353 4c20 636f 6e74 6578 7420 the SSL context \n-001862d0: 6372 6561 7465 6420 6279 203c 636f 6465 created by soap_ssl_ser\n-00186370: 7665 725f 636f 6e74 6578 7428 293c 2f61 ver_context(). Likewi\n-00186390: 7365 2c20 7573 6520 3c63 6f64 653e 5353 se, use SS\n-001863a0: 4c5f 4354 585f 7365 745f 6369 7068 6572 L_CTX_set_cipher\n-001863b0: 7375 6974 6573 2873 6f61 702d 2667 743b suites(soap->\n-001863c0: 6374 782c 2022 2e2e 2e22 293c 2f63 6f64 ctx, \"...\") to configure \n-001863e0: 7468 6520 6176 6169 6c61 626c 6520 544c the available TL\n-001863f0: 5376 312e 3320 6369 7068 6572 7375 6974 Sv1.3 ciphersuit\n-00186400: 6573 2e3c 2f70 3e0a 3c70 3e57 6520 7265 es.

    .

    We re\n-00186410: 6665 7220 746f 2074 6865 204f 7065 6e53 fer to the OpenS\n-00186420: 534c 2064 6f63 756d 656e 7461 7469 6f6e SL documentation\n-00186430: 2061 6e64 206d 616e 7561 6c20 7061 6765 and manual page\n-00186440: 7320 6f66 203c 636f 6465 3e53 534c 5f43 s of SSL_C\n-00186450: 5458 5f73 6574 5f63 6970 6865 725f 6c69 TX_set_cipher_li\n-00186460: 7374 3c2f 636f 6465 3e20 616e 6420 3c63 st and SSL_CTX_set_\n-00186480: 6369 7068 6572 7375 6974 6573 3c2f 636f ciphersuites for details \n-001864a0: 6f6e 2074 6865 206c 6174 6573 7420 6369 on the latest ci\n-001864b0: 7068 6572 206c 6973 7473 2061 6e64 2073 pher lists and s\n-001864c0: 7569 7465 7320 6176 6169 6c61 626c 6520 uites available \n-001864d0: 746f 2075 7365 2e3c 2f70 3e0a 3c70 3e54 to use.

    .

    T\n-001864e0: 6865 2047 4e55 544c 5320 6d75 7465 7820 he GNUTLS mutex \n-001864f0: 6c6f 636b 2073 6574 7570 2069 7320 6175 lock setup is au\n-00186500: 746f 6d61 7469 6361 6c6c 7920 7065 7266 tomatically perf\n-00186510: 6f72 6d65 6420 696e 2074 6865 2065 6e67 ormed in the eng\n-00186520: 696e 652c 2062 7574 206f 6e6c 7920 7768 ine, but only wh\n-00186530: 656e 2050 4f53 4958 2074 6872 6561 6473 en POSIX threads\n-00186540: 2061 7265 2064 6574 6563 7465 6420 616e are detected an\n-00186550: 6420 6176 6169 6c61 626c 652e 3c2f 703e d available.

    \n-00186560: 0a3c 703e 416c 6c20 4f70 656e 5353 4c20 .

    All OpenSSL \n-00186570: 7665 7273 696f 6e73 2070 7269 6f72 2074 versions prior t\n-00186580: 6f20 312e 312e 3020 7265 7175 6972 6520 o 1.1.0 require \n-00186590: 6d75 7465 7820 6c6f 636b 7320 746f 2062 mutex locks to b\n-001865a0: 6520 6578 706c 6963 6974 6c79 2073 6574 e explicitly set\n-001865b0: 2075 7020 696e 2079 6f75 7220 636f 6465 up in your code\n-001865c0: 2066 6f72 206d 756c 7469 2d74 6872 6561 for multi-threa\n-001865d0: 6465 6420 6170 706c 6963 6174 696f 6e73 ded applications\n-001865e0: 2062 7920 6361 6c6c 696e 6720 3c63 6f64 by calling CRYPTO_thread_\n-001866c0: 7365 7475 7028 293c 2f61 3e3c 2f63 6f64 setup() and CRYPTO\n-00186770: 5f74 6872 6561 645f 636c 6561 6e75 7028 _thread_cleanup(\n-00186780: 293c 2f61 3e3c 2f63 6f64 653e 2061 7320 ) as \n-00186790: 7761 7320 7368 6f77 6e20 696e 2074 6865 was shown in the\n-001867a0: 2063 6f64 6520 6162 6f76 652e 204f 7065 code above. Ope\n-001867b0: 6e53 534c 2031 2e31 2e30 2061 6e64 2067 nSSL 1.1.0 and g\n-001867c0: 7265 6174 6572 2064 6f65 7320 6e6f 7420 reater does not \n-001867d0: 7265 7175 6972 6520 7468 6573 6520 6c6f require these lo\n-001867e0: 636b 7320 746f 2062 6520 7365 7420 7570 cks to be set up\n-001867f0: 2e20 4966 2079 6f75 2061 7265 206e 6f74 . If you are not\n-00186800: 2073 7572 6520 7768 6963 6820 7665 7273 sure which vers\n-00186810: 696f 6e20 6f66 204f 7065 6e53 534c 2079 ion of OpenSSL y\n-00186820: 6f75 206d 6179 2062 6520 7573 696e 6720 ou may be using \n-00186830: 7769 7468 2079 6f75 7220 6d75 6c74 692d with your multi-\n-00186840: 7468 7265 6164 6564 2061 7070 6c69 6361 threaded applica\n-00186850: 7469 6f6e 2c20 7468 656e 2073 6574 2075 tion, then set u\n-00186860: 7020 7468 6520 6c6f 636b 732e 3c2f 703e p the locks.

    \n-00186870: 0a3c 703e 466f 7220 556e 6978 2061 6e64 .

    For Unix and\n-00186880: 204c 696e 7578 2c20 6d61 6b65 2073 7572 Linux, make sur\n-00186890: 6520 796f 7520 6861 7665 2073 6967 6e61 e you have signa\n-001868a0: 6c20 6861 6e64 6c65 7273 2073 6574 2069 l handlers set i\n-001868b0: 6e20 796f 7572 2073 6572 7669 6365 2061 n your service a\n-001868c0: 6e64 2f6f 7220 636c 6965 6e74 2061 7070 nd/or client app\n-001868d0: 6c69 6361 7469 6f6e 7320 746f 2063 6174 lications to cat\n-001868e0: 6368 2062 726f 6b65 6e20 636f 6e6e 6563 ch broken connec\n-001868f0: 7469 6f6e 7320 283c 636f 6465 3e53 4947 tions (SIG\n-00186900: 5049 5045 3c2f 636f 6465 3e29 3a3c 2f70 PIPE):.

    signal\n-00186940: 2853 4947 5049 5045 2c20 7369 6770 6970 (SIGPIPE, sigpip\n-00186950: 655f 6861 6e64 6c65 293b 3c2f 6469 763e e_handle);
    \n-00186960: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    where\n-00186980: 2c20 666f 7220 6578 616d 706c 653a 3c2f , for example:.

    void\n-001869e0: 2073 6967 7069 7065 5f68 616e 646c 6528 sigpipe_handle(\n-001869f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int x) { }.

    By d\n-00186a40: 6566 6175 6c74 2c20 636c 6965 6e74 7320 efault, clients \n-00186a50: 6172 6520 6e6f 7420 7265 7175 6972 6564 are not required\n-00186a60: 2074 6f20 6175 7468 656e 7469 6361 7465 to authenticate\n-00186a70: 2e20 546f 2072 6571 7569 7265 2063 6c69 . To require cli\n-00186a80: 656e 7420 6175 7468 656e 7469 6361 7469 ent authenticati\n-00186a90: 6f6e 2075 7365 2074 6865 2066 6f6c 6c6f on use the follo\n-00186aa0: 7769 6e67 3a3c 2f70 3e0a 3c64 6976 2063 wing:

    .
    \n-00186ac0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n-00186ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e ...}\n-00186f20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00187000: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n-00187020: 5f53 534c 5f52 4551 5549 5245 5f43 4c49 _SSL_REQUIRE_CLI\n-00187030: 454e 545f 4155 5448 454e 5449 4341 5449 ENT_AUTHENTICATI\n-00187040: 4f4e 3c2f 6469 763e 3c64 6976 2063 6c61 ON
    soap_\n-00187060: 7373 6c5f 666c 6167 7320 666c 6167 2066 ssl_flags flag f\n-00187070: 6f72 2073 6572 7665 7273 2074 6f20 7265 or servers to re\n-00187080: 7175 6972 6520 636c 6965 6e74 7320 746f quire clients to\n-00187090: 2061 7574 6865 6e74 6963 6174 6520 746f authenticate to\n-001870a0: 2073 6572 7665 7273 2064 7572 696e 6720 servers during \n-001870b0: 7468 6520 4854 5450 5320 6861 6e64 7368 the HTTPS handsh\n-001870c0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-001870e0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-001870f0: 7464 736f 6170 322e 683a 3538 3534 3c2f tdsoap2.h:5854
    .

    and comp\n-00188010: 696c 6520 7769 7468 2063 6f6d 7069 6c65 ile with compile\n-00188020: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_SOAPDEFS_\n-00188040: 483c 2f63 6f64 653e 2074 6f20 696e 636c H to incl\n-00188050: 7564 6520 3c65 6d3e 3c63 6f64 653e 736f ude so\n-00188060: 6170 6465 6673 2e68 3c2f 636f 6465 3e3c apdefs.h<\n-00188070: 2f65 6d3e 2069 6e20 796f 7572 2070 726f /em> in your pro\n-00188080: 6a65 6374 2e20 416c 7465 726e 6174 6976 ject. Alternativ\n-00188090: 656c 792c 2063 6f6d 7069 6c65 2077 6974 ely, compile wit\n-001880a0: 6820 474e 5554 4c53 3a20 3c2f 703e 3c70 h GNUTLS:

    c++ -DWITH_\n-001880d0: 474e 5554 4c53 206d 7963 6c69 656e 742e GNUTLS myclient.\n-001880e0: 6370 7020 7374 6473 6f61 702e 6370 7020 cpp stdsoap.cpp \n-001880f0: 736f 6170 432e 6370 7020 736f 6170 436c soapC.cpp soapCl\n-00188100: 6965 6e74 2e63 7070 202d 6c67 6e75 746c ient.cpp -lgnutl\n-00188110: 7320 2d6c 6763 7279 7074 202d 6c67 7067 s -lgcrypt -lgpg\n-00188120: 2d65 7272 6f72 0a3c 2f70 7265 3e3c 703e -error.

    \n-00188130: 4120 636c 6965 6e74 2070 726f 6772 616d A client program\n-00188140: 2073 696d 706c 7920 7573 6573 2074 6865 simply uses the\n-00188150: 2070 7265 6669 7820 3c65 6d3e 3c63 6f64 prefix https:<\n-00188170: 2f65 6d3e 2069 6e73 7465 6164 206f 6620 /em> instead of \n-00188180: 3c65 6d3e 3c63 6f64 653e 6874 7470 3a3c http:<\n-00188190: 2f63 6f64 653e 3c2f 656d 3e20 696e 2074 /code> in t\n-001881a0: 6865 2065 6e64 706f 696e 7420 5552 4c20 he endpoint URL \n-001881b0: 6f66 2061 2073 6572 7669 6365 206f 7065 of a service ope\n-001881c0: 7261 7469 6f6e 2063 616c 6c20 746f 2061 ration call to a\n-001881d0: 2057 6562 2053 6572 7669 6365 2074 6f20 Web Service to \n-001881e0: 7573 6520 656e 6372 7970 7465 6420 7472 use encrypted tr\n-001881f0: 616e 7366 6572 7320 2869 6620 7468 6520 ansfers (if the \n-00188200: 7365 7276 6963 6520 7375 7070 6f72 7473 service supports\n-00188210: 2048 5454 5053 292e 2059 6f75 206e 6565 HTTPS). You nee\n-00188220: 6420 746f 2073 7065 6369 6679 2074 6865 d to specify the\n-00188230: 2063 6c69 656e 742d 7369 6465 206b 6579 client-side key\n-00188240: 2066 696c 6520 616e 6420 7061 7373 776f file and passwo\n-00188250: 7264 206f 6620 7468 6520 6b65 7966 696c rd of the keyfil\n-00188260: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n-00188290: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001882a0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
    .
    soa\n-00188380: 705f 7373 6c5f 696e 6974 3c2f 613e 2829 p_ssl_init()\n-00188390: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; /* init \n-001883b0: 4f70 656e 5353 4c20 2873 6b69 7070 696e OpenSSL (skippin\n-001883c0: 6720 7468 6973 206f 7220 6361 6c6c 696e g this or callin\n-001883d0: 6720 6d75 6c74 6970 6c65 2074 696d 6573 g multiple times\n-001883e0: 2069 7320 4f4b 2c20 7369 6e63 6520 7468 is OK, since th\n-001883f0: 6520 656e 6769 6e65 2077 696c 6c20 696e e engine will in\n-00188400: 6974 2053 534c 2061 7574 6f6d 6174 6963 it SSL automatic\n-00188410: 616c 6c79 2920 2a2f 3c2f 7370 616e 3e3c ally) */<\n-00188420: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    /*\n-00188450: 2073 6f61 705f 7373 6c5f 6e6f 696e 6974 soap_ssl_noinit\n-00188460: 2829 3b20 2a2f 3c2f 7370 616e 3e20 3c73 (); */ /* do not in\n-00188490: 6974 204f 7065 6e53 534c 2028 6966 2053 it OpenSSL (if S\n-001884a0: 534c 2069 7320 616c 7265 6164 7920 696e SL is already in\n-001884b0: 6974 6961 6c69 7a65 6420 656c 7365 7768 itialized elsewh\n-001884c0: 6572 6520 696e 2074 6869 7320 6170 706c ere in this appl\n-001884d0: 6963 6174 696f 6e29 202a 2f3c 2f73 7061 ication) */
    .
    \n-00188550: 736f 6170 5f69 6e69 743c 2f61 3e28 2661 soap_init(&a\n-00188560: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .. \n-00188690: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_SSL_DEFAUL\n-001886f0: 543c 2f61 3e2c 203c 2f64 6976 3e0a 3c64 T,
    .\n-00188710: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n-00188730: 756f 743b 636c 6965 6e74 2e70 656d 2671 uot;client.pem&q\n-00188740: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n-00188750: 2020 2020 3c73 7061 6e20 636c 6173 733d /* key\n-00188770: 6669 6c65 3a20 7265 7175 6972 6564 206f file: required o\n-00188780: 6e6c 7920 7768 656e 2063 6c69 656e 7420 nly when client \n-00188790: 6d75 7374 2061 7574 6865 6e74 6963 6174 must authenticat\n-001887a0: 6520 746f 2073 6572 7665 7220 2873 6565 e to server (see\n-001887b0: 2053 534c 2064 6f63 7320 6f6e 2068 6f77 SSL docs on how\n-001887c0: 2074 6f20 6f62 7461 696e 2074 6869 7320 to obtain this \n-001887d0: 6669 6c65 2920 2a2f 3c2f 7370 616e 3e20 file) */ \n-001887e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "pas\n-00188820: 7377 6f72 6426 7175 6f74 3b3c 2f73 7061 sword", /* password t\n-00188860: 6f20 7265 6164 2074 6865 206b 6579 2066 o read the key f\n-00188870: 696c 6520 286e 6f74 2075 7365 6420 7769 ile (not used wi\n-00188880: 7468 2047 4e55 544c 5329 202a 2f3c 2f73 th GNUTLS) */
    . \n-001888b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001888d0: 743b 6361 6365 7274 732e 7065 6d26 7175 t;cacerts.pem&qu\n-001888e0: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n-001888f0: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* cacer\n-00188910: 7420 6669 6c65 2074 6f20 7374 6f72 6520 t file to store \n-00188920: 7472 7573 7465 6420 6365 7274 6966 6963 trusted certific\n-00188930: 6174 6573 2028 6e65 6564 6564 2074 6f20 ates (needed to \n-00188940: 7665 7269 6679 2073 6572 7665 7229 202a verify server) *\n-00188950: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00188960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL, \n-00188980: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001889a0: 2a20 6361 7061 7468 2074 6f20 6469 7265 * capath to dire\n-001889b0: 6374 6f72 7920 7769 7468 2074 7275 7374 ctory with trust\n-001889c0: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates \n-001889d0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-001889e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL \n-00188a00: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* if ra\n-00188a20: 6e64 6669 6c65 213d 4e55 4c4c 3a20 7573 ndfile!=NULL: us\n-00188a30: 6520 6120 6669 6c65 2077 6974 6820 7261 e a file with ra\n-00188a40: 6e64 6f6d 2064 6174 6120 746f 2073 6565 ndom data to see\n-00188a50: 6420 7261 6e64 6f6d 6e65 7373 202a 2f3c d randomness */<\n-00188a60: 2f73 7061 6e3e 2020 3c2f 6469 763e 0a3c /span>
    .<\n-00188a70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00188a80: 3e29 2920 3c2f 6469 763e 0a3c 6469 7620 >))
    .
    {.
    soap\n-00188b10: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-00188b20: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00188b50: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-00188b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exit(\n-00188b80: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n-00188b90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n-00188bb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_call_ns_\n-00188bd0: 5f6d 796d 6574 686f 6428 2661 6d70 3b3c _mymethod(&<\n-00188be0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00188bf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00188c00: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00188c10: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00188c30: 743b 6874 7470 733a 2f2f 646f 6d61 696e t;https://domain\n-00188c40: 2f70 6174 682f 7365 6375 7265 2e63 6769 /path/secure.cgi\n-00188c50: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-00188c60: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00188c70: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00188c80: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 ;", \n-00188c90: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c64 6976 ...);
    .soap_ssl_cl\n-00188d50: 6965 6e74 5f63 6f6e 7465 7874 3c2f 613e ient_context\n-00188d60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n-00188d80: 6170 5f73 736c 5f63 6c69 656e 745f 636f ap_ssl_client_co\n-00188d90: 6e74 6578 7428 7374 7275 6374 2073 6f61 ntext(struct soa\n-00188da0: 7020 2a73 6f61 702c 2073 6f61 705f 7373 p *soap, soap_ss\n-00188db0: 6c5f 666c 6167 7320 666c 6167 732c 2063 l_flags flags, c\n-00188dc0: 6f6e 7374 2063 6861 7220 2a6b 6579 6669 onst char *keyfi\n-00188dd0: 6c65 2c20 636f 6e73 7420 6368 6172 202a le, const char *\n-00188de0: 7061 7373 776f 7264 2c20 636f 6e73 7420 password, const \n-00188df0: 6368 6172 202a 6361 6669 6c65 2c20 636f char *cafile, co\n-00188e00: 6e73 7420 6368 6172 202a 6361 7061 7468 nst char *capath\n-00188e10: 2c20 636f 6e73 7420 6368 6172 202a 7261 , const char *ra\n-00188e20: 6e64 6669 6c65 293c 2f64 6976 3e3c 6469 ndfile)
    \n-00188e40: 496e 6974 6961 6c69 7a65 2074 6865 2063 Initialize the c\n-00188e50: 6c69 656e 742d 7369 6465 2053 534c 2f54 lient-side SSL/T\n-00188e60: 4c53 2063 6f6e 7465 7874 2e3c 2f64 6976 LS context.
    .
    <\n-00188e90: 703e 4279 2064 6566 6175 6c74 2c20 7365 p>By default, se\n-00188ea0: 7276 6572 2061 7574 6865 6e74 6963 6174 rver authenticat\n-00188eb0: 696f 6e20 6973 2065 6e61 626c 6564 2061 ion is enabled a\n-00188ec0: 6e64 2074 6865 203c 656d 3e3c 636f 6465 nd the cacerts.pem or capath \n-00188f00: 286e 6f74 2075 7365 6420 7769 7468 2047 (not used with G\n-00188f10: 4e55 544c 5329 206d 7573 7420 6265 2073 NUTLS) must be s\n-00188f20: 6574 2073 6f20 7468 6174 2074 6865 2043 et so that the C\n-00188f30: 4120 6365 7274 6966 6963 6174 6573 206f A certificates o\n-00188f40: 6620 7468 6520 7365 7276 6572 2873 2920 f the server(s) \n-00188f50: 6172 6520 6163 6365 7373 6962 6c65 2061 are accessible a\n-00188f60: 7420 7275 6e20 7469 6d65 2e20 5468 6520 t run time. The \n-00188f70: 3c65 6d3e 3c63 6f64 653e 6361 6365 7274 cacert\n-00188f80: 732e 7065 6d3c 2f63 6f64 653e 3c2f 656d s.pem file included \n-00188fa0: 696e 2074 6865 2067 534f 4150 2073 6f75 in the gSOAP sou\n-00188fb0: 7263 6520 636f 6465 2070 6163 6b61 6765 rce code package\n-00188fc0: 2063 6f6e 7461 696e 7320 7468 6520 6365 contains the ce\n-00188fd0: 7274 6966 6963 6174 6573 206f 6620 636f rtificates of co\n-00188fe0: 6d6d 6f6e 2043 4173 2e20 5468 6973 2066 mmon CAs. This f\n-00188ff0: 696c 6520 6d75 7374 2062 6520 7375 7070 ile must be supp\n-00189000: 6c69 6564 2077 6974 6820 7468 6520 636c lied with the cl\n-00189010: 6965 6e74 2c20 6966 2073 6572 7665 7220 ient, if server \n-00189020: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n-00189030: 7320 7265 7175 6972 6564 2e20 416c 7465 s required. Alte\n-00189040: 726e 6174 6976 656c 792c 2079 6f75 2063 rnatively, you c\n-00189050: 616e 2075 7365 2074 6865 203c 656d 3e3c an use the <\n-00189060: 636f 6465 3e67 736f 6170 2f70 6c75 6769 code>gsoap/plugi\n-00189070: 6e2f 6361 6365 7274 732e 683c 2f63 6f64 n/cacerts.h and \n-00189090: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug\n-001890a0: 696e 2f63 6163 6572 7473 2e63 3c2f 636f in/cacerts.c code to\n-001890c0: 2065 6d62 6564 2043 4120 6365 7274 6966 embed CA certif\n-001890d0: 6963 6174 6573 2069 6e20 796f 7572 2063 icates in your c\n-001890e0: 6c69 656e 7420 636f 6465 2e3c 2f70 3e0a lient code.

    .\n-001890f0: 3c70 3e59 6f75 2063 616e 2073 7065 6369

    You can speci\n-00189100: 6679 2061 2063 6970 6865 7220 6c69 7374 fy a cipher list\n-00189110: 2074 6f20 7573 6520 7769 7468 2054 4c53 to use with TLS\n-00189120: 7631 2e32 2061 6e64 2062 656c 6f77 2077 v1.2 and below w\n-00189130: 6974 6820 3c63 6f64 653e 5353 4c5f 4354 ith SSL_CT\n-00189140: 585f 7365 745f 6369 7068 6572 5f6c 6973 X_set_cipher_lis\n-00189150: 7428 736f 6170 2d26 6774 3b63 7478 2c20 t(soap->ctx, \n-00189160: 222e 2e2e 2229 3c2f 636f 6465 3e20 7768 \"...\") wh\n-00189170: 6572 6520 3c63 6f64 653e 736f 6170 2d26 ere soap-&\n-00189180: 6774 3b63 7478 3c2f 636f 6465 3e20 6973 gt;ctx is\n-00189190: 2074 6865 2053 534c 2063 6f6e 7465 7874 the SSL context\n-001891a0: 2063 7265 6174 6564 2062 7920 3c63 6f64 created by soap_ssl_cl\n-00189240: 6965 6e74 5f63 6f6e 7465 7874 2829 3c2f ient_context(). Likew\n-00189260: 6973 652c 2075 7365 203c 636f 6465 3e53 ise, use S\n-00189270: 534c 5f43 5458 5f73 6574 5f63 6970 6865 SL_CTX_set_ciphe\n-00189280: 7273 7569 7465 7328 736f 6170 2d26 6774 rsuites(soap->\n-00189290: 3b63 7478 2c20 222e 2e2e 2229 3c2f 636f ;ctx, \"...\") to configure\n-001892b0: 2074 6865 2061 7661 696c 6162 6c65 2054 the available T\n-001892c0: 4c53 7631 2e33 2063 6970 6865 7273 7569 LSv1.3 ciphersui\n-001892d0: 7465 732e 3c2f 703e 0a3c 703e 5765 2072 tes.

    .

    We r\n-001892e0: 6566 6572 2074 6f20 7468 6520 4f70 656e efer to the Open\n-001892f0: 5353 4c20 646f 6375 6d65 6e74 6174 696f SSL documentatio\n-00189300: 6e20 616e 6420 6d61 6e75 616c 2070 6167 n and manual pag\n-00189310: 6573 206f 6620 3c63 6f64 653e 5353 4c5f es of SSL_\n-00189320: 4354 585f 7365 745f 6369 7068 6572 5f6c CTX_set_cipher_l\n-00189330: 6973 743c 2f63 6f64 653e 2061 6e64 203c ist and <\n-00189340: 636f 6465 3e53 534c 5f43 5458 5f73 6574 code>SSL_CTX_set\n-00189350: 5f63 6970 6865 7273 7569 7465 733c 2f63 _ciphersuites for details\n-00189370: 206f 6e20 7468 6520 6c61 7465 7374 2063 on the latest c\n-00189380: 6970 6865 7220 6c69 7374 7320 616e 6420 ipher lists and \n-00189390: 7375 6974 6573 2061 7661 696c 6162 6c65 suites available\n-001893a0: 2074 6f20 7573 652e 3c2f 703e 0a3c 703e to use.

    .

    \n-001893b0: 4f74 6865 7220 636c 6965 6e74 2d73 6964 Other client-sid\n-001893c0: 6520 5353 4c20 6f70 7469 6f6e 7320 6172 e SSL options ar\n-001893d0: 6520 3c63 6f64 653e 2353 4f41 505f 5353 e #SOAP_SS\n-001893e0: 4c5f 534b 4950 5f48 4f53 545f 4348 4543 L_SKIP_HOST_CHEC\n-001893f0: 4b3c 2f63 6f64 653e 2074 6f20 736b 6970 K to skip\n-00189400: 2074 6865 2068 6f73 7420 6e61 6d65 2076 the host name v\n-00189410: 6572 6966 6963 6174 696f 6e20 6368 6563 erification chec\n-00189420: 6b20 616e 6420 3c63 6f64 653e 2353 4f41 k and #SOA\n-00189430: 505f 5353 4c5f 414c 4c4f 575f 4558 5049 P_SSL_ALLOW_EXPI\n-00189440: 5245 445f 4345 5254 4946 4943 4154 453c RED_CERTIFICATE<\n-00189450: 2f63 6f64 653e 2074 6f20 616c 6c6f 7720 /code> to allow \n-00189460: 636f 6e6e 6563 7469 6e67 2074 6f20 6120 connecting to a \n-00189470: 686f 7374 2077 6974 6820 616e 2065 7870 host with an exp\n-00189480: 6972 6564 2063 6572 7469 6669 6361 7465 ired certificate\n-00189490: 2e20 466f 7220 6578 616d 706c 652c 3c2f . For example,.

    struct <\n-001894f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00189500: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00189510: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html\">soap <\n-00189520: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00189530: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00189540: 6874 6d6c 223e 736f 6170 3c2f 613e 3b3c html\">soap;<\n-00189550: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_ss\n-001895c0: 6c5f 696e 6974 3c2f 613e 2829 3b20 3c73 l_init(); /* init Open\n-001895f0: 5353 4c20 2873 6b69 7070 696e 6720 7468 SSL (skipping th\n-00189600: 6973 206f 7220 6361 6c6c 696e 6720 6d75 is or calling mu\n-00189610: 6c74 6970 6c65 2074 696d 6573 2069 7320 ltiple times is \n-00189620: 4f4b 2c20 7369 6e63 6520 7468 6520 656e OK, since the en\n-00189630: 6769 6e65 2077 696c 6c20 696e 6974 2053 gine will init S\n-00189640: 534c 2061 7574 6f6d 6174 6963 616c 6c79 SL automatically\n-00189650: 2920 2a2f 3c2f 7370 616e 3e3c 2f64 6976 ) */.
    /* soa\n-00189690: 705f 7373 6c5f 6e6f 696e 6974 2829 3b20 p_ssl_noinit(); \n-001896a0: 2a2f 3c2f 7370 616e 3e20 3c73 7061 6e20 */ \n-001896c0: 2f2a 2064 6f20 6e6f 7420 696e 6974 204f /* do not init O\n-001896d0: 7065 6e53 534c 2028 6966 2053 534c 2069 penSSL (if SSL i\n-001896e0: 7320 616c 7265 6164 7920 696e 6974 6961 s already initia\n-001896f0: 6c69 7a65 6420 656c 7365 7768 6572 6520 lized elsewhere \n-00189700: 696e 2074 6869 7320 6170 706c 6963 6174 in this applicat\n-00189710: 696f 6e29 202a 2f3c 2f73 7061 6e3e 3c2f ion) */.
    soap\n-00189790: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n-001897a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001897b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001897c0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-001897d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (s\n-00189860: 6f61 705f 7373 6c5f 636c 6965 6e74 5f63 oap_ssl_client_c\n-00189870: 6f6e 7465 7874 3c2f 613e 2826 616d 703b ontext(&\n-00189880: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001898b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..\n-00189950: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n-001899f0: 7c20 3c61 2063 6c61 7373 3d22 636f 6465 | SOAP_SSL_ALLO\n-00189a50: 575f 4558 5049 5245 445f 4345 5254 4946 W_EXPIRED_CERTIF\n-00189a60: 4943 4154 453c 2f61 3e2c 203c 2f64 6976 ICATE, .
    "client.p\n-00189ab0: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em",\n-00189ac0: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00189ae0: 206b 6579 6669 6c65 3a20 7265 7175 6972 keyfile: requir\n-00189af0: 6564 206f 6e6c 7920 7768 656e 2063 6c69 ed only when cli\n-00189b00: 656e 7420 6d75 7374 2061 7574 6865 6e74 ent must authent\n-00189b10: 6963 6174 6520 746f 2073 6572 7665 7220 icate to server \n-00189b20: 2873 6565 2053 534c 2064 6f63 7320 6f6e (see SSL docs on\n-00189b30: 2068 6f77 2074 6f20 6f62 7461 696e 2074 how to obtain t\n-00189b40: 6869 7320 6669 6c65 2920 2a2f 3c2f 7370 his file) */
    .
    <\n-00189b70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00189b80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00189b90: 3b70 6173 7377 6f72 6426 7175 6f74 3b3c ;password"<\n-00189ba0: 2f73 7061 6e3e 2c20 2020 2020 2020 2020 /span>, \n-00189bb0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* passwo\n-00189bd0: 7264 2074 6f20 7265 6164 2074 6865 206b rd to read the k\n-00189be0: 6579 2066 696c 6520 286e 6f74 2075 7365 ey file (not use\n-00189bf0: 6420 7769 7468 2047 4e55 544c 5329 202a d with GNUTLS) *\n-00189c00: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00189c10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00189c40: 2671 756f 743b 6361 6365 7274 732e 7065 "cacerts.pe\n-00189c50: 6d26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 m", \n-00189c60: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* c\n-00189c80: 6163 6572 7420 6669 6c65 2074 6f20 7374 acert file to st\n-00189c90: 6f72 6520 7472 7573 7465 6420 6365 7274 ore trusted cert\n-00189ca0: 6966 6963 6174 6573 2028 6e65 6564 6564 ificates (needed\n-00189cb0: 2074 6f20 7665 7269 6679 2073 6572 7665 to verify serve\n-00189cc0: 7229 202a 2f3c 2f73 7061 6e3e 3c2f 6469 r) */.
    NULL, \n-00189cf0: 2020 2020 2020 2020 2020 2020 3c73 7061 /* capath to d\n-00189d20: 6972 6563 746f 7279 2077 6974 6820 7472 irectory with tr\n-00189d30: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat\n-00189d40: 6573 202a 2f3c 2f73 7061 6e3e 203c 2f64 es */ .
    NULL \n-00189d70: 2020 2020 203c 7370 616e 2063 6c61 7373 /* if\n-00189d90: 2072 616e 6466 696c 6521 3d4e 554c 4c3a randfile!=NULL:\n-00189da0: 2075 7365 2061 2066 696c 6520 7769 7468 use a file with\n-00189db0: 2072 616e 646f 6d20 6461 7461 2074 6f20 random data to \n-00189dc0: 7365 6564 2072 616e 646f 6d6e 6573 7320 seed randomness \n-00189dd0: 2a2f 3c2f 7370 616e 3e20 203c 2f64 6976 */ .
    ))
    .\n-00189e10: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..
    ex\n-00189ef0: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE)\n-00189f00: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } ..<\n-0018a010: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0018a020: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-0018a030: 705f 5f73 736c 5f68 746d 6c5f 6761 3264 p__ssl_html_ga2d\n-0018a040: 3764 3434 6630 6236 3564 6139 3934 3166 7d44f0b65da9941f\n-0018a050: 3032 3732 6230 6637 3337 3435 6635 223e 0272b0f73745f5\">\n-0018a060: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    #d\n-0018a0f0: 6566 696e 6520 534f 4150 5f53 534c 5f53 efine SOAP_SSL_S\n-0018a100: 4b49 505f 484f 5354 5f43 4845 434b 3c2f KIP_HOST_CHECK
    soap_ssl_\n-0018a130: 666c 6167 7320 666c 6167 2066 6f72 2063 flags flag for c\n-0018a140: 6c69 656e 7473 2074 6f20 616c 6c6f 7720 lients to allow \n-0018a150: 636c 6965 6e74 7320 746f 2073 6b69 7020 clients to skip \n-0018a160: 636f 6d6d 6f6e 206e 616d 6520 6368 6563 common name chec\n-0018a170: 6b73 2061 6761 696e 7374 2074 6865 2068 ks against the h\n-0018a180: 6f73 7420 6e61 6d65 206f 6620 2e2e 2e3c ost name of ...<\n-0018a190: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0018a1b0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0018a1c0: 6170 322e 683a 3538 3638 3c2f 6469 763e ap2.h:5868
    \n-0018a1d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0018a2b0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n-0018a2d0: 5f53 534c 5f52 4551 5549 5245 5f53 4552 _SSL_REQUIRE_SER\n-0018a2e0: 5645 525f 4155 5448 454e 5449 4341 5449 VER_AUTHENTICATI\n-0018a2f0: 4f4e 3c2f 6469 763e 3c64 6976 2063 6c61 ON
    soap_\n-0018a310: 7373 6c5f 666c 6167 7320 666c 6167 2066 ssl_flags flag f\n-0018a320: 6f72 2063 6c69 656e 7473 2074 6f20 7265 or clients to re\n-0018a330: 7175 6972 6520 7365 7276 6572 7320 746f quire servers to\n-0018a340: 2061 7574 6865 6e74 6963 6174 6520 746f authenticate to\n-0018a350: 2063 6c69 656e 7473 2064 7572 696e 6720 clients during \n-0018a360: 7468 6520 4854 5450 5320 6861 6e64 7368 the HTTPS handsh\n-0018a370: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-0018a390: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0018a3a0: 7464 736f 6170 322e 683a 3538 3632 3c2f tdsoap2.h:5862
    .\n-0018a490: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n-0018a4b0: 5f53 534c 5f41 4c4c 4f57 5f45 5850 4952 _SSL_ALLOW_EXPIR\n-0018a4c0: 4544 5f43 4552 5449 4649 4341 5445 3c2f ED_CERTIFICATE
    soap_ssl_\n-0018a4f0: 666c 6167 7320 666c 6167 2076 616c 7565 flags flag value\n-0018a500: 2074 6f20 616c 6c6f 7720 7365 6c66 2d73 to allow self-s\n-0018a510: 6967 6e65 6420 616e 6420 6578 7069 7265 igned and expire\n-0018a520: 6420 6365 7274 6966 6963 6174 6573 2061 d certificates a\n-0018a530: 6e64 2074 686f 7365 2077 6974 686f 7574 nd those without\n-0018a540: 2043 524c 2074 6f20 6265 2075 2e2e 2e3c CRL to be u...<\n-0018a550: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0018a570: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0018a580: 6170 322e 683a 3538 3332 3c2f 6469 763e ap2.h:5832
    \n-0018a590: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    For systems bas\n-0018a5c0: 6564 206f 6e20 4d69 6372 6f73 6f66 7420 ed on Microsoft \n-0018a5d0: 7769 6e64 6f77 732c 2074 6865 2057 696e windows, the Win\n-0018a5e0: 496e 6574 206d 6f64 756c 6520 6361 6e20 Inet module can \n-0018a5f0: 6265 2075 7365 6420 696e 7374 6561 642c be used instead,\n-0018a600: 2073 6565 203c 636f 6465 3e6d 6f64 5f67 see mod_g\n-0018a610: 736f 6170 2f67 736f 6170 5f77 696e 2f77 soap/gsoap_win/w\n-0018a620: 696e 696e 6574 3c2f 636f 6465 3e2e 3c2f ininet..

    Since rele\n-0018a640: 6173 6520 7665 7273 696f 6e20 322e 382e ase version 2.8.\n-0018a650: 3230 2053 534c 2076 3320 6973 2064 6973 20 SSL v3 is dis\n-0018a660: 6162 6c65 642e 2054 6f20 656e 6162 6c65 abled. To enable\n-0018a670: 2053 534c 2076 3320 746f 6765 7468 6572 SSL v3 together\n-0018a680: 2077 6974 6820 544c 5320 312e 3020 616e with TLS 1.0 an\n-0018a690: 6420 6869 6768 6572 2c20 7573 6520 3c63 d higher, use #SOAP_SSLv3_\n-0018a6b0: 544c 5376 313c 2f63 6f64 653e 2077 6974 TLSv1 wit\n-0018a6c0: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap_\n-0018a750: 7373 6c5f 7365 7276 6572 5f63 6f6e 7465 ssl_server_conte\n-0018a760: 7874 3c2f 613e 3c2f 636f 6465 3e2e 2054 xt. T\n-0018a770: 6f20 7573 6520 544c 5320 312e 3120 616e o use TLS 1.1 an\n-0018a780: 6420 312e 3220 7573 6520 3c63 6f64 653e d 1.2 use \n-0018a790: 534f 4150 5f54 4c53 7631 5f31 207c 2053 SOAP_TLSv1_1 | S\n-0018a7a0: 4f41 505f 544c 5376 315f 323c 2f63 6f64 OAP_TLSv1_2. To use TLS 1\n-0018a7c0: 2e32 206f 6e6c 7920 7573 6520 3c63 6f64 .2 only use #SOAP_TLSv1_2<\n-0018a7e0: 2f63 6f64 653e 2e20 546f 2075 7365 2053 /code>. To use S\n-0018a7f0: 534c 2076 3320 6f6e 6c79 2075 7365 203c SL v3 only use <\n-0018a800: 636f 6465 3e23 534f 4150 5f53 534c 7633 code>#SOAP_SSLv3\n-0018a810: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

    .

    \n-0018a820: 546f 2064 6973 6162 6c65 2073 6572 7665 To disable serve\n-0018a830: 7220 6175 7468 656e 7469 6361 7469 6f6e r authentication\n-0018a840: 2066 6f72 2074 6573 7469 6e67 2070 7572 for testing pur\n-0018a850: 706f 7365 732c 2075 7365 2074 6865 2066 poses, use the f\n-0018a860: 6f6c 6c6f 7769 6e67 3a3c 2f70 3e0a 3c64 ollowing:

    .
    \n-0018a8b0: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap\n-0018a910: 5f73 736c 5f63 6c69 656e 745f 636f 6e74 _ssl_client_cont\n-0018a920: 6578 743c 2f61 3e28 2661 6d70 3b3c 6120 ext(&soap, .\n-0018a9f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL, .
    NULL, .
    NULL, .
    NULL, .
    NULL .
    ))
    \n-0018aab0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-0018aae0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0018aaf0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0018ab00: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-0018ab10: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-0018ab20: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-0018ab30: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-0018ab40: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n-0018ab80: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . \n-0018aba0: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n-0018abb0: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    .} \n-0018abd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0018ac80: 534f 4150 5f53 534c 5f4e 4f5f 4155 5448 SOAP_SSL_NO_AUTH\n-0018ac90: 454e 5449 4341 5449 4f4e 3c2f 613e 3c2f ENTICATION
    #define \n-0018acc0: 534f 4150 5f53 534c 5f4e 4f5f 4155 5448 SOAP_SSL_NO_AUTH\n-0018acd0: 454e 5449 4341 5449 4f4e 3c2f 6469 763e ENTICATION
    \n-0018ace0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    soap_ssl_flag\n-0018ad00: 7320 666c 6167 2076 616c 7565 2074 6f20 s flag value to \n-0018ad10: 6469 7361 626c 6520 6175 7468 656e 7469 disable authenti\n-0018ad20: 6361 7469 6f6e 206f 6620 7468 6520 7065 cation of the pe\n-0018ad30: 6572 3c2f 6469 763e 3c64 6976 2063 6c61 er
    De\n-0018ad50: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0018ad60: 6473 6f61 7032 2e68 3a35 3834 303c 2f64 dsoap2.h:5840
    .
    \n-0018ad80: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    where\n-0018aee0: 2c20 666f 7220 6578 616d 706c 653a 3c2f , for example:.

    void\n-0018af40: 2073 6967 7069 7065 5f68 616e 646c 6528 sigpipe_handle(\n-0018af50: 3c73 7061 6e20 636c 6173 733d 226b 6579 int x) { }.
    Warning\n-0018afc0: 3c2f 6474 3e3c 6464 3e49 7420 6973 2069
    It is i\n-0018afd0: 6d70 6f72 7461 6e74 2074 6861 7420 7468 mportant that th\n-0018afe0: 6520 3c63 6f64 653e 2357 4954 485f 4f50 e #WITH_OP\n-0018aff0: 454e 5353 4c3c 2f63 6f64 653e 206d 6163 ENSSL mac\n-0018b000: 726f 2069 7320 636f 6e73 6973 7465 6e74 ro is consistent\n-0018b010: 6c79 2064 6566 696e 6564 2074 6f20 636f ly defined to co\n-0018b020: 6d70 696c 6520 7468 6520 736f 7572 6365 mpile the source\n-0018b030: 732c 2073 7563 6820 6173 203c 656d 3e3c s, such as <\n-0018b040: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-0018b050: 6170 322e 6370 703c 2f63 6f64 653e 3c2f ap2.cpp, s\n-0018b070: 6f61 7043 2e63 7070 3c2f 636f 6465 3e3c oapC.cpp<\n-0018b080: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n-0018b090: 736f 6170 436c 6965 6e74 2e63 7070 3c2f soapClient.cpp, \n-0018b0b0: 3c63 6f64 653e 736f 6170 5365 7276 6572 soapServer\n-0018b0c0: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-0018b0d0: 2c20 616e 6420 616c 6c20 6170 706c 6963 , and all applic\n-0018b0e0: 6174 696f 6e20 736f 7572 6365 7320 7468 ation sources th\n-0018b0f0: 6174 2069 6e63 6c75 6465 203c 656d 3e3c at include <\n-0018b100: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-0018b110: 6170 322e 683c 2f63 6f64 653e 3c2f 656d ap2.h or s\n-0018b130: 6f61 7048 2e68 3c2f 636f 6465 3e3c 2f65 oapH.h. If the macro\n-0018b150: 7320 6172 6520 6e6f 7420 636f 6e73 6973 s are not consis\n-0018b160: 7465 6e74 6c79 2075 7365 642c 2074 6865 tently used, the\n-0018b170: 2061 7070 6c69 6361 7469 6f6e 2077 696c application wil\n-0018b180: 6c20 6372 6173 6820 6475 6520 746f 2061 l crash due to a\n-0018b190: 206d 6973 6d61 7463 6865 7320 696e 2074 mismatches in t\n-0018b1a0: 6865 2064 6563 6c61 7261 7469 6f6e 2061 he declaration a\n-0018b1b0: 6e64 2061 6363 6573 7320 6f66 2074 6865 nd access of the\n-0018b1c0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context. Alte\n-0018b230: 726e 6174 6976 656c 792c 2075 7365 206c rnatively, use l\n-0018b240: 6962 7261 7279 203c 623e 3c63 6f64 653e ibrary \n-0018b250: 2d6c 6773 6f61 7073 736c 3c2f 636f 6465 -lgsoapssl or -lgsoapssl++ and co\n-0018b290: 6d70 696c 6520 6576 6572 7974 6869 6e67 mpile everything\n-0018b2a0: 2065 6c73 6520 7769 7468 203c 636f 6465 else with #WITH_OPENSSL.
    .
    \n-0018b2d0: 0a43 6f6e 6375 7272 656e 7420 636c 6965 .Concurrent clie\n-0018b2e0: 6e74 2063 616c 6c73 2077 6974 6820 7468 nt calls with th\n-0018b2f0: 7265 6164 7320 7368 6f75 6c64 2075 7365 reads should use\n-0018b300: 2073 6570 6172 6174 6520 3c63 6f64 653e separate \n-0018b310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-0018b360: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-0018b370: 6578 7473 2049 6e20 6164 6469 7469 6f6e exts In addition\n-0018b380: 2c20 7468 6520 7468 7265 6164 2069 6e69 , the thread ini\n-0018b390: 7469 616c 697a 6174 696f 6e20 636f 6465 tialization code\n-0018b3a0: 2064 6973 6375 7373 6564 2069 6e20 5365 discussed in Se\n-0018b3b0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Secure Web s\n-0018b3f0: 6572 7669 6365 7320 7769 7468 2048 5454 ervices with HTT\n-0018b400: 5053 3c2f 613e 206d 7573 7420 6265 2075 PS must be u\n-0018b410: 7365 6420 746f 2070 726f 7065 726c 7920 sed to properly \n-0018b420: 7365 7475 7020 4f70 656e 5353 4c20 696e setup OpenSSL in\n-0018b430: 2061 206d 756c 7469 2d74 6872 6561 6465 a multi-threade\n-0018b440: 6420 636c 6965 6e74 2061 7070 6c69 6361 d client applica\n-0018b450: 7469 6f6e 2e3c 2f64 643e 3c2f 646c 3e0a tion.
    .\n-0018b460: 3c70 3e53 6565 2061 6c73 6f20 4150 4920

    See also API \n-0018b470: 646f 6375 6d65 6e74 6174 696f 6e20 4d6f documentation Mo\n-0018b480: 6475 6c65 203c 6120 636c 6173 733d 2265 dule SSL/TLS context\n-0018b4c0: 2061 6e64 2066 756e 6374 696f 6e73 3c2f and functions for more deta\n-0018b4e0: 696c 7320 6f6e 2074 6865 2053 534c 2f54 ils on the SSL/T\n-0018b4f0: 4c53 2066 756e 6374 696f 6e73 2e3c 2f70 LS functions..

    You can als\n-0018b510: 6f20 7573 6520 7468 6520 5769 6e49 6e65 o use the WinIne\n-0018b520: 7420 696e 7465 7266 6163 6520 746f 2065 t interface to e\n-0018b530: 7374 6162 6c69 7368 2073 6563 7572 6520 stablish secure \n-0018b540: 4854 5450 5320 636f 6e6e 6563 7469 6f6e HTTPS connection\n-0018b550: 7320 6f6e 2057 696e 646f 7773 206d 6163 s on Windows mac\n-0018b560: 6869 6e65 732c 2061 7661 696c 6162 6c65 hines, available\n-0018b570: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/mod_gsoa\n-0018b590: 703c 2f63 6f64 653e 3c2f 656d 3e20 6469 p di\n-0018b5a0: 7265 6374 6f72 7920 6f66 2074 6865 2067 rectory of the g\n-0018b5b0: 534f 4150 2073 6f75 7263 6520 636f 6465 SOAP source code\n-0018b5c0: 2070 6163 6b61 6765 2c20 7365 6520 616c package, see al\n-0018b5d0: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section The Win\n-0018b610: 496e 6574 2070 6c75 6769 6e3c 2f61 3e2e Inet plugin.\n-0018b620: 204f 7220 796f 7520 6361 6e20 7573 6520 Or you can use \n-0018b630: 7468 6520 4355 524c 2070 6c75 6769 6e20 the CURL plugin \n-0018b640: 746f 2075 7365 2043 5552 4c20 746f 2065 to use CURL to e\n-0018b650: 7374 6162 6c69 7368 2073 6563 7572 6520 stablish secure \n-0018b660: 4854 5450 5320 636f 6e6e 6563 7469 6f6e HTTPS connection\n-0018b670: 732c 2073 6565 2053 6563 7469 6f6e 203c s, see Section <\n-0018b680: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0018b690: 663d 2269 6e64 6578 2e68 746d 6c23 6375 f=\"index.html#cu\n-0018b6a0: 726c 706c 7567 696e 223e 5468 6520 4355 rlplugin\">The CU\n-0018b6b0: 524c 2070 6c75 6769 6e3c 2f61 3e2e 3c2f RL plugin..

    .... Back to t\n-0018b6e0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n-0018b6f0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    <\n-0018b730: 2f61 3e0a 5353 4c20 6175 7468 656e 7469 /a>.SSL authenti\n-0018b740: 6361 7469 6f6e 2063 616c 6c62 6163 6b73 cation callbacks\n-0018b750: 3c2f 6832 3e0a 3c70 3e54 6865 203c 636f

    .

    The fsslauth callback func\n-0018b780: 7469 6f6e 2063 6f6e 7472 6f6c 7320 4f70 tion controls Op\n-0018b790: 656e 5353 4c2f 474e 5554 4c53 2061 7574 enSSL/GNUTLS aut\n-0018b7a0: 6865 6e74 6963 6174 696f 6e20 696e 6974 hentication init\n-0018b7b0: 6961 6c69 7a61 7469 6f6e 3a3c 2f70 3e0a ialization:

    .\n-0018b7c0: 3c75 6c3e 0a3c 6c69 3e3c 636f 6465 3e69
    .
    ENGIN\n-0018e2b0: 4520 2a65 3b20 3c2f 6469 763e 0a3c 6469 E *e;
    . \n-0018e2d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!(e = ENGI\n-0018e300: 4e45 5f62 795f 6964 2865 6e67 696e 6529 NE_by_id(engine)\n-0018e310: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n-0018e330: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n-0018e340: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0018e360: 743b 4572 726f 7220 6669 6e64 696e 6720 t;Error finding \n-0018e370: 656e 6769 6e65 2025 735c 6e26 7175 6f74 engine %s\\n"\n-0018e380: 3b3c 2f73 7061 6e3e 2c20 656e 6769 6e65 ;, engine\n-0018e390: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    else if\n-0018e3f0: 3c2f 7370 616e 3e20 2821 454e 4749 4e45 (!ENGINE\n-0018e400: 5f73 6574 5f64 6566 6175 6c74 2865 2c20 _set_default(e, \n-0018e410: 454e 4749 4e45 5f4d 4554 484f 445f 414c ENGINE_METHOD_AL\n-0018e420: 4c29 2920 3c2f 6469 763e 0a3c 6469 7620 L))
    .
    \n-0018e440: 2066 7072 696e 7466 2873 7464 6572 722c fprintf(stderr,\n-0018e450: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0018e470: 6f74 3b45 7272 6f72 2075 7369 6e67 2065 ot;Error using e\n-0018e480: 6e67 696e 6520 2573 5c6e 2671 756f 743b ngine %s\\n"\n-0018e490: 3c2f 7370 616e 3e2c 2065 6e67 696e 6529 , engine)\n-0018e4a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    ...\n-0018e4c0: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-0018e4e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-0018e500: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The f\n-0018e520: 6f6c 6c6f 7769 6e67 2074 6162 6c65 206c ollowing table l\n-0018e530: 6973 7473 2074 6865 206e 616d 6573 206f ists the names o\n-0018e540: 6620 7468 6520 6861 7264 7761 7265 2061 f the hardware a\n-0018e550: 6e64 2073 6f66 7477 6172 6520 656e 6769 nd software engi\n-0018e560: 6e65 733a 3c2f 703e 0a3c 7461 626c 6520 nes:

    .
    value \n-001531c0: 3c2f 7468 3e3c 2f74 723e 0a3c 7472 2063
    type-documen\n-00153220: 7461 7469 6f6e 3c2f 636f 6465 3e20 2020 tation \n-00153230: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 text desc\n-00153260: 7269 6269 6e67 2074 6865 2073 6368 656d ribing the schem\n-00153270: 6120 7479 7065 2020 2020 3c2f 7464 3e3c a type
    t\n-001532d0: 7970 653c 2f63 6f64 653e 2020 203c 2f74 ype an alias for\n-00153310: 2074 6865 203c 636f 6465 3e74 7970 652d the type-\n-00153320: 646f 6375 6d65 6e74 6174 696f 6e3c 2f63 documentation property \n-00153340: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162
    ....\n-0018e650: 3c63 6f64 653e 6f70 656e 7373 6c3c 2f63 openssl <\n-0018e6d0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n-0018e740: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n-0018e890: 636f 6465 3e63 6869 6c3c 2f63 6f64 653e code>chil\n-0018e8a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....<\n-0018e9d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0018e9e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0018e9f0: 3e3c 636f 6465 3e6e 7572 6f6e 3c2f 636f >nuron .....<\n-0018ebb0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0018ebc0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-0018ebd0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-0018ec10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0018ec20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0018ec30: 3e53 7572 6557 6172 6520 6163 6365 6c65 >SureWare accele\n-0018ec40: 7261 7469 6f6e 2068 6172 6477 6172 6520 ration hardware \n-0018ec50: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 ..

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

    .

    \n-0018eca0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .SSL on Window\n-0018ecd0: 733c 2f68 323e 0a3c 703e 5365 7420 7468 s

    .

    Set th\n-0018ece0: 6520 6675 6c6c 2070 6174 6820 746f 203c e full path to <\n-0018ecf0: 656d 3e3c 636f 6465 3e6c 6962 7373 6c2e em>libssl.\n-0018ed00: 6c69 623c 2f63 6f64 653e 3c2f 656d 3e20 lib \n-0018ed10: 616e 6420 3c65 6d3e 3c63 6f64 653e 6c69 and li\n-0018ed20: 6263 7279 7074 6f2e 6c69 623c 2f63 6f64 bcrypto.lib under th\n-0018ed40: 6520 4d53 5643 2b2b 2022 5072 6f6a 6563 e MSVC++ \"Projec\n-0018ed50: 7473 2220 6d65 6e75 2c20 7468 656e 2063 ts\" menu, then c\n-0018ed60: 686f 6f73 6520 224c 696e 6b22 3a20 224f hoose \"Link\": \"O\n-0018ed70: 626a 6563 742f 4d6f 6475 6c65 7322 2e20 bject/Modules\". \n-0018ed80: 506c 6561 7365 206d 616b 6520 7375 7265 Please make sure\n-0018ed90: 203c 656d 3e3c 636f 6465 3e6c 6962 7373 libss\n-0018eda0: 6c33 322e 646c 6c3c 2f63 6f64 653e 3c2f l32.dll and libeay32.dll can b\n-0018ede0: 6520 6c6f 6164 6564 2062 7920 796f 7572 e loaded by your\n-0018edf0: 2061 7070 6c69 6361 7469 6f6e 732c 2074 applications, t\n-0018ee00: 6875 7320 7468 6579 206d 7573 7420 6265 hus they must be\n-0018ee10: 2069 6e73 7461 6c6c 6564 2070 726f 7065 installed prope\n-0018ee20: 726c 7920 6f6e 2074 6865 2074 6172 6765 rly on the targe\n-0018ee30: 7420 6d61 6368 696e 652e 3c2f 703e 0a3c t machine.

    .<\n-0018ee40: 703e 4966 2079 6f75 2772 6520 7573 696e p>If you're usin\n-0018ee50: 6720 636f 6d70 696c 6174 696f 6e20 7365 g compilation se\n-0018ee60: 7474 696e 6773 2073 7563 6820 6173 203c ttings such as <\n-0018ee70: 636f 6465 3e2f 4d54 643c 2f63 6f64 653e code>/MTd\n-0018ee80: 2074 6865 6e20 6c69 6e6b 2074 6f20 7468 then link to th\n-0018ee90: 6520 636f 7272 6563 7420 3c65 6d3e 3c63 e correct libeay32MTd.\n-0018eeb0: 6c69 623c 2f63 6f64 653e 3c2f 656d 3e20 lib
    \n-0018eec0: 616e 6420 3c65 6d3e 3c63 6f64 653e 7373 and ss\n-0018eed0: 6c65 6179 3332 4d54 642e 6c69 623c 2f63 leay32MTd.lib librar\n-0018eef0: 6965 732e 3c2f 703e 0a3c 703e 416c 7465 ies.

    .

    Alte\n-0018ef00: 726e 6174 6976 656c 792c 2079 6f75 2063 rnatively, you c\n-0018ef10: 616e 2075 7365 2074 6865 2057 696e 496e an use the WinIn\n-0018ef20: 6574 2069 6e74 6572 6661 6365 2066 6f72 et interface for\n-0018ef30: 2073 6563 7572 6520 636f 6e6e 6563 7469 secure connecti\n-0018ef40: 6f6e 732c 2061 7661 696c 6162 6c65 2069 ons, available i\n-0018ef50: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n-0018ef60: 6773 6f61 702f 6d6f 645f 6773 6f61 703c gsoap/mod_gsoap<\n-0018ef70: 2f63 6f64 653e 3c2f 656d 3e20 6469 7265 /code> dire\n-0018ef80: 6374 6f72 7920 6f66 2074 6865 2067 534f ctory of the gSO\n-0018ef90: 4150 2070 6163 6b61 6765 2c20 7365 6520 AP package, see \n-0018efa0: 616c 736f 2053 6563 7469 6f6e 203c 6120 also Section The W\n-0018efe0: 696e 496e 6574 2070 6c75 6769 6e3c 2f61 inInet plugin. Or you can us\n-0018f000: 6520 7468 6520 4355 524c 2070 6c75 6769 e the CURL plugi\n-0018f010: 6e20 746f 2075 7365 2043 5552 4c20 666f n to use CURL fo\n-0018f020: 7220 7365 6375 7265 2063 6f6e 6e65 6374 r secure connect\n-0018f030: 696f 6e73 2c20 7365 6520 5365 6374 696f ions, see Sectio\n-0018f040: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n The\n-0018f070: 2043 5552 4c20 706c 7567 696e 3c2f 613e CURL plugin\n-0018f080: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-0018f0c0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Zlib com\n-0018f0f0: 7072 6573 7369 6f6e 3c2f 6832 3e0a 3c70 pression

    .To enable defla\n-0018f110: 7465 2061 6e64 2067 7a69 7020 636f 6d70 te and gzip comp\n-0018f120: 7265 7373 696f 6e20 7769 7468 205a 6c69 ression with Zli\n-0018f130: 622c 2069 6e73 7461 6c6c 205a 6c69 6220 b, install Zlib \n-0018f140: 6672 6f6d 203c 6120 6872 6566 3d22 6874 from .
    \n+000e9aa0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9ab0: 2020 2020 2020 2020 2020 2020 207e 7369 ~si\n+000e9ac0: 6d70 6c65 5f76 6563 746f 7228 2920 2020 mple_vector() \n+000e9ad0: 2020 207b 203c 7370 616e 2063 6c61 7373 { i\n+000e9af0: 663c 2f73 7061 6e3e 2028 6865 6164 2920 f (head) \n+000e9b00: 3c73 7061 6e20 636c 6173 733d 226b 6579 delete[] head; } .
    void\n+000e9b70: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9b80: 2020 2020 2020 2020 2020 2020 636c 6561 clea\n+000e9b90: 7228 2920 2020 2020 2020 2020 2020 2020 r() \n+000e9ba0: 2020 7b20 7461 696c 203d 2068 6561 643b { tail = head;\n+000e9bb0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    /* the member \n+000e9bf0: 6675 6e63 7469 6f6e 7320 6265 6c6f 7720 functions below \n+000e9c00: 6172 6520 7265 7175 6972 6564 2066 6f72 are required for\n+000e9c10: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n+000e9c20: 6620 7465 6d70 6c61 7465 7320 2a2f 3c2f f templates */
    . \n+000e9c50: 2020 2069 7465 7261 746f 7220 2020 2020 iterator \n+000e9c60: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9c70: 2020 2062 6567 696e 2829 2020 2020 2020 begin() \n+000e9c80: 2020 2020 2020 2020 207b 203c 7370 616e { return head; } .
    const_it\n+000e9ce0: 6572 6174 6f72 2020 2020 2020 2020 2020 erator \n+000e9cf0: 2020 2020 2020 2020 6265 6769 6e28 293c begin()<\n+000e9d00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e9d10: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord\"> const { r\n+000e9d40: 6574 7572 6e3c 2f73 7061 6e3e 2068 6561 eturn hea\n+000e9d50: 643b 207d 203c 2f64 6976 3e0a 3c64 6976 d; }
    . \n+000e9d70: 2020 6974 6572 6174 6f72 2020 2020 2020 iterator \n+000e9d80: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9d90: 2020 656e 6428 2920 2020 2020 2020 2020 end() \n+000e9da0: 2020 2020 2020 2020 7b20 3c73 7061 6e20 { return tail; }
    \n+000e9de0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const_ite\n+000e9e00: 7261 746f 7220 2020 2020 2020 2020 2020 rator \n+000e9e10: 2020 2020 2020 2065 6e64 2829 3c73 7061 end() const \n+000e9e40: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu\n+000e9e60: 726e 3c2f 7370 616e 3e20 7461 696c 3b20 rn tail; \n+000e9e70: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    <\n+000e9e90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e9ea0: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+000e9eb0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> \n+000e9ec0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9ed0: 7369 7a65 2829 3c73 7061 6e20 636c 6173 size() con\n+000e9ef0: 7374 203c 2f73 7061 6e3e 7b20 3c73 7061 st { return tail - head;\n+000e9f30: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n+000e9f50: 6974 6572 6174 6f72 2020 2020 2020 2020 iterator \n+000e9f60: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9f70: 696e 7365 7274 2869 7465 7261 746f 7220 insert(iterator \n+000e9f80: 706f 732c 2063 6f6e 7374 5f72 6566 6572 pos, const_refer\n+000e9f90: 656e 6365 2076 616c 2920 3c2f 6469 763e ence val)
    \n+000e9fa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n+000e9fc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e9fd0: 3e20 2020 2020 203c 7370 616e 2063 6c61 > if (!hea\n+000ea000: 6429 203c 2f64 6976 3e0a 3c64 6976 2063 d) .
    \n+000ea020: 2020 2020 6865 6164 203d 2074 6169 6c20 head = tail \n+000ea030: 3d20 3c73 7061 6e20 636c 6173 733d 226b = new value_type[ca\n+000ea060: 7061 6369 7479 203d 2031 5d3b 203c 2f64 pacity = 1]; .
    else if (tail >\n+000ea0e0: 3d20 6865 6164 202b 2063 6170 6163 6974 = head + capacit\n+000ea0f0: 7929 203c 2f64 6976 3e0a 3c64 6976 2063 y)
    .
    \n+000ea110: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+000ea130: 2020 2020 6974 6572 6174 6f72 2069 203d iterator i =\n+000ea140: 2068 6561 643b 203c 2f64 6976 3e0a 3c64 head;
    .\n+000ea160: 2020 2020 2020 2020 6974 6572 6174 6f72 iterator\n+000ea170: 206a 203d 203c 7370 616e 2063 6c61 7373 j = new value_type\n+000ea1a0: 5b63 6170 6163 6974 7920 2a3d 2032 5d3b [capacity *= 2];\n+000ea1b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+000ea1d0: 2020 6974 6572 6174 6f72 206b 203d 206a iterator k = j\n+000ea1e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+000ea200: 2020 203c 7370 616e 2063 6c61 7373 3d22 whi\n+000ea220: 6c65 3c2f 7370 616e 3e20 2869 2026 6c74 le (i <\n+000ea230: 3b20 7461 696c 2920 3c2f 6469 763e 0a3c ; tail)
    .<\n+000ea240: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea250: 3e20 2020 2020 2020 2020 202a 6b2b 2b20 > *k++ \n+000ea260: 3d20 2a69 2b2b 3b20 3c2f 6469 763e 0a3c = *i++; .<\n+000ea270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea280: 3e20 2020 2020 2020 203c 7370 616e 2063 > if (po\n+000ea2b0: 7329 203c 2f64 6976 3e0a 3c64 6976 2063 s) .
    \n+000ea2d0: 2020 2020 2020 706f 7320 3d20 6a20 2b20 pos = j + \n+000ea2e0: 2870 6f73 202d 2068 6561 6429 3b20 3c2f (pos - head); .
    t\n+000ea310: 6169 6c20 3d20 6a20 2b20 2874 6169 6c20 ail = j + (tail \n+000ea320: 2d20 6865 6164 293b 203c 2f64 6976 3e0a - head);
    .\n+000ea330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+000ea360: 6465 6c65 7465 3c2f 7370 616e 3e5b 5d20 delete[] \n+000ea370: 6865 6164 3b20 3c2f 6469 763e 0a3c 6469 head;
    . \n+000ea390: 2020 2020 2020 2068 6561 6420 3d20 6a3b head = j;\n+000ea3a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+000ea3c0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    \n+000ea3e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (pos &&\n+000ea410: 616d 703b 2070 6f73 2026 6774 3b3d 2068 amp; pos >= h\n+000ea420: 6561 6420 2661 6d70 3b26 616d 703b 2070 ead && p\n+000ea430: 6f73 2026 6c74 3b20 7461 696c 2920 3c2f os < tail) .
    {.
    i\n+000ea480: 7465 7261 746f 7220 6920 3d20 7461 696c terator i = tail\n+000ea490: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+000ea4b0: 2020 2069 7465 7261 746f 7220 6a20 3d20 iterator j = \n+000ea4c0: 6920 2d20 313b 203c 2f64 6976 3e0a 3c64 i - 1;
    .\n+000ea4e0: 2020 2020 2020 2020 3c73 7061 6e20 636c while (\n+000ea510: 6a20 213d 2070 6f73 2920 3c2f 6469 763e j != pos)
    \n+000ea520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    *i\n+000ea540: 2d2d 203d 202a 6a2d 2d3b 203c 2f64 6976 -- = *j--; .
    *pos\n+000ea570: 203d 2076 616c 3b20 3c2f 6469 763e 0a3c = val;
    .<\n+000ea580: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea590: 3e20 2020 2020 207d 203c 2f64 6976 3e0a > }
    .\n+000ea5a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    else .
    {.
    p\n+000ea620: 6f73 203d 2074 6169 6c3b 203c 2f64 6976 os = tail; .
    *tai\n+000ea650: 6c2b 2b20 3d20 7661 6c3b 203c 2f64 6976 l++ = val; .
    } .
    return pos;
    .<\n+000ea6d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea6e0: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    .\n+000ea700: 2020 2020 7369 6d70 6c65 5f76 6563 746f simple_vecto\n+000ea710: 7226 616d 703b 206f 7065 7261 746f 723d r& operator=\n+000ea720: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const simple_vecto\n+000ea750: 7226 616d 703b 2076 2920 3c2f 6469 763e r& v)
    \n+000ea760: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n+000ea780: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea790: 3e20 2020 2020 2068 6561 6420 3d20 7461 > head = ta\n+000ea7a0: 696c 203d 204e 554c 4c3b 203c 2f64 6976 il = NULL; .
    capaci\n+000ea7d0: 7479 203d 2076 2e63 6170 6163 6974 793b ty = v.capacity;\n+000ea7e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+000ea800: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (v.head) .
    {.
    he\n+000ea870: 6164 203d 2074 6169 6c20 3d20 3c73 7061 ad = tail = new val\n+000ea8a0: 7565 5f74 7970 655b 6361 7061 6369 7479 ue_type[capacity\n+000ea8b0: 5d3b 203c 2f64 6976 3e0a 3c64 6976 2063 ];
    .
    \n+000ea8d0: 2020 2020 6974 6572 6174 6f72 2069 203d iterator i =\n+000ea8e0: 2076 2e68 6561 643b 203c 2f64 6976 3e0a v.head;
    .\n+000ea8f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    while\n+000ea930: 2028 6920 213d 2076 2e74 6169 6c29 203c (i != v.tail) <\n+000ea940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+000ea960: 2020 2a74 6169 6c2b 2b20 3d20 2a69 2b2b *tail++ = *i++\n+000ea970: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+000ea990: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n+000ea9b0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+000ea9d0: 726e 3c2f 7370 616e 3e20 2a3c 7370 616e rn *this; .
    } .
    };
    .<\n+000eaa40: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    To enab\n+000eaa60: 6c65 2074 6865 2063 6f6e 7461 696e 6572 le the container\n+000eaa70: 2c20 7765 2061 6464 2074 6865 2066 6f6c , we add the fol\n+000eaa80: 6c6f 7769 6e67 2074 776f 206c 696e 6573 lowing two lines\n+000eaa90: 2074 6f20 7468 6520 696e 7465 7266 6163 to the interfac\n+000eaaa0: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n+000eaab0: 7220 736f 6170 6370 7032 3a3c 2f70 3e0a r soapcpp2:

    .\n+000eaac0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n+000eab10: 743b 7369 6d70 6c65 5665 6374 6f72 2e68 t;simpleVector.h\n+000eab20: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    tem\n+000eab60: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate <\n+000eab70: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;class T> \n+000eabb0: 636c 6173 7320 3c2f 7370 616e 3e73 696d class sim\n+000eabc0: 706c 6556 6563 746f 723b 3c2f 6469 763e pleVector;
    \n+000eabd0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The c\n+000eabf0: 6f6e 7461 696e 6572 2063 6c61 7373 2069 ontainer class i\n+000eac00: 7473 656c 6620 7368 6f75 6c64 206e 6f74 tself should not\n+000eac10: 2062 6520 6465 6669 6e65 6420 696e 2074 be defined in t\n+000eac20: 6865 2069 6e74 6572 6661 6365 2068 6561 he interface hea\n+000eac30: 6465 7220 6669 6c65 2c20 6f6e 6c79 2074 der file, only t\n+000eac40: 6865 2074 656d 706c 6174 6520 6465 636c he template decl\n+000eac50: 6172 6174 696f 6e20 7375 6666 6963 6573 aration suffices\n+000eac60: 2066 6f72 2073 6f61 7063 7070 3220 746f for soapcpp2 to\n+000eac70: 2067 656e 6572 6174 6520 7365 7269 616c generate serial\n+000eac80: 697a 6572 732e 2052 6563 616c 6c20 7468 izers. Recall th\n+000eac90: 6174 2074 6865 203c 636f 6465 3e23 696e at the #in\n+000eaca0: 636c 7564 653c 2f63 6f64 653e 2064 6972 clude dir\n+000eacb0: 6563 7469 7665 7320 6172 6520 6e6f 7420 ectives are not \n+000eacc0: 6578 6563 7574 6564 2062 7920 736f 6170 executed by soap\n+000eacd0: 6370 7032 2062 7574 2073 696d 706c 7920 cpp2 but simply \n+000eace0: 7061 7373 6564 206f 6e20 746f 2074 6865 passed on to the\n+000eacf0: 2067 656e 6572 6174 6564 2073 6f75 7263 generated sourc\n+000ead00: 6520 636f 6465 2e20 5468 6973 2069 6e63 e code. This inc\n+000ead10: 6c75 6465 2073 7065 6369 6669 6573 2069 lude specifies i\n+000ead20: 6e20 7468 6520 6765 6e65 7261 7465 6420 n the generated \n+000ead30: 736f 7572 6365 2063 6f64 6520 7768 6572 source code wher\n+000ead40: 6520 7468 6520 636f 6e74 6169 6e65 7220 e the container \n+000ead50: 6973 2061 6374 7561 6c6c 7920 6465 6669 is actually defi\n+000ead60: 6e65 642e 3c2f 703e 0a3c 703e f09f 949d ned.

    .

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

    .<\n+000eada0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>
    \n+000eadd0: 0a50 6f6c 796d 6f72 7068 6963 2064 796e .Polymorphic dyn\n+000eade0: 616d 6963 2061 7272 6179 7320 616e 6420 amic arrays and \n+000eadf0: 6c69 7374 733c 2f68 333e 0a3c 703e 506f lists.

    Po\n+000eae00: 6c79 6d6f 7270 6869 6320 6172 7261 7973 lymorphic arrays\n+000eae10: 2c20 7468 6174 2069 732c 2061 7272 6179 , that is, array\n+000eae20: 7320 6f66 2076 616c 7565 7320 6f66 2061 s of values of a\n+000eae30: 6e79 2074 7970 652c 2063 616e 2062 6520 ny type, can be \n+000eae40: 7365 7269 616c 697a 6564 2069 6e20 584d serialized in XM\n+000eae50: 4c20 7768 656e 2064 6563 6c61 7265 6420 L when declared \n+000eae60: 6173 2061 6e20 6172 7261 7920 6f66 2070 as an array of p\n+000eae70: 6f69 6e74 6572 7320 746f 2061 2062 6173 ointers to a bas\n+000eae80: 6520 636c 6173 732e 2046 6f72 2065 7861 e class. For exa\n+000eae90: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    \n+000eaeb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    class ns__Object \n+000eaef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { public: \n+000eaf30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n+000eaf50: 203c 7370 616e 2063 6c61 7373 3d22 636f // member\n+000eaf70: 7320 6f66 206e 735f 5f4f 626a 6563 743c s of ns__Object<\n+000eaf80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+000eafa0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    class ns\n+000eafe0: 5f5f 4461 7461 203a 203c 7370 616e 2063 __Data : p\n+000eb000: 7562 6c69 633c 2f73 7061 6e3e 206e 735f ublic ns_\n+000eb010: 5f4f 626a 6563 7420 3c2f 6469 763e 0a3c _Object
    .<\n+000eb020: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000eb030: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n+000eb050: 2f73 7061 6e3e 3a20 3c2f 6469 763e 0a3c /span>:
    .<\n+000eb060: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000eb070: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n+000eb090: 2f20 6d65 6d62 6572 7320 6f66 206e 735f / members of ns_\n+000eb0a0: 5f44 6174 613c 2f73 7061 6e3e 3c2f 6469 _Data.
    };
    .<\n+000eb0d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000eb0e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >class ArrayOfObjec\n+000eb110: 7420 3c2f 6469 763e 0a3c 6469 7620 636c t
    .
    { public\n+000eb150: 3a20 3c2f 6469 763e 0a3c 6469 7620 636c :
    .
    n\n+000eb170: 735f 5f4f 626a 6563 7420 2a2a 5f5f 7074 s__Object **__pt\n+000eb180: 723b 203c 7370 616e 2063 6c61 7373 3d22 r; // poin\n+000eb1a0: 7465 7220 746f 2061 7272 6179 206f 6620 ter to array of \n+000eb1b0: 706f 696e 7465 7273 2074 6f20 6261 7365 pointers to base\n+000eb1c0: 206f 7220 6465 7269 7665 6420 6f62 6a65 or derived obje\n+000eb1d0: 6374 7320 3c2f 7370 616e 3e3c 2f64 6976 cts .
    int __s\n+000eb220: 697a 653b 2020 2020 2020 2020 203c 7370 ize; // size of th\n+000eb250: 6520 6172 7261 793c 2f73 7061 6e3e 3c2f e array.
    };
    \n+000eb280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    class <\n+000eb2b0: 2f73 7061 6e3e 6e73 5f5f 4f62 6a65 6374 /span>ns__Object\n+000eb2c0: 7320 3c2f 6469 763e 0a3c 6469 7620 636c s
    .
    { public\n+000eb300: 3a20 3c2f 6469 763e 0a3c 6469 7620 636c :
    .
    s\n+000eb320: 7464 3a3a 7665 6374 6f72 266c 743b 6e73 td::vector<ns\n+000eb330: 5f5f 4f62 6a65 6374 2667 743b 206f 626a __Object> obj\n+000eb340: 6563 7473 3b20 3c73 7061 6e20 636c 6173 ects; // v\n+000eb360: 6563 746f 7220 6f66 2062 6173 6520 6f72 ector of base or\n+000eb370: 2064 6572 6976 6564 206f 626a 6563 7473 derived objects\n+000eb380: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000eb390: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000eb3a0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    \n+000eb3b0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This exam\n+000ebc20: 706c 6520 7573 6573 2061 6e20 2269 6e76 ple uses an \"inv\n+000ebc30: 6973 6962 6c65 2220 7479 7065 203c 636f isible\" type __wrapper and member <\n+000ebc60: 636f 6465 3e5f 5f61 7272 6179 3c2f 636f code>__array, which start\n+000ebc80: 2077 6974 6820 6120 646f 7562 6c65 2075 with a double u\n+000ebc90: 6e64 6572 7363 6f72 652e 2054 6865 7365 nderscore. These\n+000ebca0: 206e 616d 6573 2061 7265 206e 6576 6572 names are never\n+000ebcb0: 2076 6973 6962 6c65 2069 6e20 7365 7269 visible in seri\n+000ebcc0: 616c 697a 6564 2058 4d4c 2e20 5468 6520 alized XML. The \n+000ebcd0: 3c63 6f64 653e 5f5f 7479 7065 3c2f 636f __type member of __wrapper is a \n+000ebd10: 534f 4150 5f54 5950 455f 543c 2f63 6f64 SOAP_TYPE_T value that id\n+000ebd30: 656e 7469 6669 6573 2074 6865 2074 7970 entifies the typ\n+000ebd40: 6520 3c63 6f64 653e 543c 2f63 6f64 653e e T\n+000ebd50: 2074 6861 7420 3c63 6f64 653e 5f5f 6974 that __it\n+000ebd60: 656d 3c2f 636f 6465 3e20 706f 696e 7473 em points\n+000ebd70: 2074 6f2c 2073 6565 2053 6563 7469 6f6e to, see Section\n+000ebd80: 203c 6120 636c 6173 733d 2265 6c22 2068 Void point\n+000ebdb0: 6572 2073 6572 6961 6c69 7a61 7469 6f6e er serialization\n+000ebdc0: 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 9f94 .

    .

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

    .\n+000ebe00: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .How t\n+000ebe30: 6f20 6368 616e 6765 2074 6865 2074 6167 o change the tag\n+000ebe40: 206e 616d 6573 206f 6620 6172 7261 7920 names of array \n+000ebe50: 6974 656d 2065 6c65 6d65 6e74 733c 2f68 item elements.

    The defaul\n+000ebe70: 7420 584d 4c20 656c 656d 656e 7420 7461 t XML element ta\n+000ebe80: 6720 6e61 6d65 2066 6f72 2061 7272 6179 g name for array\n+000ebe90: 2065 6c65 6d65 6e74 7320 6973 203c 656d elements is item, which c\n+000ebec0: 616e 2062 6520 6368 616e 6765 642e 2054 an be changed. T\n+000ebed0: 6865 203c 636f 6465 3e5f 5f70 7472 3c2f he __ptr member in \n+000ebef0: 6120 7374 7275 6374 206f 7220 636c 6173 a struct or clas\n+000ebf00: 7320 6f66 2061 2064 796e 616d 6963 2061 s of a dynamic a\n+000ebf10: 7272 6179 206d 6179 2068 6176 6520 616e rray may have an\n+000ebf20: 206f 7074 696f 6e61 6c20 7375 6666 6978 optional suffix\n+000ebf30: 2070 6172 7420 7468 6174 2073 7065 6369 part that speci\n+000ebf40: 6669 6573 2074 6865 206e 616d 6520 6f66 fies the name of\n+000ebf50: 2074 6865 2065 6c65 6d65 6e74 2074 6167 the element tag\n+000ebf60: 2069 6e20 584d 4c2e 2054 6861 7420 6973 in XML. That is\n+000ebf70: 2c20 7468 6520 7375 6666 6978 2069 7320 , the suffix is \n+000ebf80: 7061 7274 206f 6620 7468 6520 3c63 6f64 part of the __ptr m\n+000ebfa0: 656d 6265 7220 6e61 6d65 3a3c 2f70 3e0a ember name:

    .\n+000ebfb0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    Type *__\n+000ebfe0: 7074 7261 7272 6179 5f65 6c74 5f6e 616d ptrarray_elt_nam\n+000ebff0: 653c 2f64 6976 3e0a 3c2f 6469 763e 3c21 e
    .
    <\n+000ec010: 703e 436f 6e73 6964 6572 2066 6f72 2065 p>Consider for e\n+000ec020: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

    .
    struct\n+000ec070: 203c 2f73 7061 6e3e 4172 7261 794f 6673 ArrayOfs\n+000ec080: 7472 696e 6720 3c2f 6469 763e 0a3c 6469 tring
    .{\n+000ec0a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

    .
    char* *__ptrstring\n+000ec0f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    int __size;
    \n+000ec140: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    The array \n+000ec180: 6973 2073 6572 6961 6c69 7a65 6420 6173 is serialized as\n+000ec190: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    \n+000ec1d0: 266c 743b 3c73 7061 6e20 636c 6173 733d <SO\n+000ec1f0: 4150 2d45 4e43 3a41 7272 6179 3c2f 7370 AP-ENC:Array SOAP-E\n+000ec220: 4e43 3a61 7272 6179 5479 7065 3c2f 7370 NC:arrayType=\n+000ec250: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string\n+000ec260: 5b32 5d26 7175 6f74 3b3c 2f73 7061 6e3e [2]"\n+000ec270: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    . \n+000ec290: 266c 743b 3c73 7061 6e20 636c 6173 733d <st\n+000ec2b0: 7269 6e67 3c2f 7370 616e 3e26 6774 3b3c ring><\n+000ec2c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000ec2d0: 6f72 6422 3e48 656c 6c6f 3c2f 7370 616e ord\">Hello</\n+000ec300: 7374 7269 6e67 3c2f 7370 616e 3e26 6774 string>\n+000ec310: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+000ec330: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;strin\n+000ec350: 673c 2f73 7061 6e3e 2667 743b 3c73 7061 g>World&l\n+000ec380: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/str\n+000ec3a0: 696e 673c 2f73 7061 6e3e 2667 743b 203c ing> <\n+000ec3b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    </SOAP-ENC:\n+000ec3f0: 4172 7261 793c 2f73 7061 6e3e 2667 743b Array>\n+000ec400: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    <\n+000ec420: 2f64 6976 3e3c 703e 534f 4150 2031 2e31 /div>

    SOAP 1.1\n+000ec430: 2f31 2e32 2064 6f65 7320 6e6f 7420 6d61 /1.2 does not ma\n+000ec440: 6e64 6174 6520 6120 7370 6563 6966 6963 ndate a specific\n+000ec450: 2074 6167 206e 616d 6520 666f 7220 534f tag name for SO\n+000ec460: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array\n+000ec470: 2065 6c65 6d65 6e74 7320 616e 6420 7468 elements and th\n+000ec480: 6520 736f 6170 6370 7032 2d67 656e 6572 e soapcpp2-gener\n+000ec490: 6174 6564 2073 6572 6961 6c69 7a65 7273 ated serializers\n+000ec4a0: 2077 696c 6c20 6967 6e6f 7265 2074 6865 will ignore the\n+000ec4b0: 206e 616d 6520 7573 6564 2074 6f20 6974 name used to it\n+000ec4c0: 656d 697a 6520 534f 4150 2d65 6e63 6f64 emize SOAP-encod\n+000ec4d0: 6564 2061 7272 6179 2076 616c 7565 732e ed array values.\n+000ec4e0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+000ec520: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+000ec530: 2069 643d 2262 6173 6536 3462 696e 6172 id=\"base64binar\n+000ec540: 7922 3e3c 2f61 3e0a 6261 7365 3634 4269 y\">.base64Bi\n+000ec550: 6e61 7279 2073 6572 6961 6c69 7a61 7469 nary serializati\n+000ec560: 6f6e 3c2f 6832 3e0a 3c70 3e54 6865 203c on

    .

    The <\n+000ec570: 656d 3e3c 636f 6465 3e62 6173 6536 3442 em>base64B\n+000ec580: 696e 6172 793c 2f63 6f64 653e 3c2f 656d inary XSD type is in\n+000ec5a0: 7472 6f64 7563 6564 2069 6e20 616e 2069 troduced in an i\n+000ec5b0: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+000ec5c0: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n+000ec5d0: 3220 7573 696e 6720 6120 7374 7275 6374 2 using a struct\n+000ec5e0: 206f 7220 636c 6173 7320 7468 6174 2063 or class that c\n+000ec5f0: 6f6e 7461 696e 7320 616e 2061 7272 6179 ontains an array\n+000ec600: 206f 6620 3c63 6f64 653e 756e 7369 676e of unsign\n+000ec610: 6564 2063 6861 723c 2f63 6f64 653e 2076 ed char v\n+000ec620: 616c 7565 733a 3c2f 703e 0a3c 6469 7620 alues:

    .
    .
    {.
    unsigned c\n+000ec740: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *__ptr; \n+000ec7b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n+000ec870: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .
    <\n+000ec880: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000ec890: 3c70 3e54 6865 2061 6476 616e 7461 6765

    The advantage\n+000ec8a0: 206f 6620 7468 6973 2073 7472 7563 7420 of this struct \n+000ec8b0: 6f72 2063 6c61 7373 2069 7320 7468 6520 or class is the \n+000ec8c0: 6162 696c 6974 7920 746f 2073 6572 6961 ability to seria\n+000ec8d0: 6c69 7a65 7220 7261 7720 6269 6e61 7279 lizer raw binary\n+000ec8e0: 2064 6174 6120 6672 6f6d 206d 656d 6f72 data from memor\n+000ec8f0: 792c 2073 696e 6365 2074 6865 2073 6f61 y, since the soa\n+000ec900: 7063 7070 322d 6765 6e65 7261 7465 6420 pcpp2-generated \n+000ec910: 7365 7269 616c 697a 6572 2063 6f6e 7665 serializer conve\n+000ec920: 7274 7320 7468 6520 6269 6e61 7279 2064 rts the binary d\n+000ec930: 6174 6120 746f 2f66 726f 6d20 6261 7365 ata to/from base\n+000ec940: 3634 2069 6e20 584d 4c2e 3c2f 703e 0a3c 64 in XML.

    .<\n+000ec950: 703e 546f 2069 6e74 726f 6475 6365 2061 p>To introduce a\n+000ec960: 206e 6577 2058 4d4c 2073 6368 656d 6120 new XML schema \n+000ec970: 7479 7065 2064 6572 6976 6564 2066 726f type derived fro\n+000ec980: 6d20 3c65 6d3e 3c63 6f64 653e 6261 7365 m base\n+000ec990: 3634 4269 6e61 7279 3c2f 636f 6465 3e3c 64Binary<\n+000ec9a0: 2f65 6d3e 2075 7365 2074 6865 2073 616d /em> use the sam\n+000ec9b0: 6520 7374 7275 6374 206f 7220 636c 6173 e struct or clas\n+000ec9c0: 7320 7374 7275 6374 7572 652c 2062 7574 s structure, but\n+000ec9d0: 2077 6974 6820 616e 6f74 6865 7220 6e61 with another na\n+000ec9e0: 6d65 2e20 466f 7220 6578 616d 706c 653a me. For example:\n+000ec9f0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct ns__binary.
    {
    . \n+000eca80: 2020 3c73 7061 6e20 636c 6173 733d 226b unsi\n+000ecaa0: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned char *__ptr;
    \n+000ecae0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int __si\n+000ecb20: 7a65 3b20 3c2f 6469 763e 0a3c 6469 7620 ze;
    .
    };<\n+000ecb40: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+000ecb60: 5468 6520 7265 7375 6c74 696e 6720 584d The resulting XM\n+000ecb70: 4c20 7363 6865 6d61 2074 7970 6520 6973 L schema type is\n+000ecb80: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    \n+000ecbc0: 266c 743b 3c73 7061 6e20 636c 6173 733d <si\n+000ecbe0: 6d70 6c65 5479 7065 3c2f 7370 616e 3e20 mpleType \n+000ecbf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n+000ecc30: 756f 743b 6269 6e61 7279 2671 756f 743b uot;binary"\n+000ecc40: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    <restriction<\n+000ecc90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bas\n+000eccb0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:b\n+000ecce0: 6173 6536 3442 696e 6172 7926 7175 6f74 ase64Binary"\n+000eccf0: 3b3c 2f73 7061 6e3e 2667 743b 3c2f 6469 ;>.
    </restrictio\n+000ecd40: 6e3c 2f73 7061 6e3e 2667 743b 3c2f 6469 n>.
    </simpleType>
    .\n+000ecda0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    .... Back to table \n+000ecde0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n+000ecdf0: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .he\n+000ece20: 7842 696e 6172 7920 7365 7269 616c 697a xBinary serializ\n+000ece30: 6174 696f 6e3c 2f68 323e 0a3c 703e 5468 ation

    .

    Th\n+000ece40: 6520 3c65 6d3e 3c63 6f64 653e 6261 7365 e base\n+000ece50: 3634 4269 6e61 7279 3c2f 636f 6465 3e3c 64Binary<\n+000ece60: 2f65 6d3e 2058 5344 2074 7970 6520 6973 /em> XSD type is\n+000ece70: 2069 6e74 726f 6475 6365 6420 696e 2061 introduced in a\n+000ece80: 6e20 696e 7465 7266 6163 6520 6865 6164 n interface head\n+000ece90: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap\n+000ecea0: 6370 7032 2075 7369 6e67 2061 2073 7472 cpp2 using a str\n+000eceb0: 7563 7420 6f72 2063 6c61 7373 2074 6861 uct or class tha\n+000ecec0: 7420 636f 6e74 6169 6e73 2061 6e20 6172 t contains an ar\n+000eced0: 7261 7920 6f66 203c 636f 6465 3e75 6e73 ray of uns\n+000ecee0: 6967 6e65 6420 6368 6172 3c2f 636f 6465 igned char values:

    .
    stru\n+000ecf40: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct xs\n+000ecf80: 645f 5f68 6578 4269 6e61 7279 3c2f 613e d__hexBinary\n+000ecf90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    unsigned char\n+000ed010: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *_\n+000ed070: 5f70 7472 3c2f 613e 3b20 3c2f 6469 763e _ptr;
    \n+000ed080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int __size; .
    };
    .\n+000ed140: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ad\n+000ed160: 7661 6e74 6167 6520 6f66 2074 6869 7320 vantage of this \n+000ed170: 7374 7275 6374 206f 7220 636c 6173 7320 struct or class \n+000ed180: 6973 2074 6865 2061 6269 6c69 7479 2074 is the ability t\n+000ed190: 6f20 7365 7269 616c 697a 6572 2072 6177 o serializer raw\n+000ed1a0: 2062 696e 6172 7920 6461 7461 2066 726f binary data fro\n+000ed1b0: 6d20 6d65 6d6f 7279 2c20 7369 6e63 6520 m memory, since \n+000ed1c0: 7468 6520 736f 6170 6370 7032 2d67 656e the soapcpp2-gen\n+000ed1d0: 6572 6174 6564 2073 6572 6961 6c69 7a65 erated serialize\n+000ed1e0: 7220 636f 6e76 6572 7473 2074 6865 2062 r converts the b\n+000ed1f0: 696e 6172 7920 6461 7461 2074 6f2f 6672 inary data to/fr\n+000ed200: 6f6d 2068 6578 6164 6563 696d 616c 2069 om hexadecimal i\n+000ed210: 6e20 584d 4c2e 3c2f 703e 0a3c 703e 4966 n XML.

    .

    If\n+000ed220: 2061 2062 696e 6172 7920 7479 7065 2073 a binary type s\n+000ed230: 7563 6820 6173 203c 636f 6465 3e3c 6120 uch as xsd__\n+000ed2b0: 6261 7365 3634 4269 6e61 7279 3c2f 613e base64Binary\n+000ed2c0: 3c2f 636f 6465 3e20 6973 2061 6c72 6561 is alrea\n+000ed2d0: 6479 2064 6566 696e 6564 2c20 7468 656e dy defined, then\n+000ed2e0: 2077 6520 6361 6e20 7369 6d70 6c79 2075 we can simply u\n+000ed2f0: 7365 2061 203c 636f 6465 3e74 7970 6564 se a typed\n+000ed300: 6566 3c2f 636f 6465 3e20 746f 2069 6e74 ef to int\n+000ed310: 726f 6475 6365 2074 6865 2068 6578 2076 roduce the hex v\n+000ed320: 6172 6961 6e74 3a3c 2f70 3e0a 3c64 6976 ariant:

    ..
    { public:
    .
    . \n+000ed4f0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000ed510: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> \n+000ed570: 5f5f 7369 7a65 3c2f 613e 3b20 3c2f 6469 __size; .
    };
    .<\n+000ed5a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ed5b0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef xsd\n+000ed610: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary xsd__hexB\n+000ed660: 696e 6172 793c 2f61 3e3b 203c 7370 616e inary; // serializes i\n+000ed690: 6e74 6f20 6865 7820 636f 6e74 656e 743c nto hex content<\n+000ed6a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

    This lets\n+000ed6d0: 2073 6f61 7063 7070 3220 6765 6e65 7261 soapcpp2 genera\n+000ed6e0: 7465 203c 656d 3e3c 636f 6465 3e78 7364 te xsd\n+000ed6f0: 3a62 6173 6536 3442 696e 6172 793c 2f63 :base64Binary and xsd:hexB\n+000ed720: 696e 6172 793c 2f63 6f64 653e 3c2f 656d inary serializers..

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

    .

    \n+000ed7a0: 0a53 4f41 5020 5250 4320 656e 636f 6465 .SOAP RPC encode\n+000ed7b0: 6420 7665 7273 7573 2064 6f63 756d 656e d versus documen\n+000ed7c0: 742f 6c69 7465 7261 6c20 7374 796c 653c t/literal style<\n+000ed7d0: 2f68 323e 0a3c 703e 534f 4150 2068 6173 /h2>.

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

    .
      .
    • SO\n+000ed800: 4150 2052 5043 2065 6e63 6f64 696e 6720 AP RPC encoding \n+000ed810: 7573 6573 2058 4d4c 2074 6861 7420 6973 uses XML that is\n+000ed820: 2072 6573 7472 6963 7465 6420 746f 2053 restricted to S\n+000ed830: 4f41 5020 7374 7275 6374 7572 6573 2074 OAP structures t\n+000ed840: 6f20 656e 7375 7265 2070 726f 6772 616d o ensure program\n+000ed850: 6d69 6e67 2d6c 616e 6775 6167 6520 696e ming-language in\n+000ed860: 7465 726f 7065 7261 6269 6c69 7479 2e20 teroperability. \n+000ed870: 4e6f 7420 616c 6c6f 7765 6420 6172 6520 Not allowed are \n+000ed880: 7661 6c75 6573 2073 6572 6961 6c69 7a65 values serialize\n+000ed890: 6420 6173 2058 4d4c 2061 7474 7269 6275 d as XML attribu\n+000ed8a0: 7465 732c 2061 7272 6179 7320 7368 6f75 tes, arrays shou\n+000ed8b0: 6c64 2062 6520 7365 7269 616c 697a 6564 ld be serialized\n+000ed8c0: 2061 7320 534f 4150 2d65 6e63 6f64 6564 as SOAP-encoded\n+000ed8d0: 2061 7272 6179 7320 696e 7374 6561 6420 arrays instead \n+000ed8e0: 6f66 2058 4d4c 2065 6c65 6d65 6e74 2072 of XML element r\n+000ed8f0: 6570 6574 6974 696f 6e73 2028 692e 652e epetitions (i.e.\n+000ed900: 203c 656d 3e3c 636f 6465 3e78 7364 3a73 xsd:s\n+000ed910: 6571 7565 6e63 6520 6d61 784f 6363 7572 equence maxOccur\n+000ed920: 733d 2275 6e62 6f75 6e64 6564 223c 2f63 s=\"unbounded\" is not\n+000ed940: 2061 6c6c 6f77 6564 292c 2061 6e64 203c allowed), and <\n+000ed950: 656d 3e3c 636f 6465 3e78 7364 3a63 686f em>xsd:cho\n+000ed960: 6963 653c 2f63 6f64 653e 3c2f 656d 3e20 ice \n+000ed970: 636f 6d70 6f6e 656e 7473 2061 7265 206e components are n\n+000ed980: 6f74 2061 6c6c 6f77 6564 2e20 4d75 6c74 ot allowed. Mult\n+000ed990: 692d 7265 6665 7265 6e63 6564 2065 6c65 i-referenced ele\n+000ed9a0: 6d65 6e74 7320 6172 6520 7573 6564 2074 ments are used t\n+000ed9b0: 6f20 7365 7269 616c 697a 6520 6461 7461 o serialize data\n+000ed9c0: 2073 7472 7563 7475 7265 2067 7261 7068 structure graph\n+000ed9d0: 732e 2042 6563 6175 7365 2061 6464 6974 s. Because addit\n+000ed9e0: 696f 6e61 6c20 534f 4150 2d65 6e63 6f64 ional SOAP-encod\n+000ed9f0: 696e 6720 7370 6563 6966 6963 2061 7474 ing specific att\n+000eda00: 7269 6275 7465 7320 6172 6520 7072 6573 ributes are pres\n+000eda10: 656e 7420 7468 6174 2061 7265 206e 6f74 ent that are not\n+000eda20: 2064 6566 696e 6564 2069 6e20 7468 6520 defined in the \n+000eda30: 584d 4c20 7363 6865 6d61 2028 6f66 2074 XML schema (of t\n+000eda40: 6865 2057 5344 4c29 2c20 7374 7269 6374 he WSDL), strict\n+000eda50: 2058 4d4c 2073 6368 656d 6120 7661 6c69 XML schema vali\n+000eda60: 6461 746f 7273 206d 6179 2072 656a 6563 dators may rejec\n+000eda70: 7420 534f 4150 2d65 6e63 6f64 6564 2063 t SOAP-encoded c\n+000eda80: 6f6e 7465 6e74 2e20 5468 6520 534f 4150 ontent. The SOAP\n+000eda90: 2042 6f64 7920 636f 6e74 6169 6e73 2061 Body contains a\n+000edaa0: 7420 6d6f 7374 206f 6e65 2073 6572 7669 t most one servi\n+000edab0: 6365 206f 7065 7261 7469 6f6e 2072 6571 ce operation req\n+000edac0: 7565 7374 2065 6c65 6d65 6e74 206f 7220 uest element or \n+000edad0: 6174 206d 6f73 7420 6f6e 6520 7365 7276 at most one serv\n+000edae0: 6963 6520 6f70 6572 6174 696f 6e20 7265 ice operation re\n+000edaf0: 7370 6f6e 7365 2065 6c65 6d65 6e74 2061 sponse element a\n+000edb00: 6e64 2074 6865 2065 6e63 6f64 696e 6720 nd the encoding \n+000edb10: 7374 796c 6520 6973 2069 6e64 6963 6174 style is indicat\n+000edb20: 6564 2077 6974 6820 7468 6520 3c65 6d3e ed with the \n+000edb30: 3c63 6f64 653e 534f 4150 2d45 4e56 3a65 SOAP-ENV:e\n+000edb40: 6e63 6f64 696e 6753 7479 6c65 3d22 2e2e ncodingStyle=\"..\n+000edb50: 2e22 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .\" a\n+000edb60: 7474 7269 6275 7465 2069 6e20 7468 6520 ttribute in the \n+000edb70: 534f 4150 2042 6f64 7920 6f72 206f 6e65 SOAP Body or one\n+000edb80: 206f 7220 6d6f 7265 206f 6620 6974 7320 or more of its \n+000edb90: 7375 622d 656c 656d 656e 7473 2e20 5468 sub-elements. Th\n+000edba0: 6973 2073 7479 6c65 2069 7320 7370 6563 is style is spec\n+000edbb0: 6966 6965 6420 666f 7220 7468 6520 656e ified for the en\n+000edbc0: 7469 7265 2073 6572 7669 6365 2064 6563 tire service dec\n+000edbd0: 6c61 7265 6420 756e 6465 7220 6e61 6d65 lared under name\n+000edbe0: 7370 6163 6520 7072 6566 6978 203c 636f space prefix ns wit\n+000edc00: 683a 203c 6469 7620 636c 6173 733d 2266 h:
      //gsoap ns serv\n+000edc50: 6963 6520 7374 796c 653a 2020 2020 7270 ice style: rp\n+000edc60: 633c 2f73 7061 6e3e 3c2f 6469 763e 0a3c c
      .<\n+000edc70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000edc80: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+000edca0: 7320 7365 7276 6963 6520 656e 636f 6469 s service encodi\n+000edcb0: 6e67 3a20 656e 636f 6465 643c 2f73 7061 ng: encoded
      .

    <\n+000edcd0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000edce0: 3c2f 6c69 3e0a 3c6c 693e 534f 4150 2064 .
  • SOAP d\n+000edcf0: 6f63 756d 656e 742f 6c69 7465 7261 6c20 ocument/literal \n+000edd00: 7573 6573 2058 4d4c 2063 6f6e 7374 7261 uses XML constra\n+000edd10: 696e 6564 2074 6f20 7468 6520 584d 4c20 ined to the XML \n+000edd20: 7363 6865 6d61 2074 6861 7420 6465 6669 schema that defi\n+000edd30: 6e65 7320 7468 6520 584d 4c20 636f 6e74 nes the XML cont\n+000edd40: 656e 742e 2054 6865 2073 6572 6961 6c69 ent. The seriali\n+000edd50: 7a61 7469 6f6e 206f 6620 7472 6565 2d62 zation of tree-b\n+000edd60: 6173 6564 2064 6174 6120 7374 7275 6374 ased data struct\n+000edd70: 7572 6573 2069 7320 6163 6375 7261 7465 ures is accurate\n+000edd80: 2069 6e20 584d 4c2e 2054 6865 2073 6572 in XML. The ser\n+000edd90: 6961 6c69 7a61 7469 6f6e 206f 6620 6469 ialization of di\n+000edda0: 6772 6170 682d 7368 6170 6564 2064 6174 graph-shaped dat\n+000eddb0: 6120 7374 7275 6374 7572 6573 2072 6573 a structures res\n+000eddc0: 756c 7473 2069 6e20 7468 6520 6475 706c ults in the dupl\n+000eddd0: 6963 6174 696f 6e20 6f66 2064 6174 6120 ication of data \n+000edde0: 6e6f 6465 7320 7468 6174 2061 7265 2063 nodes that are c\n+000eddf0: 6f2d 7265 6665 7265 6e63 6573 2e20 4379 o-references. Cy\n+000ede00: 636c 6963 2064 6174 6120 7374 7275 6374 clic data struct\n+000ede10: 7572 6573 2063 616e 6e6f 7420 6265 2061 ures cannot be a\n+000ede20: 6363 7572 6174 656c 7920 7365 7269 616c ccurately serial\n+000ede30: 697a 6564 2c20 6275 7420 796f 7520 6361 ized, but you ca\n+000ede40: 6e20 7573 6520 3c63 6f64 653e 2353 4f41 n use #SOA\n+000ede50: 505f 584d 4c5f 4752 4150 483c 2f63 6f64 P_XML_GRAPH to force the \n+000ede70: 7573 6520 6f66 2069 642d 7265 6620 746f use of id-ref to\n+000ede80: 2061 6363 7572 6174 656c 7920 7365 7269 accurately seri\n+000ede90: 616c 697a 6520 6469 6772 6170 6873 2061 alize digraphs a\n+000edea0: 6e64 2063 7963 6c69 6320 6461 7461 2073 nd cyclic data s\n+000edeb0: 7472 7563 7475 7265 732e 2054 6865 2053 tructures. The S\n+000edec0: 4f41 5020 426f 6479 206d 6179 2063 6f6e OAP Body may con\n+000eded0: 7461 696e 2061 6e79 206e 756d 6265 7220 tain any number \n+000edee0: 6f66 2058 4d4c 2065 6c65 6d65 6e74 732c of XML elements,\n+000edef0: 2061 7320 6966 2074 6865 2053 4f41 5020 as if the SOAP \n+000edf00: 426f 6479 2069 7320 7468 6520 726f 6f74 Body is the root\n+000edf10: 206f 6620 616e 2058 4d4c 2064 6f63 756d of an XML docum\n+000edf20: 656e 742e 204e 6f20 3c65 6d3e 3c63 6f64 ent. No SOAP-ENV:encod\n+000edf40: 696e 6753 7479 6c65 3d22 2e2e 2e22 3c2f ingStyle=\"...\" attri\n+000edf60: 6275 7465 2073 686f 756c 6420 6170 7065 bute should appe\n+000edf70: 6172 2069 6e20 6c69 7465 7261 6c20 636f ar in literal co\n+000edf80: 6e74 656e 742e 2054 6869 7320 7374 796c ntent. This styl\n+000edf90: 6520 6973 2073 7065 6369 6669 6564 2066 e is specified f\n+000edfa0: 6f72 2074 6865 2065 6e74 6972 6520 7365 or the entire se\n+000edfb0: 7276 6963 6520 6465 636c 6172 6564 2075 rvice declared u\n+000edfc0: 6e64 6572 206e 616d 6573 7061 6365 2070 nder namespace p\n+000edfd0: 7265 6669 7820 3c63 6f64 653e 6e73 3c2f refix ns with:
    //gsoa\n+000ee030: 7020 6e73 2073 6572 7669 6365 2073 7479 p ns service sty\n+000ee040: 6c65 3a20 2020 2064 6f63 756d 656e 743c le: document<\n+000ee050: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+000ee070: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000ee080: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+000ee090: 7365 7276 6963 6520 656e 636f 6469 6e67 service encoding\n+000ee0a0: 3a20 6c69 7465 7261 6c3c 2f73 7061 6e3e : literal\n+000ee0b0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
  • .
    .
  • SOAP RPC\n+000ee0e0: 206c 6974 6572 616c 2061 6c73 6f20 7573 literal also us\n+000ee0f0: 6573 2058 4d4c 2063 6f6e 7374 7261 696e es XML constrain\n+000ee100: 6564 2074 6f20 7468 6520 584d 4c20 7363 ed to the XML sc\n+000ee110: 6865 6d61 2074 6861 7420 6465 6669 6e65 hema that define\n+000ee120: 7320 7468 6520 584d 4c20 636f 6e74 656e s the XML conten\n+000ee130: 742e 2054 6865 2064 6966 6665 7265 6e63 t. The differenc\n+000ee140: 6520 7769 7468 2064 6f63 756d 656e 742f e with document/\n+000ee150: 6c69 7465 7261 6c20 6973 2074 6861 7420 literal is that \n+000ee160: 7468 6520 534f 4150 2042 6f64 7920 636f the SOAP Body co\n+000ee170: 6e74 6169 6e73 2061 7420 6d6f 7374 206f ntains at most o\n+000ee180: 6e65 2073 6572 7669 6365 206f 7065 7261 ne service opera\n+000ee190: 7469 6f6e 2072 6571 7565 7374 2065 6c65 tion request ele\n+000ee1a0: 6d65 6e74 206f 7220 6174 206d 6f73 7420 ment or at most \n+000ee1b0: 6f6e 6520 7365 7276 6963 6520 6f70 6572 one service oper\n+000ee1c0: 6174 696f 6e20 7265 7370 6f6e 7365 2065 ation response e\n+000ee1d0: 6c65 6d65 6e74 2e20 4e6f 203c 656d 3e3c lement. No <\n+000ee1e0: 636f 6465 3e53 4f41 502d 454e 563a 656e code>SOAP-ENV:en\n+000ee1f0: 636f 6469 6e67 5374 796c 653d 222e 2e2e codingStyle=\"...\n+000ee200: 223c 2f63 6f64 653e 3c2f 656d 3e20 6174 \" at\n+000ee210: 7472 6962 7574 6520 7368 6f75 6c64 2061 tribute should a\n+000ee220: 7070 6561 7220 696e 206c 6974 6572 616c ppear in literal\n+000ee230: 2063 6f6e 7465 6e74 2e20 5468 6973 2073 content. This s\n+000ee240: 7479 6c65 2069 7320 7370 6563 6966 6965 tyle is specifie\n+000ee250: 6420 666f 7220 7468 6520 656e 7469 7265 d for the entire\n+000ee260: 2073 6572 7669 6365 2064 6563 6c61 7265 service declare\n+000ee270: 6420 756e 6465 7220 6e61 6d65 7370 6163 d under namespac\n+000ee280: 6520 7072 6566 6978 203c 636f 6465 3e6e e prefix n\n+000ee290: 733c 2f63 6f64 653e 2077 6974 683a 203c s with: <\n+000ee2a0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000ee2b0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    //g\n+000ee2e0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+000ee2f0: 7374 796c 653a 2020 2020 7270 633c 2f73 style: rpc
    .
    //gsoap ns se\n+000ee340: 7276 6963 6520 656e 636f 6469 6e67 3a20 rvice encoding: \n+000ee350: 6c69 7465 7261 6c3c 2f73 7061 6e3e 3c2f literal.
    ..

    Besid\n+000ee390: 6573 203c 636f 6465 3e2f 2f67 736f 6170 es //gsoap\n+000ee3a0: 206e 7320 7365 7276 6963 6520 7374 796c ns service styl\n+000ee3b0: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and //gsoap ns se\n+000ee3d0: 7276 6963 6520 656e 636f 6469 6e67 3c2f rvice encoding there are \n+000ee3f0: 616c 736f 2074 6865 2073 6572 7669 6365 also the service\n+000ee400: 206f 7065 7261 7469 6f6e 2073 7065 6369 operation speci\n+000ee410: 6669 6320 7665 7273 696f 6e73 203c 636f fic versions //gsoap ns se\n+000ee430: 7276 6963 6520 6d65 7468 6f64 2d73 7479 rvice method-sty\n+000ee440: 6c65 3c2f 636f 6465 3e2c 203c 636f 6465 le, //gsoap ns serv\n+000ee460: 6963 6520 6d65 7468 6f64 2d72 6573 706f ice method-respo\n+000ee470: 6e73 652d 7374 796c 653c 2f63 6f64 653e nse-style\n+000ee480: 2c20 3c63 6f64 653e 2f2f 6773 6f61 7020 , //gsoap \n+000ee490: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n+000ee4a0: 642d 656e 636f 6469 6e67 3c2f 636f 6465 d-encoding, and //g\n+000ee4c0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+000ee4d0: 6d65 7468 6f64 2d72 6573 706f 6e73 652d method-response-\n+000ee4e0: 656e 636f 6469 6e67 3c2f 636f 6465 3e20 encoding \n+000ee4f0: 7468 6174 2065 7870 6c69 6369 746c 7920 that explicitly \n+000ee500: 7370 6563 6966 7920 534f 4150 2052 5043 specify SOAP RPC\n+000ee510: 2065 6e63 6f64 6564 2c20 646f 6375 6d65 encoded, docume\n+000ee520: 6e74 2f6c 6974 6572 616c 2c20 6f72 2052 nt/literal, or R\n+000ee530: 5043 206c 6974 6572 616c 2073 7479 6c65 PC literal style\n+000ee540: 206d 6573 7361 6765 7320 666f 7220 7468 messages for th\n+000ee550: 6520 696e 6469 6361 7465 6420 7365 7276 e indicated serv\n+000ee560: 6963 6520 6f70 6572 6174 696f 6e20 6d65 ice operation me\n+000ee570: 7468 6f64 732e 3c2f 703e 0a3c 703e 546f thods.

    .

    To\n+000ee580: 2065 6e61 626c 6520 534f 4150 2052 5043 enable SOAP RPC\n+000ee590: 2065 6e63 6f64 696e 6720 666f 7220 6120 encoding for a \n+000ee5a0: 7061 7274 6963 756c 6172 2073 6572 7669 particular servi\n+000ee5b0: 6365 206f 7065 7261 7469 6f6e 2c20 7573 ce operation, us\n+000ee5c0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+000ee5f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000ee600: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+000ee610: 7365 7276 6963 6520 6d65 7468 6f64 2d73 service method-s\n+000ee620: 7479 6c65 3a20 2020 2077 6562 6d65 7468 tyle: webmeth\n+000ee630: 6f64 2072 7063 203c 2f73 7061 6e3e 3c2f od rpc .
    //g\n+000ee670: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+000ee680: 6d65 7468 6f64 2d65 6e63 6f64 696e 673a method-encoding:\n+000ee690: 2077 6562 6d65 7468 6f64 2065 6e63 6f64 webmethod encod\n+000ee6a0: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    \n+000ee6b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n+000ee6e0: 3c2f 7370 616e 3e20 6e73 5f5f 7765 626d ns__webm\n+000ee6f0: 6574 686f 6428 2e2e 2e29 3c2f 6469 763e ethod(...)
    \n+000ee700: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    To en\n+000ee720: 6162 6c65 2053 4f41 5020 5250 4320 656e able SOAP RPC en\n+000ee730: 636f 6469 6e67 2066 6f72 2061 2070 6172 coding for a par\n+000ee740: 7469 6375 6c61 7220 7365 7276 6963 6520 ticular service \n+000ee750: 6f70 6572 6174 696f 6e20 7265 7370 6f6e operation respon\n+000ee760: 7365 2c20 7573 653a 3c2f 703e 0a3c 6469 se, use:

    .
    //gso\n+000ee7b0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+000ee7c0: 7468 6f64 2d72 6573 706f 6e73 652d 7374 thod-response-st\n+000ee7d0: 796c 653a 2020 2020 7765 626d 6574 686f yle: webmetho\n+000ee7e0: 6420 7270 6320 3c2f 7370 616e 3e3c 2f64 d rpc .
    //gs\n+000ee820: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n+000ee830: 6574 686f 642d 7265 7370 6f6e 7365 2d65 ethod-response-e\n+000ee840: 6e63 6f64 696e 673a 2077 6562 6d65 7468 ncoding: webmeth\n+000ee850: 6f64 2065 6e63 6f64 6564 203c 2f73 7061 od encoded
    .
    int \n+000ee8a0: 6e73 5f5f 7765 626d 6574 686f 6428 2e2e ns__webmethod(..\n+000ee8b0: 2e29 3c2f 6469 763e 0a3c 2f64 6976 3e3c .)
    .
    <\n+000ee8c0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000ee8d0: 3c70 3e4c 696b 6577 6973 652c 2079 6f75

    Likewise, you\n+000ee8e0: 2063 616e 2073 7065 6369 6679 2064 6f63 can specify doc\n+000ee8f0: 756d 656e 742f 6c69 7465 7261 6c20 616e ument/literal an\n+000ee900: 6420 5250 4320 6c69 7465 7261 6c20 6d65 d RPC literal me\n+000ee910: 7373 6167 6573 2e20 5468 6520 6465 6661 ssages. The defa\n+000ee920: 756c 7420 7374 796c 6520 6973 2064 6f63 ult style is doc\n+000ee930: 756d 656e 742f 6c69 7465 7261 6c2c 2075 ument/literal, u\n+000ee940: 6e6c 6573 7320 3c62 3e3c 636f 6465 3e73 nless s\n+000ee950: 6f61 7063 7070 3220 2d65 3c2f 636f 6465 oapcpp2 -e option \n+000ee970: 3c63 6f64 653e 2d65 3c2f 636f 6465 3e3c -e<\n+000ee980: 2f62 3e20 6973 2075 7365 6420 746f 2073 /b> is used to s\n+000ee990: 6574 2053 4f41 5020 5250 4320 656e 636f et SOAP RPC enco\n+000ee9a0: 6469 6e67 2062 7920 6465 6661 756c 742e ding by default.\n+000ee9b0: 3c2f 703e 0a3c 703e 466f 7220 7468 6520

    .

    For the \n+000ee9c0: 3c63 6f64 653e 7374 796c 653c 2f63 6f64 style directives yo\n+000ee9e0: 7520 6361 6e20 7370 6563 6966 7920 3c63 u can specify rpc o\n+000eea00: 7220 3c63 6f64 653e 646f 6375 6d65 6e74 r document\n+000eea10: 3c2f 636f 6465 3e2e 2046 6f72 2074 6865 . For the\n+000eea20: 203c 636f 6465 3e65 6e63 6f64 696e 673c encoding<\n+000eea30: 2f63 6f64 653e 2064 6972 6563 7469 7665 /code> directive\n+000eea40: 7320 796f 7520 6361 6e20 7370 6563 6966 s you can specif\n+000eea50: 7920 3c63 6f64 653e 6c69 7465 7261 6c3c y literal<\n+000eea60: 2f63 6f64 653e 2c20 3c63 6f64 653e 656e /code>, en\n+000eea70: 636f 6465 643c 2f63 6f64 653e 2c20 6f72 coded, or\n+000eea80: 2065 7665 6e20 6120 6375 7374 6f6d 2055 even a custom U\n+000eea90: 5249 2074 6861 7420 696e 6469 6361 7465 RI that indicate\n+000eeaa0: 7320 736f 6d65 2063 7573 746f 6d20 6f72 s some custom or\n+000eeab0: 2070 726f 7072 6965 7461 7279 2065 6e63 proprietary enc\n+000eeac0: 6f64 696e 6720 666f 726d 6174 2069 6e20 oding format in \n+000eead0: 584d 4c20 7768 6963 6820 7769 6c6c 206e XML which will n\n+000eeae0: 6f74 2069 6e74 6572 6f70 6572 6174 6520 ot interoperate \n+000eeaf0: 7769 7468 2053 4f41 5020 7072 6f63 6573 with SOAP proces\n+000eeb00: 736f 7273 2074 6861 7420 6172 6520 6e6f sors that are no\n+000eeb10: 7420 636f 6d70 6174 6962 6c65 2077 6974 t compatible wit\n+000eeb20: 6820 7468 6520 7370 6563 6966 6965 6420 h the specified \n+000eeb30: 656e 636f 6469 6e67 2066 6f72 6d61 742e encoding format.\n+000eeb40: 2053 6565 2061 6c73 6f20 5365 6374 696f See also Sectio\n+000eeb50: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Dir\n+000eeb80: 6563 7469 7665 733c 2f61 3e2e 3c2f 703e ectives.

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

    See also C and C\n+000eebd0: 2b2b 2058 4d4c 2064 6174 6120 6269 6e64 ++ XML data bind\n+000eebe0: 696e 6773 3c2f 613e 2064 6f63 756d 656e ings documen\n+000eebf0: 7461 7469 6f6e 2066 6f72 2064 6966 6665 tation for diffe\n+000eec00: 7265 6e63 6573 2069 6e20 584d 4c20 7365 rences in XML se\n+000eec10: 7269 616c 697a 6174 696f 6e20 7768 656e rialization when\n+000eec20: 2075 7369 6e67 2074 6865 2053 4f41 5020 using the SOAP \n+000eec30: 5250 4320 656e 636f 6465 6420 616e 6420 RPC encoded and \n+000eec40: 646f 6375 6d65 6e74 2f6c 6974 6572 616c document/literal\n+000eec50: 206d 6573 7361 6769 6e67 2073 7479 6c65 messaging style\n+000eec60: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

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

    ..Serializin\n+000eecd0: 6720 6d69 7865 6420 636f 6e74 656e 7420 g mixed content \n+000eece0: 7769 7468 206c 6974 6572 616c 2058 4d4c with literal XML\n+000eecf0: 2073 7472 696e 6773 3c2f 6833 3e0a 3c70 strings.XML is stored i\n+000eed10: 6e20 226c 6974 6572 616c 2220 584d 4c20 n \"literal\" XML \n+000eed20: 7374 7269 6e67 7320 7768 6963 6820 6172 strings which ar\n+000eed30: 6520 7468 6520 6275 696c 742d 696e 203c e the built-in <\n+000eed40: 636f 6465 3e5f 584d 4c3c 2f63 6f64 653e code>_XML
    \n+000eed50: 2074 7970 6520 7468 6174 2069 7320 6120 type that is a \n+000eed60: 7265 6775 6c61 7220 3c63 6f64 653e 6368 regular ch\n+000eed70: 6172 2a3c 2f63 6f64 653e 2073 7472 696e ar* strin\n+000eed80: 6720 6f72 2079 6f75 2063 616e 2064 6563 g or you can dec\n+000eed90: 6c61 7265 2061 2077 6964 6520 6368 6172 lare a wide char\n+000eeda0: 6163 7465 7220 7374 7269 6e67 2069 6e20 acter string in \n+000eedb0: 616e 2069 6e74 6572 6661 6365 2068 6561 an interface hea\n+000eedc0: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa\n+000eedd0: 7063 7070 3220 6173 2066 6f6c 6c6f 7773 pcpp2 as follows\n+000eede0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    typedef wch\n+000eee50: 6172 5f74 3c2f 7370 616e 3e20 2a58 4d4c ar_t *XML\n+000eee60: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
  • <\n+000eee80: 703e 546f 2064 6563 6c61 7265 2061 2043 p>To declare a C\n+000eee90: 2b2b 203c 636f 6465 3e73 7464 3a3a 7374 ++ std::st\n+000eeea0: 7269 6e67 3c2f 636f 6465 3e20 6c69 7465 ring lite\n+000eeeb0: 7261 6c20 584d 4c20 7479 7065 3a3c 2f70 ral XML type:.
    \n+000eef00: 7479 7065 6465 663c 2f73 7061 6e3e 2073 typedef s\n+000eef10: 7464 3a3a 7374 7269 6e67 2058 4d4c 3b3c td::string XML;<\n+000eef20: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+000eef40: 4f72 2075 7365 2061 2077 6964 6520 6368 Or use a wide ch\n+000eef50: 6172 6163 7465 7220 7374 7269 6e67 3a3c aracter string:<\n+000eef60: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    typedef\n+000eefb0: 2073 7464 3a3a 7773 7472 696e 6720 584d std::wstring XM\n+000eefc0: 4c3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c L;
    .
    <\n+000eefd0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000eefe0: 3c70 3e54 6f20 7573 6520 626f 7468 2061

    To use both a\n+000eeff0: 7420 7468 6520 7361 6d65 2074 696d 653a t the same time:\n+000ef000: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    typedef std::string X\n+000ef060: 4d4c 3b3c 2f64 6976 3e0a 3c64 6976 2063 ML;
    .
    typedef\n+000ef0a0: 2073 7464 3a3a 7773 7472 696e 6720 584d std::wstring XM\n+000ef0b0: 4c5f 3b3c 2f64 6976 3e0a 3c2f 6469 763e L_;
    .
    \n+000ef0c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The nullptr \n+000f0130: 6973 206f 7074 696f 6e61 6c20 616e 6420 is optional and \n+000f0140: 696e 6469 6361 7465 7320 7468 6174 2074 indicates that t\n+000f0150: 6865 206d 656d 6265 7220 6973 206e 696c he member is nil\n+000f0160: 6c61 626c 6520 2867 534f 4150 2076 6572 lable (gSOAP ver\n+000f0170: 7369 6f6e 2032 2e38 2e32 3420 6f72 2067 sion 2.8.24 or g\n+000f0180: 7265 6174 6572 292c 2077 6869 6368 206d reater), which m\n+000f0190: 6561 6e73 2074 6861 7420 7768 656e 204e eans that when N\n+000f01a0: 554c 4c20 616e 2065 6d70 7479 2065 6c65 ULL an empty ele\n+000f01b0: 6d65 6e74 2077 6974 6820 3c65 6d3e 3c63 ment with xsi:nil=\"tru\n+000f01d0: 6522 3c2f 636f 6465 3e3c 2f65 6d3e 2069 e\" i\n+000f01e0: 7320 6164 6465 6420 696e 2074 6865 2073 s added in the s\n+000f01f0: 6572 6961 6c69 7a65 6420 584d 4c2e 3c2f erialized XML..

    The \n+000f0210: 6d69 6e4f 6363 7572 733c 2f63 6f64 653e minOccurs\n+000f0220: 2061 6e64 203c 636f 6465 3e6d 6178 4f63 and maxOc\n+000f0230: 6375 7273 3c2f 636f 6465 3e20 6172 6520 curs are \n+000f0240: 6f70 7469 6f6e 616c 2076 616c 7565 7320 optional values \n+000f0250: 7468 6174 206d 7573 7420 6265 2069 6e74 that must be int\n+000f0260: 6567 6572 206c 6974 6572 616c 732e 2057 eger literals. W\n+000f0270: 6865 6e20 3c63 6f64 653e 6d61 784f 6363 hen maxOcc\n+000f0280: 7572 733c 2f63 6f64 653e 2069 7320 6e6f urs is no\n+000f0290: 7420 7370 6563 6966 6965 6420 7468 656e t specified then\n+000f02a0: 2074 6865 2063 6f6c 6f6e 2063 616e 2062 the colon can b\n+000f02b0: 6520 6f6d 6974 7465 642e 2057 6865 6e20 e omitted. When \n+000f02c0: 3c63 6f64 653e 6d69 6e4f 6363 7572 733c minOccurs<\n+000f02d0: 2f63 6f64 653e 2069 7320 6e6f 7420 7370 /code> is not sp\n+000f02e0: 6563 6966 6965 6420 6974 2069 7320 6173 ecified it is as\n+000f02f0: 7375 6d65 6420 746f 2062 6520 6f6e 6520 sumed to be one \n+000f0300: 2831 2920 666f 7220 6e6f 6e2d 706f 696e (1) for non-poin\n+000f0310: 7465 7220 6d65 6d62 6572 7320 7468 6174 ter members that\n+000f0320: 2061 7265 2065 6c65 6d65 6e74 7320 616e are elements an\n+000f0330: 6420 7a65 726f 2028 3029 2066 6f72 206d d zero (0) for m\n+000f0340: 656d 6265 7273 2074 6861 7420 6172 6520 embers that are \n+000f0350: 706f 696e 7465 7273 206f 7220 6172 6520 pointers or are \n+000f0360: 6174 7472 6962 7574 6573 2028 692e 652e attributes (i.e.\n+000f0370: 2068 6176 6520 6120 3c63 6f64 653e 403c have a @<\n+000f0380: 2f63 6f64 653e 2071 7561 6c69 6669 6572 /code> qualifier\n+000f0390: 292e 3c2f 703e 0a3c 703e 4120 6465 6661 ).

    .

    A defa\n+000f03a0: 756c 7420 696e 6974 6961 6c69 7a61 7469 ult initializati\n+000f03b0: 6f6e 203c 636f 6465 3e76 616c 7565 3c2f on value may be pro\n+000f03d0: 7669 6465 6420 616e 6420 6973 206f 7074 vided and is opt\n+000f03e0: 696f 6e61 6c2e 3c2f 703e 0a3c 703e 4120 ional.

    .

    A \n+000f03f0: 6669 7865 6420 696e 6974 6961 6c69 7a61 fixed initializa\n+000f0400: 7469 6f6e 2076 616c 7565 2063 616e 2062 tion value can b\n+000f0410: 6520 7370 6563 6966 6965 6420 7769 7468 e specified with\n+000f0420: 203c 636f 6465 3e3d 3d3c 2f63 6f64 653e ==\n+000f0430: 2028 6753 4f41 5020 7665 7273 696f 6e20 (gSOAP version \n+000f0440: 322e 382e 3438 206f 7220 6772 6561 7465 2.8.48 or greate\n+000f0450: 7229 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 r).

    .

    For e\n+000f0460: 7861 6d70 6c65 3c2f 703e 0a3c 6469 7620 xample

    .
    struct \n+000f04b0: 3c2f 7370 616e 3e6e 735f 5f4d 7952 6563 ns__MyRec\n+000f04c0: 6f72 6420 3c2f 6469 763e 0a3c 6469 7620 ord
    .
    {.
    int \n+000f0520: 6e20 3020 3d20 353b 2020 2020 2020 3c73 n 0 = 5; // element w\n+000f0550: 6974 6820 6465 6661 756c 7420 7661 6c75 ith default valu\n+000f0560: 6520 352c 206d 696e 4f63 6375 7273 3d30 e 5, minOccurs=0\n+000f0570: 2c20 6d61 784f 6363 7572 733d 313c 2f73 , maxOccurs=1
    .
    \n+000f05a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int m; \n+000f05d0: 2020 2020 3c73 7061 6e20 636c 6173 733d // ele\n+000f05f0: 6d65 6e74 2077 6974 6820 6d69 6e4f 6363 ment with minOcc\n+000f0600: 7572 733d 3120 3c2f 7370 616e 3e3c 2f64 urs=1 .
    int *\n+000f0650: 6b20 3c73 7061 6e20 636c 6173 733d 226b k nullptr<\n+000f0670: 2f73 7061 6e3e 2031 3b20 3c73 7061 6e20 /span> 1; \n+000f0690: 2f2f 2065 6c65 6d65 6e74 2077 6974 6820 // element with \n+000f06a0: 6d69 6e4f 6363 7572 733d 3120 616e 6420 minOccurs=1 and \n+000f06b0: 6e69 6c6c 6162 6c65 3d74 7275 6520 3c2f nillable=true
    . \n+000f06e0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000f0700: 2f73 7061 6e3e 2076 203d 3d20 323b 2020 /span> v == 2; \n+000f0710: 2020 2020 203c 7370 616e 2063 6c61 7373 // el\n+000f0730: 656d 656e 7420 7769 7468 206d 696e 4f63 ement with minOc\n+000f0740: 6375 7273 3d31 2061 6e64 2066 6978 6564 curs=1 and fixed\n+000f0750: 2076 616c 7565 2032 203c 2f73 7061 6e3e value 2 \n+000f0760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int __size 0:10; \n+000f07b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // sequenc\n+000f07d0: 6520 266c 743b 6974 656d 2667 743b 2077 e <item> w\n+000f07e0: 6974 6820 6d69 6e4f 6363 7572 733d 302c ith minOccurs=0,\n+000f07f0: 206d 6178 4f63 6375 7273 3d31 303c 2f73 maxOccurs=10
    .
    \n+000f0820: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int *item; .
    std::v\n+000f0870: 6563 746f 7226 6c74 3b64 6f75 626c 6526 ector<double&\n+000f0880: 6774 3b20 6e75 6d73 2032 3b20 3c73 7061 gt; nums 2; // sequence &l\n+000f08b0: 743b 6e75 6d73 2667 743b 2077 6974 6820 t;nums> with \n+000f08c0: 6d69 6e4f 6363 7572 733d 322c 206d 6178 minOccurs=2, max\n+000f08d0: 4f63 6375 7273 3d75 6e62 6f75 6e64 6564 Occurs=unbounded\n+000f08e0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000f08f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f0900: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
    .
    .
    str\n+000f0950: 7563 7420 3c2f 7370 616e 3e61 7272 6179 uct array\n+000f0960: 4f66 696e 7420 3c2f 6469 763e 0a3c 6469 Ofint
    .{\n+000f0980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int *__ptr 1:100; \n+000f09d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // minOccu\n+000f09f0: 7273 3d31 2c20 6d61 784f 6363 7572 733d rs=1, maxOccurs=\n+000f0a00: 3130 3020 3c2f 7370 616e 3e3c 2f64 6976 100 .
    int siz\n+000f0a50: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    };.

    S\n+000f0a90: 6565 2061 6c73 6f20 3c61 2068 7265 663d ee also C and C++ XM\n+000f0ad0: 4c20 6461 7461 2062 696e 6469 6e67 733c L data bindings<\n+000f0ae0: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n+000f0af0: 6e20 666f 7220 6d6f 7265 2064 6574 6169 n for more detai\n+000f0b00: 6c73 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ls.

    .

    .... \n+000f0b10: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+000f0b20: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+000f0b30: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    .<\n+000f0b70: 2f61 3e0a 5265 7175 6972 6564 2061 6e64 /a>.Required and\n+000f0b80: 2070 726f 6869 6269 7465 6420 6174 7472 prohibited attr\n+000f0b90: 6962 7574 6573 3c2f 6833 3e0a 3c70 3e53 ibutes.

    S\n+000f0ba0: 696d 696c 6172 2074 6f20 7468 6520 6d69 imilar to the mi\n+000f0bb0: 6e4f 6363 7572 7320 616e 6420 6d61 784f nOccurs and maxO\n+000f0bc0: 6363 7572 7320 616e 6e6f 7461 7469 6f6e ccurs annotation\n+000f0bd0: 7320 6465 6669 6e65 6420 696e 2074 6865 s defined in the\n+000f0be0: 2070 7265 7669 6f75 7320 7365 6374 696f previous sectio\n+000f0bf0: 6e2c 2061 7474 7269 6275 7465 7320 696e n, attributes in\n+000f0c00: 2061 2073 7472 7563 7420 6f72 2063 6c61 a struct or cla\n+000f0c10: 7373 2063 616e 2062 6520 616e 6e6f 7461 ss can be annota\n+000f0c20: 7465 6420 7769 7468 206f 6363 7572 7265 ted with occurre\n+000f0c30: 6e63 6520 636f 6e73 7472 6169 6e74 7320 nce constraints \n+000f0c40: 746f 206d 616b 6520 7468 656d 206f 7074 to make them opt\n+000f0c50: 696f 6e61 6c20 2830 292c 2072 6571 7569 ional (0), requi\n+000f0c60: 7265 6420 2831 292c 206f 7220 7072 6f68 red (1), or proh\n+000f0c70: 6962 6974 6564 2028 303a 3029 2e20 4465 ibited (0:0). De\n+000f0c80: 6661 756c 7420 7661 6c75 6573 2063 616e fault values can\n+000f0c90: 2062 6520 6173 7369 676e 6564 2074 6f20 be assigned to \n+000f0ca0: 6f70 7469 6f6e 616c 2061 7474 7269 6275 optional attribu\n+000f0cb0: 7465 732e 3c2f 703e 0a3c 703e 466f 7220 tes.

    .

    For \n+000f0cc0: 6578 616d 706c 653c 2f70 3e0a 3c64 6976 example

    .
    struct\n+000f0d10: 203c 2f73 7061 6e3e 6e73 5f5f 4d79 5265 ns__MyRe\n+000f0d20: 636f 7264 203c 2f64 6976 3e0a 3c64 6976 cord
    .{<\n+000f0d40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    @ int\n+000f0d80: 206d 2031 3b20 2020 3c73 7061 6e20 636c m 1; //\n+000f0da0: 2072 6571 7569 7265 6420 6174 7472 6962 required attrib\n+000f0db0: 7574 6520 286f 6363 7572 7320 6174 206c ute (occurs at l\n+000f0dc0: 6561 7374 206f 6e63 6529 203c 2f73 7061 east once)
    .
    @ <\n+000f0df0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f0e00: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int n = 5; // optional att\n+000f0e40: 7269 6275 7465 2077 6974 6820 6465 6661 ribute with defa\n+000f0e50: 756c 7420 7661 6c75 6520 353c 2f73 7061 ult value 5
    .
    @ <\n+000f0e80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f0e90: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int o 0; // optional att\n+000f0ed0: 7269 6275 7465 2028 6d61 7920 6f72 206d ribute (may or m\n+000f0ee0: 6179 206e 6f74 206f 6363 7572 2920 3c2f ay not occur)
    . \n+000f0f10: 4020 3c73 7061 6e20 636c 6173 733d 226b @ int<\n+000f0f30: 2f73 7061 6e3e 2070 2030 3a30 3b20 3c73 /span> p 0:0; // prohibite\n+000f0f60: 6420 6174 7472 6962 7574 6520 3c2f 7370 d attribute
    .
    };.

    R\n+000f0fb0: 656d 656d 6265 7220 746f 2073 6574 2074 emember to set t\n+000f0fc0: 6865 203c 636f 6465 3e23 534f 4150 5f58 he #SOAP_X\n+000f0fd0: 4d4c 5f53 5452 4943 543c 2f63 6f64 653e ML_STRICT\n+000f0fe0: 2069 6e70 7574 206d 6f64 6520 666c 6167 input mode flag\n+000f0ff0: 2074 6f20 656e 6162 6c65 2074 6865 2076 to enable the v\n+000f1000: 616c 6964 6174 696f 6e20 6f66 2061 7474 alidation of att\n+000f1010: 7269 6275 7465 206f 6363 7572 7265 6e63 ribute occurrenc\n+000f1020: 6520 636f 6e73 7472 6169 6e74 732e 3c2f e constraints..

    See also <\n+000f1040: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 6461 a href=\"../../da\n+000f1050: 7461 6269 6e64 696e 672f 6874 6d6c 2f69 tabinding/html/i\n+000f1060: 6e64 6578 2e68 746d 6c22 3e43 2061 6e64 ndex.html\">C and\n+000f1070: 2043 2b2b 2058 4d4c 2064 6174 6120 6269 C++ XML data bi\n+000f1080: 6e64 696e 6773 3c2f 613e 2064 6f63 756d ndings docum\n+000f1090: 656e 7461 7469 6f6e 2066 6f72 206d 6f72 entation for mor\n+000f10a0: 6520 6465 7461 696c 732e 3c2f 703e 0a3c e details.

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

    .

    .Value cons\n+000f1120: 7472 6169 6e74 733c 2f68 323e 0a3c 703e traints

    .

    \n+000f1130: 5661 6c75 6520 636f 6e73 7472 6169 6e74 Value constraint\n+000f1140: 7320 7265 7374 7269 6374 2074 6865 206c s restrict the l\n+000f1150: 656e 6774 6820 6f66 2073 7472 696e 6773 ength of strings\n+000f1160: 2061 6e64 2074 6865 2072 616e 6765 206f and the range o\n+000f1170: 6620 7661 6c75 6573 206f 6620 6e75 6d65 f values of nume\n+000f1180: 7269 6320 7479 7065 732e 3c2f 703e 0a3c ric types.

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

    .

    .Data leng\n+000f1200: 7468 2072 6573 7472 6963 7469 6f6e 733c th restrictions<\n+000f1210: 2f68 333e 0a3c 703e 4120 7363 6865 6d61 /h3>.

    A schema\n+000f1220: 2073 696d 706c 6554 7970 6520 6973 2064 simpleType is d\n+000f1230: 6566 696e 6564 2077 6974 6820 6120 3c63 efined with a typedef by taking a b\n+000f1260: 6173 6520 7072 696d 6974 6976 6520 746f ase primitive to\n+000f1270: 2064 6566 696e 6564 2061 2064 6572 6976 defined a deriv\n+000f1280: 6564 2073 696d 706c 6554 7970 652e 2046 ed simpleType. F\n+000f1290: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n+000f12a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    ty\n+000f12e0: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef int time__seconds;\n+000f1320: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    This defines th\n+000f1350: 6520 666f 6c6c 6f77 696e 6720 7363 6865 e following sche\n+000f1360: 6d61 2074 7970 6520 696e 203c 656d 3e3c ma type in <\n+000f1370: 636f 6465 3e74 696d 652e 7873 643c 2f63 code>time.xsd:

    .<\n+000f1390: 6469 7620 636c 6173 733d 2261 6c74 223e div class=\"alt\">\n+000f13a0: 203c 6469 7620 636c 6173 733d 2266 7261
    <simpleTyp\n+000f13f0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e n\n+000f1410: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="sec\n+000f1440: 6f6e 6473 2671 756f 743b 3c2f 7370 616e onds">
    . \n+000f1470: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <r\n+000f1490: 6573 7472 6963 7469 6f6e 3c2f 7370 616e estriction base=\n+000f14e0: 2671 756f 743b 7873 643a 696e 7426 7175 "xsd:int&qu\n+000f14f0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> \n+000f1500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </simpleTy\n+000f1540: 7065 3c2f 7370 616e 3e26 6774 3b3c 2f64 pe>.

    A complexTy\n+000f1580: 7065 2077 6974 6820 7369 6d70 6c65 436f pe with simpleCo\n+000f1590: 6e74 656e 7420 6973 2064 6566 696e 6564 ntent is defined\n+000f15a0: 2077 6974 6820 6120 7772 6170 7065 7220 with a wrapper \n+000f15b0: 7374 7275 6374 2f63 6c61 7373 3a3c 2f70 struct/class:.

    \n+000f1600: 7374 7275 6374 203c 2f73 7061 6e3e 7469 struct ti\n+000f1610: 6d65 5f5f 6461 7465 203c 2f64 6976 3e0a me__date
    .\n+000f1620: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n+000f1650: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *__item; <\n+000f1680: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f1690: 656e 7422 3e2f 2f20 736f 6d65 2063 7573 ent\">// some cus\n+000f16a0: 746f 6d20 666f 726d 6174 2064 6174 6520 tom format date \n+000f16b0: 2872 6573 7472 6963 7469 6f6e 206f 6620 (restriction of \n+000f16c0: 7374 7269 6e67 2920 3c2f 7370 616e 3e3c string) <\n+000f16d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    @ enum ti\n+000f1710: 6d65 5f5f 7a6f 6e65 207b 2045 5354 2c20 me__zone { EST, \n+000f1720: 474d 542c 202e 2e2e 207d 207a 6f6e 653b GMT, ... } zone;\n+000f1730: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }.

    This\n+000f1770: 2064 6566 696e 6573 2074 6865 2066 6f6c defines the fol\n+000f1780: 6c6f 7769 6e67 2073 6368 656d 6120 7479 lowing schema ty\n+000f1790: 7065 2069 6e20 3c65 6d3e 3c63 6f64 653e pe in \n+000f17a0: 7469 6d65 2e78 7364 3c2f 636f 6465 3e3c time.xsd<\n+000f17b0: 2f65 6d3e 3a3c 2f70 3e0a 3c64 6976 2063 /em>:

    .
    <complexType name<\n+000f1840: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="date&qu\n+000f1870: 6f74 3b3c 2f73 7061 6e3e 2667 743b 203c ot;> <\n+000f1880: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <simpleCo\n+000f18c0: 6e74 656e 743c 2f73 7061 6e3e 2667 743b ntent>\n+000f18d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    &l\n+000f18f0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;exte\n+000f1910: 6e73 696f 6e3c 2f73 7061 6e3e 203c 7370 nsion base=<\n+000f1940: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f1950: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f1960: 3b78 7364 3a73 7472 696e 6726 7175 6f74 ;xsd:string"\n+000f1970: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
    </simpleCo\n+000f19c0: 6e74 656e 743c 2f73 7061 6e3e 2667 743b ntent>\n+000f19d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    <\n+000f19f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 attrib\n+000f1a10: 7574 653c 2f73 7061 6e3e 203c 7370 616e ute name="z\n+000f1a60: 6f6e 6526 7175 6f74 3b3c 2f73 7061 6e3e one"\n+000f1a70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 type=&\n+000f1ab0: 7175 6f74 3b74 696d 653a 7a6f 6e65 2671 quot;time:zone&q\n+000f1ac0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; use="o\n+000f1b10: 7074 696f 6e61 6c26 7175 6f74 3b3c 2f73 ptional"/>
    \n+000f1b30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </complexType>
    .<\n+000f1b80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f1b90: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><s\n+000f1bb0: 696d 706c 6554 7970 653c 2f73 7061 6e3e impleType\n+000f1bc0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n+000f1c00: 7175 6f74 3b7a 6f6e 6526 7175 6f74 3b3c quot;zone"<\n+000f1c10: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
    <restriction<\n+000f1c60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bas\n+000f1c80: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:s\n+000f1cb0: 7472 696e 6726 7175 6f74 3b3c 2f73 7061 tring">
    .\n+000f1ce0: 2020 2020 266c 743b 3c73 7061 6e20 636c <enumeration value\n+000f1d30: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="EST&qu\n+000f1d60: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> \n+000f1d70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+000f1d90: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;enume\n+000f1db0: 7261 7469 6f6e 3c2f 7370 616e 3e20 3c73 ration value\n+000f1de0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000f1e00: 6f74 3b47 4d54 2671 756f 743b 3c2f 7370 ot;GMT"/>
    .\n+000f1e20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ...
    \n+000f1e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </restriction<\n+000f1e80: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
    </simpleType>
    .<\n+000f1ee0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    \n+000f1f00: 4461 7461 2076 616c 7565 206c 656e 6774 Data value lengt\n+000f1f10: 6820 636f 6e73 7472 6169 6e74 7320 6f66 h constraints of\n+000f1f20: 2073 696d 706c 6554 7970 6573 2061 6e64 simpleTypes and\n+000f1f30: 2063 6f6d 706c 6578 5479 7065 7320 7769 complexTypes wi\n+000f1f40: 7468 2073 696d 706c 6543 6f6e 7465 6e74 th simpleContent\n+000f1f50: 2061 7265 2064 6566 696e 6564 2061 7320 are defined as \n+000f1f60: 666f 6c6c 6f77 733a 3c2f 703e 0a3c 6469 follows:

    .
    typed\n+000f1fb0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef char \n+000f1fe0: 2a6e 735f 5f73 7472 696e 6732 3536 2030 *ns__string256 0\n+000f1ff0: 3a32 3536 3b20 3c73 7061 6e20 636c 6173 :256; // s\n+000f2010: 696d 706c 6554 7970 6520 7265 7374 7269 impleType restri\n+000f2020: 6374 696f 6e20 6f66 2073 7472 696e 6720 ction of string \n+000f2030: 7769 7468 206d 6178 206c 656e 6774 6820 with max length \n+000f2040: 3235 3620 6368 6172 6163 7465 7273 203c 256 characters <\n+000f2050: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+000f2070: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f2080: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef ch\n+000f20b0: 6172 3c2f 7370 616e 3e20 2a6e 735f 5f73 ar *ns__s\n+000f20c0: 7472 696e 6731 3020 3130 3a31 303b 203c tring10 10:10; <\n+000f20d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f20e0: 656e 7422 3e2f 2f20 7369 6d70 6c65 5479 ent\">// simpleTy\n+000f20f0: 7065 2072 6573 7472 6963 7469 6f6e 206f pe restriction o\n+000f2100: 6620 7374 7269 6e67 2077 6974 6820 6c65 f string with le\n+000f2110: 6e67 7468 206f 6620 3130 2063 6861 7261 ngth of 10 chara\n+000f2120: 6374 6572 7320 3c2f 7370 616e 3e3c 2f64 cters
    .
    type\n+000f2160: 6465 663c 2f73 7061 6e3e 2073 7464 3a3a def std::\n+000f2170: 7374 7269 6e67 202a 6e73 5f5f 7374 7269 string *ns__stri\n+000f2180: 6e67 3820 383b 203c 7370 616e 2063 6c61 ng8 8; // \n+000f21a0: 7369 6d70 6c65 5479 7065 2072 6573 7472 simpleType restr\n+000f21b0: 6963 7469 6f6e 206f 6620 7374 7269 6e67 iction of string\n+000f21c0: 2077 6974 6820 6174 206c 6561 7374 2038 with at least 8\n+000f21d0: 2063 6861 7261 6374 6572 7320 3c2f 7370 characters
    .
    struct \n+000f2220: 6e73 5f5f 6461 7461 203c 7370 616e 2063 ns__data /\n+000f2240: 2f20 7369 6d70 6c65 436f 6e74 656e 7420 / simpleContent \n+000f2250: 7772 6170 7065 7220 3c2f 7370 616e 3e3c wrapper <\n+000f2260: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+000f2280: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+000f22b0: 6368 6172 3c2f 7370 616e 3e20 2a5f 5f69 char *__i\n+000f22c0: 7465 6d20 3a32 3536 3b20 3c73 7061 6e20 tem :256; \n+000f22e0: 2f2f 2073 696d 706c 6543 6f6e 7465 6e74 // simpleContent\n+000f22f0: 2077 6974 6820 6174 206d 6f73 7420 3235 with at most 25\n+000f2300: 3620 6368 6172 6163 7465 7273 203c 2f73 6 characters
    .
    @\n+000f2330: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+000f2350: 2f73 7061 6e3e 202a 6e61 6d65 2031 3b20 /span> *name 1; \n+000f2360: 2020 2020 203c 7370 616e 2063 6c61 7373 // re\n+000f2380: 7175 6972 6564 206e 616d 6520 6174 7472 quired name attr\n+000f2390: 6962 7574 6520 3c2f 7370 616e 3e3c 2f64 ibute .
    };
    .\n+000f23c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000f23f0: 2f73 7061 6e3e 7469 6d65 5f5f 6461 7465 /span>time__date\n+000f2400: 203c 7370 616e 2063 6c61 7373 3d22 636f // simple\n+000f2420: 436f 6e74 656e 7420 7772 6170 7065 7220 Content wrapper \n+000f2430: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+000f2450: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    char *__item :100\n+000f24a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    @ <\n+000f24c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f24d0: 6f72 6422 3e65 6e75 6d3c 2f73 7061 6e3e ord\">enum\n+000f24e0: 2074 696d 655f 5f7a 6f6e 6520 7b20 4553 time__zone { ES\n+000f24f0: 542c 2047 4d54 2c20 2e2e 2e20 7d20 7a6f T, GMT, ... } zo\n+000f2500: 6e65 203d 2047 4d54 3b20 3c2f 6469 763e ne = GMT;
    \n+000f2510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    \n+000f3520: 5365 7420 7468 6520 3c63 6f64 653e 2353 Set the #S\n+000f3530: 4f41 505f 584d 4c5f 5354 5249 4354 3c2f OAP_XML_STRICT mode flag \n+000f3550: 746f 2065 6e61 626c 6520 7468 6520 7661 to enable the va\n+000f3560: 6c69 6461 7469 6f6e 206f 6620 7661 6c75 lidation of valu\n+000f3570: 6520 7261 6e67 6520 636f 6e73 7472 6169 e range constrai\n+000f3580: 6e74 732e 3c2f 703e 0a3c 703e 5365 6520 nts.

    .

    See \n+000f3590: 616c 736f 203c 6120 6872 6566 3d22 2e2e also C and C++ XML d\n+000f35d0: 6174 6120 6269 6e64 696e 6773 3c2f 613e ata bindings\n+000f35e0: 2064 6f63 756d 656e 7461 7469 6f6e 2066 documentation f\n+000f35f0: 6f72 206d 6f72 6520 6465 7461 696c 732e or more details.\n+000f3600: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+000f3620: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+000f3630: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+000f3640: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+000f3650: 2069 643d 2270 6174 7465 726e 636f 6e73 id=\"patterncons\n+000f3660: 7472 6169 6e74 7322 3e3c 2f61 3e0a 5061 traints\">.Pa\n+000f3670: 7474 6572 6e20 7265 7374 7269 6374 696f ttern restrictio\n+000f3680: 6e73 3c2f 6833 3e0a 3c70 3e50 6174 7465 ns

    .

    Patte\n+000f3690: 726e 7320 6361 6e20 6265 2064 6566 696e rns can be defin\n+000f36a0: 6564 2066 6f72 2073 696d 706c 6554 7970 ed for simpleTyp\n+000f36b0: 6520 636f 6e74 656e 742e 2048 6f77 6576 e content. Howev\n+000f36c0: 6572 2c20 7061 7474 6572 6e20 7661 6c69 er, pattern vali\n+000f36d0: 6461 7469 6f6e 2069 7320 6e6f 7420 656e dation is not en\n+000f36e0: 666f 7263 6564 2075 6e6c 6573 7320 7468 forced unless th\n+000f36f0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e so\n+000f3790: 6170 3a3a 6673 7661 6c69 6461 7465 3c2f ap::fsvalidate and s\n+000f3850: 6f61 703a 3a66 7776 616c 6964 6174 653c oap::fwvalidate<\n+000f3860: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a> callb\n+000f3870: 6163 6b73 2061 7265 2073 6574 2074 6f20 acks are set to \n+000f3880: 6120 7265 6765 7820 6d61 7463 6865 722e a regex matcher.\n+000f3890: 3c2f 703e 0a3c 703e 546f 2061 7373 6f63

    .

    To assoc\n+000f38a0: 6961 7465 2061 2070 6174 7465 726e 2077 iate a pattern w\n+000f38b0: 6974 6820 6120 7369 6d70 6c65 5479 7065 ith a simpleType\n+000f38c0: 2c20 796f 7520 6361 6e20 6465 6669 6e65 , you can define\n+000f38d0: 2061 2073 696d 706c 6554 7970 6520 7769 a simpleType wi\n+000f38e0: 7468 2061 203c 636f 6465 3e74 7970 6564 th a typed\n+000f38f0: 6566 3c2f 636f 6465 3e20 616e 6420 6120 ef and a \n+000f3900: 7061 7474 6572 6e20 7374 7269 6e67 3a3c pattern string:<\n+000f3910: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    typedef\n+000f3960: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int time__seco\n+000f3990: 6e64 203c 7370 616e 2063 6c61 7373 3d22 nd &\n+000f39b0: 7175 6f74 3b5b 312d 355d 3f5b 302d 395d quot;[1-5]?[0-9]\n+000f39c0: 7c36 3026 7175 6f74 3b3c 2f73 7061 6e3e |60"\n+000f39d0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+000f39f0: 703e 5468 6973 2064 6566 696e 6573 2074 p>This defines t\n+000f3a00: 6865 2066 6f6c 6c6f 7769 6e67 2073 6368 he following sch\n+000f3a10: 656d 6120 7479 7065 2069 6e20 3c65 6d3e ema type in \n+000f3a20: 3c63 6f64 653e 7469 6d65 2e78 7364 3c2f time.xsd:

    .\n+000f3a40: 3c64 6976 2063 6c61 7373 3d22 616c 7422
    <simpleTy\n+000f3aa0: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe \n+000f3ac0: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="se\n+000f3af0: 636f 6e64 2671 756f 743b 3c2f 7370 616e cond">
    . \n+000f3b20: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <r\n+000f3b40: 6573 7472 6963 7469 6f6e 3c2f 7370 616e estriction base=\n+000f3b90: 2671 756f 743b 7873 643a 696e 7426 7175 "xsd:int&qu\n+000f3ba0: 6f74 3b3c 2f73 7061 6e3e 2667 743b 203c ot;> <\n+000f3bb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+000f3bd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 patter\n+000f3bf0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n v\n+000f3c10: 616c 7565 3c2f 7370 616e 3e3d 3c73 7061 alue="[1\n+000f3c40: 2d35 5d3f 5b30 2d39 5d7c 3630 2671 756f -5]?[0-9]|60&quo\n+000f3c50: 743b 3c2f 7370 616e 3e2f 2667 743b 203c t;/> <\n+000f3c60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    </<\n+000f3c80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f3c90: 6f72 6474 7970 6522 3e72 6573 7472 6963 ordtype\">restric\n+000f3ca0: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b20 tion> \n+000f3cb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </simpleTy\n+000f3cf0: 7065 3c2f 7370 616e 3e26 6774 3b3c 2f64 pe>.

    The \n+000f3d40: 7061 7474 6572 6e20 7374 7269 6e67 206d pattern string m\n+000f3d50: 7573 7420 636f 6e74 6169 6e20 6120 7661 ust contain a va\n+000f3d60: 6c69 6420 7265 6775 6c61 7220 6578 7072 lid regular expr\n+000f3d70: 6573 7369 6f6e 2e3c 2f70 3e0a 3c70 3e41 ession.

    .

    A\n+000f3d80: 2073 7065 6369 616c 2063 6173 6520 666f special case fo\n+000f3d90: 7220 4320 666f 726d 6174 2073 7472 696e r C format strin\n+000f3da0: 6720 7061 7474 6572 6e73 2069 7320 696e g patterns is in\n+000f3db0: 7472 6f64 7563 6564 2069 6e20 6753 4f41 troduced in gSOA\n+000f3dc0: 5020 322e 382e 3138 2e20 5768 656e 203c P 2.8.18. When <\n+000f3dd0: 656d 3e3c 636f 6465 3e78 7364 3a74 6f74 em>xsd:tot\n+000f3de0: 616c 4469 6769 7473 3c2f 636f 6465 3e3c alDigits<\n+000f3df0: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and xsd:fractionD\n+000f3e10: 6967 6974 733c 2f63 6f64 653e 3c2f 656d igits are given in a\n+000f3e30: 2058 5344 2066 696c 652c 2074 6865 6e20 XSD file, then \n+000f3e40: 6120 4320 666f 726d 6174 2073 7472 696e a C format strin\n+000f3e50: 6720 6973 2070 726f 6475 6365 6420 746f g is produced to\n+000f3e60: 206f 7574 7075 7420 666c 6f61 7469 6e67 output floating\n+000f3e70: 2070 6f69 6e74 2076 616c 7565 7320 7769 point values wi\n+000f3e80: 7468 2074 6865 2070 726f 7065 7220 7072 th the proper pr\n+000f3e90: 6563 6973 696f 6e20 616e 6420 7363 616c ecision and scal\n+000f3ea0: 652e 2046 6f72 2065 7861 6d70 6c65 3a3c e. For example:<\n+000f3eb0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    &l\n+000f3ef0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;simp\n+000f3f10: 6c65 5479 7065 3c2f 7370 616e 3e20 3c73 leType name=\n+000f3f40: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f3f60: 743b 7261 7469 6f26 7175 6f74 3b3c 2f73 t;ratio">
    .\n+000f3f80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <restriction base<\n+000f3fe0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:flo\n+000f4010: 6174 2671 756f 743b 3c2f 7370 616e 3e26 at"&\n+000f4020: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    \n+000f4040: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <t\n+000f4060: 6f74 616c 4469 6769 7473 3c2f 7370 616e otalDigits value="5"/> .
    <fractionDi\n+000f4110: 6769 7473 3c2f 7370 616e 3e20 3c73 7061 gits value=<\n+000f4140: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f4150: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f4160: 3b32 2671 756f 743b 3c2f 7370 616e 3e2f ;2"/\n+000f4170: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    . \n+000f4190: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </r\n+000f41b0: 6573 7472 6963 7469 6f6e 3c2f 7370 616e estriction>
    .&\n+000f41e0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/si\n+000f4200: 6d70 6c65 5479 7065 3c2f 7370 616e 3e26 mpleType&\n+000f4210: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
    .
    \n+000f4220: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    T\n+000f4320: 6865 2066 6f72 6d61 7420 7374 7269 6e67 he format string\n+000f4330: 2069 7320 7573 6564 2074 6f20 666f 726d is used to form\n+000f4340: 6174 2074 6865 206f 7574 7075 7420 7468 at the output th\n+000f4350: 6520 666c 6f61 7469 6e67 2070 6f69 6e74 e floating point\n+000f4360: 2076 616c 7565 2069 6e20 584d 4c2e 3c2f value in XML..

    See also <\n+000f4380: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 6461 a href=\"../../da\n+000f4390: 7461 6269 6e64 696e 672f 6874 6d6c 2f69 tabinding/html/i\n+000f43a0: 6e64 6578 2e68 746d 6c22 3e43 2061 6e64 ndex.html\">C and\n+000f43b0: 2043 2b2b 2058 4d4c 2064 6174 6120 6269 C++ XML data bi\n+000f43c0: 6e64 696e 6773 3c2f 613e 2064 6f63 756d ndings docum\n+000f43d0: 656e 7461 7469 6f6e 2066 6f72 206d 6f72 entation for mor\n+000f43e0: 6520 6465 7461 696c 732e 3c2f 703e 0a3c e details.

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

    .

    .E\n+000f4450: 6c65 6d65 6e74 2061 6e64 2061 7474 7269 lement and attri\n+000f4460: 6275 7465 2071 7561 6c69 6669 6564 2f75 bute qualified/u\n+000f4470: 6e71 7561 6c69 6669 6564 2066 6f72 6d73 nqualified forms\n+000f4480: 3c2f 6832 3e0a 3c70 3e53 7472 7563 742c

    .

    Struct,\n+000f4490: 2063 6c61 7373 2c20 616e 6420 756e 696f class, and unio\n+000f44a0: 6e20 6d65 6d62 6572 7320 7265 7072 6573 n members repres\n+000f44b0: 656e 7420 656c 656d 656e 7473 2061 6e64 ent elements and\n+000f44c0: 2061 7474 7269 6275 7465 7320 7468 6174 attributes that\n+000f44d0: 2061 7265 2061 7574 6f6d 6174 6963 616c are automatical\n+000f44e0: 6c79 2071 7561 6c69 6669 6564 206f 7220 ly qualified or \n+000f44f0: 756e 7175 616c 6966 6965 6420 6465 7065 unqualified depe\n+000f4500: 6e64 696e 6720 6f6e 2074 6865 2073 6368 nding on the sch\n+000f4510: 656d 6120 656c 656d 656e 7420 616e 6420 ema element and \n+000f4520: 6174 7472 6962 7574 6520 6465 6661 756c attribute defaul\n+000f4530: 7420 666f 726d 7320 7370 6563 6966 6965 t forms specifie\n+000f4540: 642e 2054 6865 2065 6e67 696e 6520 616c d. The engine al\n+000f4550: 7761 7973 2076 616c 6964 6174 6573 2074 ways validates t\n+000f4560: 6865 2070 7265 6669 7865 7320 6f66 2065 he prefixes of e\n+000f4570: 6c65 6d65 6e74 7320 616e 6420 6174 7472 lements and attr\n+000f4580: 6962 7574 6573 2e20 5768 656e 2061 206e ibutes. When a n\n+000f4590: 616d 6573 7061 6365 206d 6973 6d61 7463 amespace mismatc\n+000f45a0: 6820 6f63 6375 7273 2c20 7468 6520 656c h occurs, the el\n+000f45b0: 656d 656e 7420 6f72 2061 7474 7269 6275 ement or attribu\n+000f45c0: 7465 2069 7320 6e6f 7420 636f 6e73 756d te is not consum\n+000f45d0: 6564 2077 6869 6368 2063 616e 206c 6561 ed which can lea\n+000f45e0: 6420 746f 2061 2076 616c 6964 6174 696f d to a validatio\n+000f45f0: 6e20 6572 726f 7220 2875 6e6c 6573 7320 n error (unless \n+000f4600: 7468 6520 636f 6d70 6c65 7854 7970 6520 the complexType \n+000f4610: 6973 2065 7874 656e 7369 626c 6520 6f72 is extensible or\n+000f4620: 2077 6865 6e20 3c63 6f64 653e 2353 4f41 when #SOA\n+000f4630: 505f 584d 4c5f 5354 5249 4354 3c2f 636f P_XML_STRICT is turned of\n+000f4650: 6629 2e3c 2f70 3e0a 3c70 3e43 6f6e 7369 f).

    .

    Consi\n+000f4660: 6465 7220 666f 7220 6578 616d 706c 653a der for example:\n+000f4670: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns sc\n+000f46c0: 6865 6d61 2065 6c65 6d65 6e74 466f 726d hema elementForm\n+000f46d0: 3a20 7175 616c 6966 6965 6420 3c2f 7370 : qualified
    .
    //gsoap ns sch\n+000f4720: 656d 6120 6174 7472 6962 7574 6546 6f72 ema attributeFor\n+000f4730: 6d3a 2075 6e71 7561 6c69 6669 6564 203c m: unqualified <\n+000f4740: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+000f4760: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f4770: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__record .
    {
    .<\n+000f47b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f47c0: 3e20 2040 203c 7370 616e 2063 6c61 7373 > @ c\n+000f47e0: 6861 723c 2f73 7061 6e3e 202a 2074 7970 har * typ\n+000f47f0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    \n+000f4810: 3c73 7061 6e20 636c 6173 733d 226b 6579 char * name; .
    };
    .\n+000f4860: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Here, \n+000f4880: 7468 6520 3c63 6f64 653e 6e73 5f5f 7265 the ns__re\n+000f4890: 636f 7264 3c2f 636f 6465 3e20 7374 7275 cord stru\n+000f48a0: 6374 2069 7320 7365 7269 616c 697a 6564 ct is serialized\n+000f48b0: 2077 6974 6820 7175 616c 6966 6965 6420 with qualified \n+000f48c0: 656c 656d 656e 7420 3c63 6f64 653e 6e61 element na\n+000f48d0: 6d65 3c2f 636f 6465 3e20 616e 6420 756e me and un\n+000f48e0: 7175 616c 6966 6965 6420 6174 7472 6962 qualified attrib\n+000f48f0: 7574 6520 3c63 6f64 653e 7479 7065 3c2f ute type:

    .
    <ns:record type="..."\n+000f49c0: 3b3c 2f73 7061 6e3e 2667 743b 203c 2f64 ;> .
    <ns:name>...</\n+000f4a20: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:nam\n+000f4a40: 653c 2f73 7061 6e3e 2667 743b 203c 2f64 e> .
    </ns:record>
    .\n+000f4aa0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    The \"colon nota\n+000f4ad0: 7469 6f6e 2220 666f 7220 7374 7275 6374 tion\" for struct\n+000f4ae0: 2f63 6c61 7373 2f75 6e69 6f6e 206d 656d /class/union mem\n+000f4af0: 6265 7220 6e61 6d65 7320 6973 2075 7365 ber names is use\n+000f4b00: 6420 746f 206f 7665 7272 6964 6520 656c d to override el\n+000f4b10: 656d 656e 7420 616e 6420 6174 7472 6962 ement and attrib\n+000f4b20: 7574 6520 7175 616c 6966 6965 6420 6f72 ute qualified or\n+000f4b30: 2075 6e71 7561 6c69 6669 6564 2066 6f72 unqualified for\n+000f4b40: 6d73 2e20 546f 206f 7665 7272 6964 6520 ms. To override \n+000f4b50: 7468 6520 666f 726d 2066 6f72 2069 6e64 the form for ind\n+000f4b60: 6976 6964 7561 6c20 6d65 6d62 6572 7320 ividual members \n+000f4b70: 7468 6174 2072 6570 7265 7365 6e74 2065 that represent e\n+000f4b80: 6c65 6d65 6e74 7320 616e 6420 6174 7472 lements and attr\n+000f4b90: 6962 7574 6573 2c20 7573 6520 6120 6e61 ibutes, use a na\n+000f4ba0: 6d65 7370 6163 6520 7072 6566 6978 2061 mespace prefix a\n+000f4bb0: 6e64 2063 6f6c 6f6e 2077 6974 6820 7468 nd colon with th\n+000f4bc0: 6520 6d65 6d62 6572 206e 616d 653a 3c2f e member name:.
    //gsoap ns sche\n+000f4c20: 6d61 2065 6c65 6d65 6e74 466f 726d 3a20 ma elementForm: \n+000f4c30: 7175 616c 6966 6965 6420 3c2f 7370 616e qualified
    .
    \n+000f4c70: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem\n+000f4c80: 6120 6174 7472 6962 7574 6546 6f72 6d3a a attributeForm:\n+000f4c90: 2075 6e71 7561 6c69 6669 6564 203c 2f73 unqualified
    .
    struct ns__record .
    {
    . \n+000f4d20: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n+000f4d40: 723c 2f73 7061 6e3e 202a 206e 733a 7479 r * ns:ty\n+000f4d50: 7065 3b20 3c2f 6469 763e 0a3c 6469 7620 pe;
    .
    \n+000f4d70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+000f4d90: 2f73 7061 6e3e 202a 203a 6e61 6d65 3b20 /span> * :name; \n+000f4da0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };.

    wher\n+000f4de0: 6520 3c63 6f64 653e 6e61 6d65 3c2f 636f e name is unqualifi\n+000f4e00: 6564 2061 6e64 203c 636f 6465 3e74 7970 ed and typ\n+000f4e10: 653c 2f63 6f64 653e 2069 7320 7175 616c e is qual\n+000f4e20: 6966 6965 643a 3c2f 703e 0a3c 6469 7620 ified:

    .
    <ns:record ns:typ\n+000f4eb0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="...&q\n+000f4ee0: 756f 743b 3c2f 7370 616e 3e26 6774 3b20 uot;> \n+000f4ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <<\n+000f4f10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f4f20: 6f72 6474 7970 6522 3e6e 616d 653c 2f73 ordtype\">name>...</\n+000f4f40: 3c73 7061 6e20 636c 6173 733d 226b 6579 name>
    \n+000f4f70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </ns:record>
    .

    Th\n+000f4fe0: 6520 636f 6c6f 6e20 6e6f 7461 7469 6f6e e colon notation\n+000f4ff0: 2069 7320 6120 7379 6e74 6163 7469 6320 is a syntactic \n+000f5000: 6e6f 7461 7469 6f6e 2075 7365 6420 6f6e notation used on\n+000f5010: 6c79 2069 6e20 7468 6520 696e 7465 7266 ly in the interf\n+000f5020: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n+000f5030: 7379 6e74 6178 2c20 6974 2069 7320 6e6f syntax, it is no\n+000f5040: 7420 7472 616e 736c 6174 6564 2074 6f20 t translated to \n+000f5050: 7468 6520 432f 432b 2b20 6f75 7470 7574 the C/C++ output\n+000f5060: 2e3c 2f70 3e0a 3c70 3e54 6865 2063 6f6c .

    .

    The col\n+000f5070: 6f6e 206e 6f74 6174 696f 6e20 646f 6573 on notation does\n+000f5080: 206e 6f74 2061 766f 6964 206e 616d 6520 not avoid name \n+000f5090: 636c 6173 6865 7320 6265 7477 6565 6e20 clashes between \n+000f50a0: 6d65 6d62 6572 732e 2046 6f72 2065 7861 members. For exa\n+000f50b0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    \n+000f50d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000f5100: 2f73 7061 6e3e 785f 5f72 6563 6f72 6420 /span>x__record \n+000f5110: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+000f5130: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    @ char * n\n+000f5170: 616d 653b 203c 2f64 6976 3e0a 3c64 6976 ame;
    . \n+000f5190: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+000f51b0: 3c2f 7370 616e 3e20 2a20 783a 6e61 6d65 * x:name\n+000f51c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    };.

    re\n+000f5200: 7375 6c74 7320 696e 2061 2072 6564 6566 sults in a redef\n+000f5210: 696e 6974 696f 6e20 6572 726f 722c 2073 inition error, s\n+000f5220: 696e 6365 2062 6f74 6820 6d65 6d62 6572 ince both member\n+000f5230: 7320 6861 7665 2074 6865 2073 616d 6520 s have the same \n+000f5240: 6e61 6d65 2e20 546f 2061 766f 6964 206e name. To avoid n\n+000f5250: 616d 6520 636c 6173 6865 732c 2075 7365 ame clashes, use\n+000f5260: 2061 2075 6e64 6572 7363 6f72 6520 7375 a underscore su\n+000f5270: 6666 6978 3a3c 2f70 3e0a 3c64 6976 2063 ffix:

    .
    \n+000f5290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000f52c0: 2f73 7061 6e3e 785f 5f72 6563 6f72 6420 /span>x__record \n+000f52d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+000f52f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    @ char * n\n+000f5330: 616d 653b 203c 2f64 6976 3e0a 3c64 6976 ame;
    . \n+000f5350: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+000f5370: 3c2f 7370 616e 3e20 2a20 783a 6e61 6d65 * x:name\n+000f5380: 5f3b 203c 2f64 6976 3e0a 3c64 6976 2063 _;
    .
    };.

    N\n+000f53c0: 6f74 2074 6861 7420 7468 6520 6e61 6d65 ot that the name\n+000f53d0: 7370 6163 6520 7072 6566 6978 2063 6f6e space prefix con\n+000f53e0: 7665 6e74 696f 6e20 6361 6e20 6265 2075 vention can be u\n+000f53f0: 7365 6420 696e 7374 6561 643a 3c2f 703e sed instead:

    \n+000f5400: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+000f5440: 7472 7563 7420 3c2f 7370 616e 3e78 5f5f truct x__\n+000f5450: 7265 636f 7264 203c 2f64 6976 3e0a 3c64 record
    .\n+000f5470: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    @ char * name; .
    char *\n+000f5500: 2078 5f5f 6e61 6d65 3b20 3c2f 6469 763e x__name;
    \n+000f5510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    which avoi\n+000f5550: 6473 2074 6865 206e 616d 6520 636c 6173 ds the name clas\n+000f5560: 682e 2048 6f77 6576 6572 2c20 7468 6520 h. However, the \n+000f5570: 7265 7375 6c74 696e 6720 7363 6865 6d61 resulting schema\n+000f5580: 2069 7320 6469 6666 6572 656e 7420 7369 is different si\n+000f5590: 6e63 6520 7468 6520 6c61 7374 2065 7861 nce the last exa\n+000f55a0: 6d70 6c65 2067 656e 6572 6174 6573 2061 mple generates a\n+000f55b0: 2067 6c6f 6261 6c20 3c63 6f64 653e 6e61 global na\n+000f55c0: 6d65 3c2f 636f 6465 3e20 656c 656d 656e me elemen\n+000f55d0: 7420 6465 6669 6e69 7469 6f6e 2074 6861 t definition tha\n+000f55e0: 7420 6973 2072 6566 6572 656e 6365 6420 t is referenced \n+000f55f0: 6279 2074 6865 206c 6f63 616c 2065 6c65 by the local ele\n+000f5600: 6d65 6e74 2e3c 2f70 3e0a 3c70 3e4d 6f72 ment.

    .

    Mor\n+000f5610: 6520 7370 6563 6966 6963 616c 6c79 2c20 e specifically, \n+000f5620: 7468 6520 6469 6666 6572 656e 6365 2062 the difference b\n+000f5630: 6574 7765 656e 2074 6865 206e 616d 6573 etween the names\n+000f5640: 7061 6365 2070 7265 6669 7820 636f 6e76 pace prefix conv\n+000f5650: 656e 7469 6f6e 2077 6974 6820 646f 7562 ention with doub\n+000f5660: 6c65 2075 6e64 6572 7363 6f72 6573 2061 le underscores a\n+000f5670: 6e64 2063 6f6c 6f6e 206e 6f74 6174 696f nd colon notatio\n+000f5680: 6e20 6973 2074 6861 7420 7468 6520 6e61 n is that the na\n+000f5690: 6d65 7370 6163 6520 7072 6566 6978 2063 mespace prefix c\n+000f56a0: 6f6e 7665 6e74 696f 6e20 6765 6e65 7261 onvention genera\n+000f56b0: 7465 7320 7363 6865 6d61 2065 6c65 6d65 tes schema eleme\n+000f56c0: 6e74 2f61 7474 7269 6275 7465 2072 6566 nt/attribute ref\n+000f56d0: 6572 656e 6365 7320 746f 2065 6c65 6d65 erences to eleme\n+000f56e0: 6e74 732f 6174 7472 6962 7574 6573 2061 nts/attributes a\n+000f56f0: 7420 7468 6520 746f 7020 6c65 7665 6c2c t the top level,\n+000f5700: 2077 6869 6c65 2074 6865 2063 6f6c 6f6e while the colon\n+000f5710: 206e 6f74 6174 696f 6e20 6f6e 6c79 2061 notation only a\n+000f5720: 6666 6563 7473 2074 6865 206c 6f63 616c ffects the local\n+000f5730: 2065 6c65 6d65 6e74 2f61 7474 7269 6275 element/attribu\n+000f5740: 7465 206e 616d 6573 7061 6365 2071 7561 te namespace qua\n+000f5750: 6c69 6669 6361 7469 6f6e 2062 7920 666f lification by fo\n+000f5760: 726d 206f 7665 7272 6964 696e 672e 2054 rm overriding. T\n+000f5770: 6869 7320 6973 2062 6573 7420 696c 6c75 his is best illu\n+000f5780: 7374 7261 7465 6420 6279 2061 6e20 6578 strated by an ex\n+000f5790: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    struct \n+000f57e0: 3c2f 7370 616e 3e78 5f5f 7265 636f 7264 x__record\n+000f57f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    char * \n+000f5850: 3a6e 616d 653b 203c 2f64 6976 3e0a 3c64 :name;
    .\n+000f5870: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+000f5890: 6172 3c2f 7370 616e 3e20 2a20 783a 7068 ar * x:ph\n+000f58a0: 6f6e 653b 203c 2f64 6976 3e0a 3c64 6976 one;
    . \n+000f58c0: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+000f58e0: 3c2f 7370 616e 3e20 2a20 785f 5f66 6178 * x__fax\n+000f58f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+000f5910: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f5920: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char * y__zip; <\n+000f5940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    \n+000f5960: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    which\n+000f5980: 2067 656e 6572 6174 6573 2074 6865 2066 generates the f\n+000f5990: 6f6c 6c6f 7769 6e67 203c 656d 3e3c 636f ollowing x.xsd<\n+000f59b0: 2f65 6d3e 7363 6865 6d61 3a3c 2f70 3e0a /em>schema:

    .\n+000f59c0: 3c64 6976 2063 6c61 7373 3d22 616c 7422
    <complexT\n+000f5a20: 7970 653c 2f73 7061 6e3e 203c 7370 616e ype name="r\n+000f5a70: 6563 6f72 6426 7175 6f74 3b3c 2f73 7061 ecord">
    .\n+000f5aa0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000f5ac0: 7365 7175 656e 6365 3c2f 7370 616e 3e26 sequence&\n+000f5ad0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    \n+000f5af0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e\n+000f5b10: 6c65 6d65 6e74 3c2f 7370 616e 3e20 3c73 lement name=\n+000f5b40: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f5b60: 743b 6e61 6d65 2671 756f 743b 3c2f 7370 t;name" type="xsd:stri\n+000f5bc0: 6e67 2671 756f 743b 3c2f 7370 616e 3e20 ng" \n+000f5bd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 minOccurs<\n+000f5bf0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="0"\n+000f5c20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ma\n+000f5c40: 784f 6363 7572 733c 2f73 7061 6e3e 3d3c xOccurs=<\n+000f5c50: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f5c60: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f5c70: 3b31 2671 756f 743b 3c2f 7370 616e 3e20 ;1" \n+000f5c80: 3c73 7061 6e20 636c 6173 733d 226b 6579 nillable="true&quo\n+000f5cd0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+000f5cf0: 666f 726d 3c2f 7370 616e 3e3d 3c73 7061 form="un\n+000f5d20: 7175 616c 6966 6965 6426 7175 6f74 3b3c qualified"<\n+000f5d30: 2f73 7061 6e3e 2f26 6774 3b20 3c2f 6469 /span>/> .
    <element name\n+000f5da0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="phone&\n+000f5dd0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; type=<\n+000f5e00: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f5e10: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f5e20: 3b78 7364 3a73 7472 696e 6726 7175 6f74 ;xsd:string"\n+000f5e30: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; m\n+000f5e50: 696e 4f63 6375 7273 3c2f 7370 616e 3e3d inOccurs=\n+000f5e60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f5e80: 743b 3026 7175 6f74 3b3c 2f73 7061 6e3e t;0"\n+000f5e90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 maxOccurs\n+000f5eb0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="1"\n+000f5ee0: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; n\n+000f5f00: 696c 6c61 626c 653c 2f73 7061 6e3e 3d3c illable=<\n+000f5f10: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f5f20: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f5f30: 3b74 7275 6526 7175 6f74 3b3c 2f73 7061 ;true" form="qualified\n+000f5f90: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n+000f5fa0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    \n+000f5fc0: 266c 743b 3c73 7061 6e20 636c 6173 733d <el\n+000f5fe0: 656d 656e 743c 2f73 7061 6e3e 203c 7370 ement ref="\n+000f6030: 783a 6661 7826 7175 6f74 3b3c 2f73 7061 x:fax" minOccu\n+000f6060: 7273 3c2f 7370 616e 3e3d 3c73 7061 6e20 rs="0&qu\n+000f6090: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; maxOccurs=&q\n+000f60e0: 756f 743b 3126 7175 6f74 3b3c 2f73 7061 uot;1"/>
    .<\n+000f6100: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f6110: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <element ref=&\n+000f6180: 7175 6f74 3b79 3a7a 6970 2671 756f 743b quot;y:zip"\n+000f6190: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c mi\n+000f61b0: 6e4f 6363 7572 733c 2f73 7061 6e3e 3d3c nOccurs=<\n+000f61c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f61d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f61e0: 3b30 2671 756f 743b 3c2f 7370 616e 3e20 ;0" \n+000f61f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 maxOccurs<\n+000f6210: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="1"\n+000f6240: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
    </sequence<\n+000f6290: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
    </complexType>
    \n+000f62f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <element \n+000f6330: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n+000f6370: 756f 743b 6661 7826 7175 6f74 3b3c 2f73 uot;fax" type<\n+000f63a0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:str\n+000f63d0: 696e 6726 7175 6f74 3b3c 2f73 7061 6e3e ing"\n+000f63e0: 2f26 6774 3b3c 2f64 6976 3e0a 3c2f 6469 />
    .

    and\n+000f6410: 2074 6865 203c 656d 3e3c 636f 6465 3e79 the y\n+000f6420: 2e78 7364 3c2f 636f 6465 3e3c 2f65 6d3e .xsd\n+000f6430: 2073 6368 656d 6120 6465 6669 6e65 7320 schema defines \n+000f6440: 636f 6e74 6169 6e73 3a3c 2f70 3e0a 3c64 contains:

    . \n+000f6460: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    <element name<\n+000f64d0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="zip&quo\n+000f6500: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+000f6520: 7479 7065 3c2f 7370 616e 3e3d 3c73 7061 type="xs\n+000f6550: 643a 7374 7269 6e67 2671 756f 743b 3c2f d:string"/>
    \n+000f6570: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
    <\n+000f6590: 703e 5365 6520 616c 736f 203c 6120 6872 p>See also C and C++\n+000f65d0: 2058 4d4c 2064 6174 6120 6269 6e64 696e XML data bindin\n+000f65e0: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta\n+000f65f0: 7469 6f6e 2066 6f72 206d 6f72 6520 6465 tion for more de\n+000f6600: 7461 696c 732e 3c2f 703e 0a3c 703e f09f tails.

    .

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

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

    .XML nam\n+000f6670: 6573 7061 6365 7320 616e 6420 7468 6520 espaces and the \n+000f6680: 6e61 6d65 7370 6163 6520 6d61 7070 696e namespace mappin\n+000f6690: 6720 7461 626c 653c 2f68 313e 0a3c 703e g table

    .

    \n+000f66a0: 4120 6e61 6d65 7370 6163 6520 6d61 7070 A namespace mapp\n+000f66b0: 696e 6720 7461 626c 6520 7368 6f75 6c64 ing table should\n+000f66c0: 2062 6520 696e 636c 7564 6564 2069 6e20 be included in \n+000f66d0: 7468 6520 736f 7572 6365 2063 6f64 6520 the source code \n+000f66e0: 6f66 2063 6c69 656e 7420 616e 6420 7365 of client and se\n+000f66f0: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n+000f6700: 6e73 2e20 5468 6520 6d61 7070 696e 6720 ns. The mapping \n+000f6710: 7461 626c 6520 6973 2075 7365 6420 6279 table is used by\n+000f6720: 2074 6865 2073 6572 6961 6c69 7a65 7273 the serializers\n+000f6730: 2061 6e64 2064 6573 6572 6961 6c69 7a65 and deserialize\n+000f6740: 7273 206f 6620 7468 6520 7374 7562 2061 rs of the stub a\n+000f6750: 6e64 2073 6b65 6c65 746f 6e20 6675 6e63 nd skeleton func\n+000f6760: 7469 6f6e 7320 746f 2070 726f 6475 6365 tions to produce\n+000f6770: 2076 616c 6964 2058 4d4c 206d 6573 7361 valid XML messa\n+000f6780: 6765 7320 616e 6420 746f 2070 6172 7365 ges and to parse\n+000f6790: 2061 6e64 2076 616c 6964 6174 6520 584d and validate XM\n+000f67a0: 4c20 6d65 7373 6167 6573 2e20 4120 7479 L messages. A ty\n+000f67b0: 7069 6361 6c20 6d61 7070 696e 6720 7461 pical mapping ta\n+000f67c0: 626c 6520 6973 2073 686f 776e 2062 656c ble is shown bel\n+000f67d0: 6f77 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ow:

    .
    \n+000f6800: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct Namespace <\n+000f6860: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000f6870: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+000f6880: 705f 5f6e 616d 6573 7061 6365 2e68 746d p__namespace.htm\n+000f6890: 6c23 6761 6162 6661 6330 6133 6238 6433 l#gaabfac0a3b8d3\n+000f68a0: 3834 3938 6263 3565 3165 3362 6334 3635 8498bc5e1e3bc465\n+000f68b0: 6561 6436 223e 6e61 6d65 7370 6163 6573 ead6\">namespaces\n+000f68c0: 3c2f 613e 5b5d 203d 203c 2f64 6976 3e0a [] =
    .\n+000f68d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    // { "p\n+000f6920: 7265 6669 7826 7175 6f74 3b2c 2026 7175 refix", &qu\n+000f6930: 6f74 3b55 5249 2671 756f 743b 2c20 2671 ot;URI", &q\n+000f6940: 756f 743b 5552 492d 7061 7474 6572 6e26 uot;URI-pattern&\n+000f6950: 7175 6f74 3b20 286f 7074 696f 6e61 6c29 quot; (optional)\n+000f6960: 207d 203c 2f73 7061 6e3e 3c2f 6469 763e }
    \n+000f6970: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { "SOAP-EN\n+000f69b0: 5626 7175 6f74 3b3c 2f73 7061 6e3e 2c20 V", \n+000f69c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f69e0: 743b 6874 7470 3a2f 2f73 6368 656d 6173 t;http://schemas\n+000f69f0: 2e78 6d6c 736f 6170 2e6f 7267 2f73 6f61 .xmlsoap.org/soa\n+000f6a00: 702f 656e 7665 6c6f 7065 2f26 7175 6f74 p/envelope/"\n+000f6a10: 3b3c 2f73 7061 6e3e 207d 2c20 3c73 7061 ; }, // must be fir\n+000f6a40: 7374 203c 2f73 7061 6e3e 3c2f 6469 763e st
    \n+000f6a50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { "SOAP-EN\n+000f6a90: 4326 7175 6f74 3b3c 2f73 7061 6e3e 2c20 C", \n+000f6aa0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f6ac0: 743b 6874 7470 3a2f 2f73 6368 656d 6173 t;http://schemas\n+000f6ad0: 2e78 6d6c 736f 6170 2e6f 7267 2f73 6f61 .xmlsoap.org/soa\n+000f6ae0: 702f 656e 636f 6469 6e67 2f26 7175 6f74 p/encoding/"\n+000f6af0: 3b3c 2f73 7061 6e3e 207d 2c20 3c73 7061 ; }, // must be sec\n+000f6b20: 6f6e 6420 3c2f 7370 616e 3e3c 2f64 6976 ond .
    { "xsi&qu\n+000f6b70: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+000f6b80: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+000f6ba0: 6f74 3b68 7474 703a 2f2f 7777 772e 7733 ot;http://www.w3\n+000f6bb0: 2e6f 7267 2f32 3030 312f 584d 4c53 6368 .org/2001/XMLSch\n+000f6bc0: 656d 612d 696e 7374 616e 6365 2671 756f ema-instance&quo\n+000f6bd0: 743b 3c2f 7370 616e 3e20 7d2c 203c 7370 t; }, // must be th\n+000f6c00: 6972 6420 3c2f 7370 616e 3e3c 2f64 6976 ird .
    { "xsd&qu\n+000f6c50: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+000f6c60: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+000f6c80: 6f74 3b68 7474 703a 2f2f 7777 772e 7733 ot;http://www.w3\n+000f6c90: 2e6f 7267 2f32 3030 312f 584d 4c53 6368 .org/2001/XMLSch\n+000f6ca0: 656d 6126 7175 6f74 3b3c 2f73 7061 6e3e ema"\n+000f6cb0: 207d 2c20 2020 2020 2020 2020 203c 7370 }, // must be fo\n+000f6ce0: 7572 7468 3c2f 7370 616e 3e3c 2f64 6976 urth.
    { "ns&quo\n+000f6d30: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n+000f6d40: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+000f6d60: 6f74 3b75 726e 3a6d 792d 7365 7276 6963 ot;urn:my-servic\n+000f6d70: 652d 5552 4926 7175 6f74 3b3c 2f73 7061 e-URI" }, // b\n+000f6da0: 696e 6473 2026 7175 6f74 3b6e 7326 7175 inds "ns&qu\n+000f6db0: 6f74 3b20 6e61 6d65 7370 6163 6520 7072 ot; namespace pr\n+000f6dc0: 6566 6978 2074 6f20 7363 6865 6d61 2055 efix to schema U\n+000f6dd0: 5249 3c2f 7370 616e 3e3c 2f64 6976 3e0a RI
    .\n+000f6de0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { NULL, NULL\n+000f6e00: 207d 203c 7370 616e 2063 6c61 7373 3d22 } // end \n+000f6e20: 6f66 2074 6162 6c65 203c 2f73 7061 6e3e of table \n+000f6e30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .

    Eac\n+000f6e70: 6820 6e61 6d65 7370 6163 6520 7072 6566 h namespace pref\n+000f6e80: 6978 2075 7365 6420 6279 2061 2069 6465 ix used by a ide\n+000f6e90: 6e74 6966 6965 7220 6e61 6d65 2069 6e20 ntifier name in \n+000f6ea0: 7468 6520 6865 6164 6572 2066 696c 6520 the header file \n+000f6eb0: 7370 6563 6966 6963 6174 696f 6e2c 2073 specification, s\n+000f6ec0: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section C/C++ identif\n+000f6f00: 6965 7220 6e61 6d65 2074 6f20 584d 4c20 ier name to XML \n+000f6f10: 7461 6720 6e61 6d65 2074 7261 6e73 6c61 tag name transla\n+000f6f20: 7469 6f6e 3c2f 613e 2c20 6d75 7374 2068 tion, must h\n+000f6f30: 6176 6520 6120 6269 6e64 696e 6720 746f ave a binding to\n+000f6f40: 2061 206e 616d 6573 7061 6365 2055 5249 a namespace URI\n+000f6f50: 2069 6e20 7468 6520 6d61 7070 696e 6720 in the mapping \n+000f6f60: 7461 626c 652e 2054 6865 2065 6e64 206f table. The end o\n+000f6f70: 6620 7468 6520 6e61 6d65 7370 6163 6520 f the namespace \n+000f6f80: 6d61 7070 696e 6720 7461 626c 6520 6d75 mapping table mu\n+000f6f90: 7374 2062 6520 696e 6469 6361 7465 6420 st be indicated \n+000f6fa0: 6279 2074 6865 204e 554c 4c20 7061 6972 by the NULL pair\n+000f6fb0: 2e20 5468 6520 6e61 6d65 7370 6163 6520 . The namespace \n+000f6fc0: 5552 4920 6d61 7463 6869 6e67 2069 7320 URI matching is \n+000f6fd0: 6361 7365 2069 6e73 656e 7369 7469 7665 case insensitive\n+000f6fe0: 2e20 4120 6e61 6d65 7370 6163 6520 7072 . A namespace pr\n+000f6ff0: 6566 6978 2069 7320 6469 7374 696e 6775 efix is distingu\n+000f7000: 6973 6865 6420 6279 2074 6865 206f 6363 ished by the occ\n+000f7010: 7572 7265 6e63 6520 6f66 2061 2070 6169 urrence of a pai\n+000f7020: 7220 6f66 2075 6e64 6572 7363 6f72 6573 r of underscores\n+000f7030: 2028 3c63 6f64 653e 5f5f 3c2f 636f 6465 (__) in an identif\n+000f7050: 6965 7220 6f72 2062 7920 7573 696e 6720 ier or by using \n+000f7060: 636f 6c6f 6e20 6e6f 7461 7469 6f6e 2c20 colon notation, \n+000f7070: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section C/C++ identi\n+000f70b0: 6669 6572 206e 616d 6520 746f 2058 4d4c fier name to XML\n+000f70c0: 2074 6167 206e 616d 6520 7472 616e 736c tag name transl\n+000f70d0: 6174 696f 6e3c 2f61 3e2e 3c2f 703e 0a3c ation.

    .<\n+000f70e0: 703e 416e 206f 7074 696f 6e61 6c20 7468 p>An optional th\n+000f70f0: 6972 6420 636f 6c75 6d6e 2069 6e20 7468 ird column in th\n+000f7100: 6520 6e61 6d65 7370 6163 6520 6d61 7070 e namespace mapp\n+000f7110: 696e 6720 7461 626c 6520 6d61 7920 6265 ing table may be\n+000f7120: 2073 7065 6369 6669 6564 2074 6861 7420 specified that \n+000f7130: 636f 6e74 6169 6e73 2061 206e 616d 6573 contains a names\n+000f7140: 7061 6365 2055 5249 2070 6174 7465 726e pace URI pattern\n+000f7150: 2e20 5468 6520 7061 7474 6572 6e73 2070 . The patterns p\n+000f7160: 726f 7669 6465 2061 6e20 616c 7465 726e rovide an altern\n+000f7170: 6174 6976 6520 6e61 6d65 7370 6163 6520 ative namespace \n+000f7180: 666f 7220 7468 6520 7661 6c69 6461 7469 for the validati\n+000f7190: 6f6e 206f 6620 7061 7273 6564 2058 4d4c on of parsed XML\n+000f71a0: 206d 6573 7361 6765 732e 2049 6e20 7468 messages. In th\n+000f71b0: 6973 2070 6174 7465 726e 2c20 6461 7368 is pattern, dash\n+000f71c0: 6573 2028 3c63 6f64 653e 2d3c 2f63 6f64 es (-) are single-c\n+000f71e0: 6861 7261 6374 6572 2077 696c 6463 6172 haracter wildcar\n+000f71f0: 6473 2061 6e64 2061 7374 6572 6973 6b73 ds and asterisks\n+000f7200: 2028 3c63 6f64 653e 2a3c 2f63 6f64 653e (*\n+000f7210: 2920 6172 6520 6d75 6c74 692d 6368 6172 ) are multi-char\n+000f7220: 6163 7465 7220 7769 6c64 6361 7264 732e acter wildcards.\n+000f7230: 2046 6f72 2065 7861 6d70 6c65 2c20 746f For example, to\n+000f7240: 2061 6363 6570 7420 616c 7465 726e 6174 accept alternat\n+000f7250: 6976 6520 7665 7273 696f 6e73 206f 6620 ive versions of \n+000f7260: 584d 4c20 7363 6865 6d61 7320 7769 7468 XML schemas with\n+000f7270: 2064 6966 6665 7265 6e74 2061 7574 686f different autho\n+000f7280: 7269 6e67 2064 6174 6573 2c20 666f 7572 ring dates, four\n+000f7290: 2064 6173 6865 7320 6361 6e20 6265 2075 dashes can be u\n+000f72a0: 7365 6420 696e 2070 6c61 6365 206f 6620 sed in place of \n+000f72b0: 7468 6520 7370 6563 6966 6963 2064 6174 the specific dat\n+000f72c0: 6573 2069 6e20 7468 6520 6e61 6d65 7370 es in the namesp\n+000f72d0: 6163 6520 6d61 7070 696e 6720 7461 626c ace mapping tabl\n+000f72e0: 6520 7061 7474 6572 6e3a 3c2f 703e 0a3c e pattern:

    .<\n+000f72f0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000f7300: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+000f7330: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct Namespac\n+000f7370: 653c 2f61 3e20 3c61 2063 6c61 7373 3d22 e nam\n+000f73d0: 6573 7061 6365 733c 2f61 3e5b 5d20 3d20 espaces[] = \n+000f73e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+000f7400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // { \n+000f7430: 2671 756f 743b 7072 6566 6978 2671 756f "prefix&quo\n+000f7440: 743b 2c20 2671 756f 743b 5552 4926 7175 t;, "URI&qu\n+000f7450: 6f74 3b2c 2026 7175 6f74 3b55 5249 2d70 ot;, "URI-p\n+000f7460: 6174 7465 726e 2671 756f 743b 2028 6f70 attern" (op\n+000f7470: 7469 6f6e 616c 2920 7d20 3c2f 7370 616e tional) }
    .
    { "\n+000f74c0: 534f 4150 2d45 4e56 2671 756f 743b 3c2f SOAP-ENV", "http://\n+000f7500: 7363 6865 6d61 732e 786d 6c73 6f61 702e schemas.xmlsoap.\n+000f7510: 6f72 672f 736f 6170 2f65 6e76 656c 6f70 org/soap/envelop\n+000f7520: 652f 2671 756f 743b 3c2f 7370 616e 3e20 e/" \n+000f7530: 7d2c 203c 7370 616e 2063 6c61 7373 3d22 }, // must\n+000f7550: 2062 6520 6669 7273 7420 3c2f 7370 616e be first
    .
    { "\n+000f75a0: 534f 4150 2d45 4e43 2671 756f 743b 3c2f SOAP-ENC", "http://\n+000f75e0: 7363 6865 6d61 732e 786d 6c73 6f61 702e schemas.xmlsoap.\n+000f75f0: 6f72 672f 736f 6170 2f65 6e63 6f64 696e org/soap/encodin\n+000f7600: 672f 2671 756f 743b 3c2f 7370 616e 3e20 g/" \n+000f7610: 7d2c 203c 7370 616e 2063 6c61 7373 3d22 }, // must\n+000f7630: 2062 6520 7365 636f 6e64 203c 2f73 7061 be second
    .
    { <\n+000f7660: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f7670: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f7680: 3b78 7369 2671 756f 743b 3c2f 7370 616e ;xsi", "http:/\n+000f76c0: 2f77 7777 2e77 332e 6f72 672f 3230 3031 /www.w3.org/2001\n+000f76d0: 2f58 4d4c 5363 6865 6d61 2d69 6e73 7461 /XMLSchema-insta\n+000f76e0: 6e63 6526 7175 6f74 3b3c 2f73 7061 6e3e nce"\n+000f76f0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+000f7710: 756f 743b 6874 7470 3a2f 2f77 7777 2e77 uot;http://www.w\n+000f7720: 332e 6f72 672f 2d2d 2d2d 2f58 4d4c 5363 3.org/----/XMLSc\n+000f7730: 6865 6d61 2d69 6e73 7461 6e63 6526 7175 hema-instance&qu\n+000f7740: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c2f ot; }, .
    { "xsd\n+000f7790: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n+000f77a0: 2020 2020 3c73 7061 6e20 636c 6173 733d \n+000f77c0: 2671 756f 743b 6874 7470 3a2f 2f77 7777 "http://www\n+000f77d0: 2e77 332e 6f72 672f 3230 3031 2f58 4d4c .w3.org/2001/XML\n+000f77e0: 5363 6865 6d61 2671 756f 743b 3c2f 7370 Schema", "http://ww\n+000f7820: 772e 7733 2e6f 7267 2f2d 2d2d 2d2f 584d w.w3.org/----/XM\n+000f7830: 4c53 6368 656d 6126 7175 6f74 3b3c 2f73 LSchema" },
    .<\n+000f7850: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f7860: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... //<\n+000f7880: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+000f78a0: 207b 204e 554c 4c2c 204e 554c 4c20 7d20 { NULL, NULL } \n+000f78b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // end of \n+000f78d0: 7461 626c 6520 3c2f 7370 616e 3e3c 2f64 table .
    };
    .<\n+000f7900: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Or alte\n+000f7920: 726e 6174 6976 656c 792c 2061 7374 6572 rnatively, aster\n+000f7930: 6973 6b73 2063 616e 2062 6520 7573 6564 isks can be used\n+000f7940: 2061 7320 7769 6c64 6361 7264 7320 666f as wildcards fo\n+000f7950: 7220 6d75 6c74 6970 6c65 2063 6861 7261 r multiple chara\n+000f7960: 6374 6572 733a 3c2f 703e 0a3c 6469 7620 cters:

    .
    struct \n+000f79b0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d Namespace namespa\n+000f7a50: 6365 733c 2f61 3e5b 5d20 3d20 3c2f 6469 ces[] = .
    {
    . \n+000f7a90: 203c 7370 616e 2063 6c61 7373 3d22 636f // { &quo\n+000f7ab0: 743b 7072 6566 6978 2671 756f 743b 2c20 t;prefix", \n+000f7ac0: 2671 756f 743b 5552 4926 7175 6f74 3b2c "URI",\n+000f7ad0: 2026 7175 6f74 3b55 5249 2d70 6174 7465 "URI-patte\n+000f7ae0: 726e 2671 756f 743b 2028 6f70 7469 6f6e rn" (option\n+000f7af0: 616c 2920 7d20 3c2f 7370 616e 3e3c 2f64 al) } .
    { "SOAP\n+000f7b40: 2d45 4e56 2671 756f 743b 3c2f 7370 616e -ENV", &\n+000f7b70: 7175 6f74 3b68 7474 703a 2f2f 7363 6865 quot;http://sche\n+000f7b80: 6d61 732e 786d 6c73 6f61 702e 6f72 672f mas.xmlsoap.org/\n+000f7b90: 736f 6170 2f65 6e76 656c 6f70 652f 2671 soap/envelope/&q\n+000f7ba0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n+000f7bb0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f7bc0: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent\">// must be \n+000f7bd0: 6669 7273 7420 3c2f 7370 616e 3e3c 2f64 first .
    { "SOAP\n+000f7c20: 2d45 4e43 2671 756f 743b 3c2f 7370 616e -ENC", &\n+000f7c50: 7175 6f74 3b68 7474 703a 2f2f 7363 6865 quot;http://sche\n+000f7c60: 6d61 732e 786d 6c73 6f61 702e 6f72 672f mas.xmlsoap.org/\n+000f7c70: 736f 6170 2f65 6e63 6f64 696e 672f 2671 soap/encoding/&q\n+000f7c80: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n+000f7c90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f7ca0: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent\">// must be \n+000f7cb0: 7365 636f 6e64 203c 2f73 7061 6e3e 3c2f second .
    { "xsi\n+000f7d00: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n+000f7d10: 2020 2020 3c73 7061 6e20 636c 6173 733d \n+000f7d30: 2671 756f 743b 6874 7470 3a2f 2f77 7777 "http://www\n+000f7d40: 2e77 332e 6f72 672f 3230 3031 2f58 4d4c .w3.org/2001/XML\n+000f7d50: 5363 6865 6d61 2d69 6e73 7461 6e63 6526 Schema-instance&\n+000f7d60: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+000f7d90: 6874 7470 3a2f 2f77 7777 2e77 332e 6f72 http://www.w3.or\n+000f7da0: 672f 2a2f 584d 4c53 6368 656d 612d 696e g/*/XMLSchema-in\n+000f7db0: 7374 616e 6365 2671 756f 743b 3c2f 7370 stance" },
    .\n+000f7de0: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+000f7e00: 2671 756f 743b 7873 6426 7175 6f74 3b3c "xsd"<\n+000f7e10: 2f73 7061 6e3e 2c20 2020 2020 203c 7370 /span>, "h\n+000f7e40: 7474 703a 2f2f 7777 772e 7733 2e6f 7267 ttp://www.w3.org\n+000f7e50: 2f32 3030 312f 584d 4c53 6368 656d 6126 /2001/XMLSchema&\n+000f7e60: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n+000f7e70: 2020 2020 2020 203c 7370 616e 2063 6c61 "http://\n+000f7ea0: 7777 772e 7733 2e6f 7267 2f2a 2f58 4d4c www.w3.org/*/XML\n+000f7eb0: 5363 6865 6d61 2671 756f 743b 3c2f 7370 Schema" },
    .\n+000f7ee0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... //
    . \n+000f7f20: 7b20 4e55 4c4c 2c20 4e55 4c4c 7d20 3c73 { NULL, NULL} // end of ta\n+000f7f50: 626c 6520 3c2f 7370 616e 3e3c 2f64 6976 ble .
    };
    .

    A namespa\n+000f7fa0: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table\n+000f7fb0: 2069 7320 6175 746f 6d61 7469 6361 6c6c is automaticall\n+000f7fc0: 7920 6765 6e65 7261 7465 6420 7769 7468 y generated with\n+000f7fd0: 2070 7265 6669 7865 7320 616e 6420 5552 prefixes and UR\n+000f7fe0: 4973 2069 6e20 7468 6520 7461 626c 6520 Is in the table \n+000f7ff0: 7468 6174 2061 7265 2064 6563 6c61 7265 that are declare\n+000f8000: 6420 7769 7468 203c 636f 6465 3e2f 2f67 d with //g\n+000f8010: 736f 6170 2026 6c74 3b70 7265 6669 7826 soap <prefix&\n+000f8020: 6774 3b20 7363 6865 6d61 206e 616d 6573 gt; schema names\n+000f8030: 7061 6365 3a3c 2f63 6f64 653e 2064 6972 pace: dir\n+000f8040: 6563 7469 7665 7320 696e 2074 6865 2069 ectives in the i\n+000f8050: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+000f8060: 6669 6c65 2c20 7365 6520 5365 6374 696f file, see Sectio\n+000f8070: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Dir\n+000f80a0: 6563 7469 7665 733c 2f61 3e2e 2049 6620 ectives. If \n+000f80b0: 6469 7265 6374 6976 6573 2061 7265 206e directives are n\n+000f80c0: 6f74 2070 726f 7669 6465 6420 696e 2074 ot provided in t\n+000f80d0: 6865 2068 6561 6465 7220 6669 6c65 2074 he header file t\n+000f80e0: 6865 6e20 6465 6661 756c 7420 5552 4973 hen default URIs\n+000f80f0: 206f 6620 7468 6520 666f 726d 203c 656d of the form h\n+000f8130: 7474 703a 2f2f 7465 6d70 7572 692e 6f72 ttp://tempuri.or\n+000f8140: 672f 7072 6566 6978 2e78 7364 3c2f 613e g/prefix.xsd\n+000f8150: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 6f72 for\n+000f8160: 2065 6163 6820 6e61 6d65 7370 6163 6520 each namespace \n+000f8170: 3c65 6d3e 3c63 6f64 653e 7072 6566 6978 prefix\n+000f8180: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5468 . Th\n+000f8190: 6520 736f 6170 6370 7032 2074 6f6f 6c20 e soapcpp2 tool \n+000f81a0: 616c 736f 2067 656e 6572 6174 6573 2061 also generates a\n+000f81b0: 2057 5344 4c20 616e 6420 6f6e 6520 6f72 WSDL and one or\n+000f81c0: 206d 6f72 6520 5853 4420 6669 6c65 732c more XSD files,\n+000f81d0: 206f 6e65 2066 6f72 2065 6163 6820 584d one for each XM\n+000f81e0: 4c20 6e61 6d65 7370 6163 652e 3c2f 703e L namespace.

    \n+000f81f0: 0a3c 703e 5768 656e 2070 6172 7369 6e67 .

    When parsing\n+000f8200: 2058 4d4c 2061 6e64 2064 6573 6572 6961 XML and deseria\n+000f8210: 6c69 7a69 6e67 2064 6174 612c 206e 616d lizing data, nam\n+000f8220: 6573 7061 6365 2055 5249 7320 696e 2074 espace URIs in t\n+000f8230: 6865 2058 4d4c 206d 6573 7361 6765 7320 he XML messages \n+000f8240: 6172 6520 6d61 7463 6865 6420 6167 6169 are matched agai\n+000f8250: 6e73 7420 7468 6520 7365 636f 6e64 2061 nst the second a\n+000f8260: 6e64 2074 6869 7264 2063 6f6c 756d 6e20 nd third column \n+000f8270: 6f66 2074 6865 206e 616d 6573 7061 6365 of the namespace\n+000f8280: 206d 6170 7069 6e67 2074 6162 6c65 2c20 mapping table, \n+000f8290: 7365 6172 6368 696e 6720 6672 6f6d 2074 searching from t\n+000f82a0: 6865 2074 6f70 2074 6f20 7468 6520 626f he top to the bo\n+000f82b0: 7474 6f6d 206f 6620 7468 6520 7461 626c ttom of the tabl\n+000f82c0: 652e 2054 6865 2061 6374 7561 6c20 7072 e. The actual pr\n+000f82d0: 6566 6978 2075 7365 6420 696e 2074 6865 efix used in the\n+000f82e0: 2058 4d4c 206d 6573 7361 6765 2069 7320 XML message is \n+000f82f0: 6972 7265 6c65 7661 6e74 2061 7320 7468 irrelevant as th\n+000f8300: 6520 5552 4920 6173 736f 6369 6174 6564 e URI associated\n+000f8310: 2077 6974 6820 7468 6520 7072 6566 6978 with the prefix\n+000f8320: 2069 7320 7265 6c65 7661 6e74 2074 6f20 is relevant to \n+000f8330: 6465 6669 6e65 2074 6865 2058 4d4c 206e define the XML n\n+000f8340: 616d 6573 7061 6365 2074 6f20 7768 6963 amespace to whic\n+000f8350: 6820 6120 7175 616c 6966 6965 6420 656c h a qualified el\n+000f8360: 656d 656e 7420 6f72 2061 7474 7269 6275 ement or attribu\n+000f8370: 7465 2062 656c 6f6e 6773 2e20 5768 656e te belongs. When\n+000f8380: 2061 206d 6174 6368 2069 7320 666f 756e a match is foun\n+000f8390: 642c 2074 6865 206e 616d 6573 7061 6365 d, the namespace\n+000f83a0: 2070 7265 6669 7820 696e 2074 6865 2066 prefix in the f\n+000f83b0: 6972 7374 2063 6f6c 756d 6e20 6f66 2074 irst column of t\n+000f83c0: 6865 2074 6162 6c65 2069 7320 636f 6e73 he table is cons\n+000f83d0: 6964 6572 6564 2073 656d 616e 7469 6361 idered semantica\n+000f83e0: 6c6c 7920 6964 656e 7469 6361 6c20 746f lly identical to\n+000f83f0: 2074 6865 206e 616d 6573 7061 6365 2070 the namespace p\n+000f8400: 7265 6669 7820 7573 6564 2062 7920 7468 refix used by th\n+000f8410: 6520 7175 616c 6966 6965 6420 584d 4c20 e qualified XML \n+000f8420: 656c 656d 656e 7420 616e 6420 6174 7472 element and attr\n+000f8430: 6962 7574 6520 7061 7273 6564 2c20 6576 ibute parsed, ev\n+000f8440: 656e 2077 6865 6e20 7468 6520 7072 6566 en when the pref\n+000f8450: 6978 206e 616d 6573 2064 6966 6665 722e ix names differ.\n+000f8460: 2054 6869 7320 6e6f 726d 616c 697a 6174 This normalizat\n+000f8470: 696f 6e20 6f66 2070 7265 6669 7865 7320 ion of prefixes \n+000f8480: 6973 2069 6e76 6973 6962 6c65 2074 6f20 is invisible to \n+000f8490: 7468 6520 7573 6572 206f 6620 6753 4f41 the user of gSOA\n+000f84a0: 5020 616e 6420 6d61 6b65 7320 636f 6469 P and makes codi\n+000f84b0: 6e67 2077 6974 6820 584d 4c20 6561 7369 ng with XML easi\n+000f84c0: 6572 2e20 466f 7220 6578 616d 706c 652c er. For example,\n+000f84d0: 2077 6865 6e20 5853 4420 514e 616d 6573 when XSD QNames\n+000f84e0: 2061 7265 2070 6172 7365 6420 696e 746f are parsed into\n+000f84f0: 2073 7472 696e 6773 2075 7369 6e67 2074 strings using t\n+000f8500: 6865 2062 7569 6c74 2d69 6e20 736f 6170 he built-in soap\n+000f8510: 6370 7032 203c 636f 6465 3e5f 514e 616d cpp2 _QNam\n+000f8520: 653c 2f63 6f64 653e 2074 7970 6520 6f72 e type or\n+000f8530: 2061 2051 4e61 6d65 2064 6563 6c61 7265 a QName declare\n+000f8540: 6420 7769 7468 203c 636f 6465 3e74 7970 d with typ\n+000f8550: 6564 6566 2073 7464 3a3a 7374 7269 6e67 edef std::string\n+000f8560: 2078 7364 5f5f 514e 616d 653c 2f63 6f64 xsd__QName, then this QN\n+000f8580: 616d 6520 7374 7269 6e67 2077 696c 6c20 ame string will \n+000f8590: 616c 7761 7973 2063 6f6e 7461 696e 2071 always contain q\n+000f85a0: 7561 6c69 6669 6564 206e 616d 6573 2077 ualified names w\n+000f85b0: 6974 6820 6e6f 726d 616c 697a 6564 2070 ith normalized p\n+000f85c0: 7265 6669 7865 732c 2069 2e65 2e20 7072 refixes, i.e. pr\n+000f85d0: 6566 6978 6573 2064 6566 696e 6564 2069 efixes defined i\n+000f85e0: 6e20 7468 6520 6e61 6d65 7370 6163 6520 n the namespace \n+000f85f0: 6d61 7070 696e 6720 7461 626c 652c 2075 mapping table, u\n+000f8600: 6e6c 6573 7320 7468 6520 7461 626c 6520 nless the table \n+000f8610: 6861 7320 6e6f 2065 6e74 7279 2c20 7365 has no entry, se\n+000f8620: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section \n+000f8650: 486f 7720 746f 2075 7365 2051 4e61 6d65 How to use QName\n+000f8660: 2061 7474 7269 6275 7465 7320 616e 6420 attributes and \n+000f8670: 656c 656d 656e 7473 3c2f 613e 2e3c 2f70 elements..

    For example\n+000f8690: 2c20 6c65 7427 7320 7361 7920 7765 2068 , let's say we h\n+000f86a0: 6176 6520 7468 6520 666f 6c6c 6f77 696e ave the followin\n+000f86b0: 6720 7374 7275 6374 733a 3c2f 703e 0a3c g structs:

    .<\n+000f86c0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000f86d0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+000f8700: 7563 7420 3c2f 7370 616e 3e61 5f5f 656c uct a__el\n+000f8710: 7420 7b20 2e2e 2e20 7d3b 203c 2f64 6976 t { ... }; .
    struct\n+000f8750: 203c 2f73 7061 6e3e 625f 5f65 6c74 207b b__elt {\n+000f8760: 202e 2e2e 207d 3b20 3c2f 6469 763e 0a3c ... };
    .<\n+000f8770: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f8780: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct k__elt { ..\n+000f87b0: 2e20 7d3b 203c 2f64 6976 3e0a 3c2f 6469 . };
    .

    The namesp\n+000f87e0: 6163 6520 6d61 7070 696e 6720 7461 626c ace mapping tabl\n+000f87f0: 6520 6765 6e65 7261 7465 6420 6279 2073 e generated by s\n+000f8800: 6f61 7063 7070 3220 6861 7320 7468 6520 oapcpp2 has the \n+000f8810: 666f 6c6c 6f77 696e 6720 656e 7472 6965 following entrie\n+000f8820: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n+000f8850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f8860: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct \n+000f88a0: 4e61 6d65 7370 6163 653c 2f61 3e20 3c61 Namespace namespaces<\n+000f8910: 2f61 3e5b 5d20 3d20 3c2f 6469 763e 0a3c /a>[] =
    .<\n+000f8920: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f8930: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    // { "pr\n+000f8970: 6566 6978 2671 756f 743b 2c20 2671 756f efix", &quo\n+000f8980: 743b 5552 4926 7175 6f74 3b2c 2026 7175 t;URI", &qu\n+000f8990: 6f74 3b55 5249 2d70 6174 7465 726e 2671 ot;URI-pattern&q\n+000f89a0: 756f 743b 2028 6f70 7469 6f6e 616c 2920 uot; (optional) \n+000f89b0: 7d20 3c2f 7370 616e 3e3c 2f64 6976 3e0a }
    .\n+000f89c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n+000f89f0: 2074 6865 2066 6f75 7220 534f 4150 2061 the four SOAP a\n+000f8a00: 6e64 2058 5344 206e 616d 6573 7061 6365 nd XSD namespace\n+000f8a10: 2062 696e 6469 6e67 733c 2f73 7061 6e3e bindings\n+000f8a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "a\n+000f8a60: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n+000f8a70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f8a80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f8a90: 3b68 7474 703a 2f2f 7465 6d70 7572 692e ;http://tempuri.\n+000f8aa0: 6f72 672f 612e 7873 6426 7175 6f74 3b3c org/a.xsd"<\n+000f8ab0: 2f73 7061 6e3e 207d 2c20 3c2f 6469 763e /span> },
    \n+000f8ac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { "b"\n+000f8b00: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "http:\n+000f8b30: 2f2f 7465 6d70 7572 692e 6f72 672f 622e //tempuri.org/b.\n+000f8b40: 7873 6426 7175 6f74 3b3c 2f73 7061 6e3e xsd"\n+000f8b50: 207d 2c20 3c2f 6469 763e 0a3c 6469 7620 },
    .
    {\n+000f8b70: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+000f8b90: 6f74 3b63 2671 756f 743b 3c2f 7370 616e ot;c", &\n+000f8bc0: 7175 6f74 3b68 7474 703a 2f2f 7465 6d70 quot;http://temp\n+000f8bd0: 7572 692e 6f72 672f 632e 7873 6426 7175 uri.org/c.xsd&qu\n+000f8be0: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c2f ot; }, .
    ... //.
    { NULL, N\n+000f8c50: 554c 4c20 7d3c 2f64 6976 3e0a 3c64 6976 ULL }
    .};\n+000f8c70: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Then, the follo\n+000f8ca0: 7769 6e67 2058 4d4c 2065 6c65 6d65 6e74 wing XML element\n+000f8cb0: 7320 7769 6c6c 206d 6174 6368 2074 6865 s will match the\n+000f8cc0: 7365 2073 7472 7563 7473 3a3c 2f70 3e0a se structs:

    .\n+000f8cd0: 3c64 6976 2063 6c61 7373 3d22 616c 7422
    <x:elt xmlns\n+000f8d50: 3a78 3c2f 7370 616e 3e3d 3c73 7061 6e20 :x="http\n+000f8d80: 3a2f 2f74 656d 7075 7269 2e6f 7267 2f61 ://tempuri.org/a\n+000f8d90: 2e78 7364 2671 756f 743b 3c2f 7370 616e .xsd">...</x:elt>
    .\n+000f8df0: 266c 743b 3c73 7061 6e20 636c 6173 733d <el\n+000f8e10: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t x\n+000f8e30: 6d6c 6e73 3c2f 7370 616e 3e3d 3c73 7061 mlns="ht\n+000f8e60: 7470 3a2f 2f74 656d 7075 7269 2e6f 7267 tp://tempuri.org\n+000f8e70: 2f62 2e78 7364 2671 756f 743b 3c2f 7370 /b.xsd">...</<\n+000f8e90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f8ea0: 6f72 6474 7970 6522 3e65 6c74 3c2f 7370 ordtype\">elt>
    .\n+000f8ed0: 266c 743b 3c73 7061 6e20 636c 6173 733d <zz\n+000f8ef0: 7a3a 656c 743c 2f73 7061 6e3e 203c 7370 z:elt xmlns:zzz=http:<\n+000f8f40: 2f73 7061 6e3e 2f2f 3c73 7061 6e20 636c /span>//te\n+000f8f60: 6d70 7572 692e 6f72 673c 2f73 7061 6e3e mpuri.org\n+000f8f70: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /c.xsd">...\n+000f8fa0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </z\n+000f8fc0: 7a7a 3a65 6c74 3c2f 7370 616e 3e26 6774 zz:elt>\n+000f8fd0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    \n+000f8ff0: 3c2f 6469 763e 3c70 3e49 6e73 7465 6164

    Instead\n+000f9000: 206f 6620 6f6e 6520 6269 6720 6e61 6d65 of one big name\n+000f9010: 7370 6163 6520 7461 626c 6520 7468 6174 space table that\n+000f9020: 2063 6f6e 7461 696e 7320 616c 6c20 584d contains all XM\n+000f9030: 4c20 6e61 6d65 7370 6163 6520 7072 6566 L namespace pref\n+000f9040: 6978 6573 2077 6974 6820 7468 6569 7220 ixes with their \n+000f9050: 5552 4973 2c20 7468 6572 6520 6172 6520 URIs, there are \n+000f9060: 6361 7365 7320 7768 656e 2069 7420 6973 cases when it is\n+000f9070: 2064 6573 6972 6162 6c65 2074 6f20 7573 desirable to us\n+000f9080: 6520 6d75 6c74 6970 6c65 206e 616d 6573 e multiple names\n+000f9090: 7061 6365 2074 6162 6c65 732c 206f 6e65 pace tables, one\n+000f90a0: 2066 6f72 2065 6163 6820 7365 7276 6963 for each servic\n+000f90b0: 652e 2054 6869 7320 6176 6f69 6473 206c e. This avoids l\n+000f90c0: 6561 6b69 6e67 206e 616d 6573 7061 6365 eaking namespace\n+000f90d0: 2070 7265 6669 7865 7320 696e 2058 4d4c prefixes in XML\n+000f90e0: 206d 6573 7361 6765 7320 7468 6174 2068 messages that h\n+000f90f0: 6176 6520 6e6f 7468 696e 6720 746f 2064 ave nothing to d\n+000f9100: 6f20 7769 7468 2074 6865 2073 6572 7669 o with the servi\n+000f9110: 6365 2069 6e76 6f6b 6564 2e20 496e 2070 ce invoked. In p\n+000f9120: 7269 6e63 6970 6c65 2074 6865 7265 2069 rinciple there i\n+000f9130: 7320 6e6f 2068 6172 6d20 746f 206c 6561 s no harm to lea\n+000f9140: 6b20 7468 6573 6520 6e61 6d65 7370 6163 k these namespac\n+000f9150: 6520 7072 6566 6978 6573 2c20 6275 7420 e prefixes, but \n+000f9160: 7468 6520 6d65 7373 6167 6573 2061 7265 the messages are\n+000f9170: 206c 6573 7320 636f 6d70 6163 7420 616e less compact an\n+000f9180: 6420 6e6f 7420 6173 2063 6c65 616e 2e20 d not as clean. \n+000f9190: 546f 2075 7365 206d 756c 7469 706c 6520 To use multiple \n+000f91a0: 6e61 6d65 7370 6163 6520 7461 626c 6573 namespace tables\n+000f91b0: 2061 7420 7468 6520 636c 6965 6e74 2073 at the client s\n+000f91c0: 6964 6520 6973 2064 6f6e 6520 6173 2066 ide is done as f\n+000f91d0: 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 ollows:

    ..
    \n+000f92b0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct Names\n+000f92f0: 7061 6365 3c2f 613e 206e 616d 6573 7061 pace namespa\n+000f9300: 6365 7354 6162 6c65 325b 5d20 3d20 7b20 cesTable2[] = { \n+000f9310: 2e2e 2e20 7d3b 203c 2f64 6976 3e0a 3c64 ... };
    .\n+000f9330: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct Namespace n\n+000f9390: 616d 6573 7061 6365 7354 6162 6c65 335b amespacesTable3[\n+000f93a0: 5d20 3d20 7b20 2e2e 2e20 7d3b 203c 2f64 ] = { ... }; .
    stru\n+000f93e0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct Namespace\n+000f9420: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *nam\n+000f9480: 6573 7061 6365 733c 2f61 3e3b 203c 2f64 espaces; .
    ... \n+000f94c0: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    .\n+000f94d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000f9500: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+000f9530: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+000f9560: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n+000f95c0: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .
    so\n+000f9640: 6170 5f73 6574 5f6e 616d 6573 7061 6365 ap_set_namespace\n+000f9650: 733c 2f61 3e28 3c61 2063 6c61 7373 3d22 s(soa\n+000f9680: 703c 2f61 3e2c 206e 616d 6573 7061 6365 p, namespace\n+000f9690: 5461 626c 6531 293b 203c 7370 616e 2063 Table1); /\n+000f96b0: 2f20 7573 6520 7468 6520 6669 7273 7420 / use the first \n+000f96c0: 6e61 6d65 7370 6163 6520 7461 626c 653c namespace table<\n+000f96d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+000f96f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f9700: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_re\n+000f9720: 6d6f 7465 5f6d 6574 686f 6428 3c61 2063 mote_method(soap, endpoint, Action, ...)\n+000f97c0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    ... \n+000f97e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    .

    Likewise, \n+000f9830: 6f6e 2074 6865 2073 6572 7665 7220 7369 on the server si\n+000f9840: 6465 2063 616c 6c20 3c63 6f64 653e 3c61 de call so\n+000f9910: 6170 5f73 6574 5f6e 616d 6573 7061 6365 ap_set_namespace\n+000f9920: 733c 2f61 3e3c 2f63 6f64 653e 2062 6566 s bef\n+000f9930: 6f72 6520 6361 6c6c 696e 6720 3c63 6f64 ore calling soap_serve<\n+000f99c0: 2f63 6f64 653e 2e20 4368 616e 6769 6e67 /code>. Changing\n+000f99d0: 2074 6865 206e 616d 6573 7061 6365 7320 the namespaces \n+000f99e0: 7461 626c 6520 696e 2073 6572 7669 6365 table in service\n+000f99f0: 206f 7065 7261 7469 6f6e 7320 6861 7320 operations has \n+000f9a00: 6e6f 2065 6666 6563 742e 3c2f 703e 0a3c no effect.

    .<\n+000f9a10: 703e 5468 6520 584d 4c20 6d65 7373 6167 p>The XML messag\n+000f9a20: 6573 2070 726f 6475 6365 6420 6279 2074 es produced by t\n+000f9a30: 6865 2067 534f 4150 2065 6e67 696e 6520 he gSOAP engine \n+000f9a40: 696e 636c 7564 6520 616c 6c20 3c65 6d3e include all \n+000f9a50: 3c63 6f64 653e 786d 6c73 6e3c 2f63 6f64 xmlsn namespac\n+000f9a70: 6520 6269 6e64 696e 6773 2069 6e20 7468 e bindings in th\n+000f9a80: 6520 726f 6f74 2065 6c65 6d65 6e74 2c20 e root element, \n+000f9a90: 7768 6963 6820 6973 2067 656e 6572 616c which is general\n+000f9aa0: 6c79 206d 6f72 6520 6566 6669 6369 656e ly more efficien\n+000f9ab0: 7420 666f 7220 6c61 7267 6572 2058 4d4c t for larger XML\n+000f9ac0: 2064 6f63 756d 656e 7473 2069 6e20 7768 documents in wh\n+000f9ad0: 6963 6820 6f74 6865 7277 6973 6520 7468 ich otherwise th\n+000f9ae0: 6520 3c65 6d3e 3c63 6f64 653e 786d 6c73 e xmls\n+000f9af0: 6e3c 2f63 6f64 653e 3c2f 656d 3e20 6e61 n na\n+000f9b00: 6d65 7370 6163 6520 6269 6e64 696e 6773 mespace bindings\n+000f9b10: 2077 696c 6c20 6265 2073 7072 696e 6b6c will be sprinkl\n+000f9b20: 6564 2074 6872 6f75 6768 6f75 742e 2042 ed throughout. B\n+000f9b30: 7920 636f 6e74 7261 7374 2c20 6361 6e6f y contrast, cano\n+000f9b40: 6e69 6361 6c20 584d 4c20 7265 7175 6972 nical XML requir\n+000f9b50: 6573 203c 656d 3e3c 636f 6465 3e78 6d6c es xml\n+000f9b60: 736e 3c2f 636f 6465 3e3c 2f65 6d3e 206e sn n\n+000f9b70: 616d 6573 7061 6365 2062 696e 6469 6e67 amespace binding\n+000f9b80: 7320 6f6e 6c79 2074 6f20 6265 2069 6e63 s only to be inc\n+000f9b90: 6c75 6465 6420 7768 656e 2075 7469 6c69 luded when utili\n+000f9ba0: 7a65 642e 2054 6865 7265 666f 7265 2c20 zed. Therefore, \n+000f9bb0: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n+000f9bc0: 584d 4c5f 4341 4e4f 4e49 4341 4c3c 2f63 XML_CANONICAL context fla\n+000f9be0: 6720 7072 6f64 7563 6573 2043 3134 4e20 g produces C14N \n+000f9bf0: 6578 636c 7573 6976 6520 584d 4c20 6d65 exclusive XML me\n+000f9c00: 7373 6167 6573 2061 6e64 2064 6f63 756d ssages and docum\n+000f9c10: 656e 7473 2c20 7768 6963 6820 656c 696d ents, which elim\n+000f9c20: 696e 6174 6573 2075 6e75 7365 6420 3c65 inates unused xmlsn
    namesp\n+000f9c50: 6163 6520 6269 6e64 696e 6773 2066 726f ace bindings fro\n+000f9c60: 6d20 584d 4c2e 2055 6e66 6f72 7475 6e61 m XML. Unfortuna\n+000f9c70: 7465 6c79 2c20 7468 6520 6375 7272 656e tely, the curren\n+000f9c80: 7420 4331 344e 2073 7461 6e64 6172 6420 t C14N standard \n+000f9c90: 6973 2062 7567 6779 2077 6974 6820 7265 is buggy with re\n+000f9ca0: 7370 6563 7420 746f 2058 5344 2051 4e61 spect to XSD QNa\n+000f9cb0: 6d65 2063 6f6e 7465 6e74 2c20 6265 6361 me content, beca\n+000f9cc0: 7573 6520 7072 6566 6978 6573 2075 7365 use prefixes use\n+000f9cd0: 6420 696e 2051 4e61 6d65 2063 6f6e 7465 d in QName conte\n+000f9ce0: 6e74 2061 7265 206e 6f74 2063 6f6e 7369 nt are not consi\n+000f9cf0: 6465 7265 6420 7574 696c 697a 6564 2e20 dered utilized. \n+000f9d00: 5468 6520 6753 4f41 5020 656e 6769 6e65 The gSOAP engine\n+000f9d10: 2063 6f6e 7369 6465 7273 2051 4e61 6d65 considers QName\n+000f9d20: 2063 6f6e 7465 6e74 2070 7265 6669 7865 content prefixe\n+000f9d30: 7320 7574 696c 697a 6564 2061 6e64 2074 s utilized and t\n+000f9d40: 6865 7265 666f 7265 2070 726f 6475 6365 herefore produce\n+000f9d50: 7320 636f 7272 6563 7465 6420 6361 6e6f s corrected cano\n+000f9d60: 6e69 6361 6c69 7a65 6420 584d 4c20 6f75 nicalized XML ou\n+000f9d70: 7470 7574 2074 6861 7420 7072 6576 656e tput that preven\n+000f9d80: 7473 2074 6865 206c 6f73 7320 6f66 206e ts the loss of n\n+000f9d90: 616d 6573 7061 6365 2069 6e66 6f72 6d61 amespace informa\n+000f9da0: 7469 6f6e 2066 6f72 2051 4e61 6d65 732e tion for QNames.\n+000f9db0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+000f9dd0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+000f9de0: 7473 3c2f 613e 3c2f 703e 0a3c 6831 3e3c ts

    .

    <\n+000f9df0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+000f9e00: 2069 643d 2268 6561 6465 7222 3e3c 2f61 id=\"header\">.SOAP Header pr\n+000f9e20: 6f63 6573 7369 6e67 3c2f 6831 3e0a 3c70 ocessing

    .A built-in SOAP\n+000f9e40: 2048 6561 6465 7220 6461 7461 2073 7472 Header data str\n+000f9e50: 7563 7475 7265 203c 636f 6465 3e3c 6120 ucture SOAP_ENV\n+000f9ec0: 5f5f 4865 6164 6572 3c2f 613e 3c2f 636f __Header is generated\n+000f9ee0: 2062 7920 7468 6520 736f 6170 6370 7032 by the soapcpp2\n+000f9ef0: 2074 6f6f 6c20 666f 7220 6578 6368 616e tool for exchan\n+000f9f00: 6769 6e67 2053 4f41 5020 6865 6164 6572 ging SOAP header\n+000f9f10: 7320 696e 2053 4f41 5020 6d65 7373 6167 s in SOAP messag\n+000f9f20: 6573 2e20 5468 6973 2073 7472 7563 7475 es. This structu\n+000f9f30: 7265 2069 7320 656d 7074 7920 756e 6c65 re is empty unle\n+000f9f40: 7373 2068 6561 6465 7273 2061 7265 2061 ss headers are a\n+000f9f50: 6464 6564 2062 7920 706c 7567 696e 7320 dded by plugins \n+000f9f60: 616e 6420 6865 6164 6572 7320 7370 6563 and headers spec\n+000f9f70: 6966 6965 6420 6279 2057 5344 4c20 7370 ified by WSDL sp\n+000f9f80: 6563 6966 6963 6174 696f 6e73 2028 692e ecifications (i.\n+000f9f90: 652e 2077 7364 6c32 6820 6164 6473 2053 e. wsdl2h adds S\n+000f9fa0: 4f41 5020 4865 6164 6572 7329 2e3c 2f70 OAP Headers)..

    You can cre\n+000f9fc0: 6174 6520 796f 7572 206f 776e 2053 4f41 ate your own SOA\n+000f9fd0: 5020 4865 6164 6572 2073 7472 7563 7420 P Header struct \n+000f9fe0: 7369 6d70 6c79 2062 7920 6465 636c 6172 simply by declar\n+000f9ff0: 696e 6720 6974 2069 6e20 616e 2069 6e74 ing it in an int\n+000fa000: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+000fa010: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 \n+000fa020: 616e 6420 6279 2061 6464 696e 6720 6d65 and by adding me\n+000fa030: 6d62 6572 7320 7468 6174 206d 7573 7420 mbers that must \n+000fa040: 6265 2071 7561 6c69 6669 6564 2077 6974 be qualified wit\n+000fa050: 6820 6e61 6d65 7370 6163 6520 7072 6566 h namespace pref\n+000fa060: 6978 6573 2074 6f20 636f 6e66 6f72 6d20 ixes to conform \n+000fa070: 746f 2074 6865 2053 4f41 5020 4865 6164 to the SOAP Head\n+000fa080: 6572 2070 726f 6365 7373 696e 6720 7265 er processing re\n+000fa090: 7175 6972 656d 656e 7473 2074 6861 7420 quirements that \n+000fa0a0: 534f 4150 2048 6561 6465 7220 656c 656d SOAP Header elem\n+000fa0b0: 656e 7473 206d 7573 7420 6265 206e 616d ents must be nam\n+000fa0c0: 6573 7061 6365 2071 7561 6c69 6669 6564 espace qualified\n+000fa0d0: 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 7861 .

    .

    For exa\n+000fa0e0: 6d70 6c65 2c20 6173 7375 6d65 2074 6861 mple, assume tha\n+000fa0f0: 7420 7472 616e 7361 6374 696f 6e20 6461 t transaction da\n+000fa100: 7461 2073 686f 756c 6420 6265 2070 6967 ta should be pig\n+000fa110: 6779 2d62 6163 6b65 6420 7769 7468 2053 gy-backed with S\n+000fa120: 4f41 5020 6d65 7373 6167 6573 2069 6e20 OAP messages in \n+000fa130: 534f 4150 2048 6561 6465 723a 3c2f 703e SOAP Header:

    \n+000fa140: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+000fa180: 7472 7563 7420 3c2f 7370 616e 3e74 5f5f truct t__\n+000fa190: 7472 616e 7361 6374 696f 6e3c 2f64 6976 transaction.
    {
    . \n+000fa1d0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000fa1f0: 2f73 7061 6e3e 206e 756d 6265 723b 3c2f /span> number;.
    const char *dscription;\n+000fa270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };.
    struct\n+000fa2c0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 SOAP_ENV__\n+000fa310: 4865 6164 6572 3c2f 613e 203c 2f64 6976 Header .
    {
    . \n+000fa350: 2020 6d75 7374 556e 6465 7273 7461 6e64 mustUnderstand\n+000fa360: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct t__transact\n+000fa390: 696f 6e20 2a74 5f5f 7472 616e 7361 6374 ion *t__transact\n+000fa3a0: 696f 6e3b 203c 2f64 6976 3e0a 3c64 6976 ion;
    .};\n+000fa3c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+000fa3f0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+000fa400: 6520 6d65 7468 6f64 2d69 6e70 7574 2d68 e method-input-h\n+000fa410: 6561 6465 722d 7061 7274 3a20 7765 626d eader-part: webm\n+000fa420: 6574 686f 6420 745f 5f74 7261 6e73 6163 ethod t__transac\n+000fa430: 7469 6f6e 3c2f 7370 616e 3e3c 2f64 6976 tion.
    in\n+000fa470: 743c 2f73 7061 6e3e 206e 735f 5f77 6562 t ns__web\n+000fa480: 6d65 7468 6f64 282e 2e2e 293b 3c2f 6469 method(...);.

    The\n+000fa4b0: 203c 636f 6465 3e6d 7573 7455 6e64 6572 mustUnder\n+000fa4c0: 7374 616e 643c 2f63 6f64 653e 2071 7561 stand qua\n+000fa4d0: 6c69 6669 6572 2073 7065 6369 6669 6573 lifier specifies\n+000fa4e0: 2074 6861 7420 7468 6520 656c 656d 656e that the elemen\n+000fa4f0: 7420 6d75 7374 2062 6520 7072 6f63 6573 t must be proces\n+000fa500: 7365 6420 6279 2074 6865 2053 4f41 5020 sed by the SOAP \n+000fa510: 7072 6f63 6573 736f 7220 616e 6420 6361 processor and ca\n+000fa520: 6e6e 6f74 2062 6520 6967 6e6f 7265 6420 nnot be ignored \n+000fa530: 6966 2074 6865 2070 726f 6365 7373 6f72 if the processor\n+000fa540: 2068 6173 206e 6f20 6c6f 6769 6320 696e has no logic in\n+000fa550: 2070 6c61 6365 2066 6f72 2074 6869 7320 place for this \n+000fa560: 534f 4150 2068 6561 6465 722c 2077 6869 SOAP header, whi\n+000fa570: 6368 2069 7320 646f 6e65 2062 7920 6164 ch is done by ad\n+000fa580: 6469 6e67 2061 203c 656d 3e3c 636f 6465 ding a SOAP-ENV:mustUn\n+000fa5a0: 6465 7273 7461 6e64 3d22 7472 7565 223c derstand=\"true\"<\n+000fa5b0: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n+000fa5c0: 6962 7574 6520 746f 2074 6865 203c 656d ibute to the t:transac\n+000fa5e0: 7469 6f6e 3c2f 636f 6465 3e3c 2f65 6d3e tion\n+000fa5f0: 2065 6c65 6d65 6e74 2e20 5468 6520 736f element. The so\n+000fa600: 6170 6370 7032 2d67 656e 6572 6174 6564 apcpp2-generated\n+000fa610: 2073 6572 6961 6c69 7a65 7273 206f 6265 serializers obe\n+000fa620: 7920 7468 6973 2073 6166 6574 7920 7072 y this safety pr\n+000fa630: 696e 6369 706c 652e 3c2f 703e 0a3c 703e inciple.

    .

    \n+000fa640: 5468 6973 2064 6563 6c61 7265 7320 6120 This declares a \n+000fa650: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n+000fa660: 6e20 7468 6174 2073 656e 6473 206d 6573 n that sends mes\n+000fa670: 7361 6765 7320 7769 7468 2061 6e20 696e sages with an in\n+000fa680: 7075 7420 534f 4150 2068 6561 6465 7220 put SOAP header \n+000fa690: 3c63 6f64 653e 745f 5f74 7261 6e73 6163 t__transac\n+000fa6a0: 7469 6f6e 3c2f 636f 6465 3e2c 2061 7320 tion, as \n+000fa6b0: 6361 6e20 6265 2073 6565 6e20 696e 2074 can be seen in t\n+000fa6c0: 6865 2067 656e 6572 6174 6564 2057 5344 he generated WSD\n+000fa6d0: 4c20 6269 6e64 696e 673a 3c2f 703e 0a3c L binding:

    .<\n+000fa6e0: 6469 7620 636c 6173 733d 2261 6c74 223e div class=\"alt\">\n+000fa6f0: 203c 6469 7620 636c 6173 733d 2266 7261
    <binding name\n+000fa760: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="Servic\n+000fa790: 6526 7175 6f74 3b3c 2f73 7061 6e3e 203c e" <\n+000fa7a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fa7b0: 6f72 6422 3e74 7970 653c 2f73 7061 6e3e ord\">type\n+000fa7c0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000fa7e0: 6f74 3b74 6e73 3a53 6572 7669 6365 506f ot;tns:ServicePo\n+000fa7f0: 7274 5479 7065 2671 756f 743b 3c2f 7370 rtType">
    .\n+000fa820: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000fa840: 534f 4150 3a62 696e 6469 6e67 3c2f 7370 SOAP:binding style<\n+000fa870: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="documen\n+000fa8a0: 7426 7175 6f74 3b3c 2f73 7061 6e3e 203c t" <\n+000fa8b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fa8c0: 6f72 6422 3e74 7261 6e73 706f 7274 3c2f ord\">transport="http://s\n+000fa900: 6368 656d 6173 2e78 6d6c 736f 6170 2e6f chemas.xmlsoap.o\n+000fa910: 7267 2f73 6f61 702f 6874 7470 2671 756f rg/soap/http&quo\n+000fa920: 743b 3c2f 7370 616e 3e2f 2667 743b 3c2f t;/>.
    <operation\n+000fa970: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na\n+000fa990: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="webm\n+000fa9c0: 6574 686f 6426 7175 6f74 3b3c 2f73 7061 ethod">
    . \n+000fa9f0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP:operation<\n+000faa20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> soa\n+000faa40: 7041 6374 696f 6e3c 2f73 7061 6e3e 3d3c pAction=<\n+000faa50: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000faa60: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000faa70: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 2f26 ;"/&\n+000faa80: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n+000faaa0: 266c 743b 3c73 7061 6e20 636c 6173 733d <in\n+000faac0: 7075 743c 2f73 7061 6e3e 2667 743b 3c2f put>.
    \n+000faaf0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <S\n+000fab10: 4f41 503a 626f 6479 3c2f 7370 616e 3e20 OAP:body \n+000fab20: 3c73 7061 6e20 636c 6173 733d 226b 6579 use\n+000fab40: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000fab60: 6f74 3b6c 6974 6572 616c 2671 756f 743b ot;literal"\n+000fab70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c pa\n+000fab90: 7274 733c 2f73 7061 6e3e 3d3c 7370 616e rts="Bod\n+000fabc0: 7926 7175 6f74 3b3c 2f73 7061 6e3e 2f26 y"/&\n+000fabd0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n+000fabf0: 2020 2020 2020 266c 743b 3c73 7061 6e20 <SOAP:header<\n+000fac20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> use\n+000fac40: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="litera\n+000fac70: 6c26 7175 6f74 3b3c 2f73 7061 6e3e 203c l" <\n+000fac80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fac90: 6f72 6422 3e6d 6573 7361 6765 3c2f 7370 ord\">message=\n+000facc0: 2671 756f 743b 746e 733a 5365 7276 6963 "tns:Servic\n+000facd0: 6548 6561 6465 7226 7175 6f74 3b3c 2f73 eHeader" part<\n+000fad00: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="transac\n+000fad30: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion"/>
    . \n+000fad60: 2020 2026 6c74 3b2f 3c73 7061 6e20 636c </input&g\n+000fad90: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    &\n+000fadb0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;out\n+000fadd0: 7075 743c 2f73 7061 6e3e 2667 743b 3c2f put>.
    \n+000fae00: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <S\n+000fae20: 4f41 503a 626f 6479 3c2f 7370 616e 3e20 OAP:body \n+000fae30: 3c73 7061 6e20 636c 6173 733d 226b 6579 use\n+000fae50: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000fae70: 6f74 3b6c 6974 6572 616c 2671 756f 743b ot;literal"\n+000fae80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c pa\n+000faea0: 7274 733c 2f73 7061 6e3e 3d3c 7370 616e rts="Bod\n+000faed0: 7926 7175 6f74 3b3c 2f73 7061 6e3e 2f26 y"/&\n+000faee0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n+000faf00: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </o\n+000faf20: 7574 7075 743c 2f73 7061 6e3e 2667 743b utput>\n+000faf30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </\n+000faf50: 3c73 7061 6e20 636c 6173 733d 226b 6579 operat\n+000faf70: 696f 6e3c 2f73 7061 6e3e 2667 743b 3c2f ion>.
    </binding>
    .<\n+000fafd0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    \n+000faff0: 4c69 6b65 7769 7365 2c20 796f 7520 6361 Likewise, you ca\n+000fb000: 6e20 7370 6563 6966 7920 7468 6174 2062 n specify that b\n+000fb010: 6f74 6820 696e 7075 7420 616e 6420 6f75 oth input and ou\n+000fb020: 7470 7574 206d 6573 7361 6765 7320 6861 tput messages ha\n+000fb030: 7665 2074 6865 2073 616d 6520 6865 6164 ve the same head\n+000fb040: 6572 2077 6974 6820 3c63 6f64 653e 2f2f er with //\n+000fb050: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+000fb060: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n+000fb070: 6172 743a 3c2f 636f 6465 3e20 6f72 2074 art: or t\n+000fb080: 6865 206f 7574 7075 7420 6d65 7373 6167 he output messag\n+000fb090: 6520 6861 7320 6120 6865 6164 6572 2077 e has a header w\n+000fb0a0: 6974 6820 3c63 6f64 653e 2f2f 6773 6f61 ith //gsoa\n+000fb0b0: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n+000fb0c0: 686f 642d 6f75 7470 7574 2d68 6561 6465 hod-output-heade\n+000fb0d0: 722d 7061 7274 3a3c 2f63 6f64 653e 2e20 r-part:. \n+000fb0e0: 4d75 6c74 6970 6c65 2068 6561 6465 7273 Multiple headers\n+000fb0f0: 2063 616e 2062 6520 7370 6563 6966 6965 can be specifie\n+000fb100: 6420 7468 6973 2077 6179 2e3c 2f70 3e0a d this way.

    .\n+000fb110: 3c70 3e54 6f20 7365 7420 7570 2061 2053

    To set up a S\n+000fb120: 4f41 5020 4865 6164 6572 2061 7420 7468 OAP Header at th\n+000fb130: 6520 636c 6965 6e74 2073 6964 6520 7468 e client side th\n+000fb140: 6174 2063 6f6e 7461 696e 7320 7468 6520 at contains the \n+000fb150: 3c63 6f64 653e 745f 5f74 7261 6e73 6163 t__transac\n+000fb160: 7469 6f6e 3c2f 636f 6465 3e20 6d65 6d62 tion memb\n+000fb170: 6572 3a3c 2f70 3e0a 3c64 6976 2063 6c61 er:

    .
    \n+000fb1a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+000fb1f0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+000fb220: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n+000fb280: 5f6e 6577 3c2f 613e 2829 3b20 3c2f 6469 _new(); .
    ... /\n+000fb2c0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n+000fb2d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fb2e0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+000fb310: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .header\n+000fb360: 3c2f 613e 203d 204e 554c 4c3b 203c 7370 = NULL; // erase any \n+000fb390: 534f 4150 2048 6561 6465 7220 7765 2068 SOAP Header we h\n+000fb3a0: 6176 6520 736f 2066 6172 3c2f 7370 616e ave so far
    .
    so\n+000fb420: 6170 5f68 6561 6465 723c 2f61 3e28 3c61 ap_header(soap); \n+000fb460: 203c 7370 616e 2063 6c61 7373 3d22 636f // alloca\n+000fb480: 7465 2061 6e64 2069 6e69 7469 616c 697a te and initializ\n+000fb490: 6520 6120 6e65 7720 534f 4150 2048 6561 e a new SOAP Hea\n+000fb4a0: 6465 723c 2f73 7061 6e3e 3c2f 6469 763e der
    \n+000fb4b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n+000fb540: 6865 6164 6572 3c2f 613e 2d26 6774 3b74 header->t\n+000fb550: 5f5f 7472 616e 7361 6374 696f 6e20 3d20 __transaction = \n+000fb560: 736f 6170 5f6e 6577 5f74 5f5f 7472 616e soap_new_t__tran\n+000fb570: 7361 6374 696f 6e28 3c61 2063 6c61 7373 saction(s\n+000fb5a0: 6f61 703c 2f61 3e2c 202d 3129 3b3c 2f64 oap, -1);.
    soa\n+000fb5f0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->header-&g\n+000fb650: 743b 745f 5f74 7261 6e73 6163 7469 6f6e t;t__transaction\n+000fb660: 2d26 6774 3b6e 756d 6265 7220 3d20 6e75 ->number = nu\n+000fb670: 6d3b 3c2f 6469 763e 0a3c 6469 7620 636c m;
    .
    soap-><\n+000fb6c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000fb6d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+000fb6e0: 6874 6d6c 2361 6330 3931 6466 6534 6530 html#ac091dfe4e0\n+000fb6f0: 3162 3661 3038 3264 3931 3663 3338 3165 1b6a082d916c381e\n+000fb700: 3730 3036 6261 223e 6865 6164 6572 3c2f 7006ba\">header->t__transa\n+000fb720: 6374 696f 6e2d 2667 743b 6465 7363 7269 ction->descri\n+000fb730: 7074 696f 6e20 3d20 3c73 7061 6e20 636c ption = "Transa\n+000fb760: 6374 696f 6e61 6c20 6461 7461 2671 756f ctional data&quo\n+000fb770: 743b 3c2f 7370 616e 3e3b 3c2f 6469 763e t;;
    \n+000fb780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n+000fb7b0: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n+000fb7c0: 6c5f 7765 626d 6574 686f 6428 3c61 2063 l_webmethod(soap, endpoint, NULL, ...))<\n+000fb860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // error
    .
    str\n+000fb970: 7563 7420 534f 4150 5f45 4e56 5f5f 4865 uct SOAP_ENV__He\n+000fb980: 6164 6572 202a 2068 6561 6465 723c 2f64 ader * header
    The soap::\n+000fb9b0: 6865 6164 6572 2070 6f69 6e74 7320 746f header points to\n+000fb9c0: 2061 2053 4f41 505f 454e 565f 5f48 6561 a SOAP_ENV__Hea\n+000fb9d0: 6465 7220 7374 7275 6374 7572 6520 7769 der structure wi\n+000fb9e0: 7468 2074 6865 2053 4f41 5020 4865 6164 th the SOAP Head\n+000fb9f0: 6572 2074 6861 7420 7761 7320 7265 6365 er that was rece\n+000fba00: 6976 6564 206f 7220 7468 612e 2e2e 3c2f ived or tha...
    Defini\n+000fba30: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+000fba40: 7032 2e68 3a32 3935 353c 2f64 6976 3e3c p2.h:2955
    <\n+000fba50: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+000fba70: 5468 6520 534f 4150 2057 6562 2073 6572 The SOAP Web ser\n+000fba80: 7669 6365 2072 6571 7565 7374 2069 6e63 vice request inc\n+000fba90: 6c75 6465 7320 7468 6520 534f 4150 2048 ludes the SOAP H\n+000fbaa0: 6561 6465 7220 7769 7468 2074 6865 2074 eader with the t\n+000fbab0: 7261 6e73 6163 7469 6f6e 2064 6174 613a ransaction data:\n+000fbac0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    &\n+000fbb00: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA\n+000fbb20: 502d 454e 563a 456e 7665 6c6f 7065 3c2f P-ENV:Envelope ...> .
    <SOAP-ENV:\n+000fbb80: 4865 6164 6572 3c2f 7370 616e 3e26 6774 Header>\n+000fbb90: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    &\n+000fbbb0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;t:t\n+000fbbd0: 7261 6e73 6163 7469 6f6e 3c2f 7370 616e ransaction SOAP-ENV\n+000fbc00: 3a6d 7573 7455 6e64 6572 7374 616e 643c :mustUnderstand<\n+000fbc10: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="true&qu\n+000fbc40: 6f74 3b3c 2f73 7061 6e3e 2667 743b 3c2f ot;>.
    <\n+000fbc70: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;numbe\n+000fbc90: 723c 2f73 7061 6e3e 2667 743b 3132 3334 r>1234\n+000fbca0: 3526 6c74 3b2f 3c73 7061 6e20 636c 6173 5</\n+000fbcc0: 6e75 6d62 6572 3c2f 7370 616e 3e26 6774 number>\n+000fbcd0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n+000fbcf0: 266c 743b 3c73 7061 6e20 636c 6173 733d <de\n+000fbd10: 7363 7269 7074 696f 6e3c 2f73 7061 6e3e scription\n+000fbd20: 2667 743b 3c73 7061 6e20 636c 6173 733d >Transa\n+000fbd40: 6374 696f 6e61 6c3c 2f73 7061 6e3e 203c ctional <\n+000fbd50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fbd60: 6f72 6422 3e64 6174 613c 2f73 7061 6e3e ord\">data\n+000fbd70: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </d\n+000fbd90: 6573 6372 6970 7469 6f6e 3c2f 7370 616e escription>
    . \n+000fbdc0: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </t:transaction>
    \n+000fbe00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </SOAP-ENV:Hea\n+000fbe40: 6465 723c 2f73 7061 6e3e 2667 743b 203c der> <\n+000fbe50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <SOAP-ENV\n+000fbe90: 3a42 6f64 793c 2f73 7061 6e3e 2667 743b :Body>\n+000fbea0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    &l\n+000fbec0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;ns:w\n+000fbee0: 6562 6d65 7468 6f64 3c2f 7370 616e 3e26 ebmethod&\n+000fbef0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n+000fbf10: 2020 2e2e 2e3c 2f64 6976 3e0a 3c64 6976 ...
    . \n+000fbf30: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </ns:webmethod>
    .<\n+000fbf70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fbf80: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </SOAP-ENV:Body<\n+000fbfb0: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
    </SOAP-ENV:Enve\n+000fc000: 6c6f 7065 3c2f 7370 616e 3e26 6774 3b3c lope><\n+000fc010: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    At the re\n+000fc040: 6365 6976 696e 6720 7369 6465 2c20 6120 ceiving side, a \n+000fc050: 534f 4150 2048 6561 6465 7220 6361 6e20 SOAP Header can \n+000fc060: 6265 2069 6e73 7065 6374 6564 2062 7920 be inspected by \n+000fc070: 6368 6563 6b69 6e67 2066 6f72 2061 206e checking for a n\n+000fc080: 6f6e 2d4e 554c 4c20 3c63 6f64 653e 3c61 on-NULL soap::head\n+000fc150: 6572 3c2f 613e 3c2f 636f 6465 3e2e 3c2f er..

    <\n+000fc180: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning<\n+000fc190: 6464 3e57 6865 6e20 534f 4150 2048 6561 dd>When SOAP Hea\n+000fc1a0: 6465 7273 2061 7265 2075 7365 642c 2079 ders are used, y\n+000fc1b0: 6f75 206d 7573 7420 6d61 6b65 2073 7572 ou must make sur\n+000fc1c0: 6520 746f 2073 6574 203c 636f 6465 3e3c e to set <\n+000fc1d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+000fc1e0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+000fc1f0: 6d6c 2361 6330 3931 6466 6534 6530 3162 ml#ac091dfe4e01b\n+000fc200: 3661 3038 3264 3931 3663 3338 3165 3730 6a082d916c381e70\n+000fc210: 3036 6261 2220 7469 746c 653d 2254 6865 06ba\" title=\"The\n+000fc220: 2073 6f61 703a 3a68 6561 6465 7220 706f soap::header po\n+000fc230: 696e 7473 2074 6f20 6120 534f 4150 5f45 ints to a SOAP_E\n+000fc240: 4e56 5f5f 4865 6164 6572 2073 7472 7563 NV__Header struc\n+000fc250: 7475 7265 2077 6974 6820 7468 6520 534f ture with the SO\n+000fc260: 4150 2048 6561 6465 7220 7468 6174 2077 AP Header that w\n+000fc270: 6173 2072 6563 6569 7665 6420 6f72 2074 as received or t\n+000fc280: 6861 2e2e 2e22 3e73 6f61 703a 3a68 6561 ha...\">soap::hea\n+000fc290: 6465 723c 2f61 3e3c 2f63 6f64 653e 2074 der t\n+000fc2a0: 6f20 4e55 4c4c 2077 6865 6e20 6e6f 2053 o NULL when no S\n+000fc2b0: 4f41 5020 4865 6164 6572 2073 686f 756c OAP Header shoul\n+000fc2c0: 6420 6265 2073 656e 742c 206f 7468 6572 d be sent, other\n+000fc2d0: 7769 7365 2061 6e79 2053 4f41 5020 4865 wise any SOAP He\n+000fc2e0: 6164 6572 7320 6375 7272 656e 746c 7920 aders currently \n+000fc2f0: 7072 6573 656e 7420 696e 2074 6865 203c present in the <\n+000fc300: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+000fc360: 534f 4150 5f45 4e56 5f5f 4865 6164 6572 SOAP_ENV__Header\n+000fc370: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n+000fc380: 6374 2070 6f69 6e74 6564 2074 6f20 6279 ct pointed to by\n+000fc390: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+000fc450: 6f61 703a 3a68 6561 6465 723c 2f61 3e3c oap::header<\n+000fc460: 2f63 6f64 653e 2077 696c 6c20 6265 2069 /code> will be i\n+000fc470: 6e63 6c75 6465 6420 696e 2074 6865 206d ncluded in the m\n+000fc480: 6573 7361 6765 2e3c 2f64 643e 3c2f 646c essage..

    At the clie\n+000fc4a0: 6e74 2073 6964 652c 2074 6865 203c 636f nt side, the soap:\n+000fc570: 3a61 6374 6f72 3c2f 613e 3c2f 636f 6465 :actor string variabl\n+000fc590: 6520 6361 6e20 6265 2073 6574 2074 6f20 e can be set to \n+000fc5a0: 7365 7420 7468 6520 534f 4150 203c 656d set the SOAP SOAP-ENV:\n+000fc5c0: 6163 746f 723c 2f63 6f64 653e 3c2f 656d actor attribute. The\n+000fc5e0: 203c 656d 3e3c 636f 6465 3e53 4f41 502d SOAP-\n+000fc5f0: 454e 563a 6d75 7374 556e 6465 7273 7461 ENV:mustUndersta\n+000fc600: 6e64 3d22 7472 7565 223c 2f63 6f64 653e nd=\"true\"\n+000fc610: 3c2f 656d 3e20 6174 7472 6962 7574 6520 attribute \n+000fc620: 7468 656e 2069 6e64 6963 6174 6573 2074 then indicates t\n+000fc630: 6865 2072 6571 7569 7265 6d65 6e74 2074 he requirement t\n+000fc640: 6861 7420 7468 6520 7265 6369 7069 656e hat the recipien\n+000fc650: 7420 636f 7272 6573 706f 6e64 696e 6720 t corresponding \n+000fc660: 746f 2074 6865 203c 656d 3e3c 636f 6465 to the SOAP-ENV:actor<\n+000fc680: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n+000fc690: 6962 7574 6520 7661 6c75 6520 6973 2072 ibute value is r\n+000fc6a0: 6573 706f 6e73 6962 6c65 2074 6f20 7072 esponsible to pr\n+000fc6b0: 6f63 6573 7320 7468 6520 534f 4150 2048 ocess the SOAP H\n+000fc6c0: 6561 6465 7220 656c 656d 656e 742e 2054 eader element. T\n+000fc6d0: 6865 2064 6574 6169 6c73 206f 6620 7768 he details of wh\n+000fc6e0: 6963 6820 6361 6e20 6265 2066 6f75 6e64 ich can be found\n+000fc6f0: 2069 6e20 7468 6520 534f 4150 2031 2e31 in the SOAP 1.1\n+000fc700: 2f31 2e32 2073 7065 6369 6669 6361 7469 /1.2 specificati\n+000fc710: 6f6e 7320 7468 6174 2074 6865 2067 534f ons that the gSO\n+000fc720: 4150 2074 6f6f 6c73 2063 6f6e 666f 726d AP tools conform\n+000fc730: 2074 6f2e 3c2f 703e 0a3c 703e 5468 6520 to.

    .

    The \n+000fc740: 534f 4150 2048 6561 6465 7220 7374 7275 SOAP Header stru\n+000fc750: 6374 7572 6520 3c63 6f64 653e 3c61 2063 cture SOAP_ENV_\n+000fc7c0: 5f48 6561 6465 723c 2f61 3e3c 2f63 6f64 _Header is declared <\n+000fc7e0: 636f 6465 3e6d 7574 6162 6c65 3c2f 636f code>mutable, which means\n+000fc800: 2074 6861 7420 7265 2d64 6563 6c61 7261 that re-declara\n+000fc810: 7469 6f6e 7320 6f66 2074 6865 2073 7472 tions of the str\n+000fc820: 7563 7475 7265 7320 6172 6520 7065 726d uctures are perm\n+000fc830: 6974 7465 6420 616e 6420 6164 6469 7469 itted and additi\n+000fc840: 6f6e 616c 206d 656d 6265 7273 2061 7265 onal members are\n+000fc850: 2063 6f6c 6c65 6374 6564 2069 6e74 6f20 collected into \n+000fc860: 6f6e 6520 6669 6e61 6c20 7374 7275 6374 one final struct\n+000fc870: 7572 6520 6279 2074 6865 2073 6f61 7063 ure by the soapc\n+000fc880: 7070 3220 746f 6f6c 2e3c 2f70 3e0a 3c70 pp2 tool.

    .For another exa\n+000fc8a0: 6d70 6c65 2c20 636f 6e73 6964 6572 3a3c mple, consider:<\n+000fc8b0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    struct \n+000fc900: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SO\n+000fc940: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header
    .
    {.
    char \n+000fc9b0: 2a68 5f5f 7472 616e 7361 6374 696f 6e3b *h__transaction;\n+000fc9c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct UserAuth *h__a\n+000fca10: 7574 6865 6e74 6963 6174 696f 6e3b 203c uthentication; <\n+000fca20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    \n+000fca40: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Suppo\n+000fca60: 7365 206d 6574 686f 6420 3c63 6f64 653e se method \n+000fca70: 6e73 5f5f 6c6f 6769 6e3c 2f63 6f64 653e ns__login\n+000fca80: 2075 7365 7320 626f 7468 2068 6561 6465 uses both heade\n+000fca90: 7220 7061 7274 7320 2861 7420 6d6f 7374 r parts (at most\n+000fcaa0: 292c 2074 6865 6e20 7468 6973 2069 7320 ), then this is \n+000fcab0: 6465 636c 6172 6564 2061 733a 3c2f 703e declared as:

    \n+000fcac0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    /\n+000fcb00: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+000fcb10: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n+000fcb20: 7061 7274 3a20 6c6f 6769 6e20 685f 5f74 part: login h__t\n+000fcb30: 7261 6e73 6163 7469 6f6e 203c 2f73 7061 ransaction
    .
    //gsoap ns serv\n+000fcb80: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade\n+000fcb90: 722d 7061 7274 3a20 6c6f 6769 6e20 685f r-part: login h_\n+000fcba0: 5f61 7574 6865 6e74 6963 6174 696f 6e20 _authentication \n+000fcbb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+000fcbd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__login(.\n+000fcc00: 2e2e 293b 3c2f 6469 763e 0a3c 2f64 6976 ..);
    .

    Note\n+000fcd80: 2074 6861 7420 7468 6520 6d65 7468 6f64 that the method\n+000fcd90: 206e 616d 6520 616e 6420 6865 6164 6572 name and header\n+000fcda0: 2070 6172 7420 6e61 6d65 7320 6d75 7374 part names must\n+000fcdb0: 2062 6520 6e61 6d65 7370 6163 6520 7175 be namespace qu\n+000fcdc0: 616c 6966 6965 642e 2054 6865 2068 6561 alified. The hea\n+000fcdd0: 6465 7273 206d 7573 7420 6265 2070 7265 ders must be pre\n+000fcde0: 7365 6e74 2069 6e20 616c 6c20 6f70 6572 sent in all oper\n+000fcdf0: 6174 696f 6e73 2074 6861 7420 6465 636c ations that decl\n+000fce00: 6172 6564 2074 6865 2068 6561 6465 7220 ared the header \n+000fce10: 7061 7274 732e 3c2f 703e 0a3c 703e 546f parts.

    .

    To\n+000fce20: 2073 7065 6369 6679 2074 6865 2068 6561 specify the hea\n+000fce30: 6465 7220 7061 7274 7320 666f 7220 7468 der parts for th\n+000fce40: 6520 6d65 7468 6f64 2069 6e70 7574 2028 e method input (\n+000fce50: 6d65 7468 6f64 2072 6571 7565 7374 206d method request m\n+000fce60: 6573 7361 6765 292c 2075 7365 3a3c 2f70 essage), use:.

    \n+000fceb0: 2f2f 6773 6f61 7020 6e61 6d65 7370 6163 //gsoap namespac\n+000fcec0: 652d 7072 6566 6978 2073 6572 7669 6365 e-prefix service\n+000fced0: 206d 6574 686f 642d 696e 7075 742d 6865 method-input-he\n+000fcee0: 6164 6572 2d70 6172 743a 206d 6574 686f ader-part: metho\n+000fcef0: 642d 6e61 6d65 2068 6561 6465 722d 7061 d-name header-pa\n+000fcf00: 7274 3c2f 7370 616e 3e3c 2f64 6976 3e0a rt
    .\n+000fcf10: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Simila\n+000fcf30: 726c 792c 2074 6f20 7370 6563 6966 7920 rly, to specify \n+000fcf40: 7468 6520 6865 6164 6572 2070 6172 7473 the header parts\n+000fcf50: 2066 6f72 2074 6865 206d 6574 686f 6420 for the method \n+000fcf60: 6f75 7470 7574 2028 6d65 7468 6f64 2072 output (method r\n+000fcf70: 6573 706f 6e73 6520 6d65 7373 6167 6529 esponse message)\n+000fcf80: 2c20 7573 653a 3c2f 703e 0a3c 6469 7620 , use:

    .
    //gsoap\n+000fcfd0: 206e 616d 6573 7061 6365 2d70 7265 6669 namespace-prefi\n+000fcfe0: 7820 7365 7276 6963 6520 6d65 7468 6f64 x service method\n+000fcff0: 2d6f 7574 7075 742d 6865 6164 6572 2d70 -output-header-p\n+000fd000: 6172 743a 206d 6574 686f 642d 6e61 6d65 art: method-name\n+000fd010: 2068 6561 6465 722d 7061 7274 3c2f 7370 header-part
    .
    \n+000fd030: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The\n+000fd3e0: 2068 6561 6465 7273 206d 7573 7420 6265 headers must be\n+000fd3f0: 2070 7265 7365 6e74 2069 6e20 616c 6c20 present in all \n+000fd400: 6f70 6572 6174 696f 6e73 2074 6861 7420 operations that \n+000fd410: 6465 636c 6172 6564 2074 6865 2068 6561 declared the hea\n+000fd420: 6465 7220 7061 7274 732e 3c2f 703e 0a3c der parts.

    .<\n+000fd430: 703e 5365 6520 616c 736f 2041 5049 2064 p>See also API d\n+000fd440: 6f63 756d 656e 7461 7469 6f6e 204d 6f64 ocumentation Mod\n+000fd450: 756c 6520 3c61 2063 6c61 7373 3d22 656c ule
    Header struct\n+000fd490: 7572 6520 616e 6420 6675 6e63 7469 6f6e ure and function\n+000fd4a0: 733c 2f61 3e2e 3c2f 703e 0a3c 703e f09f s.

    .

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

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

    .SOAP Faul\n+000fd510: 7420 7072 6f63 6573 7369 6e67 3c2f 6831 t processing.

    A built-in \n+000fd530: 534f 4150 2046 6175 6c74 2064 6174 6120 SOAP Fault data \n+000fd540: 7374 7275 6374 7572 6520 3c63 6f64 653e structure \n+000fd550: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_EN\n+000fd5b0: 565f 5f46 6175 6c74 3c2f 613e 3c2f 636f V__Fault is generated\n+000fd5d0: 2062 7920 7468 6520 736f 6170 6370 7032 by the soapcpp2\n+000fd5e0: 2074 6f6f 6c20 666f 7220 6578 6368 616e tool for exchan\n+000fd5f0: 6769 6e67 2065 7863 6570 7469 6f6e 206d ging exception m\n+000fd600: 6573 7361 6765 732e 2054 6869 7320 7374 essages. This st\n+000fd610: 7275 6374 7572 6520 6861 7320 7468 6520 ructure has the \n+000fd620: 6765 6e65 7261 6c20 666f 726d 3a3c 2f70 general form:.

    \n+000fd670: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct SOAP_\n+000fd6c0: 454e 565f 5f46 6175 6c74 3c2f 613e 203c ENV__Fault <\n+000fd6d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+000fd6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    _QName<\n+000fd760: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> faultcode\n+000fd7d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // _QNam\n+000fd7f0: 6520 6973 2062 7569 6c74 2d69 6e20 3c2f e is built-in
    . \n+000fd820: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+000fd840: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *faultstr\n+000fd8b0: 696e 673c 2f61 3e3b 203c 2f64 6976 3e0a ing;
    .\n+000fd8c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+000fd8f0: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *faul\n+000fd960: 7461 6374 6f72 3c2f 613e 3b20 3c2f 6469 tactor; .
    s\n+000fd9a0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct SOAP_\n+000fd9f0: 454e 565f 5f44 6574 6169 6c3c 2f61 3e20 ENV__Detail \n+000fda00: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *\n+000fda60: 6465 7461 696c 3c2f 613e 3b20 3c2f 6469 detail; .
    s\n+000fdaa0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct SOAP_EN\n+000fdaf0: 565f 5f43 6f64 653c 2f61 3e20 2a3c 6120 V__Code *SOAP\n+000fdb60: 5f45 4e56 5f5f 436f 6465 3c2f 613e 3b20 _ENV__Code; \n+000fdb70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // must be\n+000fdb90: 2061 2053 4f41 505f 454e 565f 5f43 6f64 a SOAP_ENV__Cod\n+000fdba0: 6520 7374 7275 6374 2064 6566 696e 6564 e struct defined\n+000fdbb0: 2062 656c 6f77 203c 2f73 7061 6e3e 3c2f below .
    char\n+000fdc00: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *SOAP_ENV__Reaso\n+000fdc70: 6e3c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 n;
    .\n+000fdc90: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+000fdcb0: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *SOAP_E\n+000fdd20: 4e56 5f5f 4e6f 6465 3c2f 613e 3b20 3c2f NV__Node; .
    char\n+000fdd70: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *SOAP_ENV__Role<\n+000fdde0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n+000fde00: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+000fde20: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>SOAP_ENV__De\n+000fde70: 7461 696c 3c2f 613e 202a 3c61 2063 6c61 tail *SOAP_EN\n+000fdee0: 565f 5f44 6574 6169 6c3c 2f61 3e3b 203c V__Detail; <\n+000fdef0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000fdf00: 656e 7422 3e2f 2f20 534f 4150 2031 2e32 ent\">// SOAP 1.2\n+000fdf10: 2064 6574 6169 6c20 6d65 6d62 6572 203c detail member <\n+000fdf20: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+000fdf40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    struct <\n+000fdf80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000fdf90: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n+000fdfa0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+000fdfb0: 636f 6465 2e68 746d 6c22 3e53 4f41 505f code.html\">SOAP_\n+000fdfc0: 454e 565f 5f43 6f64 653c 2f61 3e20 3c2f ENV__Code .
    {
    .<\n+000fdff0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fe000: 3e20 2020 203c 6120 636c 6173 733d 2263 > _QName SOAP_ENV__Value\n+000fe0d0: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n+000fe0f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 struct \n+000fe110: 3c2f 7370 616e 3e3c 6120 636c 6173 733d SOAP_ENV__Cod\n+000fe160: 653c 2f61 3e20 2a3c 6120 636c 6173 733d e *SOAP_ENV__S\n+000fe1d0: 7562 636f 6465 3c2f 613e 3b20 3c2f 6469 ubcode; .
    };
    .<\n+000fe200: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fe210: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct SOAP_ENV__Det\n+000fe280: 6169 6c3c 2f61 3e20 3c2f 6469 763e 0a3c ail
    .<\n+000fe290: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fe2a0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n+000fe2c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fe2d0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __type; \n+000fe350: 203c 7370 616e 2063 6c61 7373 3d22 636f // The SO\n+000fe370: 4150 5f54 5950 455f 206f 6620 7468 6520 AP_TYPE_ of the \n+000fe380: 6f62 6a65 6374 2073 6572 6961 6c69 7a65 object serialize\n+000fe390: 6420 6173 2046 6175 6c74 2064 6574 6169 d as Fault detai\n+000fe3a0: 6c20 3c2f 7370 616e 3e3c 2f64 6976 3e0a l
    .\n+000fe3b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+000fe3e0: 766f 6964 3c2f 7370 616e 3e20 2a3c 6120 void *fau\n+000fe450: 6c74 3c2f 613e 3b20 3c73 7061 6e20 636c lt; //\n+000fe470: 2070 6f69 6e74 6572 2074 6f20 7468 6520 pointer to the \n+000fe480: 6661 756c 7420 6f62 6a65 6374 2c20 6f72 fault object, or\n+000fe490: 204e 554c 4c20 3c2f 7370 616e 3e3c 2f64 NULL .
    _XM\n+000fe510: 4c3c 2f61 3e20 3c61 2063 6c61 7373 3d22 L __any;\n+000fe580: 2020 3c73 7061 6e20 636c 6173 733d 2263 // any o\n+000fe5a0: 7468 6572 2064 6574 6169 6c20 656c 656d ther detail elem\n+000fe5b0: 656e 7420 636f 6e74 656e 7420 2873 746f ent content (sto\n+000fe5c0: 7265 6420 696e 2058 4d4c 2066 6f72 6d61 red in XML forma\n+000fe5d0: 7429 203c 2f73 7061 6e3e 3c2f 6469 763e t)
    \n+000fe5e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .
    SOAP_\n+000fe680: 454e 565f 5f43 6f64 653c 2f61 3e3c 2f64 ENV__Code
    SOAP Fault\n+000fe6b0: 2043 6f64 6520 7374 7275 6374 7572 652e Code structure.\n+000fe6c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+000fe6e0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+000fe6f0: 6f61 7032 2e68 3a39 3437 313c 2f64 6976 oap2.h:9471
    .
    struct\n+000fe810: 2053 4f41 505f 454e 565f 5f43 6f64 6520 SOAP_ENV__Code \n+000fe820: 2a20 534f 4150 5f45 4e56 5f5f 5375 6263 * SOAP_ENV__Subc\n+000fe830: 6f64 653c 2f64 6976 3e3c 6469 7620 636c ode
    Opti\n+000fe850: 6f6e 616c 2065 6c65 6d65 6e74 2053 4f41 onal element SOA\n+000fe860: 502d 454e 563a 5375 6263 6f64 6520 6f66 P-ENV:Subcode of\n+000fe870: 2058 5344 2074 7970 6520 534f 4150 2d45 XSD type SOAP-E\n+000fe880: 4e56 3a43 6f64 653c 2f64 6976 3e3c 6469 NV:Code
    \n+000fe8a0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:94\n+000fe8c0: 3735 3c2f 6469 763e 3c2f 6469 763e 0a3c 75
    .<\n+000fe8d0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+000fe8e0: 6964 3d22 6173 7472 7563 745f 735f 6f5f id=\"astruct_s_o_\n+000fe8f0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+000fe900: 636f 6465 5f68 746d 6c5f 6136 3238 3562 code_html_a6285b\n+000fe910: 3165 6438 6232 6361 6463 3331 3864 3733 1ed8b2cadc318d73\n+000fe920: 3066 3937 3135 6232 3935 3822 3e3c 6469 0f9715b2958\">SOAP_ENV__Code\n+000fe9a0: 3a3a 534f 4150 5f45 4e56 5f5f 5661 6c75 ::SOAP_ENV__Valu\n+000fe9b0: 653c 2f61 3e3c 2f64 6976 3e3c 6469 7620 e
    _\n+000fe9d0: 514e 616d 6520 534f 4150 5f45 4e56 5f5f QName SOAP_ENV__\n+000fe9e0: 5661 6c75 653c 2f64 6976 3e3c 6469 7620 Value
    Op\n+000fea00: 7469 6f6e 616c 2065 6c65 6d65 6e74 2053 tional element S\n+000fea10: 4f41 502d 454e 563a 5661 6c75 6520 6f66 OAP-ENV:Value of\n+000fea20: 2058 5344 2074 7970 6520 7873 643a 514e XSD type xsd:QN\n+000fea30: 616d 653c 2f64 6976 3e3c 6469 7620 636c ame
    D\n+000fea50: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+000fea60: 7464 736f 6170 322e 683a 3934 3733 3c2f tdsoap2.h:9473
    .

    .<\n+000feb90: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+000feba0: 6964 3d22 6173 7472 7563 745f 735f 6f5f id=\"astruct_s_o_\n+000febb0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+000febc0: 6465 7461 696c 5f68 746d 6c5f 6131 3539 detail_html_a159\n+000febd0: 6433 3434 3735 3963 3036 6638 3265 6165 d344759c06f82eae\n+000febe0: 3139 3439 6165 6131 3061 3163 6622 3e3c 1949aea10a1cf\"><\n+000febf0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+000fec00: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">SOAP_ENV__\n+000fec60: 4465 7461 696c 3a3a 6661 756c 743c 2f61 Detail::fault
    \n+000fecb0: 416e 7920 6461 7461 206f 6620 736f 6d65 Any data of some\n+000fecc0: 2074 7970 6520 5420 7365 7269 616c 697a type T serializ\n+000fecd0: 6564 2061 7320 6661 756c 7420 656c 656d ed as fault elem\n+000fece0: 656e 7420 7768 656e 2069 7473 2053 4f41 ent when its SOA\n+000fecf0: 505f 5459 5045 5f54 2069 7320 6173 7369 P_TYPE_T is assi\n+000fed00: 676e 6564 2074 6f20 5f5f 7479 7065 3c2f gned to __type
    Defini\n+000fed30: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+000fed40: 7032 2e68 3a39 3438 363c 2f64 6976 3e3c p2.h:9486
    <\n+000fed50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    _XML __any
    Any XML con\n+000fee80: 7465 6e74 2e3c 2f64 6976 3e3c 6469 7620 tent.
    Definition:\n+000feeb0: 2073 7464 736f 6170 322e 683a 3934 3838 stdsoap2.h:9488\n+000feec0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .SOAP_ENV__De\n+000fefa0: 7461 696c 3a3a 5f5f 7479 7065 3c2f 613e tail::__type\n+000fefb0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int __\n+000fefd0: 7479 7065 3c2f 6469 763e 3c64 6976 2063 type
    Any\n+000feff0: 2064 6174 6120 6f66 2073 6f6d 6520 7479 data of some ty\n+000ff000: 7065 2054 2073 6572 6961 6c69 7a65 6420 pe T serialized \n+000ff010: 6173 2066 6175 6c74 2065 6c65 6d65 6e74 as fault element\n+000ff020: 2077 6865 6e20 6974 7320 534f 4150 5f54 when its SOAP_T\n+000ff030: 5950 455f 5420 6973 2061 7373 6967 6e65 YPE_T is assigne\n+000ff040: 6420 746f 205f 5f74 7970 653c 2f64 6976 d to __type
    Definitio\n+000ff070: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+000ff080: 683a 3934 3834 3c2f 6469 763e 3c2f 6469 h:9484
    .
    SOAP_ENV\n+000ff160: 5f5f 4661 756c 743a 3a53 4f41 505f 454e __Fault::SOAP_EN\n+000ff170: 565f 5f4e 6f64 653c 2f61 3e3c 2f64 6976 V__Node
    char * SOAP\n+000ff1a0: 5f45 4e56 5f5f 4e6f 6465 3c2f 6469 763e _ENV__Node
    \n+000ff1b0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Optional elem\n+000ff1d0: 656e 7420 534f 4150 2d45 4e56 3a4e 6f64 ent SOAP-ENV:Nod\n+000ff1e0: 6520 6f66 2058 5344 2074 7970 6520 7873 e of XSD type xs\n+000ff1f0: 643a 7374 7269 6e67 3c2f 6469 763e 3c64 d:string
    Definition:<\n+000ff220: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n+000ff230: 3436 303c 2f64 6976 3e3c 2f64 6976 3e0a 460
    .\n+000ff240: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    <\n+000ff2a0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+000ff2b0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">SOAP_ENV__F\n+000ff310: 6175 6c74 3a3a 534f 4150 5f45 4e56 5f5f ault::SOAP_ENV__\n+000ff320: 4465 7461 696c 3c2f 613e 3c2f 6469 763e Detail
    \n+000ff330: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    struct SOAP_\n+000ff350: 454e 565f 5f44 6574 6169 6c20 2a20 534f ENV__Detail * SO\n+000ff360: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail
    Optional \n+000ff390: 656c 656d 656e 7420 534f 4150 2d45 4e56 element SOAP-ENV\n+000ff3a0: 3a44 6574 6169 6c20 6f66 2058 5344 2074 :Detail of XSD t\n+000ff3b0: 7970 6520 534f 4150 2d45 4e56 3a44 6574 ype SOAP-ENV:Det\n+000ff3c0: 6169 6c3c 2f64 6976 3e3c 6469 7620 636c ail
    D\n+000ff3e0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+000ff3f0: 7464 736f 6170 322e 683a 3934 3634 3c2f tdsoap2.h:9464
    .
    \n+000ff4d0: 534f 4150 5f45 4e56 5f5f 4661 756c 743a SOAP_ENV__Fault:\n+000ff4e0: 3a53 4f41 505f 454e 565f 5f52 6f6c 653c :SOAP_ENV__Role<\n+000ff4f0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    cha\n+000ff510: 7220 2a20 534f 4150 5f45 4e56 5f5f 526f r * SOAP_ENV__Ro\n+000ff520: 6c65 3c2f 6469 763e 3c64 6976 2063 6c61 le
    Optio\n+000ff540: 6e61 6c20 656c 656d 656e 7420 534f 4150 nal element SOAP\n+000ff550: 2d45 4e56 3a52 6f6c 6520 6f66 2058 5344 -ENV:Role of XSD\n+000ff560: 2074 7970 6520 7873 643a 7374 7269 6e67 type xsd:string\n+000ff570: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+000ff590: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+000ff5a0: 6f61 7032 2e68 3a39 3436 323c 2f64 6976 oap2.h:9462
    .
    O\n+000ff700: 7074 696f 6e61 6c20 656c 656d 656e 7420 ptional element \n+000ff710: 534f 4150 2d45 4e56 3a52 6561 736f 6e20 SOAP-ENV:Reason \n+000ff720: 6f66 2058 5344 2074 7970 6520 534f 4150 of XSD type SOAP\n+000ff730: 2d45 4e56 3a52 6561 736f 6e3c 2f64 6976 -ENV:Reason
    Definitio\n+000ff760: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+000ff770: 683a 3934 3538 3c2f 6469 763e 3c2f 6469 h:9458
    .
    Opt\n+000ff8b0: 696f 6e61 6c20 656c 656d 656e 7420 6661 ional element fa\n+000ff8c0: 756c 7473 7472 696e 6720 6f66 2058 5344 ultstring of XSD\n+000ff8d0: 2074 7970 6520 7873 643a 7374 7269 6e67 type xsd:string\n+000ff8e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+000ff900: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+000ff910: 6f61 7032 2e68 3a39 3435 303c 2f64 6976 oap2.h:9450
    .
    struct\n+000ffa30: 2053 4f41 505f 454e 565f 5f43 6f64 6520 SOAP_ENV__Code \n+000ffa40: 2a20 534f 4150 5f45 4e56 5f5f 436f 6465 * SOAP_ENV__Code\n+000ffa50: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Optiona\n+000ffa70: 6c20 656c 656d 656e 7420 534f 4150 2d45 l element SOAP-E\n+000ffa80: 4e56 3a43 6f64 6520 6f66 2058 5344 2074 NV:Code of XSD t\n+000ffa90: 7970 6520 534f 4150 2d45 4e56 3a43 6f64 ype SOAP-ENV:Cod\n+000ffaa0: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    Def\n+000ffac0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+000ffad0: 736f 6170 322e 683a 3934 3536 3c2f 6469 soap2.h:9456
    .
    SO\n+000ffbb0: 4150 5f45 4e56 5f5f 4661 756c 743a 3a66 AP_ENV__Fault::f\n+000ffbc0: 6175 6c74 636f 6465 3c2f 613e 3c2f 6469 aultcode
    _QName fau\n+000ffbf0: 6c74 636f 6465 3c2f 6469 763e 3c64 6976 ltcode
    O\n+000ffc10: 7074 696f 6e61 6c20 656c 656d 656e 7420 ptional element \n+000ffc20: 6661 756c 7463 6f64 6520 6f66 2058 5344 faultcode of XSD\n+000ffc30: 2074 7970 6520 7873 643a 514e 616d 653c type xsd:QName<\n+000ffc40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+000ffc60: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+000ffc70: 6170 322e 683a 3934 3438 3c2f 6469 763e ap2.h:9448
    \n+000ffc80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    SOAP\n+000ffd50: 5f45 4e56 5f5f 4661 756c 743a 3a66 6175 _ENV__Fault::fau\n+000ffd60: 6c74 6163 746f 723c 2f61 3e3c 2f64 6976 ltactor
    char * faul\n+000ffd90: 7461 6374 6f72 3c2f 6469 763e 3c64 6976 tactor
    O\n+000ffdb0: 7074 696f 6e61 6c20 656c 656d 656e 7420 ptional element \n+000ffdc0: 6661 756c 7461 6374 6f72 206f 6620 5853 faultactor of XS\n+000ffdd0: 4420 7479 7065 2078 7364 3a73 7472 696e D type xsd:strin\n+000ffde0: 673c 2f64 6976 3e3c 6469 7620 636c 6173 g
    Def\n+000ffe00: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+000ffe10: 736f 6170 322e 683a 3934 3532 3c2f 6469 soap2.h:9452
    .
    <\n+000fff10: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+000fff20: 6922 3e73 7472 7563 7420 534f 4150 5f45 i\">struct SOAP_E\n+000fff30: 4e56 5f5f 4465 7461 696c 202a 2064 6574 NV__Detail * det\n+000fff40: 6169 6c3c 2f64 6976 3e3c 6469 7620 636c ail
    Opti\n+000fff60: 6f6e 616c 2065 6c65 6d65 6e74 2064 6574 onal element det\n+000fff70: 6169 6c20 6f66 2058 5344 2074 7970 6520 ail of XSD type \n+000fff80: 534f 4150 2d45 4e56 3a44 6574 6169 6c3c SOAP-ENV:Detail<\n+000fff90: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+000fffb0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+000fffc0: 6170 322e 683a 3934 3534 3c2f 6469 763e ap2.h:9454
    \n+000fffd0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The first four \n+00100000: 6d65 6d62 6572 7320 696e 203c 636f 6465 members in SOAP_E\n+00100070: 4e56 5f5f 4661 756c 743c 2f61 3e3c 2f63 NV__Fault are SOAP 1.\n+00100090: 3120 7370 6563 6966 6963 2e20 5468 6520 1 specific. The \n+001000a0: 6c61 7374 2066 6976 6520 6d65 6d62 6572 last five member\n+001000b0: 7320 6172 6520 534f 4150 2031 2e32 2073 s are SOAP 1.2 s\n+001000c0: 7065 6369 6669 632e 2059 6f75 2063 616e pecific. You can\n+001000d0: 2072 6564 6566 696e 6520 7468 6573 6520 redefine these \n+001000e0: 7374 7275 6374 7572 6573 2069 6e20 7468 structures in th\n+001000f0: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head\n+00100100: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap\n+00100110: 6370 7032 2e20 466f 7220 6578 616d 706c cpp2. For exampl\n+00100120: 652c 2079 6f75 2063 616e 2075 7365 2061 e, you can use a\n+00100130: 203c 636f 6465 3e63 6c61 7373 3c2f 636f class for the SOAP_\n+001001b0: 454e 565f 5f46 6175 6c74 3c2f 613e 3c2f ENV__Fault and add me\n+001001d0: 7468 6f64 7320 666f 7220 636f 6e76 656e thods for conven\n+001001e0: 6965 6e63 652e 3c2f 703e 0a3c 703e 5468 ience.

    .

    Th\n+001001f0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e SOAP_EN\n+00100260: 565f 5f44 6574 6169 6c3c 2f61 3e3c 2f63 V__Detail structure c\n+00100280: 616e 2062 6520 6368 616e 6765 6420 746f an be changed to\n+00100290: 2074 6865 206e 6565 6473 206f 6620 5765 the needs of We\n+001002a0: 6220 7365 7276 6963 6520 6170 706c 6963 b service applic\n+001002b0: 6174 696f 6e20 746f 2063 6f6d 6d75 6e69 ation to communi\n+001002c0: 6361 7465 2073 7065 6369 6669 6320 6661 cate specific fa\n+001002d0: 756c 7420 6461 7461 2073 7472 7563 7475 ult data structu\n+001002e0: 7265 732c 2062 7574 2074 6869 7320 6973 res, but this is\n+001002f0: 2067 656e 6572 616c 6c79 206e 6f74 206e generally not n\n+00100300: 6563 6573 7361 7279 2062 6563 6175 7365 ecessary because\n+00100310: 2074 6865 2061 7070 6c69 6361 7469 6f6e the application\n+00100320: 2d73 7065 6369 6669 6320 534f 4150 2046 -specific SOAP F\n+00100330: 6175 6c74 2064 6574 6169 6c73 2063 616e ault details can\n+00100340: 2062 6520 7365 7269 616c 697a 6564 2076 be serialized v\n+00100350: 6961 2074 6865 203c 636f 6465 3e5f 5f74 ia the __t\n+00100360: 7970 653c 2f63 6f64 653e 2061 6e64 203c ype and <\n+00100370: 636f 6465 3e66 6175 6c74 3c2f 636f 6465 code>fault members in the\n+00100390: 203c 636f 6465 3e3c 6120 636c 6173 733d SOAP_ENV\n+00100400: 5f5f 4465 7461 696c 3c2f 613e 3c2f 636f __Detail member, see \n+00100420: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section Voi\n+00100450: 6420 706f 696e 7465 7220 7365 7269 616c d pointer serial\n+00100460: 697a 6174 696f 6e3c 2f61 3e20 6f6e 2074 ization on t\n+00100470: 6865 2073 6572 6961 6c69 7a61 7469 6f6e he serialization\n+00100480: 206f 6620 6461 7461 2072 6566 6572 7265 of data referre\n+00100490: 6420 746f 2062 7920 3c63 6f64 653e 5f5f d to by __\n+001004a0: 7479 7065 3c2f 636f 6465 3e20 616e 6420 type and \n+001004b0: 3c63 6f64 653e 6661 756c 743c 2f63 6f64 fault.

    .

    When \n+001004d0: 6120 7573 6572 2d64 6566 696e 6520 7365 a user-define se\n+001004e0: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n+001004f0: 6675 6e63 7469 6f6e 2072 6574 7572 6e73 function returns\n+00100500: 2061 6e20 6572 726f 7220 7769 7468 203c an error with <\n+00100510: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_sender_f\n+001005c0: 6175 6c74 3c2f 613e 3c2f 636f 6465 3e20 ault \n+001005d0: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap_re\n+00100680: 6365 6976 6572 5f66 6175 6c74 3c2f 613e ceiver_fault\n+00100690: 3c2f 636f 6465 3e2c 2074 6865 6e20 7468 , then th\n+001006a0: 6520 534f 4150 2046 6175 6c74 2073 7472 e SOAP Fault str\n+001006b0: 7563 7475 7265 2069 7320 706f 7075 6c61 ucture is popula\n+001006c0: 7465 6420 616e 6420 3c63 6f64 653e 3c61 ted and soap::faul\n+00100790: 743c 2f61 3e3c 2f63 6f64 653e 2070 6f69 t poi\n+001007a0: 6e74 7320 746f 2074 6869 7320 534f 4150 nts to this SOAP\n+001007b0: 2046 6175 6c74 2e20 5468 6520 534f 4150 Fault. The SOAP\n+001007c0: 2046 6175 6c74 2069 7320 7365 6e74 2074 Fault is sent t\n+001007d0: 6f20 7468 6520 636c 6965 6e74 2e20 5468 o the client. Th\n+001007e0: 6520 636c 6965 6e74 2070 6f70 756c 6174 e client populat\n+001007f0: 6573 2061 2053 4f41 5020 4661 756c 7420 es a SOAP Fault \n+00100800: 7374 7275 6374 7572 6520 7468 6174 2063 structure that c\n+00100810: 6f6e 7461 696e 7320 7468 6520 534f 4150 ontains the SOAP\n+00100820: 2046 6175 6c74 206d 6573 7361 6765 2077 Fault message w\n+00100830: 6974 6820 6465 7461 696c 732e 3c2f 703e ith details.

    \n+00100840: 0a3c 703e 5365 7276 6572 2d73 6964 6520 .

    Server-side \n+00100850: 6661 756c 7473 2061 7265 2072 6169 7365 faults are raise\n+00100860: 6420 7769 7468 203c 636f 6465 3e3c 6120 d with soap_\n+00100910: 7365 6e64 6572 5f66 6175 6c74 3c2f 613e sender_fault\n+00100920: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or soap_receiver_f\n+001009e0: 6175 6c74 3c2f 613e 3c2f 636f 6465 3e2e ault.\n+001009f0: 2054 6865 203c 636f 6465 3e3c 6120 636c The soap_se\n+00100aa0: 6e64 6572 5f66 6175 6c74 3c2f 613e 3c2f nder_fault call shoul\n+00100ac0: 6420 6265 2075 7365 6420 746f 2069 6e66 d be used to inf\n+00100ad0: 6f72 6d20 7468 6174 2074 6865 2073 656e orm that the sen\n+00100ae0: 6465 7220 6973 2061 7420 6661 756c 7420 der is at fault \n+00100af0: 616e 6420 7468 6520 7365 6e64 6572 2028 and the sender (\n+00100b00: 636c 6965 6e74 2920 7368 6f75 6c64 206e client) should n\n+00100b10: 6f74 2072 652d 7365 6e64 2074 6865 2072 ot re-send the r\n+00100b20: 6571 7565 7374 2e20 5468 6520 3c63 6f64 equest. The soap_receiver_\n+00100be0: 6661 756c 743c 2f61 3e3c 2f63 6f64 653e fault\n+00100bf0: 2063 616c 6c20 7368 6f75 6c64 2062 6520 call should be \n+00100c00: 7573 6564 2074 6f20 696e 6469 6361 7465 used to indicate\n+00100c10: 2061 2074 656d 706f 7261 7279 2073 6572 a temporary ser\n+00100c20: 7665 722d 7369 6465 2070 726f 626c 656d ver-side problem\n+00100c30: 2c20 736f 2061 2073 656e 6465 7220 2863 , so a sender (c\n+00100c40: 6c69 656e 7429 2063 616e 2072 652d 7365 lient) can re-se\n+00100c50: 6e64 2074 6865 2072 6571 7565 7374 206c nd the request l\n+00100c60: 6174 6572 2e20 466f 7220 6578 616d 706c ater. For exampl\n+00100c70: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+00100ca0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00100cb0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns1__myMetho\n+00100cd0: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa\n+00100d20: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00100d50: 6170 3c2f 613e 2c20 2e2e 2e29 203c 2f64 ap, ...) .
    {
    .\n+00100d90: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... //
    . \n+00100dd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+00100df0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soap_\n+00100e50: 7265 6365 6976 6572 5f66 6175 6c74 3c2f receiver_fault(soap, \n+00100eb0: 2671 756f 743b 5265 736f 7572 6365 2074 "Resource t\n+00100ec0: 656d 706f 7261 7269 6c79 2075 6e61 7661 emporarily unava\n+00100ed0: 696c 6162 6c65 2671 756f 743b 3c2f 7370 ilable", NULL); // return faul\n+00100f10: 7420 746f 2073 656e 6465 7220 3c2f 7370 t to sender
    .
    }.

    In\n+00100f60: 2074 6865 2065 7861 6d70 6c65 2c20 7468 the example, th\n+00100f70: 6520 534f 4150 2046 6175 6c74 2064 6574 e SOAP Fault det\n+00100f80: 6169 6c73 2077 6572 6520 656d 7074 7920 ails were empty \n+00100f90: 284e 554c 4c29 2e20 596f 7520 6d61 7920 (NULL). You may \n+00100fa0: 7061 7373 2061 6e20 584d 4c20 6672 6167 pass an XML frag\n+00100fb0: 6d65 6e74 2c20 7768 6963 6820 7769 6c6c ment, which will\n+00100fc0: 2062 6520 6c69 7465 7261 6c6c 7920 696e be literally in\n+00100fd0: 636c 7564 6564 2069 6e20 7468 6520 534f cluded in the SO\n+00100fe0: 4150 2046 6175 6c74 206d 6573 7361 6765 AP Fault message\n+00100ff0: 2e20 466f 7220 5753 2d49 2042 6173 6963 . For WS-I Basic\n+00101000: 2050 726f 6669 6c65 2063 6f6d 706c 6961 Profile complia\n+00101010: 6e63 652c 2079 6f75 206d 7573 7420 7061 nce, you must pa\n+00101020: 7373 2061 6e20 584d 4c20 7374 7269 6e67 ss an XML string\n+00101030: 2077 6974 6820 6f6e 6520 6f72 206d 6f72 with one or mor\n+00101040: 6520 6e61 6d65 7370 6163 6520 7175 616c e namespace qual\n+00101050: 6966 6965 6420 656c 656d 656e 7473 2c20 ified elements, \n+00101060: 7375 6368 2061 733a 3c2f 703e 0a3c 6469 such as:

    .
    r\n+001010b0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn \n+00101110: 736f 6170 5f72 6563 6569 7665 725f 6661 soap_receiver_fa\n+00101120: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n+00101150: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "Resou\n+00101180: 7263 6520 7465 6d70 6f72 6172 696c 7920 rce temporarily \n+00101190: 756e 6176 6169 6c61 626c 6526 7175 6f74 unavailable"\n+001011a0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "<\n+001011d0: 6572 726f 7263 6f64 6520 786d 6c6e 733d errorcode xmlns=\n+001011e0: 2623 3339 3b68 7474 703a 2f2f 7465 6d70 'http://temp\n+001011f0: 7572 692e 6f72 6726 2333 393b 2667 743b uri.org'>\n+00101200: 3132 3326 6c74 3b2f 6572 726f 7263 6f64 123</errorcod\n+00101210: 6526 6774 3b26 6c74 3b65 7272 6f72 696e e><errorin\n+00101220: 666f 2078 6d6c 6e73 3d26 2333 393b 6874 fo xmlns='ht\n+00101230: 7470 3a2f 2f74 656d 7075 7269 2e6f 7267 tp://tempuri.org\n+00101240: 2623 3339 3b26 6774 3b61 6263 266c 743b '>abc<\n+00101250: 2f65 7272 6f72 696e 666f 2667 743b 2671 /errorinfo>&q\n+00101260: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.

    Wh\n+00101290: 656e 2061 2073 6572 7669 6365 206f 7065 en a service ope\n+001012a0: 7261 7469 6f6e 206e 6565 6473 2074 6f20 ration needs to \n+001012b0: 706f 7075 6c61 7465 2053 4f41 5020 4661 populate SOAP Fa\n+001012c0: 756c 7420 6465 7461 696c 7320 7769 7468 ult details with\n+001012d0: 2061 2061 7070 6c69 6361 7469 6f6e 2d73 a application-s\n+001012e0: 7065 6369 6669 6320 6461 7461 2c20 6974 pecific data, it\n+001012f0: 2064 6f65 7320 736f 2062 7920 6173 7369 does so by assi\n+00101300: 676e 696e 6720 7468 6520 3c63 6f64 653e gning the \n+00101310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fa\n+001013d0: 756c 743c 2f61 3e3c 2f63 6f64 653e 206d ult m\n+001013e0: 656d 6265 7220 6f66 2074 6865 2063 7572 ember of the cur\n+001013f0: 7265 6e74 2072 6566 6572 656e 6365 2074 rent reference t\n+00101400: 6f20 7468 6520 636f 6e74 6578 7420 7769 o the context wi\n+00101410: 7468 2061 7070 726f 7072 6961 7465 2064 th appropriate d\n+00101420: 6174 6120 6173 736f 6369 6174 6564 2077 ata associated w\n+00101430: 6974 6820 7468 6520 6578 6365 7074 696f ith the exceptio\n+00101440: 6e20 616e 6420 6279 2072 6574 7572 6e69 n and by returni\n+00101450: 6e67 2074 6865 2065 7272 6f72 203c 636f ng the error #SOAP_FAULT. For examp\n+00101480: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

    .
    \n+001014b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_receiver\n+00101510: 5f66 6175 6c74 3c2f 613e 283c 6120 636c _fault(soap, "Er\n+00101570: 726f 7220 6d65 7373 6167 6526 7175 6f74 ror message"\n+00101580: 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c 293b ;, NULL);\n+00101590: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (<\n+001015d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001015e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001015f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00101600: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;vers\n+00101650: 696f 6e3c 2f61 3e20 3d3d 2032 2920 3c73 ion == 2) // SOAP 1.2 \n+00101680: 6973 2075 7365 6420 3c2f 7370 616e 3e3c is used <\n+00101690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+001016b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n+001016f0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->fault-><\n+00101750: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00101760: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n+00101770: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+00101780: 6661 756c 742e 6874 6d6c 2361 3536 3065 fault.html#a560e\n+00101790: 3666 6430 3761 3662 3266 3531 6365 6639 6fd07a6b2f51cef9\n+001017a0: 3761 6131 3232 3832 6338 3730 223e 534f 7aa12282c870\">SO\n+001017b0: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail = soap_new_SO\n+001017d0: 4150 5f45 4e56 5f5f 4465 7461 696c 283c AP_ENV__Detail(<\n+001017e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001017f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00101800: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00101810: 2d31 293b 3c2f 6469 763e 0a3c 6469 7620 -1);
    .
    <\n+00101830: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00101840: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00101850: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00101860: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;faul\n+001018b0: 743c 2f61 3e2d 2667 743b 3c61 2063 6c61 t->SOAP_EN\n+00101920: 565f 5f44 6574 6169 6c3c 2f61 3e2d 2667 V__Detail-&g\n+00101930: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;__type = S\n+001019a0: 4f41 505f 5459 5045 5f6e 7331 5f5f 6d79 OAP_TYPE_ns1__my\n+001019b0: 5374 6163 6b44 6174 6154 7970 653b 203c StackDataType; <\n+001019c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001019d0: 656e 7422 3e2f 2f20 7374 6163 6b20 7479 ent\">// stack ty\n+001019e0: 7065 203c 2f73 7061 6e3e 3c2f 6469 763e pe
    \n+001019f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    <\n+00101be0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00101bf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00101c00: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00101c10: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;faul\n+00101c60: 743c 2f61 3e2d 2667 743b 3c61 2063 6c61 t->SOAP_EN\n+00101cd0: 565f 5f44 6574 6169 6c3c 2f61 3e2d 2667 V__Detail-&g\n+00101ce0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;__any = NU\n+00101d50: 4c4c 3b20 2020 2020 2020 2020 2020 2020 LL; \n+00101d60: 2020 2020 2020 2020 2020 2020 2020 203c <\n+00101d70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00101d80: 656e 7422 3e2f 2f20 6e6f 206f 7468 6572 ent\">// no other\n+00101d90: 2058 4d4c 2064 6174 6120 3c2f 7370 616e XML data
    .
    } .
    e\n+00101df0: 6c73 653c 2f73 7061 6e3e 203c 2f64 6976 lse .
    {
    . \n+00101e30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00101e60: 2667 743b 3c61 2063 6c61 7373 3d22 636f >fau\n+00101eb0: 6c74 3c2f 613e 2d26 6774 3b3c 6120 636c lt->detail\n+00101f20: 3c2f 613e 203d 2073 6f61 705f 6e65 775f = soap_new_\n+00101f30: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail\n+00101f40: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00101f70: 2c20 2d31 293b 203c 2f64 6976 3e0a 3c64 , -1);
    .\n+00101f90: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->f\n+00102010: 6175 6c74 3c2f 613e 2d26 6774 3b3c 6120 ault->deta\n+00102080: 696c 3c2f 613e 2d26 6774 3b3c 6120 636c il->__typ\n+001020f0: 653c 2f61 3e20 3d20 534f 4150 5f54 5950 e = SOAP_TYP\n+00102100: 455f 6e73 315f 5f6d 7953 7461 636b 4461 E_ns1__myStackDa\n+00102110: 7461 5479 7065 3b20 3c73 7061 6e20 636c taType; //\n+00102130: 2073 7461 636b 2074 7970 6520 3c2f 7370 stack type
    .
    soap-&g\n+00102190: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;fault\n+001021e0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->detail->fault\n+001022c0: 203d 2073 703b 2020 2020 2020 2020 2020 = sp; \n+001022d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001022e0: 2020 2020 3c73 7061 6e20 636c 6173 733d // poi\n+00102300: 6e74 2074 6f20 7374 6163 6b20 3c2f 7370 nt to stack
    .
    soap-&g\n+00102360: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;fault\n+001023b0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->detail->__any\n+00102490: 203d 204e 554c 4c3b 2020 2020 2020 2020 = NULL; \n+001024a0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001024b0: 2020 2020 3c73 7061 6e20 636c 6173 733d // no \n+001024d0: 6f74 6865 7220 584d 4c20 6461 7461 203c other XML data <\n+001024e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+00102500: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return SOAP_FAULT\n+001025a0: 3c2f 613e 3b20 3c73 7061 6e20 636c 6173 ; // r\n+001025c0: 6574 7572 6e20 6672 6f6d 2073 6572 7669 eturn from servi\n+001025d0: 6365 206f 7065 7261 7469 6f6e 2063 616c ce operation cal\n+001025e0: 6c20 7769 7468 2074 6865 2066 6175 6c74 l with the fault\n+001025f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .short version<\n+001026d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    SOAP ver\n+001026f0: 7369 6f6e 2028 3020 3d20 6e6f 2053 4f41 sion (0 = no SOA\n+00102700: 502c 2031 203d 2053 4f41 5020 312e 312c P, 1 = SOAP 1.1,\n+00102710: 2032 203d 2053 4f41 5020 312e 3229 3c2f 2 = SOAP 1.2)
    Defini\n+00102740: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00102750: 7032 2e68 3a32 3835 313c 2f64 6976 3e3c p2.h:2851
    <\n+00102760: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00102780: 4865 7265 2c20 3c63 6f64 653e 3c61 2063 Here, soap\n+00102830: 5f72 6563 6569 7665 725f 6661 756c 743c _receiver_fault<\n+00102840: 2f61 3e3c 2f63 6f64 653e 2061 6c6c 6f63 /a> alloc\n+00102850: 6174 6573 2061 2066 6175 6c74 2073 7472 ates a fault str\n+00102860: 7563 7420 7468 656e 2077 6520 7365 7420 uct then we set \n+00102870: 7468 6520 534f 4150 2046 6175 6c74 2064 the SOAP Fault d\n+00102880: 6574 6169 6c73 2061 7320 7368 6f77 6e2e etails as shown.\n+00102890: 3c2f 703e 0a3c 703e 4e6f 7465 2074 6861

    .

    Note tha\n+001028a0: 7420 534f 4150 2031 2e32 2073 7570 706f t SOAP 1.2 suppo\n+001028b0: 7274 7320 6e65 7374 6564 2066 6175 6c74 rts nested fault\n+001028c0: 2073 7562 2d63 6f64 6573 2e20 5468 6573 sub-codes. Thes\n+001028d0: 6520 6361 6e20 6265 2073 6574 2061 7320 e can be set as \n+001028e0: 666f 6c6c 6f77 733a 3c2f 703e 0a3c 6469 follows:

    .
    struc\n+00102930: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t SOAP_ENV__C\n+00102980: 6f64 653c 2f61 3e20 2a73 7562 636f 6465 ode *subcode\n+00102990: 3120 3d20 736f 6170 5f6e 6577 5f53 4f41 1 = soap_new_SOA\n+001029a0: 505f 454e 565f 5f43 6f64 6528 3c61 2063 P_ENV__Code(soap);.
    stru\n+00102a10: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct SOAP_ENV__\n+00102a60: 436f 6465 3c2f 613e 202a 7375 6263 6f64 Code *subcod\n+00102a70: 6532 203d 2073 6f61 705f 6e65 775f 534f e2 = soap_new_SO\n+00102a80: 4150 5f45 4e56 5f5f 436f 6465 283c 6120 AP_ENV__Code(soap);.
    soap_s\n+00102b30: 656e 6465 725f 6661 756c 743c 2f61 3e28 ender_fault(\n+00102b40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00102b70: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00102b90: 6f74 3b54 6865 2072 6571 7565 7374 6564 ot;The requested\n+00102ba0: 2070 726f 6669 6c65 2074 6f6b 656e 2050 profile token P\n+00102bb0: 726f 6669 6c65 546f 6b65 6e20 646f 6573 rofileToken does\n+00102bc0: 206e 6f74 2065 7869 7374 2e26 7175 6f74 not exist."\n+00102bd0: 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c 293b ;, NULL);\n+00102be0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    subcod\n+00102c00: 6531 2d26 6774 3b3c 6120 636c 6173 733d e1->SOAP_ENV__V\n+00102c70: 616c 7565 3c2f 613e 203d 2028 3c73 7061 alue = (char*)&\n+00102cc0: 7175 6f74 3b74 6572 3a49 6e76 616c 6964 quot;ter:Invalid\n+00102cd0: 4172 6773 2671 756f 743b 3c2f 7370 616e Args"; // a QN\n+00102d00: 616d 6520 7661 6c75 653c 2f73 7061 6e3e ame value\n+00102d10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    subcode\n+00102d30: 312d 2667 743b 3c61 2063 6c61 7373 3d22 1->SOAP_ENV__Su\n+00102da0: 6263 6f64 653c 2f61 3e20 3d20 7375 6263 bcode = subc\n+00102db0: 6f64 6532 3b3c 2f64 6976 3e0a 3c64 6976 ode2;
    .su\n+00102dd0: 6263 6f64 6532 2d26 6774 3b3c 6120 636c bcode2->SOAP_EN\n+00102e40: 565f 5f56 616c 7565 3c2f 613e 203d 2028 V__Value = (\n+00102e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*)"ter:NoP\n+00102ea0: 726f 6669 6c65 2671 756f 743b 3c2f 7370 rofile"; // a \n+00102ed0: 514e 616d 6520 7661 6c75 653c 2f73 7061 QName value
    .
    subco\n+00102f00: 6465 322d 2667 743b 3c61 2063 6c61 7373 de2->SOAP_ENV__\n+00102f70: 5375 6263 6f64 653c 2f61 3e20 3d20 4e55 Subcode = NU\n+00102f80: 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 2063 LL;
    .
    soap->\n+00102fd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fault->SOAP_ENV__\n+00103090: 436f 6465 3c2f 613e 2d26 6774 3b3c 6120 Code->SOAP_\n+00103100: 454e 565f 5f53 7562 636f 6465 3c2f 613e ENV__Subcode\n+00103110: 203d 2073 7562 636f 6465 313b 3c2f 6469 = subcode1;.
    r\n+00103150: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_FAULT;\n+001031c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    This produces:<\n+001031f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    &l\n+00103230: 743b 3c73 7061 6e20 636c 6173 733d 226b t;SOAP\n+00103250: 2d45 4e56 3a46 6175 6c74 3c2f 7370 616e -ENV:Fault>
    . \n+00103280: 266c 743b 3c73 7061 6e20 636c 6173 733d <SO\n+001032a0: 4150 2d45 4e56 3a43 6f64 653c 2f73 7061 AP-ENV:Code>
    . \n+001032d0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP-ENV:Value<\n+00103300: 2f73 7061 6e3e 2667 743b 3c73 7061 6e20 /span>>\n+00103320: 534f 4150 2d45 4e56 3a53 656e 6465 723c SOAP-ENV:Sender<\n+00103330: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></SOAP-ENV:Va\n+00103360: 6c75 653c 2f73 7061 6e3e 2667 743b 3c2f lue>.
    <<\n+00103390: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001033a0: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype\">SOAP-EN\n+001033b0: 563a 5375 6263 6f64 653c 2f73 7061 6e3e V:Subcode\n+001033c0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n+001033e0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP-ENV:Value<\n+00103410: 2f73 7061 6e3e 2667 743b 3c73 7061 6e20 /span>>\n+00103430: 7465 723a 496e 7661 6c69 6441 7267 733c ter:InvalidArgs<\n+00103440: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></SOAP-ENV:Va\n+00103470: 6c75 653c 2f73 7061 6e3e 2667 743b 3c2f lue>.
    <\n+001034a0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;SOAP-\n+001034c0: 454e 563a 5375 6263 6f64 653c 2f73 7061 ENV:Subcode>
    . \n+001034f0: 2020 2020 2020 2026 6c74 3b3c 7370 616e <SOAP-ENV:Va\n+00103520: 6c75 653c 2f73 7061 6e3e 2667 743b 3c73 lue
    >ter:NoProfil\n+00103550: 653c 2f73 7061 6e3e 2026 6c74 3b2f 3c73 e </SOAP-ENV\n+00103580: 3a56 616c 7565 3c2f 7370 616e 3e26 6774 :Value>\n+00103590: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n+001035b0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </S\n+001035d0: 4f41 502d 454e 563a 5375 6263 6f64 653c OAP-ENV:Subcode<\n+001035e0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n+001035f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </SOAP-ENV:S\n+00103630: 7562 636f 6465 3c2f 7370 616e 3e26 6774 ubcode>\n+00103640: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    <\n+00103660: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /SOAP-\n+00103680: 454e 563a 436f 6465 3c2f 7370 616e 3e26 ENV:Code&\n+00103690: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    &l\n+001036b0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;SOAP\n+001036d0: 2d45 4e56 3a52 6561 736f 6e3c 2f73 7061 -ENV:Reason>
    . \n+00103700: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP-ENV:Text xml:\n+00103750: 6c61 6e67 3c2f 7370 616e 3e3d 3c73 7061 lang="en\n+00103780: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n+00103790: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;The requeste\n+001037d0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d p\n+001037f0: 726f 6669 6c65 3c2f 7370 616e 3e20 3c73 rofile token\n+00103820: 203c 7370 616e 2063 6c61 7373 3d22 6b65 ProfileTo\n+00103840: 6b65 6e3c 2f73 7061 6e3e 203c 7370 616e ken does
    not exist.</\n+001038d0: 534f 4150 2d45 4e56 3a54 6578 743c 2f73 SOAP-ENV:Text>
    .<\n+001038f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00103900: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </SOAP-ENV:Reaso\n+00103930: 6e3c 2f73 7061 6e3e 2667 743b 3c2f 6469 n>.
    </SOAP-ENV:Fau\n+00103980: 6c74 3c2f 7370 616e 3e26 6774 3b3c 2f64 lt>.

    Service ope\n+001039c0: 7261 7469 6f6e 7320 696d 706c 656d 656e rations implemen\n+001039d0: 7461 7469 6f6e 2069 6e20 6120 5765 6220 tation in a Web \n+001039e0: 7365 7276 6963 6520 6170 706c 6963 6174 service applicat\n+001039f0: 696f 6e20 6361 6e20 7265 7475 726e 2076 ion can return v\n+00103a00: 6172 696f 7573 2053 4f41 5020 4661 756c arious SOAP Faul\n+00103a10: 7473 2063 7573 746f 6d69 7a65 6420 696e ts customized in\n+00103a20: 2074 6869 7320 7761 792e 3c2f 703e 0a3c this way.

    .<\n+00103a30: 703e 534f 4150 2046 6175 6c74 2073 7472 p>SOAP Fault str\n+00103a40: 7563 7475 7265 7320 6172 6520 6465 636c uctures are decl\n+00103a50: 6172 6564 203c 636f 6465 3e6d 7574 6162 ared mutab\n+00103a60: 6c65 3c2f 636f 6465 3e2c 2077 6869 6368 le, which\n+00103a70: 206d 6561 6e73 2074 6861 7420 7265 2d64 means that re-d\n+00103a80: 6563 6c61 7261 7469 6f6e 7320 6f66 2074 eclarations of t\n+00103a90: 6865 2073 7472 7563 7475 7265 7320 6172 he structures ar\n+00103aa0: 6520 7065 726d 6974 7465 6420 616e 6420 e permitted and \n+00103ab0: 6164 6469 7469 6f6e 616c 206d 656d 6265 additional membe\n+00103ac0: 7273 2061 7265 2063 6f6c 6c65 6374 6564 rs are collected\n+00103ad0: 2069 6e74 6f20 6f6e 6520 6669 6e61 6c20 into one final \n+00103ae0: 7374 7275 6374 7572 6520 6279 2074 6865 structure by the\n+00103af0: 2073 6f61 7063 7070 3220 746f 6f6c 2e3c soapcpp2 tool.<\n+00103b00: 2f70 3e0a 3c70 3e46 6f72 2061 6e20 6578 /p>.

    For an ex\n+00103b10: 616d 706c 6520 7468 6174 2075 7365 6420 ample that used \n+00103b20: 7468 6520 534f 4150 2046 6175 6c74 2064 the SOAP Fault d\n+00103b30: 6574 6169 6c20 7374 7275 6374 7572 653a etail structure:\n+00103b40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    ..
    int ns__login(...)\n+00104060: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+00104080: 703e 5365 6520 616c 736f 2041 5049 2064 p>See also API d\n+00104090: 6f63 756d 656e 7461 7469 6f6e 204d 6f64 ocumentation Mod\n+001040a0: 756c 6520 3c61 2063 6c61 7373 3d22 656c ule Fault structur\n+001040e0: 6520 616e 6420 6675 6e63 7469 6f6e 733c e and functions<\n+001040f0: 2f61 3e2e 3c2f 703e 0a3c 703e f09f 949d /a>.

    .

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

    .<\n+00104130: 6831 3e3c 6120 636c 6173 733d 2261 6e63 h1><\n+00104150: 2f61 3e0a 4d49 4d45 2061 7474 6163 686d /a>.MIME attachm\n+00104160: 656e 7473 3c2f 6831 3e0a 3c70 3e54 6865 ents

    .

    The\n+00104170: 2067 534f 4150 2074 6f6f 6c6b 6974 2073 gSOAP toolkit s\n+00104180: 7570 706f 7274 7320 4d49 4d45 2061 7474 upports MIME att\n+00104190: 6163 686d 656e 7473 2061 7320 7065 7220 achments as per \n+001041a0: 534f 4150 2077 6974 6820 4174 7461 6368 SOAP with Attach\n+001041b0: 6d65 6e74 7320 2853 7741 2920 7370 6563 ments (SwA) spec\n+001041c0: 6966 6963 6174 696f 6e20 3c61 2068 7265 ification http:/\n+00104200: 2f77 7777 2e77 332e 6f72 672f 5452 2f53 /www.w3.org/TR/S\n+00104210: 4f41 502d 6174 7461 6368 6d65 6e74 733c OAP-attachments<\n+00104220: 2f61 3e2e 3c2f 703e 0a3c 703e 4d54 4f4d /a>.

    .

    MTOM\n+00104230: 2061 7474 6163 686d 656e 7473 2074 6861 attachments tha\n+00104240: 7420 6172 6520 6573 7365 6e74 6961 6c6c t are essentiall\n+00104250: 7920 4d49 4d45 2061 7474 6163 686d 656e y MIME attachmen\n+00104260: 7473 2074 6861 7420 636f 6e66 6f72 6d20 ts that conform \n+00104270: 746f 2074 6865 204d 544f 4d20 7370 6563 to the MTOM spec\n+00104280: 6966 6963 6174 696f 6e20 3c61 2068 7265 ification http://www.\n+001042c0: 7733 2e6f 7267 2f54 522f 736f 6170 3132 w3.org/TR/soap12\n+001042d0: 2d6d 746f 6d3c 2f61 3e20 6172 6520 616c -mtom are al\n+001042e0: 736f 2073 7570 706f 7274 6564 2077 6869 so supported whi\n+001042f0: 6368 2061 7265 2074 6865 2070 7265 6665 ch are the prefe\n+00104300: 7272 6564 2077 6179 2074 6f20 696e 636c rred way to incl\n+00104310: 7564 6520 4d49 4d45 2061 7474 6163 686d ude MIME attachm\n+00104320: 656e 7473 2077 6974 6820 534f 4150 206d ents with SOAP m\n+00104330: 6573 7361 6765 732c 2073 6565 2053 6563 essages, see Sec\n+00104340: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion MTOM a\n+00104370: 7474 6163 686d 656e 7473 3c2f 613e 2e3c ttachments.<\n+00104380: 2f70 3e0a 3c70 3e49 6e20 7468 6520 666f /p>.

    In the fo\n+00104390: 6c6c 6f77 696e 6720 6469 7363 7573 7369 llowing discussi\n+001043a0: 6f6e 2c20 4d49 4d45 2061 7474 6163 686d on, MIME attachm\n+001043b0: 656e 7420 6461 7461 2069 7320 6173 7375 ent data is assu\n+001043c0: 6d65 6420 746f 2062 6520 7265 7369 6465 med to be reside\n+001043d0: 6e74 2069 6e20 6d65 6d6f 7279 2066 6f72 nt in memory for\n+001043e0: 2073 656e 6469 6e67 206f 7065 7261 7469 sending operati\n+001043f0: 6f6e 7320 616e 6420 4d49 4d45 2061 7474 ons and MIME att\n+00104400: 6163 686d 656e 7473 2072 6563 6569 7665 achments receive\n+00104410: 6420 7769 6c6c 2062 6520 7374 6f72 6564 d will be stored\n+00104420: 2069 6e20 6d65 6d6f 7279 206d 616e 6167 in memory manag\n+00104430: 6564 2062 7920 7468 6520 636f 6e74 6578 ed by the contex\n+00104440: 742e 204d 544f 4d20 616e 6420 4449 4d45 t. MTOM and DIME\n+00104450: 2061 7474 6163 686d 656e 7473 206f 6e20 attachments on \n+00104460: 7468 6520 6f74 6865 7220 6861 6e64 2063 the other hand c\n+00104470: 616e 2062 6520 7374 7265 616d 6564 2061 an be streamed a\n+00104480: 6e64 2074 6865 7265 666f 7265 204d 544f nd therefore MTO\n+00104490: 4d2f 4449 4d45 2061 7474 6163 686d 656e M/DIME attachmen\n+001044a0: 7420 6461 7461 2064 6f65 7320 6e6f 7420 t data does not \n+001044b0: 6e65 6564 2074 6f20 6265 2073 746f 7265 need to be store\n+001044c0: 6420 696e 206d 656d 6f72 792c 2073 6565 d in memory, see\n+001044d0: 2053 6563 7469 6f6e 7320 3c61 2063 6c61 Sections D\n+00104500: 494d 4520 6174 7461 6368 6d65 6e74 733c IME attachments<\n+00104510: 2f61 3e20 616e 6420 3c61 2063 6c61 7373 /a> and MTO\n+00104540: 4d20 6174 7461 6368 6d65 6e74 733c 2f61 M attachments .

    .

    Trans\n+00104560: 6d69 7474 696e 6720 6d75 6c74 6970 6172 mitting multipar\n+00104570: 742f 7265 6c61 7465 6420 4d49 4d45 2061 t/related MIME a\n+00104580: 7474 6163 686d 656e 7473 2077 6974 6820 ttachments with \n+00104590: 6120 534f 4150 2f58 4d4c 206d 6573 7361 a SOAP/XML messa\n+001045a0: 6765 2069 7320 6163 636f 6d70 6c69 7368 ge is accomplish\n+001045b0: 6564 2077 6974 6820 7477 6f20 6675 6e63 ed with two func\n+001045c0: 7469 6f6e 732c 203c 636f 6465 3e3c 6120 tions, so\n+00104640: 6170 5f73 6574 5f6d 696d 653c 2f61 3e3c ap_set_mime<\n+00104650: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_set\n+001046f0: 5f6d 696d 655f 6174 7461 6368 6d65 6e74 _mime_attachment\n+00104700: 3c2f 613e 3c2f 636f 6465 3e2e 2054 6865 . The\n+00104710: 2066 6972 7374 2066 756e 6374 696f 6e20 first function \n+00104720: 6973 2066 6f72 2069 6e69 7469 616c 697a is for initializ\n+00104730: 6174 696f 6e20 7075 7270 6f73 6573 2061 ation purposes a\n+00104740: 6e64 2074 6865 206c 6174 7465 7220 6675 nd the latter fu\n+00104750: 6e63 7469 6f6e 2069 7320 7573 6564 2074 nction is used t\n+00104760: 6f20 7370 6563 6966 7920 6d65 7461 2064 o specify meta d\n+00104770: 6174 6120 616e 6420 636f 6e74 656e 7420 ata and content \n+00104780: 6461 7461 2066 6f72 2065 6163 6820 6174 data for each at\n+00104790: 7461 6368 6d65 6e74 2e3c 2f70 3e0a 3c70 tachment.

    .See also API do\n+001047b0: 6375 6d65 6e74 6174 696f 6e20 4d6f 6475 cumentation Modu\n+001047c0: 6c65 203c 6120 636c 6173 733d 2265 6c22 le \n+001047f0: 4d49 4d45 2061 7474 6163 686d 656e 7420 MIME attachment \n+00104800: 6675 6e63 7469 6f6e 733c 2f61 3e2e 3c2f functions..

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

    .

    <\n+00104870: 2f61 3e0a 5365 6e64 696e 6720 6120 636f /a>.Sending a co\n+00104880: 6c6c 6563 7469 6f6e 206f 6620 4d49 4d45 llection of MIME\n+00104890: 2061 7474 6163 686d 656e 7473 2028 5377 attachments (Sw\n+001048a0: 4129 3c2f 6832 3e0a 3c70 3e54 6865 2066 A)

    .

    The f\n+001048b0: 6f6c 6c6f 7769 6e67 2066 756e 6374 696f ollowing functio\n+001048c0: 6e73 2061 7265 2075 7365 6420 746f 2073 ns are used to s\n+001048d0: 6574 2075 7020 6120 636f 6c6c 6563 7469 et up a collecti\n+001048e0: 6f6e 206f 6620 6d75 6c74 6970 6172 742f on of multipart/\n+001048f0: 7265 6c61 7465 6420 4d49 4d45 2061 7474 related MIME att\n+00104900: 6163 686d 656e 7473 2066 6f72 2074 7261 achments for tra\n+00104910: 6e73 6d69 7373 696f 6e20 7769 7468 2061 nsmission with a\n+00104920: 2053 4f41 5020 6f72 2058 4d4c 206d 6573 SOAP or XML mes\n+00104930: 7361 6765 2e3c 2f70 3e0a 3c75 6c3e 0a3c sage.

    .
      .<\n+00104940: 6c69 3e3c 636f 6465 3e76 6f69 6420 3c61 li>void s\n+001049c0: 6f61 705f 7365 745f 6d69 6d65 2873 7472 oap_set_mime(str\n+001049d0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+001049e0: 636f 6e73 7420 6368 6172 202a 626f 756e const char *boun\n+001049f0: 6461 7279 2c20 636f 6e73 7420 6368 6172 dary, const char\n+00104a00: 202a 7374 6172 7429 3c2f 613e 3c2f 636f *start) This functio\n+00104a20: 6e20 656e 6162 6c65 7320 7365 6e64 696e n enables sendin\n+00104a30: 6720 4d49 4d45 2061 7474 6163 686d 656e g MIME attachmen\n+00104a40: 7473 2e20 5468 6973 2066 756e 6374 696f ts. This functio\n+00104a50: 6e20 6973 2067 656e 6572 616c 6c79 206e n is generally n\n+00104a60: 6f74 2072 6571 7569 7265 6420 7768 656e ot required when\n+00104a70: 2074 6865 2063 6f6e 7465 7874 2069 7320 the context is \n+00104a80: 696e 6974 6961 6c69 7a65 6420 7769 7468 initialized with\n+00104a90: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n+00104aa0: 5f4d 494d 453c 2f63 6f64 653e 2c20 6265 _MIME, be\n+00104ab0: 6361 7573 6520 4d49 4d45 2061 7474 6163 cause MIME attac\n+00104ac0: 686d 656e 7473 2061 7265 2061 7574 6f6d hments are autom\n+00104ad0: 6174 6963 616c 6c79 2064 6574 6563 7465 atically detecte\n+00104ae0: 6420 6173 203c 636f 6465 3e3c 6120 636c d as xsd__ba\n+00104b60: 7365 3634 4269 6e61 7279 3c2f 613e 3c2f se64Binary and \n+00104b80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 _xop__Incl\n+00104bf0: 7564 653c 2f61 3e3c 2f63 6f64 653e 2073 ude s\n+00104c00: 7472 7563 7475 7265 7320 696e 2074 6865 tructures in the\n+00104c10: 2064 6174 6120 746f 2073 6572 6961 6c69 data to seriali\n+00104c20: 7a65 2061 7320 616e 2058 4d4c 206d 6573 ze as an XML mes\n+00104c30: 7361 6765 2077 6974 6820 7468 6520 6174 sage with the at\n+00104c40: 7461 6368 6d65 6e74 7320 6175 746f 6d61 tachments automa\n+00104c50: 7469 6361 6c6c 7920 6164 6465 6420 6f72 tically added or\n+00104c60: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n+00104c70: 7320 6361 6e20 6265 2065 7870 6c69 6369 s can be explici\n+00104c80: 746c 7920 6164 6465 6420 7769 7468 203c tly added with <\n+00104c90: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+00104d20: 5f73 6574 5f6d 696d 655f 6174 7461 6368 _set_mime_attach\n+00104d30: 6d65 6e74 3c2f 613e 3c2f 636f 6465 3e2e ment.\n+00104d40: 2050 6172 616d 6574 6572 203c 636f 6465 Parameter boundary\n+00104d60: 2073 7065 6369 6669 6573 2061 204d 494d specifies a MIM\n+00104d70: 4520 626f 756e 6461 7279 2073 7472 696e E boundary strin\n+00104d80: 6720 6f72 204e 554c 4c20 746f 2068 6176 g or NULL to hav\n+00104d90: 6520 7468 6520 656e 6769 6e65 2067 656e e the engine gen\n+00104da0: 6572 6174 6520 6120 4d49 4d45 2062 6f75 erate a MIME bou\n+00104db0: 6e64 6172 7920 7374 7269 6e67 2e20 5061 ndary string. Pa\n+00104dc0: 7261 6d65 7465 7220 3c63 6f64 653e 7374 rameter st\n+00104dd0: 6172 743c 2f63 6f64 653e 2073 7065 6369 art speci\n+00104de0: 6669 6573 2074 6865 2073 7461 7274 2063 fies the start c\n+00104df0: 6f6e 7465 6e74 2049 4420 666f 7220 7468 ontent ID for th\n+00104e00: 6520 6669 7273 7420 4d49 4d45 2062 6f64 e first MIME bod\n+00104e10: 7920 636f 6e74 6169 6e69 6e67 2074 6865 y containing the\n+00104e20: 2053 4f41 5020 6f72 2058 4d4c 206d 6573 SOAP or XML mes\n+00104e30: 7361 6765 2e20 5768 656e 204e 554c 4c2c sage. When NULL,\n+00104e40: 2074 6865 2073 7461 7274 2049 4420 6f66 the start ID of\n+00104e50: 2074 6865 2053 4f41 5020 6d65 7373 6167 the SOAP messag\n+00104e60: 6520 6973 203c 656d 3e3c 636f 6465 3e26 e is &\n+00104e70: 6c74 3b53 4f41 502d 454e 563a 456e 7665 lt;SOAP-ENV:Enve\n+00104e80: 6c6f 7065 2667 743b 3c2f 636f 6465 3e3c lope><\n+00104e90: 2f65 6d3e 2e3c 2f6c 693e 0a3c 6c69 3e3c /em>..
    • <\n+00104ea0: 636f 6465 3e69 6e74 2073 6f61 705f 7365 code>int soap_se\n+00104eb0: 745f 6d69 6d65 5f61 7474 6163 686d 656e t_mime_attachmen\n+00104ec0: 7428 7374 7275 6374 2073 6f61 7020 2a73 t(struct soap *s\n+00104ed0: 6f61 702c 2063 6861 7220 2a70 7472 2c20 oap, char *ptr, \n+00104ee0: 7369 7a65 5f74 2073 697a 652c 2065 6e75 size_t size, enu\n+00104ef0: 6d20 736f 6170 5f6d 696d 655f 656e 636f m soap_mime_enco\n+00104f00: 6469 6e67 2065 6e63 6f64 696e 672c 2063 ding encoding, c\n+00104f10: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+00104f20: 2063 6f6e 7374 2063 6861 7220 2a69 642c const char *id,\n+00104f30: 2063 6f6e 7374 2063 6861 7220 2a6c 6f63 const char *loc\n+00104f40: 6174 696f 6e2c 2063 6f6e 7374 2063 6861 ation, const cha\n+00104f50: 7220 2a64 6573 6372 6970 7469 6f6e 293c r *description)<\n+00104f60: 2f63 6f64 653e 2054 6869 7320 6675 6e63 /code> This func\n+00104f70: 7469 6f6e 2061 6464 7320 6120 4d49 4d45 tion adds a MIME\n+00104f80: 2061 7474 6163 686d 656e 7420 746f 2061 attachment to a\n+00104f90: 2053 4f41 502f 584d 4c20 6d65 7373 6167 SOAP/XML messag\n+00104fa0: 6520 746f 2073 656e 642e 2054 6865 2073 e to send. The s\n+00104fb0: 7065 6369 6669 6564 203c 636f 6465 3e70 pecified p\n+00104fc0: 7472 3c2f 636f 6465 3e20 706f 696e 7473 tr points\n+00104fd0: 2074 6f20 7468 6520 6461 7461 2074 6f20 to the data to \n+00104fe0: 7365 6e64 206f 6620 6c65 6e67 7468 2073 send of length s\n+00104ff0: 7065 6369 6669 6564 2062 7920 3c63 6f64 pecified by size. T\n+00105010: 6865 203c 636f 6465 3e65 6e63 6f64 696e he encodin\n+00105020: 673c 2f63 6f64 653e 2070 6172 616d 6574 g paramet\n+00105030: 6572 2069 7320 6120 3c63 6f64 653e 3c61 er is a s\n+001050c0: 6f61 705f 6d69 6d65 5f65 6e63 6f64 696e oap_mime_encodin\n+001050d0: 673c 2f61 3e3c 2f63 6f64 653e 2076 616c g val\n+001050e0: 7565 2074 6861 7420 6973 2072 6563 6f6d ue that is recom\n+001050f0: 6d65 6e64 6564 2074 6f20 6265 2073 7065 mended to be spe\n+00105100: 6369 6669 6564 2061 7320 3c63 6f64 653e cified as \n+00105110: 2353 4f41 505f 4d49 4d45 5f4e 4f4e 453c #SOAP_MIME_NONE<\n+00105120: 2f63 6f64 653e 2074 6f20 7370 6563 6966 /code> to specif\n+00105130: 7920 7468 6174 2074 6865 204d 494d 4520 y that the MIME \n+00105140: 6461 7461 2063 6f6e 7465 6e74 2069 7320 data content is \n+00105150: 6e6f 7420 656e 636f 6465 6420 696e 2061 not encoded in a\n+00105160: 6e79 2077 6179 2028 7468 6520 4d49 4d45 ny way (the MIME\n+00105170: 2061 7474 6163 686d 656e 7420 6675 6e63 attachment func\n+00105180: 7469 6f6e 2073 696d 706c 7920 636f 7069 tion simply copi\n+00105190: 6573 2074 6865 2072 6177 2064 6174 6120 es the raw data \n+001051a0: 746f 2074 6865 204d 494d 4520 626c 6f63 to the MIME bloc\n+001051b0: 6b20 7769 7468 6f75 7420 656e 636f 6469 k without encodi\n+001051c0: 6e67 292e 2054 6865 203c 636f 6465 3e74 ng). The t\n+001051d0: 7970 653c 2f63 6f64 653e 2070 6172 616d ype param\n+001051e0: 6574 6572 2069 7320 7265 7175 6972 6564 eter is required\n+001051f0: 2061 6e64 2069 6e64 6963 6174 6573 2074 and indicates t\n+00105200: 6865 204d 494d 4520 7479 7065 206f 6620 he MIME type of \n+00105210: 7468 6520 6461 7461 2c20 7375 6368 2061 the data, such a\n+00105220: 7320 2269 6d61 6765 2f6a 7067 222e 2054 s \"image/jpg\". T\n+00105230: 6865 203c 636f 6465 3e69 643c 2f63 6f64 he id parameter uni\n+00105250: 7175 656c 7920 6964 656e 7469 6669 6573 quely identifies\n+00105260: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n+00105270: 696e 2074 6865 206d 6573 7361 6765 2c20 in the message, \n+00105280: 7768 6963 6820 6361 6e20 6265 206f 6d69 which can be omi\n+00105290: 7474 6564 2062 7920 7370 6563 6966 7969 tted by specifyi\n+001052a0: 6e67 204e 554c 4c2e 2054 6865 203c 636f ng NULL. The location parameter spe\n+001052d0: 6369 6669 6573 2061 206c 6f63 6174 696f cifies a locatio\n+001052e0: 6e20 7374 7269 6e67 206f 7220 4e55 4c4c n string or NULL\n+001052f0: 2e20 5468 6520 3c63 6f64 653e 6465 7363 . The desc\n+00105300: 7269 7074 696f 6e3c 2f63 6f64 653e 2070 ription p\n+00105310: 6172 616d 6574 6572 2069 7320 6120 7374 arameter is a st\n+00105320: 7269 6e67 2074 6861 7420 6465 7363 7269 ring that descri\n+00105330: 6265 7320 7468 6520 6461 7461 206f 7220 bes the data or \n+00105340: 4e55 4c4c 2e20 5265 7475 726e 7320 3c63 NULL. Returns #SOAP_OK or a <\n+00105370: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00105380: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00105390: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+001053a0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+001053b0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+001053c0: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+001053d0: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+001053e0: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+001053f0: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+00105400: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+00105410: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+00105420: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+00105430: 2f63 6f64 653e 2065 7272 6f72 2063 6f64 /code> error cod\n+00105440: 652e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 e.
    • .
    • void soap_cl\n+001054d0: 725f 6d69 6d65 2873 7472 7563 7420 736f r_mime(struct so\n+001054e0: 6170 202a 736f 6170 293c 2f61 3e3c 2f63 ap *soap) This functi\n+00105500: 6f6e 2064 6973 6162 6c65 7320 4d49 4d45 on disables MIME\n+00105510: 2061 7474 6163 686d 656e 7473 2073 7563 attachments suc\n+00105520: 6820 6173 2061 6674 6572 2073 656e 6469 h as after sendi\n+00105530: 6e67 2061 206d 756c 7469 7061 7274 2d72 ng a multipart-r\n+00105540: 656c 6174 6564 206d 6573 7361 6765 2077 elated message w\n+00105550: 6974 6820 6174 7461 6368 6d65 6e74 7320 ith attachments \n+00105560: 746f 2073 7769 7463 6820 6261 636b 2074 to switch back t\n+00105570: 6f20 6e6f 6e2d 6d75 6c74 6970 6172 742d o non-multipart-\n+00105580: 7265 6c61 7465 6420 6d65 7373 6167 696e related messagin\n+00105590: 672c 2075 6e6c 6573 7320 7468 6520 6461 g, unless the da\n+001055a0: 7461 2074 6f20 7365 7269 616c 697a 6520 ta to serialize \n+001055b0: 6173 2061 206d 6573 7361 6765 2063 6f6e as a message con\n+001055c0: 7461 696e 7320 6174 7461 6368 6d65 6e74 tains attachment\n+001055d0: 7320 7375 6368 2061 7320 3c63 6f64 653e s such as \n+001055e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xs\n+00105650: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary<\n+00105660: 2f61 3e3c 2f63 6f64 653e 2066 6f72 204d /a> for M\n+00105670: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+00105680: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and \n+001056f0: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include for MTO\n+00105710: 4d20 6174 7461 6368 6d65 6e74 732e 3c2f M attachments..
    .

    Whe\n+00105730: 6e20 7072 6f76 6964 696e 6720 6120 4d49 n providing a MI\n+00105740: 4d45 2062 6f75 6e64 6172 7920 7769 7468 ME boundary with\n+00105750: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set\n+001057d0: 5f6d 696d 653c 2f61 3e3c 2f63 6f64 653e _mime\n+001057e0: 2c20 796f 7520 6861 7665 2074 6f20 6d61 , you have to ma\n+001057f0: 6b65 2073 7572 6520 7468 6520 626f 756e ke sure the boun\n+00105800: 6461 7279 2063 616e 6e6f 7420 6d61 7463 dary cannot matc\n+00105810: 6820 616e 7920 7061 7274 7320 6f66 2074 h any parts of t\n+00105820: 6865 206d 6573 7361 6765 2061 6e64 2061 he message and a\n+00105830: 7474 6163 686d 656e 7473 2074 6861 7420 ttachments that \n+00105840: 796f 7520 6172 6520 7365 6e64 696e 672c you are sending,\n+00105850: 2062 6563 6175 7365 2074 6865 2062 6f75 because the bou\n+00105860: 6e64 6172 7920 6465 6c69 6e65 6174 6573 ndary delineates\n+00105870: 2074 6865 2061 7474 6163 686d 656e 7473 the attachments\n+00105880: 2e3c 2f70 3e0a 3c70 3e54 6865 2069 6e74 .

    .

    The int\n+00105890: 6572 6e61 6c20 6c69 7374 206f 6620 6174 ernal list of at\n+001058a0: 7461 6368 6d65 6e74 7320 7370 6563 6966 tachments specif\n+001058b0: 6965 6420 7769 7468 203c 636f 6465 3e3c ied with <\n+001058c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001058d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001058e0: 5f6d 696d 652e 6874 6d6c 2367 6133 3965 _mime.html#ga39e\n+001058f0: 3564 6134 6633 3735 6538 3033 3062 3863 5da4f375e8030b8c\n+00105900: 6264 6461 6630 6132 6138 6536 6522 2074 bddaf0a2a8e6e\" t\n+00105910: 6974 6c65 3d22 4164 6420 6120 4d49 4d45 itle=\"Add a MIME\n+00105920: 2061 7474 6163 686d 656e 7420 746f 2074 attachment to t\n+00105930: 6865 2053 4f41 502f 584d 4c20 6d65 7373 he SOAP/XML mess\n+00105940: 6167 652e 223e 736f 6170 5f73 6574 5f6d age.\">soap_set_m\n+00105950: 696d 655f 6174 7461 6368 6d65 6e74 3c2f ime_attachment is des\n+00105970: 7472 6f79 6564 2077 6974 6820 3c63 6f64 troyed with soap_end or whe\n+00105a60: 6e20 6120 6d65 7373 6167 6520 6973 2072 n a message is r\n+00105a70: 6563 6569 7665 642e 2054 6865 7265 666f eceived. Therefo\n+00105a80: 7265 2c20 6361 6c6c 203c 636f 6465 3e3c re, call <\n+00105a90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00105aa0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00105ab0: 5f6d 696d 652e 6874 6d6c 2367 6133 3965 _mime.html#ga39e\n+00105ac0: 3564 6134 6633 3735 6538 3033 3062 3863 5da4f375e8030b8c\n+00105ad0: 6264 6461 6630 6132 6138 6536 6522 2074 bddaf0a2a8e6e\" t\n+00105ae0: 6974 6c65 3d22 4164 6420 6120 4d49 4d45 itle=\"Add a MIME\n+00105af0: 2061 7474 6163 686d 656e 7420 746f 2074 attachment to t\n+00105b00: 6865 2053 4f41 502f 584d 4c20 6d65 7373 he SOAP/XML mess\n+00105b10: 6167 652e 223e 736f 6170 5f73 6574 5f6d age.\">soap_set_m\n+00105b20: 696d 655f 6174 7461 6368 6d65 6e74 3c2f ime_attachment to set\n+00105b40: 2061 7474 6163 686d 656e 7473 2062 6566 attachments bef\n+00105b50: 6f72 6520 7365 6e64 696e 6720 6120 6d65 ore sending a me\n+00105b60: 7373 6167 652e 3c2f 703e 0a3c 703e 5468 ssage.

    .

    Th\n+00105b70: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam\n+00105b80: 706c 6520 7368 6f77 7320 686f 7720 6120 ple shows how a \n+00105b90: 6d75 6c74 6970 6172 742f 7265 6c61 7465 multipart/relate\n+00105ba0: 6420 4854 5450 206d 6573 7361 6765 2077 d HTTP message w\n+00105bb0: 6974 6820 7468 7265 6520 4d49 4d45 2061 ith three MIME a\n+00105bc0: 7474 6163 686d 656e 7473 2069 7320 7365 ttachments is se\n+00105bd0: 7420 7570 2061 6e64 2074 7261 6e73 6d69 t up and transmi\n+00105be0: 7474 6564 2074 6f20 6120 7365 7276 6572 tted to a server\n+00105bf0: 2e20 496e 2074 6869 7320 6578 616d 706c . In this exampl\n+00105c00: 6520 7765 206c 6574 2074 6865 206d 6573 e we let the mes\n+00105c10: 7361 6765 2062 6f64 7920 7265 6665 7220 sage body refer \n+00105c20: 746f 2074 6865 2061 7474 6163 686d 656e to the attachmen\n+00105c30: 7473 2075 7369 6e67 2058 4d4c 203c 656d ts using XML href attribut\n+00105c60: 6573 2e20 5468 6520 3c63 6f64 653e 7374 es. The st\n+00105c70: 7275 6374 2063 6c61 696d 5f5f 666f 726d ruct claim__form\n+00105c80: 3c2f 636f 6465 3e20 6461 7461 2074 7970 data typ\n+00105c90: 6520 696e 636c 7564 6573 2061 2064 6566 e includes a def\n+00105ca0: 696e 6974 696f 6e20 6f66 2061 203c 636f inition of a href a\n+00105cc0: 7474 7269 6275 7465 2066 6f72 2074 6869 ttribute for thi\n+00105cd0: 7320 7075 7270 6f73 652e 3c2f 703e 0a3c s purpose.

    .<\n+00105ce0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00105cf0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+00105d20: 7563 7420 3c2f 7370 616e 3e63 6c61 696d uct claim\n+00105d30: 5f5f 666f 726d 2066 6f72 6d31 2c20 666f __form form1, fo\n+00105d40: 726d 323b 203c 2f64 6976 3e0a 3c64 6976 rm2;
    .fo\n+00105d60: 726d 312e 6872 6566 203d 203c 7370 616e rm1.href = "cid\n+00105d90: 3a63 6c61 696d 3036 3134 3030 612e 7469 :claim061400a.ti\n+00105da0: 6666 4063 6c61 696d 696e 672d 6974 2e63 ff@claiming-it.c\n+00105db0: 6f6d 2671 756f 743b 3c2f 7370 616e 3e3b om";\n+00105dc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    form2.\n+00105de0: 6872 6566 203d 203c 7370 616e 2063 6c61 href = "cid:cla\n+00105e10: 696d 3036 3134 3030 612e 6a70 6567 4063 im061400a.jpeg@c\n+00105e20: 6c61 696d 696e 672d 6974 2e63 6f6d 2671 laiming-it.com&q\n+00105e30: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    /* i\n+00105e70: 6e69 7469 616c 697a 6520 616e 6420 656e nitialize and en\n+00105e80: 6162 6c65 204d 494d 4520 2a2f 3c2f 7370 able MIME */
    .
    s\n+00105f00: 6f61 705f 7365 745f 6d69 6d65 3c2f 613e oap_set_mime\n+00105f10: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00105f40: 2c20 4e55 4c4c 2c20 3c73 7061 6e20 636c , NULL, "<cl\n+00105f70: 6169 6d30 3631 3430 3061 2e78 6d6c 4063 aim061400a.xml@c\n+00105f80: 6c61 696d 696e 672d 6974 2e63 6f6d 2667 laiming-it.com&g\n+00105f90: 743b 2671 756f 743b 3c2f 7370 616e 3e29 t;")\n+00105fa0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    /* add a base64\n+00105fe0: 2065 6e63 6f64 6564 2074 6966 6620 696d encoded tiff im\n+00105ff0: 6167 6520 2874 6966 6649 6d61 6765 2070 age (tiffImage p\n+00106000: 6f69 6e74 7320 746f 2062 6173 6536 3420 oints to base64 \n+00106010: 6461 7461 2920 2a2f 3c2f 7370 616e 3e20 data) */ \n+00106020: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_\n+00106090: 7365 745f 6d69 6d65 5f61 7474 6163 686d set_mime_attachm\n+001060a0: 656e 743c 2f61 3e28 3c61 2063 6c61 7373 ent(s\n+001060d0: 6f61 703c 2f61 3e2c 2074 6966 6649 6d61 oap, tiffIma\n+001060e0: 6765 2c20 7469 6666 4c65 6e2c 203c 6120 ge, tiffLen, SOAP_MIME_BASE6\n+00106170: 343c 2f61 3e2c 203c 7370 616e 2063 6c61 4, "image/t\n+001061a0: 6966 6626 7175 6f74 3b3c 2f73 7061 6e3e iff"\n+001061b0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+001061d0: 756f 743b 266c 743b 636c 6169 6d30 3631 uot;<claim061\n+001061e0: 3430 3061 2e74 6966 6640 636c 6169 6d69 400a.tiff@claimi\n+001061f0: 6e67 2d69 742e 636f 6d26 6774 3b26 7175 ng-it.com>&qu\n+00106200: 6f74 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c ot;, NULL\n+00106210: 2c20 4e55 4c4c 293b 203c 2f64 6976 3e0a , NULL);
    .\n+00106220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    /* add a\n+00106250: 2072 6177 2062 696e 6172 7920 6a70 6567 raw binary jpeg\n+00106260: 2069 6d61 6765 2028 6a70 6567 496d 6167 image (jpegImag\n+00106270: 6520 706f 696e 7473 2074 6f20 7261 7720 e points to raw \n+00106280: 6461 7461 2920 2a2f 3c2f 7370 616e 3e20 data) */ \n+00106290: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_\n+00106300: 7365 745f 6d69 6d65 5f61 7474 6163 686d set_mime_attachm\n+00106310: 656e 743c 2f61 3e28 3c61 2063 6c61 7373 ent(s\n+00106340: 6f61 703c 2f61 3e2c 206a 7065 6749 6d61 oap, jpegIma\n+00106350: 6765 2c20 6a70 6567 4c65 6e2c 203c 6120 ge, jpegLen, SOAP_MIME_BINAR\n+001063e0: 593c 2f61 3e2c 203c 7370 616e 2063 6c61 Y, "image/j\n+00106410: 7065 6726 7175 6f74 3b3c 2f73 7061 6e3e peg"\n+00106420: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+00106440: 756f 743b 266c 743b 636c 6169 6d30 3631 uot;<claim061\n+00106450: 3430 3061 2e6a 7065 6740 636c 6169 6d69 400a.jpeg@claimi\n+00106460: 6e67 2d69 742e 636f 6d26 6774 3b26 7175 ng-it.com>&qu\n+00106470: 6f74 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c ot;, NULL\n+00106480: 2c20 4e55 4c4c 293b 203c 2f64 6976 3e0a , NULL);
    .\n+00106490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    /* send \n+001064c0: 7468 6520 666f 726d 7320 6173 204d 494d the forms as MIM\n+001064d0: 4520 6174 7461 6368 6d65 6e74 7320 7769 E attachments wi\n+001064e0: 7468 2074 6869 7320 696e 766f 6361 7469 th this invocati\n+001064f0: 6f6e 202a 2f3c 2f73 7061 6e3e 203c 2f64 on */ .
    \n+00106530: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+00106540: 6361 6c6c 5f63 6c61 696d 5f5f 696e 7375 call_claim__insu\n+00106550: 7261 6e63 655f 636c 6169 6d5f 6175 746f rance_claim_auto\n+00106560: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00106590: 2c20 666f 726d 312c 2066 6f72 6d32 2c20 , form1, form2, \n+001065a0: 2e2e 2e29 2920 3c2f 6469 763e 0a3c 6469 ...))
    . \n+001065c0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // an\n+001065e0: 2065 7272 6f72 206f 6363 7572 7265 6420 error occurred \n+001065f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00106610: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n+00106650: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // pr\n+00106670: 6f63 6573 7320 7468 6520 7265 7370 6f6e ocess the respon\n+00106680: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n+00106690: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+00106790: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    i\n+00106820: 6e74 2073 6f61 705f 7365 745f 6d69 6d65 nt soap_set_mime\n+00106830: 5f61 7474 6163 686d 656e 7428 7374 7275 _attachment(stru\n+00106840: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+00106850: 6f6e 7374 2063 6861 7220 2a70 7472 2c20 onst char *ptr, \n+00106860: 7369 7a65 5f74 2073 697a 652c 2065 6e75 size_t size, enu\n+00106870: 6d20 736f 6170 5f6d 696d 655f 656e 636f m soap_mime_enco\n+00106880: 6469 6e67 2065 6e63 6f64 696e 672c 2063 ding encoding, c\n+00106890: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+001068a0: 2063 6f6e 7374 2063 6861 7220 2a69 642c const char *id,\n+001068b0: 2063 6f6e 7374 2063 6861 7220 2a6c 6f63 const char *loc\n+001068c0: 6174 696f 6e2c 2063 6f6e 7374 2063 6861 ation, const cha\n+001068d0: 7220 2a64 6573 6372 6970 7469 6f6e 293c r *description)<\n+001068e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Add a MI\n+00106900: 4d45 2061 7474 6163 686d 656e 7420 746f ME attachment to\n+00106910: 2074 6865 2053 4f41 502f 584d 4c20 6d65 the SOAP/XML me\n+00106920: 7373 6167 652e 3c2f 6469 763e 3c2f 6469 ssage.
    .
    so\n+001069e0: 6170 5f63 6c72 5f6d 696d 653c 2f61 3e3c ap_clr_mime<\n+001069f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void so\n+00106a10: 6170 5f63 6c72 5f6d 696d 6528 7374 7275 ap_clr_mime(stru\n+00106a20: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)
    Disable M\n+00106a50: 494d 4520 6174 7461 6368 6d65 6e74 732e IME attachments.\n+00106a60: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .<\n+00106ac0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00106ad0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_set\n+00106b20: 5f6d 696d 653c 2f61 3e3c 2f64 6976 3e3c _mime
    <\n+00106b30: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00106b40: 6922 3e69 6e74 2073 6f61 705f 7365 745f i\">int soap_set_\n+00106b50: 6d69 6d65 2873 7472 7563 7420 736f 6170 mime(struct soap\n+00106b60: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+00106b70: 6172 202a 626f 756e 6461 7279 2c20 636f ar *boundary, co\n+00106b80: 6e73 7420 6368 6172 202a 7374 6172 7429 nst char *start)\n+00106b90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Enable \n+00106bb0: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n+00106bc0: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .
    @ SOA\n+00106cf0: 505f 4d49 4d45 5f42 4153 4536 343c 2f64 P_MIME_BASE64
    data is fo\n+00106d20: 726d 6174 7465 6420 696e 2062 6173 6536 rmatted in base6\n+00106d30: 343c 2f64 6976 3e3c 6469 7620 636c 6173 4
    Def\n+00106d50: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00106d60: 736f 6170 322e 683a 3130 3232 393c 2f64 soap2.h:10229
    .
    SOAP_MI\n+00106e70: 4d45 5f42 494e 4152 593c 2f61 3e3c 2f64 ME_BINARY
    @ SOAP_MI\n+00106ea0: 4d45 5f42 494e 4152 593c 2f64 6976 3e3c ME_BINARY
    <\n+00106eb0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00106ec0: 223e 6269 6e61 7279 2072 6177 2064 6174 \">binary raw dat\n+00106ed0: 6120 636f 6e74 656e 743c 2f64 6976 3e3c a content
    <\n+00106ee0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00106ef0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00106f00: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00106f10: 3130 3232 373c 2f64 6976 3e3c 2f64 6976 10227
    .

    The \n+00106f40: 3c63 6f64 653e 636c 6169 6d5f 5f66 6f72 claim__for\n+00106f50: 6d3c 2f63 6f64 653e 2073 7472 7563 7420 m struct \n+00106f60: 6973 2064 6563 6c61 7265 6420 696e 2074 is declared in t\n+00106f70: 6865 2069 6e74 6572 6661 6365 2068 6561 he interface hea\n+00106f80: 6465 7220 6669 6c65 2061 733a 3c2f 703e der file as:

    \n+00106f90: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+00106fd0: 7472 7563 7420 3c2f 7370 616e 3e63 6c61 truct cla\n+00106fe0: 696d 5f5f 666f 726d 203c 2f64 6976 3e0a im__form
    .\n+00106ff0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    @ \n+00107020: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *href; .
    };
    .<\n+00107070: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The cla\n+00107090: 696d 2066 6f72 6d73 2069 6e20 7468 6520 im forms in the \n+001070a0: 6d65 7373 6167 6520 636f 6e73 6973 7420 message consist \n+001070b0: 6f66 203c 656d 3e3c 636f 6465 3e68 7265 of hre\n+001070c0: 663c 2f63 6f64 653e 3c2f 656d 3e73 2074 fs t\n+001070d0: 6f20 7468 6520 636c 6169 6d20 666f 726d o the claim form\n+001070e0: 7320 6174 7461 6368 6564 2e20 5468 6520 s attached. The \n+001070f0: 7573 6520 6f66 203c 656d 3e3c 636f 6465 use of href or other attri\n+00107120: 6275 7465 7320 666f 7220 7265 6665 7272 butes for referr\n+00107130: 696e 6720 746f 2074 6865 204d 494d 4520 ing to the MIME \n+00107140: 6174 7461 6368 6d65 6e74 7320 6973 206f attachments is o\n+00107150: 7074 696f 6e61 6c20 6163 636f 7264 696e ptional accordin\n+00107160: 6720 746f 2074 6865 2053 7741 2073 7461 g to the SwA sta\n+00107170: 6e64 6172 642e 204d 544f 4d20 6f6e 2074 ndard. MTOM on t\n+00107180: 6865 206f 7468 6572 2068 616e 6420 6d61 he other hand ma\n+00107190: 6e64 6174 6573 2074 6865 2075 7365 206f ndates the use o\n+001071a0: 6620 3c65 6d3e 3c63 6f64 653e 6872 6566 f href\n+001071b0: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 6974 wit\n+001071c0: 6820 584f 5020 656c 656d 656e 7473 2e3c h XOP elements.<\n+001071d0: 2f70 3e0a 3c70 3e54 6f20 6173 736f 6369 /p>.

    To associ\n+001071e0: 6174 6520 4d49 4d45 2061 7474 6163 686d ate MIME attachm\n+001071f0: 656e 7473 2077 6974 6820 7468 6520 7265 ents with the re\n+00107200: 7175 6573 7420 616e 6420 7265 7370 6f6e quest and respon\n+00107210: 7365 206f 6620 6120 7365 7276 6963 6520 se of a service \n+00107220: 6f70 6572 6174 696f 6e20 696e 2074 6865 operation in the\n+00107230: 2067 656e 6572 6174 6564 2057 5344 4c2c generated WSDL,\n+00107240: 2070 6c65 6173 6520 7365 6520 5365 6374 please see Sect\n+00107250: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Gen\n+00107280: 6572 6174 696e 6720 4d75 6c74 6970 6172 erating Multipar\n+00107290: 7452 656c 6174 6564 204d 494d 4520 6174 tRelated MIME at\n+001072a0: 7461 6368 6d65 6e74 2062 696e 6469 6e67 tachment binding\n+001072b0: 7320 696e 2057 5344 4c3c 2f61 3e20 2e3c s in WSDL .<\n+001072c0: 2f70 3e0a 3c70 3e54 6865 2073 6572 7665 /p>.

    The serve\n+001072d0: 722d 7369 6465 2063 6f64 6520 746f 2074 r-side code to t\n+001072e0: 7261 6e73 6d69 7420 4d49 4d45 2061 7474 ransmit MIME att\n+001072f0: 6163 686d 656e 7473 2062 6163 6b20 746f achments back to\n+00107300: 2061 2063 6c69 656e 743a 3c2f 703e 0a3c a client:

    .<\n+00107310: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00107320: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int clai\n+00107360: 6d5f 5f69 6e73 7572 616e 6365 5f63 6c61 m__insurance_cla\n+00107370: 696d 5f61 7574 6f28 3c73 7061 6e20 636c im_auto(st\n+00107390: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, ..\n+00107400: 2e29 203c 2f64 6976 3e0a 3c64 6976 2063 .)
    .
    {.
    co\n+00107450: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+00107480: 202a 6874 6d6c 446f 6320 3d20 2e2e 2e3b *htmlDoc = ...;\n+00107490: 203c 7370 616e 2063 6c61 7373 3d22 636f // an HTM\n+001074b0: 4c20 6d65 7373 6167 6520 746f 2073 656e L message to sen\n+001074c0: 6420 6173 2061 6e20 6174 7461 6368 6d65 d as an attachme\n+001074d0: 6e74 3c2f 7370 616e 3e3c 2f64 6976 3e0a nt
    .\n+001074e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_set_m\n+00107550: 696d 653c 2f61 3e28 3c61 2063 6c61 7373 ime(s\n+00107580: 6f61 703c 2f61 3e2c 204e 554c 4c2c 204e oap, NULL, N\n+00107590: 554c 4c29 3b20 3c73 7061 6e20 636c 6173 ULL); // e\n+001075b0: 6e61 626c 6520 4d49 4d45 3c2f 7370 616e nable MIME
    .
    // add a HTML \n+00107600: 646f 6375 6d65 6e74 2028 6874 6d6c 446f document (htmlDo\n+00107610: 6320 706f 696e 7473 2074 6f20 6461 7461 c points to data\n+00107620: 2c20 7768 6572 6520 7468 6520 4854 4d4c , where the HTML\n+00107630: 2064 6f63 2069 7320 7374 6f72 6564 2069 doc is stored i\n+00107640: 6e20 636f 6d70 6c69 616e 6365 2077 6974 n compliance wit\n+00107650: 6820 3762 6974 2065 6e63 6f64 696e 6720 h 7bit encoding \n+00107660: 5246 4332 3034 3529 203c 2f73 7061 6e3e RFC2045) \n+00107670: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+001076b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_mime_\n+00107710: 6174 7461 6368 6d65 6e74 3c2f 613e 283c attachment(<\n+00107720: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00107730: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00107740: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00107750: 6874 6d6c 446f 632c 2073 7472 6c65 6e28 htmlDoc, strlen(\n+00107760: 6874 6d6c 446f 6329 2c20 3c61 2063 6c61 htmlDoc), SO\n+001077e0: 4150 5f4d 494d 455f 3742 4954 3c2f 613e AP_MIME_7BIT\n+001077f0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+00107810: 756f 743b 7465 7874 2f68 746d 6c26 7175 uot;text/html&qu\n+00107820: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "&l\n+00107850: 743b 636c 6169 6d30 3631 3430 3061 2e68 t;claim061400a.h\n+00107860: 746d 6c40 636c 6169 6d69 6e67 2d69 742e tml@claiming-it.\n+00107870: 636f 6d26 6774 3b26 7175 6f74 3b3c 2f73 com>", NULL, NULL\n+00107890: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {<\n+001078b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    so\n+00107920: 6170 5f63 6c72 5f6d 696d 653c 2f61 3e28 ap_clr_mime(\n+00107930: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+00107960: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // don&#\n+00107980: 3339 3b74 2077 616e 7420 6661 756c 7420 39;t want fault \n+00107990: 7769 7468 2061 7474 6163 686d 656e 7473 with attachments\n+001079a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001079b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001079c0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n+001079e0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soap->\n+00107a20: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;error<\n+00107a70: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n+00107a90: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    ..}\n+00107b50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+00107be0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+00107bf0: 726f 7570 5f5f 6d69 6d65 2e68 746d 6c23 roup__mime.html#\n+00107c00: 6767 6133 6665 6337 3633 3364 6130 3762 gga3fec7633da07b\n+00107c10: 6666 3262 6635 6664 3633 3330 6265 6631 ff2bf5fd6330bef1\n+00107c20: 3834 3461 6632 3631 3038 6666 3063 6565 844af26108ff0cee\n+00107c30: 3730 3739 3933 3961 3739 6466 3237 6630 7079939a79df27f0\n+00107c40: 3965 3034 223e 534f 4150 5f4d 494d 455f 9e04\">SOAP_MIME_\n+00107c50: 3742 4954 3c2f 613e 3c2f 6469 763e 3c64 7BIT
    @ SOAP_MIME_7B\n+00107c80: 4954 3c2f 6469 763e 3c64 6976 2063 6c61 IT
    7 bit\n+00107ca0: 2064 6174 6120 636f 6e74 656e 743c 2f64 data content
    Definit\n+00107cd0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00107ce0: 322e 683a 3130 3232 353c 2f64 6976 3e3c 2.h:10225
    <\n+00107cf0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

    .\n+00107d70: 5265 7472 6965 7669 6e67 2061 2063 6f6c Retrieving a col\n+00107d80: 6c65 6374 696f 6e20 6f66 204d 494d 452f lection of MIME/\n+00107d90: 4d54 4f4d 2061 7474 6163 686d 656e 7473 MTOM attachments\n+00107da0: 2028 5377 4129 3c2f 6832 3e0a 3c70 3e4d (SwA)

    .

    M\n+00107db0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+00107dc0: 6172 6520 6175 746f 6d61 7469 6361 6c6c are automaticall\n+00107dd0: 7920 7061 7273 6564 2061 6e64 2073 746f y parsed and sto\n+00107de0: 7265 6420 696e 206d 656d 6f72 7920 6d61 red in memory ma\n+00107df0: 6e61 6765 6420 6279 2074 6865 203c 636f naged by the s\n+00107e50: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+00107e60: 6f6e 7465 7874 2e20 4166 7465 7220 7265 ontext. After re\n+00107e70: 6365 6976 696e 6720 6120 7365 7420 6f66 ceiving a set of\n+00107e80: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n+00107e90: 686d 656e 7473 2c20 6569 7468 6572 2061 hments, either a\n+00107ea0: 7420 7468 6520 636c 6965 6e74 2d73 6964 t the client-sid\n+00107eb0: 6520 6f72 2074 6865 2073 6572 7665 722d e or the server-\n+00107ec0: 7369 6465 2c20 7468 6520 6c69 7374 206f side, the list o\n+00107ed0: 6620 4d49 4d45 2f4d 544f 4d20 6174 7461 f MIME/MTOM atta\n+00107ee0: 6368 6d65 6e74 7320 6361 6e20 6265 2074 chments can be t\n+00107ef0: 7261 7665 7273 6564 2074 6f20 6578 7472 raversed to extr\n+00107f00: 6163 7420 6d65 7461 2064 6174 6120 616e act meta data an\n+00107f10: 6420 7468 6520 6174 7461 6368 6d65 6e74 d the attachment\n+00107f20: 2063 6f6e 7465 6e74 2e20 5468 6520 6669 content. The fi\n+00107f30: 7273 7420 6174 7461 6368 6d65 6e74 2069 rst attachment i\n+00107f40: 6e20 7468 6520 636f 6c6c 6563 7469 6f6e n the collection\n+00107f50: 206f 6620 4d49 4d45 2f4d 544f 4d20 6174 of MIME/MTOM at\n+00107f60: 7461 6368 6d65 6e74 7320 616c 7761 7973 tachments always\n+00107f70: 2063 6f6e 7461 696e 7320 6d65 7461 2064 contains meta d\n+00107f80: 6174 6120 6162 6f75 7420 7468 6520 534f ata about the SO\n+00107f90: 4150 206d 6573 7361 6765 2069 7473 656c AP message itsel\n+00107fa0: 6620 2862 6563 6175 7365 2074 6865 2053 f (because the S\n+00107fb0: 4f41 5020 6d65 7373 6167 6520 7761 7320 OAP message was \n+00107fc0: 7072 6f63 6573 7365 6420 7468 6520 6174 processed the at\n+00107fd0: 7461 6368 6d65 6e74 2064 6f65 7320 6e6f tachment does no\n+00107fe0: 7420 636f 6e74 6169 6e20 616e 7920 7573 t contain any us\n+00107ff0: 6566 756c 2064 6174 6129 2e3c 2f70 3e0a eful data).

    .\n+00108000: 3c70 3e54 6f20 7472 6176 6572 7365 2074

    To traverse t\n+00108010: 6865 206c 6973 7420 6f66 204d 494d 4520 he list of MIME \n+00108020: 6174 7461 6368 6d65 6e74 7320 696e 2043 attachments in C\n+00108030: 2c20 796f 7520 7573 6520 6120 6c6f 6f70 , you use a loop\n+00108040: 2073 696d 696c 6172 2074 6f3a 3c2f 703e similar to:

    \n+00108050: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int n \n+001080a0: 3d20 303b 3c2f 6469 763e 0a3c 6469 7620 = 0;
    .
    struct soap_multipar\n+00108120: 743c 2f61 3e20 2a61 7474 6163 686d 656e t *attachmen\n+00108130: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    for \n+00108170: 2861 7474 6163 686d 656e 7420 3d20 3c61 (attachment = soap-&g\n+001081b0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;mime<\n+00108200: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.list; att\n+00108260: 6163 686d 656e 743b 2061 7474 6163 686d achment; attachm\n+00108270: 656e 7420 3d20 6174 7461 6368 6d65 6e74 ent = attachment\n+00108280: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->next)
    .
    {.
    ++n;.
    printf("P\n+00108360: 6172 7420 2564 3a5c 6e26 7175 6f74 3b3c art %d:\\n"<\n+00108370: 2f73 7061 6e3e 2c20 6e29 3b3c 2f64 6976 /span>, n);.\n+00108450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    printf("si\n+00108490: 7a65 2020 2020 2020 203d 2575 6c5c 6e26 ze =%ul\\n&\n+001084a0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6174 quot;, at\n+001084b0: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->size);.
    printf("i\n+00108560: 6420 2020 2020 2020 2020 3d25 735c 6e26 d =%s\\n&\n+00108570: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6174 quot;, at\n+00108580: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->id ? attach\n+001085f0: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->id<\n+00108650: 2f61 3e20 3a20 3c73 7061 6e20 636c 6173 /a> : "");
    .\n+001086a0: 2020 7072 696e 7466 283c 7370 616e 2063 printf("type \n+001086d0: 2020 2020 2020 3d25 735c 6e26 7175 6f74 =%s\\n"\n+001086e0: 3b3c 2f73 7061 6e3e 2c20 6174 7461 6368 ;, attach\n+001086f0: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->typ\n+00108750: 653c 2f61 3e20 3f20 6174 7461 6368 6d65 e ? attachme\n+00108760: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->type<\n+001087c0: 2f61 3e20 3a20 3c73 7061 6e20 636c 6173 /a> : "");
    .\n+00108810: 2020 7072 696e 7466 283c 7370 616e 2063 printf("locat\n+00108840: 696f 6e20 2020 3d25 735c 6e26 7175 6f74 ion =%s\\n"\n+00108850: 3b3c 2f73 7061 6e3e 2c20 6174 7461 6368 ;, attach\n+00108860: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->loc\n+001088c0: 6174 696f 6e3c 2f61 3e20 3f20 6174 7461 ation ? atta\n+001088d0: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->l\n+00108930: 6f63 6174 696f 6e3c 2f61 3e20 3a20 3c73 ocation : "\n+00108960: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");<\n+00108970: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    printf\n+00108990: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n+001089b0: 6f74 3b64 6573 6372 6970 7469 6f6e 3d25 ot;description=%\n+001089c0: 735c 6e26 7175 6f74 3b3c 2f73 7061 6e3e s\\n"\n+001089d0: 2c20 6174 7461 6368 6d65 6e74 2d26 6774 , attachment->\n+001089e0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;description\n+00108a40: 3c2f 613e 203f 2061 7474 6163 686d 656e ? attachmen\n+00108a50: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->descri\n+00108ab0: 7074 696f 6e3c 2f61 3e20 3a20 3c73 7061 ption : "&q\n+00108ae0: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    }
    .soap_mime::li\n+00108bc0: 7374 3c2f 613e 3c2f 6469 763e 3c64 6976 st
    \n+00108be0: 7374 7275 6374 2073 6f61 705f 6d75 6c74 struct soap_mult\n+00108bf0: 6970 6172 7420 2a20 6c69 7374 3c2f 6469 ipart * list
    list of MIM\n+00108c20: 4520 6174 7461 6368 6d65 6e74 7320 7265 E attachments re\n+00108c30: 6365 6976 6564 3c2f 6469 763e 3c64 6976 ceived
    <\n+00108c50: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:104\n+00108c70: 3230 3c2f 6469 763e 3c2f 6469 763e 0a3c 20
    .<\n+00108c80: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00108c90: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+00108ca0: 5f6d 756c 7469 7061 7274 5f68 746d 6c22 _multipart_html\"\n+00108cb0: 3e3c 6469 7620 636c 6173 733d 2274 746e >
    soap_m\n+00108cf0: 756c 7469 7061 7274 3c2f 613e 3c2f 6469 ultipart
    DIME/MIME/M\n+00108d20: 544f 4d20 6174 7461 6368 6d65 6e74 2064 TOM attachment d\n+00108d30: 6174 6120 7265 6365 6976 6564 2062 7920 ata received by \n+00108d40: 7468 6520 656e 6769 6e65 2e3c 2f64 6976 the engine.
    Definitio\n+00108d70: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00108d80: 683a 3130 3433 303c 2f64 6976 3e3c 2f64 h:10430
    .
    soap_multipar\n+00108e50: 743a 3a74 7970 653c 2f61 3e3c 2f64 6976 t::type
    const char \n+00108e80: 2a20 7479 7065 3c2f 6469 763e 3c64 6976 * type
    D\n+00108ea0: 494d 452f 4d49 4d45 2f4d 544f 4d20 7479 IME/MIME/MTOM ty\n+00108eb0: 7065 2028 4d49 4d45 2074 7970 6520 666f pe (MIME type fo\n+00108ec0: 726d 6174 293c 2f64 6976 3e3c 6469 7620 rmat)
    Definition:\n+00108ef0: 2073 7464 736f 6170 322e 683a 3130 3433 stdsoap2.h:1043\n+00108f00: 353c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 5
    .
    s\n+00108ff0: 7472 7563 7420 736f 6170 5f6d 756c 7469 truct soap_multi\n+00109000: 7061 7274 202a 206e 6578 743c 2f64 6976 part * next
    next attachm\n+00109030: 656e 7420 696e 2074 6865 206c 696e 6b65 ent in the linke\n+00109040: 6420 6c69 7374 3c2f 6469 763e 3c64 6976 d list
    <\n+00109060: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:104\n+00109080: 3331 3c2f 6469 763e 3c2f 6469 763e 0a3c 31
    .<\n+00109090: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+001090a0: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+001090b0: 5f6d 756c 7469 7061 7274 5f68 746d 6c5f _multipart_html_\n+001090c0: 6136 3430 6634 3662 3630 3530 3432 6633 a640f46b605042f3\n+001090d0: 3761 6531 3539 3266 3737 6533 3163 3532 7ae1592f77e31c52\n+001090e0: 6422 3e3c 6469 7620 636c 6173 733d 2274 d\">
    c\n+00109170: 6f6e 7374 2063 6861 7220 2a20 7074 723c onst char * ptr<\n+00109180: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    points t\n+001091a0: 6f20 7261 7720 6461 7461 2063 6f6e 7465 o raw data conte\n+001091b0: 6e74 3c2f 6469 763e 3c64 6976 2063 6c61 nt
    De\n+001091d0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+001091e0: 6473 6f61 7032 2e68 3a31 3034 3332 3c2f dsoap2.h:10432
    .
    <\n+00109250: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00109260: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">soap_m\n+001092b0: 756c 7469 7061 7274 3a3a 6465 7363 7269 ultipart::descri\n+001092c0: 7074 696f 6e3c 2f61 3e3c 2f64 6976 3e3c ption
    <\n+001092d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+001092e0: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i\">const char * \n+001092f0: 6465 7363 7269 7074 696f 6e3c 2f64 6976 description
    MIME Content\n+00109320: 2d44 6573 6372 6970 7469 6f6e 2028 6f70 -Description (op\n+00109330: 7469 6f6e 616c 293c 2f64 6976 3e3c 6469 tional)
    \n+00109350: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:10\n+00109370: 3433 393c 2f64 6976 3e3c 2f64 6976 3e0a 439
    .\n+00109380: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    c\n+00109460: 6f6e 7374 2063 6861 7220 2a20 6964 3c2f onst char * id
    DIME/MIME\n+00109490: 2f4d 544f 4d20 636f 6e74 656e 7420 4944 /MTOM content ID\n+001094a0: 206f 7220 666f 726d 2064 6174 6120 6e61 or form data na\n+001094b0: 6d65 2e3c 2f64 6976 3e3c 6469 7620 636c me.
    D\n+001094d0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+001094e0: 7464 736f 6170 322e 683a 3130 3433 343c tdsoap2.h:10434<\n+001094f0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+00109550: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 const char * lo\n+001095f0: 6361 7469 6f6e 3c2f 6469 763e 3c64 6976 cation
    M\n+00109610: 494d 4520 436f 6e74 656e 742d 4c6f 6361 IME Content-Loca\n+00109620: 7469 6f6e 2028 6f70 7469 6f6e 616c 293c tion (optional)<\n+00109630: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00109650: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00109660: 6170 322e 683a 3130 3433 383c 2f64 6976 ap2.h:10438
    .
    \n+001096e0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap_mult\n+00109730: 6970 6172 743a 3a73 697a 653c 2f61 3e3c ipart::size<\n+00109740: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    size_t \n+00109760: 7369 7a65 3c2f 6469 763e 3c64 6976 2063 size
    siz\n+00109780: 6520 6f66 2064 6174 6120 636f 6e74 656e e of data conten\n+00109790: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    Def\n+001097b0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+001097c0: 736f 6170 322e 683a 3130 3433 333c 2f64 soap2.h:10433
    .
    .\n+0010a200: 3c70 3e4e 6f74 653a 206b 6565 7020 696e

    Note: keep in\n+0010a210: 206d 696e 6420 7468 6174 2074 6865 2066 mind that the f\n+0010a220: 6972 7374 2061 7474 6163 686d 656e 7420 irst attachment \n+0010a230: 6973 2061 7373 6f63 6961 7465 6420 7769 is associated wi\n+0010a240: 7468 2074 6865 2053 4f41 5020 6d65 7373 th the SOAP mess\n+0010a250: 6167 6520 616e 6420 796f 7520 6d61 7920 age and you may \n+0010a260: 7761 6e74 2074 6f20 6967 6e6f 7265 2069 want to ignore i\n+0010a270: 742e 3c2f 703e 0a3c 703e 4120 6361 6c6c t.

    .

    A call\n+0010a280: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to so\n+0010a350: 6170 5f65 6e64 3c2f 613e 3c2f 636f 6465 ap_end removes all of\n+0010a370: 2074 6865 2072 6563 6569 7665 6420 4d49 the received MI\n+0010a380: 4d45 2064 6174 612e 2054 6f20 7072 6573 ME data. To pres\n+0010a390: 6572 7665 2061 6e20 6174 7461 6368 6d65 erve an attachme\n+0010a3a0: 6e74 2069 6e20 6d65 6d6f 7279 2c20 7573 nt in memory, us\n+0010a3b0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap\n+0010a480: 5f75 6e6c 696e 6b3c 2f61 3e3c 2f63 6f64 _unlink on the \n+0010a4a0: 7074 723c 2f63 6f64 653e 206d 656d 6265 ptr membe\n+0010a4b0: 7220 6f66 2074 6865 203c 636f 6465 3e3c r of the <\n+0010a4c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0010a4d0: 663d 2273 7472 7563 7473 6f61 705f 5f6d f=\"structsoap__m\n+0010a4e0: 756c 7469 7061 7274 2e68 746d 6c22 2074 ultipart.html\" t\n+0010a4f0: 6974 6c65 3d22 4449 4d45 2f4d 494d 452f itle=\"DIME/MIME/\n+0010a500: 4d54 4f4d 2061 7474 6163 686d 656e 7420 MTOM attachment \n+0010a510: 6461 7461 2072 6563 6569 7665 6420 6279 data received by\n+0010a520: 2074 6865 2065 6e67 696e 652e 223e 736f the engine.\">so\n+0010a530: 6170 5f6d 756c 7469 7061 7274 3c2f 613e ap_multipart\n+0010a540: 3c2f 636f 6465 3e20 7374 7275 6374 2e20 struct. \n+0010a550: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The so\n+0010a620: 6170 5f75 6e6c 696e 6b3c 2f61 3e3c 2f63 ap_unlink function ca\n+0010a640: 6e20 6265 2075 7365 6420 746f 2070 7265 n be used to pre\n+0010a650: 7665 6e74 2064 6561 6c6c 6f63 6174 696f vent deallocatio\n+0010a660: 6e20 6f66 2064 6573 6572 6961 6c69 7a65 n of deserialize\n+0010a670: 6420 6461 7461 2e3c 2f70 3e0a 3c70 3ef0 d data.

    .

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

    .DIME atta\n+0010a6e0: 6368 6d65 6e74 733c 2f68 313e 0a3c 703e chments

    .

    \n+0010a6f0: 4170 706c 6963 6174 696f 6e73 2064 6576 Applications dev\n+0010a700: 656c 6f70 6564 2077 6974 6820 7468 6520 eloped with the \n+0010a710: 6753 4f41 5020 746f 6f6c 7320 6361 6e20 gSOAP tools can \n+0010a720: 7472 616e 736d 6974 2062 696e 6172 7920 transmit binary \n+0010a730: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments\n+0010a740: 2073 746f 7265 6420 696e 206d 656d 6f72 stored in memor\n+0010a750: 7920 6f72 2069 6e20 7374 7265 616d 696e y or in streamin\n+0010a760: 6720 6d6f 6465 2062 7920 6665 7463 6869 g mode by fetchi\n+0010a770: 6e67 2064 6174 6120 6672 6f6d 2061 2072 ng data from a r\n+0010a780: 6573 6f75 7263 6520 6f72 2073 656e 6469 esource or sendi\n+0010a790: 6e67 2064 6174 6120 746f 2061 2072 6573 ng data to a res\n+0010a7a0: 6f75 7263 6520 7573 696e 6720 6361 6c6c ource using call\n+0010a7b0: 6261 636b 2066 756e 6374 696f 6e73 2e20 back functions. \n+0010a7c0: 5468 6520 6d61 7869 6d75 6d20 4449 4d45 The maximum DIME\n+0010a7d0: 2061 7474 6163 686d 656e 7420 7369 7a65 attachment size\n+0010a7e0: 2069 7320 6c69 6d69 7465 6420 746f 2038 is limited to 8\n+0010a7f0: 204d 4220 6279 2064 6566 6175 6c74 2061 MB by default a\n+0010a800: 7320 7365 7420 7769 7468 203c 636f 6465 s set with #SOAP_MAXDIMESI\n+0010a820: 5a45 3c2f 636f 6465 3e2e 2054 6869 7320 ZE. This \n+0010a830: 6c69 6d69 7420 6361 6e20 6265 2063 6861 limit can be cha\n+0010a840: 6e67 6564 2061 7320 6e65 6564 6564 2e20 nged as needed. \n+0010a850: 5769 7468 2073 7472 6561 6d69 6e67 2044 With streaming D\n+0010a860: 494d 4520 7573 696e 6720 6361 6c6c 6261 IME using callba\n+0010a870: 636b 2066 756e 6374 696f 6e73 2c20 6461 ck functions, da\n+0010a880: 7461 2068 616e 646c 6572 7320 6172 6520 ta handlers are \n+0010a890: 7573 6564 2074 6f20 7061 7373 2074 6865 used to pass the\n+0010a8a0: 2064 6174 6120 746f 2061 6e64 2066 726f data to and fro\n+0010a8b0: 6d20 6120 7265 736f 7572 6365 2066 726f m a resource fro\n+0010a8c0: 6d20 7768 6963 6820 746f 2066 6574 6368 m which to fetch\n+0010a8d0: 2074 6865 2064 6174 6120 746f 2073 656e the data to sen\n+0010a8e0: 6420 6f72 2064 6174 6120 746f 2073 746f d or data to sto\n+0010a8f0: 7265 2c20 7375 6368 2061 7320 6120 6669 re, such as a fi\n+0010a900: 6c65 206f 7220 6465 7669 6365 2e20 5365 le or device. Se\n+0010a910: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section Streamin\n+0010a950: 6720 4449 4d45 3c2f 613e 202e 3c2f 703e g DIME .

    \n+0010a960: 0a3c 703e 466f 7220 6465 7461 696c 7320 .

    For details \n+0010a970: 6f6e 2044 494d 4520 6174 7461 6368 6d65 on DIME attachme\n+0010a980: 6e74 732c 2073 6565 203c 6120 6872 6566 nts, see http://msdn\n+0010a9f0: 2e6d 6963 726f 736f 6674 2e63 6f6d 2f6c .microsoft.com/l\n+0010aa00: 6962 7261 7279 2f65 6e2d 7573 2f64 6e67 ibrary/en-us/dng\n+0010aa10: 6c6f 6273 7065 632f 6874 6d6c 2f64 7261 lobspec/html/dra\n+0010aa20: 6674 2d6e 6965 6c73 656e 2d64 696d 652d ft-nielsen-dime-\n+0010aa30: 3032 2e74 7874 3c2f 613e 3c2f 703e 0a3c 02.txt

    .<\n+0010aa40: 703e 5365 6520 616c 736f 2041 5049 2064 p>See also API d\n+0010aa50: 6f63 756d 656e 7461 7469 6f6e 204d 6f64 ocumentation Mod\n+0010aa60: 756c 6520 3c61 2063 6c61 7373 3d22 656c ule DIME attachment\n+0010aaa0: 2066 756e 6374 696f 6e73 3c2f 613e 2e3c functions.<\n+0010aab0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .Sending a \n+0010ab20: 636f 6c6c 6563 7469 6f6e 206f 6620 4449 collection of DI\n+0010ab30: 4d45 2061 7474 6163 686d 656e 7473 3c2f ME attachments.

    The follo\n+0010ab50: 7769 6e67 2066 756e 6374 696f 6e73 2063 wing functions c\n+0010ab60: 616e 2062 6520 7573 6564 2074 6f20 6578 an be used to ex\n+0010ab70: 706c 6963 6974 6c79 2073 6574 2075 7020 plicitly set up \n+0010ab80: 6120 636f 6c6c 6563 7469 6f6e 206f 6620 a collection of \n+0010ab90: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments\n+0010aba0: 2066 6f72 2074 7261 6e73 6d69 7373 696f for transmissio\n+0010abb0: 6e20 7769 7468 2061 206d 6573 7361 6765 n with a message\n+0010abc0: 2e20 5468 6573 6520 6174 7461 6368 6d65 . These attachme\n+0010abd0: 6e74 7320 6361 6e20 6265 2073 7472 6561 nts can be strea\n+0010abe0: 6d65 642c 2061 7320 6465 7363 7269 6265 med, as describe\n+0010abf0: 6420 696e 2053 6563 7469 6f6e 203c 6120 d in Section Strea\n+0010ac30: 6d69 6e67 2044 494d 453c 2f61 3e20 2e20 ming DIME . \n+0010ac40: 5769 7468 6f75 7420 7374 7265 616d 696e Without streamin\n+0010ac50: 672c 2065 6163 6820 6174 7461 6368 6d65 g, each attachme\n+0010ac60: 6e74 206d 7573 7420 7265 6665 7220 746f nt must refer to\n+0010ac70: 2061 2062 6c6f 636b 206f 6620 6461 7461 a block of data\n+0010ac80: 2069 6e20 6d65 6d6f 7279 2e3c 2f70 3e0a in memory.

    .\n+0010ac90: 3c75 6c3e 0a3c 6c69 3e3c 636f 6465 3e76 .

    The\n+0010b700: 7365 2066 756e 6374 696f 6e73 2061 6c6c se functions all\n+0010b710: 6f77 2044 494d 4520 6174 7461 6368 6d65 ow DIME attachme\n+0010b720: 6e74 7320 746f 2062 6520 6164 6465 6420 nts to be added \n+0010b730: 746f 2053 4f41 5020 6d65 7373 6167 6573 to SOAP messages\n+0010b740: 2077 6974 686f 7574 2072 6571 7569 7269 without requiri\n+0010b750: 6e67 206d 6573 7361 6765 2062 6f64 7920 ng message body \n+0010b760: 7265 6665 7265 6e63 6573 2e20 5468 6973 references. This\n+0010b770: 2069 7320 616c 736f 2072 6566 6572 7265 is also referre\n+0010b780: 6420 746f 2061 7320 7468 6520 6f70 656e d to as the open\n+0010b790: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+0010b7a0: 2073 7479 6c65 2e20 5468 6520 636c 6f73 style. The clos\n+0010b7b0: 6564 2061 7474 6163 686d 656e 7420 7374 ed attachment st\n+0010b7c0: 796c 6520 7265 7175 6972 6573 2061 6c6c yle requires all\n+0010b7d0: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+0010b7e0: 7320 746f 2062 6520 7265 6665 7265 6e63 s to be referenc\n+0010b7f0: 6564 2066 726f 6d20 7468 6520 534f 4150 ed from the SOAP\n+0010b800: 206d 6573 7361 6765 2062 6f64 7920 7769 message body wi\n+0010b810: 7468 203c 656d 3e3c 636f 6465 3e68 7265 th hre\n+0010b820: 663c 2f63 6f64 653e 3c2f 656d 3e20 286f f (o\n+0010b830: 7220 7369 6d69 6c61 7229 2072 6566 6572 r similar) refer\n+0010b840: 656e 6365 732e 2046 6f72 2074 6865 2063 ences. For the c\n+0010b850: 6c6f 7365 6420 7374 796c 652c 2067 534f losed style, gSO\n+0010b860: 4150 2073 7570 706f 7274 7320 616e 2061 AP supports an a\n+0010b870: 7574 6f6d 6174 6963 2062 696e 6172 7920 utomatic binary \n+0010b880: 6461 7461 2073 6572 6961 6c69 7a61 7469 data serializati\n+0010b890: 6f6e 206d 6574 686f 642c 2073 6565 2053 on method, see S\n+0010b8a0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection Serializing bi\n+0010b8e0: 6e61 7279 2064 6174 6120 7769 7468 2044 nary data with D\n+0010b8f0: 494d 4520 6174 7461 6368 6d65 6e74 733c IME attachments<\n+0010b900: 2f61 3e20 2e3c 2f70 3e0a 3c70 3ef0 9f94 /a> .

    .

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

    .\n+0010b940: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Re\n+0010b970: 7472 6965 7669 6e67 2061 2063 6f6c 6c65 trieving a colle\n+0010b980: 6374 696f 6e20 6f66 2044 494d 4520 6174 ction of DIME at\n+0010b990: 7461 6368 6d65 6e74 733c 2f68 323e 0a3c tachments

    .<\n+0010b9a0: 703e 4449 4d45 2061 7474 6163 686d 656e p>DIME attachmen\n+0010b9b0: 7473 2061 7265 2061 7574 6f6d 6174 6963 ts are automatic\n+0010b9c0: 616c 6c79 2070 6172 7365 6420 616e 6420 ally parsed and \n+0010b9d0: 7374 6f72 6564 2069 6e20 6d65 6d6f 7279 stored in memory\n+0010b9e0: 2028 6f72 2070 6173 7365 6420 746f 2074 (or passed to t\n+0010b9f0: 6865 2073 7472 6561 6d69 6e67 2068 616e he streaming han\n+0010ba00: 646c 6572 7320 7669 6120 7468 6520 4449 dlers via the DI\n+0010ba10: 4d45 2063 616c 6c62 6163 6b20 6675 6e63 ME callback func\n+0010ba20: 7469 6f6e 7320 7768 656e 2064 6566 696e tions when defin\n+0010ba30: 6564 292e 2041 6674 6572 2072 6563 6569 ed). After recei\n+0010ba40: 7669 6e67 2061 2073 6574 206f 6620 4449 ving a set of DI\n+0010ba50: 4d45 2061 7474 6163 686d 656e 7473 2c20 ME attachments, \n+0010ba60: 6569 7468 6572 2061 7420 7468 6520 636c either at the cl\n+0010ba70: 6965 6e74 2d73 6964 6520 6f72 2074 6865 ient-side or the\n+0010ba80: 2073 6572 7665 722d 7369 6465 2c20 7468 server-side, th\n+0010ba90: 6520 6c69 7374 206f 6620 4449 4d45 2061 e list of DIME a\n+0010baa0: 7474 6163 686d 656e 7473 2063 616e 2062 ttachments can b\n+0010bab0: 6520 7472 6176 6572 7365 6420 746f 2065 e traversed to e\n+0010bac0: 7874 7261 6374 206d 6574 6120 6461 7461 xtract meta data\n+0010bad0: 2061 6e64 2074 6865 2061 7474 6163 686d and the attachm\n+0010bae0: 656e 7420 636f 6e74 656e 742e 3c2f 703e ent content.

    \n+0010baf0: 0a3c 703e 546f 2074 7261 7665 7273 6520 .

    To traverse \n+0010bb00: 7468 6520 6c69 7374 206f 6620 4449 4d45 the list of DIME\n+0010bb10: 2061 7474 6163 686d 656e 7473 2069 6e20 attachments in \n+0010bb20: 432c 2079 6f75 2075 7365 2061 206c 6f6f C, you use a loo\n+0010bb30: 7020 7369 6d69 6c61 7220 746f 3a3c 2f70 p similar to:.

    int n\n+0010bb90: 203d 2030 3b3c 2f64 6976 3e0a 3c64 6976 = 0;
    .struct soap_multipa\n+0010bc10: 7274 3c2f 613e 202a 6174 7461 6368 6d65 rt *attachme\n+0010bc20: 6e74 3b3c 2f64 6976 3e0a 3c64 6976 2063 nt;
    .
    for\n+0010bc60: 2028 6174 7461 6368 6d65 6e74 203d 203c (attachment = <\n+0010bc70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0010bc80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0010bc90: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0010bca0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;dime\n+0010bcf0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .list; at\n+0010bd50: 7461 6368 6d65 6e74 3b20 6174 7461 6368 tachment; attach\n+0010bd60: 6d65 6e74 203d 2061 7474 6163 686d 656e ment = attachmen\n+0010bd70: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->next)
    .
    {.
    ++n;.
    printf("\n+0010be50: 5061 7274 2025 643a 5c6e 2671 756f 743b Part %d:\\n"\n+0010be60: 3c2f 7370 616e 3e2c 206e 293b 3c2f 6469 , n);.
    printf("\n+0010beb0: 7074 7220 2020 2020 2020 203d 2570 5c6e ptr =%p\\n\n+0010bec0: 2671 756f 743b 3c2f 7370 616e 3e2c 2061 ", a\n+0010bed0: 7474 6163 686d 656e 742d 2667 743b 3c61 ttachment->ptr);.
    printf("s\n+0010bf80: 697a 6520 2020 2020 2020 3d25 756c 5c6e ize =%ul\\n\n+0010bf90: 2671 756f 743b 3c2f 7370 616e 3e2c 2061 ", a\n+0010bfa0: 7474 6163 686d 656e 742d 2667 743b 3c61 ttachment->size);.
    printf("\n+0010c050: 6964 2020 2020 2020 2020 203d 2573 5c6e id =%s\\n\n+0010c060: 2671 756f 743b 3c2f 7370 616e 3e2c 2061 ", a\n+0010c070: 7474 6163 686d 656e 742d 2667 743b 3c61 ttachment->id ? attac\n+0010c0e0: 686d 656e 742d 2667 743b 3c61 2063 6c61 hment->id\n+0010c140: 3c2f 613e 203a 203c 7370 616e 2063 6c61 : ""<\n+0010c170: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .<\n+0010c180: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010c190: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("type\n+0010c1c0: 2020 2020 2020 203d 2573 5c6e 2671 756f =%s\\n&quo\n+0010c1d0: 743b 3c2f 7370 616e 3e2c 2061 7474 6163 t;, attac\n+0010c1e0: 686d 656e 742d 2667 743b 3c61 2063 6c61 hment->ty\n+0010c240: 7065 3c2f 613e 203f 2061 7474 6163 686d pe ? attachm\n+0010c250: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->type\n+0010c2b0: 3c2f 613e 203a 203c 7370 616e 2063 6c61 : ""<\n+0010c2e0: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .<\n+0010c2f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010c300: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    ..
    soap::dime\n+0010c520: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    struct\n+0010c540: 2073 6f61 705f 6469 6d65 2064 696d 653c soap_dime dime<\n+0010c550: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    DIME att\n+0010c570: 6163 686d 656e 7473 2072 6563 6569 7665 achments receive\n+0010c580: 642e 3c2f 6469 763e 3c64 6976 2063 6c61 d.
    De\n+0010c5a0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+0010c5b0: 6473 6f61 7032 2e68 3a34 3138 343c 2f64 dsoap2.h:4184
    .
    \n+0010c5d0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    T\n+0010e340: 6865 203c 636f 6465 3e69 643c 2f63 6f64 he id member is for\n+0010e360: 2061 7474 6163 686d 656e 7420 7265 6665 attachment refe\n+0010e370: 7265 6e63 696e 672c 2074 7970 6963 616c rencing, typical\n+0010e380: 6c79 2061 2063 6f6e 7465 6e74 2069 6420 ly a content id \n+0010e390: 2843 4944 2920 6f72 2061 2055 5549 4420 (CID) or a UUID \n+0010e3a0: 7768 6963 6820 6361 6e20 6265 206f 6274 which can be obt\n+0010e3b0: 6169 6e65 6420 7769 7468 203c 636f 6465 ained with soap_rand_uuid\n+0010e450: 3c2f 613e 3c2f 636f 6465 3e2c 2061 203c , a <\n+0010e460: 636f 6465 3e74 7970 653c 2f63 6f64 653e code>type\n+0010e470: 206d 656d 6265 7220 6973 2075 7365 6420 member is used \n+0010e480: 746f 2073 7065 6369 6679 2074 6865 204d to specify the M\n+0010e490: 494d 4520 7479 7065 206f 6620 7468 6520 IME type of the \n+0010e4a0: 6461 7461 2c20 7468 6520 3c63 6f64 653e data, the \n+0010e4b0: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m\n+0010e4c0: 656d 6265 7220 6973 2075 7365 6420 746f ember is used to\n+0010e4d0: 2070 6967 6779 2d62 6163 6b20 6164 6469 piggy-back addi\n+0010e4e0: 7469 6f6e 616c 2069 6e66 6f72 6d61 7469 tional informati\n+0010e4f0: 6f6e 2077 6974 6820 6120 4449 4d45 2061 on with a DIME a\n+0010e500: 7474 6163 686d 656e 742e 2054 6865 206f ttachment. The o\n+0010e510: 7264 6572 206f 6620 7468 6520 6465 636c rder of the decl\n+0010e520: 6172 6174 696f 6e20 6f66 2074 6865 206d aration of the m\n+0010e530: 656d 6265 7273 2069 7320 7369 676e 6966 embers is signif\n+0010e540: 6963 616e 742e 2049 6e20 6164 6469 7469 icant. In additi\n+0010e550: 6f6e 2c20 6e6f 206f 7468 6572 206d 656d on, no other mem\n+0010e560: 6265 7273 206f 7220 6d65 7468 6f64 7320 bers or methods \n+0010e570: 6d61 7920 6265 2064 6563 6c61 7265 6420 may be declared \n+0010e580: 6265 666f 7265 2061 6e79 206f 6620 7468 before any of th\n+0010e590: 6573 6520 6d65 6d62 6572 7320 696e 2074 ese members in t\n+0010e5a0: 6865 2073 7472 7563 742f 636c 6173 732c he struct/class,\n+0010e5b0: 2062 7574 2061 6464 6974 696f 6e61 6c20 but additional \n+0010e5c0: 6d65 6d62 6572 7320 616e 6420 6d65 7468 members and meth\n+0010e5d0: 6f64 7320 6d61 7920 6170 7065 6172 2061 ods may appear a\n+0010e5e0: 6674 6572 2074 6865 206d 656d 6265 7220 fter the member \n+0010e5f0: 6465 636c 6172 6174 696f 6e73 2e20 5468 declarations. Th\n+0010e600: 6520 6578 7465 6e64 6564 203c 636f 6465 e extended xsd__he\n+0010e680: 7842 696e 6172 793c 2f61 3e3c 2f63 6f64 xBinary type is simil\n+0010e6a0: 6172 2e3c 2f70 3e0a 3c70 3e54 6865 203c ar.

    .

    The <\n+0010e6b0: 636f 6465 3e69 643c 2f63 6f64 653e 2061 code>id a\n+0010e6c0: 6e64 203c 636f 6465 3e74 7970 653c 2f63 nd type members con\n+0010e6e0: 7461 696e 2074 6578 742e 2054 6865 2073 tain text. The s\n+0010e6f0: 6574 2074 6865 2044 494d 452d 7370 6563 et the DIME-spec\n+0010e700: 6966 6963 206f 7074 696f 6e73 206d 656d ific options mem\n+0010e710: 6265 722c 2079 6f75 2063 616e 2075 7365 ber, you can use\n+0010e720: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap_d\n+0010e7a0: 696d 655f 6f70 7469 6f6e 3c2f 613e 3c2f ime_option function <\n+0010e7c0: 636f 6465 3e63 6861 7220 2a73 6f61 705f code>char *soap_\n+0010e7d0: 6469 6d65 5f6f 7074 696f 6e28 7374 7275 dime_option(stru\n+0010e7e0: 6374 2073 6f61 7020 2a73 6f61 702c 2075 ct soap *soap, u\n+0010e7f0: 6e73 6967 6e65 6420 7368 6f72 7420 7479 nsigned short ty\n+0010e800: 7065 2c20 636f 6e73 7420 6368 6172 202a pe, const char *\n+0010e810: 6f70 7469 6f6e 293c 2f63 6f64 653e 2e3c option).<\n+0010e820: 2f70 3e0a 3c70 3e54 6869 7320 6675 6e63 /p>.

    This func\n+0010e830: 7469 6f6e 2072 6574 7572 6e73 2061 2073 tion returns a s\n+0010e840: 7472 696e 6720 7769 7468 2074 6869 7320 tring with this \n+0010e850: 656e 636f 6469 6e67 2e20 466f 7220 6578 encoding. For ex\n+0010e860: 616d 706c 653c 2f70 3e0a 3c64 6976 2063 ample

    .
    \n+0010e880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+0010e8b0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>xsd\n+0010e8f0: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary image;
    \n+0010e910: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.__ptr = ..\n+0010e990: 2e3b 203c 2f64 6976 3e0a 3c64 6976 2063 .;
    .
    imag\n+0010e9b0: 652e 5f5f 7369 7a65 203d 202e 2e2e 3b20 e.__size = ...; \n+0010e9c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    image.i\n+0010e9e0: 6420 3d20 3c73 7061 6e20 636c 6173 733d d = \n+0010ea00: 2671 756f 743b 7575 6964 3a30 3932 3333 "uuid:09233\n+0010ea10: 3532 332d 3334 3562 2d34 3335 312d 6236 523-345b-4351-b6\n+0010ea20: 3233 2d35 6473 6633 3573 6773 3564 3626 23-5dsf35sgs5d6&\n+0010ea30: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    image.typ\n+0010ea60: 6520 3d20 3c73 7061 6e20 636c 6173 733d e = \n+0010ea80: 2671 756f 743b 696d 6167 652f 6a70 6567 "image/jpeg\n+0010ea90: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+0010eaa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    image.op\n+0010eac0: 7469 6f6e 7320 3d20 3c61 2063 6c61 7373 tions = soap_d\n+0010eb20: 696d 655f 6f70 7469 6f6e 3c2f 613e 283c ime_option(<\n+0010eb30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0010eb40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0010eb50: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0010eb60: 302c 203c 7370 616e 2063 6c61 7373 3d22 0, &\n+0010eb80: 7175 6f74 3b4d 7920 7765 6464 696e 6720 quot;My wedding \n+0010eb90: 7069 6374 7572 6526 7175 6f74 3b3c 2f73 picture");
    .<\n+0010ec00: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+0010ec10: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_dim\n+0010ec60: 655f 6f70 7469 6f6e 3c2f 613e 3c2f 6469 e_option
    char * soa\n+0010ec90: 705f 6469 6d65 5f6f 7074 696f 6e28 7374 p_dime_option(st\n+0010eca0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0010ecb0: 2075 6e73 6967 6e65 6420 7368 6f72 7420 unsigned short \n+0010ecc0: 6f70 7479 7065 2c20 636f 6e73 7420 6368 optype, const ch\n+0010ecd0: 6172 202a 6f70 7469 6f6e 293c 2f64 6976 ar *option)
    Creates a DI\n+0010ed00: 4d45 206f 7074 696f 6e2e 3c2f 6469 763e ME option.
    \n+0010ed10: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    When either the\n+0010ed40: 203c 636f 6465 3e69 643c 2f63 6f64 653e id\n+0010ed50: 206f 7220 3c63 6f64 653e 7479 7065 3c2f or type member val\n+0010ed70: 7565 7320 6172 6520 6e6f 6e2d 4e55 4c4c ues are non-NULL\n+0010ed80: 2061 7420 7275 6e20 7469 6d65 2c20 7468 at run time, th\n+0010ed90: 6520 6461 7461 2077 696c 6c20 6265 2073 e data will be s\n+0010eda0: 6572 6961 6c69 7a65 6420 6173 2061 2044 erialized as a D\n+0010edb0: 494d 4520 6174 7461 6368 6d65 6e74 2e3c IME attachment.<\n+0010edc0: 2f70 3e0a 3c70 3e54 6865 2053 4f41 502f /p>.

    The SOAP/\n+0010edd0: 584d 4c20 6d65 7373 6167 6520 7265 6665 XML message refe\n+0010ede0: 7273 2074 6f20 7468 6520 6174 7461 6368 rs to the attach\n+0010edf0: 6d65 6e74 7320 7573 696e 6720 3c65 6d3e ments using \n+0010ee00: 3c63 6f64 653e 6872 6566 3c2f 636f 6465 href attribute\n+0010ee20: 732e 2054 6869 7320 6765 6e65 7261 6c6c s. This generall\n+0010ee30: 7920 776f 726b 7320 7769 6c6c 2077 6974 y works will wit\n+0010ee40: 6820 534f 4150 2052 5043 2065 6e63 6f64 h SOAP RPC encod\n+0010ee50: 6564 206d 6573 7361 6769 6e67 2c20 6265 ed messaging, be\n+0010ee60: 6361 7573 6520 3c65 6d3e 3c63 6f64 653e cause \n+0010ee70: 6872 6566 3c2f 636f 6465 3e3c 2f65 6d3e href\n+0010ee80: 2061 7474 7269 6275 7465 7320 6172 6520 attributes are \n+0010ee90: 7065 726d 6974 7465 642e 2048 6f77 6576 permitted. Howev\n+0010eea0: 6572 2c20 7769 7468 2064 6f63 756d 656e er, with documen\n+0010eeb0: 742f 6c69 7465 7261 6c20 7374 796c 6520 t/literal style \n+0010eec0: 7468 6520 7265 6665 7265 6e63 696e 6720 the referencing \n+0010eed0: 6d65 6368 616e 6973 6d20 6d75 7374 2062 mechanism must b\n+0010eee0: 6520 6578 706c 6963 6974 6c79 2064 6566 e explicitly def\n+0010eef0: 696e 6564 2069 6e20 7468 6520 7363 6865 ined in the sche\n+0010ef00: 6d61 206f 6620 7468 6520 6269 6e61 7279 ma of the binary\n+0010ef10: 2074 7970 652e 2054 6865 7265 666f 7265 type. Therefore\n+0010ef20: 2c20 4d54 4f4d 2069 7320 7468 6520 7072 , MTOM is the pr\n+0010ef30: 6566 6572 7265 6420 6174 7461 6368 6d65 eferred attachme\n+0010ef40: 6e74 206d 6563 6861 6e69 736d 2066 6f72 nt mechanism for\n+0010ef50: 2064 6f63 756d 656e 742f 6c69 7465 7261 document/litera\n+0010ef60: 6c20 7374 796c 6520 6d65 7373 6167 696e l style messagin\n+0010ef70: 672e 3c2f 703e 0a3c 703e 5468 6520 6465 g.

    .

    The de\n+0010ef80: 636c 6172 6174 696f 6e20 6f66 2061 6e20 claration of an \n+0010ef90: 6578 7465 6e64 6564 2062 696e 6172 7920 extended binary \n+0010efa0: 7479 7065 2069 6e20 7468 6520 696e 7465 type in the inte\n+0010efb0: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+0010efc0: 6520 666f 7220 736f 6170 6370 7032 2069 e for soapcpp2 i\n+0010efd0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n+0010f000: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010f010: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__myBinaryD\n+0010f030: 6174 6154 7970 6520 3c2f 6469 763e 0a3c ataType
    .<\n+0010f040: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010f050: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n+0010f070: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010f080: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype\">unsigne\n+0010f090: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d char *\n+0010f0c0: 5f5f 7074 723b 203c 2f64 6976 3e0a 3c64 __ptr;
    .\n+0010f0e0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+0010f100: 743c 2f73 7061 6e3e 205f 5f73 697a 653b t __size;\n+0010f110: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    char *id;
    .\n+0010f160: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0010f190: 6368 6172 3c2f 7370 616e 3e20 2a74 7970 char *typ\n+0010f1a0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    \n+0010f1c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *options; \n+0010f1f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };.

    C++ \n+0010f230: 7072 6f67 7261 6d6d 6572 7320 6361 6e20 programmers can \n+0010f240: 7573 6520 696e 6865 7269 7461 6e63 6520 use inheritance \n+0010f250: 696e 7374 6561 6420 6f66 2074 6578 7475 instead of textu\n+0010f260: 616c 2065 7874 656e 7369 6f6e 2072 6571 al extension req\n+0010f270: 7569 7265 6420 696e 2043 3a3c 2f70 3e0a uired in C:

    .\n+0010f280: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    cl\n+0010f2c0: 6173 7320 3c2f 7370 616e 3e3c 6120 636c ass xsd__base64Bin\n+0010f310: 6172 793c 2f61 3e20 3c2f 6469 763e 0a3c ary
    .<\n+0010f320: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010f330: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n+0010f350: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
    .\n+0010f370: 2020 2020 3c73 7061 6e20 636c 6173 733d un\n+0010f390: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char *__\n+0010f420: 7074 723c 2f61 3e3b 203c 2f64 6976 3e0a ptr;
    .\n+0010f430: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0010f460: 696e 743c 2f73 7061 6e3e 203c 6120 636c int __size; \n+0010f4d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .
    class\n+0010f520: 203c 2f73 7061 6e3e 6e73 5f5f 6d79 4269 ns__myBi\n+0010f530: 6e61 7279 4461 7461 5479 7065 203a 203c naryDataType : <\n+0010f540: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010f550: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord\">public xsd__b\n+0010f5a0: 6173 6536 3442 696e 6172 793c 2f61 3e20 ase64Binary \n+0010f5b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { public:<\n+0010f5f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *id;
    .\n+0010f650: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+0010f670: 6172 3c2f 7370 616e 3e20 2a74 7970 653b ar *type;\n+0010f680: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    char *options; .
    };
    .\n+0010f6f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    This d\n+0010f710: 6566 696e 6573 2061 6e20 6578 7465 6e73 efines an extens\n+0010f720: 696f 6e20 6f66 203c 656d 3e3c 636f 6465 ion of xsd:base64Binar\n+0010f740: 793c 2f63 6f64 653e 3c2f 656d 3e2c 2073 y, s\n+0010f750: 7563 6820 7468 6174 2074 6865 2064 6174 uch that the dat\n+0010f760: 6120 6361 6e20 6265 2073 6572 6961 6c69 a can be seriali\n+0010f770: 7a65 6420 6173 2044 494d 4520 6174 7461 zed as DIME atta\n+0010f780: 6368 6d65 6e74 7320 7573 696e 6720 3c65 chments using href attribu\n+0010f7b0: 7465 7320 666f 7220 7265 6665 7265 6e63 tes for referenc\n+0010f7c0: 696e 672e 2057 6865 6e20 6120 6469 6666 ing. When a diff\n+0010f7d0: 6572 656e 7420 6174 7472 6962 7574 6520 erent attribute \n+0010f7e0: 6973 2074 6f20 6265 2075 7365 642c 2074 is to be used, t\n+0010f7f0: 6869 7320 6d75 7374 2062 6520 6578 706c his must be expl\n+0010f800: 6963 6974 6c79 2064 6566 696e 6564 3a3c icitly defined:<\n+0010f810: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    //gsoap WSref \n+0010f860: 7363 6865 6d61 2069 6d70 6f72 743a 2068 schema import: h\n+0010f870: 7474 703a 2f2f 7363 6865 6d61 732e 786d ttp://schemas.xm\n+0010f880: 6c73 6f61 702e 6f72 672f 7773 2f32 3030 lsoap.org/ws/200\n+0010f890: 322f 3034 2f72 6566 6572 656e 6365 2f20 2/04/reference/ \n+0010f8a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0010f8c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__myBinary\n+0010f8f0: 4461 7461 5479 7065 203c 2f64 6976 3e0a DataType
    .\n+0010f900: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n+0010f930: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n+0010f950: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char \n+0010f980: 2a5f 5f70 7472 3b20 3c2f 6469 763e 0a3c *__ptr;
    .<\n+0010f990: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010f9a0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+0010f9c0: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n+0010f9d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+0010f9f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010fa00: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *id;
    \n+0010fa20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char *ty\n+0010fa60: 7065 3b20 3c2f 6469 763e 0a3c 6469 7620 pe;
    .
    \n+0010fa80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+0010faa0: 2f73 7061 6e3e 202a 6f70 7469 6f6e 733b /span> *options;\n+0010fab0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    @ char *WSref__loca\n+0010fb00: 7469 6f6e 3b20 3c2f 6469 763e 0a3c 6469 tion;
    .}\n+0010fb20: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+0010fb40: 703e 5468 6520 6578 616d 706c 6520 6162 p>The example ab\n+0010fb50: 6f76 6520 7573 6573 2074 6865 203c 656d ove uses the location<\n+0010fb70: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n+0010fb80: 6962 7574 6520 6465 6669 6e65 6420 696e ibute defined in\n+0010fb90: 2074 6865 2063 6f6e 7465 6e74 2072 6566 the content ref\n+0010fba0: 6572 656e 6365 2073 6368 656d 612c 2061 erence schema, a\n+0010fbb0: 7320 6465 6669 6e65 6420 696e 206f 6e65 s defined in one\n+0010fbc0: 206f 6620 7468 6520 7665 6e64 6f72 2773 of the vendor's\n+0010fbd0: 2073 7065 6369 6669 6320 5753 444c 2065 specific WSDL e\n+0010fbe0: 7874 656e 7369 6f6e 7320 666f 7220 4449 xtensions for DI\n+0010fbf0: 4d45 203c 6120 6872 6566 3d22 6874 7470 ME http://w\n+0010fc50: 7777 2e67 6f74 646f 746e 6574 2e63 6f6d ww.gotdotnet.com\n+0010fc60: 2f74 6561 6d2f 786d 6c5f 7773 7370 6563 /team/xml_wsspec\n+0010fc70: 732f 6469 6d65 2f57 5344 4c2d 4578 7465 s/dime/WSDL-Exte\n+0010fc80: 6e73 696f 6e2d 666f 722d 4449 4d45 2e68 nsion-for-DIME.h\n+0010fc90: 746d 3c2f 613e 2e3c 2f70 3e0a 3c70 3e57 tm.

    .

    W\n+0010fca0: 6865 6e20 7265 6365 6976 696e 6720 4449 hen receiving DI\n+0010fcb0: 4d45 2061 7474 6163 686d 656e 7473 2c20 ME attachments, \n+0010fcc0: 7468 6520 4449 4d45 206d 6574 6120 6461 the DIME meta da\n+0010fcd0: 7461 2061 6e64 2062 696e 6172 7920 636f ta and binary co\n+0010fce0: 6e74 656e 7420 6172 6520 7374 6f72 6564 ntent are stored\n+0010fcf0: 2069 6e20 7468 6520 7370 6563 6966 6965 in the specifie\n+0010fd00: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d xsd__base6\n+0010fd80: 3442 696e 6172 793c 2f61 3e3c 2f63 6f64 4Binary and xsd__hexBin\n+0010fe10: 6172 793c 2f61 3e3c 2f63 6f64 653e 2062 ary b\n+0010fe20: 696e 6172 7920 6461 7461 2074 7970 6573 inary data types\n+0010fe30: 206f 6e6c 7920 7768 656e 2074 6865 2058 only when the X\n+0010fe40: 4d4c 2070 6172 7473 206f 6620 7468 6520 ML parts of the \n+0010fe50: 6d65 7373 6167 6520 7573 6573 203c 656d message uses href attribut\n+0010fe80: 6573 2074 6f20 7265 6665 7220 746f 2074 es to refer to t\n+0010fe90: 6865 7365 2061 7474 6163 686d 656e 7473 hese attachments\n+0010fea0: 2e20 4966 2073 6f2c 2074 6865 2062 696e . If so, the bin\n+0010feb0: 6172 7920 6461 7461 2074 7970 6520 3c63 ary data type __ptr\n+0010fed0: 2061 6e64 203c 636f 6465 3e5f 5f73 697a and __siz\n+0010fee0: 653c 2f63 6f64 653e 206d 656d 6265 7273 e members\n+0010fef0: 2061 7265 2073 6574 2074 6f20 7468 6520 are set to the \n+0010ff00: 6c6f 6361 7469 6f6e 2069 6e20 6d65 6d6f location in memo\n+0010ff10: 7279 206f 6620 7468 6520 6174 7461 6368 ry of the attach\n+0010ff20: 6d65 6e74 2064 6174 6120 616e 6420 6c65 ment data and le\n+0010ff30: 6e67 7468 2c20 7265 7370 6563 7469 7665 ngth, respective\n+0010ff40: 6c79 2e3c 2f70 3e0a 3c70 3e4d 6573 7361 ly.

    .

    Messa\n+0010ff50: 6765 7320 6d61 7920 636f 6e74 6169 6e20 ges may contain \n+0010ff60: 6269 6e61 7279 2064 6174 6120 7468 6174 binary data that\n+0010ff70: 2072 6566 6572 656e 6365 7320 6578 7465 references exte\n+0010ff80: 726e 616c 2072 6573 6f75 7263 6573 206e rnal resources n\n+0010ff90: 6f74 2070 726f 7669 6465 6420 6173 2061 ot provided as a\n+0010ffa0: 7474 6163 686d 656e 7473 2e20 496e 2074 ttachments. In t\n+0010ffb0: 6861 7420 6361 7365 2c20 7468 6520 3c63 hat case, the __ptr\n+0010ffd0: 206d 656d 6265 7220 6973 204e 554c 4c20 member is NULL \n+0010ffe0: 616e 6420 7468 6520 3c63 6f64 653e 6964 and the id\n+0010fff0: 3c2f 636f 6465 3e20 6d65 6d62 6572 2072 member r\n+00110000: 6566 6572 7320 746f 2074 6865 2065 7874 efers to the ext\n+00110010: 6572 6e61 6c20 6461 7461 2073 6f75 7263 ernal data sourc\n+00110020: 652e 3c2f 703e 0a3c 703e 5468 6520 3c63 e.

    .

    The dime_id_form\n+00110040: 6174 3c2f 636f 6465 3e20 6174 7472 6962 at attrib\n+00110050: 7574 6520 6f66 2074 6865 2063 7572 7265 ute of the curre\n+00110060: 6e74 2063 6f6e 7465 7874 2063 616e 2062 nt context can b\n+00110070: 6520 7365 7420 746f 2074 6865 2064 6566 e set to the def\n+00110080: 6175 6c74 2066 6f72 6d61 7420 6f66 2044 ault format of D\n+00110090: 494d 4520 6964 206d 656d 6265 7273 2e20 IME id members. \n+001100a0: 5468 6520 666f 726d 6174 2073 7472 696e The format strin\n+001100b0: 6720 6d75 7374 2063 6f6e 7461 696e 2061 g must contain a\n+001100c0: 203c 636f 6465 3e64 3c2f 636f 6465 3e20 d \n+001100d0: 666f 726d 6174 2073 7065 6369 6669 6572 format specifier\n+001100e0: 2028 6f72 2061 6e79 206f 7468 6572 203c (or any other <\n+001100f0: 636f 6465 3e69 6e74 3c2f 636f 6465 3e2d code>int-\n+00110100: 6261 7365 6420 666f 726d 6174 2073 7065 based format spe\n+00110110: 6369 6669 6572 292e 2054 6865 2076 616c cifier). The val\n+00110120: 7565 206f 6620 7468 6973 2073 7065 6369 ue of this speci\n+00110130: 6669 6572 2069 7320 6120 6e6f 6e2d 6e65 fier is a non-ne\n+00110140: 6761 7469 7665 2069 6e74 6567 6572 2c20 gative integer, \n+00110150: 7769 7468 207a 6572 6f20 6265 696e 6720 with zero being \n+00110160: 7468 6520 7661 6c75 6520 6f66 2074 6865 the value of the\n+00110170: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+00110180: 2069 6420 666f 7220 7468 6520 534f 4150 id for the SOAP\n+00110190: 206d 6573 7361 6765 2e20 466f 7220 6578 message. For ex\n+001101a0: 616d 706c 652c 3c2f 703e 0a3c 6469 7620 ample,

    .
    struct \n+001101f0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+00110220: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+00110250: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n+001102b0: 6f61 705f 6e65 773c 2f61 3e28 293b 3c2f oap_new();.
    so\n+00110300: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->dime_id_form\n+00110360: 6174 3c2f 613e 203d 203c 7370 616e 2063 at = "id-%x\n+00110390: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+001103a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+001103f0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00110400: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+00110440: 6f61 703a 3a64 696d 655f 6964 5f66 6f72 oap::dime_id_for\n+00110450: 6d61 743c 2f61 3e3c 2f64 6976 3e3c 6469 mat
    const char * di\n+00110480: 6d65 5f69 645f 666f 726d 6174 3c2f 6469 me_id_format
    User-defina\n+001104b0: 626c 6520 666f 726d 6174 2073 7472 696e ble format strin\n+001104c0: 6720 746f 2067 656e 6572 6174 6520 4449 g to generate DI\n+001104d0: 4d45 2063 6f6e 7465 6e74 2049 4473 2e3c ME content IDs.<\n+001104e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00110500: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00110510: 6170 322e 683a 3431 3732 3c2f 6469 763e ap2.h:4172
    \n+00110520: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    As a result, al\n+00110550: 6c20 6174 7461 6368 6d65 6e74 7320 7769 l attachments wi\n+00110560: 7468 2061 204e 554c 4c20 3c63 6f64 653e th a NULL \n+00110570: 6964 3c2f 636f 6465 3e20 6d65 6d62 6572 id member\n+00110580: 2077 696c 6c20 7573 6520 6120 6175 746f will use a auto\n+00110590: 2d67 656e 6572 6174 6564 2069 6420 7661 -generated id va\n+001105a0: 6c75 6520 6261 7365 6420 6f6e 2074 6865 lue based on the\n+001105b0: 2066 6f72 6d61 7420 7374 7269 6e67 2e3c format string.<\n+001105c0: 2f70 3e0a 3c64 6c20 636c 6173 733d 2273 /p>.
    \n+001105e0: 3c64 743e 5761 726e 696e 673c 2f64 743e
    Warning
    \n+001105f0: 3c64 643e 4361 7265 206d 7573 7420 6265
    Care must be\n+00110600: 2074 616b 656e 206e 6f74 2074 6f20 696e taken not to in\n+00110610: 7472 6f64 7563 6520 6475 706c 6963 6174 troduce duplicat\n+00110620: 6520 636f 6e74 656e 7420 6964 2076 616c e content id val\n+00110630: 7565 732c 2077 6865 6e20 6173 7369 676e ues, when assign\n+00110640: 696e 6720 636f 6e74 656e 7420 6964 2076 ing content id v\n+00110650: 616c 7565 7320 746f 2074 6865 2069 6420 alues to the id \n+00110660: 6d65 6d62 6572 7320 6f66 2044 494d 4520 members of DIME \n+00110670: 6578 7465 6e64 6564 2062 696e 6172 7920 extended binary \n+00110680: 6461 7461 2074 7970 6573 2e20 436f 6e74 data types. Cont\n+00110690: 656e 7420 6964 7320 6d75 7374 2062 6520 ent ids must be \n+001106a0: 756e 6971 7565 2e3c 2f64 643e 3c2f 646c unique.
    .

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

    .

    .Streaming \n+00110720: 4449 4d45 3c2f 6832 3e0a 3c70 3e53 7472 DIME

    .

    Str\n+00110730: 6561 6d69 6e67 2044 494d 4520 6973 2061 eaming DIME is a\n+00110740: 6368 6965 7665 6420 7769 7468 2063 616c chieved with cal\n+00110750: 6c62 6163 6b20 6675 6e63 7469 6f6e 7320 lback functions \n+00110760: 746f 2066 6574 6368 2061 6e64 2073 746f to fetch and sto\n+00110770: 7265 2064 6174 6120 6475 7269 6e67 2074 re data during t\n+00110780: 7261 6e73 6d69 7373 696f 6e2e 2054 6872 ransmission. Thr\n+00110790: 6565 2066 756e 6374 696f 6e20 6361 6c6c ee function call\n+001107a0: 6261 636b 7320 666f 7220 7374 7265 616d backs for stream\n+001107b0: 696e 6720 4449 4d45 206f 7574 7075 7420 ing DIME output \n+001107c0: 616e 6420 7468 7265 6520 6361 6c6c 6261 and three callba\n+001107d0: 636b 7320 666f 7220 7374 7265 616d 696e cks for streamin\n+001107e0: 6720 4449 4d45 2069 6e70 7574 2061 7265 g DIME input are\n+001107f0: 2061 7661 696c 6162 6c65 2e3c 2f70 3e0a available.

    .\n+00110800: 3c75 6c3e 0a3c 6c69 3e3c 636f 6465 3e76
      .
    • v\n+00110810: 6f69 6420 2a28 2a73 6f61 702e 6664 696d oid *(*soap.fdim\n+00110820: 6572 6561 646f 7065 6e29 2873 7472 7563 ereadopen)(struc\n+00110830: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n+00110840: 6964 202a 6861 6e64 6c65 2c20 636f 6e73 id *handle, cons\n+00110850: 7420 6368 6172 202a 6964 2c20 636f 6e73 t char *id, cons\n+00110860: 7420 6368 6172 202a 7479 7065 2c20 636f t char *type, co\n+00110870: 6e73 7420 6368 6172 202a 6f70 7469 6f6e nst char *option\n+00110880: 7329 3c2f 636f 6465 3e20 5468 6973 2063 s) This c\n+00110890: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n+001108a0: 6420 6279 2074 6865 2065 6e67 696e 6520 d by the engine \n+001108b0: 746f 2073 7461 7274 2073 656e 6469 6e67 to start sending\n+001108c0: 2061 2073 7472 6561 6d69 6e67 2044 494d a streaming DIM\n+001108d0: 4520 6174 7461 6368 6d65 6e74 2e20 5468 E attachment. Th\n+001108e0: 6973 2063 616c 6c62 6163 6b20 6f70 656e is callback open\n+001108f0: 7320 6120 7374 7265 616d 2074 6f20 7374 s a stream to st\n+00110900: 6172 7420 7265 6164 696e 6720 7468 6520 art reading the \n+00110910: 6174 7461 6368 6d65 6e74 2064 6174 6120 attachment data \n+00110920: 746f 2073 656e 642e 2054 6865 2061 6374 to send. The act\n+00110930: 7561 6c20 6461 7461 2073 7472 6561 6d20 ual data stream \n+00110940: 7769 6c6c 2062 6520 7265 6164 2069 6e20 will be read in \n+00110950: 6368 756e 6b73 2075 7369 6e67 2074 6865 chunks using the\n+00110960: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fdi\n+00110a00: 6d65 7265 6164 3c2f 613e 3c2f 636f 6465 meread callback until\n+00110a20: 206e 6f20 6d6f 7265 2064 6174 6120 6973 no more data is\n+00110a30: 2061 7661 696c 6162 6c65 2061 6e64 2074 available and t\n+00110a40: 6865 203c 636f 6465 3e3c 6120 636c 6173 he \n+00110ae0: 736f 6170 3a3a 6664 696d 6572 6561 6463 soap::fdimereadc\n+00110af0: 6c6f 7365 3c2f 613e 3c2f 636f 6465 3e20 lose \n+00110b00: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+00110b10: 6564 2074 6f20 636c 6f73 6520 7468 6520 ed to close the \n+00110b20: 7374 7265 616d 2e20 5468 6520 3c63 6f64 stream. The handle \n+00110b40: 7061 7261 6d65 7465 7220 636f 6e74 6169 parameter contai\n+00110b50: 6e73 2074 6865 2076 616c 7565 206f 6620 ns the value of \n+00110b60: 7468 6520 3c63 6f64 653e 5f5f 7074 723c the __ptr<\n+00110b70: 2f63 6f64 653e 206d 656d 6265 7220 7661 /code> member va\n+00110b80: 7269 6162 6c65 206f 6620 7468 6520 6174 riable of the at\n+00110b90: 7461 6368 6d65 6e74 2073 7472 7563 742f tachment struct/\n+00110ba0: 636c 6173 7320 7769 7468 2064 6174 6120 class with data \n+00110bb0: 2865 2e67 2e20 3c63 6f64 653e 3c61 2063 (e.g. xsd__b\n+00110c30: 6173 6536 3442 696e 6172 793c 2f61 3e3c ase64Binary<\n+00110c40: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n+00110c50: 3c61 2063 6c61 7373 3d22 656c 2220 6872 _xop__Incl\n+00110cc0: 7564 653c 2f61 3e3c 2f63 6f64 653e 2077 ude w\n+00110cd0: 6974 6820 3c63 6f64 653e 5f5f 7074 723c ith __ptr<\n+00110ce0: 2f63 6f64 653e 2c20 3c63 6f64 653e 5f5f /code>, __\n+00110cf0: 7369 7a65 3c2f 636f 6465 3e2c 203c 636f size, id, type \n+00110d20: 616e 6420 3c63 6f64 653e 6f70 7469 6f6e and option\n+00110d30: 733c 2f63 6f64 653e 206d 656d 6265 7273 s members\n+00110d40: 292c 2077 6869 6368 2073 686f 756c 6420 ), which should \n+00110d50: 6265 2061 2070 6f69 6e74 6572 2074 6f20 be a pointer to \n+00110d60: 7370 6563 6966 6963 2069 6e66 6f72 6d61 specific informa\n+00110d70: 7469 6f6e 2073 7563 6820 6173 2061 2066 tion such as a f\n+00110d80: 696c 6520 6465 7363 7269 7074 6f72 206f ile descriptor o\n+00110d90: 7220 6120 706f 696e 7465 7220 746f 2061 r a pointer to a\n+00110da0: 2073 6f6d 6520 6170 706c 6963 6174 696f some applicatio\n+00110db0: 6e2d 7370 6563 6966 6963 2064 6174 6120 n-specific data \n+00110dc0: 746f 2062 6520 7061 7373 6564 2074 6f20 to be passed to \n+00110dd0: 7468 6973 2063 616c 6c62 6163 6b2e 2042 this callback. B\n+00110de0: 6f74 6820 7468 6520 3c63 6f64 653e 5f5f oth the __\n+00110df0: 7074 723c 2f63 6f64 653e 2061 6e64 203c ptr and <\n+00110e00: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size members of th\n+00110e20: 6520 6174 7461 6368 6d65 6e74 2073 7472 e attachment str\n+00110e30: 7563 742f 636c 6173 7320 7368 6f75 6c64 uct/class should\n+00110e40: 2068 6176 6520 6265 656e 2073 6574 2062 have been set b\n+00110e50: 7920 7468 6520 6170 706c 6963 6174 696f y the applicatio\n+00110e60: 6e20 7072 696f 7220 746f 2074 6865 2073 n prior to the s\n+00110e70: 6572 6961 6c69 7a61 7469 6f6e 206f 6620 erialization of \n+00110e80: 7468 6520 6d65 7373 6167 6520 7769 7468 the message with\n+00110e90: 2061 7474 6163 686d 656e 7473 2e20 4966 attachments. If\n+00110ea0: 2074 6865 203c 636f 6465 3e5f 5f73 697a the __siz\n+00110eb0: 653c 2f63 6f64 653e 2069 7320 7a65 726f e is zero\n+00110ec0: 2061 6e64 2048 5454 5020 6368 756e 6b69 and HTTP chunki\n+00110ed0: 6e67 2069 7320 656e 6162 6c65 6420 2877 ng is enabled (w\n+00110ee0: 6974 6820 3c63 6f64 653e 2353 4f41 505f ith #SOAP_\n+00110ef0: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e29 IO_CHUNK)\n+00110f00: 2c20 7468 656e 2063 6875 6e6b 6564 2044 , then chunked D\n+00110f10: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+00110f20: 6172 6520 7365 6e74 2c20 7365 6520 3c63 are sent, see soap::fdimer\n+00110fd0: 6561 643c 2f61 3e3c 2f63 6f64 653e 2e20 ead. \n+00110fe0: 5468 6520 3c63 6f64 653e 6964 3c2f 636f The id, type<\n+00111000: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and options \n+00111020: 7061 7261 6d65 7465 7273 2061 7265 2074 parameters are t\n+00111030: 6865 203c 636f 6465 3e69 643c 2f63 6f64 he id (optional ID)\n+00111050: 2c20 3c63 6f64 653e 7479 7065 3c2f 636f , type (a MIME type\n+00111070: 2920 616e 6420 3c63 6f64 653e 6f70 7469 ) and opti\n+00111080: 6f6e 733c 2f63 6f64 653e 2028 4449 4d45 ons (DIME\n+00111090: 206f 7074 696f 6e73 2061 7265 2073 6574 options are set\n+001110a0: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soap_\n+00111120: 6469 6d65 5f6f 7074 696f 6e3c 2f61 3e3c dime_option<\n+00111130: 2f63 6f64 653e 2920 6f66 2074 6865 2061 /code>) of the a\n+00111140: 7474 6163 686d 656e 7420 7374 7275 6374 ttachment struct\n+00111150: 2f63 6c61 7373 2c20 7265 7370 6563 7469 /class, respecti\n+00111160: 7665 6c79 2c20 6f66 2077 6869 6368 2061 vely, of which a\n+00111170: 7420 6c65 6173 7420 6f6e 6520 6d65 6d62 t least one memb\n+00111180: 6572 2073 686f 756c 6420 6265 206e 6f6e er should be non\n+00111190: 2d4e 554c 4c2e 2054 6865 2063 616c 6c62 -NULL. The callb\n+001111a0: 6163 6b20 7368 6f75 6c64 2072 6574 7572 ack should retur\n+001111b0: 6e20 7468 6520 3c63 6f64 653e 6861 6e64 n the hand\n+001111c0: 6c65 3c2f 636f 6465 3e20 7061 7261 6d65 le parame\n+001111d0: 7465 7220 7661 6c75 6520 6f72 2061 6e6f ter value or ano\n+001111e0: 7468 6572 2070 6f69 6e74 6572 2076 616c ther pointer val\n+001111f0: 7565 2c20 7768 6963 6820 6973 2070 6173 ue, which is pas\n+00111200: 7365 6420 6173 2074 6865 206e 6577 203c sed as the new <\n+00111210: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter to \n+00111230: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fdim\n+001112d0: 6572 6561 643c 2f61 3e3c 2f63 6f64 653e eread\n+001112e0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::fdimerea\n+00111390: 6463 6c6f 7365 3c2f 613e 3c2f 636f 6465 dclose callbacks. Whe\n+001113b0: 6e20 616e 2065 7272 6f72 206f 6363 7572 n an error occur\n+001113c0: 7265 6420 696e 2074 6869 7320 6361 6c6c red in this call\n+001113d0: 6261 636b 2c20 7468 6520 6361 6c6c 6261 back, the callba\n+001113e0: 636b 2073 686f 756c 6420 7265 7475 726e ck should return\n+001113f0: 204e 554c 4c20 616e 6420 7365 7420 3c63 NULL and set soap::\n+001114b0: 6572 726f 723c 2f61 3e3c 2f63 6f64 653e error\n+001114c0: 2074 6f20 616e 2065 7272 6f72 2063 6f64 to an error cod\n+001114d0: 652c 2065 2e67 2e20 7573 696e 6720 3c63 e, e.g. using soap_receive\n+00111590: 725f 6661 756c 743c 2f61 3e3c 2f63 6f64 r_fault. The callback\n+001115b0: 206d 6179 2072 6574 7572 6e20 4e55 4c4c may return NULL\n+001115c0: 2061 6e64 2073 6574 203c 636f 6465 3e3c and set <\n+001115d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001115e0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+001115f0: 6d6c 2361 6238 3566 3564 3432 3730 3239 ml#ab85f5d427029\n+00111600: 3633 6431 3365 6135 3430 6264 3938 3736 63d13ea540bd9876\n+00111610: 6536 6432 2220 7469 746c 653d 2254 6865 e6d2\" title=\"The\n+00111620: 2073 6f61 7020 636f 6e74 6578 7420 736f soap context so\n+00111630: 6170 5f73 7461 7475 7320 2869 6e74 2920 ap_status (int) \n+00111640: 6572 726f 7220 636f 6465 206f 6620 7468 error code of th\n+00111650: 6520 6c61 7374 206f 7065 7261 7469 6f6e e last operation\n+00111660: 206f 7220 2353 4f41 505f 4f4b 2028 7a65 or #SOAP_OK (ze\n+00111670: 726f 2922 3e73 6f61 703a 3a65 7272 6f72 ro)\">soap::error\n+00111680: 3c2f 613e 3c2f 636f 6465 3e20 746f 203c to <\n+00111690: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK when this s\n+001116b0: 7065 6369 6669 6320 4449 4d45 2061 7474 pecific DIME att\n+001116c0: 6163 686d 656e 7420 7368 6f75 6c64 206e achment should n\n+001116d0: 6f74 2074 6f20 6265 2073 7472 6561 6d65 ot to be streame\n+001116e0: 6420 616e 6420 7468 6520 656e 6769 6e65 d and the engine\n+001116f0: 2077 696c 6c20 7369 6d70 6c79 2073 6b69 will simply ski\n+00111700: 7020 6974 2e3c 2f6c 693e 0a3c 6c69 3e3c p it.
    • .
    • <\n+00111710: 636f 6465 3e73 697a 655f 7420 282a 736f code>size_t (*so\n+00111720: 6170 2e66 6469 6d65 7265 6164 2928 7374 ap.fdimeread)(st\n+00111730: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+00111740: 2076 6f69 6420 2a68 616e 646c 652c 2063 void *handle, c\n+00111750: 6861 7220 2a62 7566 2c20 7369 7a65 5f74 har *buf, size_t\n+00111760: 206c 656e 293c 2f63 6f64 653e 2054 6869 len) Thi\n+00111770: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+00111780: 6c6c 6564 2062 7920 7468 6520 656e 6769 lled by the engi\n+00111790: 6e65 2074 6f20 7265 6164 2061 2063 6875 ne to read a chu\n+001117a0: 6e6b 206f 6620 6174 7461 6368 6d65 6e74 nk of attachment\n+001117b0: 2064 6174 6120 746f 2074 7261 6e73 6d69 data to transmi\n+001117c0: 742e 2054 6865 203c 636f 6465 3e68 616e t. The han\n+001117d0: 646c 653c 2f63 6f64 653e 2070 6172 616d dle param\n+001117e0: 6574 6572 2063 6f6e 7461 696e 7320 7468 eter contains th\n+001117f0: 6520 6861 6e64 6c65 2072 6574 7572 6e65 e handle returne\n+00111800: 6420 6279 2074 6865 203c 636f 6465 3e3c d by the <\n+00111810: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00111820: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00111830: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+00111840: 6761 3036 3834 3535 6365 3431 3762 6464 ga068455ce417bdd\n+00111850: 6231 3633 3664 3464 3536 3565 3065 6266 b1636d4d565e0ebf\n+00111860: 3536 2220 7469 746c 653d 2243 616c 6c62 56\" title=\"Callb\n+00111870: 6163 6b20 746f 206f 7065 6e20 6120 7374 ack to open a st\n+00111880: 7265 616d 696e 6720 4449 4d45 2061 7474 reaming DIME att\n+00111890: 6163 686d 656e 7420 666f 7220 7265 6164 achment for read\n+001118a0: 696e 672e 223e 736f 6170 3a3a 6664 696d ing.\">soap::fdim\n+001118b0: 6572 6561 646f 7065 6e3c 2f61 3e3c 2f63 ereadopen callback. T\n+001118d0: 6865 203c 636f 6465 3e62 7566 3c2f 636f he buf parameter is\n+001118f0: 2074 6865 2062 7566 6665 7220 6f66 206c the buffer of l\n+00111900: 656e 6774 6820 3c63 6f64 653e 6c65 6e3c ength len<\n+00111910: 2f63 6f64 653e 2069 6e74 6f20 7768 6963 /code> into whic\n+00111920: 6820 6120 6368 756e 6b20 6f66 2064 6174 h a chunk of dat\n+00111930: 6120 7368 6f75 6c64 2062 6520 7772 6974 a should be writ\n+00111940: 7465 6e20 6279 2074 6865 2063 616c 6c62 ten by the callb\n+00111950: 6163 6b2e 2054 6865 2061 6374 7561 6c20 ack. The actual \n+00111960: 616d 6f75 6e74 206f 6620 6461 7461 2077 amount of data w\n+00111970: 7269 7474 656e 2069 6e74 6f20 7468 6520 ritten into the \n+00111980: 6275 6666 6572 206d 6179 2062 6520 6c65 buffer may be le\n+00111990: 7373 2074 6861 6e20 3c63 6f64 653e 6c65 ss than le\n+001119a0: 6e3c 2f63 6f64 653e 2061 6e64 2074 6869 n and thi\n+001119b0: 7320 6163 7475 616c 2061 6d6f 756e 7420 s actual amount \n+001119c0: 7368 6f75 6c64 2062 6520 7265 7475 726e should be return\n+001119d0: 6564 2062 7920 7468 6520 6361 6c6c 6261 ed by the callba\n+001119e0: 636b 2e20 4120 7265 7475 726e 2076 616c ck. A return val\n+001119f0: 7565 206f 6620 7a65 726f 2069 6e64 6963 ue of zero indic\n+00111a00: 6174 6573 2061 6e20 6572 726f 7220 616e ates an error an\n+00111a10: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d so\n+00111ac0: 6170 3a3a 6572 726f 723c 2f61 3e3c 2f63 ap::error should be s\n+00111ae0: 6574 2e20 5468 6520 3c63 6f64 653e 5f5f et. The __\n+00111af0: 7369 7a65 3c2f 636f 6465 3e20 6d65 6d62 size memb\n+00111b00: 6572 2076 6172 6961 626c 6520 6f66 2074 er variable of t\n+00111b10: 6865 2061 7474 6163 686d 656e 7420 7374 he attachment st\n+00111b20: 7275 6374 2f63 6c61 7373 2077 6974 6820 ruct/class with \n+00111b30: 6461 7461 2028 652e 672e 203c 636f 6465 data (e.g. x\n+00111bb0: 7364 5f5f 6261 7365 3634 4269 6e61 7279 sd__base64Binary\n+00111bc0: 3c2f 613e 3c2f 636f 6465 3e20 6f72 203c or <\n+00111bd0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>_xop_\n+00111c40: 5f49 6e63 6c75 6465 3c2f 613e 3c2f 636f _Include with _\n+00111c60: 5f70 7472 3c2f 636f 6465 3e2c 203c 636f _ptr, __size\n+00111c80: 2c20 3c63 6f64 653e 6964 3c2f 636f 6465 , id, type and o\n+00111cb0: 7074 696f 6e73 3c2f 636f 6465 3e20 6d65 ptions me\n+00111cc0: 6d62 6572 7329 2073 686f 756c 6420 6265 mbers) should be\n+00111cd0: 2073 6574 2062 7920 7468 6520 6170 706c set by the appl\n+00111ce0: 6963 6174 696f 6e20 7072 696f 7220 746f ication prior to\n+00111cf0: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati\n+00111d00: 6f6e 206f 6620 7468 6520 6d65 7373 6167 on of the messag\n+00111d10: 6520 7769 7468 2061 7474 6163 686d 656e e with attachmen\n+00111d20: 7473 2e20 5468 6520 7661 6c75 6520 6f66 ts. The value of\n+00111d30: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size indicates t\n+00111d50: 6865 2074 6f74 616c 2073 697a 6520 6f66 he total size of\n+00111d60: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n+00111d70: 6461 7461 2074 6f20 6265 2074 7261 6e73 data to be trans\n+00111d80: 6d69 7474 6564 2e20 4966 2074 6865 203c mitted. If the <\n+00111d90: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size member variab\n+00111db0: 6c65 2069 7320 7a65 726f 2061 6e64 2048 le is zero and H\n+00111dc0: 5454 5020 6368 756e 6b69 6e67 2069 7320 TTP chunking is \n+00111dd0: 656e 6162 6c65 6420 2877 6974 6820 3c63 enabled (with #SOAP_IO_CHU\n+00111df0: 4e4b 3c2f 636f 6465 3e29 2c20 7468 656e NK), then\n+00111e00: 2044 494d 4520 6368 756e 6b65 6420 7472 DIME chunked tr\n+00111e10: 616e 7366 6572 7320 6172 6520 6163 7469 ansfers are acti\n+00111e20: 7661 7465 6420 6279 2074 6865 2065 6e67 vated by the eng\n+00111e30: 696e 652c 2077 6869 6368 2069 7320 6d6f ine, which is mo\n+00111e40: 7265 2066 6c65 7869 626c 6520 7369 6e63 re flexible sinc\n+00111e50: 6520 7468 6520 6174 7461 6368 6d65 6e74 e the attachment\n+00111e60: 2064 6174 6120 7369 7a65 2064 6f65 7320 data size does \n+00111e70: 6e6f 7420 6e65 6564 2074 6f20 6265 2064 not need to be d\n+00111e80: 6574 6572 6d69 6e65 6420 696e 2061 6476 etermined in adv\n+00111e90: 616e 6365 2e20 546f 2075 7365 2044 494d ance. To use DIM\n+00111ea0: 4520 6368 756e 6b65 6420 7472 616e 7366 E chunked transf\n+00111eb0: 6572 732c 2065 6e61 626c 6520 4854 5450 ers, enable HTTP\n+00111ec0: 2063 6875 6e6b 696e 6720 7769 7468 203c chunking with <\n+00111ed0: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n+00111ee0: 554e 4b3c 2f63 6f64 653e 2028 616c 736f UNK (also\n+00111ef0: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_\n+00111f00: 5354 4f52 453c 2f63 6f64 653e 2063 616e STORE can\n+00111f10: 2062 6520 7573 6564 2c20 6275 7420 7468 be used, but th\n+00111f20: 6973 2062 7566 6665 7273 2074 6865 2065 is buffers the e\n+00111f30: 6e74 6972 6520 6d65 7373 6167 6520 696e ntire message in\n+00111f40: 206d 656d 6f72 7920 6265 666f 7265 2074 memory before t\n+00111f50: 7261 6e73 6d69 7373 696f 6e29 2061 6e64 ransmission) and\n+00111f60: 2073 6574 2074 6865 203c 636f 6465 3e5f set the _\n+00111f70: 5f73 697a 653c 2f63 6f64 653e 206d 656d _size mem\n+00111f80: 6265 7220 7661 7269 6162 6c65 206f 6620 ber variable of \n+00111f90: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s\n+00111fa0: 7472 7563 742f 636c 6173 7320 746f 207a truct/class to z\n+00111fb0: 6572 6f2e 2057 6865 6e20 4449 4d45 2061 ero. When DIME a\n+00111fc0: 7474 6163 686d 656e 7420 6368 756e 6b69 ttachment chunki\n+00111fd0: 6e67 2069 7320 656e 6162 6c65 642c 2074 ng is enabled, t\n+00111fe0: 6869 7320 6361 6c6c 6261 636b 2073 686f his callback sho\n+00111ff0: 756c 6420 636f 6d70 6c65 7465 6c79 2066 uld completely f\n+00112000: 696c 6c20 7468 6520 3c63 6f64 653e 6275 ill the bu\n+00112010: 663c 2f63 6f64 653e 2062 7566 6665 7220 f buffer \n+00112020: 7769 7468 203c 636f 6465 3e6c 656e 3c2f with len bytes unle\n+00112040: 7373 2074 6865 206c 6173 7420 6461 7461 ss the last data\n+00112050: 2063 6875 6e6b 2069 7320 7265 6163 6865 chunk is reache\n+00112060: 6420 616e 6420 6665 7765 7220 6279 7465 d and fewer byte\n+00112070: 7320 6172 6520 7265 7475 726e 6564 2e3c s are returned.<\n+00112080: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e76 /li>.
    • v\n+00112090: 6f69 6420 282a 736f 6170 2e66 6469 6d65 oid (*soap.fdime\n+001120a0: 7265 6164 636c 6f73 6529 2873 7472 7563 readclose)(struc\n+001120b0: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n+001120c0: 6964 202a 6861 6e64 6c65 293c 2f63 6f64 id *handle) This callback\n+001120e0: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n+001120f0: 6520 656e 6769 6e65 2074 6f20 636c 6f73 e engine to clos\n+00112100: 6520 7468 6520 4449 4d45 2061 7474 6163 e the DIME attac\n+00112110: 686d 656e 7420 7374 7265 616d 2061 6674 hment stream aft\n+00112120: 6572 2072 6561 6469 6e67 2e20 5468 6520 er reading. The \n+00112130: 3c63 6f64 653e 6861 6e64 6c65 3c2f 636f handle parameter co\n+00112150: 6e74 6169 6e73 2074 6865 2068 616e 646c ntains the handl\n+00112160: 6520 7265 7475 726e 6564 2062 7920 7468 e returned by th\n+00112170: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e s\n+00112210: 6f61 703a 3a66 6469 6d65 7265 6164 6f70 oap::fdimereadop\n+00112220: 656e 3c2f 613e 3c2f 636f 6465 3e20 6361 en ca\n+00112230: 6c6c 6261 636b 2e3c 2f6c 693e 0a3c 6c69 llback.
    • .void *(*s\n+00112250: 6f61 702e 6664 696d 6577 7269 7465 6f70 oap.fdimewriteop\n+00112260: 656e 2928 7374 7275 6374 2073 6f61 7020 en)(struct soap \n+00112270: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+00112280: 7220 2a69 642c 2063 6f6e 7374 2063 6861 r *id, const cha\n+00112290: 7220 2a74 7970 652c 2063 6f6e 7374 2063 r *type, const c\n+001122a0: 6861 7220 2a6f 7074 696f 6e73 293c 2f63 har *options) Called by t\n+001122c0: 6865 2074 6f20 7374 6172 7420 7265 6365 he to start rece\n+001122d0: 6976 696e 6720 6120 7374 7265 616d 696e iving a streamin\n+001122e0: 6720 4449 4d45 2061 7474 6163 686d 656e g DIME attachmen\n+001122f0: 742e 2054 6869 7320 6361 6c6c 6261 636b t. This callback\n+00112300: 206f 7065 6e73 2061 2073 7472 6561 6d20 opens a stream \n+00112310: 746f 2073 7461 7274 2077 7269 7469 6e67 to start writing\n+00112320: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n+00112330: 6461 7461 2072 6563 6569 7665 642e 2054 data received. T\n+00112340: 6865 2061 6374 7561 6c20 6461 7461 2073 he actual data s\n+00112350: 7472 6561 6d20 7769 6c6c 2062 6520 7772 tream will be wr\n+00112360: 6974 7465 6e20 696e 2063 6875 6e6b 7320 itten in chunks \n+00112370: 7573 696e 6720 7468 6520 3c63 6f64 653e using the \n+00112380: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fdimewrit\n+00112420: 653c 2f61 3e3c 2f63 6f64 653e 2063 616c e cal\n+00112430: 6c62 6163 6b20 756e 7469 6c20 6e6f 206d lback until no m\n+00112440: 6f72 6520 6461 7461 2069 7320 6176 6169 ore data is avai\n+00112450: 6c61 626c 6520 616e 6420 7468 6520 3c63 lable and the soap:\n+00112500: 3a66 6469 6d65 7772 6974 6563 6c6f 7365 :fdimewriteclose\n+00112510: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+00112520: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t\n+00112530: 6f20 636c 6f73 6520 7468 6520 7374 7265 o close the stre\n+00112540: 616d 2e20 5468 6520 3c63 6f64 653e 6964 am. The id\n+00112550: 3c2f 636f 6465 3e2c 203c 636f 6465 3e74 , t\n+00112560: 7970 653c 2f63 6f64 653e 2061 6e64 203c ype and <\n+00112570: 636f 6465 3e6f 7074 696f 6e73 3c2f 636f code>options parameters a\n+00112590: 7265 2074 6865 203c 636f 6465 3e69 643c re the id<\n+001125a0: 2f63 6f64 653e 2c20 3c63 6f64 653e 7479 /code>, ty\n+001125b0: 7065 3c2f 636f 6465 3e20 616e 6420 3c63 pe and options of the attach\n+001125e0: 6d65 6e74 2073 7472 7563 742f 636c 6173 ment struct/clas\n+001125f0: 7320 2865 2e67 2e20 3c63 6f64 653e 3c61 s (e.g. xsd_\n+00112670: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary or _xop__In\n+00112700: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude\n+00112710: 2077 6974 6820 3c63 6f64 653e 5f5f 7074 with __pt\n+00112720: 723c 2f63 6f64 653e 2c20 3c63 6f64 653e r, \n+00112730: 5f5f 7369 7a65 3c2f 636f 6465 3e2c 203c __size, <\n+00112740: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, \n+00112750: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti\n+00112770: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe\n+00112780: 7273 292c 2072 6573 7065 6374 6976 656c rs), respectivel\n+00112790: 792e 2054 6865 2063 616c 6c62 6163 6b20 y. The callback \n+001127a0: 7368 6f75 6c64 2072 6574 7572 6e20 6120 should return a \n+001127b0: 6861 6e64 6c65 2c20 7768 6963 6820 6973 handle, which is\n+001127c0: 2070 6173 7365 6420 746f 2074 6865 203c passed to the <\n+001127d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fdim\n+00112870: 6577 7269 7465 3c2f 613e 3c2f 636f 6465 ewrite and soap::fdimewr\n+00112930: 6974 6563 6c6f 7365 3c2f 613e 3c2f 636f iteclose callbacks. T\n+00112950: 6865 203c 636f 6465 3e5f 5f70 7472 3c2f he __ptr member var\n+00112970: 6961 626c 6520 6f66 2074 6865 2061 7474 iable of the att\n+00112980: 6163 686d 656e 7420 7374 7275 6374 2f63 achment struct/c\n+00112990: 6c61 7373 2069 7320 7365 7420 6279 2074 lass is set by t\n+001129a0: 6865 2065 6e67 696e 6520 746f 2074 6865 he engine to the\n+001129b0: 2076 616c 7565 206f 6620 7468 6973 2068 value of this h\n+001129c0: 616e 646c 652e 2054 6865 203c 636f 6465 andle. The __size m\n+001129e0: 656d 6265 7220 7661 7269 6162 6c65 2069 ember variable i\n+001129f0: 7320 7365 7420 746f 2074 6865 2073 697a s set to the siz\n+00112a00: 6520 6f66 2074 6865 2061 7474 6163 686d e of the attachm\n+00112a10: 656e 7420 7265 6365 6976 6564 2e20 5468 ent received. Th\n+00112a20: 6520 6d61 7869 6d75 6d20 4449 4d45 2061 e maximum DIME a\n+00112a30: 7474 6163 686d 656e 7420 7369 7a65 2072 ttachment size r\n+00112a40: 6563 6569 7665 6420 6973 206c 696d 6974 eceived is limit\n+00112a50: 6564 2062 7920 3c63 6f64 653e 2353 4f41 ed by #SOA\n+00112a60: 505f 4d41 5844 494d 4553 495a 453c 2f63 P_MAXDIMESIZE..
    • <\n+00112a80: 636f 6465 3e69 6e74 2028 2a73 6f61 702e code>int (*soap.\n+00112a90: 6664 696d 6577 7269 7465 2928 7374 7275 fdimewrite)(stru\n+00112aa0: 6374 2073 6f61 7020 2a73 6f61 702c 2076 ct soap *soap, v\n+00112ab0: 6f69 6420 2a68 616e 646c 652c 2063 6f6e oid *handle, con\n+00112ac0: 7374 2063 6861 7220 2a62 7566 2c20 7369 st char *buf, si\n+00112ad0: 7a65 5f74 206c 656e 293c 2f63 6f64 653e ze_t len)\n+00112ae0: 2054 6869 7320 6361 6c6c 6261 636b 2069 This callback i\n+00112af0: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+00112b00: 656e 6769 6e65 2074 6f20 7772 6974 6520 engine to write \n+00112b10: 6120 6368 756e 6b20 6f66 2061 7474 6163 a chunk of attac\n+00112b20: 686d 656e 7420 6461 7461 2072 6563 6569 hment data recei\n+00112b30: 7665 642e 2054 6865 203c 636f 6465 3e68 ved. The h\n+00112b40: 616e 646c 653c 2f63 6f64 653e 2070 6172 andle par\n+00112b50: 616d 6574 6572 2063 6f6e 7461 696e 7320 ameter contains \n+00112b60: 7468 6520 6861 6e64 6c65 2072 6574 7572 the handle retur\n+00112b70: 6e65 6420 6279 2074 6865 203c 636f 6465 ned by the soap::fd\n+00112c20: 696d 6577 7269 7465 6f70 656e 3c2f 613e imewriteopen\n+00112c30: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+00112c40: 2e20 5468 6520 3c63 6f64 653e 6275 663c . The buf<\n+00112c50: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n+00112c60: 2063 6f6e 7461 696e 7320 7468 6520 6461 contains the da\n+00112c70: 7461 206f 6620 6c65 6e67 7468 203c 636f ta of length len. R\n+00112c90: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+00112ca0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+00112cb0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+00112d70: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+00112d80: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n+00112d90: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
    • .
    • void (*soap.fdi\n+00112db0: 6d65 7772 6974 6563 6c6f 7365 2928 7374 mewriteclose)(st\n+00112dc0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+00112dd0: 2076 6f69 6420 2a68 616e 646c 6529 3c2f void *handle) This callb\n+00112df0: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n+00112e00: 2074 6865 2065 6e67 696e 6520 746f 2063 the engine to c\n+00112e10: 6c6f 7365 2074 6865 2044 494d 4520 6174 lose the DIME at\n+00112e20: 7461 6368 6d65 6e74 2073 7472 6561 6d20 tachment stream \n+00112e30: 6166 7465 7220 7772 6974 696e 672e 2054 after writing. T\n+00112e40: 6865 203c 636f 6465 3e68 616e 646c 653c he handle<\n+00112e50: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n+00112e60: 2063 6f6e 7461 696e 7320 7468 6520 6861 contains the ha\n+00112e70: 6e64 6c65 2072 6574 7572 6e65 6420 6279 ndle returned by\n+00112e80: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::fdimewri\n+00112f30: 7465 6f70 656e 3c2f 613e 3c2f 636f 6465 teopen callback.
    • \n+00112f50: 0a3c 2f75 6c3e 0a3c 703e 496e 2061 6464 .
    .

    In add\n+00112f60: 6974 696f 6e2c 2061 203c 636f 6465 3e76 ition, a v\n+00112f70: 6f69 642a 203c 6120 636c 6173 733d 2265 oid* soa\n+00113030: 703a 3a75 7365 723c 2f61 3e3c 2f63 6f64 p::user member is ava\n+00113050: 696c 6162 6c65 2074 6f20 7061 7373 2075 ilable to pass u\n+00113060: 7365 722d 6465 6669 6e65 6420 6461 7461 ser-defined data\n+00113070: 2074 6f20 7468 6520 6361 6c6c 6261 636b to the callback\n+00113080: 732e 2054 6869 7320 7761 792c 2079 6f75 s. This way, you\n+00113090: 2063 616e 2073 6574 203c 636f 6465 3e76 can set v\n+001130a0: 6f69 642a 203c 6120 636c 6173 733d 2265 oid* soa\n+00113160: 703a 3a75 7365 723c 2f61 3e3c 2f63 6f64 p::user to point to a\n+00113180: 7070 6c69 6361 7469 6f6e 2064 6174 6120 pplication data \n+00113190: 7468 6174 2074 6865 2063 616c 6c62 6163 that the callbac\n+001131a0: 6b73 206e 6565 6420 7375 6368 2061 7320 ks need such as \n+001131b0: 6120 6669 6c65 206e 616d 6520 666f 7220 a file name for \n+001131c0: 6578 616d 706c 652e 3c2f 703e 0a3c 703e example.

    .

    \n+001131d0: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex\n+001131e0: 616d 706c 6520 696c 6c75 7374 7261 7465 ample illustrate\n+001131f0: 7320 7468 6520 636c 6965 6e74 2d73 6964 s the client-sid\n+00113200: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization\n+00113210: 206f 6620 616e 2069 6d61 6765 2061 7474 of an image att\n+00113220: 6163 686d 656e 7420 7374 7275 6374 2074 achment struct t\n+00113230: 6f20 7374 7265 616d 2061 2066 696c 6520 o stream a file \n+00113240: 696e 746f 2061 2044 494d 4520 6174 7461 into a DIME atta\n+00113250: 6368 6d65 6e74 3a3c 2f70 3e0a 3c64 6976 chment:

    .
    in\n+001132a0: 743c 2f73 7061 6e3e 206d 6169 6e28 2920 t main() \n+001132b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+001132d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n+00113370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n+001133a0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n+001133e0: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n+001133f0: 793c 2f61 3e20 696d 6167 653b 203c 2f64 y image; .
    FILE *fd\n+00113420: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    struct stat sb;
    \n+00113470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_i\n+001134e0: 6e69 743c 2f61 3e28 2661 6d70 3b3c 6120 nit(&soap); <\n+00113520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!\n+00113560: 6673 7461 7428 6669 6c65 6e6f 2866 6429 fstat(fileno(fd)\n+00113570: 2c20 2661 6d70 3b73 6229 2026 616d 703b , &sb) &\n+00113580: 2661 6d70 3b20 7362 2e73 745f 7369 7a65 & sb.st_size\n+00113590: 2026 6774 3b20 3029 203c 2f64 6976 3e0a > 0)
    .\n+001135a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+001135d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // becau\n+001135f0: 7365 2077 6520 6361 6e20 6765 7420 7468 se we can get th\n+00113600: 6520 6c65 6e67 7468 206f 6620 7468 6520 e length of the \n+00113610: 6669 6c65 2c20 7765 2063 616e 2073 7472 file, we can str\n+00113620: 6561 6d20 6974 203c 2f73 7061 6e3e 3c2f eam it .. \n+00113710: 2020 203c 6120 636c 6173 733d 2263 6f64 soap.fdimer\n+001137a0: 6561 6463 6c6f 7365 3c2f 613e 203d 2064 eadclose = d\n+001137b0: 696d 655f 7265 6164 5f63 6c6f 7365 3b20 ime_read_close; \n+001137c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.fdimeread = dime_read; <\n+00113880: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    imag\n+001138a0: 652e 5f5f 7074 7220 3d20 283c 7370 616e e.__ptr = (unsigned c\n+001138f0: 6861 723c 2f73 7061 6e3e 2a29 6664 3b20 har*)fd; \n+00113900: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // must se\n+00113920: 7420 746f 206e 6f6e 2d4e 554c 4c20 2874 t to non-NULL (t\n+00113930: 6869 7320 6973 206f 7572 2066 6420 6861 his is our fd ha\n+00113940: 6e64 6c65 2077 6869 6368 2077 6520 6e65 ndle which we ne\n+00113950: 6564 2069 6e20 7468 6520 6361 6c6c 6261 ed in the callba\n+00113960: 636b 7329 203c 2f73 7061 6e3e 3c2f 6469 cks) .
    image._\n+00113990: 5f73 697a 6520 3d20 7362 2e73 745f 7369 _size = sb.st_si\n+001139a0: 7a65 3b20 3c73 7061 6e20 636c 6173 733d ze; // mus\n+001139c0: 7420 7365 7420 7369 7a65 203c 2f73 7061 t set size
    .
    } <\n+001139f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else \n+00113a30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {..
    \n+00113d60: 2020 2020 3c73 7061 6e20 636c 6173 733d br\n+00113d80: 6561 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 eak; .
    image\n+00113db0: 2e5f 5f70 7472 5b69 5d20 3d20 633b 203c .__ptr[i] = c; <\n+00113dc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    fclos\n+00113e00: 6528 6664 293b 203c 2f64 6976 3e0a 3c64 e(fd);
    .\n+00113e20: 2020 2020 696d 6167 652e 5f5f 7369 7a65 image.__size\n+00113e30: 203d 2069 3b20 3c2f 6469 763e 0a3c 6469 = i;
    . \n+00113e50: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    im\n+00113e70: 6167 652e 7479 7065 203d 203c 7370 616e age.type = "ima\n+00113ea0: 6765 2f6a 7065 6726 7175 6f74 3b3c 2f73 ge/jpeg";
    . \n+00113ed0: 2069 6d61 6765 2e6f 7074 696f 6e73 203d image.options =\n+00113ee0: 203c 6120 636c 6173 733d 2263 6f64 6522
    soap_dime_opt\n+00113f40: 696f 6e3c 2f61 3e28 2661 6d70 3b3c 6120 ion(&soap, 0,\n+00113f80: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00113fa0: 6f74 3b4d 7920 7069 6374 7572 6526 7175 ot;My picture&qu\n+00113fb0: 6f74 3b3c 2f73 7061 6e3e 293b 203c 2f64 ot;); .
    if (soa\n+00114000: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n+00114010: 7468 6f64 2826 616d 703b 3c61 2063 6c61 thod(&soap, ...))\n+00114050: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n+00114070: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+00114090: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001140b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+001140d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001140f0: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+00114110: 7375 6363 6573 733c 2f73 7061 6e3e 3c2f success.
    }
    .\n+00114140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    void *dime_read_ope\n+001141a0: 6e28 3c73 7061 6e20 636c 6173 733d 226b n(struct soa\n+001141f0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00114220: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, void *h\n+00114250: 616e 646c 652c 203c 7370 616e 2063 6c61 andle, con\n+00114270: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001142a0: 2a3c 7370 616e 2063 6c61 7373 3d22 6b65 *id, cons\n+001142e0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+00114310: 7479 7065 2c20 3c73 7061 6e20 636c 6173 type, cons\n+00114330: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+00114360: 6f70 7469 6f6e 7329 203c 2f64 6976 3e0a options)
    .\n+00114370: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    return handle; .
    }
    .\n+001143f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    void dime_read_clos\n+00114450: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa\n+001144a0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001144d0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, void *h\n+00114500: 616e 646c 6529 203c 2f64 6976 3e0a 3c64 andle)
    .\n+00114520: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    fclo\n+00114540: 7365 2828 4649 4c45 2a29 6861 6e64 6c65 se((FILE*)handle\n+00114550: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } .
    .<\n+00114590: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001145a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >size_\n+001145c0: 743c 2f73 7061 6e3e 2064 696d 655f 7265 t dime_re\n+001145d0: 6164 283c 7370 616e 2063 6c61 7373 3d22 ad(struct<\n+001145f0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+00114620: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+00114650: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, void *\n+00114680: 6861 6e64 6c65 2c20 3c73 7061 6e20 636c handle, char *b\n+001146b0: 7566 2c20 3c73 7061 6e20 636c 6173 733d uf, si\n+001146d0: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e29 ze_t len)\n+001146e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+00114730: 7265 7475 726e 3c2f 7370 616e 3e20 6672 return fr\n+00114740: 6561 6428 6275 662c 2031 2c20 6c65 6e2c ead(buf, 1, len,\n+00114750: 2028 4649 4c45 2a29 6861 6e64 6c65 293b (FILE*)handle);\n+00114760: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }.
    soap::fdi\n+00114840: 6d65 7265 6164 6f70 656e 3c2f 613e 3c2f mereadopen
    void *(*\n+00114870: 2066 6469 6d65 7265 6164 6f70 656e 2928 fdimereadopen)(\n+00114880: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00114890: 702c 2076 6f69 6420 2a68 616e 646c 652c p, void *handle,\n+001148a0: 2063 6f6e 7374 2063 6861 7220 2a69 642c const char *id,\n+001148b0: 2063 6f6e 7374 2063 6861 7220 2a74 7970 const char *typ\n+001148c0: 652c 2063 6f6e 7374 2063 6861 7220 2a6f e, const char *o\n+001148d0: 7074 696f 6e73 293c 2f64 6976 3e3c 6469 ptions)
    \n+001148f0: 4361 6c6c 6261 636b 2074 6f20 6f70 656e Callback to open\n+00114900: 2061 2073 7472 6561 6d69 6e67 2044 494d a streaming DIM\n+00114910: 4520 6174 7461 6368 6d65 6e74 2066 6f72 E attachment for\n+00114920: 2072 6561 6469 6e67 2e3c 2f64 6976 3e3c reading.
    <\n+00114930: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00114940: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00114950: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00114960: 3436 3934 3c2f 6469 763e 3c2f 6469 763e 4694
    \n+00114970: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::fdim\n+00114a30: 6572 6561 6463 6c6f 7365 3c2f 613e 3c2f ereadclose
    void(* f\n+00114a60: 6469 6d65 7265 6164 636c 6f73 6529 2873 dimereadclose)(s\n+00114a70: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00114a80: 2c20 766f 6964 202a 6861 6e64 6c65 293c , void *handle)<\n+00114a90: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n+00114ab0: 2074 6f20 636c 6f73 6520 6120 4449 4d45 to close a DIME\n+00114ac0: 2061 7474 6163 686d 656e 7420 7374 7265 attachment stre\n+00114ad0: 616d 2061 6674 6572 2072 6561 6469 6e67 am after reading\n+00114ae0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+00114b00: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00114b10: 736f 6170 322e 683a 3437 3339 3c2f 6469 soap2.h:4739
    ..<\n+00114db0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00114dc0: 6922 3e76 6f69 6420 2a20 736f 6170 5f6d i\">void * soap_m\n+00114dd0: 616c 6c6f 6328 7374 7275 6374 2073 6f61 alloc(struct soa\n+00114de0: 7020 2a73 6f61 702c 2073 697a 655f 7420 p *soap, size_t \n+00114df0: 6c65 6e29 3c2f 6469 763e 3c64 6976 2063 len)
    All\n+00114e10: 6f63 6174 6520 6120 626c 6f63 6b20 6f66 ocate a block of\n+00114e20: 2068 6561 7020 6d65 6d6f 7279 206d 616e heap memory man\n+00114e30: 6167 6564 2062 7920 7468 6520 7370 6563 aged by the spec\n+00114e40: 6966 6965 6420 736f 6170 2063 6f6e 7465 ified soap conte\n+00114e50: 7874 2e3c 2f64 6976 3e3c 2f64 6976 3e0a xt.
    .\n+00114e60: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The fo\n+00114e80: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example \n+00114e90: 696c 6c75 7374 7261 7465 7320 7468 6520 illustrates the \n+00114ea0: 7374 7265 616d 696e 6720 6f66 2061 2044 streaming of a D\n+00114eb0: 494d 4520 6174 7461 6368 6d65 6e74 2069 IME attachment i\n+00114ec0: 6e74 6f20 6120 6669 6c65 2062 7920 6120 nto a file by a \n+00114ed0: 636c 6965 6e74 3a3c 2f70 3e0a 3c64 6976 client:

    .
    in\n+00114f20: 743c 2f73 7061 6e3e 206d 6169 6e28 2920 t main() \n+00114f30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00114f50: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n+00114ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e ....
    \n+001153a0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+001153c0: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
    .\n+001153d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n+00115400: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n+00115410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... \n+00115440: 2f2f 2073 7563 6365 7373 3c2f 7370 616e // success
    .
    } .
    .<\n+001154a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001154b0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *dime_write\n+001154d0: 5f6f 7065 6e28 3c73 7061 6e20 636c 6173 _open(stru\n+001154f0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, const <\n+00115580: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00115590: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *\n+001155c0: 6964 3c2f 7370 616e 3e2c 203c 7370 616e id, const char *type, const char *options) .
    {
    .<\n+00115690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001156a0: 3e20 2046 494c 4520 2a68 616e 646c 6520 > FILE *handle \n+001156b0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = fopen(&\n+00115730: 7175 6f74 3b73 6f6d 6566 696c 6526 7175 quot;somefile&qu\n+00115740: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "wb\n+00115770: 2671 756f 743b 3c2f 7370 616e 3e29 3b20 "); \n+00115780: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+001157c0: 2168 616e 646c 6529 203c 2f64 6976 3e0a !handle)
    .\n+001157d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00115800: 2020 3c61 2063 6c61 7373 3d22 636f 6465
    soap->e\n+00115880: 7272 6f72 3c2f 613e 203d 203c 6120 636c rror = S\n+001158e0: 4f41 505f 454f 463c 2f61 3e3b 203c 2f64 OAP_EOF; .
    soap->errnum = errno; // get reason <\n+001159c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001159e0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    return (void*)ha\n+00115a50: 6e64 6c65 3b20 3c2f 6469 763e 0a3c 6469 ndle;
    .}\n+00115a70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    vo\n+00115ac0: 6964 3c2f 7370 616e 3e20 6469 6d65 5f77 id dime_w\n+00115ad0: 7269 7465 5f63 6c6f 7365 283c 7370 616e rite_close(struct <\n+00115b00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00115b10: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00115b20: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00115b30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00115b60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+00115b80: 2f73 7061 6e3e 202a 6861 6e64 6c65 2920 /span> *handle) \n+00115b90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00115bb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fclo\n+00115c20: 7365 3c2f 613e 2828 4649 4c45 2a29 6861 se((FILE*)ha\n+00115c30: 6e64 6c65 293b 203c 2f64 6976 3e0a 3c64 ndle);
    .\n+00115c50: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    i\n+00115ca0: 6e74 3c2f 7370 616e 3e20 6469 6d65 5f77 nt dime_w\n+00115cb0: 7269 7465 283c 7370 616e 2063 6c61 7373 rite(struc\n+00115cd0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00115d00: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, void\n+00115d60: 202a 6861 6e64 6c65 2c20 3c73 7061 6e20 *handle, \n+00115d80: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *buf\n+00115e00: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n+00115e20: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le\n+00115e30: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {.
    size_t \n+00115e90: 6e77 7269 7474 656e 3b20 3c2f 6469 763e nwritten;
    \n+00115ea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    w\n+00115ed0: 6869 6c65 3c2f 7370 616e 3e20 286c 656e hile (len\n+00115ee0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    nwrit\n+00115f20: 7465 6e20 3d20 6677 7269 7465 283c 6120 ten = fwrite(buf, 1\n+00115f80: 2c20 6c65 6e2c 2028 4649 4c45 2a29 6861 , len, (FILE*)ha\n+00115f90: 6e64 6c65 293b 203c 2f64 6976 3e0a 3c64 ndle);
    .\n+00115fb0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n+00115fd0: 3c2f 7370 616e 3e20 2821 6e77 7269 7474 (!nwritt\n+00115fe0: 656e 2920 3c2f 6469 763e 0a3c 6469 7620 en)
    .
    \n+00116000: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n+00116020: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00116050: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n+001160a0: 726e 756d 3c2f 613e 203d 2065 7272 6e6f rnum = errno\n+001160b0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // get r\n+001160d0: 6561 736f 6e20 3c2f 7370 616e 3e3c 2f64 eason .. \n+001161a0: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    . \n+001161c0: 2020 6c65 6e20 2d3d 206e 7772 6974 7465 len -= nwritte\n+001161d0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    \n+001161f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf\n+00116240: 202b 3d20 6e77 7269 7474 656e 3b20 3c2f += nwritten; .
    } .
    \n+001162a0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; <\n+00116310: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+00116330: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    <\n+00116400: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00116410: 6922 3e69 6e74 282a 2066 6469 6d65 7772 i\">int(* fdimewr\n+00116420: 6974 6529 2873 7472 7563 7420 736f 6170 ite)(struct soap\n+00116430: 202a 736f 6170 2c20 766f 6964 202a 2c20 *soap, void *, \n+00116440: 636f 6e73 7420 6368 6172 202a 2c20 7369 const char *, si\n+00116450: 7a65 5f74 293c 2f64 6976 3e3c 6469 7620 ze_t)
    Ca\n+00116470: 6c6c 6261 636b 2074 6f20 7772 6974 6520 llback to write \n+00116480: 6461 7461 2069 6e20 6120 4449 4d45 2061 data in a DIME a\n+00116490: 7474 6163 686d 656e 7420 7374 7265 616d ttachment stream\n+001164a0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+001164c0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+001164d0: 736f 6170 322e 683a 3438 3232 3c2f 6469 soap2.h:4822
    .
    \n+00116540: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 void(* fdimewri\n+001165e0: 7465 636c 6f73 6529 2873 7472 7563 7420 teclose)(struct \n+001165f0: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n+00116600: 202a 6861 6e64 6c65 293c 2f64 6976 3e3c *handle)
    <\n+00116610: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00116620: 223e 4361 6c6c 6261 636b 2074 6f20 636c \">Callback to cl\n+00116630: 6f73 6520 6120 4449 4d45 2061 7474 6163 ose a DIME attac\n+00116640: 686d 656e 7420 7374 7265 616d 2061 6674 hment stream aft\n+00116650: 6572 2077 7269 7469 6e67 2e3c 2f64 6976 er writing.
    Definitio\n+00116680: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00116690: 683a 3438 3333 3c2f 6469 763e 3c2f 6469 h:4833
    .
    soap::fd\n+00116760: 696d 6577 7269 7465 6f70 656e 3c2f 613e imewriteopen\n+00116770: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void *\n+00116790: 282a 2066 6469 6d65 7772 6974 656f 7065 (* fdimewriteope\n+001167a0: 6e29 2873 7472 7563 7420 736f 6170 202a n)(struct soap *\n+001167b0: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+001167c0: 202a 6964 2c20 636f 6e73 7420 6368 6172 *id, const char\n+001167d0: 202a 7479 7065 2c20 636f 6e73 7420 6368 *type, const ch\n+001167e0: 6172 202a 6f70 7469 6f6e 7329 3c2f 6469 ar *options)
    Callback to\n+00116810: 206f 7065 6e20 6120 7374 7265 616d 696e open a streamin\n+00116820: 6720 4449 4d45 2061 7474 6163 686d 656e g DIME attachmen\n+00116830: 7420 666f 7220 7772 6974 696e 672e 3c2f t for writing.
    Defini\n+00116860: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00116870: 7032 2e68 3a34 3831 303c 2f64 6976 3e3c p2.h:4810
    <\n+00116880: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+00116950: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    SOAP_SOCKET(\n+00116970: 2a20 666f 7065 6e29 2873 7472 7563 7420 * fopen)(struct \n+00116980: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n+00116990: 7420 6368 6172 202a 656e 6470 6f69 6e74 t char *endpoint\n+001169a0: 2c20 636f 6e73 7420 6368 6172 202a 686f , const char *ho\n+001169b0: 7374 2c20 696e 7420 706f 7274 293c 2f64 st, int port)
    Callback t\n+001169e0: 6861 7420 6f70 656e 7320 6120 736f 636b hat opens a sock\n+001169f0: 6574 2063 6f6e 6e65 6374 696f 6e20 746f et connection to\n+00116a00: 2061 2073 6572 7665 7220 656e 6470 6f69 a server endpoi\n+00116a10: 6e74 2e3c 2f64 6976 3e3c 6469 7620 636c nt.
    D\n+00116a30: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00116a40: 7464 736f 6170 322e 683a 3434 3935 3c2f tdsoap2.h:4495
    .
    \n+00116b10: 736f 6170 3a3a 6663 6c6f 7365 3c2f 613e soap::fclose\n+00116b20: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int(* \n+00116b40: 6663 6c6f 7365 2928 7374 7275 6374 2073 fclose)(struct s\n+00116b50: 6f61 7020 2a73 6f61 7029 3c2f 6469 763e oap *soap)
    \n+00116b60: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback that\n+00116b80: 2063 6c6f 7365 7320 7468 6520 6375 7272 closes the curr\n+00116b90: 656e 7420 736f 636b 6574 2063 6f6e 6e65 ent socket conne\n+00116ba0: 6374 696f 6e2e 3c2f 6469 763e 3c64 6976 ction.
    <\n+00116bc0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:452\n+00116be0: 303c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 0
    .<\n+00116cb0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00116cc0: 6922 3e23 6465 6669 6e65 2053 4f41 505f i\">#define SOAP_\n+00116cd0: 454f 463c 2f64 6976 3e3c 6469 7620 636c EOF
    A so\n+00116cf0: 6170 5f73 7461 7475 7320 6572 726f 7220 ap_status error \n+00116d00: 636f 6465 3a20 756e 6578 7065 6374 6564 code: unexpected\n+00116d10: 2065 6e64 206f 6620 6669 6c65 2c20 6e6f end of file, no\n+00116d20: 2069 6e70 7574 2c20 7472 616e 736d 6973 input, transmis\n+00116d30: 7369 6f6e 2069 6e74 6572 7275 7074 6564 sion interrupted\n+00116d40: 206f 7220 7469 6d65 6420 6f75 7420 2873 or timed out (s\n+00116d50: 612e 2e2e 3c2f 6469 763e 3c64 6976 2063 a...
    \n+00116d70: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00116d80: 7374 6473 6f61 7032 2e68 3a32 3336 353c stdsoap2.h:2365<\n+00116d90: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    Message co\n+00116dc0: 6d70 7265 7373 696f 6e20 7769 7468 203c mpression with <\n+00116dd0: 636f 6465 3e23 534f 4150 5f45 4e43 5f5a code>#SOAP_ENC_Z\n+00116de0: 4c49 423c 2f63 6f64 653e 2063 616e 2062 LIB can b\n+00116df0: 6520 7573 6564 2077 6974 6820 4449 4d45 e used with DIME\n+00116e00: 2074 6f20 636f 6d70 7265 7373 2074 6865 to compress the\n+00116e10: 2065 6e74 6972 6520 6d65 7373 6167 652e entire message.\n+00116e20: 2048 6f77 6576 6572 2c20 636f 6d70 7265 However, compre\n+00116e30: 7373 696f 6e20 7265 7175 6972 6573 2062 ssion requires b\n+00116e40: 7566 6665 7269 6e67 2074 6f20 6465 7465 uffering to dete\n+00116e50: 726d 696e 6520 7468 6520 4854 5450 2063 rmine the HTTP c\n+00116e60: 6f6e 7465 6e74 206c 656e 6774 6820 6865 ontent length he\n+00116e70: 6164 6572 2c20 7768 6963 6820 6361 6e63 ader, which canc\n+00116e80: 656c 7320 7468 6520 6265 6e65 6669 7473 els the benefits\n+00116e90: 206f 6620 7374 7265 616d 696e 6720 4449 of streaming DI\n+00116ea0: 4d45 2e20 546f 2061 766f 6964 2074 6869 ME. To avoid thi\n+00116eb0: 732c 2079 6f75 2073 686f 756c 6420 7573 s, you should us\n+00116ec0: 6520 6368 756e 6b65 6420 4854 5450 2028 e chunked HTTP (\n+00116ed0: 7769 7468 2074 6865 206f 7574 7075 742d with the output-\n+00116ee0: 6d6f 6465 203c 636f 6465 3e23 534f 4150 mode #SOAP\n+00116ef0: 5f49 4f5f 4348 554e 4b3c 2f63 6f64 653e _IO_CHUNK\n+00116f00: 2066 6c61 6729 2077 6974 6820 636f 6d70 flag) with comp\n+00116f10: 7265 7373 696f 6e20 616e 6420 7374 7265 ression and stre\n+00116f20: 616d 696e 6720 4449 4d45 2e20 4174 2074 aming DIME. At t\n+00116f30: 6865 2073 6572 7665 7220 7369 6465 2c20 he server side, \n+00116f40: 7768 656e 2079 6f75 2073 6574 203c 636f when you set #SOAP_IO_CHUN\n+00116f60: 4b3c 2f63 6f64 653e 2062 6566 6f72 6520 K before \n+00116f70: 6361 6c6c 696e 6720 3c63 6f64 653e 3c61 calling soa\n+00116ff0: 705f 7365 7276 653c 2f61 3e3c 2f63 6f64 p_serve, the engine w\n+00117010: 696c 6c20 6175 746f 6d61 7469 6361 6c6c ill automaticall\n+00117020: 7920 7265 7665 7274 2074 6f20 6275 6666 y revert to buff\n+00117030: 6572 696e 6720 283c 636f 6465 3e23 534f ering (#SO\n+00117040: 4150 5f49 4f5f 5354 4f52 453c 2f63 6f64 AP_IO_STORE flag is set).\n+00117060: 2059 6f75 2063 616e 2063 6865 636b 2074 You can check t\n+00117070: 6869 7320 666c 6167 2077 6974 6820 3c63 his flag with (soap->om\n+00117090: 6f64 6520 2661 6d70 3b20 534f 4150 5f49 ode & SOAP_I\n+001170a0: 4f29 203d 3d20 534f 4150 5f49 4f5f 4348 O) == SOAP_IO_CH\n+001170b0: 554e 4b3c 2f63 6f64 653e 2074 6f20 7365 UNK to se\n+001170c0: 6520 6966 2074 6865 2063 6c69 656e 7420 e if the client \n+001170d0: 6163 6365 7074 7320 6368 756e 6b69 6e67 accepts chunking\n+001170e0: 2e20 4d6f 7265 2069 6e66 6f72 6d61 7469 . More informati\n+001170f0: 6f6e 2061 626f 7574 2073 7472 6561 6d69 on about streami\n+00117100: 6e67 2063 6875 6e6b 6564 2044 494d 4520 ng chunked DIME \n+00117110: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can be found in \n+00117120: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section Streaming c\n+00117160: 6875 6e6b 6564 2044 494d 453c 2f61 3e20 hunked DIME \n+00117170: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    Warning
    The \n+001171b0: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m\n+001171c0: 656d 6265 7220 6973 2061 2044 494d 452d ember is a DIME-\n+001171d0: 7370 6563 6966 6963 2064 6174 6120 7374 specific data st\n+001171e0: 7275 6374 7572 652c 2063 6f6e 7369 7374 ructure, consist\n+001171f0: 696e 6720 6f66 2061 2034 2062 7974 6520 ing of a 4 byte \n+00117200: 6865 6164 6572 2063 6f6e 7461 696e 696e header containin\n+00117210: 6720 7468 6520 6f70 7469 6f6e 2074 7970 g the option typ\n+00117220: 6520 696e 666f 2028 6869 2062 7974 652c e info (hi byte,\n+00117230: 206c 6f20 6279 7465 292c 206f 7074 696f lo byte), optio\n+00117240: 6e20 7374 7269 6e67 206c 656e 6774 6820 n string length \n+00117250: 2868 6920 6279 7465 2c20 6c6f 2062 7974 (hi byte, lo byt\n+00117260: 6529 2c20 666f 6c6c 6f77 6564 2062 7920 e), followed by \n+00117270: 6120 6e6f 6e2d 275c 3027 2074 6572 6d69 a non-'\\0' termi\n+00117280: 6e61 7465 6420 7374 7269 6e67 2e20 5468 nated string. Th\n+00117290: 6520 4449 4d45 2068 616e 646c 6572 2072 e DIME handler r\n+001172a0: 6563 6f67 6e69 7a65 7320 6f6e 6520 6f70 ecognizes one op\n+001172b0: 7469 6f6e 2061 7420 6d6f 7374 2e3c 2f64 tion at most.
    .

    .... \n+001172d0: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+001172e0: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+001172f0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..Strea\n+00117330: 6d69 6e67 2063 6875 6e6b 6564 2044 494d ming chunked DIM\n+00117340: 453c 2f68 323e 0a3c 703e 546f 2073 656e E

    .

    To sen\n+00117350: 6420 4449 4d45 2061 7474 6163 686d 656e d DIME attachmen\n+00117360: 7473 2c20 7468 6520 6174 7461 6368 6d65 ts, the attachme\n+00117370: 6e74 2073 697a 6573 206d 7573 7420 6265 nt sizes must be\n+00117380: 2064 6574 6572 6d69 6e65 6420 696e 2061 determined in a\n+00117390: 6476 616e 6365 2074 6f20 6361 6c63 756c dvance to calcul\n+001173a0: 6174 6520 4854 5450 206d 6573 7361 6765 ate HTTP message\n+001173b0: 206c 656e 6774 6820 7265 7175 6972 6564 length required\n+001173c0: 2074 6f20 7374 7265 616d 2044 494d 4520 to stream DIME \n+001173d0: 6f76 6572 2048 5454 502e 2048 6f77 6576 over HTTP. Howev\n+001173e0: 6572 2c20 6368 756e 6b65 6420 4449 4d45 er, chunked DIME\n+001173f0: 2074 6f67 6574 6865 7220 7769 7468 2063 together with c\n+00117400: 6875 6e6b 6564 2048 5454 5020 6361 6e20 hunked HTTP can \n+00117410: 6265 2075 7365 6420 746f 206f 6d69 7420 be used to omit \n+00117420: 7468 6973 2073 7465 702e 2046 6972 7374 this step. First\n+00117430: 2073 6574 2074 6865 203c 636f 6465 3e23 set the #\n+00117440: 534f 4150 5f49 4f5f 4348 554e 4b3c 2f63 SOAP_IO_CHUNK flag. Then,\n+00117460: 2074 6f20 7374 7265 616d 2063 6875 6e6b to stream chunk\n+00117470: 6564 2044 494d 452c 2073 6574 2074 6865 ed DIME, set the\n+00117480: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member of a\n+001174a0: 6e20 6174 7461 6368 6d65 6e74 2074 6f20 n attachment to \n+001174b0: 7a65 726f 2061 6e64 2065 6e61 626c 6520 zero and enable \n+001174c0: 4449 4d45 2063 6875 6e6b 696e 672e 2054 DIME chunking. T\n+001174d0: 6865 2044 494d 4520 3c63 6f64 653e 3c61 he DIME so\n+00117570: 6170 3a3a 6664 696d 6572 6561 643c 2f61 ap::fdimeread callbac\n+00117590: 6b20 7468 656e 2066 6574 6368 6573 2064 k then fetches d\n+001175a0: 6174 6120 696e 2063 6875 6e6b 7320 616e ata in chunks an\n+001175b0: 6420 6974 2069 7320 696d 706f 7274 616e d it is importan\n+001175c0: 7420 746f 2066 696c 6c20 7468 6520 656e t to fill the en\n+001175d0: 7469 7265 2062 7566 6665 7220 756e 6c65 tire buffer unle\n+001175e0: 7373 2074 6865 2065 6e64 206f 6620 7468 ss the end of th\n+001175f0: 6520 6461 7461 2068 6173 2062 6565 6e20 e data has been \n+00117600: 7265 6163 6865 6420 616e 6420 7468 6520 reached and the \n+00117610: 6c61 7374 2063 6875 6e6b 2069 7320 746f last chunk is to\n+00117620: 2062 6520 7365 6e64 2e20 5468 6174 2069 be send. That i\n+00117630: 732c 203c 636f 6465 3e3c 6120 636c 6173 s, soap::f\n+001176d0: 6469 6d65 7265 6164 3c2f 613e 3c2f 636f dimeread should retur\n+001176f0: 6e20 7468 6520 7661 6c75 6520 6f66 2074 n the value of t\n+00117700: 6865 206c 6173 7420 3c63 6f64 653e 6c65 he last le\n+00117710: 6e3c 2f63 6f64 653e 2070 6172 616d 6574 n paramet\n+00117720: 6572 2061 6e64 2066 696c 6c20 7468 6520 er and fill the \n+00117730: 656e 7469 7265 2062 7566 6665 7220 3c63 entire buffer buf f\n+00117750: 6f72 2061 6c6c 2063 6875 6e6b 7320 6578 or all chunks ex\n+00117760: 6365 7074 2074 6865 206c 6173 742e 2046 cept the last. F\n+00117770: 6f72 2074 6865 206c 6173 7420 6974 2072 or the last it r\n+00117780: 6574 7572 6e73 2030 2e3c 2f70 3e0a 3c70 eturns 0.

    .You can also us\n+001177a0: 6520 7468 6520 3c63 6f64 653e 2353 4f41 e the #SOA\n+001177b0: 505f 494f 5f53 544f 5245 3c2f 636f 6465 P_IO_STORE flag, but that\n+001177d0: 2063 616e 6365 6c73 2074 6865 2062 656e cancels the ben\n+001177e0: 6566 6974 7320 6f66 2073 7472 6561 6d69 efits of streami\n+001177f0: 6e67 2044 494d 452e 3c2f 703e 0a3c 703e ng DIME.

    .

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

    .WSDL\n+00117860: 2062 696e 6469 6e67 7320 666f 7220 4449 bindings for DI\n+00117870: 4d45 2061 7474 6163 686d 656e 7473 3c2f ME attachments.

    The wsdl2\n+00117890: 6820 746f 6f6c 2072 6563 6f67 6e69 7a65 h tool recognize\n+001178a0: 7320 4449 4d45 2061 7474 6163 686d 656e s DIME attachmen\n+001178b0: 7473 2061 6e64 2070 726f 6475 6365 7320 ts and produces \n+001178c0: 616e 2061 6e6e 6f74 6174 6564 2068 6561 an annotated hea\n+001178d0: 6465 7220 6669 6c65 2e20 426f 7468 206f der file. Both o\n+001178e0: 7065 6e20 616e 6420 636c 6f73 6564 206c pen and closed l\n+001178f0: 6179 6f75 7473 2061 7265 2073 7570 706f ayouts are suppo\n+00117900: 7274 6564 2066 6f72 2074 7261 6e73 6d69 rted for transmi\n+00117910: 7474 696e 6720 4449 4d45 2061 7474 6163 tting DIME attac\n+00117920: 686d 656e 7473 2e20 466f 7220 636c 6f73 hments. For clos\n+00117930: 6564 2066 6f72 6d61 7473 2c20 616c 6c20 ed formats, all \n+00117940: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments\n+00117950: 206d 7573 7420 6265 2072 6566 6572 656e must be referen\n+00117960: 6365 6420 6672 6f6d 2074 6865 2053 4f41 ced from the SOA\n+00117970: 5020 6d65 7373 6167 652c 2065 2e67 2e20 P message, e.g. \n+00117980: 7573 696e 6720 6872 6566 7320 7769 7468 using hrefs with\n+00117990: 2053 4f41 5020 656e 636f 6469 6e67 2061 SOAP encoding a\n+001179a0: 6e64 2075 7369 6e67 2074 6865 2061 7070 nd using the app\n+001179b0: 6c69 6361 7469 6f6e 2d73 7065 6369 6669 lication-specifi\n+001179c0: 6320 7265 6665 7265 6e63 6520 6174 7472 c reference attr\n+001179d0: 6962 7574 6520 696e 636c 7564 6564 2069 ibute included i\n+001179e0: 6e20 7468 6520 3c63 6f64 653e 3c61 2063 n the xsd__b\n+00117a60: 6173 6536 3442 696e 6172 793c 2f61 3e3c ase64Binary<\n+00117a70: 2f63 6f64 653e 2073 7472 7563 7420 6f72 /code> struct or\n+00117a80: 2063 6c61 7373 2066 6f72 2064 6f63 756d class for docum\n+00117a90: 656e 742f 6c69 7465 7261 6c20 6d65 7373 ent/literal mess\n+00117aa0: 6167 696e 672e 3c2f 703e 0a3c 703e 5468 aging.

    .

    Th\n+00117ab0: 6520 736f 6170 6370 7032 2074 6f6f 6c20 e soapcpp2 tool \n+00117ac0: 646f 6573 206e 6f74 2070 726f 6475 6365 does not produce\n+00117ad0: 2061 2057 5344 4c20 7769 7468 2044 494d a WSDL with DIM\n+00117ae0: 4520 6578 7465 6e73 696f 6e73 2e20 4449 E extensions. DI\n+00117af0: 4d45 2069 7320 616e 206f 6c64 6572 2062 ME is an older b\n+00117b00: 696e 6172 7920 666f 726d 6174 2074 6861 inary format tha\n+00117b10: 7420 6861 7320 6e6f 2057 5344 4c20 7072 t has no WSDL pr\n+00117b20: 6f74 6f63 6f6c 2073 7570 706f 7274 2c20 otocol support, \n+00117b30: 756e 6c69 6b65 204d 494d 4520 616e 6420 unlike MIME and \n+00117b40: 4d54 4f4d 2e3c 2f70 3e0a 3c70 3ef0 9f94 MTOM.

    .

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

    .\n+00117b80: 3c68 313e 3c61 2063 6c61 7373 3d22 616e

    \n+00117ba0: 3c2f 613e 0a4d 544f 4d20 6174 7461 6368 .MTOM attach\n+00117bb0: 6d65 6e74 733c 2f68 313e 0a3c 703e 4d54 ments

    .

    MT\n+00117bc0: 4f4d 2028 4d65 7373 6167 6520 5472 616e OM (Message Tran\n+00117bd0: 736d 6973 7369 6f6e 204f 7074 696d 697a smission Optimiz\n+00117be0: 6174 696f 6e20 4d65 6368 616e 6973 6d29 ation Mechanism)\n+00117bf0: 2069 7320 6120 7265 6c61 7469 7665 6c79 is a relatively\n+00117c00: 206e 6577 2066 6f72 6d61 7420 666f 7220 new format for \n+00117c10: 7472 616e 736d 6974 7469 6e67 2061 7474 transmitting att\n+00117c20: 6163 686d 656e 7473 2077 6974 6820 534f achments with SO\n+00117c30: 4150 206d 6573 7361 6765 7320 2873 6565 AP messages (see\n+00117c40: 203c 6120 6872 6566 3d22 6874 7470 3a2f http\n+00117c70: 3a2f 2f77 7777 2e77 332e 6f72 672f 5452 ://www.w3.org/TR\n+00117c80: 2f73 6f61 7031 322d 6d74 6f6d 3c2f 613e /soap12-mtom\n+00117c90: 292e 204d 544f 4d20 6174 7461 6368 6d65 ). MTOM attachme\n+00117ca0: 6e74 7320 6172 6520 6573 7365 6e74 6961 nts are essentia\n+00117cb0: 6c6c 7920 4d49 4d45 2061 7474 6163 686d lly MIME attachm\n+00117cc0: 656e 7473 2077 6974 6820 7374 616e 6461 ents with standa\n+00117cd0: 7264 697a 6564 206d 6563 6861 6e69 736d rdized mechanism\n+00117ce0: 7320 666f 7220 6372 6f73 7320 7265 6665 s for cross refe\n+00117cf0: 7265 6e63 696e 6720 6174 7461 6368 6d65 rencing attachme\n+00117d00: 6e74 7320 6672 6f6d 2074 6865 2053 4f41 nts from the SOA\n+00117d10: 5020 626f 6479 2c20 7768 6963 6820 6973 P body, which is\n+00117d20: 2061 6273 656e 7420 696e 2028 706c 6169 absent in (plai\n+00117d30: 6e29 204d 494d 4520 6174 7461 6368 6d65 n) MIME attachme\n+00117d40: 6e74 7320 616e 6420 6f70 7469 6f6e 616c nts and optional\n+00117d50: 2077 6974 6820 4449 4d45 2061 7474 6163 with DIME attac\n+00117d60: 686d 656e 7473 2e3c 2f70 3e0a 3c70 3e55 hments.

    .

    U\n+00117d70: 6e6c 696b 6520 7468 6520 6e61 6d65 2073 nlike the name s\n+00117d80: 7567 6765 7374 732c 2074 6865 2073 7065 uggests, the spe\n+00117d90: 6564 2062 7920 7768 6963 6820 6174 7461 ed by which atta\n+00117da0: 6368 6564 2064 6174 6120 6973 2074 7261 ched data is tra\n+00117db0: 6e73 6d69 7474 6564 2069 7320 6e6f 7420 nsmitted is not \n+00117dc0: 696e 6372 6561 7365 6420 636f 6d70 6172 increased compar\n+00117dd0: 6564 2074 6f20 4d49 4d45 2c20 4449 4d45 ed to MIME, DIME\n+00117de0: 2c20 6f72 2065 7665 6e20 584d 4c20 656e , or even XML en\n+00117df0: 636f 6465 6420 6261 7365 3634 2064 6174 coded base64 dat\n+00117e00: 612c 2062 6563 6175 7365 2074 6865 2070 a, because the p\n+00117e10: 6572 666f 726d 616e 6365 2064 6966 6665 erformance diffe\n+00117e20: 7265 6e63 6573 2077 6865 6e20 7573 696e rences when usin\n+00117e30: 6720 6753 4f41 5020 7769 6c6c 2062 6520 g gSOAP will be \n+00117e40: 736d 616c 6c2e 2054 6865 2061 6476 616e small. The advan\n+00117e50: 7461 6765 206f 6620 7468 6520 666f 726d tage of the form\n+00117e60: 6174 2069 7320 7468 6520 7374 616e 6461 at is the standa\n+00117e70: 7264 697a 6564 2061 7474 6163 686d 656e rdized attachmen\n+00117e80: 7420 7265 6665 7265 6e63 6520 6d65 6368 t reference mech\n+00117e90: 616e 6973 6d2c 2077 6869 6368 2073 686f anism, which sho\n+00117ea0: 756c 6420 696d 7072 6f76 6520 696e 7465 uld improve inte\n+00117eb0: 726f 7065 7261 6269 6c69 7479 2e3c 2f70 roperability..

    The MTOM sp\n+00117ed0: 6563 6966 6963 6174 696f 6e20 6d61 6e64 ecification mand\n+00117ee0: 6174 6573 2053 4f41 5020 312e 3220 616e ates SOAP 1.2 an\n+00117ef0: 6420 7468 6520 7573 6520 6f66 2074 6865 d the use of the\n+00117f00: 2058 4f50 206e 616d 6573 7061 6365 2e20 XOP namespace. \n+00117f10: 5468 6520 584f 5020 496e 636c 7564 6520 The XOP Include \n+00117f20: 656c 656d 656e 7420 3c65 6d3e 3c63 6f64 element xop:Include is def\n+00117f50: 696e 6564 2069 6e20 7468 6520 696e 7465 ined in the inte\n+00117f60: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+00117f70: 6520 6173 2061 203c 636f 6465 3e3c 6120 e as a _xop__Include\n+00117ff0: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n+00118000: 6374 206f 7220 636c 6173 732c 2074 6861 ct or class, tha\n+00118010: 7420 6973 2075 7365 6420 746f 2072 6566 t is used to ref\n+00118020: 6572 656e 6365 2061 7474 6163 686d 656e erence attachmen\n+00118030: 7428 7329 2066 726f 6d20 7468 6520 534f t(s) from the SO\n+00118040: 4150 206d 6573 7361 6765 2062 6f64 792e AP message body.\n+00118050: 3c2f 703e 0a3c 703e 4265 6361 7573 6520

    .

    Because \n+00118060: 7265 6665 7265 6e63 6573 2066 726f 6d20 references from \n+00118070: 7769 7468 696e 2074 6865 2053 4f41 5020 within the SOAP \n+00118080: 6d65 7373 6167 6520 626f 6479 2074 6f20 message body to \n+00118090: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are \n+001180a0: 6d61 6e64 6174 6f72 7920 7769 7468 204d mandatory with M\n+001180b0: 544f 4d2c 2074 6865 2069 6d70 6c65 6d65 TOM, the impleme\n+001180c0: 6e74 6174 696f 6e20 6f66 2074 6865 2073 ntation of the s\n+001180d0: 6572 6961 6c69 7a61 7469 6f6e 2061 6e64 erialization and\n+001180e0: 2064 6573 6572 6961 6c69 7a61 7469 6f6e deserialization\n+001180f0: 206f 6620 4d54 4f4d 204d 494d 4520 6174 of MTOM MIME at\n+00118100: 7461 6368 6d65 6e74 7320 7573 6573 2074 tachments uses t\n+00118110: 6865 2065 7874 656e 6465 6420 6269 6e61 he extended bina\n+00118120: 7279 2074 7970 6520 636f 6d70 6172 6162 ry type comparab\n+00118130: 6c65 2074 6f20 4449 4d45 2073 7570 706f le to DIME suppo\n+00118140: 7274 2e20 5468 6973 2062 696e 6172 7920 rt. This binary \n+00118150: 7479 7065 2069 7320 7072 6564 6566 696e type is predefin\n+00118160: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the import/xop.h\n+00118180: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+00118190: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+001181c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001181d0: 656e 7422 3e2f 2f67 736f 6170 2078 6f70 ent\">//gsoap xop\n+001181e0: 2073 6368 656d 6120 696d 706f 7274 3a20 schema import: \n+001181f0: 6874 7470 3a2f 2f77 7777 2e77 332e 6f72 http://www.w3.or\n+00118200: 672f 3230 3034 2f30 382f 786f 702f 696e g/2004/08/xop/in\n+00118210: 636c 7564 6520 3c2f 7370 616e 3e3c 2f64 clude .
    stru\n+00118250: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct _x\n+00118290: 6f70 5f5f 496e 636c 7564 653c 2f61 3e20 op__Include \n+001182a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+001182c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    unsigned\n+00118300: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+00118320: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *__\n+00118380: 7074 723c 2f61 3e3b 203c 2f64 6976 3e0a ptr;
    .\n+00118390: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+001183c0: 696e 743c 2f73 7061 6e3e 203c 6120 636c int __size; .
    char \n+00118470: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *id; <\n+001184d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *type;
    .\n+00118620: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .<\n+00118650: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00118660: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef struct\n+00118690: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 _xop\n+001186d0: 5f5f 496e 636c 7564 653c 2f61 3e20 3c61 __Include _xop__Include<\n+00118720: 2f61 3e3b 3c2f 6469 763e 0a3c 6469 7620 /a>;
    .
    <\n+00118760: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00118770: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">_xop__\n+001187a0: 496e 636c 7564 653c 2f61 3e3c 2f64 6976 Include
    XOP include \n+001187d0: 7374 7275 6374 7572 6520 7769 7468 2061 structure with a\n+001187e0: 7474 6163 686d 656e 7420 6461 7461 2e3c ttachment data.<\n+001187f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00118810: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00118820: 6170 322e 683a 3938 3833 3c2f 6469 763e ap2.h:9883
    \n+00118830: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .M\n+00118940: 494d 4520 7479 7065 206f 6620 7468 6520 IME type of the \n+00118950: 6461 7461 2e3c 2f64 6976 3e3c 6469 7620 data.
    .
    c\n+00118a80: 6861 7220 2a20 6964 3c2f 6469 763e 3c64 har * id
    NULL to generat\n+00118ab0: 6520 616e 2069 6420 6f72 2061 7373 6967 e an id or assig\n+00118ac0: 6e20 7468 6973 206d 656d 6265 7220 7661 n this member va\n+00118ad0: 7269 6162 6c65 2061 2075 6e69 7175 6520 riable a unique \n+00118ae0: 5555 4944 2e3c 2f64 6976 3e3c 6469 7620 UUID.
    Definition:\n+00118b10: 2073 7464 736f 6170 322e 683a 3938 3836 stdsoap2.h:9886\n+00118b20: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469

    .\n+00118c00: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    char * optio\n+00118c20: 6e73 3c2f 6469 763e 3c64 6976 2063 6c61 ns
    descr\n+00118c40: 6970 7469 6f6e 206f 6620 7468 6520 4d49 iption of the MI\n+00118c50: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n+00118c60: 6e74 206f 7220 4e55 4c4c 3c2f 6469 763e nt or NULL
    \n+00118c70: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00118c90: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00118ca0: 3a39 3838 383c 2f64 6976 3e3c 2f64 6976 :9888
    .
    _xop__Inclu\n+00118d70: 6465 3a3a 5f5f 7369 7a65 3c2f 613e 3c2f de::__size
    int __si\n+00118da0: 7a65 3c2f 6469 763e 3c64 6976 2063 6c61 ze
    size \n+00118dc0: 6f66 2074 6865 2062 696e 6172 7920 6461 of the binary da\n+00118dd0: 7461 3c2f 6469 763e 3c64 6976 2063 6c61 ta
    De\n+00118df0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00118e00: 6473 6f61 7032 2e68 3a39 3838 353c 2f64 dsoap2.h:9885
    .
    \n+00118e70: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    u\n+00118f00: 6e73 6967 6e65 6420 6368 6172 202a 205f nsigned char * _\n+00118f10: 5f70 7472 3c2f 6469 763e 3c64 6976 2063 _ptr
    poi\n+00118f30: 6e74 6572 2074 6f20 6269 6e61 7279 2064 nter to binary d\n+00118f40: 6174 613c 2f64 6976 3e3c 6469 7620 636c ata
    D\n+00118f60: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00118f70: 7464 736f 6170 322e 683a 3938 3834 3c2f tdsoap2.h:9884
    .

    When an \n+00119940: 696e 7374 616e 6365 206f 6620 3c63 6f64 instance of x__myDataType<\n+00119960: 2f63 6f64 653e 2069 7320 7365 7269 616c /code> is serial\n+00119970: 697a 6564 2061 6e64 2065 6974 6865 7220 ized and either \n+00119980: 6f72 2062 6f74 6820 7468 6520 3c63 6f64 or both the id and \n+001199a0: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type members are no\n+001199c0: 6e2d 4e55 4c4c 2c20 7468 6520 6461 7461 n-NULL, the data\n+001199d0: 2069 7320 7472 616e 736d 6974 7465 6420 is transmitted \n+001199e0: 6173 204d 544f 4d20 4d49 4d45 2061 7474 as MTOM MIME att\n+001199f0: 6163 686d 656e 7420 6966 2074 6865 203c achment if the <\n+00119a00: 636f 6465 3e23 534f 4150 5f45 4e43 5f4d code>#SOAP_ENC_M\n+00119a10: 544f 4d3c 2f63 6f64 653e 2066 6c61 6720 TOM flag \n+00119a20: 6973 2073 6574 2069 6e20 7468 6520 6753 is set in the gS\n+00119a30: 4f41 5027 7320 736f 6170 2073 7472 7563 OAP's soap struc\n+00119a40: 7420 636f 6e74 6578 743a 3c2f 703e 0a3c t context:

    .<\n+00119a50: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00119a60: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+00119a90: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new1\n+00119b60: 283c 6120 636c 6173 733d 2263 6f64 6522 (SOAP_ENC_MTO\n+00119bc0: 4d3c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 M);
    .
    SOAP_\n+00119c80: 454e 435f 4d54 4f4d 3c2f 613e 3c2f 6469 ENC_MTOM
    #define SO\n+00119cb0: 4150 5f45 4e43 5f4d 544f 4d3c 2f64 6976 AP_ENC_MTOM
    soap_mode EN\n+00119ce0: 4320 6f75 7470 7574 2066 6c61 6720 7661 C output flag va\n+00119cf0: 6c75 6520 746f 2065 6e61 626c 6520 4d54 lue to enable MT\n+00119d00: 4f4d 2058 4f50 2061 7474 6163 686d 656e OM XOP attachmen\n+00119d10: 7473 2069 6e20 6d65 7373 6167 6573 2074 ts in messages t\n+00119d20: 6f20 6265 2073 656e 742c 2e2e 2e3c 2f64 o be sent,...
    Definit\n+00119d50: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00119d60: 322e 683a 3137 3736 3c2f 6469 763e 3c2f 2.h:1776
    .

    W\n+00119d90: 6974 686f 7574 2074 6869 7320 666c 6167 ithout this flag\n+00119da0: 2c20 7468 6520 6174 7461 6368 6d65 6e74 , the attachment\n+00119db0: 7320 7769 6c6c 2062 6520 7472 616e 736d s will be transm\n+00119dc0: 6974 7465 6420 696e 2044 494d 4520 666f itted in DIME fo\n+00119dd0: 726d 6174 2c20 7768 6963 6820 6973 206e rmat, which is n\n+00119de0: 6f74 2077 6861 7420 7765 2077 616e 742e ot what we want.\n+00119df0: 2049 6620 796f 7572 2063 7572 7265 6e74 If your current\n+00119e00: 2063 6c69 656e 7473 2061 6e64 2073 6572 clients and ser\n+00119e10: 7669 6365 7320 6172 6520 6261 7365 6420 vices are based \n+00119e20: 6f6e 206e 6f6e 2d73 7472 6561 6d69 6e67 on non-streaming\n+00119e30: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+00119e40: 7320 7573 696e 6720 7468 6520 534f 4150 s using the SOAP\n+00119e50: 2062 6f64 7920 7265 6665 7265 6e63 6520 body reference \n+00119e60: 6d65 6368 616e 6973 6d20 2874 6875 732c mechanism (thus,\n+00119e70: 2077 6974 686f 7574 2075 7369 6e67 2074 without using t\n+00119e80: 6865 203c 636f 6465 3e3c 6120 636c 6173 he \n+00119f10: 736f 6170 5f73 6574 5f64 696d 655f 6174 soap_set_dime_at\n+00119f20: 7461 6368 6d65 6e74 3c2f 613e 3c2f 636f tachment function) or\n+00119f40: 2070 6c61 696e 2062 6173 6536 3420 6269 plain base64 bi\n+00119f50: 6e61 7279 2058 4d4c 2064 6174 6120 656c nary XML data el\n+00119f60: 656d 656e 7473 2c20 6974 2069 7320 7665 ements, it is ve\n+00119f70: 7279 2065 6173 7920 746f 2061 646f 7074 ry easy to adopt\n+00119f80: 204d 544f 4d20 6279 2072 656e 616d 696e MTOM by renamin\n+00119f90: 6720 7468 6520 6269 6e61 7279 2074 7970 g the binary typ\n+00119fa0: 6573 2074 6f20 3c63 6f64 653e 786f 705f es to xop_\n+00119fb0: 5f49 6e63 6c75 6465 3c2f 636f 6465 3e20 _Include \n+00119fc0: 616e 6420 7573 696e 6720 7468 6520 3c63 and using the #SOAP_ENC_MT\n+00119fe0: 4f4d 3c2f 636f 6465 3e20 666c 6167 2077 OM flag w\n+00119ff0: 6974 6820 7468 6520 534f 4150 2031 2e32 ith the SOAP 1.2\n+0011a000: 206e 616d 6573 7061 6365 2e3c 2f70 3e0a namespace.

    .\n+0011a010: 3c70 3e53 6565 2061 6c73 6f20 4150 4920

    See also API \n+0011a020: 646f 6375 6d65 6e74 6174 696f 6e20 4d6f documentation Mo\n+0011a030: 6475 6c65 203c 6120 636c 6173 733d 2265 dule MIME attachmen\n+0011a070: 7420 6675 6e63 7469 6f6e 733c 2f61 3e2e t functions.\n+0011a080: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+0011a0c0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0011a0d0: 2069 643d 224d 494d 4557 5344 4c22 3e3c id=\"MIMEWSDL\"><\n+0011a0e0: 2f61 3e0a 4765 6e65 7261 7469 6e67 204d /a>.Generating M\n+0011a0f0: 756c 7469 7061 7274 5265 6c61 7465 6420 ultipartRelated \n+0011a100: 4d49 4d45 2061 7474 6163 686d 656e 7420 MIME attachment \n+0011a110: 6269 6e64 696e 6773 2069 6e20 5753 444c bindings in WSDL\n+0011a120: 3c2f 6832 3e0a 3c70 3e54 6f20 6765 6e65

    .

    To gene\n+0011a130: 7261 7465 206d 756c 7469 7061 7274 5265 rate multipartRe\n+0011a140: 6c61 7465 6420 6269 6e64 696e 6773 2069 lated bindings i\n+0011a150: 6e20 7468 6520 5753 444c 2066 696c 6520 n the WSDL file \n+0011a160: 696e 6469 6361 7469 6e67 2074 6865 2075 indicating the u\n+0011a170: 7365 206f 6620 4d49 4d45 2061 7474 6163 se of MIME attac\n+0011a180: 686d 656e 7473 2c20 7573 653a 3c2f 703e hments, use:

    \n+0011a190: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    /\n+0011a1d0: 2f67 736f 6170 2026 6c74 3b70 7265 6669 /gsoap <prefi\n+0011a1e0: 7826 6774 3b20 7365 7276 6963 6520 6d65 x> service me\n+0011a1f0: 7468 6f64 2d6d 696d 652d 7479 7065 3a20 thod-mime-type: \n+0011a200: 2e2e 2e3c 2f73 7061 6e3e 3c2f 6469 763e ...
    \n+0011a210: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    This \n+0011a230: 6469 7265 6374 6976 6520 6469 7265 6374 directive direct\n+0011a240: 6976 6520 6361 6e20 6265 2072 6570 6561 ive can be repea\n+0011a250: 7465 6420 666f 7220 6561 6368 2061 7474 ted for each att\n+0011a260: 6163 686d 656e 7420 796f 7520 7761 6e74 achment you want\n+0011a270: 2074 6f20 6173 736f 6369 6174 6520 7769 to associate wi\n+0011a280: 7468 2061 206d 6574 686f 6427 7320 7265 th a method's re\n+0011a290: 7175 6573 7420 616e 6420 7265 7370 6f6e quest and respon\n+0011a2a0: 7365 206d 6573 7361 6765 2e20 7365 6520 se message. see \n+0011a2b0: 616c 736f 2053 6563 7469 6f6e 203c 6120 also Section Directiv\n+0011a2f0: 6573 3c2f 613e 202e 3c2f 703e 0a3c 703e es .

    .

    \n+0011a300: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

    \n+0011a310: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #import &quo\n+0011a360: 743b 696d 706f 7274 2f78 6f70 2e68 2671 t;import/xop.h&q\n+0011a370: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; .
    \n+0011a3b0: 2369 6d70 6f72 7420 2671 756f 743b 696d #import "im\n+0011a3c0: 706f 7274 2f78 6d69 6d65 352e 6826 7175 port/xmime5.h&qu\n+0011a3d0: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .
    #\n+0011a410: 696d 706f 7274 2026 7175 6f74 3b69 6d70 import "imp\n+0011a420: 6f72 742f 736f 6170 3132 2e68 2671 756f ort/soap12.h&quo\n+0011a430: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    \n+0011a440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    //gsoap x sch\n+0011a490: 656d 6120 6e61 6d65 7370 6163 653a 2068 ema namespace: h\n+0011a4a0: 7474 703a 2f2f 6d79 2e66 6972 7374 2e6d ttp://my.first.m\n+0011a4b0: 746f 6d2e 6e65 7420 3c2f 7370 616e 3e3c tom.net <\n+0011a4c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+0011a4f0: 7275 6374 203c 2f73 7061 6e3e 785f 5f6d ruct x__m\n+0011a500: 7944 6174 6120 3c2f 6469 763e 0a3c 6469 yData
    .{\n+0011a520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    _xop__Include xop__Include;\n+0011a590: 203c 7370 616e 2063 6c61 7373 3d22 636f // attach\n+0011a5b0: 6d65 6e74 203c 2f73 7061 6e3e 3c2f 6469 ment .
    @ char *\n+0011a600: 786d 696d 6535 5f5f 636f 6e74 656e 7454 xmime5__contentT\n+0011a610: 7970 653b 2020 3c73 7061 6e20 636c 6173 ype; // a\n+0011a630: 6e64 2069 7473 2063 6f6e 7465 6e74 5479 nd its contentTy\n+0011a640: 7065 203c 2f73 7061 6e3e 3c2f 6469 763e pe
    \n+0011a650: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .<\n+0011a680: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0011a690: 656e 7422 3e2f 2f67 736f 6170 2078 2073 ent\">//gsoap x s\n+0011a6a0: 6572 7669 6365 206d 6574 686f 642d 6d69 ervice method-mi\n+0011a6b0: 6d65 2d74 7970 653a 206d 794d 544f 4d74 me-type: myMTOMt\n+0011a6c0: 6573 7420 7465 7874 2f78 6d6c 203c 2f73 est text/xml
    .
    int x__myMTOMtest(\n+0011a720: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct x__myData *i\n+0011a750: 6e2c 203c 7370 616e 2063 6c61 7373 3d22 n, struct<\n+0011a770: 2f73 7061 6e3e 2078 5f5f 6d79 4461 7461 /span> x__myData\n+0011a780: 202a 6f75 7429 3b3c 2f64 6976 3e0a 3c2f *out);
    .

    The //gsoap x serv\n+0011a7c0: 6963 6520 6d65 7468 6f64 2d6d 696d 652d ice method-mime-\n+0011a7d0: 7479 7065 3a3c 2f63 6f64 653e 2064 6972 type: dir\n+0011a7e0: 6563 7469 7665 2069 6e64 6963 6174 6573 ective indicates\n+0011a7f0: 2074 6861 7420 7468 6973 206f 7065 7261 that this opera\n+0011a800: 7469 6f6e 2061 6363 6570 7473 203c 656d tion accepts text/xml<\n+0011a820: 2f63 6f64 653e 3c2f 656d 3e20 4d49 4d45 /code> MIME\n+0011a830: 2061 7474 6163 686d 656e 7473 2e20 5365 attachments. Se\n+0011a840: 6520 7468 6520 534f 4150 2d77 6974 682d e the SOAP-with-\n+0011a850: 4174 7461 6368 6d65 6e74 2073 7065 6369 Attachment speci\n+0011a860: 6669 6361 7469 6f6e 2066 6f72 2074 6865 fication for the\n+0011a870: 204d 494d 4520 7479 7065 7320 746f 2075 MIME types to u\n+0011a880: 7365 2028 666f 7220 6578 616d 706c 652c se (for example,\n+0011a890: 203c 636f 6465 3e2a 2f2a 3c2f 636f 6465 */* is a wildcard)\n+0011a8b0: 2e20 4966 2074 6865 206f 7065 7261 7469 . If the operati\n+0011a8c0: 6f6e 2068 6173 206d 6f72 6520 7468 616e on has more than\n+0011a8d0: 206f 6e65 2061 7474 6163 686d 656e 742c one attachment,\n+0011a8e0: 206a 7573 7420 7265 7065 6174 2074 6869 just repeat thi\n+0011a8f0: 7320 6469 7265 6374 6976 6520 666f 7220 s directive for \n+0011a900: 6561 6368 2061 7474 6163 686d 656e 7420 each attachment \n+0011a910: 796f 7520 7761 6e74 2074 6f20 6269 6e64 you want to bind\n+0011a920: 2074 6f20 7468 6520 6f70 6572 6174 696f to the operatio\n+0011a930: 6e2e 3c2f 703e 0a3c 703e 546f 2062 696e n.

    .

    To bin\n+0011a940: 6420 6174 7461 6368 6d65 6e74 7320 6f6e d attachments on\n+0011a950: 6c79 2074 6f20 7468 6520 7265 7175 6573 ly to the reques\n+0011a960: 7420 6d65 7373 6167 6520 6f66 2061 6e20 t message of an \n+0011a970: 6f70 6572 6174 696f 6e2c 2075 7365 3c2f operation, use.

    //gsoap <pre\n+0011a9d0: 6669 7826 6774 3b20 7365 7276 6963 6520 fix> service \n+0011a9e0: 6d65 7468 6f64 2d69 6e70 7574 2d6d 696d method-input-mim\n+0011a9f0: 652d 7479 7065 3a20 2e2e 2e3c 2f73 7061 e-type: ...
    .
    <\n+0011aa10: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0011aa20: 3c70 3e53 696d 696c 6172 6c79 2c20 746f

    Similarly, to\n+0011aa30: 2062 696e 6420 6174 7461 6368 6d65 6e74 bind attachment\n+0011aa40: 7320 6f6e 6c79 2074 6f20 7468 6520 7265 s only to the re\n+0011aa50: 7370 6f6e 7365 206d 6573 7361 6765 206f sponse message o\n+0011aa60: 6620 616e 206f 7065 7261 7469 6f6e 2c20 f an operation, \n+0011aa70: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n+0011aa90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011aaa0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap &\n+0011aac0: 6c74 3b70 7265 6669 7826 6774 3b20 7365 lt;prefix> se\n+0011aad0: 7276 6963 6520 6d65 7468 6f64 2d6f 7574 rvice method-out\n+0011aae0: 7075 742d 6d69 6d65 2d74 7970 653a 202e put-mime-type: .\n+0011aaf0: 2e2e 3c2f 7370 616e 3e3c 2f64 6976 3e0a ..
    .\n+0011ab00: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ws\n+0011ab20: 646c 3268 2074 6f6f 6c20 7265 636f 676e dl2h tool recogn\n+0011ab30: 697a 6573 204d 494d 4520 6174 7461 6368 izes MIME attach\n+0011ab40: 6d65 6e74 7320 616e 6420 7072 6f64 7563 ments and produc\n+0011ab50: 6573 2061 6e20 616e 6e6f 7461 7465 6420 es an annotated \n+0011ab60: 6865 6164 6572 2066 696c 652e 3c2f 703e header file.

    \n+0011ab70: 0a3c 703e 596f 7520 6361 6e20 7265 7065 .

    You can repe\n+0011ab80: 6174 2074 6865 7365 2064 6972 6563 7469 at these directi\n+0011ab90: 7665 7320 666f 7220 616c 6c20 6d75 6c74 ves for all mult\n+0011aba0: 6970 6172 7452 656c 6174 6564 204d 494d ipartRelated MIM\n+0011abb0: 4520 6174 7461 6368 6d65 6e74 7320 796f E attachments yo\n+0011abc0: 7520 7761 6e74 2074 6f20 6173 736f 6369 u want to associ\n+0011abd0: 6174 6520 7769 7468 2074 6865 2073 6572 ate with the ser\n+0011abe0: 7669 6365 206f 7065 7261 7469 6f6e 2069 vice operation i\n+0011abf0: 6e70 7574 2061 6e64 206f 7574 7075 742e nput and output.\n+0011ac00: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+0011ac40: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0011ac50: 2069 643d 224d 544f 4d73 656e 6469 6e67 id=\"MTOMsending\n+0011ac60: 7265 6365 6976 696e 6722 3e3c 2f61 3e0a receiving\">.\n+0011ac70: 5365 6e64 696e 6720 616e 6420 7265 6365 Sending and rece\n+0011ac80: 6976 696e 6720 4d54 4f4d 2061 7474 6163 iving MTOM attac\n+0011ac90: 686d 656e 7473 3c2f 6832 3e0a 3c70 3e41 hments

    .

    A\n+0011aca0: 2072 6563 6569 7665 7220 6d75 7374 2062 receiver must b\n+0011acb0: 6520 696e 666f 726d 6564 2074 6f20 7265 e informed to re\n+0011acc0: 636f 676e 697a 6520 4d54 4f4d 2061 7474 cognize MTOM att\n+0011acd0: 6163 686d 656e 7473 2062 7920 7365 7474 achments by sett\n+0011ace0: 696e 6720 7468 6520 3c63 6f64 653e 2353 ing the #S\n+0011acf0: 4f41 505f 454e 435f 4d54 4f4d 3c2f 636f OAP_ENC_MTOM flag of the \n+0011ad10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context. Other\n+0011ad80: 7769 7365 2c20 7468 6520 7265 6775 6c61 wise, the regula\n+0011ad90: 7220 4d49 4d45 2061 7474 6163 686d 656e r MIME attachmen\n+0011ada0: 7420 6d65 6368 616e 6973 6d20 2853 7741 t mechanism (SwA\n+0011adb0: 2920 7769 6c6c 2062 6520 7573 6564 2074 ) will be used t\n+0011adc0: 6f20 7374 6f72 6520 6174 7461 6368 6d65 o store attachme\n+0011add0: 6e74 732e 3c2f 703e 0a3c 703e 5768 656e nts.

    .

    When\n+0011ade0: 2075 7369 6e67 2077 7364 6c32 6820 746f using wsdl2h to\n+0011adf0: 2062 7569 6c64 2063 6c69 656e 7473 2061 build clients a\n+0011ae00: 6e64 2f6f 7220 7365 7276 6963 6573 2c20 nd/or services, \n+0011ae10: 796f 7520 7368 6f75 6c64 2075 7365 2074 you should use t\n+0011ae20: 6865 203c 656d 3e3c 636f 6465 3e74 7970 he typ\n+0011ae30: 656d 6170 2e64 6174 3c2f 636f 6465 3e3c emap.dat<\n+0011ae40: 2f65 6d3e 2066 696c 6520 696e 636c 7564 /em> file includ\n+0011ae50: 6564 2069 6e20 7468 6520 6753 4f41 5020 ed in the gSOAP \n+0011ae60: 736f 7572 6365 2063 6f64 6520 7061 636b source code pack\n+0011ae70: 6167 652e 2054 6865 203c 656d 3e3c 636f age. The typemap.dat file \n+0011aea0: 6465 6669 6e65 7320 7468 6520 584f 5020 defines the XOP \n+0011aeb0: 6e61 6d65 7370 6163 6520 616e 6420 584d namespace and XM\n+0011aec0: 4c20 4d49 4d45 206e 616d 6573 7061 6365 L MIME namespace\n+0011aed0: 7320 6173 2069 6d70 6f72 7465 6420 6e61 s as imported na\n+0011aee0: 6d65 7370 6163 6573 3a20 3c2f 703e 3c70 mespaces:

    xop = <\n+0011af10: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o\n+0011af20: 7267 2f32 3030 342f 3038 2f78 6f70 2f69 rg/2004/08/xop/i\n+0011af30: 6e63 6c75 6465 2667 743b 200a 786d 696d nclude> .xmim\n+0011af40: 6535 203d 2026 6c74 3b68 7474 703a 2f2f e5 = <http://\n+0011af50: 7777 772e 7733 2e6f 7267 2f32 3030 352f www.w3.org/2005/\n+0011af60: 3035 2f78 6d6c 6d69 6d65 2667 743b 200a 05/xmlmime> .\n+0011af70: 786d 696d 6534 203d 2026 6c74 3b68 7474 xmime4 = <htt\n+0011af80: 703a 2f2f 7777 772e 7733 2e6f 7267 2f32 p://www.w3.org/2\n+0011af90: 3030 342f 3131 2f78 6d6c 6d69 6d65 2667 004/11/xmlmime&g\n+0011afa0: 743b 0a3c 2f70 7265 3e3c 703e 2054 6865 t;.

    The\n+0011afb0: 2077 7364 6c32 6820 746f 6f6c 2075 7365 wsdl2h tool use\n+0011afc0: 7320 7468 6520 3c65 6d3e 3c63 6f64 653e s the \n+0011afd0: 7479 7065 6d61 702e 6461 743c 2f63 6f64 typemap.dat file to \n+0011aff0: 636f 6e76 6572 7420 5753 444c 2069 6e74 convert WSDL int\n+0011b000: 6f20 616e 2069 6e74 6572 6661 6365 2068 o an interface h\n+0011b010: 6561 6465 7220 6669 6c65 2e20 496e 2074 eader file. In t\n+0011b020: 6869 7320 6361 7365 2077 6520 646f 6e27 his case we don'\n+0011b030: 7420 7761 6e74 2074 6865 2077 7364 6c32 t want the wsdl2\n+0011b040: 6820 746f 6f6c 2074 6f20 7265 6164 2074 h tool to read t\n+0011b050: 6865 2058 4f50 2073 6368 656d 6120 616e he XOP schema an\n+0011b060: 6420 7472 616e 736c 6174 6520 6974 2c20 d translate it, \n+0011b070: 7369 6e63 6520 7765 2068 6176 6520 6120 since we have a \n+0011b080: 7072 652d 6465 6669 6e65 6420 3c63 6f64 pre-defined _xop__In\n+0011b100: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude\n+0011b110: 2065 6c65 6d65 6e74 2074 6f20 6861 6e64 element to hand\n+0011b120: 6c65 2058 4f50 2066 6f72 204d 544f 4d2e le XOP for MTOM.\n+0011b130: 2054 6869 7320 3c63 6f64 653e 3c61 2063 This _xop__Include<\n+0011b1b0: 2f61 3e3c 2f63 6f64 653e 2065 6c65 6d65 /a> eleme\n+0011b1c0: 6e74 2069 7320 6465 6669 6e65 6420 696e nt is defined in\n+0011b1d0: 203c 656d 3e3c 636f 6465 3e78 6f70 2e68 xop.h\n+0011b1e0: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5468 . Th\n+0011b1f0: 6572 6566 6f72 652c 2074 6865 2062 696e erefore, the bin\n+0011b200: 6469 6e67 7320 7368 6f77 6e20 6162 6f76 dings shown abov\n+0011b210: 6520 7769 6c6c 206e 6f74 2074 7261 6e73 e will not trans\n+0011b220: 6c61 7465 2074 6865 2058 4f50 2061 6e64 late the XOP and\n+0011b230: 2058 4d4c 204d 494d 4520 7363 6865 6d61 XML MIME schema\n+0011b240: 7320 746f 2063 6f64 652c 2062 7574 2067 s to code, but g\n+0011b250: 656e 6572 6174 6573 203c 636f 6465 3e23 enerates #\n+0011b260: 696d 706f 7274 3c2f 636f 6465 3e20 7374 import st\n+0011b270: 6174 656d 656e 7473 2069 6e73 7465 6164 atements instead\n+0011b280: 2069 6e20 7468 6520 6765 6e65 7261 7465 in the generate\n+0011b290: 6420 696e 7465 7266 6163 6520 6865 6164 d interface head\n+0011b2a0: 6572 2066 696c 653a 3c2f 703e 0a3c 6469 er file:

    .
    \n+0011b2f0: 2369 6d70 6f72 7420 2671 756f 743b 786f #import "xo\n+0011b300: 702e 6826 7175 6f74 3b3c 2f73 7061 6e3e p.h"\n+0011b310: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    #import &qu\n+0011b350: 6f74 3b78 6d69 6d65 352e 6826 7175 6f74 ot;xmime5.h"\n+0011b360: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+0011b370: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The #import statements are\n+0011b3b0: 206f 6e6c 7920 6164 6465 6420 666f 7220 only added for \n+0011b3c0: 7468 6f73 6520 6e61 6d65 7370 6163 6573 those namespaces\n+0011b3d0: 2074 6861 7420 6172 6520 6163 7475 616c that are actual\n+0011b3e0: 6c79 2075 7365 642e 3c2f 703e 0a3c 703e ly used.

    .

    \n+0011b3f0: 4c65 7427 7320 7461 6b65 2061 206c 6f6f Let's take a loo\n+0011b400: 6b20 6174 2061 6e20 6578 616d 706c 652e k at an example.\n+0011b410: 2054 6865 2077 7364 6c32 6820 696d 706f The wsdl2h impo\n+0011b420: 7274 6572 2067 656e 6572 6174 6573 2061 rter generates a\n+0011b430: 2068 6561 6465 7220 6669 6c65 2077 6974 header file wit\n+0011b440: 6820 3c63 6f64 653e 2369 6d70 6f72 7420 h #import \n+0011b450: 2278 6f70 2e68 223c 2f63 6f64 653e 2066 \"xop.h\" f\n+0011b460: 726f 6d20 6120 5753 444c 2074 6861 7420 rom a WSDL that \n+0011b470: 7265 6665 7265 6e63 6573 2058 4f50 2c20 references XOP, \n+0011b480: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

    \n+0011b490: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #import &quo\n+0011b4e0: 743b 786f 702e 6826 7175 6f74 3b3c 2f73 t;xop.h"
    .#import\n+0011b530: 2026 7175 6f74 3b78 6d69 6d65 352e 6826 "xmime5.h&\n+0011b540: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    stru\n+0011b580: 6374 203c 2f73 7061 6e3e 6e73 5f5f 4461 ct ns__Da\n+0011b590: 7461 203c 2f64 6976 3e0a 3c64 6976 2063 ta
    .
    {.
    _x\n+0011b600: 6f70 5f5f 496e 636c 7564 653c 2f61 3e20 op__Include \n+0011b610: 786f 705f 5f49 6e63 6c75 6465 3b20 3c2f xop__Include; .
    @ char\n+0011b660: 202a 786d 696d 6535 5f5f 636f 6e74 656e *xmime5__conten\n+0011b670: 7454 7970 653b 2020 3c2f 6469 763e 0a3c tType;
    .<\n+0011b680: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011b690: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    \n+0011b6a0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    A\n+0011b7c0: 6674 6572 2067 656e 6572 6174 696e 6720 fter generating \n+0011b7d0: 7468 6520 7374 7562 2066 756e 6374 696f the stub functio\n+0011b7e0: 6e73 2077 6974 6820 7468 6520 736f 6170 ns with the soap\n+0011b7f0: 6370 7032 2074 6f6f 6c2c 2077 6520 6361 cpp2 tool, we ca\n+0011b800: 6e20 696e 766f 6b65 2074 6865 2073 7475 n invoke the stu\n+0011b810: 6220 6174 2074 6865 2063 6c69 656e 7420 b at the client \n+0011b820: 7369 6465 2077 6974 683a 3c2f 703e 0a3c side with:

    .<\n+0011b830: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0011b840: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+0011b870: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new1\n+0011b940: 283c 6120 636c 6173 733d 2263 6f64 6522 (SOAP_ENC_MTO\n+0011b9a0: 4d3c 2f61 3e29 3b20 3c2f 6469 763e 0a3c M);
    .<\n+0011b9b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011b9c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__Data da\n+0011b9f0: 7461 3b20 3c2f 6469 763e 0a3c 6469 7620 ta;
    .
    dat\n+0011ba10: 612e 786f 705f 5f49 6e63 6c75 6465 2e5f a.xop__Include._\n+0011ba20: 5f70 7472 203d 2028 3c73 7061 6e20 636c _ptr = (unsigned char\n+0011ba70: 3c2f 7370 616e 3e2a 293c 7370 616e 2063 *)"<b\n+0011baa0: 2667 743b 4865 6c6c 6f20 776f 726c 6421 >Hello world!\n+0011bab0: 266c 743b 2f62 2667 743b 2671 756f 743b </b>"\n+0011bac0: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n+0011bad0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    data.xop__Incl\n+0011baf0: 7564 652e 5f5f 7369 7a65 203d 2032 303b ude.__size = 20;\n+0011bb00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    data.x\n+0011bb20: 6f70 5f5f 496e 636c 7564 652e 6964 203d op__Include.id =\n+0011bb30: 204e 554c 4c3b 2020 2020 2020 2020 2020 NULL; \n+0011bb40: 2020 3c73 7061 6e20 636c 6173 733d 2263 // CID a\n+0011bb60: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen\n+0011bb70: 6572 6174 6564 2062 7920 656e 6769 6e65 erated by engine\n+0011bb80: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0011bb90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011bba0: 3e64 6174 612e 786f 705f 5f49 6e63 6c75 >data.xop__Inclu\n+0011bbb0: 6465 2e74 7970 6520 3d20 3c73 7061 6e20 de.type = "text\n+0011bbe0: 2f68 746d 6c26 7175 6f74 3b3c 2f73 7061 /html"; // M\n+0011bc10: 494d 4520 7479 7065 203c 2f73 7061 6e3e IME type \n+0011bc20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    data.xo\n+0011bc40: 705f 5f49 6e63 6c75 6465 2e6f 7074 696f p__Include.optio\n+0011bc50: 6e73 203d 204e 554c 4c3b 2020 2020 2020 ns = NULL; \n+0011bc60: 203c 7370 616e 2063 6c61 7373 3d22 636f // no des\n+0011bc80: 6372 6970 7469 7665 2069 6e66 6f20 6164 criptive info ad\n+0011bc90: 6465 6420 3c2f 7370 616e 3e3c 2f64 6976 ded .
    data.xmime5_\n+0011bcc0: 5f63 6f6e 7465 6e74 5479 7065 203d 203c _contentType = <\n+0011bcd0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0011bce0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0011bcf0: 3b74 6578 742f 6874 6d6c 2671 756f 743b ;text/html"\n+0011bd00: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; /\n+0011bd20: 2f20 4d49 4d45 2074 7970 6520 3c2f 7370 / MIME type
    .
    if \n+0011bd70: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f65 (soap_call_ns__e\n+0011bd80: 6368 6f44 6174 6128 3c61 2063 6c61 7373 choData(s\n+0011bdb0: 6f61 703c 2f61 3e2c 2065 6e64 706f 696e oap, endpoin\n+0011bdc0: 742c 2061 6374 696f 6e2c 2026 616d 703b t, action, &\n+0011bdd0: 6461 7461 2c20 2661 6d70 3b64 6174 6129 data, &data)\n+0011bde0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    s\n+0011be50: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault<\n+0011be60: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+0011be90: 2f61 3e2c 2073 7464 6572 7229 3b3c 2f64 /a>, stderr);.
    \n+0011bed0: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    printf("\n+0011bf20: 476f 7420 6461 7461 5c6e 2671 756f 743b Got data\\n"\n+0011bf30: 3c2f 7370 616e 3e29 3b20 3c2f 6469 763e );
    \n+0011bf40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    \n+0011bff0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n+0011c0b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011c0c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0011c0d0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0011c0e0: 6761 3537 3130 3863 6134 3638 3131 3836 ga57108ca4681186\n+0011c0f0: 6535 3862 3562 3138 3963 3335 3238 6631 e58b5b189c3528f1\n+0011c100: 3061 223e 736f 6170 5f66 7265 653c 2f61 0a\">soap_free(soap);
    .
    \n+0011c150: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The server\n+0011c4d0: 206d 7573 7420 7573 6520 7468 6520 3c63 must use the #SOAP_ENC_MT\n+0011c4f0: 4f4d 3c2f 636f 6465 3e20 666c 6167 2074 OM flag t\n+0011c500: 6f20 696e 6974 6961 6c69 7a65 2074 6865 o initialize the\n+0011c510: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context to re\n+0011c580: 6365 6976 6520 616e 6420 7365 6e64 204d ceive and send M\n+0011c590: 544f 4d20 6174 7461 6368 6d65 6e74 732e TOM attachments.\n+0011c5a0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+0011c5e0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0011c5f0: 2069 643d 224d 544f 4d73 7472 6561 6d69 id=\"MTOMstreami\n+0011c600: 6e67 223e 3c2f 613e 0a53 7472 6561 6d69 ng\">.Streami\n+0011c610: 6e67 204d 494d 452f 4d54 4f4d 3c2f 6832 ng MIME/MTOM.

    Streaming M\n+0011c630: 494d 452f 4d54 4f4d 2069 7320 6163 6869 IME/MTOM is achi\n+0011c640: 6576 6564 2077 6974 6820 6361 6c6c 6261 eved with callba\n+0011c650: 636b 2066 756e 6374 696f 6e73 2074 6f20 ck functions to \n+0011c660: 6665 7463 6820 616e 6420 7374 6f72 6520 fetch and store \n+0011c670: 6461 7461 2064 7572 696e 6720 7472 616e data during tran\n+0011c680: 736d 6973 7369 6f6e 2e20 5468 7265 6520 smission. Three \n+0011c690: 6675 6e63 7469 6f6e 2063 616c 6c62 6163 function callbac\n+0011c6a0: 6b73 2066 6f72 2073 7472 6561 6d69 6e67 ks for streaming\n+0011c6b0: 204d 494d 452f 4d54 4f4d 206f 7574 7075 MIME/MTOM outpu\n+0011c6c0: 7420 616e 6420 7468 7265 6520 6361 6c6c t and three call\n+0011c6d0: 6261 636b 7320 666f 7220 7374 7265 616d backs for stream\n+0011c6e0: 696e 6720 4d49 4d45 2f4d 544f 4d20 696e ing MIME/MTOM in\n+0011c6f0: 7075 7420 6172 6520 6176 6169 6c61 626c put are availabl\n+0011c700: 652e 3c2f 703e 0a3c 756c 3e0a 3c6c 693e e.

    ..<\n+0011ee10: 703e 496e 2061 6464 6974 696f 6e2c 2061 p>In addition, a\n+0011ee20: 203c 636f 6465 3e76 6f69 642a 203c 6120 void* soap::user<\n+0011eef0: 2f61 3e3c 2f63 6f64 653e 206d 656d 6265 /a> membe\n+0011ef00: 7220 6973 2061 7661 696c 6162 6c65 2074 r is available t\n+0011ef10: 6f20 7061 7373 2075 7365 722d 6465 6669 o pass user-defi\n+0011ef20: 6e65 6420 6461 7461 2074 6f20 7468 6520 ned data to the \n+0011ef30: 6361 6c6c 6261 636b 732e 2054 6869 7320 callbacks. This \n+0011ef40: 7761 792c 2079 6f75 2063 616e 2073 6574 way, you can set\n+0011ef50: 203c 636f 6465 3e76 6f69 642a 203c 6120 void* soap::user<\n+0011f020: 2f61 3e3c 2f63 6f64 653e 2074 6f20 706f /a> to po\n+0011f030: 696e 7420 746f 2061 7070 6c69 6361 7469 int to applicati\n+0011f040: 6f6e 2064 6174 6120 7468 6174 2074 6865 on data that the\n+0011f050: 2063 616c 6c62 6163 6b73 206e 6565 6420 callbacks need \n+0011f060: 7375 6368 2061 7320 6120 6669 6c65 206e such as a file n\n+0011f070: 616d 6520 666f 7220 6578 616d 706c 652e ame for example.\n+0011f080: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

    .

    The foll\n+0011f090: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il\n+0011f0a0: 6c75 7374 7261 7465 7320 7468 6520 636c lustrates the cl\n+0011f0b0: 6965 6e74 2d73 6964 6520 696e 6974 6961 ient-side initia\n+0011f0c0: 6c69 7a61 7469 6f6e 206f 6620 616e 2069 lization of an i\n+0011f0d0: 6d61 6765 2061 7474 6163 686d 656e 7420 mage attachment \n+0011f0e0: 7374 7275 6374 2074 6f20 7374 7265 616d struct to stream\n+0011f0f0: 2061 2066 696c 6520 696e 746f 2061 204d a file into a M\n+0011f100: 544f 4d20 6174 7461 6368 6d65 6e74 2077 TOM attachment w\n+0011f110: 6974 686f 7574 2048 5454 5020 6368 756e ithout HTTP chun\n+0011f120: 6b69 6e67 2028 4854 5450 2073 7472 6561 king (HTTP strea\n+0011f130: 6d69 6e67 2063 6875 6e6b 6564 204d 544f ming chunked MTO\n+0011f140: 4d20 7472 616e 7366 6572 2069 7320 7072 M transfer is pr\n+0011f150: 6573 656e 7465 6420 696e 2053 6563 7469 esented in Secti\n+0011f160: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on \n+0011f190: 5374 7265 616d 696e 6720 6368 756e 6b65 Streaming chunke\n+0011f1a0: 6420 4d49 4d45 2f4d 544f 4d3c 2f61 3e20 d MIME/MTOM \n+0011f1b0: 293a 3c2f 703e 0a3c 6469 7620 636c 6173 ):

    .
    <\n+0011f1e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0011f1f0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main() .
    {
    . \n+0011f240: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+0011f290: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> soap<\n+0011f2c0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n+0011f2e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct xsd__\n+0011f340: 6261 7365 3634 4269 6e61 7279 3c2f 613e base64Binary\n+0011f350: 2069 6d61 6765 3b20 3c2f 6469 763e 0a3c image;

    .<\n+0011f360: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011f370: 3e20 2046 494c 4520 2a66 643b 203c 2f64 > FILE *fd; .
    st\n+0011f3b0: 7275 6374 203c 2f73 7061 6e3e 7374 6174 ruct stat\n+0011f3c0: 2073 623b 203c 2f64 6976 3e0a 3c64 6976 sb;
    . \n+0011f3e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_init1<\n+0011f440: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+0011f470: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, SOA\n+0011f4d0: 505f 454e 435f 4d54 4f4d 3c2f 613e 293b P_ENC_MTOM);\n+0011f4e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // mandat\n+0011f500: 6f72 7920 746f 2065 6e61 626c 6520 4d54 ory to enable MT\n+0011f510: 4f4d 203c 2f73 7061 6e3e 3c2f 6469 763e OM
    \n+0011f520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+0011f550: 663c 2f73 7061 6e3e 2028 2166 7374 6174 f (!fstat\n+0011f560: 2866 696c 656e 6f28 6664 292c 2026 616d (fileno(fd), &am\n+0011f570: 703b 7362 2920 2661 6d70 3b26 616d 703b p;sb) &&\n+0011f580: 2073 622e 7374 5f73 697a 6520 2667 743b sb.st_size >\n+0011f590: 2030 2920 3c2f 6469 763e 0a3c 6469 7620 0)
    .
    {\n+0011f5b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    // because we\n+0011f5f0: 2063 616e 2067 6574 2074 6865 206c 656e can get the len\n+0011f600: 6774 6820 6f66 2074 6865 2066 696c 652c gth of the file,\n+0011f610: 2077 6520 6361 6e20 7374 7265 616d 2069 we can stream i\n+0011f620: 7420 7769 7468 6f75 7420 6368 756e 6b69 t without chunki\n+0011f630: 6e67 203c 2f73 7061 6e3e 3c2f 6469 763e ng
    \n+0011f640: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n+0011f680: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fm\n+0011f6e0: 696d 6572 6561 646f 7065 6e3c 2f61 3e20 imereadopen \n+0011f6f0: 3d20 6d69 6d65 5f72 6561 645f 6f70 656e = mime_read_open\n+0011f700: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+0011f720: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011f730: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0011f740: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0011f750: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011f760: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0011f770: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+0011f780: 6c23 6761 3838 3465 3934 6538 3435 3066 l#ga884e94e8450f\n+0011f790: 3536 3034 3962 6135 3037 3137 3836 3137 56049ba507178617\n+0011f7a0: 3064 6435 223e 666d 696d 6572 6561 6463 0dd5\">fmimereadc\n+0011f7b0: 6c6f 7365 3c2f 613e 203d 206d 696d 655f lose = mime_\n+0011f7c0: 7265 6164 5f63 6c6f 7365 3b20 3c2f 6469 read_close; .
    \n+0011f810: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n+0011f870: 666d 696d 6572 6561 643c 2f61 3e20 3d20 fmimeread = \n+0011f880: 6d69 6d65 5f72 6561 643b 203c 2f64 6976 mime_read; .
    image.__\n+0011f8b0: 7074 7220 3d20 283c 7370 616e 2063 6c61 ptr = (unsigned\n+0011f8e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+0011f900: 2f73 7061 6e3e 2a29 6664 3b20 3c73 7061 /span>*)fd; // must set to\n+0011f930: 206e 6f6e 2d4e 554c 4c20 2874 6869 7320 non-NULL (this \n+0011f940: 6973 206f 7572 2066 6420 6861 6e64 6c65 is our fd handle\n+0011f950: 2077 6869 6368 2077 6520 6e65 6564 2069 which we need i\n+0011f960: 6e20 7468 6520 6361 6c6c 6261 636b 7329 n the callbacks)\n+0011f970: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0011f980: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011f990: 3e20 2020 2069 6d61 6765 2e5f 5f73 697a > image.__siz\n+0011f9a0: 6520 3d20 7362 2e73 745f 7369 7a65 3b20 e = sb.st_size; \n+0011f9b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // must se\n+0011f9d0: 7420 7369 7a65 203c 2f73 7061 6e3e 3c2f t size .
    } .
    \n+0011fa30: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    {
    .<\n+0011fa60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011fa70: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // do\n+0011fa90: 6e26 2333 393b 7420 6b6e 6f77 2074 6865 n't know the\n+0011faa0: 2073 697a 652c 2073 6f20 6275 6666 6572 size, so buffer\n+0011fab0: 2069 7420 3c2f 7370 616e 3e3c 2f64 6976 it .
    size_t \n+0011fb00: 693b 203c 2f64 6976 3e0a 3c64 6976 2063 i;
    .
    \n+0011fb20: 3c73 7061 6e20 636c 6173 733d 226b 6579 int c;
    .<\n+0011fb50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011fb60: 3e20 2020 2069 6d61 6765 2e5f 5f70 7472 > image.__ptr\n+0011fb70: 203d 2028 3c73 7061 6e20 636c 6173 733d = (un\n+0011fb90: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char*)soap_m\n+0011fc20: 616c 6c6f 633c 2f61 3e28 2661 6d70 3b3c alloc(&<\n+0011fc30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011fc40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0011fc50: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0011fc60: 4d41 585f 4649 4c45 5f53 495a 4529 3b20 MAX_FILE_SIZE); \n+0011fc70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    for (i = 0; i <\n+0011fcc0: 204d 4158 5f46 494c 455f 5349 5a45 3b20 MAX_FILE_SIZE; \n+0011fcd0: 692b 2b29 203c 2f64 6976 3e0a 3c64 6976 i++)
    . \n+0011fcf0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+0011fd10: 2020 3c73 7061 6e20 636c 6173 733d 226b if ((c = fget\n+0011fd40: 6328 6664 2929 203d 3d20 454f 4629 203c c(fd)) == EOF) <\n+0011fd50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0011fd70: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n+0011fd90: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n+0011fda0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011fdb0: 3e20 2020 2020 2069 6d61 6765 2e5f 5f70 > image.__p\n+0011fdc0: 7472 5b69 5d20 3d20 633b 203c 2f64 6976 tr[i] = c; .
    }
    \n+0011fdf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fclose(fd\n+0011fe10: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+0011fe30: 696d 6167 652e 5f5f 7369 7a65 203d 2069 image.__size = i\n+0011fe40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } <\n+0011fe60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    image.\n+0011fe80: 7479 7065 203d 203c 7370 616e 2063 6c61 type = "image/j\n+0011feb0: 7065 6726 7175 6f74 3b3c 2f73 7061 6e3e peg"\n+0011fec0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // MIME \n+0011fee0: 7479 7065 203c 2f73 7061 6e3e 3c2f 6469 type .
    image.opt\n+0011ff10: 696f 6e73 203d 203c 7370 616e 2063 6c61 ions = "This is\n+0011ff40: 206d 7920 7069 6374 7572 6526 7175 6f74 my picture"\n+0011ff50: 3b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 ;; \n+0011ff70: 2f2f 2064 6573 6372 6970 7469 6f6e 206f // description o\n+0011ff80: 6620 6f62 6a65 6374 203c 2f73 7061 6e3e f object \n+0011ff90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+0011ffd0: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n+0011ffe0: 626d 6574 686f 6428 2661 6d70 3b3c 6120 bmethod(&soap, ..\n+00120020: 2e29 293c 2f64 6976 3e0a 3c64 6976 2063 .))
    .
    \n+00120040: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+00120060: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
    .\n+00120070: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n+001200a0: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n+001200b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... \n+001200e0: 2f2f 2073 7563 6365 7373 3c2f 7370 616e // success
    .
    } .
    .<\n+00120140: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00120150: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *mime_read_\n+00120170: 6f70 656e 283c 7370 616e 2063 6c61 7373 open(struc\n+00120190: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+001201c0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, void\n+00120220: 202a 6861 6e64 6c65 2c20 3c73 7061 6e20 *handle, \n+00120240: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *id\n+00120290: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , c\n+001202b0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *type, c\n+00120300: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *description) \n+00120340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00120360: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n+00120390: 6574 7572 6e3c 2f73 7061 6e3e 2068 616e eturn han\n+001203a0: 646c 653b 203c 2f64 6976 3e0a 3c64 6976 dle;
    .} \n+001203c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001203e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    voi\n+00120410: 643c 2f73 7061 6e3e 206d 696d 655f 7265 d mime_re\n+00120420: 6164 5f63 6c6f 7365 283c 7370 616e 2063 ad_close(s\n+00120440: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001204b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001204c0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *handle) .
    {
    .<\n+00120500: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120510: 3e20 2066 636c 6f73 6528 2846 494c 452a > fclose((FILE*\n+00120520: 2968 616e 646c 6529 3b20 3c2f 6469 763e )handle);
    \n+00120530: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n+00120560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t \n+001205a0: 6d69 6d65 5f72 6561 6428 3c73 7061 6e20 mime_read(\n+001205c0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00120600: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00120610: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00120620: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00120630: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle, <\n+00120660: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00120670: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *buf, size_t len)
    .<\n+001206c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001206d0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    return fread(buf, \n+00120720: 312c 206c 656e 2c20 2846 494c 452a 2968 1, len, (FILE*)h\n+00120730: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n+00120740: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120750: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    \n+001207b0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    v\n+00120840: 6f69 6420 2a28 2a20 666d 696d 6572 6561 oid *(* fmimerea\n+00120850: 646f 7065 6e29 2873 7472 7563 7420 736f dopen)(struct so\n+00120860: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void *\n+00120870: 2c20 636f 6e73 7420 6368 6172 202a 2c20 , const char *, \n+00120880: 636f 6e73 7420 6368 6172 202a 2c20 636f const char *, co\n+00120890: 6e73 7420 6368 6172 202a 293c 2f64 6976 nst char *)
    Callback to \n+001208c0: 6f70 656e 2061 2073 7472 6561 6d69 6e67 open a streaming\n+001208d0: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n+001208e0: 686d 656e 7420 666f 7220 7265 6164 696e hment for readin\n+001208f0: 672e 3c2f 6469 763e 3c64 6976 2063 6c61 g.
    De\n+00120910: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00120920: 6473 6f61 7032 2e68 3a34 3839 363c 2f64 dsoap2.h:4896
    .
    void(* fmimerea\n+00120a30: 6463 6c6f 7365 2928 7374 7275 6374 2073 dclose)(struct s\n+00120a40: 6f61 7020 2a73 6f61 702c 2076 6f69 6420 oap *soap, void \n+00120a50: 2a68 616e 646c 6529 3c2f 6469 763e 3c64 *handle)
    Callback to clo\n+00120a80: 7365 2061 204d 494d 452f 4d54 4f4d 2061 se a MIME/MTOM a\n+00120a90: 7474 6163 686d 656e 7420 7374 7265 616d ttachment stream\n+00120aa0: 2061 6674 6572 2072 6561 6469 6e67 2e3c after reading.<\n+00120ab0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00120ad0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00120ae0: 6170 322e 683a 3439 3239 3c2f 6469 763e ap2.h:4929
    \n+00120af0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap\n+00120bb0: 3a3a 666d 696d 6572 6561 643c 2f61 3e3c ::fmimeread<\n+00120bc0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    size_t(\n+00120be0: 2a20 666d 696d 6572 6561 6429 2873 7472 * fmimeread)(str\n+00120bf0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00120c00: 766f 6964 202a 6861 6e64 6c65 2c20 6368 void *handle, ch\n+00120c10: 6172 202a 6275 662c 2073 697a 655f 7420 ar *buf, size_t \n+00120c20: 6c65 6e29 3c2f 6469 763e 3c64 6976 2063 len)
    Cal\n+00120c40: 6c62 6163 6b20 746f 2072 6561 6420 6461 lback to read da\n+00120c50: 7461 2069 6e20 6120 4d49 4d45 2f4d 544f ta in a MIME/MTO\n+00120c60: 4d20 6174 7461 6368 6d65 6e74 2073 7472 M attachment str\n+00120c70: 6561 6d2e 3c2f 6469 763e 3c64 6976 2063 eam.
    \n+00120c90: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00120ca0: 7374 6473 6f61 7032 2e68 3a34 3931 343c stdsoap2.h:4914<\n+00120cb0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    The follow\n+00120ce0: 696e 6720 6578 616d 706c 6520 696c 6c75 ing example illu\n+00120cf0: 7374 7261 7465 7320 7468 6520 7374 7265 strates the stre\n+00120d00: 616d 696e 6720 6f66 2061 204d 494d 452f aming of a MIME/\n+00120d10: 4d54 4f4d 2061 7474 6163 686d 656e 7420 MTOM attachment \n+00120d20: 696e 746f 2061 2066 696c 6520 6279 2061 into a file by a\n+00120d30: 2063 6c69 656e 743a 3c2f 703e 0a3c 6469 client:

    .
    i\n+00120d80: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main()\n+00120d90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    stru\n+00120de0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap soap; .
    soap_\n+00120ec0: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); \n+00120f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.fmimewriteopen\n+00120fb0: 3c2f 613e 203d 206d 696d 655f 7772 6974 = mime_writ\n+00120fc0: 655f 6f70 656e 3b20 3c2f 6469 763e 0a3c e_open;
    .<\n+00120fd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120fe0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap.fmimew\n+00121070: 7269 7465 636c 6f73 653c 2f61 3e20 3d20 riteclose = \n+00121080: 6d69 6d65 5f77 7269 7465 5f63 6c6f 7365 mime_write_close\n+00121090: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ...
    \n+00121200: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+00121220: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    \n+00121230: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    e\n+00121260: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    \n+00121270: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // success
    .
    } .
    .\n+00121300: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *mime_writ\n+00121330: 655f 6f70 656e 283c 7370 616e 2063 6c61 e_open(str\n+00121350: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n+001213e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *id, const <\n+00121450: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00121460: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *type, const <\n+001214a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001214b0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *descriptio\n+001214d0: 6e2c 203c 7370 616e 2063 6c61 7373 3d22 n, enum soap_mime\n+00121550: 5f65 6e63 6f64 696e 673c 2f61 3e20 656e _encoding en\n+00121560: 636f 6469 6e67 2920 3c2f 6469 763e 0a3c coding)
    .<\n+00121570: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00121580: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    FIL\n+001215a0: 4520 2a68 616e 646c 6520 3d20 3c61 2063 E *handle = fopen("s\n+00121630: 6f6d 6566 696c 6526 7175 6f74 3b3c 2f73 omefile", "wb"\n+00121670: 3c2f 7370 616e 3e29 3b20 3c2f 6469 763e );
    \n+00121680: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // We\n+001216b0: 2069 676e 6f72 6520 7468 6520 4d49 4d45 ignore the MIME\n+001216c0: 2063 6f6e 7465 6e74 2074 7261 6e73 6665 content transfe\n+001216d0: 7220 656e 636f 6469 6e67 2068 6572 652c r encoding here,\n+001216e0: 2062 7574 2073 686f 756c 6420 6368 6563 but should chec\n+001216f0: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    .\n+00121700: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n+00121730: 3c2f 7370 616e 3e20 2821 6861 6e64 6c65 (!handle\n+00121740: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    soap-><\n+001217b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001217c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001217d0: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n+001217e0: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n+001217f0: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error = SOAP_EOF\n+00121860: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n+00121880: 2020 203c 6120 636c 6173 733d 2263 6f64 soap->\n+00121900: 6572 726e 756d 3c2f 613e 203d 2065 7272 errnum = err\n+00121910: 6e6f 3b20 3c73 7061 6e20 636c 6173 733d no; // get\n+00121930: 2072 6561 736f 6e20 3c2f 7370 616e 3e3c reason <\n+00121940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    return (\n+001219a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void*)handle; <\n+001219d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+001219f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    void mime_write_cl\n+00121a50: 6f73 6528 3c73 7061 6e20 636c 6173 733d ose(struct\n+00121a70: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+00121aa0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00121ad0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, void \n+00121b00: 2a68 616e 646c 6529 203c 2f64 6976 3e0a *handle)
    .\n+00121b10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    fclose(\n+00121ba0: 2846 494c 452a 2968 616e 646c 6529 3b20 (FILE*)handle); \n+00121bb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    .int mime_write(struct soap *soap, vo\n+00121cd0: 6964 3c2f 7370 616e 3e20 2a68 616e 646c id *handl\n+00121ce0: 652c 203c 7370 616e 2063 6c61 7373 3d22 e, const \n+00121d20: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *buf, <\n+00121d80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00121d90: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+00121da0: 2f73 7061 6e3e 206c 656e 2920 3c2f 6469 /span> len) .
    {
    . \n+00121de0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n+00121e00: 743c 2f73 7061 6e3e 206e 7772 6974 7465 t nwritte\n+00121e10: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    while (len) .
    {
    .\n+00121e90: 2020 2020 6e77 7269 7474 656e 203d 2066 nwritten = f\n+00121ea0: 7772 6974 6528 3c61 2063 6c61 7373 3d22 write(b\n+00121ef0: 7566 3c2f 613e 2c20 312c 206c 656e 2c20 uf, 1, len, \n+00121f00: 2846 494c 452a 2968 616e 646c 6529 3b20 (FILE*)handle); \n+00121f10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if\n+00121f50: 2028 216e 7772 6974 7465 6e29 203c 2f64 (!nwritten) .
    {.
    soap->errnum = errno; // get reason <\n+00122050: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00122070: 2020 2020 203c 7370 616e 2063 6c61 7373 r\n+00122090: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_EOF; <\n+00122100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    len -\n+00122140: 3d20 6e77 7269 7474 656e 3b20 3c2f 6469 = nwritten; .
    buf += nwr\n+001221c0: 6974 7465 6e3b 203c 2f64 6976 3e0a 3c64 itten;
    .\n+001221e0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n+00122200: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00122210: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00122220: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n+00122280: 4f4b 3c2f 613e 3b20 3c2f 6469 763e 0a3c OK;
    .<\n+00122290: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001222a0: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    \n+00122300: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 void(* fmimewri\n+001223a0: 7465 636c 6f73 6529 2873 7472 7563 7420 teclose)(struct \n+001223b0: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n+001223c0: 202a 6861 6e64 6c65 293c 2f64 6976 3e3c *handle)
    <\n+001223d0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001223e0: 223e 4361 6c6c 6261 636b 2074 6f20 636c \">Callback to cl\n+001223f0: 6f73 6520 6120 4d49 4d45 2f4d 544f 4d20 ose a MIME/MTOM \n+00122400: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n+00122410: 6d20 6166 7465 7220 7772 6974 696e 672e m after writing.\n+00122420: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00122440: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00122450: 6f61 7032 2e68 3a35 3032 303c 2f64 6976 oap2.h:5020
    .
    <\n+001224c0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+001224d0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n+00122520: 703a 3a66 6d69 6d65 7772 6974 653c 2f61 p::fmimewrite
    \n+001225a0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback to w\n+001225c0: 7269 7465 2064 6174 6120 696e 2061 204d rite data in a M\n+001225d0: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n+001225e0: 7472 6561 6d2e 3c2f 6469 763e 3c64 6976 tream.
    <\n+00122600: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:500\n+00122620: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    soap::fmimewr\n+001226f0: 6974 656f 7065 6e3c 2f61 3e3c 2f64 6976 iteopen
    void *(* fm\n+00122720: 696d 6577 7269 7465 6f70 656e 2928 7374 imewriteopen)(st\n+00122730: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+00122740: 2076 6f69 6420 2a68 616e 646c 652c 2063 void *handle, c\n+00122750: 6f6e 7374 2063 6861 7220 2a69 642c 2063 onst char *id, c\n+00122760: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+00122770: 2063 6f6e 7374 2063 6861 7220 2a64 6573 const char *des\n+00122780: 6372 6970 7469 6f6e 2c20 656e 756d 2073 cription, enum s\n+00122790: 6f61 705f 6d69 6d65 5f65 6e63 6f64 696e oap_mime_encodin\n+001227a0: 6720 656e 636f 6469 6e67 293c 2f64 6976 g encoding)
    Callback to \n+001227d0: 6f70 656e 2061 2073 7472 6561 6d69 6e67 open a streaming\n+001227e0: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n+001227f0: 686d 656e 7420 666f 7220 7772 6974 696e hment for writin\n+00122800: 672e 3c2f 6469 763e 3c64 6976 2063 6c61 g.
    De\n+00122820: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00122830: 6473 6f61 7032 2e68 3a34 3939 383c 2f64 dsoap2.h:4998
    .
    \n+001228b0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_mime_e\n+00122900: 6e63 6f64 696e 673c 2f61 3e3c 2f64 6976 ncoding
    soap_mime_e\n+00122930: 6e63 6f64 696e 673c 2f64 6976 3e3c 6469 ncoding
    \n+00122950: 5246 4332 3034 3520 4d49 4d45 2063 6f6e RFC2045 MIME con\n+00122960: 7465 6e74 2074 7261 6e73 6665 7220 656e tent transfer en\n+00122970: 636f 6469 6e67 732e 3c2f 6469 763e 3c64 codings.
    Definition:<\n+001229a0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a31 /b> stdsoap2.h:1\n+001229b0: 3032 3233 3c2f 6469 763e 3c2f 6469 763e 0223
    \n+001229c0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Messa\n+001229e0: 6765 2063 6f6d 7072 6573 7369 6f6e 2077 ge compression w\n+001229f0: 6974 6820 3c63 6f64 653e 2353 4f41 505f ith #SOAP_\n+00122a00: 454e 435f 5a4c 4942 3c2f 636f 6465 3e20 ENC_ZLIB \n+00122a10: 6361 6e20 6265 2075 7365 6420 7769 7468 can be used with\n+00122a20: 204d 494d 4520 746f 2063 6f6d 7072 6573 MIME to compres\n+00122a30: 7320 7468 6520 656e 7469 7265 206d 6573 s the entire mes\n+00122a40: 7361 6765 2e20 486f 7765 7665 722c 2063 sage. However, c\n+00122a50: 6f6d 7072 6573 7369 6f6e 2072 6571 7569 ompression requi\n+00122a60: 7265 7320 6275 6666 6572 696e 6720 746f res buffering to\n+00122a70: 2064 6574 6572 6d69 6e65 2074 6865 2048 determine the H\n+00122a80: 5454 5020 636f 6e74 656e 7420 6c65 6e67 TTP content leng\n+00122a90: 7468 2068 6561 6465 722c 2077 6869 6368 th header, which\n+00122aa0: 2063 616e 6365 6c73 2074 6865 2062 656e cancels the ben\n+00122ab0: 6566 6974 7320 6f66 2073 7472 6561 6d69 efits of streami\n+00122ac0: 6e67 204d 494d 452e 2054 6f20 6176 6f69 ng MIME. To avoi\n+00122ad0: 6420 7468 6973 2c20 796f 7520 7368 6f75 d this, you shou\n+00122ae0: 6c64 2075 7365 2063 6875 6e6b 6564 2048 ld use chunked H\n+00122af0: 5454 5020 2877 6974 6820 7468 6520 6f75 TTP (with the ou\n+00122b00: 7470 7574 2d6d 6f64 6520 3c63 6f64 653e tput-mode \n+00122b10: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK flag) with\n+00122b30: 2063 6f6d 7072 6573 7369 6f6e 2061 6e64 compression and\n+00122b40: 2073 7472 6561 6d69 6e67 204d 494d 452e streaming MIME.\n+00122b50: 2041 7420 7468 6520 7365 7276 6572 2073 At the server s\n+00122b60: 6964 652c 2077 6865 6e20 796f 7520 7365 ide, when you se\n+00122b70: 7420 3c63 6f64 653e 2353 4f41 505f 494f t #SOAP_IO\n+00122b80: 5f43 4855 4e4b 3c2f 636f 6465 3e20 6265 _CHUNK be\n+00122b90: 666f 7265 2063 616c 6c69 6e67 203c 636f fore calling soap_serve\n+00122c20: 3c2f 636f 6465 3e2c 2074 6865 2065 6e67 , the eng\n+00122c30: 696e 6520 7769 6c6c 2061 7574 6f6d 6174 ine will automat\n+00122c40: 6963 616c 6c79 2072 6576 6572 7420 746f ically revert to\n+00122c50: 2062 7566 6665 7269 6e67 2028 3c63 6f64 buffering (#SOAP_IO_STORE\n+00122c70: 3c2f 636f 6465 3e20 666c 6167 2069 7320 flag is \n+00122c80: 7365 7429 2e20 596f 7520 6361 6e20 6368 set). You can ch\n+00122c90: 6563 6b20 7468 6973 2066 6c61 6720 7769 eck this flag wi\n+00122ca0: 7468 203c 636f 6465 3e28 736f 6170 2d26 th (soap-&\n+00122cb0: 6774 3b6f 6d6f 6465 2026 616d 703b 2053 gt;omode & S\n+00122cc0: 4f41 505f 494f 2920 3d3d 2053 4f41 505f OAP_IO) == SOAP_\n+00122cd0: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e20 IO_CHUNK \n+00122ce0: 746f 2073 6565 2069 6620 7468 6520 636c to see if the cl\n+00122cf0: 6965 6e74 2061 6363 6570 7473 2063 6875 ient accepts chu\n+00122d00: 6e6b 696e 672e 204d 6f72 6520 696e 666f nking. More info\n+00122d10: 726d 6174 696f 6e20 6162 6f75 7420 7374 rmation about st\n+00122d20: 7265 616d 696e 6720 6368 756e 6b65 6420 reaming chunked \n+00122d30: 4d49 4d45 2063 616e 2062 6520 666f 756e MIME can be foun\n+00122d40: 6420 696e 2053 6563 7469 6f6e 203c 6120 d in Section Stream\n+00122d80: 696e 6720 6368 756e 6b65 6420 4d49 4d45 ing chunked MIME\n+00122d90: 2f4d 544f 4d3c 2f61 3e20 2e2e 3c2f 703e /MTOM ..

    \n+00122da0: 0a3c 703e 4e6f 7465 2074 6861 7420 7468 .

    Note that th\n+00122db0: 6520 6578 616d 706c 6520 6162 6f76 6520 e example above \n+00122dc0: 666f 7220 3c63 6f64 653e 6d69 6d65 5f72 for mime_r\n+00122dd0: 6561 643c 2f63 6f64 653e 2075 7365 7320 ead uses \n+00122de0: 6120 6861 6e64 6c65 2074 6861 7420 706f a handle that po\n+00122df0: 696e 7473 2074 6f20 7468 6520 6f70 656e ints to the open\n+00122e00: 2066 696c 6520 3c63 6f64 653e 4649 4c45 file FILE\n+00122e10: 2a3c 2f63 6f64 653e 2e20 5468 6520 7369 *. The si\n+00122e20: 6d70 6c65 2065 7861 6d70 6c65 2061 626f mple example abo\n+00122e30: 7665 2069 7320 6e6f 7420 7265 636f 6d6d ve is not recomm\n+00122e40: 656e 6465 6420 7768 656e 2074 6865 2070 ended when the p\n+00122e50: 6c61 7466 6f72 6d20 696d 706f 7365 7320 latform imposes \n+00122e60: 6120 6c69 6d69 7420 6f6e 2074 6865 206e a limit on the n\n+00122e70: 756d 6265 7220 6f66 206f 7065 6e20 6669 umber of open fi\n+00122e80: 6c65 2064 6573 6372 6970 746f 7273 2e20 le descriptors. \n+00122e90: 596f 7520 6361 6e20 7573 6520 7468 6520 You can use the \n+00122ea0: 6861 6e64 6c65 2074 6f20 7061 7373 2061 handle to pass a\n+00122eb0: 6c6f 6e67 206d 6f72 6520 696e 666f 726d long more inform\n+00122ec0: 6174 696f 6e20 7468 616e 206a 7573 7420 ation than just \n+00122ed0: 7468 6520 6669 6c65 2064 6573 6372 6970 the file descrip\n+00122ee0: 746f 722e 2053 6f20 666f 7220 6578 616d tor. So for exam\n+00122ef0: 706c 652c 2077 6865 6e20 7468 6520 6e75 ple, when the nu\n+00122f00: 6d62 6572 206f 6620 6f70 656e 2066 696c mber of open fil\n+00122f10: 6520 6465 7363 7269 7074 6f72 7320 6973 e descriptors is\n+00122f20: 206c 696d 6974 6564 206f 6e20 796f 7572 limited on your\n+00122f30: 2070 6c61 7466 6f72 6d2c 2079 6f75 2073 platform, you s\n+00122f40: 686f 756c 6420 6c65 7420 7468 6520 6861 hould let the ha\n+00122f50: 6e64 6c65 2070 6f69 6e74 2074 6f20 6120 ndle point to a \n+00122f60: 7374 7275 6374 7572 6520 7769 7468 2066 structure with f\n+00122f70: 696c 652d 7265 6c61 7465 6420 696e 666f ile-related info\n+00122f80: 726d 6174 696f 6e2e 2054 6865 2043 2b2b rmation. The C++\n+00122f90: 2065 7861 6d70 6c65 2062 656c 6f77 2069 example below i\n+00122fa0: 6c6c 7573 7472 6174 6573 2074 6869 733a llustrates this:\n+00122fb0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    fil\n+00122fe0: 652e 786f 705f 5f49 6e63 6c75 6465 203d e.xop__Include =\n+00122ff0: 2073 6f61 705f 6e65 775f 5f78 6f70 5f5f soap_new__xop__\n+00123000: 496e 636c 7564 6528 3c61 2063 6c61 7373 Include(s\n+00123030: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n+00123040: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    file.xop__Inc\n+00123060: 6c75 6465 2d26 6774 3b69 6420 3d20 4e55 lude->id = NU\n+00123070: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
    .
    fil\n+00123090: 652e 786f 705f 5f49 6e63 6c75 6465 2d26 e.xop__Include-&\n+001230a0: 6774 3b74 7970 6520 3d20 7479 7065 3b20 gt;type = type; \n+001230b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    file.xo\n+001230d0: 705f 5f49 6e63 6c75 6465 2d26 6774 3b6f p__Include->o\n+001230e0: 7074 696f 6e73 203d 204e 554c 4c3b 203c ptions = NULL; <\n+001230f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n+00123110: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    file.xmime5__c\n+00123130: 6f6e 7465 6e74 5479 7065 203d 2074 7970 ontentType = typ\n+00123140: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    file\n+00123160: 2e66 696c 656e 616d 6520 3d20 6669 6c65 .filename = file\n+00123170: 6e61 6d65 3b20 3c2f 6469 763e 0a3c 6469 name;
    . \n+00123190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001231c0: 2f20 5468 6520 6f62 6a65 6374 2068 6f6c / The object hol\n+001231d0: 6469 6e67 2061 6c6c 2069 6e66 6f72 6d61 ding all informa\n+001231e0: 7469 6f6e 2074 6f20 7265 6164 2064 6174 tion to read dat\n+001231f0: 6120 3c2f 7370 616e 3e3c 2f64 6976 3e0a a
    .\n+00123200: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    FileStreamIn *\n+00123220: 696e 7320 3d20 3c73 7061 6e20 636c 6173 ins = new<\n+00123240: 2f73 7061 6e3e 2046 696c 6553 7472 6561 /span> FileStrea\n+00123250: 6d49 6e28 6572 726f 7268 616e 646c 6572 mIn(errorhandler\n+00123260: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    ins-\n+00123280: 2667 743b 7365 7446 696c 6550 6174 6828 >setFilePath(\n+00123290: 3c61 2063 6c61 7373 3d22 636f 6465 2220 path);
    .
    ins\n+00123300: 2d26 6774 3b73 6574 4669 6c65 4e61 6d65 ->setFileName\n+00123310: 2866 696c 656e 616d 6529 3b20 3c2f 6469 (filename); .
    .f\n+00123350: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include\n+00123360: 2d26 6774 3b5f 5f73 697a 6520 3d20 7369 ->__size = si\n+00123370: 7a65 3b20 3c2f 6469 763e 0a3c 6469 7620 ze;
    .
    fil\n+00123390: 652e 786f 705f 5f49 6e63 6c75 6465 2d26 e.xop__Include-&\n+001233a0: 6774 3b5f 5f70 7472 203d 2028 3c73 7061 gt;__ptr = (unsigned \n+001233f0: 6368 6172 3c2f 7370 616e 3e2a 2969 6e73 char*)ins\n+00123400: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap::path<\n+001234b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    char pa\n+001234d0: 7468 5b53 4f41 505f 5441 474c 454e 5d3c th[SOAP_TAGLEN]<\n+001234e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    The clie\n+00123500: 6e74 2072 6571 7565 7374 2070 6174 6820 nt request path \n+00123510: 6173 2072 6563 6569 7665 6420 6f6e 2074 as received on t\n+00123520: 6865 2073 6572 7665 7220 7369 6465 2e3c he server side.<\n+00123530: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00123550: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00123560: 6170 322e 683a 3430 3332 3c2f 6469 763e ap2.h:4032
    \n+00123570: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    To read the MTO\n+001235a0: 4d20 6461 7461 2066 6f72 2074 7261 6e73 M data for trans\n+001235b0: 6d69 7373 696f 6e3a 3c2f 703e 0a3c 6469 mission:

    .
    v\n+00123600: 6f69 643c 2f73 7061 6e3e 202a 6d69 6d65 oid *mime\n+00123610: 5f72 6561 645f 6f70 656e 283c 7370 616e _read_open(struct <\n+00123640: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00123650: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00123660: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00123670: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001236a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+001236c0: 2f73 7061 6e3e 202a 6861 6e64 6c65 2c20 /span> *handle, \n+001236d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+00123710: 723c 2f73 7061 6e3e 202a 3c73 7061 6e20 r *id, <\n+00123740: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00123750: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+00123780: 3c2f 7370 616e 3e20 2a74 7970 652c 203c *type, <\n+00123790: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001237a0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001237d0: 3c2f 7370 616e 3e20 2a64 6573 6372 6970 *descrip\n+001237e0: 7469 6f6e 2920 3c2f 6469 763e 0a3c 6469 tion)
    .{\n+00123800: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+00123840: 2168 616e 646c 6529 203c 2f64 6976 3e0a !handle)
    .\n+00123850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00123880: 7265 7475 726e 3c2f 7370 616e 3e20 4e55 return NU\n+00123890: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
    .
    F\n+001238b0: 696c 6553 7472 6561 6d49 6e20 2a69 6e73 ileStreamIn *ins\n+001238c0: 203d 2028 4669 6c65 5374 7265 616d 496e = (FileStreamIn\n+001238d0: 2a29 6861 6e64 6c65 3b20 3c2f 6469 763e *)handle;
    \n+001238e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+00123910: 663c 2f73 7061 6e3e 2028 2169 6e73 2d26 f (!ins-&\n+00123920: 6774 3b6f 7065 6e28 2929 203c 2f64 6976 gt;open()) .
    {
    .\n+00123960: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap<\n+00123990: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error = SOAP_ERR; <\n+00123a50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return NULL;
    \n+00123aa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+00123ad0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00123af0: 726e 3c2f 7370 616e 3e20 6861 6e64 6c65 rn handle\n+00123b00: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    \n+00123b50: 766f 6964 3c2f 7370 616e 3e20 6d69 6d65 void mime\n+00123b60: 5f72 6561 645f 636c 6f73 6528 3c73 7061 _read_close(struct \n+00123b90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00123bc0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00123bf0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void\n+00123c10: 3c2f 7370 616e 3e20 2a68 616e 646c 6529 *handle)\n+00123c20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+00123c70: 6966 3c2f 7370 616e 3e20 2821 6861 6e64 if (!hand\n+00123c80: 6c65 2920 3c2f 6469 763e 0a3c 6469 7620 le)
    .
    \n+00123ca0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00123cc0: 6e3c 2f73 7061 6e3e 3b20 3c2f 6469 763e n;
    \n+00123cd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    FileStreamI\n+00123cf0: 6e20 2a69 6e73 203d 2028 4669 6c65 5374 n *ins = (FileSt\n+00123d00: 7265 616d 496e 2a29 6861 6e64 6c65 3b20 reamIn*)handle; \n+00123d10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    delete i\n+00123d50: 6e73 3b20 3c2f 6469 763e 0a3c 6469 7620 ns;
    .
    } <\n+00123d70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t \n+00123db0: 6d69 6d65 5f72 6561 6428 3c73 7061 6e20 mime_read(\n+00123dd0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00123e10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00123e20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00123e30: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00123e40: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle, <\n+00123e70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00123e80: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *b\n+00123ee0: 7566 3c2f 613e 2c20 3c73 7061 6e20 636c uf, size_t \n+00123f10: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
    .{<\n+00123f30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!\n+00123f70: 6861 6e64 6c65 2920 3c2f 6469 763e 0a3c handle)
    .<\n+00123f80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123f90: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n+00123fb0: 6574 7572 6e3c 2f73 7061 6e3e 2030 3b20 eturn 0; \n+00123fc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    FileS\n+00123fe0: 7472 6561 6d49 6e20 2a69 6e73 203d 2028 treamIn *ins = (\n+00123ff0: 4669 6c65 5374 7265 616d 496e 2a29 6861 FileStreamIn*)ha\n+00124000: 6e64 6c65 3b20 3c2f 6469 763e 0a3c 6469 ndle;
    . \n+00124020: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n+00124040: 743c 2f73 7061 6e3e 206e 7265 6164 203d t nread =\n+00124050: 2069 6e73 2d26 6774 3b72 6561 6428 3c61 ins->read(buf, \n+001240b0: 6c65 6e29 3b20 3c2f 6469 763e 0a3c 6469 len);
    . \n+001240d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (ins->st\n+00124100: 7265 616d 4572 726f 7228 2929 203c 2f64 reamError()) .
    {
    .\n+00124130: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa\n+00124170: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error = i\n+001241d0: 6e73 2d26 6774 3b73 7472 6561 6d45 7272 ns->streamErr\n+001241e0: 6f72 2829 3b20 3c2f 6469 763e 0a3c 6469 or();
    . \n+00124200: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n+00124220: 7572 6e3c 2f73 7061 6e3e 2030 3b20 3c2f urn 0; .
    } .
    \n+00124280: 7265 7475 726e 3c2f 7370 616e 3e20 6e72 return nr\n+00124290: 6561 643b 203c 2f64 6976 3e0a 3c64 6976 ead;
    .}<\n+001242b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP_ERR
    #defi\n+00124390: 6e65 2053 4f41 505f 4552 523c 2f64 6976 ne SOAP_ERR
    A soap_statu\n+001243c0: 7320 6572 726f 7220 636f 6465 3a20 616e s error code: an\n+001243d0: 2075 6e73 7065 6369 6669 6564 2065 7272 unspecified err\n+001243e0: 6f72 206f 6363 7572 7265 642e 3c2f 6469 or occurred.
    Definiti\n+00124410: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00124420: 2e68 3a32 3337 343c 2f64 6976 3e3c 2f64 .h:2374
    .

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

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

    .Redirecting i\n+001244c0: 6e62 6f75 6e64 204d 494d 452f 4d54 4f4d nbound MIME/MTOM\n+001244d0: 2073 7472 6561 6d73 2062 6173 6564 206f streams based o\n+001244e0: 6e20 534f 4150 2062 6f64 7920 636f 6e74 n SOAP body cont\n+001244f0: 656e 743c 2f68 323e 0a3c 703e 5768 656e ent

    .

    When\n+00124500: 2069 7420 6973 2070 7265 6665 7261 626c it is preferabl\n+00124510: 6520 6f72 2072 6571 7569 7265 6420 746f e or required to\n+00124520: 2072 6564 6972 6563 7420 696e 626f 756e redirect inboun\n+00124530: 6420 4d49 4d45 2f4d 544f 4d20 6174 7461 d MIME/MTOM atta\n+00124540: 6368 6d65 6e74 2073 7472 6561 6d73 2062 chment streams b\n+00124550: 6173 6564 206f 6e20 534f 4150 206d 6573 ased on SOAP mes\n+00124560: 7361 6765 2062 6f64 7920 636f 6e74 656e sage body conten\n+00124570: 742c 2077 6865 7265 2066 6f72 2065 7861 t, where for exa\n+00124580: 6d70 6c65 2074 6865 206e 616d 6573 206f mple the names o\n+00124590: 6620 7468 6520 7265 736f 7572 6365 7320 f the resources \n+001245a0: 6172 6520 6c69 7374 6564 2069 6e20 7468 are listed in th\n+001245b0: 6520 534f 4150 206d 6573 7361 6765 2062 e SOAP message b\n+001245c0: 6f64 792c 2061 6e20 616c 7465 726e 6174 ody, an alternat\n+001245d0: 6976 6520 6d65 6368 616e 6973 6d20 6d75 ive mechanism mu\n+001245e0: 7374 2062 6520 7573 6564 2074 6f20 6861 st be used to ha\n+001245f0: 6e64 6c65 2074 6865 2061 7474 6163 686d ndle the attachm\n+00124600: 656e 7473 2e20 5468 6973 206d 6563 6861 ents. This mecha\n+00124610: 6e69 736d 2063 616e 2062 6520 7573 6564 nism can be used\n+00124620: 2061 7420 7468 6520 636c 6965 6e74 2061 at the client a\n+00124630: 6e64 2073 6572 7665 7220 7369 6465 2e3c nd server side.<\n+00124640: 2f70 3e0a 3c70 3e42 6563 6175 7365 2074 /p>.

    Because t\n+00124650: 6865 2072 6f75 7469 6e67 206f 6620 7468 he routing of th\n+00124660: 6520 7374 7265 616d 7320 6973 2061 6363 e streams is acc\n+00124670: 6f6d 706c 6973 6865 6420 7769 7468 2065 omplished with e\n+00124680: 7870 6c69 6369 7420 6675 6e63 7469 6f6e xplicit function\n+00124690: 2063 616c 6c73 2c20 7468 6973 206d 6574 calls, this met\n+001246a0: 686f 6420 7368 6f75 6c64 206f 6e6c 7920 hod should only \n+001246b0: 6265 2075 7365 6420 7768 656e 2072 6571 be used when req\n+001246c0: 7569 7265 6420 616e 6420 7368 6f75 6c64 uired and should\n+001246d0: 206e 6f74 2062 6520 636f 6e73 6964 6572 not be consider\n+001246e0: 6564 206f 7074 696f 6e61 6c2e 2054 6861 ed optional. Tha\n+001246f0: 7420 6973 2c20 7768 656e 2079 6f75 2065 t is, when you e\n+00124700: 6e61 626c 6520 7468 6973 206d 6574 686f nable this metho\n+00124710: 642c 2079 6f75 206d 7573 7420 6368 6563 d, you must chec\n+00124720: 6b20 666f 7220 7065 6e64 696e 6720 4d49 k for pending MI\n+00124730: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n+00124740: 6e74 7320 616e 6420 6861 6e64 6c65 2074 nts and handle t\n+00124750: 6865 6d20 6170 7072 6f70 7269 6174 656c hem appropriatel\n+00124760: 792e 2054 6869 7320 6973 2074 7275 6520 y. This is true \n+00124770: 6576 656e 2077 6865 6e20 796f 7520 646f even when you do\n+00124780: 6e27 7420 6578 7065 6374 204d 494d 452f n't expect MIME/\n+00124790: 4d54 4f4d 2061 7474 6163 686d 656e 7473 MTOM attachments\n+001247a0: 2069 6e20 7468 6520 7061 796c 6f61 642c in the payload,\n+001247b0: 2062 6563 6175 7365 2074 6865 2070 6565 because the pee\n+001247c0: 7220 6d61 7920 7472 6963 6b20 796f 7520 r may trick you \n+001247d0: 6279 2073 656e 6469 6e67 2061 7474 6163 by sending attac\n+001247e0: 686d 656e 7473 2061 6e79 7761 7920 616e hments anyway an\n+001247f0: 6420 796f 7520 7368 6f75 6c64 2062 6520 d you should be \n+00124800: 7072 6570 6172 6564 2074 6f20 6163 6365 prepared to acce\n+00124810: 7074 206f 7220 7265 6a65 6374 2074 6865 pt or reject the\n+00124820: 6d2e 3c2f 703e 0a3c 703e 5468 6520 6578 m.

    .

    The ex\n+00124830: 706c 6963 6974 204d 494d 452f 4d54 4f4d plicit MIME/MTOM\n+00124840: 2073 7472 6561 6d69 6e67 206d 6563 6861 streaming mecha\n+00124850: 6e69 736d 2063 6f6e 7369 7374 7320 6f66 nism consists of\n+00124860: 2074 6872 6565 2041 5049 2066 756e 6374 three API funct\n+00124870: 696f 6e73 3a3c 2f70 3e0a 3c75 6c3e 0a3c ions:

    .
      .<\n+00124880: 6c69 3e3c 636f 6465 3e76 6f69 6420 3c61 li>void soap_post\n+00124920: 5f63 6865 636b 5f6d 696d 655f 6174 7461 _check_mime_atta\n+00124930: 6368 6d65 6e74 7328 7374 7275 6374 2073 chments(struct s\n+00124940: 6f61 7020 2a73 6f61 7029 3c2f 613e 3c2f oap *soap) This funct\n+00124960: 696f 6e20 656e 6162 6c65 7320 706f 7374 ion enables post\n+00124970: 2d70 726f 6365 7373 696e 6720 6f66 204d -processing of M\n+00124980: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n+00124990: 656e 7473 2072 6563 6569 7665 642e 2054 ents received. T\n+001249a0: 6869 7320 6d65 616e 7320 7468 6174 2074 his means that t\n+001249b0: 6865 2070 7265 7365 6e63 6520 6f66 204d he presence of M\n+001249c0: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n+001249d0: 656e 7473 206d 7573 7420 6265 2065 7870 ents must be exp\n+001249e0: 6c69 6369 746c 7920 6368 6563 6b65 6420 licitly checked \n+001249f0: 6279 2063 616c 6c69 6e67 203c 636f 6465 by calling soap_\n+00124a80: 6368 6563 6b5f 6d69 6d65 5f61 7474 6163 check_mime_attac\n+00124a90: 686d 656e 7473 3c2f 613e 3c2f 636f 6465 hments after the mess\n+00124ab0: 6167 6520 7761 7320 7265 6365 6976 6564 age was received\n+00124ac0: 2e20 5768 656e 2074 6869 7320 6675 6e63 . When this func\n+00124ad0: 7469 6f6e 2072 6574 7572 6e73 206e 6f6e tion returns non\n+00124ae0: 7a65 726f 2028 7472 7565 292c 2074 6865 zero (true), the\n+00124af0: 6e20 7468 6520 6174 7461 6368 6d65 6e74 n the attachment\n+00124b00: 7320 6361 6e20 6265 2072 6574 7269 6576 s can be retriev\n+00124b10: 6564 2062 7920 6361 6c6c 696e 6720 3c63 ed by calling soap_rec\n+00124ba0: 765f 6d69 6d65 5f61 7474 6163 686d 656e v_mime_attachmen\n+00124bb0: 743c 2f61 3e3c 2f63 6f64 653e 2072 6570 t rep\n+00124bc0: 6561 7465 646c 7920 746f 2072 6574 7269 eatedly to retri\n+00124bd0: 6576 6520 6561 6368 2061 7474 6163 686d eve each attachm\n+00124be0: 656e 7420 756e 7469 6c20 7468 6973 2066 ent until this f\n+00124bf0: 756e 6374 696f 6e20 7265 7475 726e 7320 unction returns \n+00124c00: 4e55 4c4c 2e20 5468 6973 2066 756e 6374 NULL. This funct\n+00124c10: 696f 6e20 7265 7475 726e 7320 6120 706f ion returns a po\n+00124c20: 696e 7465 7220 746f 2061 203c 636f 6465 inter to a struct soap_mult\n+00124cb0: 6970 6172 743c 2f61 3e3c 2f63 6f64 653e ipart\n+00124cc0: 2061 7474 6163 686d 656e 742e 3c2f 6c69 attachment..
    • int \n+00124ce0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_c\n+00124d60: 6865 636b 5f6d 696d 655f 6174 7461 6368 heck_mime_attach\n+00124d70: 6d65 6e74 7328 7374 7275 6374 2073 6f61 ments(struct soa\n+00124d80: 7020 2a73 6f61 7029 3c2f 613e 3c2f 636f p *soap) This functio\n+00124da0: 6e20 6368 6563 6b73 2074 6865 2070 7265 n checks the pre\n+00124db0: 7365 6e63 6520 6f66 2061 204d 494d 452f sence of a MIME/\n+00124dc0: 4d54 4f4d 2061 7474 6163 686d 656e 7420 MTOM attachment \n+00124dd0: 6166 7465 7220 6361 6c6c 696e 6720 6120 after calling a \n+00124de0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n+00124df0: 6e20 6279 2072 6574 7572 6e69 6e67 206e n by returning n\n+00124e00: 6f6e 7a65 726f 2077 6865 6e20 6174 7461 onzero when atta\n+00124e10: 6368 6d65 6e74 7320 6172 6520 7072 6573 chments are pres\n+00124e20: 656e 742e 2052 6574 7572 6e73 206e 6f6e ent. Returns non\n+00124e30: 7a65 726f 2069 6620 6174 7461 6368 6d65 zero if attachme\n+00124e40: 6e74 7320 6172 6520 7072 6573 656e 742e nts are present.\n+00124e50: 2052 6571 7569 7265 7320 3c63 6f64 653e Requires \n+00124e60: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_po\n+00124ef0: 7374 5f63 6865 636b 5f6d 696d 655f 6174 st_check_mime_at\n+00124f00: 7461 6368 6d65 6e74 733c 2f61 3e3c 2f63 tachments.
    • .
    • <\n+00124f20: 636f 6465 3e73 7472 7563 7420 3c61 2063 code>struct soap_\n+00124fa0: 6d75 6c74 6970 6172 743c 2f61 3e20 2a73 multipart *s\n+00124fb0: 6f61 705f 7265 6376 5f6d 696d 655f 6174 oap_recv_mime_at\n+00124fc0: 7461 6368 6d65 6e74 2873 7472 7563 7420 tachment(struct \n+00124fd0: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n+00124fe0: 202a 6861 6e64 6c65 293c 2f63 6f64 653e *handle)\n+00124ff0: 2054 6869 7320 6675 6e63 7469 6f6e 2070 This function p\n+00125000: 6172 7365 7320 616e 2061 7474 6163 686d arses an attachm\n+00125010: 656e 7420 616e 6420 696e 766f 6b65 7320 ent and invokes \n+00125020: 7468 6520 4d49 4d45 2063 616c 6c62 6163 the MIME callbac\n+00125030: 6b73 2077 6865 6e20 7365 742e 2054 6865 ks when set. The\n+00125040: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter i\n+00125060: 7320 7061 7373 6564 2074 6f20 3c63 6f64 s passed to fmimewriteopen\n+00125080: 3c2f 636f 6465 3e2e 2054 6865 2068 616e . The han\n+00125090: 646c 6520 6d61 7920 636f 6e74 6169 6e20 dle may contain \n+001250a0: 616e 7920 6461 7461 2074 6861 7420 6973 any data that is\n+001250b0: 2065 7874 7261 6374 6564 2066 726f 6d20 extracted from \n+001250c0: 7468 6520 534f 4150 206d 6573 7361 6765 the SOAP message\n+001250d0: 2062 6f64 7920 746f 2067 7569 6465 2074 body to guide t\n+001250e0: 6865 2072 6564 6972 6563 7469 6f6e 206f he redirection o\n+001250f0: 6620 7468 6520 7374 7265 616d 2069 6e20 f the stream in \n+00125100: 7468 6520 6361 6c6c 6261 636b 732e 2052 the callbacks. R\n+00125110: 6574 7572 6e73 2061 2073 7472 7563 7420 eturns a struct \n+00125120: 7769 7468 2061 203c 636f 6465 3e63 6861 with a cha\n+00125130: 7220 2a70 7472 3c2f 636f 6465 3e20 6d65 r *ptr me\n+00125140: 6d62 6572 2074 6861 7420 636f 6e74 6169 mber that contai\n+00125150: 6e73 2074 6865 2068 616e 646c 6520 7661 ns the handle va\n+00125160: 6c75 6520 7265 7475 726e 6564 2062 7920 lue returned by \n+00125170: 7468 6520 3c63 6f64 653e 666d 696d 6577 the fmimew\n+00125180: 7269 7465 6f70 656e 3c2f 636f 6465 3e20 riteopen \n+00125190: 6361 6c6c 6261 636b 2c20 616e 6420 3c63 callback, and char *id, char \n+001251c0: 2a74 7970 653c 2f63 6f64 653e 2c20 616e *type, an\n+001251d0: 6420 3c63 6f64 653e 6368 6172 202a 6465 d char *de\n+001251e0: 7363 7269 7074 696f 6e3c 2f63 6f64 653e scription\n+001251f0: 206d 656d 6265 7220 7661 7269 6162 6c65 member variable\n+00125200: 7320 7769 7468 2074 6865 204d 494d 4520 s with the MIME \n+00125210: 6964 2c20 7479 7065 2c20 616e 6420 6465 id, type, and de\n+00125220: 7363 7269 7074 696f 6e20 696e 666f 2077 scription info w\n+00125230: 6865 6e20 7072 6573 656e 7420 696e 2074 hen present in t\n+00125240: 6865 2061 7474 6163 686d 656e 742e 3c2f he attachment..
    .

    Exa\n+00125260: 6d70 6c65 2063 6c69 656e 7420 696e 2043 mple client in C\n+00125270: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    struct soap *soap = soap_n\n+00125380: 6577 313c 2f61 3e28 3c61 2063 6c61 7373 ew1(SOAP_\n+001253e0: 454e 435f 4d54 4f4d 3c2f 613e 293b 203c ENC_MTOM); <\n+001253f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_p\n+00125460: 6f73 745f 6368 6563 6b5f 6d69 6d65 5f61 ost_check_mime_a\n+00125470: 7474 6163 686d 656e 7473 3c2f 613e 283c ttachments(<\n+00125480: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00125490: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001254a0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001254b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (s\n+001254f0: 6f61 705f 6361 6c6c 5f6e 735f 5f6d 794d oap_call_ns__myM\n+00125500: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa\n+00125530: 703c 2f61 3e2c 202e 2e2e 2929 203c 2f64 p, ...)) .
    {
    .\n+00125570: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n+001255d0: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap, stder\n+00125610: 7229 3b20 3c73 7061 6e20 636c 6173 733d r); // an \n+00125630: 6572 726f 7220 6f63 6375 7272 6564 203c error occurred <\n+00125640: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+00125660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else <\n+001256a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+001256c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n+001256f0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_\n+00125750: 6368 6563 6b5f 6d69 6d65 5f61 7474 6163 check_mime_attac\n+00125760: 686d 656e 7473 3c2f 613e 283c 6120 636c hments(soap)).
    {
    .<\n+001257c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001257d0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // at\n+001257f0: 7461 6368 6d65 6e74 7320 6172 6520 7072 tachments are pr\n+00125800: 6573 656e 742c 2063 6861 6e6e 656c 2069 esent, channel i\n+00125810: 7320 7374 696c 6c20 6f70 656e 203c 2f73 s still open
    .
    \n+00125840: 203c 7370 616e 2063 6c61 7373 3d22 6b65 do
    .
    \n+00125880: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n+001258a0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // ge\n+001258c0: 7420 6461 7461 2026 2333 393b 6861 6e64 t data 'hand\n+001258d0: 6c65 2623 3339 3b20 6672 6f6d 2053 4f41 le' from SOA\n+001258e0: 5020 7265 7370 6f6e 7365 2061 6e64 2070 P response and p\n+001258f0: 6173 7320 746f 2063 616c 6c62 6163 6b73 ass to callbacks\n+00125900: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00125910: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00125920: 3e20 2020 2020 202e 2e2e 203c 7370 616e > ... // set the fmim\n+00125950: 6520 6361 6c6c 6261 636b 732c 2069 6620 e callbacks, if \n+00125960: 6e65 6564 6564 203c 2f73 7061 6e3e 3c2f needed .
    struct soap_multipar\n+001259f0: 743c 2f61 3e20 2a63 6f6e 7465 6e74 203d t *content =\n+00125a00: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_recv_mim\n+00125a60: 655f 6174 7461 6368 6d65 6e74 3c2f 613e e_attachment\n+00125a70: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00125aa0: 2c20 283c 7370 616e 2063 6c61 7373 3d22 , (voi\n+00125ac0: 643c 2f73 7061 6e3e 2a29 6861 6e64 6c65 d*)handle\n+00125ad0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+00125af0: 2020 7072 696e 7466 283c 7370 616e 2063 printf("Recei\n+00125b20: 7665 6420 6174 7461 6368 6d65 6e74 2077 ved attachment w\n+00125b30: 6974 6820 6964 3d25 7320 616e 6420 7479 ith id=%s and ty\n+00125b40: 7065 3d25 735c 6e26 7175 6f74 3b3c 2f73 pe=%s\\n", content-&g\n+00125b60: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;id?con\n+00125bc0: 7465 6e74 2d26 6774 3b3c 6120 636c 6173 tent->id<\n+00125c20: 2f61 3e3a 3c73 7061 6e20 636c 6173 733d /a>:\n+00125c40: 2671 756f 743b 2671 756f 743b 3c2f 7370 "", content->\n+00125c60: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;type?co\n+00125cc0: 6e74 656e 742d 2667 743b 3c61 2063 6c61 ntent->ty\n+00125d20: 7065 3c2f 613e 3a3c 7370 616e 2063 6c61 pe:""<\n+00125d50: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    .\n+00125d60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    } while (\n+00125da0: 636f 6e74 656e 7429 3b20 3c2f 6469 763e content);
    \n+00125db0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (soap->\n+00125e20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error)
    .. \n+00125f50: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    } .
    soap_d\n+00125fe0: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .\n+001260d0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+001261d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+00126260: 7374 7275 6374 2073 6f61 705f 6d75 6c74 struct soap_mult\n+00126270: 6970 6172 7420 2a20 736f 6170 5f72 6563 ipart * soap_rec\n+00126280: 765f 6d69 6d65 5f61 7474 6163 686d 656e v_mime_attachmen\n+00126290: 7428 7374 7275 6374 2073 6f61 7020 2a73 t(struct soap *s\n+001262a0: 6f61 702c 2076 6f69 6420 2a68 616e 646c oap, void *handl\n+001262b0: 6529 3c2f 6469 763e 3c64 6976 2063 6c61 e)
    Get a\n+001262d0: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n+001262e0: 686d 656e 742e 3c2f 6469 763e 3c2f 6469 hment.
    .
    .
    <\n+001264d0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+001264e0: 726f 7570 5f5f 6d69 6d65 2e68 746d 6c23 roup__mime.html#\n+001264f0: 6761 6632 6362 3636 3161 3331 6630 6363 gaf2cb661a31f0cc\n+00126500: 3433 3161 3337 3338 3132 3564 6465 6462 431a3738125ddedb\n+00126510: 3866 223e 736f 6170 5f63 6865 636b 5f6d 8f\">soap_check_m\n+00126520: 696d 655f 6174 7461 6368 6d65 6e74 733c ime_attachments<\n+00126530: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int\n+00126550: 2073 6f61 705f 6368 6563 6b5f 6d69 6d65 soap_check_mime\n+00126560: 5f61 7474 6163 686d 656e 7473 2873 7472 _attachments(str\n+00126570: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+00126580: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Check fo\n+001265a0: 7220 6120 4d49 4d45 2f4d 544f 4d20 6174 r a MIME/MTOM at\n+001265b0: 7461 6368 6d65 6e74 2e3c 2f64 6976 3e3c tachment.
    <\n+001265c0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+001265e0: 5468 6520 7365 7276 6572 2d73 6964 6520 The server-side \n+001265f0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n+00126600: 6e73 2061 7265 2069 6d70 6c65 6d65 6e74 ns are implement\n+00126610: 6564 2061 7320 7573 7561 6c2c 2062 7574 ed as usual, but\n+00126620: 2077 6974 6820 6164 6469 7469 6f6e 616c with additional\n+00126630: 2063 6865 636b 7320 666f 7220 4d49 4d45 checks for MIME\n+00126640: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment\n+00126650: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n+00126680: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00126690: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
    \n+001266b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    ...
    }
    \n+001269c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int ns__myMethod(<\n+00126a20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00126a30: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+00126aa0: 2f61 3e2c 202e 2e2e 2920 3c2f 6469 763e /a>, ...)
    \n+00126ab0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    .\n+00126ae0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // serv\n+00126b00: 6572 2d73 6964 6520 7072 6f63 6573 7369 er-side processi\n+00126b10: 6e67 206c 6f67 6963 203c 2f73 7061 6e3e ng logic \n+00126b20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .
    {<\n+00126c20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // attachments\n+00126c60: 2061 7265 2070 7265 7365 6e74 2c20 6368 are present, ch\n+00126c70: 616e 6e65 6c20 6973 2073 7469 6c6c 206f annel is still o\n+00126c80: 7065 6e20 3c2f 7370 616e 3e3c 2f64 6976 pen .
    do .
    {
    \n+00126cf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    \n+00126f40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    printf(\n+00126f60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00126f80: 743b 5265 6365 6976 6564 2061 7474 6163 t;Received attac\n+00126f90: 686d 656e 7420 7769 7468 2069 643d 2573 hment with id=%s\n+00126fa0: 2061 6e64 2074 7970 653d 2573 5c6e 2671 and type=%s\\n&q\n+00126fb0: 756f 743b 3c2f 7370 616e 3e2c 2063 6f6e uot;, con\n+00126fc0: 7465 6e74 2d26 6774 3b3c 6120 636c 6173 tent->id<\n+00127020: 2f61 3e3f 636f 6e74 656e 742d 2667 743b /a>?content->\n+00127030: 3c61 2063 6c61 7373 3d22 636f 6465 2220 id:"&qu\n+001270b0: 6f74 3b3c 2f73 7061 6e3e 2c20 636f 6e74 ot;, cont\n+001270c0: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->type\n+00127120: 3c2f 613e 3f63 6f6e 7465 6e74 2d26 6774 ?content->\n+00127130: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;type:"\n+001271b0: 2671 756f 743b 3c2f 7370 616e 3e29 3b20 "); \n+001271c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } <\n+001271e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001271f0: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (content);\n+00127210: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (soap->\n+001272d0: 6572 726f 723c 2f61 3e29 203c 2f64 6976 error) .\n+001273b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+001273e0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n+00127400: 6572 7665 722d 7369 6465 2070 726f 6365 erver-side proce\n+00127410: 7373 696e 6720 6c6f 6769 6320 3c2f 7370 ssing logic
    ..\n+001274e0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n+00127500: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+00127520: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+00127530: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Streaming chun\n+00127570: 6b65 6420 4d49 4d45 2f4d 544f 4d3c 2f68 ked MIME/MTOM.

    To send MI\n+00127590: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n+001275a0: 6e74 732c 2074 6865 2061 7474 6163 686d nts, the attachm\n+001275b0: 656e 7420 7369 7a65 7320 6d75 7374 2062 ent sizes must b\n+001275c0: 6520 6465 7465 726d 696e 6564 2069 6e20 e determined in \n+001275d0: 6164 7661 6e63 6520 746f 2063 616c 6375 advance to calcu\n+001275e0: 6c61 7465 2048 5454 5020 6d65 7373 6167 late HTTP messag\n+001275f0: 6520 6c65 6e67 7468 2072 6571 7569 7265 e length require\n+00127600: 6420 746f 2073 7472 6561 6d20 4d49 4d45 d to stream MIME\n+00127610: 2f4d 544f 4d20 6f76 6572 2048 5454 502e /MTOM over HTTP.\n+00127620: 2048 6f77 6576 6572 2c20 6368 756e 6b65 However, chunke\n+00127630: 6420 4d49 4d45 2f4d 544f 4d20 746f 6765 d MIME/MTOM toge\n+00127640: 7468 6572 2077 6974 6820 6368 756e 6b65 ther with chunke\n+00127650: 6420 4854 5450 2063 616e 2062 6520 7573 d HTTP can be us\n+00127660: 6564 2074 6f20 6f6d 6974 2074 6869 7320 ed to omit this \n+00127670: 7374 6570 2e20 4669 7273 7420 7365 7420 step. First set \n+00127680: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n+00127690: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e20 IO_CHUNK \n+001276a0: 666c 6167 2e20 5468 656e 2c20 746f 2073 flag. Then, to s\n+001276b0: 7472 6561 6d20 6368 756e 6b65 6420 4d49 tream chunked MI\n+001276c0: 4d45 2f4d 544f 4d2c 2073 6574 2074 6865 ME/MTOM, set the\n+001276d0: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member of a\n+001276f0: 6e20 6174 7461 6368 6d65 6e74 2074 6f20 n attachment to \n+00127700: 7a65 726f 2061 6e64 2065 6e61 626c 6520 zero and enable \n+00127710: 4d49 4d45 2f4d 544f 4d20 6368 756e 6b69 MIME/MTOM chunki\n+00127720: 6e67 2e20 5468 6520 4d49 4d45 2f4d 544f ng. The MIME/MTO\n+00127730: 4d20 3c63 6f64 653e 3c61 2063 6c61 7373 M soa\n+001277d0: 703a 3a66 6d69 6d65 7265 6164 3c2f 613e p::fmimeread\n+001277e0: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+001277f0: 2074 6865 6e20 6665 7463 6865 7320 6461 then fetches da\n+00127800: 7461 2069 6e20 6368 756e 6b73 2061 6e64 ta in chunks and\n+00127810: 2069 7420 6973 2069 6d70 6f72 7461 6e74 it is important\n+00127820: 2074 6f20 6669 6c6c 2074 6865 2065 6e74 to fill the ent\n+00127830: 6972 6520 6275 6666 6572 2075 6e6c 6573 ire buffer unles\n+00127840: 7320 7468 6520 656e 6420 6f66 2074 6865 s the end of the\n+00127850: 2064 6174 6120 6861 7320 6265 656e 2072 data has been r\n+00127860: 6561 6368 6564 2061 6e64 2074 6865 206c eached and the l\n+00127870: 6173 7420 6368 756e 6b20 6973 2074 6f20 ast chunk is to \n+00127880: 6265 2073 656e 642e 2054 6861 7420 6973 be send. That is\n+00127890: 2c20 3c63 6f64 653e 3c61 2063 6c61 7373 , soa\n+00127930: 703a 3a66 6d69 6d65 7265 6164 3c2f 613e p::fmimeread\n+00127940: 3c2f 636f 6465 3e20 7368 6f75 6c64 2072 should r\n+00127950: 6574 7572 6e20 7468 6520 7661 6c75 6520 eturn the value \n+00127960: 6f66 2074 6865 206c 6173 7420 3c63 6f64 of the last len par\n+00127980: 616d 6574 6572 2061 6e64 2066 696c 6c20 ameter and fill \n+00127990: 7468 6520 656e 7469 7265 2062 7566 6665 the entire buffe\n+001279a0: 7220 3c63 6f64 653e 6275 663c 2f63 6f64 r buf for all chunk\n+001279c0: 7320 6578 6365 7074 2074 6865 206c 6173 s except the las\n+001279d0: 742e 2046 6f72 2074 6865 206c 6173 7420 t. For the last \n+001279e0: 6974 2072 6574 7572 6e73 2030 2e3c 2f70 it returns 0..

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

    .

    .SOAP\n+00127a50: 2f58 4d4c 206f 7665 7220 5544 503c 2f68 /XML over UDP.

    UDP is a s\n+00127a70: 696d 706c 652c 2075 6e72 656c 6961 626c imple, unreliabl\n+00127a80: 6520 6461 7461 6772 616d 2070 726f 746f e datagram proto\n+00127a90: 636f 6c3a 2055 4450 2073 6f63 6b65 7473 col: UDP sockets\n+00127aa0: 2061 7265 2063 6f6e 6e65 6374 696f 6e6c are connectionl\n+00127ab0: 6573 732e 2055 4450 2061 6464 7265 7373 ess. UDP address\n+00127ac0: 2066 6f72 6d61 7473 2061 7265 2069 6465 formats are ide\n+00127ad0: 6e74 6963 616c 2074 6f20 7468 6f73 6520 ntical to those \n+00127ae0: 7573 6564 2062 7920 5443 502e 2049 6e20 used by TCP. In \n+00127af0: 7061 7274 6963 756c 6172 2055 4450 2070 particular UDP p\n+00127b00: 726f 7669 6465 7320 6120 706f 7274 2069 rovides a port i\n+00127b10: 6465 6e74 6966 6965 7220 696e 2061 6464 dentifier in add\n+00127b20: 6974 696f 6e20 746f 2074 6865 206e 6f72 ition to the nor\n+00127b30: 6d61 6c20 496e 7465 726e 6574 2061 6464 mal Internet add\n+00127b40: 7265 7373 2066 6f72 6d61 742e 2054 6865 ress format. The\n+00127b50: 2055 4450 2070 6f72 7420 7370 6163 6520 UDP port space \n+00127b60: 6973 2073 6570 6172 6174 6520 6672 6f6d is separate from\n+00127b70: 2074 6865 2054 4350 2070 6f72 7420 7370 the TCP port sp\n+00127b80: 6163 6520 2869 2e65 2e20 6120 5544 5020 ace (i.e. a UDP \n+00127b90: 706f 7274 206d 6179 206e 6f74 2062 6520 port may not be \n+00127ba0: 2263 6f6e 6e65 6374 6564 2220 746f 2061 \"connected\" to a\n+00127bb0: 2054 4350 2070 6f72 7429 2e20 496e 2061 TCP port). In a\n+00127bc0: 6464 6974 696f 6e20 6272 6f61 6463 6173 ddition broadcas\n+00127bd0: 7420 7061 636b 6574 7320 6d61 7920 6265 t packets may be\n+00127be0: 2073 656e 7420 2861 7373 756d 696e 6720 sent (assuming \n+00127bf0: 7468 6520 756e 6465 726c 7969 6e67 206e the underlying n\n+00127c00: 6574 776f 726b 2073 7570 706f 7274 7320 etwork supports \n+00127c10: 7468 6973 2920 6279 2075 7369 6e67 2061 this) by using a\n+00127c20: 2072 6573 6572 7665 6420 2262 726f 6164 reserved \"broad\n+00127c30: 6361 7374 0a61 6464 7265 7373 223b 2074 cast.address\"; t\n+00127c40: 6869 7320 6164 6472 6573 7320 6973 206e his address is n\n+00127c50: 6574 776f 726b 2069 6e74 6572 6661 6365 etwork interface\n+00127c60: 2064 6570 656e 6465 6e74 2e3c 2f70 3e0a dependent.

    .\n+00127c70: 3c70 3e43 6c69 656e 742d 7369 6465 206d

    Client-side m\n+00127c80: 6573 7361 6765 7320 7769 7468 2053 4f41 essages with SOA\n+00127c90: 502d 6f76 6572 2d55 4450 2065 6e64 706f P-over-UDP endpo\n+00127ca0: 696e 7420 5552 4c73 2028 3c63 6f64 653e int URLs (\n+00127cb0: 736f 6170 2e75 6470 3a2f 2f2e 2e2e 3c2f soap.udp://...) are autom\n+00127cd0: 6174 6963 616c 6c79 2074 7261 6e73 6d69 atically transmi\n+00127ce0: 7474 6564 2061 7320 6461 7461 6772 616d tted as datagram\n+00127cf0: 732e 2053 6572 7665 722d 7369 6465 2061 s. Server-side a\n+00127d00: 7070 6c69 6361 7469 6f6e 7320 7368 6f75 pplications shou\n+00127d10: 6c64 2073 6574 2074 6865 203c 636f 6465 ld set the #SOAP_IO_UDP mode flag t\n+00127d40: 6f20 6163 6365 7074 2055 4450 2072 6571 o accept UDP req\n+00127d50: 7565 7374 732c 2065 2e67 2e20 7573 696e uests, e.g. usin\n+00127d60: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g soap_new1, soa\n+00127ee0: 705f 696e 6974 313c 2f61 3e3c 2f63 6f64 p_init1, or soap_set\n+00127fa0: 5f6d 6f64 653c 2f61 3e3c 2f63 6f64 653e _mode\n+00127fb0: 2e3c 2f70 3e0a 3c70 3e54 6865 206d 6178 .

    .

    The max\n+00127fc0: 696d 756d 206d 6573 7361 6765 206c 656e imum message len\n+00127fd0: 6774 6820 666f 7220 6461 7461 6772 616d gth for datagram\n+00127fe0: 2070 6163 6b65 7473 2069 7320 7265 7374 packets is rest\n+00127ff0: 7269 6374 6564 2062 7920 7468 6520 6275 ricted by the bu\n+00128000: 6666 6572 2073 697a 6520 3c63 6f64 653e ffer size \n+00128010: 2353 4f41 505f 4255 464c 454e 3c2f 636f #SOAP_BUFLEN, which is 65\n+00128030: 3533 3620 6279 2064 6566 6175 6c74 2c20 536 by default, \n+00128040: 756e 6c65 7373 2063 6f6d 7069 6c65 6420 unless compiled \n+00128050: 7769 7468 203c 636f 6465 3e23 5749 5448 with #WITH\n+00128060: 5f4c 4541 4e3c 2f63 6f64 653e 2074 6f20 _LEAN to \n+00128070: 7375 7070 6f72 7420 736d 616c 6c2d 7363 support small-sc\n+00128080: 616c 6520 656d 6265 6464 6564 2073 7973 ale embedded sys\n+00128090: 7465 6d73 2e20 466f 7220 5544 5020 7472 tems. For UDP tr\n+001280a0: 616e 7370 6f72 7420 3c63 6f64 653e 2353 ansport #S\n+001280b0: 4f41 505f 4255 464c 454e 3c2f 636f 6465 OAP_BUFLEN must not excee\n+001280d0: 6420 7468 6520 6d61 7869 6d75 6d20 5544 d the maximum UD\n+001280e0: 5020 7061 636b 6574 2073 697a 6520 3635 P packet size 65\n+001280f0: 3533 3620 2874 6865 2073 697a 6520 6f66 536 (the size of\n+00128100: 2064 6174 6167 7261 6d20 6d65 7373 6167 datagram messag\n+00128110: 6573 2069 7320 636f 6e73 7472 6169 6e65 es is constraine\n+00128120: 6420 6279 2074 6865 2055 4450 2070 6163 d by the UDP pac\n+00128130: 6b65 7420 7369 7a65 2032 5e31 363d 3635 ket size 2^16=65\n+00128140: 3533 3620 6173 2070 6572 2055 4450 2073 536 as per UDP s\n+00128150: 7461 6e64 6172 6429 2e20 596f 7520 6361 tandard). You ca\n+00128160: 6e20 7573 6520 636f 6d70 7265 7373 696f n use compressio\n+00128170: 6e20 7769 7468 203c 636f 6465 3e23 534f n with #SO\n+00128180: 4150 5f45 4e43 5f5a 4c49 423c 2f63 6f64 AP_ENC_ZLIB to reduce the\n+001281a0: 206d 6573 7361 6765 2073 697a 652c 2062 message size, b\n+001281b0: 7574 206e 6f74 6520 7468 6174 2063 6f6d ut note that com\n+001281c0: 7072 6573 7365 6420 534f 4150 2d6f 7665 pressed SOAP-ove\n+001281d0: 722d 5544 5020 6973 2061 2067 534f 4150 r-UDP is a gSOAP\n+001281e0: 2d73 7065 6369 6669 6320 6665 6174 7572 -specific featur\n+001281f0: 6520 6265 6361 7573 6520 6974 2069 7320 e because it is \n+00128200: 6e6f 7420 7061 7274 206f 6620 7468 6520 not part of the \n+00128210: 534f 4150 2d6f 7665 722d 5544 5020 7370 SOAP-over-UDP sp\n+00128220: 6563 6966 6963 6174 696f 6e2e 3c2f 703e ecification.

    \n+00128230: 0a3c 703e 5468 6520 534f 4150 2d6f 7665 .

    The SOAP-ove\n+00128240: 722d 5544 5020 7370 6563 6966 6963 6174 r-UDP specificat\n+00128250: 696f 6e20 7265 6c69 6573 206f 6e20 5753 ion relies on WS\n+00128260: 2d41 6464 7265 7373 696e 672e 2054 6865 -Addressing. The\n+00128270: 203c 656d 3e3c 636f 6465 3e77 7361 2e68 wsa.h\n+00128280: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+00128290: 6520 696e 2074 6865 203c 636f 6465 3e69 e in the i\n+001282a0: 6d70 6f72 743c 2f63 6f64 653e 2064 6972 mport dir\n+001282b0: 6563 746f 7279 2064 6566 696e 6573 2074 ectory defines t\n+001282c0: 6865 2057 532d 4164 6472 6573 7369 6e67 he WS-Addressing\n+001282d0: 2065 6c65 6d65 6e74 7320 666f 7220 636c elements for cl\n+001282e0: 6965 6e74 2061 6e64 2073 6572 7665 7220 ient and server \n+001282f0: 6170 706c 6963 6174 696f 6e73 2e3c 2f70 applications..

    The gSOAP i\n+00128310: 6d70 6c65 6d65 6e74 6174 696f 6e20 636f mplementation co\n+00128320: 6e66 6f72 6d73 2074 6f20 7468 6520 534f nforms to the SO\n+00128330: 4150 2d6f 7665 722d 5544 5020 7265 7175 AP-over-UDP requ\n+00128340: 6972 656d 656e 7473 3a3c 2f70 3e0a 3c75 irements:

    ..
  • SOAP-over\n+00128360: 2d55 4450 2073 6572 7665 7220 656e 6470 -UDP server endp\n+00128370: 6f69 6e74 2055 524c 2066 6f72 6d61 743a oint URL format:\n+00128380: 203c 656d 3e3c 636f 6465 3e73 6f61 702e soap.\n+00128390: 7564 703a 2f2f 686f 7374 3a70 6f72 742f udp://host:port/\n+001283a0: 7061 7468 3c2f 636f 6465 3e3c 2f65 6d3e path\n+001283b0: 3c2f 6c69 3e0a 3c6c 693e 5375 7070 6f72
  • .
  • Suppor\n+001283c0: 7420 6f6e 652d 7761 7920 6d65 7373 6167 t one-way messag\n+001283d0: 652d 6578 6368 616e 6765 2070 6174 7465 e-exchange patte\n+001283e0: 726e 2028 4d45 5029 2077 6865 7265 2061 rn (MEP) where a\n+001283f0: 2053 4f41 5020 656e 7665 6c6f 7065 2069 SOAP envelope i\n+00128400: 7320 6361 7272 6965 6420 696e 2061 2075 s carried in a u\n+00128410: 7365 7220 6461 7461 6772 616d 2e3c 2f6c ser datagram..
  • Support r\n+00128430: 6571 7565 7374 2d72 6573 706f 6e73 6520 equest-response \n+00128440: 6d65 7373 6167 652d 6578 6368 616e 6765 message-exchange\n+00128450: 2070 6174 7465 726e 2028 4d45 5029 2077 pattern (MEP) w\n+00128460: 6865 7265 2053 4f41 5020 656e 7665 6c6f here SOAP envelo\n+00128470: 7065 7320 6172 6520 6361 7272 6965 6420 pes are carried \n+00128480: 696e 2075 7365 7220 6461 7461 6772 616d in user datagram\n+00128490: 732e 3c2f 6c69 3e0a 3c6c 693e 5375 7070 s.
  • .
  • Supp\n+001284a0: 6f72 7420 6d75 6c74 6963 6173 7420 7472 ort multicast tr\n+001284b0: 616e 736d 6973 7369 6f6e 206f 6620 534f ansmission of SO\n+001284c0: 4150 2065 6e76 656c 6f70 6573 2063 6172 AP envelopes car\n+001284d0: 7269 6564 2069 6e20 7573 6572 2064 6174 ried in user dat\n+001284e0: 6167 7261 6d73 2e3c 2f6c 693e 0a3c 6c69 agrams.
  • .Support both SO\n+00128500: 4150 2031 2e31 2061 6e64 2053 4f41 5020 AP 1.1 and SOAP \n+00128510: 312e 3220 656e 7665 6c6f 7065 732e 3c2f 1.2 envelopes...

    The\n+00128530: 2066 6f6c 6c6f 7769 6e67 2061 6464 6974 following addit\n+00128540: 696f 6e61 6c20 6665 6174 7572 6573 2061 ional features a\n+00128550: 7265 2061 6c73 6f20 6176 6169 6c61 626c re also availabl\n+00128560: 652c 2062 7574 2061 7265 206e 6f74 2073 e, but are not s\n+00128570: 7570 706f 7274 6564 2062 7920 7468 6520 upported by the \n+00128580: 534f 4150 2d6f 7665 722d 5544 5020 7370 SOAP-over-UDP sp\n+00128590: 6563 6966 6963 6174 696f 6e3a 3c2f 703e ecification:

    \n+001285a0: 0a3c 756c 3e0a 3c6c 693e 5a6c 6962 2f67 .
      .
    • Zlib/g\n+001285b0: 7a69 7020 6d65 7373 6167 6520 636f 6d70 zip message comp\n+001285c0: 7265 7373 696f 6e20 2875 7365 2063 6f6d ression (use com\n+001285d0: 7069 6c65 2d74 696d 6520 666c 6167 203c pile-time flag <\n+001285e0: 636f 6465 3e23 5749 5448 5f47 5a49 503c code>#WITH_GZIP<\n+001285f0: 2f63 6f64 653e 292e 3c2f 6c69 3e0a 3c6c /code>).
    • .SOAP with DIME\n+00128610: 2061 7474 6163 686d 656e 7473 206f 7665 attachments ove\n+00128620: 7220 5544 502e 3c2f 6c69 3e0a 3c6c 693e r UDP..
    • \n+00128630: 534f 4150 2077 6974 6820 4d49 4d45 2f4d SOAP with MIME/M\n+00128640: 544f 4d20 6174 7461 6368 6d65 6e74 7320 TOM attachments \n+00128650: 6f76 6572 2055 4450 2e3c 2f6c 693e 0a3c over UDP.
    • .<\n+00128660: 6c69 3e53 7570 706f 7274 2066 6f72 2049 li>Support for I\n+00128670: 5076 3620 2875 7365 2063 6f6d 7069 6c65 Pv6 (use compile\n+00128680: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_IPV6).
    .<\n+001286b0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+001286d0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+001286e0: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Usin\n+00128710: 6720 5753 2d41 6464 7265 7373 696e 6720 g WS-Addressing \n+00128720: 7769 7468 2053 4f41 502d 6f76 6572 2d55 with SOAP-over-U\n+00128730: 4450 3c2f 6832 3e0a 3c70 3e41 2053 4f41 DP

    .

    A SOA\n+00128740: 502d 6f76 6572 2d55 4450 2061 7070 6c69 P-over-UDP appli\n+00128750: 6361 7469 6f6e 206d 6179 2075 7365 2057 cation may use W\n+00128760: 532d 4164 6472 6573 7369 6e67 2074 6f20 S-Addressing to \n+00128770: 636f 6e74 726f 6c20 6d65 7373 6167 6520 control message \n+00128780: 6465 6c69 7665 7279 2061 7320 7065 7220 delivery as per \n+00128790: 534f 4150 2d6f 7665 722d 5544 5020 7370 SOAP-over-UDP sp\n+001287a0: 6563 6966 6963 6174 696f 6e2e 3c2f 703e ecification.

    \n+001287b0: 0a3c 703e 5468 6520 3c65 6d3e 3c63 6f64 .

    The wsa.h file in the \n+001287e0: 3c63 6f64 653e 696d 706f 7274 3c2f 636f import directory de\n+00128800: 6669 6e65 7320 7468 6520 5753 2d41 6464 fines the WS-Add\n+00128810: 7265 7373 696e 6720 656c 656d 656e 7473 ressing elements\n+00128820: 2e20 546f 2069 6e63 6c75 6465 2074 6865 . To include the\n+00128830: 2057 532d 4164 6472 6573 7369 6e67 2065 WS-Addressing e\n+00128840: 6c65 6d65 6e74 7320 696e 2074 6865 2053 lements in the S\n+00128850: 4f41 5020 4865 6164 6572 2066 6f72 206d OAP Header for m\n+00128860: 6573 7361 6769 6e67 2c20 6120 5753 2d41 essaging, a WS-A\n+00128870: 6464 7265 7373 696e 6720 6361 7061 626c ddressing capabl\n+00128880: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e SOAP_ENV__Hea\n+001288f0: 6465 723c 2f61 3e3c 2f63 6f64 653e 2073 der s\n+00128900: 7472 7563 7420 7368 6f75 6c64 2062 6520 truct should be \n+00128910: 6465 6669 6e65 6420 696e 2079 6f75 7220 defined in your \n+00128920: 6865 6164 6572 2066 696c 6520 6279 2069 header file by i\n+00128930: 6d70 6f72 7469 6e67 203c 656d 3e3c 636f mporting gsoap/import/\n+00128950: 7773 612e 683c 2f63 6f64 653e 3c2f 656d wsa.h or g\n+00128970: 736f 6170 2f69 6d70 6f72 742f 7773 6135 soap/import/wsa5\n+00128980: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 3a3c .h:<\n+00128990: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #import &\n+001289e0: 7175 6f74 3b77 7361 2e68 2671 756f 743b quot;wsa.h"\n+001289f0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+00128a00: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    We also\n+00128a20: 2069 6e63 6c75 6465 6420 6120 3c63 6f64 included a //gsoap wsa sc\n+00128a40: 6865 6d61 2069 6d70 6f72 743a 3c2f 636f hema import: directive in\n+00128a60: 2074 6865 203c 656d 3e3c 636f 6465 3e77 the w\n+00128a70: 7361 2e68 3c2f 636f 6465 3e3c 2f65 6d3e sa.h\n+00128a80: 2066 696c 6520 746f 2065 6e61 626c 6520 file to enable \n+00128a90: 7468 6520 6765 6e65 7261 7469 6f6e 206f the generation o\n+00128aa0: 6620 5753 444c 2073 7065 6369 6669 6361 f WSDL specifica\n+00128ab0: 7469 6f6e 7320 7468 6174 2069 6d70 6f72 tions that impor\n+00128ac0: 7420 2869 6e73 7465 6164 206f 6620 696e t (instead of in\n+00128ad0: 636c 7564 6573 2920 7468 6520 5753 2d41 cludes) the WS-A\n+00128ae0: 6464 7265 7373 696e 6720 656c 656d 656e ddressing elemen\n+00128af0: 7473 2e20 4e6f 7465 2074 6861 7420 7468 ts. Note that th\n+00128b00: 6520 3c63 6f64 653e 2f2f 6773 6f61 706f e //gsoapo\n+00128b10: 7074 2077 3c2f 636f 6465 3e20 6469 7265 pt w dire\n+00128b20: 6374 6976 6520 2877 6869 6368 2061 6464 ctive (which add\n+00128b30: 7320 6f70 7469 6f6e 203c 623e 3c63 6f64 s option -w \n+00128b50: 746f 2072 756e 203c 623e 3c63 6f64 653e to run \n+00128b60: 736f 6170 6370 7032 202d 773c 2f63 6f64 soapcpp2 -w) must not\n+00128b80: 2062 6520 7072 6573 656e 7420 696e 2079 be present in y\n+00128b90: 6f75 7220 6865 6164 6572 2066 696c 6520 our header file \n+00128ba0: 746f 2065 6e61 626c 6520 5753 444c 2067 to enable WSDL g\n+00128bb0: 656e 6572 6174 696f 6e2e 3c2f 703e 0a3c eneration.

    .<\n+00128bc0: 703e 4f6e 652d 7761 7920 534f 4150 2d6f p>One-way SOAP-o\n+00128bd0: 7665 722d 5544 5020 6d65 7373 6167 6573 ver-UDP messages\n+00128be0: 2028 7365 6520 5365 6374 696f 6e20 3c61 (see Section Asynchrono\n+00128c20: 7573 206f 6e65 2d77 6179 206d 6573 7361 us one-way messa\n+00128c30: 6765 2070 6173 7369 6e67 3c2f 613e 2029 ge passing )\n+00128c40: 2073 686f 756c 6420 6265 2064 6563 6c61 should be decla\n+00128c50: 7265 6420 746f 2069 6e63 6c75 6465 2074 red to include t\n+00128c60: 6865 203c 656d 3e3c 636f 6465 3e77 7361 he wsa\n+00128c70: 3a4d 6573 7361 6765 4944 3c2f 636f 6465 :MessageID, wsa:To<\n+00128ca0: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and wsa:Action eleme\n+00128cd0: 6e74 7320 696e 2074 6865 2053 4f41 5020 nts in the SOAP \n+00128ce0: 4865 6164 6572 206f 6620 7468 6520 7265 Header of the re\n+00128cf0: 7175 6573 7420 6d65 7373 6167 6520 6173 quest message as\n+00128d00: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 follows:

    .
    //gs\n+00128d50: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n+00128d60: 6574 686f 642d 6865 6164 6572 2d70 6172 ethod-header-par\n+00128d70: 743a 2020 2020 2020 2020 2020 7365 6e64 t: send\n+00128d80: 5374 7269 6e67 2077 7361 5f5f 4d65 7373 String wsa__Mess\n+00128d90: 6167 6549 4420 3c2f 7370 616e 3e3c 2f64 ageID .
    //gs\n+00128dd0: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n+00128de0: 6574 686f 642d 6865 6164 6572 2d70 6172 ethod-header-par\n+00128df0: 743a 2020 2020 2020 2020 2020 7365 6e64 t: send\n+00128e00: 5374 7269 6e67 2077 7361 5f5f 546f 203c String wsa__To <\n+00128e10: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+00128e30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00128e40: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+00128e50: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n+00128e60: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: \n+00128e70: 2020 2020 2073 656e 6453 7472 696e 6720 sendString \n+00128e80: 7773 615f 5f41 6374 696f 6e20 3c2f 7370 wsa__Action
    .
    int\n+00128ed0: 206e 735f 5f73 656e 6453 7472 696e 6728 ns__sendString(\n+00128ee0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *str, void);
    .
    \n+00128f40: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    For the\n+00129480: 2063 6f6e 7465 6e74 2072 6571 7569 7265 content require\n+00129490: 6d65 6e74 7320 6f66 2074 6865 7365 2065 ments of these e\n+001294a0: 6c65 6d65 6e74 732c 2070 6c65 6173 6520 lements, please \n+001294b0: 636f 6e73 756c 7420 7468 6520 534f 4150 consult the SOAP\n+001294c0: 2d6f 7665 722d 5544 5020 7370 6563 6966 -over-UDP specif\n+001294d0: 6963 6174 696f 6e20 616e 642f 6f72 2072 ication and/or r\n+001294e0: 6561 6420 7468 6520 6e65 7874 2073 6563 ead the next sec\n+001294f0: 7469 6f6e 7320 6578 706c 6169 6e69 6e67 tions explaining\n+00129500: 2053 4f41 502d 6f76 6572 2d55 4450 2075 SOAP-over-UDP u\n+00129510: 6e69 6361 7374 2c20 6d75 6c74 6963 6173 nicast, multicas\n+00129520: 742c 206f 6e65 2d77 6179 2c20 616e 6420 t, one-way, and \n+00129530: 7265 7175 6573 742d 7265 7370 6f6e 7365 request-response\n+00129540: 2063 6c69 656e 7420 616e 6420 7365 7276 client and serv\n+00129550: 6572 2061 7070 6c69 6361 7469 6f6e 732e er applications.\n+00129560: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+001295a0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001295b0: 2069 643d 2275 6e69 6361 7374 223e 3c2f id=\"unicast\">.Client-side o\n+001295d0: 6e65 2d77 6179 2055 4450 2075 6e69 6361 ne-way UDP unica\n+001295e0: 7374 3c2f 6833 3e0a 3c70 3e54 6869 7320 st

    .

    This \n+001295f0: 6578 616d 706c 6520 6173 7375 6d65 7320 example assumes \n+00129600: 7468 6174 2074 6865 2069 6e74 6572 6661 that the interfa\n+00129610: 6365 2068 6561 6465 7220 6669 6c65 2069 ce header file i\n+00129620: 6e63 6c75 6465 7320 7468 6520 534f 4150 ncludes the SOAP\n+00129630: 2048 6561 6465 7220 7769 7468 2057 532d Header with WS-\n+00129640: 4164 6472 6573 7369 6e67 2065 6c65 6d65 Addressing eleme\n+00129650: 6e74 732c 2073 6565 203c 6120 636c 6173 nts, see The WS-Addres\n+00129690: 7369 6e67 2070 6c75 6769 6e3c 2f61 3e2c sing plugin,\n+001296a0: 2061 6e64 2074 6865 203c 636f 6465 3e6e and the n\n+001296b0: 735f 5f73 656e 6453 7472 696e 673c 2f63 s__sendString function di\n+001296d0: 7363 7573 7365 6420 696e 2053 6563 7469 scussed in Secti\n+001296e0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Using \n+00129710: 5753 2d41 6464 7265 7373 696e 6720 7769 WS-Addressing wi\n+00129720: 7468 2053 4f41 502d 6f76 6572 2d55 4450 th SOAP-over-UDP\n+00129730: 3c2f 613e 2e3c 2f70 3e0a 3c64 6976 2063 .

    .
    \n+00129750: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+00129780: 636c 7564 6520 2671 756f 743b 706c 7567 clude "plug\n+00129790: 696e 2f77 7361 6170 692e 6826 7175 6f74 in/wsaapi.h"\n+001297a0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001297b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001297c0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    struct <\n+00129800: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00129810: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00129820: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html\">soap <\n+00129830: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00129840: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00129850: 6874 6d6c 223e 736f 6170 3c2f 613e 3b20 html\">soap; \n+00129860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n+001298d0: 6170 5f69 6e69 743c 2f61 3e28 2661 6d70 ap_init(&\n+001298e0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00129910: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    ..\n+001299e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap.send_\n+00129a70: 7469 6d65 6f75 743c 2f61 3e20 3d20 353b timeout = 5;\n+00129a80: 203c 7370 616e 2063 6c61 7373 3d22 636f // 5 seco\n+00129aa0: 6e64 7320 6d61 7820 736f 636b 6574 2064 nds max socket d\n+00129ab0: 656c 6179 203c 2f73 7061 6e3e 3c2f 6469 elay .
    // se\n+00129af0: 7420 7570 2057 532d 4164 6472 6573 7369 t up WS-Addressi\n+00129b00: 6e67 2068 6561 6465 723c 2f73 7061 6e3e ng header\n+00129b10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_ws\n+00129b30: 615f 7265 7175 6573 7428 2661 6d70 3b3c a_request(&<\n+00129b40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00129b50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00129b60: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00129b70: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00129b90: 743b 6d65 7373 6167 6520 4944 2671 756f t;message ID&quo\n+00129ba0: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "end\n+00129bd0: 706f 696e 7426 7175 6f74 3b3c 2f73 7061 point", \n+00129c00: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio\n+00129c10: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 293b n");\n+00129c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+00129c50: 2f20 5365 6e64 2074 6865 206d 6573 7361 / Send the messa\n+00129c60: 6765 206f 7665 7220 5544 503a 203c 2f73 ge over UDP:
    .
    if\n+00129cb0: 2028 736f 6170 5f73 656e 645f 6e73 5f5f (soap_send_ns__\n+00129cc0: 6563 686f 5374 7269 6e67 2826 616d 703b echoString(&\n+00129cd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00129d00: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00129d20: 6f74 3b73 6f61 702e 7564 703a 2f2f 656e ot;soap.udp://en\n+00129d30: 6470 6f69 6e74 2671 756f 743b 3c2f 7370 dpoint", "SOAP acti\n+00129d70: 6f6e 2671 756f 743b 3c2f 7370 616e 3e2c on",\n+00129d80: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00129da0: 6f74 3b68 656c 6c6f 2077 6f72 6c64 2126 ot;hello world!&\n+00129db0: 7175 6f74 3b3c 2f73 7061 6e3e 2929 203c quot;)) <\n+00129dc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+00129e30: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(&so\n+00129e70: 6170 3c2f 613e 2c20 7374 6465 7272 293b ap, stderr);\n+00129e80: 203c 7370 616e 2063 6c61 7373 3d22 636f // error \n+00129ea0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00129ec0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n+00129f20: 793c 2f61 3e28 2661 6d70 3b3c 6120 636c y(&soap);.
    soap_e\n+00129fd0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap);.
    soap_\n+0012a080: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap);<\n+0012a0c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_regist\n+0012a180: 6572 5f70 6c75 6769 6e3c 2f61 3e3c 2f64 er_plugin
    int soap_\n+0012a1b0: 7265 6769 7374 6572 5f70 6c75 6769 6e28 register_plugin(\n+0012a1c0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+0012a1d0: 702c 2069 6e74 282a 6663 7265 6174 6529 p, int(*fcreate)\n+0012a1e0: 2873 7472 7563 7420 736f 6170 202a 2c20 (struct soap *, \n+0012a1f0: 7374 7275 6374 2073 6f61 705f 706c 7567 struct soap_plug\n+0012a200: 696e 202a 2c20 766f 6964 202a 2929 3c2f in *, void *))
    Register \n+0012a230: 6120 706c 7567 696e 2e3c 2f64 6976 3e3c a plugin.
    <\n+0012a240: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

    .Cli\n+0012a2c0: 656e 742d 7369 6465 206f 6e65 2d77 6179 ent-side one-way\n+0012a2d0: 2055 4450 206d 756c 7469 6361 7374 3c2f UDP multicast.

    This exam\n+0012a2f0: 706c 6520 6973 2073 696d 696c 6172 2074 ple is similar t\n+0012a300: 6f20 7468 6520 6f6e 652d 7761 7920 756e o the one-way un\n+0012a310: 6963 6173 7420 6578 616d 706c 6520 6469 icast example di\n+0012a320: 7363 7573 7365 6420 6162 6f76 652c 2062 scussed above, b\n+0012a330: 7574 2075 7365 7320 6120 6272 6f61 6463 ut uses a broadc\n+0012a340: 6173 7420 6164 6472 6573 7320 616e 6420 ast address and \n+0012a350: 7468 6520 3c63 6f64 653e 534f 5f42 524f the SO_BRO\n+0012a360: 4144 4341 5354 3c2f 636f 6465 3e20 736f ADCAST so\n+0012a370: 636b 6574 206f 7074 696f 6e3a 3c2f 703e cket option:

    \n+0012a380: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #include &qu\n+0012a3d0: 6f74 3b70 6c75 6769 6e2f 7773 6161 7069 ot;plugin/wsaapi\n+0012a3e0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n+0012a3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n+0012a410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+0012a4c0: 696e 5f61 6464 725f 7420 6164 6472 203d in_addr_t addr =\n+0012a4d0: 2069 6e65 745f 6164 6472 283c 7370 616e inet_addr("1.2\n+0012a500: 2e33 2e34 2671 756f 743b 3c2f 7370 616e .3.4"); // opt\n+0012a530: 696f 6e61 6c20 3c2f 7370 616e 3e3c 2f64 ional .
    soap_\n+0012a5b0: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); \n+0012a5f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..<\n+0012a6d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012a6e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012a6f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0012a700: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012a710: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012a720: 6874 6d6c 2361 3731 3162 6233 6135 3364 html#a711bb3a53d\n+0012a730: 6537 6363 3632 3432 3965 3464 3361 3265 e7cc62429e4d3a2e\n+0012a740: 3062 3534 3734 223e 7365 6e64 5f74 696d 0b5474\">send_tim\n+0012a750: 656f 7574 3c2f 613e 203d 2035 3b20 3c73 eout = 5; // 5 seconds\n+0012a780: 206d 6178 2073 6f63 6b65 7420 6465 6c61 max socket dela\n+0012a790: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
    .<\n+0012a7a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012a7b0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+0012a7e0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .connec\n+0012a830: 745f 666c 6167 733c 2f61 3e20 3d20 534f t_flags = SO\n+0012a840: 5f42 524f 4144 4341 5354 3b20 3c73 7061 _BROADCAST; // required fo\n+0012a870: 7220 6272 6f61 6463 6173 7420 3c2f 7370 r broadcast
    .
    soap.ipv4_multic\n+0012a920: 6173 745f 6966 3c2f 613e 203d 2026 616d ast_if = &am\n+0012a930: 703b 6164 6472 3b20 3c73 7061 6e20 636c p;addr; //\n+0012a950: 206f 7074 696f 6e61 6c20 666f 7220 4950 optional for IP\n+0012a960: 7634 3a20 7365 6520 7365 7473 6f63 6b6f v4: see setsocko\n+0012a970: 7074 2049 5050 524f 544f 5f49 5020 4950 pt IPPROTO_IP IP\n+0012a980: 5f4d 554c 5449 4341 5354 5f49 4620 3c2f _MULTICAST_IF
    .soap.ipv6_mult\n+0012aa30: 6963 6173 745f 6966 3c2f 613e 203d 2061 icast_if = a\n+0012aa40: 6464 723b 203c 7370 616e 2063 6c61 7373 ddr; // op\n+0012aa60: 7469 6f6e 616c 2066 6f72 2049 5076 363a tional for IPv6:\n+0012aa70: 206d 756c 7469 6361 7374 2073 696e 365f multicast sin6_\n+0012aa80: 7363 6f70 655f 6964 203c 2f73 7061 6e3e scope_id \n+0012aa90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

    .
    \n+0012aad0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.ipv4_multicast\n+0012ab30: 5f74 746c 3c2f 613e 203d 2031 3b20 3c73 _ttl = 1; // optional,\n+0012ab60: 2073 6565 2073 6574 736f 636b 6f70 7420 see setsockopt \n+0012ab70: 4950 5052 4f54 4f5f 4950 2c20 4950 5f4d IPPROTO_IP, IP_M\n+0012ab80: 554c 5449 4341 5354 5f54 544c 203c 2f73 ULTICAST_TTL
    .
    // set up WS-\n+0012abd0: 4164 6472 6573 7369 6e67 2068 6561 6465 Addressing heade\n+0012abe0: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n+0012abf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012ac00: 3e73 6f61 705f 7773 615f 7265 7175 6573 >soap_wsa_reques\n+0012ac10: 7428 2661 6d70 3b3c 6120 636c 6173 733d t(&so\n+0012ac40: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "messag\n+0012ac70: 6520 4944 2671 756f 743b 3c2f 7370 616e e ID", &\n+0012aca0: 7175 6f74 3b65 6e64 706f 696e 7426 7175 quot;endpoint&qu\n+0012acb0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "SO\n+0012ace0: 4150 2061 6374 696f 6e26 7175 6f74 3b3c AP action"<\n+0012acf0: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .<\n+0012ad00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012ad10: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// Send t\n+0012ad30: 6865 206d 6573 7361 6765 206f 7665 7220 he message over \n+0012ad40: 5544 5020 746f 2061 2062 726f 6164 6361 UDP to a broadca\n+0012ad50: 7374 2061 6464 7265 7373 3a20 3c2f 7370 st address:
    .
    if \n+0012ada0: 2873 6f61 705f 7365 6e64 5f6e 735f 5f65 (soap_send_ns__e\n+0012adb0: 6368 6f53 7472 696e 6728 2661 6d70 3b3c choString(&<\n+0012adc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012add0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012ade0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0012adf0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0012ae10: 743b 736f 6170 2e75 6470 3a2f 2f65 6e64 t;soap.udp://end\n+0012ae20: 706f 696e 7426 7175 6f74 3b3c 2f73 7061 point", \n+0012ae50: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio\n+0012ae60: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n+0012ae70: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0012ae90: 743b 6865 6c6c 6f20 776f 726c 6421 2671 t;hello world!&q\n+0012aea0: 756f 743b 3c2f 7370 616e 3e29 2920 3c2f uot;)) .
    soap\n+0012af20: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+0012af30: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012af60: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n+0012af70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // report \n+0012af90: 6572 726f 7220 3c2f 7370 616e 3e3c 2f64 error .
    soap_\n+0012b010: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(&\n+0012b020: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+0012b050: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n+0012b0c0: 736f 6170 5f65 6e64 3c2f 613e 2826 616d soap_end(&am\n+0012b0d0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    soap_done(&\n+0012b180: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012b1b0: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .
    soap::ipv6_\n+0012b260: 6d75 6c74 6963 6173 745f 6966 3c2f 613e multicast_if\n+0012b270: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    unsign\n+0012b290: 6564 2069 6e74 2069 7076 365f 6d75 6c74 ed int ipv6_mult\n+0012b2a0: 6963 6173 745f 6966 3c2f 6469 763e 3c64 icast_if
    User-definable \n+0012b2d0: 7661 6c75 6520 746f 2073 6574 2073 6f63 value to set soc\n+0012b2e0: 6b61 6464 725f 696e 363a 3a73 696e 365f kaddr_in6::sin6_\n+0012b2f0: 7363 6f70 655f 6964 2077 6865 6e20 6e6f scope_id when no\n+0012b300: 6e7a 6572 6f2e 3c2f 6469 763e 3c64 6976 nzero.
    <\n+0012b320: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:359\n+0012b340: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .
    soap::con\n+0012b3f0: 6e65 6374 5f66 6c61 6773 3c2f 613e 3c2f nect_flags
    int conn\n+0012b420: 6563 745f 666c 6167 733c 2f64 6976 3e3c ect_flags
    <\n+0012b430: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0012b440: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+0012b450: 2073 6574 736f 636b 6f70 7420 6c65 7665 setsockopt leve\n+0012b460: 6c20 534f 4c5f 534f 434b 4554 2066 6c61 l SOL_SOCKET fla\n+0012b470: 6773 2077 6865 6e20 636f 6e6e 6563 7469 gs when connecti\n+0012b480: 6e67 2073 6f61 703a 3a73 6f63 6b65 7420 ng soap::socket \n+0012b490: 746f 2061 2073 6572 7665 7220 2874 6865 to a server (the\n+0012b4a0: 2076 616c 7565 202e 2e2e 3c2f 6469 763e value ...
    \n+0012b4b0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+0012b4d0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0012b4e0: 3a33 3337 373c 2f64 6976 3e3c 2f64 6976 :3377
    .
    <\n+0012b550: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+0012b560: 6170 2e68 746d 6c23 6161 3566 6161 3736 ap.html#aa5faa76\n+0012b570: 3330 3432 3561 3861 6238 3031 3866 3062 30425a8ab8018f0b\n+0012b580: 3264 3464 3063 3138 6422 3e73 6f61 703a 2d4d0c18d\">soap:\n+0012b590: 3a69 7076 345f 6d75 6c74 6963 6173 745f :ipv4_multicast_\n+0012b5a0: 7474 6c3c 2f61 3e3c 2f64 6976 3e3c 6469 ttl
    unsigned char i\n+0012b5d0: 7076 345f 6d75 6c74 6963 6173 745f 7474 pv4_multicast_tt\n+0012b5e0: 6c3c 2f64 6976 3e3c 6469 7620 636c 6173 l
    User-d\n+0012b600: 6566 696e 6162 6c65 2076 616c 7565 2074 efinable value t\n+0012b610: 6f20 7365 7420 7365 7473 6f63 6b6f 7074 o set setsockopt\n+0012b620: 206c 6576 656c 2049 5050 524f 544f 5f49 level IPPROTO_I\n+0012b630: 5020 746f 2049 505f 4d55 4c54 4943 4153 P to IP_MULTICAS\n+0012b640: 545f 5454 4c20 7768 656e 206e 6f6e 7a65 T_TTL when nonze\n+0012b650: 726f 2e3c 2f64 6976 3e3c 6469 7620 636c ro.
    D\n+0012b670: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+0012b680: 7464 736f 6170 322e 683a 3336 3230 3c2f tdsoap2.h:3620
    .
    soap::ipv4_m\n+0012b740: 756c 7469 6361 7374 5f69 663c 2f61 3e3c ulticast_if<\n+0012b750: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    char * \n+0012b770: 6970 7634 5f6d 756c 7469 6361 7374 5f69 ipv4_multicast_i\n+0012b780: 663c 2f64 6976 3e3c 6469 7620 636c 6173 f
    User-d\n+0012b7a0: 6566 696e 6162 6c65 2076 616c 7565 2074 efinable value t\n+0012b7b0: 6f20 7365 7420 7365 7473 6f63 6b6f 7074 o set setsockopt\n+0012b7c0: 206c 6576 656c 2049 5050 524f 544f 5f49 level IPPROTO_I\n+0012b7d0: 5020 746f 2049 505f 4d55 4c54 4943 4153 P to IP_MULTICAS\n+0012b7e0: 545f 4946 2077 6865 6e20 6e6f 6e2d 4e55 T_IF when non-NU\n+0012b7f0: 4c4c 2e3c 2f64 6976 3e3c 6469 7620 636c LL.
    D\n+0012b810: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+0012b820: 7464 736f 6170 322e 683a 3335 3939 3c2f tdsoap2.h:3599
    .

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

    .<\n+0012cad0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.Client-s\n+0012cb10: 6964 6520 7265 7175 6573 742d 7265 7370 ide request-resp\n+0012cb20: 6f6e 7365 206d 756c 7469 6361 7374 3c2f onse multicast.

    This exam\n+0012cb40: 706c 6520 6973 2073 696d 696c 6172 2074 ple is similar t\n+0012cb50: 6f20 7468 6520 7265 7175 6573 742d 7265 o the request-re\n+0012cb60: 7370 6f6e 7365 2075 6e69 6361 7374 2065 sponse unicast e\n+0012cb70: 7861 6d70 6c65 2064 6973 6375 7373 6564 xample discussed\n+0012cb80: 2061 626f 7665 2c20 6275 7420 7573 6573 above, but uses\n+0012cb90: 2061 2062 726f 6164 6361 7374 2061 6464 a broadcast add\n+0012cba0: 7265 7373 2061 6e64 2074 6865 203c 636f ress and the SO_BROADCAST<\n+0012cbc0: 2f63 6f64 653e 2073 6f63 6b65 7420 6f70 /code> socket op\n+0012cbd0: 7469 6f6e 2e20 4265 6361 7573 6520 7765 tion. Because we\n+0012cbe0: 2065 7870 6563 7420 746f 2072 6563 6569 expect to recei\n+0012cbf0: 7665 206d 756c 7469 706c 6520 7265 7370 ve multiple resp\n+0012cc00: 6f6e 7365 732c 2077 6520 616c 736f 206e onses, we also n\n+0012cc10: 6565 6420 746f 2075 7365 2073 6570 6172 eed to use separ\n+0012cc20: 6174 6520 7265 7175 6573 742d 7265 7370 ate request-resp\n+0012cc30: 6f6e 7365 206d 6573 7361 6765 7320 746f onse messages to\n+0012cc40: 2073 656e 6420 6f6e 6520 7265 7175 6573 send one reques\n+0012cc50: 7420 616e 6420 636f 6e73 756d 6520 6d75 t and consume mu\n+0012cc60: 6c74 6970 6c65 2072 6573 706f 6e73 6573 ltiple responses\n+0012cc70: 2e20 496e 2074 6869 7320 6578 616d 706c . In this exampl\n+0012cc80: 6520 7765 2064 6566 696e 6564 2061 203c e we defined a <\n+0012cc90: 636f 6465 3e62 6361 7374 5374 7269 6e67 code>bcastString\n+0012cca0: 3c2f 636f 6465 3e20 7265 7175 6573 7420 request \n+0012ccb0: 616e 6420 6120 3c63 6f64 653e 6263 6173 and a bcas\n+0012ccc0: 7453 7472 696e 6752 6573 706f 6e73 653c tStringResponse<\n+0012ccd0: 2f63 6f64 653e 2072 6573 706f 6e73 6520 /code> response \n+0012cce0: 6d65 7373 6167 652c 2077 6869 6368 2061 message, which a\n+0012ccf0: 7265 2065 7373 656e 7469 616c 6c79 2064 re essentially d\n+0012cd00: 6563 6c61 7265 6420 6173 206f 6e65 2d77 eclared as one-w\n+0012cd10: 6179 206d 6573 7361 6765 7320 696e 2074 ay messages in t\n+0012cd20: 6865 2068 6561 6465 7220 6669 6c65 3a3c he header file:<\n+0012cd30: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    //gsoap ns ser\n+0012cd80: 7669 6365 206d 6574 686f 642d 6865 6164 vice method-head\n+0012cd90: 6572 2d70 6172 743a 2020 2020 2020 2020 er-part: \n+0012cda0: 2020 6263 6173 7453 7472 696e 6720 7773 bcastString ws\n+0012cdb0: 615f 5f4d 6573 7361 6765 4944 203c 2f73 a__MessageID
    .
    //gsoap ns se\n+0012ce00: 7276 6963 6520 6d65 7468 6f64 2d68 6561 rvice method-hea\n+0012ce10: 6465 722d 7061 7274 3a20 2020 2020 2020 der-part: \n+0012ce20: 2020 2062 6361 7374 5374 7269 6e67 2077 bcastString w\n+0012ce30: 7361 5f5f 546f 203c 2f73 7061 6e3e 3c2f sa__To .
    //g\n+0012ce70: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+0012ce80: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa\n+0012ce90: 7274 3a20 2020 2020 2020 2020 2062 6361 rt: bca\n+0012cea0: 7374 5374 7269 6e67 2077 7361 5f5f 4163 stString wsa__Ac\n+0012ceb0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    //gso\n+0012cef0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+0012cf00: 7468 6f64 2d68 6561 6465 722d 7061 7274 thod-header-part\n+0012cf10: 3a20 2020 2020 2020 2020 2062 6361 7374 : bcast\n+0012cf20: 5374 7269 6e67 2077 7361 5f5f 5265 706c String wsa__Repl\n+0012cf30: 7954 6f20 3c2f 7370 616e 3e3c 2f64 6976 yTo .
    in\n+0012cf70: 743c 2f73 7061 6e3e 206e 735f 5f62 6361 t ns__bca\n+0012cf80: 7374 5374 7269 6e67 283c 7370 616e 2063 stString(char *\n+0012cfb0: 7374 722c 203c 7370 616e 2063 6c61 7373 str, v\n+0012cfd0: 6f69 643c 2f73 7061 6e3e 293b 203c 2f64 oid); .
    //gs\n+0012d010: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n+0012d020: 6574 686f 642d 6865 6164 6572 2d70 6172 ethod-header-par\n+0012d030: 743a 2020 2020 2020 2020 2020 6263 6173 t: bcas\n+0012d040: 7453 7472 696e 6752 6573 706f 6e73 6520 tStringResponse \n+0012d050: 7773 615f 5f4d 6573 7361 6765 4944 203c wsa__MessageID <\n+0012d060: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012d080: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0012d090: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+0012d0a0: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n+0012d0b0: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: \n+0012d0c0: 2020 2020 2062 6361 7374 5374 7269 6e67 bcastString\n+0012d0d0: 5265 7370 6f6e 7365 2077 7361 5f5f 546f Response wsa__To\n+0012d0e0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012d0f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012d100: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+0012d120: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n+0012d130: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: \n+0012d140: 2020 2020 2020 2062 6361 7374 5374 7269 bcastStri\n+0012d150: 6e67 5265 7370 6f6e 7365 2077 7361 5f5f ngResponse wsa__\n+0012d160: 4163 7469 6f6e 203c 2f73 7061 6e3e 3c2f Action .
    //g\n+0012d1a0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+0012d1b0: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa\n+0012d1c0: 7274 3a20 2020 2020 2020 2020 2062 6361 rt: bca\n+0012d1d0: 7374 5374 7269 6e67 5265 7370 6f6e 7365 stStringResponse\n+0012d1e0: 2077 7361 5f5f 5265 6c61 7465 7354 6f20 wsa__RelatesTo \n+0012d1f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012d210: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__bcastSt\n+0012d240: 7269 6e67 5265 7370 6f6e 7365 283c 7370 ringResponse(char *res, void);\n+0012d2a0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    To obtain respo\n+0012d2d0: 6e73 6520 6f6e 652d 7761 7920 6f70 6572 nse one-way oper\n+0012d2e0: 6174 696f 6e73 2c20 7573 6520 3c61 2068 ations, use \n+0012d300: 3c62 3e3c 636f 6465 3e77 7364 6c32 6820 wsdl2h \n+0012d310: 2d62 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -b op\n+0012d320: 7469 6f6e 203c 623e 3c63 6f64 653e 2d62 tion -b\n+0012d330: 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 3e2e .\n+0012d340: 3c2f 703e 0a3c 703e 5468 6520 636c 6965

    .

    The clie\n+0012d350: 6e74 2063 6f64 6520 696e 636c 7564 6573 nt code includes\n+0012d360: 2061 206c 6f6f 7020 746f 2072 6563 6569 a loop to recei\n+0012d370: 7665 2072 6573 706f 6e73 6520 6d65 7373 ve response mess\n+0012d380: 6167 6573 2075 6e74 696c 2061 2074 696d ages until a tim\n+0012d390: 656f 7574 206f 6363 7572 733a 3c2f 703e eout occurs:

    \n+0012d3a0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #include &qu\n+0012d3f0: 6f74 3b70 6c75 6769 6e2f 7773 6161 7069 ot;plugin/wsaapi\n+0012d400: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n+0012d410: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n+0012d430: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+0012d4e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct SOAP_ENV__Head\n+0012d550: 6572 3c2f 613e 2068 6561 6465 723b 203c er header; <\n+0012d560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+0012d590: 7275 6374 203c 2f73 7061 6e3e 7773 615f ruct wsa_\n+0012d5a0: 5f45 6e64 706f 696e 7452 6566 6572 656e _EndpointReferen\n+0012d5b0: 6365 5479 7065 2072 6570 6c79 546f 3b20 ceType replyTo; \n+0012d5c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char *\n+0012d600: 7265 733b 203c 2f64 6976 3e0a 3c64 6976 res;
    .soap_init\n+0012d680: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012d6b0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n+0012d6c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012d6d0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_regist\n+0012d730: 6572 5f70 6c75 6769 6e3c 2f61 3e28 2661 er_plugin(&a\n+0012d740: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, soap_wsa);..
    soap.send_timeout\n+0012d8d0: 3c2f 613e 203d 2035 3b20 3c73 7061 6e20 = 5; \n+0012d8f0: 2f2f 2035 2073 6563 6f6e 6473 206d 6178 // 5 seconds max\n+0012d900: 2073 6f63 6b65 7420 6465 6c61 7920 3c2f socket delay
    .soap.recv_time\n+0012d9b0: 6f75 743c 2f61 3e20 3d20 353b 203c 7370 out = 5; // 5 seconds \n+0012d9e0: 6d61 7820 736f 636b 6574 2064 656c 6179 max socket delay\n+0012d9f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012da00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012da10: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// set up\n+0012da30: 2057 532d 4164 6472 6573 7369 6e67 2068 WS-Addressing h\n+0012da40: 6561 6465 723c 2f73 7061 6e3e 3c2f 6469 eader.
    soap_wsa_re\n+0012da70: 7175 6573 7428 2661 6d70 3b3c 6120 636c quest(&soap, "me\n+0012dad0: 7373 6167 6520 4944 2671 756f 743b 3c2f ssage ID", "endpoin\n+0012db10: 7426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 t", \n+0012db20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0012db40: 743b 534f 4150 2061 6374 696f 6e26 7175 t;SOAP action&qu\n+0012db50: 6f74 3b3c 2f73 7061 6e3e 293b 3c2f 6469 ot;);.
    soap_wsa_ad\n+0012db80: 645f 5265 706c 7954 6f28 2661 6d70 3b3c d_ReplyTo(&<\n+0012db90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012dba0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012dbb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0012dbc0: 4e55 4c4c 293b 203c 7370 616e 2063 6c61 NULL); // \n+0012dbe0: 616e 6f6e 796d 6f75 7320 5265 706c 7954 anonymous ReplyT\n+0012dbf0: 6f20 6164 6472 6573 733c 2f73 7061 6e3e o address\n+0012dc00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so\n+0012dc40: 6170 5f73 656e 645f 6e73 5f5f 6263 6173 ap_send_ns__bcas\n+0012dc50: 7453 7472 696e 6728 2661 6d70 3b3c 6120 tString(&soap, "\n+0012dcb0: 736f 6170 2e75 6470 3a2f 2f65 6e64 706f soap.udp://endpo\n+0012dcc0: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int"\n+0012dcd0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+0012dcf0: 756f 743b 534f 4150 2061 6374 696f 6e26 uot;SOAP action&\n+0012dd00: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+0012dd30: 6865 6c6c 6f20 776f 726c 6421 2671 756f hello world!&quo\n+0012dd40: 743b 3c2f 7370 616e 3e29 2920 3c2f 6469 t;)) .
    {
    . \n+0012dd80: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+0012dde0: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n+0012de20: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .<\n+0012de30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012de40: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    else\n+0012de80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+0012ded0: 7768 696c 653c 2f73 7061 6e3e 2028 3129 while (1)\n+0012dee0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    if (so\n+0012df40: 6170 5f72 6563 765f 6e73 5f5f 6263 6173 ap_recv_ns__bcas\n+0012df50: 7453 7472 696e 6752 6573 706f 6e73 6528 tStringResponse(\n+0012df60: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+0012df90: 3c2f 613e 2c20 2661 6d70 3b72 6573 2929 , &res))\n+0012dfa0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+0012dfc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n+0012dfe0: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n+0012dff0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012e000: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n+0012e020: 2f20 476f 7420 7265 7370 6f6e 7365 2026 / Got response &\n+0012e030: 2333 393b 7265 7326 2333 393b 2066 726f #39;res' fro\n+0012e040: 6d20 6120 7365 7276 6572 203c 2f73 7061 m a server
    .
    } <\n+0012e070: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (<\n+0012e0b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012e0c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012e0d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0012e0e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012e0f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012e100: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n+0012e110: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n+0012e120: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error == SOAP_EO\n+0012e190: 463c 2f61 3e20 2661 6d70 3b26 616d 703b F &&\n+0012e1a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0012e1d0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .errnum\n+0012e220: 3c2f 613e 203d 3d20 3029 203c 2f64 6976 == 0) .
    ... // Timeout: no\n+0012e270: 206d 6f72 6520 6d65 7373 6167 6573 2072 more messages r\n+0012e280: 6563 6569 7665 6420 3c2f 7370 616e 3e3c eceived <\n+0012e290: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else \n+0012e2d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    } <\n+0012e3b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+0012e420: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a\n+0012e430: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    soap_end(&\n+0012e4e0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012e510: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .soap_done\n+0012e590: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012e5c0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c2f p);
    .

    Note tha\n+0012e5f0: 7420 6120 7365 7276 6572 2066 6f72 2074 t a server for t\n+0012e600: 6865 203c 636f 6465 3e62 6361 7374 5374 he bcastSt\n+0012e610: 7269 6e67 3c2f 636f 6465 3e20 646f 6573 ring does\n+0012e620: 206e 6f74 206e 6565 6420 746f 2075 7365 not need to use\n+0012e630: 2074 776f 2d6f 6e65 2077 6179 206d 6573 two-one way mes\n+0012e640: 7361 6765 732e 2054 6875 732c 206d 756c sages. Thus, mul\n+0012e650: 7469 6361 7374 2072 6571 7565 7374 2d72 ticast request-r\n+0012e660: 6573 706f 6e73 6520 6d65 7373 6167 6520 esponse message \n+0012e670: 7061 7474 6572 6e20 6361 6e20 6265 2064 pattern can be d\n+0012e680: 6563 6c61 7265 6420 616e 6420 696d 706c eclared and impl\n+0012e690: 656d 656e 7465 6420 6173 2072 6571 7565 emented as reque\n+0012e6a0: 7374 2d72 6573 706f 6e73 6520 6f70 6572 st-response oper\n+0012e6b0: 6174 696f 6e73 2061 7420 7468 6520 7365 ations at the se\n+0012e6c0: 7276 6572 2073 6964 652e 3c2f 703e 0a3c rver side.

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

    .

    \n+0012e730: 0a53 4f41 502d 6f76 6572 2d55 4450 2073 .SOAP-over-UDP s\n+0012e740: 6572 7665 723c 2f68 323e 0a3c 703e 5468 erver

    .

    Th\n+0012e750: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam\n+0012e760: 706c 6520 636f 6465 2069 6c6c 7573 7472 ple code illustr\n+0012e770: 6174 6573 2061 2053 4f41 502d 6f76 6572 ates a SOAP-over\n+0012e780: 2d55 4450 2073 6572 7665 7220 666f 7220 -UDP server for \n+0012e790: 6f6e 652d 7761 7920 3c63 6f64 653e 7365 one-way se\n+0012e7a0: 6e64 5374 7269 6e67 3c2f 636f 6465 3e20 ndString \n+0012e7b0: 616e 6420 7265 7175 6573 742d 7265 7370 and request-resp\n+0012e7c0: 6f6e 7365 203c 636f 6465 3e65 6368 6f53 onse echoS\n+0012e7d0: 7472 696e 673c 2f63 6f64 653e 206d 6573 tring mes\n+0012e7e0: 7361 6765 732e 2054 6869 7320 6578 616d sages. This exam\n+0012e7f0: 706c 6520 6173 7375 6d65 7320 7468 6174 ple assumes that\n+0012e800: 2074 6865 2069 6e74 6572 6661 6365 2068 the interface h\n+0012e810: 6561 6465 7220 6669 6c65 2069 6e63 6c75 eader file inclu\n+0012e820: 6465 7320 7468 6520 534f 4150 2048 6561 des the SOAP Hea\n+0012e830: 6465 7220 7769 7468 2057 532d 4164 6472 der with WS-Addr\n+0012e840: 6573 7369 6e67 2065 6c65 6d65 6e74 7320 essing elements \n+0012e850: 696d 706f 7274 6564 2077 6974 6820 3c63 imported with #import \"wsa\n+0012e870: 2e68 223c 2f63 6f64 653e 2061 6e64 2074 .h\" and t\n+0012e880: 6865 203c 636f 6465 3e6e 735f 5f65 6368 he ns__ech\n+0012e890: 6f53 7472 696e 673c 2f63 6f64 653e 2066 oString f\n+0012e8a0: 756e 6374 696f 6e20 6469 7363 7573 7365 unction discusse\n+0012e8b0: 6420 696e 2053 6563 7469 6f6e 203c 6120 d in Section Using WS-Add\n+0012e8f0: 7265 7373 696e 6720 7769 7468 2053 4f41 ressing with SOA\n+0012e900: 502d 6f76 6572 2d55 4450 3c2f 613e 202e P-over-UDP .\n+0012e910: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n+0012e960: 2026 7175 6f74 3b70 6c75 6769 6e2f 7773 "plugin/ws\n+0012e970: 6161 7069 2e68 2671 756f 743b 3c2f 7370 aapi.h"
    .
    .
    \n+0012e9d0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n+0012e9e0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {..
    // bind to host\n+0012ecf0: 2028 4e55 4c4c 203d 2063 7572 7265 6e74 (NULL = current\n+0012ed00: 2068 6f73 7429 2061 6e64 2070 6f72 743a host) and port:\n+0012ed10: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012ed20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012ed30: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+0012ed50: 2f73 7061 6e3e 2028 213c 6120 636c 6173 /span> (!soap_\n+0012edb0: 7661 6c69 645f 736f 636b 6574 3c2f 613e valid_socket\n+0012edc0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_bind(&\n+0012ee20: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012ee50: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, ho\n+0012eea0: 7374 3c2f 613e 2c20 3c61 2063 6c61 7373 st, port, BACKL\n+0012ef00: 4f47 2929 2920 3c2f 6469 763e 0a3c 6469 OG)))
    . \n+0012ef20: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n+0012ef40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012ef50: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0012ef60: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n+0012ef70: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n+0012ef80: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n+0012ef90: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n+0012efa0: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n+0012efe0: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . \n+0012f000: 2020 2065 7869 7428 4558 4954 5f46 4149 exit(EXIT_FAI\n+0012f010: 4c55 5245 293b 203c 2f64 6976 3e0a 3c64 LURE);
    .\n+0012f030: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n+0012f050: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0012f060: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (1)
    .\n+0012f080: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+0012f0b0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_serv\n+0012f130: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap)) .
    s\n+0012f1e0: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault<\n+0012f1f0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+0012f220: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n+0012f230: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // repo\n+0012f250: 7274 2074 6865 2070 726f 626c 656d 203c rt the problem <\n+0012f260: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0012f280: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_des\n+0012f2e0: 7472 6f79 3c2f 613e 2826 616d 703b 3c61 troy(&soap); \n+0012f320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_end(&\n+0012f3a0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012f3d0: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n+0012f3f0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    soap_done\n+0012f470: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012f4a0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); //\n+0012f4c0: 2063 6c6f 7365 2063 6f6e 6e65 6374 696f close connectio\n+0012f4d0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n+0012f4e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int ns__\n+0012f550: 6563 686f 5374 7269 6e67 283c 7370 616e echoString(struct <\n+0012f580: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012f590: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012f5a0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+0012f5b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0012f5e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+0012f600: 2f73 7061 6e3e 202a 7374 722c 203c 7370 /span> *str, char **res)
    \n+0012f640: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+0012f670: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0012f680: 656e 7422 3e2f 2f20 6368 6563 6b20 6966 ent\">// check if\n+0012f690: 2057 532d 4164 6472 6573 7369 6e67 2068 WS-Addressing h\n+0012f6a0: 6561 6465 7273 2061 7265 2070 7265 7365 eaders are prese\n+0012f6b0: 6e74 2061 6e64 2063 6f72 7265 6374 3c2f nt and correct
    . \n+0012f6e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_wsa_ch\n+0012f710: 6563 6b28 3c61 2063 6c61 7373 3d22 636f eck(soap<\n+0012f740: 2f61 3e29 293c 2f64 6976 3e0a 3c64 6976 /a>))
    . \n+0012f760: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+0012f780: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap->error\n+0012f810: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    // should chec\n+0012f850: 6b20 666f 7220 6475 706c 6963 6174 6520 k for duplicate \n+0012f860: 6d65 7373 6167 6573 2028 736f 6d65 7468 messages (someth\n+0012f870: 696e 6720 7468 6174 2057 532d 5265 6c69 ing that WS-Reli\n+0012f880: 6162 6c65 4d65 7373 6167 696e 6720 646f ableMessaging do\n+0012f890: 6573 2074 6f6f 293c 2f73 7061 6e3e 3c2f es too).
    if (ch\n+0012f8e0: 6563 6b5f 7265 6365 6976 6564 283c 6120 eck_received(soap->\n+0012f920: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;header\n+0012f970: 3c2f 613e 2d26 6774 3b77 7361 5f5f 4d65 ->wsa__Me\n+0012f980: 7373 6167 6549 4429 2920 3c2f 6469 763e ssageID))
    \n+0012f990: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+0012f9c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // Requ\n+0012f9e0: 6573 7420 6d65 7373 6167 6520 616c 7265 est message alre\n+0012f9f0: 6164 7920 7265 6365 6976 6564 203c 2f73 ady received
    .
    \n+0012fa20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+0012fa40: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+0012faa0: 505f 5354 4f50 3c2f 613e 3b20 3c73 7061 P_STOP; // don't r\n+0012fad0: 6574 7572 6e20 7265 7370 6f6e 7365 203c eturn response <\n+0012fae0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0012fb00: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    *r\n+0012fb20: 6573 203d 2073 7472 3b20 3c2f 6469 763e es = str;
    \n+0012fb30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // re\n+0012fb60: 7475 726e 204f 4b20 7769 7468 2057 532d turn OK with WS-\n+0012fb70: 4164 6472 6573 7369 6e67 2072 6570 6c79 Addressing reply\n+0012fb80: 2068 6561 6465 7273 2c20 6d65 7373 6167 headers, messag\n+0012fb90: 6520 4944 2069 7320 6964 5f63 6f75 6e74 e ID is id_count\n+0012fba0: 2b31 3c2f 7370 616e 3e3c 2f64 6976 3e0a +1
    .\n+0012fbb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+0012fbe0: 7475 726e 3c2f 7370 616e 3e20 736f 6170 turn soap\n+0012fbf0: 5f77 7361 5f72 6570 6c79 283c 6120 636c _wsa_reply(soap, soa\n+0012fc80: 705f 696e 7432 733c 2f61 3e28 3c61 2063 p_int2s(soap, id_\n+0012fcc0: 636f 756e 742b 2b29 2c20 3c73 7061 6e20 count++), "http\n+0012fcf0: 3a2f 2f67 656e 6976 6961 2e63 6f6d 2f75 ://genivia.com/u\n+0012fd00: 6470 2f65 6368 6f53 7472 696e 6752 6573 dp/echoStringRes\n+0012fd10: 706f 6e73 6526 7175 6f74 3b3c 2f73 7061 ponse");
    .
    } <\n+0012fd40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n+0012fd60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n+0012fd90: 2f73 7061 6e3e 206e 735f 5f73 656e 6453 /span> ns__sendS\n+0012fda0: 7472 696e 6728 3c73 7061 6e20 636c 6173 tring(stru\n+0012fdc0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, char *str)
    .<\n+0012fe60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012fe70: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if\n+0012feb0: 2028 736f 6170 5f77 7361 5f63 6865 636b (soap_wsa_check\n+0012fec0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0012fef0: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
    .
    <\n+0012ff10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0012ff20: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+0012ff30: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+0012ff60: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error;.
    /\n+0012fff0: 2f20 7368 6f75 6c64 2063 6865 636b 2066 / should check f\n+00130000: 6f72 2064 7570 6c69 6361 7465 206d 6573 or duplicate mes\n+00130010: 7361 6765 7320 3c2f 7370 616e 3e3c 2f64 sages .
    if (che\n+00130060: 636b 5f72 6563 6569 7665 6428 3c61 2063 ck_received(soap->\n+001300a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 header<\n+001300f0: 2f61 3e2d 2667 743b 7773 615f 5f4d 6573 /a>->wsa__Mes\n+00130100: 7361 6765 4944 2929 203c 2f64 6976 3e0a sageID))
    .\n+00130110: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00130140: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Reque\n+00130160: 7374 206d 6573 7361 6765 2061 6c72 6561 st message alrea\n+00130170: 6479 2072 6563 6569 7665 6420 3c2f 7370 dy received
    .\n+00130230: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+00130260: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00130280: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n+001302e0: 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 763e AP_OK;
    \n+001302f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n+00130320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n+00130360: 5f73 656e 6453 7472 696e 6752 6573 706f _sendStringRespo\n+00130370: 6e73 6528 3c73 7061 6e20 636c 6173 733d nse(struct\n+00130390: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001303c0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001303f0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, char \n+00130420: 2a72 6573 2920 3c2f 6469 763e 0a3c 6469 *res)
    .{\n+00130440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_NO_M\n+001304e0: 4554 484f 443c 2f61 3e3b 203c 7370 616e ETHOD; // we don't\n+00130510: 2073 6572 7665 2074 6869 7320 6f70 6572 serve this oper\n+00130520: 6174 696f 6e3c 2f73 7061 6e3e 3c2f 6469 ation.
    }
    .\n+001305a0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 <\n+00130610: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00130620: 6922 3e23 6465 6669 6e65 2053 4f41 505f i\">#define SOAP_\n+00130630: 494f 5f55 4450 3c2f 6469 763e 3c64 6976 IO_UDP
    s\n+00130650: 6f61 705f 6d6f 6465 2049 4f20 696e 7075 oap_mode IO inpu\n+00130660: 742f 6f75 7470 7574 2066 6c61 6720 7661 t/output flag va\n+00130670: 6c75 6520 746f 2075 7365 2055 4450 2064 lue to use UDP d\n+00130680: 6174 6167 7261 6d73 2c20 6d65 7373 6167 atagrams, messag\n+00130690: 6520 7369 7a65 2069 7320 6c69 6d69 7465 e size is limite\n+001306a0: 6420 746f 2055 4450 2070 6163 6b65 7420 d to UDP packet \n+001306b0: 7369 7a65 3c2f 6469 763e 3c64 6976 2063 size
    \n+001306d0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+001306e0: 7374 6473 6f61 7032 2e68 3a31 3539 363c stdsoap2.h:1596<\n+001306f0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .soap_int2s<\n+001307b0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    .

    The server\n+00130880: 2062 696e 6473 2074 6f20 6120 686f 7374 binds to a host\n+00130890: 2061 6e64 2070 6f72 7420 616e 6420 6163 and port and ac\n+001308a0: 6365 7074 7320 6d65 7373 6167 6573 2069 cepts messages i\n+001308b0: 6e20 6120 6c6f 6f70 2e20 4265 6361 7573 n a loop. Becaus\n+001308c0: 6520 5544 5020 646f 6573 206e 6f74 2068 e UDP does not h\n+001308d0: 6176 6520 7468 6520 6571 7569 7661 6c65 ave the equivale\n+001308e0: 6e74 206f 6620 616e 2061 6363 6570 742c nt of an accept,\n+001308f0: 2074 6865 206d 6573 7361 6765 7320 6361 the messages ca\n+00130900: 6e6e 6f74 2062 6520 6469 7370 6174 6368 nnot be dispatch\n+00130910: 6564 2074 6f20 7468 7265 6164 732e 2049 ed to threads. I\n+00130920: 6e73 7465 6164 2074 6865 203c 636f 6465 nstead the \n+001309a0: 736f 6170 5f73 6572 7665 3c2f 613e 3c2f soap_serve waits for \n+001309c0: 6120 6d65 7373 6167 6520 616e 6420 696d a message and im\n+001309d0: 6d65 6469 6174 656c 7920 6163 6365 7074 mediately accept\n+001309e0: 7320 6974 2e20 596f 7520 6361 6e20 7573 s it. You can us\n+001309f0: 6520 6120 7265 6365 6976 6520 7469 6d65 e a receive time\n+00130a00: 6f75 7420 7661 6c75 6520 666f 7220 3c63 out value for s\n+00130ac0: 6f61 703a 3a72 6563 765f 7469 6d65 6f75 oap::recv_timeou\n+00130ad0: 743c 2f61 3e3c 2f63 6f64 653e 2074 6f20 t to \n+00130ae0: 6d61 6b65 203c 636f 6465 3e3c 6120 636c make soap_s\n+00130b60: 6572 7665 3c2f 613e 3c2f 636f 6465 3e20 erve \n+00130b70: 6e6f 6e2d 626c 6f63 6b69 6e67 2e3c 2f70 non-blocking..

    To obtain r\n+00130b90: 6573 706f 6e73 6520 6f6e 652d 7761 7920 esponse one-way \n+00130ba0: 6f70 6572 6174 696f 6e73 2066 726f 6d20 operations from \n+00130bb0: 6120 5753 444c 2c20 7573 6520 3c61 2068 a WSDL, use \n+00130bd0: 3c62 3e3c 636f 6465 3e77 7364 6c32 6820 wsdl2h \n+00130be0: 2d62 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -b op\n+00130bf0: 7469 6f6e 203c 623e 3c63 6f64 653e 2d62 tion -b\n+00130c00: 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 3e2e .\n+00130c10: 2054 6869 7320 7072 6f64 7563 6573 2061 This produces a\n+00130c20: 6464 6974 696f 6e61 6c20 6f6e 652d 7761 dditional one-wa\n+00130c30: 7920 6f70 6572 6174 696f 6e73 2074 6f20 y operations to \n+00130c40: 7375 7070 6f72 7420 6173 796e 6368 726f support asynchro\n+00130c50: 6e6f 7573 2068 616e 646c 696e 6720 6f66 nous handling of\n+00130c60: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag\n+00130c70: 6573 2069 6e20 7468 6520 7361 6d65 2077 es in the same w\n+00130c80: 6179 2072 6571 7565 7374 7320 6172 6520 ay requests are \n+00130c90: 6861 6e64 6c65 642e 3c2f 703e 0a3c 703e handled.

    .

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

    .SOAP-ove\n+00130d10: 722d 5544 5020 6d75 6c74 6963 6173 7420 r-UDP multicast \n+00130d20: 7265 6365 6976 696e 6720 7365 7276 6572 receiving server\n+00130d30: 3c2f 6833 3e0a 3c70 3e46 6f72 2055 4450

    .

    For UDP\n+00130d40: 206d 756c 7469 6361 7374 2073 7570 706f multicast suppo\n+00130d50: 7274 2c20 666f 6c6c 6f77 2074 6865 2073 rt, follow the s\n+00130d60: 7567 6765 7374 696f 6e73 2069 6e20 5365 uggestions in Se\n+00130d70: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction SOAP-over-UDP \n+00130db0: 7365 7276 6572 3c2f 613e 2061 6e64 2063 server and c\n+00130dc0: 6861 6e67 6520 7468 6520 696e 6974 6961 hange the initia\n+00130dd0: 6c69 7a61 7469 6f6e 2070 6172 7473 206f lization parts o\n+00130de0: 6620 7468 6520 636f 6465 2074 6f20 656e f the code to en\n+00130df0: 6162 6c65 2055 4450 206d 756c 7469 6361 able UDP multica\n+00130e00: 7374 2070 6f72 7420 6269 6e64 696e 6720 st port binding \n+00130e10: 6279 2074 6f20 7465 6c6c 696e 6720 7468 by to telling th\n+00130e20: 6520 6b65 726e 656c 2077 6869 6368 206d e kernel which m\n+00130e30: 756c 7469 6361 7374 2067 726f 7570 7320 ulticast groups \n+00130e40: 796f 7520 6172 6520 696e 7465 7265 7374 you are interest\n+00130e50: 6564 2069 6e3a 3c2f 703e 0a3c 6469 7620 ed in:

    .
    #i\n+00130ea0: 6e63 6c75 6465 2026 7175 6f74 3b70 6c75 nclude "plu\n+00130eb0: 6769 6e2f 7773 6161 7069 2e68 2671 756f gin/wsaapi.h&quo\n+00130ec0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n+00130ed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n+00130f20: 206d 6169 6e28 2920 3c2f 6469 763e 0a3c main()
    .<\n+00130f30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00130f40: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap\n+00130fb0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00130fe0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    struct ip_mreq mcast; \n+00131030: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .\n+00131150: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    if\n+00131250: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap_valid_\n+001312b0: 736f 636b 6574 3c2f 613e 283c 6120 636c socket(soap_\n+00131310: 6269 6e64 3c2f 613e 2826 616d 703b 3c61 bind(&soap, h\n+00131350: 6f73 742c 2070 6f72 742c 2042 4143 4b4c ost, port, BACKL\n+00131360: 4f47 2929 2920 3c2f 6469 763e 0a3c 6469 OG)))
    . \n+00131380: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n+001313a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001313b0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001313c0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n+001313d0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n+001313e0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n+001313f0: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n+00131400: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n+00131440: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . \n+00131460: 2020 2065 7869 7428 4558 4954 5f46 4149 exit(EXIT_FAI\n+00131470: 4c55 5245 293b 203c 2f64 6976 3e0a 3c64 LURE);
    .\n+00131490: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }

    .
    m\n+001314b0: 6361 7374 2e69 6d72 5f6d 756c 7469 6164 cast.imr_multiad\n+001314c0: 6472 2e73 5f61 6464 7220 3d20 696e 6574 dr.s_addr = inet\n+001314d0: 5f61 6464 7228 7075 7420 4950 206d 756c _addr(put IP mul\n+001314e0: 7469 6361 7374 2061 6464 7265 7373 206f ticast address o\n+001314f0: 6620 6772 6f75 7020 6865 7265 293b 203c f group here); <\n+00131500: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    mcast.\n+00131520: 696d 725f 696e 7465 7266 6163 652e 735f imr_interface.s_\n+00131530: 6164 6472 203d 2068 746f 6e6c 2849 4e41 addr = htonl(INA\n+00131540: 4444 525f 414e 5929 3b20 3c2f 6469 763e DDR_ANY);
    \n+00131550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+00131580: 663c 2f73 7061 6e3e 2028 7365 7473 6f63 f (setsoc\n+00131590: 6b6f 7074 283c 6120 636c 6173 733d 2263 kopt(soap\n+001315c0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .ma\n+00131610: 7374 6572 3c2f 613e 2c20 4950 5052 4f54 ster, IPPROT\n+00131620: 4f5f 4950 2c20 4950 5f41 4444 5f4d 454d O_IP, IP_ADD_MEM\n+00131630: 4245 5253 4849 502c 2026 616d 703b 6d63 BERSHIP, &mc\n+00131640: 6173 742c 203c 7370 616e 2063 6c61 7373 ast, sizeo\n+00131660: 663c 2f73 7061 6e3e 286d 6361 7374 2929 f(mcast))\n+00131670: 266c 743b 3029 203c 2f64 6976 3e0a 3c64 <0)
    .\n+00131690: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+001316b0: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    ... //.
    soap_\n+00131770: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(&\n+00131780: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+001317b0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    soap_end(&\n+00131830: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00131860: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    . \n+00131880: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s\n+00131910: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n+00131920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    <\n+00131af0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+00131b10: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+00131b20: 3c2f 703e 0a3c 6831 3e3c 6120 636c 6173

    .

    .Compile-time \n+00131b60: 666c 6167 733c 2f68 313e 0a3c 703e 5468 flags

    .

    Th\n+00131b70: 6520 666f 6c6c 6f77 696e 6720 6d61 6372 e following macr\n+00131b80: 6f73 2061 7265 2064 6566 696e 6564 2069 os are defined i\n+00131b90: 6e20 7468 6520 4150 4920 646f 6375 6d65 n the API docume\n+00131ba0: 6e74 6174 696f 6e20 4d6f 6475 6c65 203c ntation Module <\n+00131bb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00131bc0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00131bd0: 5f77 6974 682e 6874 6d6c 223e 5749 5448 _with.html\">WITH\n+00131be0: 5f4d 4143 524f 2063 6f6d 7069 6c65 2d74 _MACRO compile-t\n+00131bf0: 696d 6520 666c 6167 733c 2f61 3e2e 2054 ime flags. T\n+00131c00: 6865 7365 206d 6163 726f 7320 6172 6520 hese macros are \n+00131c10: 7573 6564 2074 6f20 656e 6162 6c65 206f used to enable o\n+00131c20: 7220 6469 7361 626c 6520 6665 6174 7572 r disable featur\n+00131c30: 6573 2061 7320 7370 6563 6966 6965 6420 es as specified \n+00131c40: 6265 6c6f 772c 2062 7920 636f 6d70 696c below, by compil\n+00131c50: 696e 6720 736f 7572 6365 2063 6f64 6520 ing source code \n+00131c60: 6669 6c65 7320 7769 7468 2063 6f6d 7069 files with compi\n+00131c70: 6c65 7220 6f70 7469 6f6e 203c 623e 3c63 ler option -D to set the mac\n+00131ca0: 726f 3a3c 2f70 3e0a 3c74 6162 6c65 2063 ro:

    .
    engine \n-0018e5d0: 203c 2f74 683e 3c74 6820 636c 6173 733d result \n-0018e600: 2020 3c2f 7468 3e3c 2f74 723e 0a3c 7472
    Th\n-0018e690: 6520 6465 6661 756c 7420 736f 6674 7761 e default softwa\n-0018e6a0: 7265 2065 6e67 696e 6520 666f 7220 6372 re engine for cr\n-0018e6b0: 7970 746f 6772 6170 6869 6320 6f70 6572 yptographic oper\n-0018e6c0: 6174 696f 6e73 2020 2020 3c2f 7464 3e3c ations
    o\n-0018e720: 7065 6e62 7364 5f64 6576 5f63 7279 7074 penbsd_dev_crypt\n-0018e730: 6f3c 2f63 6f64 653e 2020 203c 2f74 643e o OpenBSD suppor\n-0018e770: 7473 206b 6572 6e65 6c20 6c65 7665 6c20 ts kernel level \n-0018e780: 6372 7970 746f 6772 6170 6879 2020 2020 cryptography \n-0018e790: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    cswift Crypt\n-0018e820: 6f53 7769 6674 2061 6363 656c 6572 6174 oSwift accelerat\n-0018e830: 696f 6e20 6861 7264 7761 7265 2020 2020 ion hardware \n-0018e840: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    nCiphe\n-0018e8d0: 7220 4348 494c 2061 6363 656c 6572 6174 r CHIL accelerat\n-0018e8e0: 696f 6e20 6861 7264 7761 7265 2020 2020 ion hardware \n-0018e8f0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    atalla Compa\n-0018e980: 7120 4174 616c 6c61 2061 6363 656c 6572 q Atalla acceler\n-0018e990: 6174 696f 6e20 6861 7264 7761 7265 2020 ation hardware \n-0018e9a0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    Nur\n-0018ea30: 6f6e 2061 6363 656c 6572 6174 696f 6e20 on acceleration \n-0018ea40: 6861 7264 7761 7265 2020 2020 3c2f 7464 hardware
    \n-0018eaa0: 7562 7365 633c 2f63 6f64 653e 2020 203c ubsec <\n-0018eab0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Broadcom u\n-0018eae0: 4253 6563 2061 6363 656c 6572 6174 696f BSec acceleratio\n-0018eaf0: 6e20 6861 7264 7761 7265 2020 2020 3c2f n hardware
    aep \n-0018eb60: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Aep accel\n-0018eb90: 6572 6174 696f 6e20 6861 7264 7761 7265 eration hardware\n-0018eba0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    sureware\n-0018ec00: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    ....<\n+00131d90: 636f 6465 3e23 534f 4150 4445 4653 5f48 code>#SOAPDEFS_H\n+00131da0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00131db0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00131dc0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00131dd0: 3e74 6865 2068 6561 6465 7220 6669 6c65 >the header file\n+00131de0: 2074 6f20 696e 636c 7564 652c 2069 6620 to include, if \n+00131df0: 6469 6666 6572 656e 7420 6672 6f6d 203c different from <\n+00131e00: 636f 6465 3e73 6f61 7064 6566 732e 683c code>soapdefs.h<\n+00131e10: 2f63 6f64 653e 2020 2020 3c2f 7464 3e3c /code> <\n+00131e20: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n+00131eb0: 696e 636c 7564 6573 2074 6865 203c 636f includes the soapdefs.h file for cu\n+00131ee0: 7374 6f6d 2073 6574 7469 6e67 732c 2073 stom settings, s\n+00131ef0: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Using the so\n+00131f30: 6170 6465 6673 2e68 2068 6561 6465 7220 apdefs.h header \n+00131f40: 6669 6c65 3c2f 613e 2020 2020 3c2f 7464 file ..........<\n+001323a0: 636f 6465 3e23 5749 5448 5f43 4f4f 4b49 code>#WITH_COOKI\n+001323b0: 4553 3c2f 636f 6465 3e20 2020 3c2f 7464 ES .\n+001324b0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .<\n+00132520: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00132530: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00132540: 3e65 6e61 626c 6573 2048 5454 5020 636f >enables HTTP co\n+00132550: 6f6b 6965 7320 616e 6420 616c 6c6f 7773 okies and allows\n+00132560: 2063 6f6f 6b69 6573 2077 6974 6820 7468 cookies with th\n+00132570: 6569 7220 5365 6375 7265 2066 6c61 6720 eir Secure flag \n+00132580: 7365 7420 746f 2062 6520 7365 6e74 206f set to be sent o\n+00132590: 7665 7220 696e 7365 6375 7265 2063 6861 ver insecure cha\n+001325a0: 6e6e 656c 7320 2020 203c 2f74 643e 3c2f nnels ....<\n+001326a0: 636f 6465 3e23 5749 5448 5f49 5056 365f code>#WITH_IPV6_\n+001326b0: 5636 4f4e 4c59 3c2f 636f 6465 3e20 2020 V6ONLY \n+001326c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ....<\n+001328c0: 636f 6465 3e23 5749 5448 5f47 4e55 544c code>#WITH_GNUTL\n+001328d0: 533c 2f63 6f64 653e 2020 203c 2f74 643e S \n+001328e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+001329f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00132a00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00132a10: 3e3c 636f 6465 3e23 5749 5448 5f47 5a49 >#WITH_GZI\n+00132a20: 503c 2f63 6f64 653e 2020 203c 2f74 643e P \n+00132a30: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00132bd0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n+00132cc0: 3c63 6f64 653e 2357 4954 485f 435f 4c4f #WITH_C_LO\n+00132cd0: 4341 4c45 3c2f 636f 6465 3e20 2020 3c2f CALE \n+00132d70: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .....\n+00132f70: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00132f90: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+00133040: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ........<\n+00133380: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00133390: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001333a0: 3e3c 636f 6465 3e23 5749 5448 5f4e 4f49 >#WITH_NOI\n+001333b0: 4452 4546 3c2f 636f 6465 3e20 2020 3c2f DREF ..\n+001334f0: 7265 6d6f 7665 7320 7468 6520 4854 5450 removes the HTTP\n+00133500: 2073 7461 636b 2074 6f20 7265 6475 6365 stack to reduce\n+00133510: 2063 6f64 6520 7369 7a65 2020 2020 3c2f code size ..d\n+001335b0: 6973 6162 6c65 7320 616e 6420 6967 6e6f isables and igno\n+001335c0: 7265 7320 7468 6520 7469 6d65 7a6f 6e65 res the timezone\n+001335d0: 2069 6e20 3c63 6f64 653e 7873 643a 6461 in xsd:da\n+001335e0: 7465 5469 6d65 3c2f 636f 6465 3e20 7661 teTime va\n+001335f0: 6c75 6573 2020 2020 3c2f 7464 3e3c 2f74 lues ...\n+001336e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00133700: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+00133820: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00133830: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00133840: 3e6f 6d69 7420 534f 4150 2048 6561 6465 >omit SOAP Heade\n+00133850: 7220 616e 6420 4661 756c 7420 7365 7269 r and Fault seri\n+00133860: 616c 697a 6174 696f 6e20 636f 6465 2c20 alization code, \n+00133870: 7072 6576 656e 7473 2064 7570 6c69 6361 prevents duplica\n+00133880: 7465 2064 6566 696e 6974 696f 6e73 2077 te definitions w\n+00133890: 6974 6820 6765 6e65 7261 7465 6420 736f ith generated so\n+001338a0: 6170 5859 5a4c 6962 2063 6f64 6520 2020 apXYZLib code \n+001338b0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+00133900: 636f 6465 3e23 5749 5448 5f4e 4f4e 414d code>#WITH_NONAM\n+00133910: 4553 5041 4345 533c 2f63 6f64 653e 2020 ESPACES \n+00133920: 203c 2f74 643e 3c74 6420 636c 6173 733d ..<\n+00133bd0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..<\n+00133c40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00133c50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00133c60: 3e65 6e61 626c 6573 2043 2b2b 2061 6273 >enables C++ abs\n+00133c70: 7472 6163 7420 7365 7276 6963 6520 636c tract service cl\n+00133c80: 6173 7365 7320 7769 7468 2070 7572 6520 asses with pure \n+00133c90: 7669 7274 7561 6c20 6d65 7468 6f64 732c virtual methods,\n+00133ca0: 2072 6571 7569 7265 7320 736f 6170 6370 requires soapcp\n+00133cb0: 7032 206f 7074 696f 6e20 3c63 6f64 653e p2 option \n+00133cc0: 2d69 3c2f 636f 6465 3e20 6f72 203c 636f -i or -j \n+00133ce0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+00133d30: 636f 6465 3e23 5749 5448 5f44 4546 4155 code>#WITH_DEFAU\n+00133d40: 4c54 5f56 4952 5455 414c 3c2f 636f 6465 LT_VIRTUAL \n+00133e30: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .....<\n+00134020: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00134030: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00134040: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00134110: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00134120: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00134130: 3e3c 636f 6465 3e23 5749 5448 5f53 454c >#WITH_SEL\n+00134140: 465f 5049 5045 3c2f 636f 6465 3e20 2020 F_PIPE \n+00134150: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..

    The followi\n+001342a0: 6e67 2073 7562 7365 7420 6f66 206d 6163 ng subset of mac\n+001342b0: 726f 7320 6172 6520 6465 6669 6e65 6420 ros are defined \n+001342c0: 696e 2074 6865 2041 5049 2064 6f63 756d in the API docum\n+001342d0: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module \n+001342e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOA\n+00134310: 505f 4d41 4352 4f20 636f 6d70 696c 652d P_MACRO compile-\n+00134320: 7469 6d65 2076 616c 7565 733c 2f61 3e2e time values.\n+00134330: 2054 6865 7365 206d 6163 726f 7320 6172 These macros ar\n+00134340: 6520 7573 6564 2074 6f20 656e 6162 6c65 e used to enable\n+00134350: 206f 7220 6469 7361 626c 6520 6665 6174 or disable feat\n+00134360: 7572 6573 2061 7320 7370 6563 6966 6965 ures as specifie\n+00134370: 6420 6265 6c6f 772c 2062 7920 636f 6d70 d below, by comp\n+00134380: 696c 696e 6720 736f 7572 6365 2063 6f64 iling source cod\n+00134390: 6520 6669 6c65 7320 7769 7468 2063 6f6d e files with com\n+001343a0: 7069 6c65 7220 6f70 7469 6f6e 203c 623e piler option \n+001343b0: 3c63 6f64 653e 2d44 3c2f 636f 6465 3e3c -D<\n+001343c0: 2f62 3e20 746f 2073 6574 2074 6865 206d /b> to set the m\n+001343d0: 6163 726f 3a3c 2f70 3e0a 3c74 6162 6c65 acro:

    ..
    ...<\n+001344a0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001344b0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001344c0: 3e3c 636f 6465 3e23 534f 4150 5f4e 4f54 >#SOAP_NOT\n+001344d0: 4852 4f57 3c2f 636f 6465 3e20 2020 3c2f HROW \n+001345a0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....t\n+00134710: 6865 206d 6178 696d 756d 206c 656e 6774 he maximum lengt\n+00134720: 6820 6f66 2048 5454 5020 6865 6164 6572 h of HTTP header\n+00134730: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n+00134740: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...\n+00134840: 3c63 6f64 653e 2353 4f41 505f 544d 504c #SOAP_TMPL\n+00134850: 454e 3c2f 636f 6465 3e20 2020 3c2f 7464 EN ....<\n+001349f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00134a00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00134a10: 3e3c 636f 6465 3e23 534f 4150 5f4d 4158 >#SOAP_MAX\n+00134a20: 4152 5241 5953 495a 453c 2f63 6f64 653e ARRAYSIZE\n+00134a30: 2020 203c 2f74 643e 3c74 6420 636c 6173 .<\n+00134ab0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00134ac0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00134ad0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n+00134bc0: 3c63 6f64 653e 2353 4f41 505f 4d41 5845 #SOAP_MAXE\n+00134bd0: 494e 5452 3c2f 636f 6465 3e20 2020 3c2f INTR ..\n+00134cb0: 3c63 6f64 653e 2353 4f41 505f 4d41 5849 #SOAP_MAXI\n+00134cc0: 4e46 4c41 5445 5349 5a45 3c2f 636f 6465 NFLATESIZE ....\n+00134ee0: 3c63 6f64 653e 2353 4f41 505f 4d41 584c #SOAP_MAXL\n+00134ef0: 454e 4754 483c 2f63 6f64 653e 2020 203c ENGTH <\n+00134f00: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>....<\n+00135090: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001350a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001350b0: 3e3c 636f 6465 3e23 534f 4150 5f4d 4158 >#SOAP_MAX\n+001350c0: 4f43 4355 5253 3c2f 636f 6465 3e20 2020 OCCURS \n+001350d0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ...\n+00135270: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...l\n+001353e0: 656e 6774 6820 6f66 2074 6865 2052 5341 ength of the RSA\n+001353f0: 206b 6579 2028 3230 3438 2062 7920 6465 key (2048 by de\n+00135400: 6661 756c 7429 2020 2020 3c2f 7464 3e3c fault) <\n+00135410: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n+00135480: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+00135630: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+001356a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .<\n+00135710: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00135720: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00135730: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...<\n+001359b0: 2f74 6162 6c65 3e0a 3c64 6c20 636c 6173 /table>.
    Warning<\n+001359e0: 2f64 743e 3c64 643e 4974 2069 7320 696d /dt>
    It is im\n+001359f0: 706f 7274 616e 7420 7468 6174 2061 6e79 portant that any\n+00135a00: 206f 6620 7468 6573 6520 6d61 6372 6f73 of these macros\n+00135a10: 2077 6865 6e20 6465 6669 6e65 6420 7368 when defined sh\n+00135a20: 6f75 6c64 2062 6520 636f 6e73 6973 7465 ould be consiste\n+00135a30: 6e74 6c79 2064 6566 696e 6564 2077 6865 ntly defined whe\n+00135a40: 6e20 636f 6d70 696c 696e 6720 736f 7572 n compiling sour\n+00135a50: 6365 2063 6f64 6520 6669 6c65 732c 2073 ce code files, s\n+00135a60: 7563 6820 6173 203c 656d 3e3c 636f 6465 uch as gsoap/stdsoap2.\n+00135a80: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp,\n+00135a90: 203c 656d 3e3c 636f 6465 3e73 6f61 7043 soapC\n+00135aa0: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+00135ab0: 2c20 3c65 6d3e 3c63 6f64 653e 736f 6170 , soap\n+00135ac0: 436c 6965 6e74 2e63 7070 3c2f 636f 6465 Client.cpp, soapServer.cpp\n+00135af0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 616e , an\n+00135b00: 6420 616c 6c20 6170 706c 6963 6174 696f d all applicatio\n+00135b10: 6e20 736f 7572 6365 2063 6f64 6520 6669 n source code fi\n+00135b20: 6c65 7320 7468 6174 2069 6e63 6c75 6465 les that include\n+00135b30: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+00135b40: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h or <\n+00135b60: 636f 6465 3e73 6f61 7048 2e68 3c2f 636f code>soapH.h. If the\n+00135b80: 206d 6163 726f 7320 6172 6520 6e6f 7420 macros are not \n+00135b90: 636f 6e73 6973 7465 6e74 6c79 2064 6566 consistently def\n+00135ba0: 696e 6564 2061 7420 636f 6d70 696c 6520 ined at compile \n+00135bb0: 7469 6d65 2074 6865 6e20 7468 6520 6170 time then the ap\n+00135bc0: 706c 6963 6174 696f 6e20 7769 6c6c 206c plication will l\n+00135bd0: 696b 656c 7920 6372 6173 6820 6475 6520 ikely crash due \n+00135be0: 746f 2061 206d 6973 6d61 7463 6865 7320 to a mismatches \n+00135bf0: 696e 2074 6865 2064 6563 6c61 7261 7469 in the declarati\n+00135c00: 6f6e 2061 6e64 2075 7365 206f 6620 7468 on and use of th\n+00135c10: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context that\n+00135c80: 2069 7320 6375 7374 6f6d 697a 6564 2062 is customized b\n+00135c90: 7920 7468 6573 6520 666c 6167 732e 3c2f y these flags.
    .

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

    .<\n+00135ce0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Using th\n+00135d10: 6520 736f 6170 6465 6673 2e68 2068 6561 e soapdefs.h hea\n+00135d20: 6465 7220 6669 6c65 3c2f 6832 3e0a 3c70 der file.The s\n+00135d40: 6f61 7064 6566 732e 683c 2f63 6f64 653e oapdefs.h\n+00135d50: 3c2f 656d 3e20 6865 6164 6572 2066 696c header fil\n+00135d60: 6520 6973 2069 6e63 6c75 6465 6420 696e e is included in\n+00135d70: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+00135d80: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h when com\n+00135da0: 7069 6c69 6e67 2077 6974 6820 636f 6d70 piling with comp\n+00135db0: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_SOAPDE\n+00135dd0: 4653 5f48 3c2f 636f 6465 3e3a 203c 2f70 FS_H:
     c++ -D W\n+00135e00: 4954 485f 534f 4150 4445 4653 5f48 202d  ITH_SOAPDEFS_H -\n+00135e10: 6320 7374 6473 6f61 7032 2e63 7070 0a3c  c stdsoap2.cpp.<\n+00135e20: 2f70 7265 3e3c 703e 2054 6865 203c 656d  /pre>

    The soapdefs.\n+00135e40: 683c 2f63 6f64 653e 3c2f 656d 3e20 6669 h fi\n+00135e50: 6c65 2061 6c6c 6f77 7320 7573 6572 7320 le allows users \n+00135e60: 746f 2069 6e63 6c75 6465 2064 6566 696e to include defin\n+00135e70: 6974 696f 6e73 2061 6e64 2061 6464 2069 itions and add i\n+00135e80: 6e63 6c75 6465 7320 7769 7468 6f75 7420 ncludes without \n+00135e90: 7265 7175 6972 696e 6720 6368 616e 6765 requiring change\n+00135ea0: 7320 746f 203c 656d 3e3c 636f 6465 3e67 s to g\n+00135eb0: 736f 6170 2f73 7464 736f 6170 322e 683c soap/stdsoap2.h<\n+00135ec0: 2f63 6f64 653e 3c2f 656d 3e2e 2059 6f75 /code>. You\n+00135ed0: 2063 616e 2061 6c73 6f20 7370 6563 6966 can also specif\n+00135ee0: 7920 7468 6520 6865 6164 6572 2066 696c y the header fil\n+00135ef0: 6520 6e61 6d65 2074 6f20 696e 636c 7564 e name to includ\n+00135f00: 6520 6173 2061 206d 6163 726f 203c 636f e as a macro SOAPDEFS_H to override\n+00135f30: 2074 6865 206e 616d 6520 3c65 6d3e 3c63 the name soapdefs.h:

    \n+00135f60: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     c++ -D SO\n+00135f80: 4150 4445 4653 5f48 3d6d 7964 6566 732e  APDEFS_H=mydefs.\n+00135f90: 6820 2d63 2073 7464 736f 6170 322e 6370  h -c stdsoap2.cp\n+00135fa0: 700a 3c2f 7072 653e 3c70 3e20 466f 7220  p.

    For \n+00135fb0: 6578 616d 706c 652c 3c2f 703e 0a3c 6469 example,

    .
    // Co\n+00136000: 6e74 656e 7473 206f 6620 6669 6c65 2026 ntents of file &\n+00136010: 7175 6f74 3b73 6f61 7064 6566 732e 6826 quot;soapdefs.h&\n+00136020: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    \n+00136060: 2369 6e63 6c75 6465 2026 6c74 3b6f 7374 #include <ost\n+00136070: 7265 616d 2667 743b 3c2f 7370 616e 3e20 ream> \n+00136080: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The following h\n+001360b0: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s\n+001360c0: 6f61 7063 7070 3220 7265 6665 7273 2074 oapcpp2 refers t\n+001360d0: 6f20 3c63 6f64 653e 7374 643a 3a6f 7374 o std::ost\n+001360e0: 7265 616d 3c2f 636f 6465 3e20 7769 7468 ream with\n+001360f0: 6f75 7420 736f 6170 6370 7032 2074 6872 out soapcpp2 thr\n+00136100: 6f77 696e 6720 6572 726f 7273 2c20 6279 owing errors, by\n+00136110: 2075 7369 6e67 203c 636f 6465 3e65 7874 using ext\n+00136120: 6572 6e3c 2f63 6f64 653e 2074 6f20 6465 ern to de\n+00136130: 636c 6172 6520 3c63 6f64 653e 636c 6173 clare clas\n+00136140: 7320 7374 643a 3a6f 7374 7265 616d 3c2f s std::ostream:

    .
    // std:\n+001361a0: 3a6f 7374 7265 616d 2063 616e 2623 3339 :ostream can'\n+001361b0: 3b74 2062 6520 7365 7269 616c 697a 6564 ;t be serialized\n+001361c0: 2c20 6275 7420 6e65 6564 2074 6f20 6265 , but need to be\n+001361d0: 2064 6563 6c61 7265 6420 746f 206d 616b declared to mak\n+001361e0: 6520 6974 2076 6973 6962 6c65 2074 6f20 e it visible to \n+001361f0: 6753 4f41 5020 3c2f 7370 616e 3e3c 2f64 gSOAP .
    exte\n+00136230: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn \n+00136250: 636c 6173 7320 3c2f 7370 616e 3e73 7464 class std\n+00136260: 3a3a 6f73 7472 6561 6d3b 3c2f 6469 763e ::ostream;
    \n+00136270: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    class \n+001362c0: 6e73 5f5f 6d79 436c 6173 7320 3c2f 6469 ns__myClass .
    { pub\n+00136300: 6c69 633c 2f73 7061 6e3e 3a3c 2f64 6976 lic:.
    vi\n+00136340: 7274 7561 6c3c 2f73 7061 6e3e 203c 7370 rtual void print(std::os\n+00136380: 7472 6561 6d20 2661 6d70 3b73 2920 3c73 tream &s) const\n+001363b0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // we ne\n+001363d0: 6564 2073 7464 3a3a 6f73 7472 6561 6d20 ed std::ostream \n+001363e0: 6865 7265 203c 2f73 7061 6e3e 3c2f 6469 here .
    ... //.
    };
    .

    See also\n+00136470: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Transient dat\n+001364b0: 6120 7479 7065 733c 2f61 3e20 2c20 6e6f a types , no\n+001364c0: 6e2d 7365 7269 616c 697a 6162 6c65 2064 n-serializable d\n+001364d0: 6174 6120 7479 7065 732e 3c2f 703e 0a3c ata types.

    .<\n+001364e0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+00136500: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+00136510: 3c2f 703e 0a3c 6831 3e3c 6120 636c 6173

    .

    .Run-t\n+00136540: 696d 6520 666c 6167 733c 2f68 313e 0a3c ime flags

    .<\n+00136550: 703e 5468 6520 6753 4f41 5020 656e 6769 p>The gSOAP engi\n+00136560: 6e65 2073 7461 7465 2069 7320 7374 6f72 ne state is stor\n+00136570: 6564 2069 6e20 7468 6520 3c63 6f64 653e ed in the \n+00136580: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+001365d0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+001365e0: 6578 7420 7468 6174 2069 7320 696e 6974 ext that is init\n+001365f0: 6961 6c69 7a65 6420 616e 6420 636f 6e74 ialized and cont\n+00136600: 726f 6c6c 6564 2062 7920 7661 7269 6f75 rolled by variou\n+00136610: 7320 6f70 7469 6f6e 616c 2072 756e 7469 s optional runti\n+00136620: 6d65 2066 6c61 6773 2e20 4d6f 7374 2066 me flags. Most f\n+00136630: 6c61 6773 2061 7265 2061 7070 6c69 6361 lags are applica\n+00136640: 626c 6520 746f 2065 6974 6865 7220 7072 ble to either pr\n+00136650: 6f63 6573 7369 6e67 2069 6e70 7574 206f ocessing input o\n+00136660: 7220 746f 2070 726f 6365 7373 696e 6720 r to processing \n+00136670: 6f75 7470 7574 2c20 6275 7420 736f 6d65 output, but some\n+00136680: 2061 7265 2061 7070 6c69 6361 626c 6520 are applicable \n+00136690: 746f 2062 6f74 6820 696e 7075 7420 616e to both input an\n+001366a0: 6420 6f75 7470 7574 206d 6573 7361 6765 d output message\n+001366b0: 2061 6e64 2064 6f63 756d 656e 7420 7072 and document pr\n+001366c0: 6f63 6573 7369 6e67 2e3c 2f70 3e0a 3c70 ocessing.

    .Furthermore, th\n+001366e0: 6573 6520 666c 6167 7320 6172 6520 6469 ese flags are di\n+001366f0: 7669 6465 6420 696e 746f 2066 6f75 7220 vided into four \n+00136700: 6361 7465 676f 7269 6573 3a20 7472 616e categories: tran\n+00136710: 7370 6f72 7420 2849 4f29 2c20 636f 6e74 sport (IO), cont\n+00136720: 656e 7420 656e 636f 6469 6e67 2028 454e ent encoding (EN\n+00136730: 4329 2c20 584d 4c20 7061 7273 696e 6720 C), XML parsing \n+00136740: 616e 6420 6765 6e65 7261 7469 6f6e 2028 and generation (\n+00136750: 584d 4c29 2c20 616e 6420 432f 432b 2b20 XML), and C/C++ \n+00136760: 7573 6167 6520 2843 292e 3c2f 703e 0a3c usage (C).

    .<\n+00136770: 703e 5468 6520 696e 7075 742d 6d6f 6465 p>The input-mode\n+00136780: 2061 6e64 206f 7574 7075 742d 6d6f 6465 and output-mode\n+00136790: 2066 6c61 6773 2066 6f72 2069 6e62 6f75 flags for inbou\n+001367a0: 6e64 2028 696e 2920 616e 6420 6f75 7462 nd (in) and outb\n+001367b0: 6f75 6e64 2028 6f75 7429 206d 6573 7361 ound (out) messa\n+001367c0: 6765 2070 726f 6365 7373 696e 6720 6172 ge processing ar\n+001367d0: 653a 3c2f 703e 0a3c 7461 626c 6520 636c e:

    .
    define \n+00131d10: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 result \n+00131d40: 203c 2f74 683e 3c2f 7472 3e0a 3c74 7220
    #\n+00131e70: 5749 5448 5f53 4f41 5044 4546 535f 483c WITH_SOAPDEFS_H<\n+00131e80: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    \n+00131fa0: 2357 4954 485f 434f 4d50 4154 3c2f 636f #WITH_COMPAT rem\n+00131fe0: 6f76 6573 2064 6570 656e 6465 6e63 7920 oves dependency \n+00131ff0: 6f6e 2043 2b2b 2073 7472 6561 6d20 6c69 on C++ stream li\n+00132000: 6272 6172 6965 7320 616e 6420 432b 2b20 braries and C++ \n+00132010: 6578 6365 7074 696f 6e73 2020 2020 3c2f exceptions
    #WITH_LEAN cr\n+001320b0: 6561 7465 7320 6120 736d 616c 6c2d 666f eates a small-fo\n+001320c0: 6f74 7072 696e 7420 6578 6563 7574 6162 otprint executab\n+001320d0: 6c65 2c20 7365 6520 5365 6374 696f 6e20 le, see Section \n+001320e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 How to mini\n+00132110: 6d69 7a65 2061 7070 6c69 6361 7469 6f6e mize application\n+00132120: 206d 656d 6f72 7920 666f 6f74 7072 696e memory footprin\n+00132130: 743c 2f61 3e20 2020 203c 2f74 643e 3c2f t
    #WI\n+00132190: 5448 5f4c 4541 4e45 523c 2f63 6f64 653e TH_LEANER\n+001321a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 create\n+001321d0: 7320 616e 2065 7665 6e20 736d 616c 6c65 s an even smalle\n+001321e0: 7220 666f 6f74 7072 696e 7420 6578 6563 r footprint exec\n+001321f0: 7574 6162 6c65 2c20 7365 6520 5365 6374 utable, see Sect\n+00132200: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion How to \n+00132230: 6d69 6e69 6d69 7a65 2061 7070 6c69 6361 minimize applica\n+00132240: 7469 6f6e 206d 656d 6f72 7920 666f 6f74 tion memory foot\n+00132250: 7072 696e 743c 2f61 3e20 2020 203c 2f74 print
    #WITH_FAST use\n+001322f0: 2066 6173 7465 7220 6d65 6d6f 7279 2061 faster memory a\n+00132300: 6c6c 6f63 6174 696f 6e20 7768 656e 2075 llocation when u\n+00132310: 7365 6420 7769 7468 203c 636f 6465 3e23 sed with #\n+00132320: 5749 5448 5f4c 4541 4e3c 2f63 6f64 653e WITH_LEAN\n+00132330: 206f 7220 3c63 6f64 653e 2357 4954 485f or #WITH_\n+00132340: 4c45 414e 4552 3c2f 636f 6465 3e20 2020 LEANER \n+00132350: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    enables HTTP \n+001323f0: 636f 6f6b 6965 732c 2073 6565 2053 6563 cookies, see Sec\n+00132400: 7469 6f6e 7320 3c61 2063 6c61 7373 3d22 tions Client-side c\n+00132440: 6f6f 6b69 6520 7375 7070 6f72 743c 2f61 ookie support and Server-side c\n+00132490: 6f6f 6b69 6520 7375 7070 6f72 743c 2f61 ookie support
    #WITH_\n+00132500: 494e 5345 4355 5245 5f43 4f4f 4b49 4553 INSECURE_COOKIES\n+00132510: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #WI\n+00132600: 5448 5f49 5056 363c 2f63 6f64 653e 2020 TH_IPV6 \n+00132610: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n+00132640: 4950 7636 2073 7570 706f 7274 2020 2020 IPv6 support \n+00132650: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    enables I\n+001326f0: 5076 3620 7375 7070 6f72 7420 7769 7468 Pv6 support with\n+00132700: 2049 5076 362d 6f6e 6c79 2073 6572 7665 IPv6-only serve\n+00132710: 7220 6f70 7469 6f6e 2020 2020 3c2f 7464 r option
    \n+00132770: 2357 4954 485f 4f50 454e 5353 4c3c 2f63 #WITH_OPENSSL en\n+001327b0: 6162 6c65 7320 4f70 656e 5353 4c2c 2073 ables OpenSSL, s\n+001327c0: 6565 2053 6563 7469 6f6e 7320 3c61 2063 ee Sections Secure\n+00132800: 2063 6c69 656e 7473 2077 6974 6820 4854 clients with HT\n+00132810: 5450 533c 2f61 3e20 616e 6420 3c61 2063 TPS and Secure\n+00132850: 2057 6562 2073 6572 7669 6365 7320 7769 Web services wi\n+00132860: 7468 2048 5454 5053 3c2f 613e 2020 2020 th HTTPS \n+00132870: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    enables GNUTLS\n+00132910: 2c20 7365 6520 5365 6374 696f 6e73 203c , see Sections <\n+00132920: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00132930: 663d 2269 6e64 6578 2e68 746d 6c23 636c f=\"index.html#cl\n+00132940: 6965 6e74 6f70 656e 7373 6c22 3e53 6563 ientopenssl\">Sec\n+00132950: 7572 6520 636c 6965 6e74 7320 7769 7468 ure clients with\n+00132960: 2048 5454 5053 3c2f 613e 2061 6e64 203c HTTPS and <\n+00132970: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00132980: 663d 2269 6e64 6578 2e68 746d 6c23 7365 f=\"index.html#se\n+00132990: 7276 6572 6f70 656e 7373 6c22 3e53 6563 rveropenssl\">Sec\n+001329a0: 7572 6520 5765 6220 7365 7276 6963 6573 ure Web services\n+001329b0: 2077 6974 6820 4854 5450 533c 2f61 3e20 with HTTPS \n+001329c0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    enables gzip a\n+00132a60: 6e64 2064 6566 6c61 7465 2063 6f6d 7072 nd deflate compr\n+00132a70: 6573 7369 6f6e 2c20 7365 6520 5365 6374 ession, see Sect\n+00132a80: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion \n+00132ab0: 5a6c 6962 2063 6f6d 7072 6573 7369 6f6e Zlib compression\n+00132ac0: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #WI\n+00132b20: 5448 5f5a 4c49 423c 2f63 6f64 653e 2020 TH_ZLIB \n+00132b30: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n+00132b60: 6465 666c 6174 6520 636f 6d70 7265 7373 deflate compress\n+00132b70: 696f 6e20 6f6e 6c79 2c20 7365 6520 5365 ion only, see Se\n+00132b80: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Zlib compressi\n+00132bc0: 6f6e 3c2f 613e 2020 2020 3c2f 7464 3e3c on
    #W\n+00132c20: 4954 485f 4e54 4c4d 3c2f 636f 6465 3e20 ITH_NTLM \n+00132c30: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enables\n+00132c60: 204e 544c 4d20 7375 7070 6f72 7420 2020 NTLM support \n+00132c70: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    force the u\n+00132d10: 7365 206c 6f63 616c 6520 6675 6e63 7469 se locale functi\n+00132d20: 6f6e 7320 7768 656e 2061 7661 696c 6162 ons when availab\n+00132d30: 6c65 2074 6f20 656e 7375 7265 206c 6f63 le to ensure loc\n+00132d40: 616c 652d 696e 6465 7065 6e64 656e 7420 ale-independent \n+00132d50: 6e75 6d62 6572 2063 6f6e 7665 7273 696f number conversio\n+00132d60: 6e73 2020 2020 3c2f 7464 3e3c 2f74 723e ns
    #WITH_\n+00132dc0: 4e4f 5f43 5f4c 4f43 414c 453c 2f63 6f64 NO_C_LOCALE remo\n+00132e00: 7665 2074 6865 2075 7365 206f 6620 6c6f ve the use of lo\n+00132e10: 6361 6c65 2066 756e 6374 696f 6e73 2074 cale functions t\n+00132e20: 6f20 696d 7072 6f76 6520 706f 7274 6162 o improve portab\n+00132e30: 696c 6974 7920 2020 203c 2f74 643e 3c2f ility
    #W\n+00132e90: 4954 485f 494e 434c 5544 455f 584c 4f43 ITH_INCLUDE_XLOC\n+00132ea0: 414c 455f 483c 2f63 6f64 653e 2020 203c ALE_H <\n+00132eb0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>force the \n+00132ee0: 696e 636c 7573 696f 6e20 6f66 203c 636f inclusion of <xlocale.h\n+00132f00: 2667 743b 3c2f 636f 6465 3e20 746f 2064 > to d\n+00132f10: 6566 696e 6520 3c63 6f64 653e 6c6f 6361 efine loca\n+00132f20: 6c65 5f74 3c2f 636f 6465 3e20 616e 6420 le_t and \n+00132f30: 3c63 6f64 653e 5f6c 3c2f 636f 6465 3e20 _l \n+00132f40: 6675 6e63 7469 6f6e 732c 2074 6f20 696d functions, to im\n+00132f50: 7072 6f76 6520 706f 7274 6162 696c 6974 prove portabilit\n+00132f60: 7920 2020 203c 2f74 643e 3c2f 7472 3e0a y
    #WITH_D\n+00132fc0: 4f4d 3c2f 636f 6465 3e20 2020 3c2f 7464 OM enable DOM pa\n+00133000: 7273 696e 6720 696e 2074 6865 2065 6e67 rsing in the eng\n+00133010: 696e 652c 2072 6571 7569 7265 6420 6279 ine, required by\n+00133020: 2074 6865 2057 532d 5365 6375 7269 7479 the WS-Security\n+00133030: 2070 6c75 6769 6e20 2020 203c 2f74 643e plugin
    \n+00133090: 2357 4954 485f 5245 504c 4143 455f 494c #WITH_REPLACE_IL\n+001330a0: 4c45 4741 4c5f 5554 4638 3c2f 636f 6465 LEGAL_UTF8 enabl\n+001330e0: 6520 7374 7269 6374 2055 5446 2d38 2c20 e strict UTF-8, \n+001330f0: 7265 706c 6163 6573 2055 5446 2d38 2063 replaces UTF-8 c\n+00133100: 6f6e 7465 6e74 2074 6861 7420 6973 206f ontent that is o\n+00133110: 7574 7369 6465 2074 6865 2061 6c6c 6f77 utside the allow\n+00133120: 6564 2072 616e 6765 2077 6974 6820 552b ed range with U+\n+00133130: 4646 4644 2020 2020 3c2f 7464 3e3c 2f74 FFFD
    #WIT\n+00133190: 485f 4641 5354 4347 493c 2f63 6f64 653e H_FASTCGI\n+001331a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+001331d0: 7320 4661 7374 4347 492c 2073 6565 2053 s FastCGI, see S\n+001331e0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection F\n+00133210: 6173 7443 4749 3c2f 613e 2020 2020 3c2f astCGI
    #WITH_NOIO re\n+001332b0: 6d6f 7665 7320 494f 206f 7065 7261 7469 moves IO operati\n+001332c0: 6f6e 732c 2074 6f20 656c 696d 696e 6174 ons, to eliminat\n+001332d0: 6520 7468 6520 7573 6520 6f66 2042 5344 e the use of BSD\n+001332e0: 2073 6f63 6b65 7473 2c20 7365 6520 5365 sockets, see Se\n+001332f0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction How t\n+00133320: 6f20 7265 6d6f 7665 2074 6865 2042 5344 o remove the BSD\n+00133330: 2073 6f63 6b65 7420 6c69 6272 6172 7920 socket library \n+00133340: 7265 7175 6972 656d 656e 743c 2f61 3e20 requirement \n+00133350: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    removes id \n+001333f0: 616e 6420 6872 6566 2f72 6566 206d 756c and href/ref mul\n+00133400: 7469 2d72 6566 6572 656e 6365 2064 6174 ti-reference dat\n+00133410: 612c 206d 6f72 6520 6167 6772 6573 7369 a, more aggressi\n+00133420: 7665 2074 6861 6e20 7573 696e 6720 7468 ve than using th\n+00133430: 6520 3c63 6f64 653e 2353 4f41 505f 584d e #SOAP_XM\n+00133440: 4c5f 5452 4545 3c2f 636f 6465 3e20 7275 L_TREE ru\n+00133450: 6e74 696d 6520 666c 6167 2020 2020 3c2f ntime flag
    #WITH_NOHTTP<\n+001334c0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #WITH_NOZONE
    #WI\n+00133650: 5448 5f4e 4f45 4d50 5459 4e41 4d45 5350 TH_NOEMPTYNAMESP\n+00133660: 4143 4553 3c2f 636f 6465 3e20 2020 3c2f ACES disables xm\n+001336a0: 6c6e 733d 2222 2064 6566 6175 6c74 2065 lns=\"\" default e\n+001336b0: 6d70 7479 206e 616d 6573 7061 6365 7320 mpty namespaces \n+001336c0: 6672 6f6d 2058 4d4c 206d 6573 7361 6765 from XML message\n+001336d0: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #WITH_N\n+00133730: 4f45 4d50 5459 5354 5255 4354 3c2f 636f OEMPTYSTRUCT ins\n+00133770: 6572 7473 2061 2064 756d 6d79 206d 656d erts a dummy mem\n+00133780: 6265 7220 696e 2065 6d70 7479 2073 7472 ber in empty str\n+00133790: 7563 7473 2074 6f20 616c 6c6f 7720 636f ucts to allow co\n+001337a0: 6d70 696c 6174 696f 6e20 2020 203c 2f74 mpilation
    #WITH_NOGLOBAL\n+00133810: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    disables\n+00133950: 2064 6570 656e 6465 6e63 6520 6f6e 2067 dependence on g\n+00133960: 6c6f 6261 6c20 3c63 6f64 653e 6e61 6d65 lobal name\n+00133970: 7370 6163 6573 3c2f 636f 6465 3e20 7461 spaces ta\n+00133980: 626c 652c 2061 2074 6162 6c65 206d 7573 ble, a table mus\n+00133990: 7420 6265 2073 6574 2065 7870 6c69 6369 t be set explici\n+001339a0: 746c 7920 7769 7468 203c 636f 6465 3e3c tly with <\n+001339b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001339c0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001339d0: 5f6e 616d 6573 7061 6365 2e68 746d 6c23 _namespace.html#\n+001339e0: 6761 3565 6339 3133 6163 6363 3730 3563 ga5ec913accc705c\n+001339f0: 6361 3332 3936 6162 3735 6261 6539 3535 ca3296ab75bae955\n+00133a00: 6135 2220 7469 746c 653d 2241 6374 6976 a5\" title=\"Activ\n+00133a10: 6174 6573 2061 6e20 584d 4c20 6e61 6d65 ates an XML name\n+00133a20: 7370 6163 6520 7461 626c 6520 746f 2067 space table to g\n+00133a30: 656e 6572 6174 6520 616e 6420 7265 736f enerate and reso\n+00133a40: 6c76 6520 786d 6c6e 7320 6e61 6d65 7370 lve xmlns namesp\n+00133a50: 6163 6520 7072 6566 6978 6573 2069 6e20 ace prefixes in \n+00133a60: 584d 4c20 6d65 7373 6167 6573 2e22 3e73 XML messages.\">s\n+00133a70: 6f61 705f 7365 745f 6e61 6d65 7370 6163 oap_set_namespac\n+00133a80: 6573 3c2f 613e 3c2f 636f 6465 3e20 7365 es se\n+00133a90: 6520 616c 736f 2053 6563 7469 6f6e 203c e also Section <\n+00133aa0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00133ab0: 663d 2269 6e64 6578 2e68 746d 6c23 6e73 f=\"index.html#ns\n+00133ac0: 7461 626c 6522 3e58 4d4c 206e 616d 6573 table\">XML names\n+00133ad0: 7061 6365 7320 616e 6420 7468 6520 6e61 paces and the na\n+00133ae0: 6d65 7370 6163 6520 6d61 7070 696e 6720 mespace mapping \n+00133af0: 7461 626c 653c 2f61 3e20 2020 203c 2f74 table
    #WITH_CDATA re\n+00133b90: 7461 696e 7320 7468 6520 7061 7273 6564 tains the parsed\n+00133ba0: 2043 4441 5441 2073 6563 7469 6f6e 7320 CDATA sections \n+00133bb0: 696e 206c 6974 6572 616c 2058 4d4c 2073 in literal XML s\n+00133bc0: 7472 696e 6773 2020 2020 3c2f 7464 3e3c trings
    #W\n+00133c20: 4954 485f 5055 5245 5f56 4952 5455 414c ITH_PURE_VIRTUAL\n+00133c30: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    enabl\n+00133d80: 6573 2043 2b2b 2062 6173 6520 7365 7276 es C++ base serv\n+00133d90: 6963 6520 636c 6173 7365 7320 7769 7468 ice classes with\n+00133da0: 2064 6566 6175 6c74 2076 6972 7475 616c default virtual\n+00133db0: 206d 6574 686f 6473 2072 6574 7572 6e69 methods returni\n+00133dc0: 6e67 2066 6175 6c74 203c 636f 6465 3e23 ng fault #\n+00133dd0: 534f 4150 5f4e 4f5f 4d45 5448 4f44 3c2f SOAP_NO_METHOD, requires \n+00133df0: 736f 6170 6370 7032 206f 7074 696f 6e20 soapcpp2 option \n+00133e00: 3c63 6f64 653e 2d69 3c2f 636f 6465 3e20 -i \n+00133e10: 6f72 203c 636f 6465 3e2d 6a3c 2f63 6f64 or -j
    #WITH_\n+00133e80: 4341 5345 494e 5345 4e53 4954 4956 4554 CASEINSENSITIVET\n+00133e90: 4147 533c 2f63 6f64 653e 2020 203c 2f74 AGS enables case\n+00133ed0: 2069 6e73 656e 7369 7469 7665 2058 4d4c insensitive XML\n+00133ee0: 2070 6172 7369 6e67 2020 2020 3c2f 7464 parsing
    #WITH_SOCKET_CL\n+00133f50: 4f53 455f 4f4e 5f45 5849 543c 2f63 6f64 OSE_ON_EXIT prev\n+00133f90: 656e 7473 2061 2073 6572 7665 7220 706f ents a server po\n+00133fa0: 7274 2066 726f 6d20 7374 6179 696e 6720 rt from staying \n+00133fb0: 696e 206c 6973 7465 6e69 6e67 206d 6f64 in listening mod\n+00133fc0: 6520 6166 7465 7220 6578 6974 2062 7920 e after exit by \n+00133fd0: 696e 7465 726e 616c 6c79 2073 6574 7469 internally setti\n+00133fe0: 6e67 203c 636f 6465 3e66 636e 746c 2873 ng fcntl(s\n+00133ff0: 6f63 6b2c 2046 5f53 4554 4644 2c20 4644 ock, F_SETFD, FD\n+00134000: 5f43 4c4f 4558 4543 293c 2f63 6f64 653e _CLOEXEC)\n+00134010: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_TC\n+00134070: 5046 494e 3c2f 636f 6465 3e20 2020 3c2f PFIN enables TCP\n+001340b0: 2046 494e 2061 6674 6572 2073 656e 6473 FIN after sends\n+001340c0: 2077 6865 6e20 736f 636b 6574 2069 7320 when socket is \n+001340d0: 7265 6164 7920 746f 2063 6c6f 7365 2020 ready to close \n+001340e0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    enables a\n+00134180: 2022 7365 6c66 2070 6970 6522 2074 6f20 \"self pipe\" to \n+00134190: 656e 6162 6c65 2074 6865 203c 636f 6465 enable the soap_clo\n+00134240: 7365 5f63 6f6e 6e65 6374 696f 6e3c 2f61 se_connection functio\n+00134260: 6e20 2867 534f 4150 2032 2e38 2e37 3120 n (gSOAP 2.8.71 \n+00134270: 6f72 2067 7265 6174 6572 2920 2020 3c2f or greater)
    define \n+00134440: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 result \n+00134470: 2020 203c 2f74 683e 3c2f 7472 3e0a 3c74
    expands to \n+00134510: 3c63 6f64 653e 2873 7464 3a3a 6e6f 7468 (std::noth\n+00134520: 726f 7729 3c2f 636f 6465 3e20 746f 2070 row) to p\n+00134530: 7265 7665 6e74 206d 656d 6f72 7920 616c revent memory al\n+00134540: 6c6f 6361 7469 6f6e 2065 7863 6570 7469 location excepti\n+00134550: 6f6e 7320 283c 636f 6465 3e23 534f 4150 ons (#SOAP\n+00134560: 5f45 4f4d 3c2f 636f 6465 3e20 6973 2075 _EOM is u\n+00134570: 7365 6420 696e 7374 6561 6429 2c20 7468 sed instead), th\n+00134580: 6973 206d 6163 726f 2063 616e 2062 6520 is macro can be \n+00134590: 6368 616e 6765 6420 2020 203c 2f74 643e changed
    \n+001345f0: 2353 4f41 505f 4255 464c 454e 3c2f 636f #SOAP_BUFLEN the\n+00134630: 206c 656e 6774 6820 6f66 2074 6865 2069 length of the i\n+00134640: 6e74 6572 6e61 6c20 6d65 7373 6167 6520 nternal message \n+00134650: 6275 6666 6572 2c20 696d 7061 6374 7320 buffer, impacts \n+00134660: 636f 6d6d 756e 6963 6174 696f 6e73 2070 communications p\n+00134670: 6572 666f 726d 616e 6365 2020 2020 3c2f erformance
    #SOAP_HDRLEN
    #SOAP_\n+00134790: 5441 474c 454e 3c2f 636f 6465 3e20 2020 TAGLEN \n+001347a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 the maxim\n+001347d0: 756d 206c 656e 6774 6820 6f66 2058 4d4c um length of XML\n+001347e0: 2074 6167 7320 616e 6420 5552 4c73 2020 tags and URLs \n+001347f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    the maximum l\n+00134890: 656e 6774 6820 6f66 2074 656d 706f 7261 ength of tempora\n+001348a0: 7279 2073 7472 696e 6720 7661 6c75 6573 ry string values\n+001348b0: 2c20 7368 6f72 7420 7374 7269 6e67 7320 , short strings \n+001348c0: 616e 6420 6272 6965 6620 6572 726f 7220 and brief error \n+001348d0: 6d65 7373 6167 6573 2020 2020 3c2f 7464 messages
    #SOAP_MAXALLOCS\n+00134940: 495a 453c 2f63 6f64 653e 2020 203c 2f74 IZE the maximum \n+00134980: 7369 7a65 206f 6620 6120 626c 6f63 6b20 size of a block \n+00134990: 6f66 206d 656d 6f72 7920 7468 6174 203c of memory that <\n+001349a0: 636f 6465 3e6d 616c 6c6f 633c 2f63 6f64 code>malloc can allocate \n+001349c0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    the ma\n+00134a60: 7869 6d75 6d20 616c 6c6f 6361 7469 6f6e ximum allocation\n+00134a70: 2074 6872 6573 686f 6c64 2074 6f20 7072 threshold to pr\n+00134a80: 652d 616c 6c6f 6361 7465 2053 4f41 5020 e-allocate SOAP \n+00134a90: 6172 7261 7973 2069 6e20 6d65 6d6f 7279 arrays in memory\n+00134aa0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_M\n+00134b00: 4158 4449 4d45 5349 5a45 3c2f 636f 6465 AXDIMESIZE the m\n+00134b40: 6178 696d 756d 2044 494d 4520 6174 7461 aximum DIME atta\n+00134b50: 6368 6d65 6e74 2073 697a 6520 616c 6c6f chment size allo\n+00134b60: 7765 6420 746f 2072 6563 6569 7665 2020 wed to receive \n+00134b70: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    maximum num\n+00134c10: 6265 7220 6f66 2045 494e 5452 2069 6e74 ber of EINTR int\n+00134c20: 6572 7275 7074 7320 746f 2069 676e 6f72 errupts to ignor\n+00134c30: 6520 7768 696c 6520 706f 6c6c 696e 6720 e while polling \n+00134c40: 6120 736f 636b 6574 2066 6f72 2070 656e a socket for pen\n+00134c50: 6469 6e67 2061 6374 6976 6974 7920 2020 ding activity \n+00134c60: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    trust\n+00134d00: 6564 2069 6e66 6c61 7465 6420 636f 6e74 ed inflated cont\n+00134d10: 656e 7420 7369 7a65 2028 3120 4d42 2062 ent size (1 MB b\n+00134d20: 7920 6465 6661 756c 7429 2020 2020 3c2f y default)
    #SOAP_MAXKEEPA\n+00134d90: 4c49 5645 3c2f 636f 6465 3e20 2020 3c2f LIVE maximum ite\n+00134dd0: 7261 7469 6f6e 7320 696e 2074 6865 203c rations in the <\n+00134de0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_serve loop o\n+00134e70: 6e20 4854 5450 206b 6565 702d 616c 6976 n HTTP keep-aliv\n+00134e80: 6520 636f 6e6e 6563 7469 6f6e 7320 2020 e connections \n+00134e90: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    maximum st\n+00134f30: 7269 6e67 2063 6f6e 7465 6e74 206c 656e ring content len\n+00134f40: 6774 6820 666f 7220 7374 7269 6e67 7320 gth for strings \n+00134f50: 6e6f 7420 616c 7265 6164 7920 636f 6e73 not already cons\n+00134f60: 7472 6169 6e65 6420 6279 2058 4d4c 2073 trained by XML s\n+00134f70: 6368 656d 6120 7661 6c69 6461 7469 6f6e chema validation\n+00134f80: 2063 6f6e 7374 7261 696e 7473 2020 2020 constraints \n+00134f90: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_MAXLEV\n+00134ff0: 454c 3c2f 636f 6465 3e20 2020 3c2f 7464 EL maximum XML n\n+00135030: 6573 7469 6e67 2064 6570 7468 206c 6576 esting depth lev\n+00135040: 656c 2070 6572 6d69 7474 6564 2062 7920 el permitted by \n+00135050: 7468 6520 584d 4c20 7061 7273 6572 2020 the XML parser \n+00135060: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    maximum n\n+00135100: 756d 6265 7220 6f66 2061 7272 6179 206f umber of array o\n+00135110: 7220 636f 6e74 6169 6e65 7220 656c 656d r container elem\n+00135120: 656e 7473 2066 6f72 2063 6f6e 7461 696e ents for contain\n+00135130: 6572 7320 7468 6174 2061 7265 206e 6f74 ers that are not\n+00135140: 2061 6c72 6561 6479 2063 6f6e 7374 7261 already constra\n+00135150: 696e 6564 2062 7920 584d 4c20 7363 6865 ined by XML sche\n+00135160: 6d61 2076 616c 6964 6174 696f 6e20 636f ma validation co\n+00135170: 6e73 7472 6169 6e74 7320 2020 203c 2f74 nstraints
    #SOAP_MINDEFLAT\n+001351e0: 4552 4154 494f 3c2f 636f 6465 3e20 2020 ERATIO \n+001351f0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 trusted d\n+00135220: 6566 6c61 7469 6f6e 2072 6174 696f 2061 eflation ratio a\n+00135230: 6674 6572 203c 636f 6465 3e23 534f 4150 fter #SOAP\n+00135240: 5f4d 4158 494e 464c 4154 4553 495a 453c _MAXINFLATESIZE<\n+00135250: 2f63 6f64 653e 2069 7320 7265 6163 6865 /code> is reache\n+00135260: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d
    #SOAP_\n+001352c0: 5055 5245 5f56 4952 5455 414c 3c2f 636f PURE_VIRTUAL set\n+00135300: 2074 6f20 3c63 6f64 653e 3d20 303c 2f63 to = 0 when \n+00135320: 2357 4954 485f 5055 5245 5f56 4952 5455 #WITH_PURE_VIRTU\n+00135330: 414c 3c2f 636f 6465 3e20 6973 2064 6566 AL is def\n+00135340: 696e 6564 2020 2020 3c2f 7464 3e3c 2f74 ined
    #SOA\n+001353a0: 505f 5353 4c5f 5253 415f 4249 5453 3c2f P_SSL_RSA_BITS
    #\n+00135460: 534f 4150 5f55 4e4b 4e4f 574e 5f43 4841 SOAP_UNKNOWN_CHA\n+00135470: 523c 2f63 6f64 653e 2020 203c 2f74 643e R an 8 bit integ\n+001354b0: 6572 2074 6861 7420 7265 7072 6573 656e er that represen\n+001354c0: 7473 2061 2063 6861 7261 6374 6572 2074 ts a character t\n+001354d0: 6861 7420 636f 756c 6420 6e6f 7420 6265 hat could not be\n+001354e0: 2063 6f6e 7665 7274 6564 2074 6f20 616e converted to an\n+001354f0: 2041 5343 4949 2063 6861 722c 2069 2e65 ASCII char, i.e\n+00135500: 2e20 7768 656e 2063 6f6e 7665 7274 696e . when convertin\n+00135510: 6720 616e 2058 4d4c 2055 6e69 636f 6465 g an XML Unicode\n+00135520: 2063 6861 7261 6374 6572 2020 2020 3c2f character
    #SOAP_UNKNOWN_\n+00135590: 554e 4943 4f44 455f 4348 4152 3c2f 636f UNICODE_CHAR int\n+001355d0: 6567 6572 2055 6e69 636f 6465 2076 616c eger Unicode val\n+001355e0: 7565 2072 6570 7265 7365 6e74 696e 6720 ue representing \n+001355f0: 6120 6368 6172 6163 7465 7220 7468 6174 a character that\n+00135600: 2072 6570 6c61 6365 7320 616e 2069 6e76 replaces an inv\n+00135610: 616c 6964 2055 6e69 636f 6465 2063 6f64 alid Unicode cod\n+00135620: 6520 706f 696e 7420 2020 203c 2f74 643e e point
    \n+00135680: 2353 4f41 505f 4c4f 4e47 5f46 4f52 4d41 #SOAP_LONG_FORMA\n+00135690: 543c 2f63 6f64 653e 2020 203c 2f74 643e T macro that rep\n+001356d0: 7265 7365 6e74 7320 7468 6520 3c63 6f64 resents the #LONG64\n+001356f0: 2070 7269 6e74 6620 252d 666f 726d 6174 printf %-format\n+00135700: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_UL\n+00135760: 4f4e 475f 464f 524d 4154 3c2f 636f 6465 ONG_FORMAT macro\n+001357a0: 2074 6861 7420 7265 7072 6573 656e 7473 that represents\n+001357b0: 2074 6865 203c 636f 6465 3e23 554c 4f4e the #ULON\n+001357c0: 4736 343c 2f63 6f64 653e 2070 7269 6e74 G64 print\n+001357d0: 6620 252d 666f 726d 6174 2020 2020 3c2f f %-format
    #SOAP_INVALID\n+00135840: 5f53 4f43 4b45 543c 2f63 6f64 653e 2020 _SOCKET \n+00135850: 203c 2f74 643e 3c74 6420 636c 6173 733d portable\n+00135880: 2069 6e76 616c 6964 2073 6f63 6b65 7420 invalid socket \n+00135890: 7661 6c75 652c 2063 616e 2061 6c73 6f20 value, can also \n+001358a0: 7573 6520 3c63 6f64 653e 233c 6120 636c use #soap_val\n+00135960: 6964 5f73 6f63 6b65 7428 736f 636b 293c id_socket(sock)<\n+00135970: 2f61 3e3c 2f63 6f64 653e 2074 6f20 6368 /a> to ch\n+00135980: 6563 6b20 6966 203c 636f 6465 3e73 6f63 eck if soc\n+00135990: 6b3c 2f63 6f64 653e 2069 7320 7661 6c69 k is vali\n+001359a0: 6420 2020 3c2f 7464 3e3c 2f74 723e 0a3c d
    ....<\n+001368d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001368e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001368f0: 3e3c 636f 6465 3e23 534f 4150 5f49 4f5f >#SOAP_IO_\n+00136900: 464c 5553 483c 2f63 6f64 653e 2020 203c FLUSH <\n+00136910: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>..<\n+00136a20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00136a30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00136a40: 3e65 6e61 626c 6520 6f75 7470 7574 2062 >enable output b\n+00136a50: 7566 6665 7269 6e67 2c20 7468 6520 6465 uffering, the de\n+00136a60: 6661 756c 7420 6d6f 6465 2066 6f72 2073 fault mode for s\n+00136a70: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n+00136a80: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n+00136a90: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00136ab0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+00136b90: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..o\n+00136c20: 7574 2020 203c 2f74 643e 3c74 6420 636c ut .<\n+00136c70: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00136c80: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00136c90: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..i\n+00136e20: 6e2b 6f75 7420 2020 3c2f 7464 3e3c 7464 n+out k\n+00136e50: 6565 7020 736f 636b 6574 2063 6f6e 6e65 eep socket conne\n+00136e60: 6374 696f 6e73 2061 6c69 7665 2c20 7768 ctions alive, wh\n+00136e70: 656e 2073 7570 706f 7274 6564 2062 7920 en supported by \n+00136e80: 7468 6520 4854 5450 2070 6565 7220 2020 the HTTP peer \n+00136e90: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+00136ee0: 636f 6465 3e23 534f 4150 5f49 4f5f 5544 code>#SOAP_IO_UD\n+00136ef0: 503c 2f63 6f64 653e 2020 203c 2f74 643e P \n+00136f00: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00136f30: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+001370b0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n+00137200: 3c74 6420 636c 6173 733d 226d 6172 6b64 u\n+00137250: 7365 2044 494d 4520 656e 636f 6469 6e67 se DIME encoding\n+00137260: 2c20 6175 746f 6d61 7469 6320 7768 656e , automatic when\n+00137270: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+00137280: 7320 6172 6520 7573 6564 2020 2020 3c2f s are used ..<\n+00137300: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137310: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137320: 3e6f 7574 2020 203c 2f74 643e 3c74 6420 >out .<\n+00137420: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00137430: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00137440: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .<\n+00137510: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...\n+00137610: 3c74 7220 636c 6173 733d 226d 6172 6b64 ..\n+00137710: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00137730: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n+00137880: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out .\n+001378d0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+001378f0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n+00137a20: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n+00137a30: 4947 4e4f 5245 4e53 3c2f 636f 6465 3e20 IGNORENS \n+00137a40: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..<\n+00137b30: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137b40: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137b50: 3e69 6e20 2020 3c2f 7464 3e3c 7464 2063 >in .\n+00137bb0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...<\n+00137d60: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137d70: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137d80: 3e6f 7574 2020 203c 2f74 643e 3c74 6420 >out ..\n+00137e90: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ..<\n+00137f20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137f30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137f40: 3e3c 636f 6465 3e23 534f 4150 5f58 4d4c >#SOAP_XML\n+00137f50: 5f4e 4f54 5950 453c 2f63 6f64 653e 2020 _NOTYPE \n+00137f60: 203c 2f74 643e 3c74 6420 636c 6173 733d <\n+00137ff0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...\n+001380e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00138100: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+00138220: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00138230: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00138240: 3e3c 636f 6465 3e23 534f 4150 5f43 5f4d >#SOAP_C_M\n+00138250: 4253 5452 494e 473c 2f63 6f64 653e 2020 BSTRING \n+00138260: 203c 2f74 643e 3c74 6420 636c 6173 733d .<\n+00138350: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00138360: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00138370: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..

    All flags\n+00138460: 2061 7265 2069 6e64 6570 656e 6465 6e74 are independent\n+00138470: 2061 6e64 2063 616e 2062 6520 636f 6d62 and can be comb\n+00138480: 696e 6564 2075 7369 6e67 2061 2062 6974 ined using a bit\n+00138490: 7769 7365 206f 7220 283c 636f 6465 3e7c wise or (|\n+001384a0: 3c2f 636f 6465 3e29 2c20 6578 6365 7074 ), except\n+001384b0: 2066 6f72 203c 636f 6465 3e23 534f 4150 for #SOAP\n+001384c0: 5f49 4f5f 464c 5553 483c 2f63 6f64 653e _IO_FLUSH\n+001384d0: 2c20 3c63 6f64 653e 2353 4f41 505f 494f , #SOAP_IO\n+001384e0: 5f42 5546 4645 523c 2f63 6f64 653e 2c20 _BUFFER, \n+001384f0: 3c63 6f64 653e 2353 4f41 505f 494f 5f53 #SOAP_IO_S\n+00138500: 544f 5245 3c2f 636f 6465 3e2c 2061 6e64 TORE, and\n+00138510: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_\n+00138520: 4348 554e 4b3c 2f63 6f64 653e 2077 6869 CHUNK whi\n+00138530: 6368 2061 7265 2065 6e75 6d65 7261 7469 ch are enumerati\n+00138540: 6f6e 7320 616e 6420 6f6e 6c79 206f 6e65 ons and only one\n+00138550: 206f 6620 7468 6573 6520 492f 4f20 666c of these I/O fl\n+00138560: 6167 7320 6361 6e20 6265 2075 7365 642e ags can be used.\n+00138570: 2041 6c73 6f20 7468 6520 584d 4c20 7365 Also the XML se\n+00138580: 7269 616c 697a 6174 696f 6e20 666c 6167 rialization flag\n+00138590: 7320 3c63 6f64 653e 2353 4f41 505f 584d s #SOAP_XM\n+001385a0: 4c5f 5452 4545 3c2f 636f 6465 3e20 616e L_TREE an\n+001385b0: 6420 3c63 6f64 653e 2353 4f41 505f 584d d #SOAP_XM\n+001385c0: 4c5f 4752 4150 483c 2f63 6f64 653e 2073 L_GRAPH s\n+001385d0: 686f 756c 6420 6e6f 7420 6265 206d 6978 hould not be mix\n+001385e0: 6564 2e3c 2f70 3e0a 3c70 3e54 6f20 616c ed.

    .

    To al\n+001385f0: 6c6f 6361 7465 2061 6e64 2069 6e69 7469 locate and initi\n+00138600: 616c 697a 6520 6120 3c63 6f64 653e 3c61 alize a soap contex\n+00138670: 7420 7769 7468 2069 6e70 7574 2061 6e64 t with input and\n+00138680: 206f 7574 7075 7420 6d6f 6465 2066 6c61 output mode fla\n+00138690: 6773 3a3c 2f70 3e0a 3c64 6976 2063 6c61 gs:

    ..
    struct <\n+00138820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00138830: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00138840: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00138850: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new2<\n+001388b0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap_mode\n+00138910: 3c2f 613e 203c 6120 636c 6173 733d 2263 im\n+00138960: 6f64 653c 2f61 3e2c 203c 6120 636c 6173 ode, soap\n+001389c0: 5f6d 6f64 653c 2f61 3e20 3c61 2063 6c61 _mode omode);.
    soap_new2<\n+00138ae0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    str\n+00138b00: 7563 7420 736f 6170 202a 2073 6f61 705f uct soap * soap_\n+00138b10: 6e65 7732 2873 6f61 705f 6d6f 6465 2069 new2(soap_mode i\n+00138b20: 6e70 7574 5f6d 6f64 652c 2073 6f61 705f nput_mode, soap_\n+00138b30: 6d6f 6465 206f 7574 7075 745f 6d6f 6465 mode output_mode\n+00138b40: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Alloca\n+00138b60: 7465 2061 6e64 2069 6e69 7469 616c 697a te and initializ\n+00138b70: 6520 6120 6e65 7720 736f 6170 2063 6f6e e a new soap con\n+00138b80: 7465 7874 2077 6974 6820 7365 7061 7261 text with separa\n+00138b90: 7465 2069 6e70 7574 2061 6e64 206f 7574 te input and out\n+00138ba0: 7075 7420 736f 6170 5f6d 6f64 6520 666c put soap_mode fl\n+00138bb0: 6167 732e 3c2f 6469 763e 3c2f 6469 763e ags.
    \n+00138bc0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    To in\n+00138be0: 6974 6961 6c69 7a65 2061 2073 7461 636b itialize a stack\n+00138bf0: 2d61 6c6c 6f63 6174 6564 203c 636f 6465 -allocated soa\n+00138c50: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n+00138c60: 7465 7874 2077 6974 6820 696e 7075 7420 text with input \n+00138c70: 616e 6420 6f75 7470 7574 206d 6f64 6520 and output mode \n+00138c80: 666c 6167 733a 3c2f 703e 0a3c 6469 7620 flags:

    .
    voi\n+00138cd0: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d so\n+00138d30: 6170 5f69 6e69 7431 3c2f 613e 283c 7370 ap_init1(struct\n+00138d60: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00138d90: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, soap_mode<\n+00138e20: 2f61 3e20 696f 6d6f 6465 293b 3c2f 6469 /a> iomode);.
    v\n+00138e60: 6f69 643c 2f73 7061 6e3e 203c 6120 636c oid \n+00138ec0: 736f 6170 5f69 6e69 7432 3c2f 613e 283c soap_init2(<\n+00138ed0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00138ee0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+00138f50: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap_mod\n+00138fb0: 653c 2f61 3e20 3c61 2063 6c61 7373 3d22 e i\n+00139000: 6d6f 6465 3c2f 613e 2c20 3c61 2063 6c61 mode, soa\n+00139060: 705f 6d6f 6465 3c2f 613e 203c 6120 636c p_mode omode);<\n+001390c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00139130: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+00139140: 726f 7570 5f5f 636f 6e74 6578 742e 6874 roup__context.ht\n+00139150: 6d6c 2367 6133 6337 3062 3538 3766 6334 ml#ga3c70b587fc4\n+00139160: 6636 3535 3533 6366 6536 3937 3531 6431 f65553cfe69751d1\n+00139170: 6131 3537 6522 3e73 6f61 705f 696e 6974 a157e\">soap_init\n+00139180: 323c 2f61 3e3c 2f64 6976 3e3c 6469 7620 2
    v\n+001391a0: 6f69 6420 736f 6170 5f69 6e69 7432 2873 oid soap_init2(s\n+001391b0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+001391c0: 2c20 736f 6170 5f6d 6f64 6520 696e 7075 , soap_mode inpu\n+001391d0: 745f 6d6f 6465 2c20 736f 6170 5f6d 6f64 t_mode, soap_mod\n+001391e0: 6520 6f75 7470 7574 5f6d 6f64 6529 3c2f e output_mode)
    Initializ\n+00139210: 6520 6120 7374 6163 6b2d 616c 6c6f 6361 e a stack-alloca\n+00139220: 7465 6420 736f 6170 2063 6f6e 7465 7874 ted soap context\n+00139230: 2077 6974 6820 696e 7075 7420 616e 6420 with input and \n+00139240: 6f75 7470 7574 2073 6f61 705f 6d6f 6465 output soap_mode\n+00139250: 2066 6c61 6773 2e3c 2f64 6976 3e3c 2f64 flags.
    .

    To\n+00139280: 2073 6574 2061 6e64 2063 6c65 6172 206d set and clear m\n+00139290: 6f64 6520 666c 6167 7320 7573 653a 3c2f ode flags use:.

    void\n+001392f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_set_m\n+00139350: 6f64 653c 2f61 3e28 3c73 7061 6e20 636c ode(st\n+00139370: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, soap_mode i\n+00139440: 6f6d 6f64 6529 3b20 3c73 7061 6e20 636c omode); //\n+00139460: 2073 6574 2069 6e70 7574 2061 6e64 206f set input and o\n+00139470: 7574 7075 7420 6d6f 6465 2066 6c61 6773 utput mode flags\n+00139480: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001394a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void soap_\n+00139520: 7365 745f 696d 6f64 653c 2f61 3e28 3c73 set_imode(struct soap *soap, soap_mode\n+00139610: 3c2f 613e 203c 6120 636c 6173 733d 2263 im\n+00139660: 6f64 653c 2f61 3e29 3b20 3c73 7061 6e20 ode); \n+00139680: 2f2f 2073 6574 2069 6e70 7574 206d 6f64 // set input mod\n+00139690: 6520 666c 6167 733c 2f73 7061 6e3e 3c2f e flags.
    void soap_set_omode\n+00139740: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (struc\n+00139760: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00139790: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, so\n+00139820: 6170 5f6d 6f64 653c 2f61 3e20 3c61 2063 ap_mode omode);\n+00139880: 203c 7370 616e 2063 6c61 7373 3d22 636f // set ou\n+001398a0: 7470 7574 206d 6f64 6520 666c 6167 733c tput mode flags<\n+001398b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001398d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001398e0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void soap_c\n+00139950: 6c72 5f6d 6f64 653c 2f61 3e28 3c73 7061 lr_mode(struct
    \n+00139980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001399b0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001399e0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap_mode iomode); // clear input\n+00139a70: 2061 6e64 206f 7574 7075 7420 6d6f 6465 and output mode\n+00139a80: 2066 6c61 6773 3c2f 7370 616e 3e3c 2f64 flags..<\n+00139cc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00139cd0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void soap_c\n+00139d40: 6c72 5f6f 6d6f 6465 3c2f 613e 283c 7370 lr_omode(struct\n+00139d70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00139da0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, soap_mode<\n+00139e30: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> omo\n+00139e80: 6465 3c2f 613e 293b 203c 7370 616e 2063 de); /\n+00139ea0: 2f20 636c 6561 7220 6f75 7470 7574 206d / clear output m\n+00139eb0: 6f64 6520 666c 6167 733c 2f73 7061 6e3e ode flags\n+00139ec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00139f30: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_clr\n+00139f80: 5f6d 6f64 653c 2f61 3e3c 2f64 6976 3e3c _mode
    <\n+00139f90: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00139fa0: 6922 3e76 6f69 6420 736f 6170 5f63 6c72 i\">void soap_clr\n+00139fb0: 5f6d 6f64 6528 7374 7275 6374 2073 6f61 _mode(struct soa\n+00139fc0: 7020 2a73 6f61 702c 2073 6f61 705f 6d6f p *soap, soap_mo\n+00139fd0: 6465 2069 6e70 7574 5f61 6e64 5f6f 7574 de input_and_out\n+00139fe0: 7075 745f 6d6f 6465 293c 2f64 6976 3e3c put_mode)
    <\n+00139ff0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0013a000: 223e 436c 6561 7220 696e 7075 7420 616e \">Clear input an\n+0013a010: 6420 6f75 7470 7574 2073 6f61 705f 6d6f d output soap_mo\n+0013a020: 6465 2066 6c61 6773 206f 6620 7468 6520 de flags of the \n+0013a030: 6769 7665 6e20 736f 6170 2063 6f6e 7465 given soap conte\n+0013a040: 7874 2e3c 2f64 6976 3e3c 2f64 6976 3e0a xt.
    .\n+0013a050: 3c64 6976 2063 6c61 7373 3d22 7474 6322 .
    void soap_clr_\n+0013a2b0: 6f6d 6f64 6528 7374 7275 6374 2073 6f61 omode(struct soa\n+0013a2c0: 7020 2a73 6f61 702c 2073 6f61 705f 6d6f p *soap, soap_mo\n+0013a2d0: 6465 206f 7574 7075 745f 6d6f 6465 293c de output_mode)<\n+0013a2e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Clear ou\n+0013a300: 7470 7574 2073 6f61 705f 6d6f 6465 2066 tput soap_mode f\n+0013a310: 6c61 6773 206f 6620 7468 6520 6769 7665 lags of the give\n+0013a320: 6e20 736f 6170 2063 6f6e 7465 7874 2e3c n soap context.<\n+0013a330: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soa\n+0013a3f0: 705f 7365 745f 696d 6f64 653c 2f61 3e3c p_set_imode<\n+0013a400: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void so\n+0013a420: 6170 5f73 6574 5f69 6d6f 6465 2873 7472 ap_set_imode(str\n+0013a430: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+0013a440: 736f 6170 5f6d 6f64 6520 696e 7075 745f soap_mode input_\n+0013a450: 6d6f 6465 293c 2f64 6976 3e3c 6469 7620 mode)
    Se\n+0013a470: 7420 696e 7075 7420 736f 6170 5f6d 6f64 t input soap_mod\n+0013a480: 6520 666c 6167 7320 6f66 2074 6865 2067 e flags of the g\n+0013a490: 6976 656e 2073 6f61 7020 636f 6e74 6578 iven soap contex\n+0013a4a0: 742e 3c2f 6469 763e 3c2f 6469 763e 0a3c t.
    .<\n+0013a4b0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0013a4c0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0013a4d0: 705f 5f63 6f6e 7465 7874 5f68 746d 6c5f p__context_html_\n+0013a4e0: 6761 6636 6661 3665 3139 3766 3336 3038 gaf6fa6e197f3608\n+0013a4f0: 3334 6561 6531 3234 6661 3337 6536 3863 34eae124fa37e68c\n+0013a500: 6637 223e 3c64 6976 2063 6c61 7373 3d22 f7\"><\n+0013a5d0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0013a5e0: 223e 5365 7420 6f75 7470 7574 2073 6f61 \">Set output soa\n+0013a5f0: 705f 6d6f 6465 2066 6c61 6773 206f 6620 p_mode flags of \n+0013a600: 7468 6520 6769 7665 6e20 736f 6170 2063 the given soap c\n+0013a610: 6f6e 7465 7874 2e3c 2f64 6976 3e3c 2f64 ontext.
    .
    Note
    The #\n+0013a670: 534f 4150 5f58 4d4c 5f54 5245 453c 2f63 SOAP_XML_TREE mode flag c\n+0013a690: 616e 2062 6520 7573 6564 2074 6f20 696d an be used to im\n+0013a6a0: 7072 6f76 6520 696e 7465 726f 7065 7261 prove interopera\n+0013a6b0: 6269 6c69 7479 2077 6974 6820 534f 4150 bility with SOAP\n+0013a6c0: 2069 6d70 6c65 6d65 6e74 6174 696f 6e73 implementations\n+0013a6d0: 2074 6861 7420 6172 6520 6e6f 7420 6675 that are not fu\n+0013a6e0: 6c6c 7920 534f 4150 2031 2e31 2f31 2e32 lly SOAP 1.1/1.2\n+0013a6f0: 2052 5043 2065 6e63 6f64 696e 6720 636f RPC encoding co\n+0013a700: 6d70 6c69 616e 7420 7769 7468 2072 6573 mpliant with res\n+0013a710: 7065 6374 2074 6f20 7072 6f63 6573 7369 pect to processi\n+0013a720: 6e67 2069 642d 6872 6566 2f72 6566 2061 ng id-href/ref a\n+0013a730: 7474 7269 6275 7465 732e 2048 6f77 6576 ttributes. Howev\n+0013a740: 6572 2c20 7472 6565 2073 6572 6961 6c69 er, tree seriali\n+0013a750: 7a61 7469 6f6e 2077 696c 6c20 6475 706c zation will dupl\n+0013a760: 6963 6174 6520 6461 7461 2077 6865 6e20 icate data when \n+0013a770: 7468 6973 2064 6174 6120 6973 2063 6f2d this data is co-\n+0013a780: 7265 6665 7265 6e63 6564 2e20 4379 636c referenced. Cycl\n+0013a790: 6573 2061 7265 2064 6574 6563 7465 6420 es are detected \n+0013a7a0: 616e 6420 6272 6f6b 656e 2074 6f20 6176 and broken to av\n+0013a7b0: 6f69 6420 696e 6669 6e69 7465 2073 6572 oid infinite ser\n+0013a7c0: 6961 6c69 7a61 7469 6f6e 2e3c 2f64 643e ialization.
    \n+0013a7d0: 3c2f 646c 3e0a 3c70 3e49 6e20 6164 6469
    .

    In addi\n+0013a7e0: 7469 6f6e 2074 6f20 7468 6520 636f 6e74 tion to the cont\n+0013a7f0: 6578 7420 6d6f 6465 2066 6c61 6773 2c20 ext mode flags, \n+0013a800: 7468 6520 666f 6c6c 6f77 696e 6720 636f the following co\n+0013a810: 6e74 6578 7420 666c 6167 7320 6361 6e20 ntext flags can \n+0013a820: 6265 2075 7365 6420 746f 2073 6574 203c be used to set <\n+0013a830: 636f 6465 3e73 6574 736f 636b 6f70 743c code>setsockopt<\n+0013a840: 2f63 6f64 653e 206c 6576 656c 203c 636f /code> level SOL_SOCKET options whe\n+0013a870: 6e20 736f 636b 6574 7320 6172 6520 6372 n sockets are cr\n+0013a880: 6561 7465 642c 2074 686f 7567 6820 736f eated, though so\n+0013a890: 6d65 206f 7074 696f 6e73 206d 6179 206e me options may n\n+0013a8a0: 6f74 2062 6520 6170 706c 6963 6162 6c65 ot be applicable\n+0013a8b0: 2074 6f20 796f 7572 206f 7065 7261 7469 to your operati\n+0013a8c0: 6e67 2073 7973 7465 6d3a 3c2f 703e 0a3c ng system:

    .<\n+0013a8d0: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n+0013a8e0: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..
    .\n+0013a990: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0013a9b0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .........\n+0013b270: 656e 6162 6c65 7320 726f 7574 696e 6720 enables routing \n+0013b280: 6279 7061 7373 2066 6f72 206f 7574 676f bypass for outgo\n+0013b290: 696e 6720 6d65 7373 6167 6573 2020 2020 ing messages \n+0013b2a0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+0013b2f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0013b3b0: 703a 3a61 6363 6570 745f 666c 6167 733c p::accept_flags<\n+0013b3c0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_NOSIGPIPE<\n+0013b3e0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+0013b410: 6469 7361 626c 6573 2053 4947 5049 5045 disables SIGPIPE\n+0013b420: 2028 6368 6563 6b20 796f 7572 204f 532c (check your OS,\n+0013b430: 2074 6869 7320 6973 206e 6f74 2070 6f72 this is not por\n+0013b440: 7461 626c 6529 2020 2020 3c2f 7464 3e3c table) <\n+0013b450: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...........<\n+0013bd70: 2f74 6162 6c65 3e0a 3c70 3e46 6f72 2065 /table>.

    For e\n+0013bd80: 7861 6d70 6c65 2c20 7768 656e 203c 636f xample, when soap:\n+0013be50: 3a61 6363 6570 745f 666c 6167 733c 2f61 :accept_flags is set \n+0013be70: 746f 203c 636f 6465 3e28 534f 5f4e 4f53 to (SO_NOS\n+0013be80: 4947 5049 5045 207c 2053 4f5f 4c49 4e47 IGPIPE | SO_LING\n+0013be90: 4552 293c 2f63 6f64 653e 2074 6869 7320 ER) this \n+0013bea0: 6469 7361 626c 6573 2053 4947 5049 5045 disables SIGPIPE\n+0013beb0: 2073 6967 6e61 6c73 2061 6e64 2073 6574 signals and set\n+0013bec0: 206c 696e 6765 7220 7469 6d65 2076 616c linger time val\n+0013bed0: 7565 2067 6976 656e 2062 7920 3c63 6f64 ue given by soap::\n+0013bfa0: 6c69 6e67 6572 5f74 696d 653c 2f61 3e3c linger_time<\n+0013bfb0: 2f63 6f64 653e 2c20 7768 6963 6820 6973 /code>, which is\n+0013bfc0: 207a 6572 6f20 6279 2064 6566 6175 6c74 zero by default\n+0013bfd0: 2e3c 2f70 3e0a 3c70 3e54 6865 203c 636f .

    .

    The soap:\n+0013c0a0: 3a73 6f63 6b65 745f 666c 6167 733c 2f61 :socket_flags context\n+0013c0c0: 2066 6c61 6720 6361 6e20 6265 2075 7365 flag can be use\n+0013c0d0: 6420 746f 2070 6173 7320 6f70 7469 6f6e d to pass option\n+0013c0e0: 7320 746f 2074 6865 203c 636f 6465 3e26 s to the &\n+0013c0f0: 6c74 3b73 7973 2f73 6f63 6b65 742e 6826 lt;sys/socket.h&\n+0013c100: 6774 3b3c 2f63 6f64 653e 203c 636f 6465 gt; send, sendto, recv, and \n+0013c150: 7265 6376 6672 6f6d 3c2f 636f 6465 3e20 recvfrom \n+0013c160: 6361 6c6c 7320 6d61 6465 2062 7920 7468 calls made by th\n+0013c170: 6520 656e 6769 6e65 2c20 7468 6f75 6768 e engine, though\n+0013c180: 2073 6f6d 6520 6f70 7469 6f6e 7320 6d61 some options ma\n+0013c190: 7920 6e6f 7420 6265 2061 7070 6c69 6361 y not be applica\n+0013c1a0: 626c 6520 746f 2079 6f75 7220 6f70 6572 ble to your oper\n+0013c1b0: 6174 696e 6720 7379 7374 656d 3a3c 2f70 ating system:.

    mode flag \n+00136840: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 in/out \n+00136870: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 result \n+001368a0: 2020 203c 2f74 683e 3c2f 7472 3e0a 3c74
    out flush output \n+00136970: 696d 6d65 6469 6174 656c 7920 2020 203c immediately <\n+00136980: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_IO_BUF\n+001369e0: 4645 523c 2f63 6f64 653e 2020 203c 2f74 FER out
    #SOAP_I\n+00136ae0: 4f5f 5354 4f52 453c 2f63 6f64 653e 2020 O_STORE \n+00136af0: 203c 2f74 643e 3c74 6420 636c 6173 733d out store the e\n+00136b50: 6e74 6972 6520 6f75 7462 6f75 6e64 206d ntire outbound m\n+00136b60: 6573 7361 6765 2074 6f20 6361 6c63 756c essage to calcul\n+00136b70: 6174 6520 4854 5450 2063 6f6e 7465 6e74 ate HTTP content\n+00136b80: 206c 656e 6774 6820 2020 203c 2f74 643e length
    \n+00136be0: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK enab\n+00136c50: 6c65 2048 5454 5020 6368 756e 6b69 6e67 le HTTP chunking\n+00136c60: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_IO\n+00136cc0: 5f4c 454e 4754 483c 2f63 6f64 653e 2020 _LENGTH \n+00136cd0: 203c 2f74 643e 3c74 6420 636c 6173 733d out used with t\n+00136d30: 776f 2d70 6861 7365 2073 6572 6961 6c69 wo-phase seriali\n+00136d40: 7a61 7469 6f6e 2c20 6669 7273 7420 7068 zation, first ph\n+00136d50: 6173 6520 7769 7468 2074 6869 7320 666c ase with this fl\n+00136d60: 6167 2074 6f20 6361 6c63 756c 6174 6520 ag to calculate \n+00136d70: 4854 5450 2063 6f6e 7465 6e74 206c 656e HTTP content len\n+00136d80: 6774 6820 2020 203c 2f74 643e 3c2f 7472 gth
    #SOA\n+00136de0: 505f 494f 5f4b 4545 5041 4c49 5645 3c2f P_IO_KEEPALIVE
    in+out use UDP (datag\n+00136f60: 7261 6d29 2074 7261 6e73 706f 7274 2c20 ram) transport, \n+00136f70: 6d61 7869 6d75 6d20 6d65 7373 6167 6520 maximum message \n+00136f80: 6c65 6e67 7468 2069 7320 3c63 6f64 653e length is \n+00136f90: 2353 4f41 505f 4255 464c 454e 3c2f 636f #SOAP_BUFLEN
    #SOA\n+00137000: 505f 454e 435f 504c 4149 4e3c 2f63 6f64 P_ENC_PLAIN in+o\n+00137040: 7574 2020 203c 2f74 643e 3c74 6420 636c ut use \n+00137070: 706c 6169 6e20 6d65 7373 6167 6573 2077 plain messages w\n+00137080: 6974 686f 7574 2070 6172 7369 6e67 206f ithout parsing o\n+00137090: 7220 656d 6974 7469 6e67 2048 5454 5020 r emitting HTTP \n+001370a0: 6865 6164 6572 7320 2020 203c 2f74 643e headers
    #\n+00137100: 534f 4150 5f45 4e43 5f58 4d4c 3c2f 636f SOAP_ENC_XML alias for #SOAP_ENC_PL\n+00137180: 4149 4e3c 2f63 6f64 653e 2020 2020 3c2f AIN
    #SOAP_ENC_DIM\n+001371f0: 453c 2f63 6f64 653e 2020 203c 2f74 643e E out
    #SOAP_ENC_MIME\n+001372f0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c us\n+00137350: 6520 4d49 4d45 2065 6e63 6f64 696e 6720 e MIME encoding \n+00137360: 696e 7374 6561 6420 6f66 2044 494d 452c instead of DIME,\n+00137370: 2061 6374 6976 6174 6564 2075 7369 6e67 activated using\n+00137380: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set\n+00137400: 5f6d 696d 653c 2f61 3e3c 2f63 6f64 653e _mime\n+00137410: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_E\n+00137470: 4e43 5f4d 544f 4d3c 2f63 6f64 653e 2020 NC_MTOM \n+00137480: 203c 2f74 643e 3c74 6420 636c 6173 733d out use MTOM XO\n+001374e0: 5020 6174 7461 6368 6d65 6e74 7320 696e P attachments in\n+001374f0: 7374 6561 6420 6f66 2044 494d 4520 616e stead of DIME an\n+00137500: 6420 4d49 4d45 2020 2020 3c2f 7464 3e3c d MIME
    #S\n+00137560: 4f41 505f 454e 435f 5a4c 4942 3c2f 636f OAP_ENC_ZLIB out\n+001375a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 compre\n+001375d0: 7373 206f 7574 7075 7420 7769 7468 205a ss output with Z\n+001375e0: 6c69 622c 2075 7369 6e67 2064 6566 6c61 lib, using defla\n+001375f0: 7465 206f 7220 677a 6970 2066 6f72 6d61 te or gzip forma\n+00137600: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    #SOAP_\n+00137660: 454e 435f 5353 4c3c 2f63 6f64 653e 2020 ENC_SSL \n+00137670: 203c 2f74 643e 3c74 6420 636c 6173 733d in+out \n+001376a0: 203c 2f74 643e 3c74 6420 636c 6173 733d use SSL/\n+001376d0: 544c 532c 2061 7574 6f6d 6174 6963 2077 TLS, automatic w\n+001376e0: 6865 6e20 636f 6e6e 6563 7469 6e67 2022 hen connecting \"\n+001376f0: 6874 7470 733a 2220 656e 6470 6f69 6e74 https:\" endpoint\n+00137700: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #SOAP_X\n+00137760: 4d4c 5f49 4e44 454e 543c 2f63 6f64 653e ML_INDENT\n+00137770: 2020 203c 2f74 643e 3c74 6420 636c 6173 out \n+001377a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 output in\n+001377d0: 6465 6e74 6564 2058 4d4c 2061 6e64 204a dented XML and J\n+001377e0: 534f 4e20 2020 203c 2f74 643e 3c2f 7472 SON
    #SOA\n+00137840: 505f 584d 4c5f 4341 4e4f 4e49 4341 4c3c P_XML_CANONICAL<\n+00137850: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> out\n+001378b0: 7075 7420 6361 6e6f 6e69 6361 6c20 584d put canonical XM\n+001378c0: 4c20 2020 203c 2f74 643e 3c2f 7472 3e0a L
    #SOAP_X\n+00137920: 4d4c 5f44 4546 4155 4c54 4e53 3c2f 636f ML_DEFAULTNS out\n+00137960: 2020 203c 2f74 643e 3c74 6420 636c 6173 output\n+00137990: 2058 4d4c 2077 6974 6820 6465 6661 756c XML with defaul\n+001379a0: 7420 6e61 6d65 7370 6163 6520 6269 6e64 t namespace bind\n+001379b0: 696e 6773 203c 636f 6465 3e78 6d6c 6e73 ings xmlns\n+001379c0: 3d22 2e2e 2e22 3c2f 636f 6465 3e20 2020 =\"...\" \n+001379d0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    in ignores XML\n+00137aa0: 206e 616d 6573 7061 6365 7320 696e 2058 namespaces in X\n+00137ab0: 4d4c 2069 6e70 7574 2020 2020 3c2f 7464 ML input
    \n+00137b10: 2353 4f41 505f 584d 4c5f 5354 5249 4354 #SOAP_XML_STRICT\n+00137b20: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c app\n+00137b80: 6c79 2073 7472 6963 7420 7661 6c69 6461 ly strict valida\n+00137b90: 7469 6f6e 206f 6620 584d 4c20 696e 7075 tion of XML inpu\n+00137ba0: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    #SOAP_\n+00137c00: 584d 4c5f 5452 4545 3c2f 636f 6465 3e20 XML_TREE \n+00137c10: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 in+out \n+00137c40: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 out: se\n+00137c70: 7269 616c 697a 6520 6461 7461 2061 7320 rialize data as \n+00137c80: 584d 4c20 7472 6565 7320 286e 6f20 6d75 XML trees (no mu\n+00137c90: 6c74 692d 7265 662c 2064 7570 6c69 6361 lti-ref, duplica\n+00137ca0: 7465 2064 6174 6120 7768 656e 206e 6563 te data when nec\n+00137cb0: 6573 7361 7279 293b 2069 6e3a 2069 676e essary); in: ign\n+00137cc0: 6f72 6520 6964 2061 7474 7269 6275 7465 ore id attribute\n+00137cd0: 7320 2864 6f20 6e6f 7420 7265 736f 6c76 s (do not resolv\n+00137ce0: 6520 6964 2d72 6566 2920 2020 203c 2f74 e id-ref)
    #SOAP_XML_GRAPH\n+00137d50: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c se\n+00137db0: 7269 616c 697a 6520 6170 706c 6963 6174 rialize applicat\n+00137dc0: 696f 6e20 6461 7461 2061 7320 616e 2058 ion data as an X\n+00137dd0: 4d4c 2067 7261 7068 2077 6974 6820 6d75 ML graph with mu\n+00137de0: 6c74 692d 7265 6620 6964 2f72 6566 2061 lti-ref id/ref a\n+00137df0: 7474 7269 6275 7465 7320 2020 203c 2f74 ttributes
    #SOAP_XML_NIL<\n+00137e60: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> ser\n+00137ec0: 6961 6c69 7a65 204e 554c 4c20 6461 7461 ialize NULL data\n+00137ed0: 2061 7320 7873 693a 6e69 6c20 6174 7472 as xsi:nil attr\n+00137ee0: 6962 7574 6564 2065 6c65 6d65 6e74 7320 ibuted elements \n+00137ef0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    out disable xsi:type<\n+00137fd0: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n+00137fe0: 6962 7574 6573 2020 2020 3c2f 7464 3e3c ibutes
    #\n+00138040: 534f 4150 5f43 5f4e 4f49 4f42 3c2f 636f SOAP_C_NOIOB in \n+00138080: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 do not \n+001380b0: 6661 756c 7420 7769 7468 203c 636f 6465 fault with #SOAP_IOB
    #SOAP_C\n+00138130: 5f55 5446 5354 5249 4e47 3c2f 636f 6465 _UTFSTRING in+ou\n+00138170: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t seria\n+001381a0: 6c69 7a65 2038 2d62 6974 2063 6861 7261 lize 8-bit chara\n+001381b0: 6374 6572 2073 7472 696e 6773 2022 6173 cter strings \"as\n+001381c0: 2069 7322 2c20 6d65 616e 696e 6720 382d is\", meaning 8-\n+001381d0: 6269 7420 7374 7269 6e67 7320 6861 7665 bit strings have\n+001381e0: 2055 5446 2d38 2063 6f6e 7465 6e74 2020 UTF-8 content \n+001381f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    in+out \n+00138290: 203c 2f74 643e 3c74 6420 636c 6173 733d enable m\n+001382c0: 756c 7469 6279 7465 2063 6861 7261 6374 ultibyte charact\n+001382d0: 6572 2073 7570 706f 7274 2066 6f72 2038 er support for 8\n+001382e0: 2d62 6974 2063 6861 7261 6374 6572 2073 -bit character s\n+001382f0: 7472 696e 6773 2077 6974 6820 3c63 6f64 trings with wctomb \n+00138310: 616e 6420 3c63 6f64 653e 6d62 746f 7763 and mbtowc\n+00138320: 3c2f 636f 6465 3e20 7573 696e 6720 7468 using th\n+00138330: 6520 6375 7272 656e 7420 6c6f 6361 6c65 e current locale\n+00138340: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_C_\n+001383a0: 4e49 4c53 5452 494e 473c 2f63 6f64 653e NILSTRING\n+001383b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 out \n+001383e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 serialize\n+00138410: 2065 6d70 7479 2073 7472 696e 6773 2061 empty strings a\n+00138420: 7320 7873 693a 6e69 6c20 6174 7472 6962 s xsi:nil attrib\n+00138430: 7574 6564 2065 6c65 6d65 6e74 7320 2020 uted elements \n+00138440: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162
    co\n+0013a930: 6e74 6578 7420 666c 6167 2077 6974 6820 ntext flag with \n+0013a940: 7365 7473 6f63 6b6f 7074 206f 7074 696f setsockopt optio\n+0013a950: 6e20 2020 3c2f 7468 3e3c 7468 2063 6c61 n resul\n+0013a980: 7420 2020 203c 2f74 683e 3c2f 7472 3e0a t
    soap::connect_f\n+0013aaa0: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+0013aab0: 3d20 3c63 6f64 653e 534f 5f4e 4f53 4947 = SO_NOSIG\n+0013aac0: 5049 5045 3c2f 636f 6465 3e20 2020 3c2f PIPE disables SI\n+0013ab00: 4750 4950 4520 2020 203c 2f74 643e 3c2f GPIPE
    soap::conn\n+0013ac20: 6563 745f 666c 6167 733c 2f61 3e3c 2f63 ect_flags = SO_\n+0013ac40: 4445 4255 473c 2f63 6f64 653e 2020 203c DEBUG <\n+0013ac50: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>turns on r\n+0013ac80: 6563 6f72 6469 6e67 206f 6620 6465 6275 ecording of debu\n+0013ac90: 6767 696e 6720 696e 666f 726d 6174 696f gging informatio\n+0013aca0: 6e20 696e 2074 6865 2075 6e64 6572 6c79 n in the underly\n+0013acb0: 696e 6720 7072 6f74 6f63 6f6c 206d 6f64 ing protocol mod\n+0013acc0: 756c 6573 2020 2020 3c2f 7464 3e3c 2f74 ules
    soap::connec\n+0013ade0: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_BR\n+0013ae00: 4f41 4443 4153 543c 2f63 6f64 653e 2020 OADCAST \n+0013ae10: 203c 2f74 643e 3c74 6420 636c 6173 733d permits \n+0013ae40: 7365 6e64 696e 6720 6f66 2062 726f 6164 sending of broad\n+0013ae50: 6361 7374 206d 6573 7361 6765 732c 2066 cast messages, f\n+0013ae60: 6f72 2065 7861 6d70 6c65 2077 6974 6820 or example with \n+0013ae70: 5544 502c 2077 6865 6e20 7065 726d 6974 UDP, when permit\n+0013ae80: 7465 6420 2020 203c 2f74 643e 3c2f 7472 ted
    soap::connec\n+0013afa0: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_LI\n+0013afc0: 4e47 4552 3c2f 636f 6465 3e20 2020 3c2f NGER sets client\n+0013b000: 2d73 6964 6520 6c69 6e67 6572 2074 696d -side linger tim\n+0013b010: 6520 746f 2074 6865 2076 616c 7565 206f e to the value o\n+0013b020: 6620 3c63 6f64 653e 3c61 2063 6c61 7373 f \n+0013b0e0: 736f 6170 3a3a 6c69 6e67 6572 5f74 696d soap::linger_tim\n+0013b0f0: 653c 2f61 3e3c 2f63 6f64 653e 2020 2020 e \n+0013b100: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    soap\n+0013b210: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags<\n+0013b220: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_DONTROUTE<\n+0013b240: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    soap::acce\n+0013b560: 7074 5f66 6c61 6773 3c2f 613e 3c2f 636f pt_flags = SO_D\n+0013b580: 4542 5547 3c2f 636f 6465 3e20 2020 3c2f EBUG turns on re\n+0013b5c0: 636f 7264 696e 6720 6f66 2064 6562 7567 cording of debug\n+0013b5d0: 6769 6e67 2069 6e66 6f72 6d61 7469 6f6e ging information\n+0013b5e0: 2069 6e20 7468 6520 756e 6465 726c 7969 in the underlyi\n+0013b5f0: 6e67 2070 726f 746f 636f 6c20 6d6f 6475 ng protocol modu\n+0013b600: 6c65 7320 2020 203c 2f74 643e 3c2f 7472 les
    soap::accept\n+0013b720: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = SO_LIN\n+0013b740: 4745 523c 2f63 6f64 653e 2020 203c 2f74 GER sets server-\n+0013b780: 7369 6465 206c 696e 6765 7220 7469 6d65 side linger time\n+0013b790: 2074 6f20 7468 6520 7661 6c75 6520 6f66 to the value of\n+0013b7a0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+0013b860: 6f61 703a 3a6c 696e 6765 725f 7469 6d65 oap::linger_time\n+0013b870: 3c2f 613e 3c2f 636f 6465 3e20 2020 203c <\n+0013b880: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    soap:\n+0013b990: 3a61 6363 6570 745f 666c 6167 733c 2f61 :accept_flags = SO_DONTROUTE en\n+0013b9f0: 6162 6c65 7320 726f 7574 696e 6720 6279 ables routing by\n+0013ba00: 7061 7373 2066 6f72 206f 7574 676f 696e pass for outgoin\n+0013ba10: 6720 6d65 7373 6167 6573 2020 2020 3c2f g messages
    soap:\n+0013bb30: 3a62 696e 645f 666c 6167 733c 2f61 3e3c :bind_flags<\n+0013bb40: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n+0013bb50: 4f5f 5245 5553 4541 4444 523c 2f63 6f64 O_REUSEADDR enab\n+0013bb90: 6c65 7320 6c6f 6361 6c20 6164 6472 6573 les local addres\n+0013bba0: 7320 7265 7573 6520 696d 6d65 6469 6174 s reuse immediat\n+0013bbb0: 656c 792c 2075 7365 2077 6974 6820 6361 ely, use with ca\n+0013bbc0: 7574 696f 6e20 2020 203c 2f74 643e 3c2f ution
    soap::bind_\n+0013bce0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+0013bcf0: 203d 203c 636f 6465 3e53 4f5f 5245 5553 = SO_REUS\n+0013bd00: 4550 4f52 543c 2f63 6f64 653e 2020 203c EPORT <\n+0013bd10: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables du\n+0013bd40: 706c 6963 6174 6520 6164 6472 6573 7320 plicate address \n+0013bd50: 616e 6420 706f 7274 2062 696e 6469 6e67 and port binding\n+0013bd60: 7320 2020 3c2f 7464 3e3c 2f74 723e 0a3c s
    .\n+0013c1e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .<\n+0013c200: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n+0013c210: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n+0013c220: 3e63 6f6e 7465 7874 2066 6c61 6720 7769 >context flag wi\n+0013c230: 7468 2073 656e 742f 7265 6376 2066 6c61 th sent/recv fla\n+0013c240: 6773 2020 203c 2f74 683e 3c74 6820 636c gs \n+0013c280: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .....
    resu\n+0013c270: 6c74 2020 2020 3c2f 7468 3e3c 2f74 723e lt
    soap::socket_f\n+0013c390: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+0013c3a0: 3d20 3c63 6f64 653e 4d53 475f 4e4f 5349 = MSG_NOSI\n+0013c3b0: 474e 414c 3c2f 636f 6465 3e20 2020 3c2f GNAL disables SI\n+0013c3f0: 4750 4950 4520 2020 203c 2f74 643e 3c2f GPIPE
    soap::sock\n+0013c510: 6574 5f66 6c61 6773 3c2f 613e 3c2f 636f et_flags = MSG_\n+0013c530: 444f 4e54 524f 5554 453c 2f63 6f64 653e DONTROUTE\n+0013c540: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+0013c570: 7320 726f 7574 696e 6720 6279 7061 7373 s routing bypass\n+0013c580: 2066 6f72 206f 7574 676f 696e 6720 6d65 for outgoing me\n+0013c590: 7373 6167 6573 2020 203c 2f74 643e 3c2f ssages
    .

    \n+0013c5b0: 4675 7274 6865 726d 6f72 652c 2074 6865 Furthermore, the\n+0013c5c0: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n+0013c5d0: 743c 2f63 6f64 653e 206c 6576 656c 203c t level <\n+0013c5e0: 636f 6465 3e53 4f4c 5f53 4f43 4b45 543c code>SOL_SOCKET<\n+0013c5f0: 2f63 6f64 653e 206f 7074 696f 6e73 203c /code> options <\n+0013c600: 636f 6465 3e53 4f5f 534e 4442 5546 3c2f code>SO_SNDBUF and \n+0013c620: 534f 5f52 4356 4255 463c 2f63 6f64 653e SO_RCVBUF\n+0013c630: 2061 7265 2073 6574 2074 6865 2065 6e67 are set the eng\n+0013c640: 696e 6520 7768 656e 203c 636f 6465 3e3c ine when <\n+0013c650: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013c660: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013c670: 6d6c 2361 3032 6137 6666 6664 3035 6666 ml#a02a7fffd05ff\n+0013c680: 3665 3663 3735 3166 3230 3333 6566 3833 6e6c751f2033ef83\n+0013c690: 3835 3466 2220 7469 746c 653d 2255 7365 854f\" title=\"Use\n+0013c6a0: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n+0013c6b0: 6520 746f 2073 6574 2053 4f5f 534e 4442 e to set SO_SNDB\n+0013c6c0: 5546 2073 6574 736f 636b 6f70 7420 2874 UF setsockopt (t\n+0013c6d0: 6865 2076 616c 7565 2069 7320 2353 4f41 he value is #SOA\n+0013c6e0: 505f 4255 464c 454e 2062 7920 6465 6661 P_BUFLEN by defa\n+0013c6f0: 756c 7429 223e 736f 6170 3a3a 736e 6462 ult)\">soap::sndb\n+0013c700: 7566 3c2f 613e 3c2f 636f 6465 3e20 616e uf an\n+0013c710: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d s\n+0013c7c0: 6f61 703a 3a72 6376 6275 663c 2f61 3e3c oap::rcvbuf<\n+0013c7d0: 2f63 6f64 653e 2061 7265 2073 6574 2074 /code> are set t\n+0013c7e0: 6f20 6120 6e6f 6e7a 6572 6f20 7661 6c75 o a nonzero valu\n+0013c7f0: 652e 2054 6865 2064 6566 6175 6c74 2076 e. The default v\n+0013c800: 616c 7565 2069 7320 3c63 6f64 653e 2353 alue is #S\n+0013c810: 4f41 505f 4255 464c 454e 3c2f 636f 6465 OAP_BUFLEN, which is the \n+0013c830: 7361 6d65 2073 697a 6520 7573 6564 2062 same size used b\n+0013c840: 7920 7468 6520 696e 7465 726e 616c 2062 y the internal b\n+0013c850: 7566 6665 7220 3c63 6f64 653e 3c61 2063 uffer soap::buf to send\n+0013c930: 2061 6e64 2072 6563 6569 7665 206d 6573 and receive mes\n+0013c940: 7361 6765 732e 2041 207a 6572 6f20 7661 sages. A zero va\n+0013c950: 6c75 6520 6f6d 6974 7320 7468 6520 696e lue omits the in\n+0013c960: 7465 726e 616c 203c 636f 6465 3e73 6574 ternal set\n+0013c970: 736f 636b 6f70 743c 2f63 6f64 653e 2063 sockopt c\n+0013c980: 616c 6c20 746f 2073 6574 2074 6865 7365 all to set these\n+0013c990: 206f 7074 696f 6e73 2e20 5365 7474 696e options. Settin\n+0013c9a0: 6720 7468 6573 6520 7661 6c75 6573 2074 g these values t\n+0013c9b0: 6f20 7a65 726f 2061 6374 6976 6174 6573 o zero activates\n+0013c9c0: 2061 7574 6f2d 7475 6e69 6e67 2077 6974 auto-tuning wit\n+0013c9d0: 6820 4c69 6e75 7820 322e 3420 616e 6420 h Linux 2.4 and \n+0013c9e0: 6772 6561 7465 722e 3c2f 703e 0a3c 703e greater.

    .

    \n+0013c9f0: 5468 6520 3c63 6f64 653e 7365 7473 6f63 The setsoc\n+0013ca00: 6b6f 7074 3c2f 636f 6465 3e20 6c65 7665 kopt leve\n+0013ca10: 6c20 3c63 6f64 653e 534f 4c5f 534f 434b l SOL_SOCK\n+0013ca20: 4554 3c2f 636f 6465 3e20 6f70 7469 6f6e ET option\n+0013ca30: 203c 636f 6465 3e53 4f5f 4b45 4550 414c SO_KEEPAL\n+0013ca40: 4956 453c 2f63 6f64 653e 2069 7320 7365 IVE is se\n+0013ca50: 7420 7768 656e 206b 6565 702d 616c 6976 t when keep-aliv\n+0013ca60: 6520 6973 2065 6e61 626c 6564 2077 6974 e is enabled wit\n+0013ca70: 6820 636f 6e74 6578 7420 666c 6167 203c h context flag <\n+0013ca80: 636f 6465 3e23 534f 4150 5f49 4f5f 4b45 code>#SOAP_IO_KE\n+0013ca90: 4550 414c 4956 453c 2f63 6f64 653e 206f EPALIVE o\n+0013caa0: 7220 7768 656e 203c 636f 6465 3e3c 6120 r when soap::tcp_k\n+0013cb70: 6565 705f 616c 6976 653c 2f61 3e3c 2f63 eep_alive is nonzero.\n+0013cb90: 2057 6974 6820 3c63 6f64 653e 3c61 2063 With soap::tcp_ke\n+0013cc60: 6570 5f61 6c69 7665 3c2f 613e 3c2f 636f ep_alive additional o\n+0013cc80: 7074 696f 6e73 2063 616e 2062 6520 7370 ptions can be sp\n+0013cc90: 6563 6966 6965 6420 7769 7468 203c 636f ecified with soap::tcp_keep\n+0013cd50: 5f69 646c 653c 2f61 3e3c 2f63 6f64 653e _idle\n+0013cd60: 2c20 3c63 6f64 653e 3c61 2063 6c61 7373 , soap::tc\n+0013ce10: 705f 6b65 6570 5f69 6e74 766c 3c2f 613e p_keep_intvl\n+0013ce20: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and soap::tcp_keep_\n+0013cee0: 636e 743c 2f61 3e3c 2f63 6f64 653e 2e20 cnt. \n+0013cef0: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

    \n+0013cf00: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+0013cf40: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+0013cfb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .
    soap->\n+0013d060: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;tcp_ke\n+0013d0b0: 6570 5f61 6c69 7665 3c2f 613e 203d 2031 ep_alive = 1\n+0013d0c0: 3b20 2020 3c73 7061 6e20 636c 6173 733d ; // set\n+0013d0e0: 736f 636b 6f70 7420 534f 5f4b 4545 5041 sockopt SO_KEEPA\n+0013d0f0: 4c49 5645 3c2f 7370 616e 3e3c 2f64 6976 LIVE..\n+0013d230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->t\n+0013d2c0: 6370 5f6b 6565 705f 696e 7476 6c3c 2f61 cp_keep_intvl = 120; /\n+0013d2f0: 2f20 7469 6d65 2069 6e20 7365 636f 6e64 / time in second\n+0013d300: 7320 6265 7477 6565 6e20 696e 6469 7669 s between indivi\n+0013d310: 6475 616c 206b 6565 7061 6c69 7665 2070 dual keepalive p\n+0013d320: 726f 6265 733c 2f73 7061 6e3e 3c2f 6469 robes.
    soap\n+0013d370: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->tcp_keep_cnt = 5; // maximum num\n+0013d400: 6265 7220 6f66 206b 6565 7061 6c69 7665 ber of keepalive\n+0013d410: 2070 726f 6265 7320 5443 5020 7368 6f75 probes TCP shou\n+0013d420: 6c64 2073 656e 6420 6265 666f 7265 2064 ld send before d\n+0013d430: 726f 7070 696e 6720 7468 6520 636f 6e6e ropping the conn\n+0013d440: 6563 7469 6f6e 3c2f 7370 616e 3e3c 2f64 ection.U\n+0013d550: 7365 722d 6465 6669 6e61 626c 6520 7661 ser-definable va\n+0013d560: 6c75 6520 746f 2073 6574 2054 4350 5f4b lue to set TCP_K\n+0013d570: 4545 5043 4e54 2073 6574 736f 636b 6f70 EEPCNT setsockop\n+0013d580: 7420 2874 6865 2076 616c 7565 2069 7320 t (the value is \n+0013d590: 3020 6279 2064 6566 6175 6c74 293c 2f64 0 by default)
    Definit\n+0013d5c0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+0013d5d0: 322e 683a 3335 3834 3c2f 6469 763e 3c2f 2.h:3584
    .
    \n+0013d6b0: 756e 7369 676e 6564 2069 6e74 2074 6370 unsigned int tcp\n+0013d6c0: 5f6b 6565 705f 696e 7476 6c3c 2f64 6976 _keep_intvl
    User-definab\n+0013d6f0: 6c65 2076 616c 7565 2074 6f20 7365 7420 le value to set \n+0013d700: 5443 505f 4b45 4550 494e 5456 4c20 7365 TCP_KEEPINTVL se\n+0013d710: 7473 6f63 6b6f 7074 2028 7468 6520 7661 tsockopt (the va\n+0013d720: 6c75 6520 6973 2030 2062 7920 6465 6661 lue is 0 by defa\n+0013d730: 756c 7429 3c2f 6469 763e 3c64 6976 2063 ult)
    \n+0013d750: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0013d760: 7374 6473 6f61 7032 2e68 3a33 3535 393c stdsoap2.h:3559<\n+0013d770: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soap::tcp_k\n+0013d820: 6565 705f 6964 6c65 3c2f 613e 3c2f 6469 eep_idle
    unsigned i\n+0013d850: 6e74 2074 6370 5f6b 6565 705f 6964 6c65 nt tcp_keep_idle\n+0013d860: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    User-de\n+0013d880: 6669 6e61 626c 6520 7661 6c75 6520 746f finable value to\n+0013d890: 2073 6574 2054 4350 5f4b 4545 5049 444c set TCP_KEEPIDL\n+0013d8a0: 4520 7365 7473 6f63 6b6f 7074 2028 7468 E setsockopt (th\n+0013d8b0: 6520 7661 6c75 6520 6973 2030 2062 7920 e value is 0 by \n+0013d8c0: 6465 6661 756c 7429 3c2f 6469 763e 3c64 default)
    Definition:<\n+0013d8f0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n+0013d900: 3533 343c 2f64 6976 3e3c 2f64 6976 3e0a 534
    .\n+0013d910: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    int t\n+0013d9e0: 6370 5f6b 6565 705f 616c 6976 653c 2f64 cp_keep_alive
    User-defin\n+0013da10: 6162 6c65 2076 616c 7565 2074 6f20 7365 able value to se\n+0013da20: 7420 534f 5f4b 4545 5041 4c49 5645 2073 t SO_KEEPALIVE s\n+0013da30: 6574 736f 636b 6f70 7420 2830 2062 7920 etsockopt (0 by \n+0013da40: 6465 6661 756c 7420 756e 6c65 7373 2074 default unless t\n+0013da50: 6865 2023 534f 4150 5f49 4f5f 4b45 4550 he #SOAP_IO_KEEP\n+0013da60: 414c 4956 4520 6d6f 6465 202e 2e2e 3c2f ALIVE mode ...
    Defini\n+0013da90: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+0013daa0: 7032 2e68 3a33 3530 393c 2f64 6976 3e3c p2.h:3509
    <\n+0013dab0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+0013dad0: 466f 7220 5544 5020 6d65 7373 6167 696e For UDP messagin\n+0013dae0: 672c 2075 7365 203c 636f 6465 3e23 534f g, use #SO\n+0013daf0: 4150 5f49 4f5f 5544 503c 2f63 6f64 653e AP_IO_UDP\n+0013db00: 2e20 5365 6520 616c 736f 2053 6563 7469 . See also Secti\n+0013db10: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on SOAP/XML \n+0013db40: 6f76 6572 2055 4450 3c2f 613e 2e20 5468 over UDP. Th\n+0013db50: 6520 636f 6e74 6578 7420 666c 6167 7320 e context flags \n+0013db60: 7468 6174 2063 616e 2062 6520 7365 7420 that can be set \n+0013db70: 6174 2074 6865 2063 6c69 656e 7420 7369 at the client si\n+0013db80: 6465 2066 6f72 2055 4450 206d 6573 7361 de for UDP messa\n+0013db90: 6769 6e67 2061 7265 203c 636f 6465 3e3c ging are <\n+0013dba0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013dbb0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013dbc0: 6d6c 2361 6363 6234 3361 3537 3136 3030 ml#accb43a571600\n+0013dbd0: 3562 3437 3366 6131 6435 3638 3839 3637 5b473fa1d5688967\n+0013dbe0: 6133 6233 2220 7469 746c 653d 2255 7365 a3b3\" title=\"Use\n+0013dbf0: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n+0013dc00: 6520 746f 2073 6574 2073 6574 736f 636b e to set setsock\n+0013dc10: 6f70 7420 6c65 7665 6c20 4950 5052 4f54 opt level IPPROT\n+0013dc20: 4f5f 4950 2074 6f20 4950 5f4d 554c 5449 O_IP to IP_MULTI\n+0013dc30: 4341 5354 5f49 4620 7768 656e 206e 6f6e CAST_IF when non\n+0013dc40: 2d4e 554c 4c2e 223e 736f 6170 3a3a 6970 -NULL.\">soap::ip\n+0013dc50: 7634 5f6d 756c 7469 6361 7374 5f69 663c v4_multicast_if<\n+0013dc60: 2f61 3e3c 2f63 6f64 653e 2c20 3c63 6f64 /a>, soap:\n+0013dd20: 3a69 7076 345f 6d75 6c74 6963 6173 745f :ipv4_multicast_\n+0013dd30: 7474 6c3c 2f61 3e3c 2f63 6f64 653e 2c20 ttl, \n+0013dd40: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and s\n+0013dde0: 6f61 703a 3a69 7076 365f 6d75 6c74 6963 oap::ipv6_multic\n+0013ddf0: 6173 745f 6966 3c2f 613e 3c2f 636f 6465 ast_if:

    ...\n+0013deb0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..s\n+0013dff0: 6574 203c 636f 6465 3e73 6574 736f 636b et setsock\n+0013e000: 6f70 743c 2f63 6f64 653e 206c 6576 656c opt level\n+0013e010: 203c 636f 6465 3e49 5050 524f 544f 5f49 IPPROTO_I\n+0013e020: 503c 2f63 6f64 653e 2074 6f20 3c63 6f64 P to IP_MULTICAST_I\n+0013e040: 463c 2f63 6f64 653e 2077 6974 6820 7661 F with va\n+0013e050: 6c75 6520 3c63 6f64 653e 3c61 2063 6c61 lue soap::ipv4_mu\n+0013e110: 6c74 6963 6173 745f 6966 3c2f 613e 3c2f lticast_if when non-N\n+0013e130: 554c 4c20 2020 203c 2f74 643e 3c2f 7472 ULL ..\n+0013e260: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+0013e3d0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0013e500: 7365 7420 3c63 6f64 653e 736f 636b 6164 set sockad\n+0013e510: 6472 5f69 6e36 3a3a 7369 6e36 5f73 636f dr_in6::sin6_sco\n+0013e520: 7065 5f69 643c 2f63 6f64 653e 2074 6f20 pe_id to \n+0013e530: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap:\n+0013e5d0: 3a69 7076 365f 6d75 6c74 6963 6173 745f :ipv6_multicast_\n+0013e5e0: 6966 3c2f 613e 3c2f 636f 6465 3e20 7768 if wh\n+0013e5f0: 656e 206e 6f6e 7a65 726f 2020 203c 2f74 en nonzero .
    context fl\n+0013de70: 6167 2020 203c 2f74 683e 3c74 6820 636c ag resu\n+0013dea0: 6c74 2020 2020 3c2f 7468 3e3c 2f74 723e lt
    soap::ipv4_mu\n+0013dfb0: 6c74 6963 6173 745f 6966 3c2f 613e 3c2f lticast_if
    soap::ipv4_\n+0013e240: 6d75 6c74 6963 6173 745f 7474 6c3c 2f61 multicast_ttl set sets\n+0013e290: 6f63 6b6f 7074 3c2f 636f 6465 3e20 6c65 ockopt le\n+0013e2a0: 7665 6c20 3c63 6f64 653e 4950 5052 4f54 vel IPPROT\n+0013e2b0: 4f5f 4950 3c2f 636f 6465 3e20 746f 203c O_IP to <\n+0013e2c0: 636f 6465 3e49 505f 4d55 4c54 4943 4153 code>IP_MULTICAS\n+0013e2d0: 545f 5454 4c3c 2f63 6f64 653e 2077 6974 T_TTL wit\n+0013e2e0: 6820 7661 6c75 6520 3c63 6f64 653e 3c61 h value soap::ipv\n+0013e3a0: 345f 6d75 6c74 6963 6173 745f 7474 6c3c 4_multicast_ttl<\n+0013e3b0: 2f61 3e3c 2f63 6f64 653e 2077 6865 6e20 /a> when \n+0013e3c0: 6e6f 6e7a 6572 6f20 2020 203c 2f74 643e nonzero
    <\n+0013e420: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013e430: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013e440: 6d6c 2361 3364 6230 3534 3265 3865 6237 ml#a3db0542e8eb7\n+0013e450: 6462 3661 3266 3263 6263 3136 6662 3234 db6a2f2cbc16fb24\n+0013e460: 3038 3262 2220 7469 746c 653d 2255 7365 082b\" title=\"Use\n+0013e470: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n+0013e480: 6520 746f 2073 6574 2073 6f63 6b61 6464 e to set sockadd\n+0013e490: 725f 696e 363a 3a73 696e 365f 7363 6f70 r_in6::sin6_scop\n+0013e4a0: 655f 6964 2077 6865 6e20 6e6f 6e7a 6572 e_id when nonzer\n+0013e4b0: 6f2e 223e 736f 6170 3a3a 6970 7636 5f6d o.\">soap::ipv6_m\n+0013e4c0: 756c 7469 6361 7374 5f69 663c 2f61 3e3c ulticast_if<\n+0013e4d0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    \n+0013e610: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

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

    .

    .\n+0013e670: 5275 6e2d 7469 6d65 2065 7272 6f72 2063 Run-time error c\n+0013e680: 6f64 6573 3c2f 6831 3e0a 3c70 3e53 7461 odes

    .

    Sta\n+0013e690: 7475 7320 6572 726f 7220 636f 6465 7320 tus error codes \n+0013e6a0: 6172 6520 696e 7465 6765 7220 7661 6c75 are integer valu\n+0013e6b0: 6573 2c20 7768 6963 6820 6172 6520 7265 es, which are re\n+0013e6c0: 7475 726e 6564 2062 7920 7468 6520 6753 turned by the gS\n+0013e6d0: 4f41 5020 4150 4920 6675 6e63 7469 6f6e OAP API function\n+0013e6e0: 732e 2054 6865 2066 756c 6c20 6c69 7374 s. The full list\n+0013e6f0: 206f 6620 3c63 6f64 653e 3c61 2063 6c61 of soap_\n+0013e7b0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status error codes is\n+0013e7d0: 206c 6973 7465 6420 6265 6c6f 773a 3c2f listed below:.\n+0013e800: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+0013e820: 3c74 6820 636c 6173 733d 226d 6172 6b64 .\n+0013e890: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0013e8b0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+0013e8f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .\n+0013e930: 3c74 7220 636c 6173 733d 226d 6172 6b64 ....<\n+0013eae0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013eaf0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+0013eb00: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ....<\n+0013edf0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013ee00: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+0013ee10: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n+0013ef20: 3c63 6f64 653e 2353 4f41 505f 4449 4d45 #SOAP_DIME\n+0013ef30: 5f48 5245 463c 2f63 6f64 653e 2020 203c _HREF <\n+0013ef40: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>....\n+0013f1a0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n+0013f270: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n+0013f4d0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n+0013f830: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+0013f870: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0013f960: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0013f9f0: 416e 2048 5454 5020 4745 5420 7265 7175 An HTTP GET requ\n+0013fa00: 6573 7420 7761 7320 7265 6365 6976 6564 est was received\n+0013fa10: 2062 7920 7468 6520 7365 7276 6963 6520 by the service \n+0013fa20: 6275 7420 7468 6520 4745 5420 7265 7175 but the GET requ\n+0013fa30: 6573 7420 6361 6c6c 6261 636b 203c 636f est callback soap::fget<\n+0013fb10: 2f61 3e3c 2f63 6f64 653e 2069 7320 6e6f /a> is no\n+0013fb20: 7420 696d 706c 656d 656e 7465 642c 2073 t implemented, s\n+0013fb30: 6565 2053 6563 7469 6f6e 7320 3c61 2063 ee Sections \n+0013fb60: 486f 7720 746f 2069 6d70 6c65 6d65 6e74 How to implement\n+0013fb70: 2048 5454 5020 4745 542c 2050 5554 2c20 HTTP GET, PUT, \n+0013fb80: 616e 6420 5041 5443 4820 7365 7276 6963 and PATCH servic\n+0013fb90: 6573 3c2f 613e 2061 6e64 203c 6120 636c es and Function cal\n+0013fbd0: 6c62 6163 6b73 2066 6f72 2063 7573 746f lbacks for custo\n+0013fbe0: 6d69 7a65 6420 492f 4f20 616e 6420 4854 mized I/O and HT\n+0013fbf0: 5450 2068 616e 646c 696e 673c 2f61 3e20 TP handling \n+0013fc00: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0013fc30: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+0013fe30: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0013fea0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......\n+00140180: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...<\n+00140240: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00140250: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00140260: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n+001402f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..M\n+00140380: 494d 4520 6174 7461 6368 6d65 6e74 2068 IME attachment h\n+00140390: 6173 206e 6f20 6872 6566 2066 726f 6d20 as no href from \n+001403a0: 534f 4150 2062 6f64 7920 616e 6420 6e6f SOAP body and no\n+001403b0: 204d 494d 4520 6361 6c6c 6261 636b 7320 MIME callbacks \n+001403c0: 7765 7265 2064 6566 696e 6564 2074 6f20 were defined to \n+001403d0: 7361 7665 2074 6865 2061 7474 6163 686d save the attachm\n+001403e0: 656e 7420 2020 203c 2f74 643e 3c2f 7472 ent ......<\n+00140650: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00140660: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00140670: 3e3c 636f 6465 3e23 534f 4150 5f4d 5553 >#SOAP_MUS\n+00140680: 5455 4e44 4552 5354 414e 443c 2f63 6f64 TUNDERSTAND <\n+00140730: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..X\n+001407c0: 4d4c 206e 616d 6573 7061 6365 206e 616d ML namespace nam\n+001407d0: 6520 6d69 736d 6174 6368 2076 616c 6964 e mismatch valid\n+001407e0: 6174 696f 6e20 6572 726f 7220 2020 203c ation error <\n+001407f0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..<\n+00140860: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00140870: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00140880: 3e4e 6f20 6461 7461 2069 6e20 7468 6520 >No data in the \n+00140890: 4854 5450 2062 6f64 7920 6f66 2074 6865 HTTP body of the\n+001408a0: 206d 6573 7361 6765 2072 6563 6569 7665 message receive\n+001408b0: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d .\n+001408c0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .....\n+00140aa0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....X\n+00140cd0: 4d4c 2065 6c65 6d65 6e74 206d 696e 4f63 ML element minOc\n+00140ce0: 6375 7273 206f 7220 6d61 784f 6363 7572 curs or maxOccur\n+00140cf0: 7320 7661 6c69 6461 7469 6f6e 2065 7272 s validation err\n+00140d00: 6f72 206f 7220 3c63 6f64 653e 2353 4f41 or or #SOA\n+00140d10: 505f 4d41 584f 4343 5552 533c 2f63 6f64 P_MAXOCCURS exceeded <\n+00140d30: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>....\n+00140fb0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+001410e0: 4661 696c 6564 2074 6f20 7265 6769 7374 Failed to regist\n+001410f0: 6572 2070 6c75 6769 6e20 2020 203c 2f74 er plugin ....\n+00141410: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .....<\n+00141580: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00141590: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+001415a0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n+001416b0: 3c63 6f64 653e 2353 4f41 505f 5359 4e54 #SOAP_SYNT\n+001416c0: 4158 5f45 5252 4f52 3c2f 636f 6465 3e20 AX_ERROR \n+001416d0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..\n+00141780: 3c63 6f64 653e 2353 4f41 505f 5441 475f #SOAP_TAG_\n+00141790: 4d49 534d 4154 4348 3c2f 636f 6465 3e20 MISMATCH \n+001417a0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..\n+001418a0: 4120 5443 502f 4950 2063 6f6e 6e65 6374 A TCP/IP connect\n+001418b0: 696f 6e20 6572 726f 7220 6f63 6375 7272 ion error occurr\n+001418c0: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed \n+001418d0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...\n+001419c0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+001419e0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n+00141af0: 3c63 6f64 653e 2353 4f41 505f 5553 4552 #SOAP_USER\n+00141b00: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n+00141b10: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 .\n+00141c20: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00141c40: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ......
    Error code <\n+0013e850: 2f74 683e 3c74 6820 636c 6173 733d 226d /th>Descriptio\n+0013e880: 6e20 2020 203c 2f74 683e 3c2f 7472 3e0a n
    #SOAP_O\n+0013e8e0: 4b3c 2f63 6f64 653e 2020 203c 2f74 643e K No error (zero\n+0013e920: 2920 2020 203c 2f74 643e 3c2f 7472 3e0a )
    #SOAP_\n+0013e980: 434c 495f 4641 554c 543c 2f63 6f64 653e CLI_FAULT\n+0013e990: 2020 203c 2f74 643e 3c74 6420 636c 6173 The se\n+0013e9c0: 7276 6963 6520 7265 7475 726e 6564 2061 rvice returned a\n+0013e9d0: 2053 4f41 5020 312e 3120 636c 6965 6e74 SOAP 1.1 client\n+0013e9e0: 2066 6175 6c74 202f 2053 4f41 5020 312e fault / SOAP 1.\n+0013e9f0: 3220 7365 6e64 6572 2066 6175 6c74 2074 2 sender fault t\n+0013ea00: 6f20 7468 6520 636c 6965 6e74 2020 2020 o the client \n+0013ea10: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_DATAEN\n+0013ea70: 434f 4449 4e47 554e 4b4e 4f57 4e3c 2f63 CODINGUNKNOWN SO\n+0013eab0: 4150 2031 2e32 2044 6174 6145 6e63 6f64 AP 1.2 DataEncod\n+0013eac0: 696e 6755 6e6b 6e6f 776e 2066 6175 6c74 ingUnknown fault\n+0013ead0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_D\n+0013eb30: 454c 5f4d 4554 484f 443c 2f63 6f64 653e EL_METHOD\n+0013eb40: 2020 203c 2f74 643e 3c74 6420 636c 6173 An HTT\n+0013eb70: 5020 4445 4c45 5445 2072 6571 7565 7374 P DELETE request\n+0013eb80: 2077 6173 2072 6563 6569 7665 6420 6279 was received by\n+0013eb90: 2074 6865 2073 6572 7669 6365 2062 7574 the service but\n+0013eba0: 2074 6865 2044 454c 4554 4520 7265 7175 the DELETE requ\n+0013ebb0: 6573 7420 6361 6c6c 6261 636b 203c 636f est callback soap::f\n+0013ec90: 6465 6c3c 2f61 3e3c 2f63 6f64 653e 2069 del i\n+0013eca0: 7320 6e6f 7420 696d 706c 656d 656e 7465 s not implemente\n+0013ecb0: 642c 2073 6565 2053 6563 7469 6f6e 203c d, see Section <\n+0013ecc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013ecd0: 663d 2269 6e64 6578 2e68 746d 6c23 6361 f=\"index.html#ca\n+0013ece0: 6c6c 6261 636b 223e 4675 6e63 7469 6f6e llback\">Function\n+0013ecf0: 2063 616c 6c62 6163 6b73 2066 6f72 2063 callbacks for c\n+0013ed00: 7573 746f 6d69 7a65 6420 492f 4f20 616e ustomized I/O an\n+0013ed10: 6420 4854 5450 2068 616e 646c 696e 673c d HTTP handling<\n+0013ed20: 2f61 3e20 2020 203c 2f74 643e 3c2f 7472 /a>
    #SOAP\n+0013ed80: 5f44 494d 455f 454e 443c 2f63 6f64 653e _DIME_END\n+0013ed90: 2020 203c 2f74 643e 3c74 6420 636c 6173 End of\n+0013edc0: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+0013edd0: 7320 7072 6f74 6f63 6f6c 2065 7272 6f72 s protocol error\n+0013ede0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_D\n+0013ee40: 494d 455f 4552 524f 523c 2f63 6f64 653e IME_ERROR\n+0013ee50: 2020 203c 2f74 643e 3c74 6420 636c 6173 DIME f\n+0013ee80: 6f72 6d61 7474 696e 6720 6572 726f 7220 ormatting error \n+0013ee90: 6f72 2044 494d 4520 6174 7461 6368 6d65 or DIME attachme\n+0013eea0: 6e74 2073 697a 6520 6578 6365 6564 7320 nt size exceeds \n+0013eeb0: 3c63 6f64 653e 2353 4f41 505f 4d41 5844 #SOAP_MAXD\n+0013eec0: 494d 4553 495a 453c 2f63 6f64 653e 2020 IMESIZE \n+0013eed0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    DIME attac\n+0013ef70: 686d 656e 7420 6861 7320 6e6f 2068 7265 hment has no hre\n+0013ef80: 6620 6672 6f6d 2053 4f41 5020 626f 6479 f from SOAP body\n+0013ef90: 2061 6e64 206e 6f20 4449 4d45 2063 616c and no DIME cal\n+0013efa0: 6c62 6163 6b73 2077 6572 6520 6465 6669 lbacks were defi\n+0013efb0: 6e65 6420 746f 2073 6176 6520 7468 6520 ned to save the \n+0013efc0: 6174 7461 6368 6d65 6e74 2020 2020 3c2f attachment
    #SOAP_DIME_MI\n+0013f030: 534d 4154 4348 3c2f 636f 6465 3e20 2020 SMATCH \n+0013f040: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 DIME vers\n+0013f070: 696f 6e20 6572 726f 7220 2020 203c 2f74 ion error
    #SOAP_DUPLICATE\n+0013f0e0: 5f49 443c 2f63 6f64 653e 2020 203c 2f74 _ID XML element \n+0013f120: 6861 7320 6475 706c 6963 6174 6520 6964 has duplicate id\n+0013f130: 2061 7474 7269 6275 7465 2076 616c 7565 attribute value\n+0013f140: 2028 6170 706c 6963 6162 6c65 2074 6f20 (applicable to \n+0013f150: 534f 4150 206d 756c 7469 2d72 6566 2065 SOAP multi-ref e\n+0013f160: 6e63 6f64 696e 6720 616e 6420 3c63 6f64 ncoding and #SOAP_XML_GRAP\n+0013f180: 483c 2f63 6f64 653e 2073 6572 6961 6c69 H seriali\n+0013f190: 7a61 7469 6f6e 2920 2020 203c 2f74 643e zation)
    \n+0013f1f0: 2353 4f41 505f 454d 5054 593c 2f63 6f64 #SOAP_EMPTY XML \n+0013f230: 656c 656d 656e 7420 6f72 2061 7474 7269 element or attri\n+0013f240: 6275 7465 2069 7320 656d 7074 7920 7768 bute is empty wh\n+0013f250: 656e 2061 2076 616c 7565 2069 7320 7265 en a value is re\n+0013f260: 7175 6972 6564 2020 2020 3c2f 7464 3e3c quired
    #S\n+0013f2c0: 4f41 505f 454f 463c 2f63 6f64 653e 2020 OAP_EOF \n+0013f2d0: 203c 2f74 643e 3c74 6420 636c 6173 733d Unexpect\n+0013f300: 6564 2065 6e64 206f 6620 6669 6c65 2c20 ed end of file, \n+0013f310: 6e6f 2069 6e70 7574 2c20 7472 616e 736d no input, transm\n+0013f320: 6973 7369 6f6e 2069 6e74 6572 7275 7074 ission interrupt\n+0013f330: 6564 206f 7220 7469 6d65 6420 6f75 742c ed or timed out,\n+0013f340: 2073 616d 6520 6173 203c 636f 6465 3e45 same as E\n+0013f350: 4f46 3c2f 636f 6465 3e20 2020 203c 2f74 OF
    #SOAP_EOM Out \n+0013f3f0: 6f66 206d 656d 6f72 7920 2020 203c 2f74 of memory
    #SOAP_ERR Same \n+0013f490: 6173 203c 636f 6465 3e45 4f46 3c2f 636f as EOF, but indicat\n+0013f4b0: 6573 2061 6e20 756e 7370 6563 6966 6965 es an unspecifie\n+0013f4c0: 6420 6572 726f 7220 2020 203c 2f74 643e d error
    \n+0013f520: 2353 4f41 505f 4641 554c 543c 2f63 6f64 #SOAP_FAULT The \n+0013f560: 6661 756c 7420 636f 6465 2074 6f20 6265 fault code to be\n+0013f570: 2072 6574 7572 6e65 6420 6279 2061 2073 returned by a s\n+0013f580: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n+0013f590: 2077 6865 6e20 6361 6c6c 696e 6720 3c63 when calling soap_sender_fa\n+0013f650: 756c 743c 2f61 3e3c 2f63 6f64 653e 2028 ult (\n+0013f660: 636c 6965 6e74 2069 7320 6174 2066 6175 client is at fau\n+0013f670: 6c74 2920 6f72 203c 636f 6465 3e3c 6120 lt) or soa\n+0013f720: 705f 7265 6365 6976 6572 5f66 6175 6c74 p_receiver_fault\n+0013f730: 3c2f 613e 3c2f 636f 6465 3e20 2873 6572 (ser\n+0013f740: 7665 7220 6973 2061 7420 6661 756c 7429 ver is at fault)\n+0013f750: 2c20 636c 6965 6e74 7320 7265 6365 6976 , clients receiv\n+0013f760: 6520 7468 6520 6661 756c 7420 6173 203c e the fault as <\n+0013f770: 636f 6465 3e23 534f 4150 5f43 4c49 5f46 code>#SOAP_CLI_F\n+0013f780: 4155 4c54 3c2f 636f 6465 3e20 6f72 203c AULT or <\n+0013f790: 636f 6465 3e23 534f 4150 5f53 5652 5f46 code>#SOAP_SVR_F\n+0013f7a0: 4155 4c54 3c2f 636f 6465 3e20 7265 7370 AULT resp\n+0013f7b0: 6563 7469 7665 6c79 2020 2020 3c2f 7464 ectively
    \n+0013f810: 2353 4f41 505f 4644 5f45 5843 4545 4445 #SOAP_FD_EXCEEDE\n+0013f820: 443c 2f63 6f64 653e 2020 203c 2f74 643e D Too many open \n+0013f860: 736f 636b 6574 7320 2020 203c 2f74 643e sockets
    \n+0013f8c0: 2353 4f41 505f 4649 5845 443c 2f63 6f64 #SOAP_FIXED XML \n+0013f900: 656c 656d 656e 7420 6f72 2061 7474 7269 element or attri\n+0013f910: 6275 7465 2076 616c 7565 2069 7320 6669 bute value is fi\n+0013f920: 7865 6420 616e 6420 7468 6520 7061 7273 xed and the pars\n+0013f930: 6564 2076 616c 7565 2064 6f65 7320 6e6f ed value does no\n+0013f940: 7420 6d61 7463 6820 7468 6520 6669 7865 t match the fixe\n+0013f950: 6420 7661 6c75 6520 2020 203c 2f74 643e d value
    #\n+0013f9b0: 534f 4150 5f47 4554 5f4d 4554 484f 443c SOAP_GET_METHOD<\n+0013f9c0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_HR\n+0013fc60: 4546 3c2f 636f 6465 3e20 2020 3c2f 7464 EF Reference to \n+0013fca0: 6f62 6a65 6374 2069 6e20 584d 4c20 6964 object in XML id\n+0013fcb0: 656e 7469 6669 6564 2062 7920 6974 7320 entified by its \n+0013fcc0: 6964 2061 7474 7269 6275 7465 2069 7320 id attribute is \n+0013fcd0: 696e 636f 6d70 6174 6962 6c65 2077 6974 incompatible wit\n+0013fce0: 6820 7468 6520 6f62 6a65 6374 2072 6566 h the object ref\n+0013fcf0: 6572 7265 6420 746f 2062 7920 7468 6520 erred to by the \n+0013fd00: 7265 6620 6f72 2068 7265 6620 6174 7472 ref or href attr\n+0013fd10: 6962 7574 6520 2861 7070 6c69 6361 626c ibute (applicabl\n+0013fd20: 6520 746f 2053 4f41 5020 6d75 6c74 692d e to SOAP multi-\n+0013fd30: 7265 6620 656e 636f 6469 6e67 2061 6e64 ref encoding and\n+0013fd40: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML\n+0013fd50: 5f47 5241 5048 3c2f 636f 6465 3e20 7365 _GRAPH se\n+0013fd60: 7269 616c 697a 6174 696f 6e29 2020 2020 rialization) \n+0013fd70: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_HTTP_E\n+0013fdd0: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR An unspecif\n+0013fe10: 6965 6420 4854 5450 2065 7272 6f72 206f ied HTTP error o\n+0013fe20: 6363 7572 7265 6420 2020 203c 2f74 643e ccurred
    \n+0013fe80: 2353 4f41 505f 4854 5450 5f4d 4554 484f #SOAP_HTTP_METHO\n+0013fe90: 443c 2f63 6f64 653e 2020 203c 2f74 643e D An HTTP reques\n+0013fed0: 7420 7761 7320 7265 6365 6976 6564 2062 t was received b\n+0013fee0: 7920 7468 6520 7365 7276 6963 6520 7468 y the service th\n+0013fef0: 6174 2063 616e 6e6f 7420 6265 2068 616e at cannot be han\n+0013ff00: 646c 6564 2020 2020 3c2f 7464 3e3c 2f74 dled
    #SOA\n+0013ff60: 505f 494f 423c 2f63 6f64 653e 2020 203c P_IOB <\n+0013ff70: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>SOAP array\n+0013ffa0: 2069 6e64 6578 206f 7574 206f 6620 626f index out of bo\n+0013ffb0: 756e 6473 2020 2020 3c2f 7464 3e3c 2f74 unds
    #SO\n+00140010: 4150 5f4c 454e 4754 483c 2f63 6f64 653e AP_LENGTH\n+00140020: 2020 203c 2f74 643e 3c74 6420 636c 6173 XML el\n+00140050: 656d 656e 7420 6f72 2061 7474 7269 6275 ement or attribu\n+00140060: 7465 206c 656e 6774 6820 7661 6c69 6461 te length valida\n+00140070: 7469 6f6e 2065 7272 6f72 206f 7220 3c63 tion error or #SOAP_MAXLEN\n+00140090: 4754 483c 2f63 6f64 653e 2065 7863 6565 GTH excee\n+001400a0: 6465 6420 2020 203c 2f74 643e 3c2f 7472 ded
    #SOAP\n+00140100: 5f4c 4556 454c 3c2f 636f 6465 3e20 2020 _LEVEL \n+00140110: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML nesti\n+00140140: 6e67 2064 6570 7468 206c 6576 656c 2065 ng depth level e\n+00140150: 7863 6565 6473 203c 636f 6465 3e23 534f xceeds #SO\n+00140160: 4150 5f4d 4158 4c45 5645 4c3c 2f63 6f64 AP_MAXLEVEL
    #SOAP\n+001401d0: 5f4d 494d 455f 454e 443c 2f63 6f64 653e _MIME_END\n+001401e0: 2020 203c 2f74 643e 3c74 6420 636c 6173 End of\n+00140210: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n+00140220: 7320 7072 6f74 6f63 6f6c 2065 7272 6f72 s protocol error\n+00140230: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_MI\n+00140290: 4d45 5f45 5252 4f52 3c2f 636f 6465 3e20 ME_ERROR \n+001402a0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 MIME at\n+001402d0: 7461 6368 6d65 6e74 2070 6172 7369 6e67 tachment parsing\n+001402e0: 2065 7272 6f72 2020 2020 3c2f 7464 3e3c error
    #\n+00140340: 534f 4150 5f4d 494d 455f 4852 4546 3c2f SOAP_MIME_HREF
    #SOAP\n+00140440: 5f4d 4953 5349 4e47 5f49 443c 2f63 6f64 _MISSING_ID An X\n+00140480: 4d4c 2065 6c65 6d65 6e74 2077 6974 6820 ML element with \n+00140490: 6964 2061 7474 7269 6275 7465 2069 7320 id attribute is \n+001404a0: 6d69 7373 696e 6720 7468 6174 2073 686f missing that sho\n+001404b0: 756c 6420 6d61 7463 6820 7468 6520 656c uld match the el\n+001404c0: 656d 656e 7420 7769 7468 2068 7265 662f ement with href/\n+001404d0: 7265 6620 6174 7472 6962 7574 6520 2861 ref attribute (a\n+001404e0: 7070 6c69 6361 626c 6520 746f 2053 4f41 pplicable to SOA\n+001404f0: 5020 6d75 6c74 692d 7265 6620 656e 636f P multi-ref enco\n+00140500: 6469 6e67 2061 6e64 203c 636f 6465 3e23 ding and #\n+00140510: 534f 4150 5f58 4d4c 5f47 5241 5048 3c2f SOAP_XML_GRAPH serializat\n+00140530: 696f 6e29 2020 2020 3c2f 7464 3e3c 2f74 ion)
    #SO\n+00140590: 4150 5f4d 4f45 3c2f 636f 6465 3e20 2020 AP_MOE \n+001405a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Memory ov\n+001405d0: 6572 666c 6f77 206f 7220 6d65 6d6f 7279 erflow or memory\n+001405e0: 2063 6f72 7275 7074 696f 6e20 6572 726f corruption erro\n+001405f0: 7220 2861 7070 6c69 6361 626c 6520 696e r (applicable in\n+00140600: 203c 636f 6465 3e23 4445 4255 473c 2f63 #DEBUG mode only) \n+00140620: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    An X\n+001406c0: 4d4c 2065 6c65 6d65 6e74 2069 7320 7072 ML element is pr\n+001406d0: 6573 656e 7420 7769 7468 2061 206d 7573 esent with a mus\n+001406e0: 7455 6e64 6572 7374 616e 6420 6174 7472 tUnderstand attr\n+001406f0: 6962 7574 6520 7768 6963 6820 6d75 7374 ibute which must\n+00140700: 2062 6520 756e 6465 7273 746f 6f64 2062 be understood b\n+00140710: 7574 2069 7320 6e6f 7420 6465 7365 7269 ut is not deseri\n+00140720: 616c 697a 6564 2020 2020 3c2f 7464 3e3c alized
    #\n+00140780: 534f 4150 5f4e 414d 4553 5041 4345 3c2f SOAP_NAMESPACE
    #SOAP_NO_DATA\n+00140850: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SOAP_\n+00140910: 4e4f 5f4d 4554 484f 443c 2f63 6f64 653e NO_METHOD\n+00140920: 2020 203c 2f74 643e 3c74 6420 636c 6173 The se\n+00140950: 7276 6963 6520 7265 7175 6573 7420 6469 rvice request di\n+00140960: 7370 6174 6368 6572 2064 6964 206e 6f74 spatcher did not\n+00140970: 2066 696e 6420 6120 6d61 7463 6869 6e67 find a matching\n+00140980: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+00140990: 6f6e 2066 6f72 2061 2073 6572 7669 6365 on for a service\n+001409a0: 2072 6571 7565 7374 2020 2020 3c2f 7464 request
    \n+00140a00: 2353 4f41 505f 4e4f 5f54 4147 3c2f 636f #SOAP_NO_TAG No \n+00140a40: 584d 4c20 656c 656d 656e 7420 7461 6720 XML element tag \n+00140a50: 7761 7320 666f 756e 6420 7768 656e 206f was found when o\n+00140a60: 6e65 2077 6173 2065 7870 6563 7465 6420 ne was expected \n+00140a70: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_NT\n+00140ad0: 4c4d 5f45 5252 4f52 3c2f 636f 6465 3e20 LM_ERROR \n+00140ae0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 An NTLM\n+00140b10: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+00140b20: 6861 6e64 7368 616b 6520 6572 726f 7220 handshake error \n+00140b30: 6f63 6375 7272 6564 2020 2020 3c2f 7464 occurred
    \n+00140b90: 2353 4f41 505f 4e55 4c4c 3c2f 636f 6465 #SOAP_NULL XML e\n+00140bd0: 6c65 6d65 6e74 2068 6173 2061 6e20 3c63 lement has an xsi:nil attribute whe\n+00140c00: 6e20 7468 6520 656c 656d 656e 7420 6973 n the element is\n+00140c10: 206e 6f74 206e 696c 6c61 626c 652c 2063 not nillable, c\n+00140c20: 6175 7369 6e67 2061 2076 616c 6964 6174 ausing a validat\n+00140c30: 696f 6e20 6572 726f 7220 2020 203c 2f74 ion error
    #SOAP_OCCURS
    #SOAP_PATCH_M\n+00140d90: 4554 484f 443c 2f63 6f64 653e 2020 203c ETHOD <\n+00140da0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>An HTTP PA\n+00140dd0: 5443 4820 7265 7175 6573 7420 7761 7320 TCH request was \n+00140de0: 7265 6365 6976 6564 2062 7920 7468 6520 received by the \n+00140df0: 7365 7276 6963 6520 6275 7420 7468 6520 service but the \n+00140e00: 5041 5443 4820 7265 7175 6573 7420 6361 PATCH request ca\n+00140e10: 6c6c 6261 636b 203c 636f 6465 3e3c 6120 llback soap::fpatch<\n+00140ef0: 2f61 3e3c 2f63 6f64 653e 2069 7320 6e6f /a> is no\n+00140f00: 7420 696d 706c 656d 656e 7465 642c 2073 t implemented, s\n+00140f10: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Function cal\n+00140f50: 6c62 6163 6b73 2066 6f72 2063 7573 746f lbacks for custo\n+00140f60: 6d69 7a65 6420 492f 4f20 616e 6420 4854 mized I/O and HT\n+00140f70: 5450 2068 616e 646c 696e 673c 2f61 3e20 TP handling \n+00140f80: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_PA\n+00140fe0: 5454 4552 4e3c 2f63 6f64 653e 2020 203c TTERN <\n+00140ff0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>XML elemen\n+00141020: 7420 6f72 2061 7474 7269 6275 7465 2076 t or attribute v\n+00141030: 616c 7565 2070 6174 7465 726e 206d 6973 alue pattern mis\n+00141040: 6d61 7463 6820 2020 203c 2f74 643e 3c2f match
    #SO\n+001410a0: 4150 5f50 4c55 4749 4e5f 4552 524f 523c AP_PLUGIN_ERROR<\n+001410b0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_PROHIBIT\n+00141160: 4544 3c2f 636f 6465 3e20 2020 3c2f 7464 ED XML attribute\n+001411a0: 2069 7320 7072 6f68 6962 6974 6564 2062 is prohibited b\n+001411b0: 7574 2070 7265 7365 6e74 2020 2020 3c2f ut present
    #SOAP_PUT_METH\n+00141220: 4f44 3c2f 636f 6465 3e20 2020 3c2f 7464 OD An HTTP PUT r\n+00141260: 6571 7565 7374 2077 6173 2072 6563 6569 equest was recei\n+00141270: 7665 6420 6279 2074 6865 2073 6572 7669 ved by the servi\n+00141280: 6365 2062 7574 2074 6865 2050 5554 2072 ce but the PUT r\n+00141290: 6571 7565 7374 2063 616c 6c62 6163 6b20 equest callback \n+001412a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fp\n+00141370: 7574 3c2f 613e 3c2f 636f 6465 3e20 6973 ut is\n+00141380: 206e 6f74 2069 6d70 6c65 6d65 6e74 6564 not implemented\n+00141390: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Function \n+001413d0: 6361 6c6c 6261 636b 7320 666f 7220 6375 callbacks for cu\n+001413e0: 7374 6f6d 697a 6564 2049 2f4f 2061 6e64 stomized I/O and\n+001413f0: 2048 5454 5020 6861 6e64 6c69 6e67 3c2f HTTP handling
    #SOAP\n+00141460: 5f52 4551 5549 5245 443c 2f63 6f64 653e _REQUIRED\n+00141470: 2020 203c 2f74 643e 3c74 6420 636c 6173 XML at\n+001414a0: 7472 6962 7574 6520 6973 2072 6571 7569 tribute is requi\n+001414b0: 7265 6420 6275 7420 6e6f 7420 7072 6573 red but not pres\n+001414c0: 656e 7420 2020 203c 2f74 643e 3c2f 7472 ent
    #SOAP\n+00141520: 5f53 534c 5f45 5252 4f52 3c2f 636f 6465 _SSL_ERROR An SS\n+00141560: 4c20 6572 726f 7220 6f63 6375 7272 6564 L error occurred\n+00141570: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_S\n+001415d0: 5652 5f46 4155 4c54 3c2f 636f 6465 3e20 VR_FAULT \n+001415e0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 The ser\n+00141610: 7669 6365 2072 6574 7572 6e65 6420 6120 vice returned a \n+00141620: 534f 4150 2031 2e31 2073 6572 7665 7220 SOAP 1.1 server \n+00141630: 6661 756c 7420 6f72 2053 4f41 5020 312e fault or SOAP 1.\n+00141640: 3220 7265 6365 6976 6572 2066 6175 6c74 2 receiver fault\n+00141650: 2074 6f20 7468 6520 636c 6965 6e74 2020 to the client \n+00141660: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    An XML \n+00141700: 7379 6e74 6178 2065 7272 6f72 206f 6363 syntax error occ\n+00141710: 7572 7265 6420 7768 696c 6520 7061 7273 urred while pars\n+00141720: 696e 6720 7468 6520 696e 7075 7420 2020 ing the input \n+00141730: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    XML ele\n+001417d0: 6d65 6e74 2074 6167 2070 6172 7365 6420 ment tag parsed \n+001417e0: 646f 6573 206e 6f74 206d 6174 6368 2061 does not match a\n+001417f0: 6e79 7468 696e 6720 7468 6174 2069 7320 nything that is \n+00141800: 6578 7065 6374 6564 2020 2020 3c2f 7464 expected
    \n+00141860: 2353 4f41 505f 5443 505f 4552 524f 523c #SOAP_TCP_ERROR<\n+00141870: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP\n+00141920: 5f54 5950 453c 2f63 6f64 653e 2020 203c _TYPE <\n+00141930: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>XML elemen\n+00141960: 7420 6f72 2061 7474 7269 6275 7465 2068 t or attribute h\n+00141970: 6173 2061 206d 6973 6d61 7463 6869 6e67 as a mismatching\n+00141980: 2074 7970 6520 6f72 2076 616c 7565 2074 type or value t\n+00141990: 6861 7420 6973 2063 6175 7369 6e67 2061 hat is causing a\n+001419a0: 2076 616c 6964 6174 696f 6e20 6572 726f validation erro\n+001419b0: 7220 2020 203c 2f74 643e 3c2f 7472 3e0a r
    #SOAP_U\n+00141a10: 4450 5f45 5252 4f52 3c2f 636f 6465 3e20 DP_ERROR \n+00141a20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 A UDP/I\n+00141a50: 5020 636f 6e6e 6563 7469 6f6e 2065 7272 P connection err\n+00141a60: 6f72 206f 6363 7572 7265 6420 6f72 2074 or occurred or t\n+00141a70: 6865 206d 6573 7361 6765 2074 6f6f 206c he message too l\n+00141a80: 6172 6765 2074 6f20 7374 6f72 6520 696e arge to store in\n+00141a90: 2061 2055 4450 2070 6163 6b65 7420 2020 a UDP packet \n+00141aa0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    s\n+00141bf0: 6f61 703a 3a75 7365 723c 2f61 3e20 6e6f oap::user no\n+00141c00: 7420 7365 7420 746f 206e 6f6e 2d4e 554c t set to non-NUL\n+00141c10: 4c20 2020 203c 2f74 643e 3c2f 7472 3e0a L
    #SOAP_U\n+00141c70: 5446 5f45 5252 4f52 3c2f 636f 6465 3e20 TF_ERROR \n+00141c80: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 An UTF-\n+00141cb0: 3820 6465 636f 6469 6e67 2065 7272 6f72 8 decoding error\n+00141cc0: 206f 6363 7572 7265 6420 2020 203c 2f74 occurred
    #SOAP_VERSIONM\n+00141d30: 4953 4d41 5443 483c 2f63 6f64 653e 2020 ISMATCH \n+00141d40: 203c 2f74 643e 3c74 6420 636c 6173 733d SOAP ver\n+00141d70: 7369 6f6e 206d 6973 6d61 7463 6820 6f72 sion mismatch or\n+00141d80: 206e 6f20 534f 4150 206d 6573 7361 6765 no SOAP message\n+00141d90: 2069 7320 7265 6365 6976 6564 2020 2020 is received \n+00141da0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_ZLIB_E\n+00141e00: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR A zlib erro\n+00141e40: 7220 6f63 6375 7272 6564 2020 203c 2f74 r occurred
    \n+00141e60: 0a3c 703e 4120 7374 6174 7573 2063 6f64 .

    A status cod\n+00141e70: 6520 6f66 203c 636f 6465 3e23 534f 4150 e of #SOAP\n+00141e80: 5f4f 4b3c 2f63 6f64 653e 2028 7a65 726f _OK (zero\n+00141e90: 2920 6973 2072 6574 7572 6e65 6420 6279 ) is returned by\n+00141ea0: 2061 2067 534f 4150 2041 5049 2066 756e a gSOAP API fun\n+00141eb0: 6374 696f 6e20 7768 656e 2074 6865 2066 ction when the f\n+00141ec0: 756e 6374 696f 6e20 6361 6c6c 2077 6173 unction call was\n+00141ed0: 2073 7563 6365 7373 6675 6c2c 206f 7468 successful, oth\n+00141ee0: 6572 7769 7365 2061 206e 6f6e 2d7a 6572 erwise a non-zer\n+00141ef0: 6f20 6572 726f 7220 636f 6465 2069 7320 o error code is \n+00141f00: 7265 7475 726e 6564 2e20 5468 6520 7374 returned. The st\n+00141f10: 6174 7573 2065 7272 6f72 2063 6f64 6520 atus error code \n+00141f20: 6973 2061 6c73 6f20 7374 6f72 6564 2069 is also stored i\n+00141f30: 6e20 7468 6520 6375 7272 656e 7420 3c63 n the current \n+00141f90: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+00141fa0: 636f 6e74 6578 7420 6173 203c 636f 6465 context as soap::err\n+00142060: 6f72 3c2f 613e 3c2f 636f 6465 3e2e 2046 or. F\n+00142070: 6f72 2049 4f20 616e 6420 736f 636b 6574 or IO and socket\n+00142080: 2d72 656c 6174 6564 2065 7272 6f72 732c -related errors,\n+00142090: 2061 6c73 6f20 7468 6520 3c63 6f64 653e also the \n+001420a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+00142120: 736f 6170 3a3a 6572 726e 756d 3c2f 613e soap::errnum\n+00142130: 3c2f 636f 6465 3e20 7661 7269 6162 6c65 variable\n+00142140: 2069 7320 7365 7420 746f 2074 6865 203c is set to the <\n+00142150: 636f 6465 3e65 7272 6e6f 3c2f 636f 6465 code>errno value of the s\n+00142170: 7973 7465 6d20 6572 726f 7220 666f 7220 ystem error for \n+00142180: 6578 616d 706c 6520 7768 656e 2061 203c example when a <\n+00142190: 636f 6465 3e23 534f 4150 5f45 4f46 3c2f code>#SOAP_EOF error occu\n+001421b0: 7272 6564 2e3c 2f70 3e0a 3c70 3e54 6f20 rred.

    .

    To \n+001421c0: 6469 7370 6c61 7920 7468 6520 6572 726f display the erro\n+001421d0: 722c 2075 7365 203c 636f 6465 3e3c 6120 r, use soap_print_fa\n+00142270: 756c 7428 7374 7275 6374 2073 6f61 7020 ult(struct soap \n+00142280: 2a73 6f61 702c 2046 494c 4520 2a66 6429 *soap, FILE *fd)\n+00142290: 3c2f 613e 3c2f 636f 6465 3e20 7768 6572 wher\n+001422a0: 6520 7468 6520 6375 7272 656e 7420 7661 e the current va\n+001422b0: 6c75 6520 6f66 203c 636f 6465 3e3c 6120 lue of soap::error is use\n+00142380: 6420 6279 2074 6865 2066 756e 6374 696f d by the functio\n+00142390: 6e20 746f 2070 7269 6e74 2074 6865 2065 n to print the e\n+001423a0: 7272 6f72 2074 6f20 7468 6520 7370 6563 rror to the spec\n+001423b0: 6966 6965 6420 3c63 6f64 653e 6664 3c2f ified fd file. Alte\n+001423d0: 726e 6174 6976 656c 792c 2069 6e20 432b rnatively, in C+\n+001423e0: 2b20 796f 7520 6361 6e20 7573 6520 3c63 + you can use soap_stream_fau\n+00142490: 6c74 2873 7472 7563 7420 736f 6170 202a lt(struct soap *\n+001424a0: 736f 6170 2c20 7374 643a 3a6f 7374 7265 soap, std::ostre\n+001424b0: 616d 2661 6d70 3b20 6f73 293c 2f61 3e3c am& os)<\n+001424c0: 2f63 6f64 653e 2074 6f20 7072 696e 7420 /code> to print \n+001424d0: 7468 6520 6572 726f 7220 6f6e 2074 6865 the error on the\n+001424e0: 2073 7065 6369 6669 6564 203c 636f 6465 specified os outpu\n+00142500: 7420 7374 7265 616d 2e3c 2f70 3e0a 3c70 t stream.

    .To display the \n+00142520: 6c6f 6361 7469 6f6e 206f 6620 616e 2058 location of an X\n+00142530: 4d4c 2070 6172 7369 6e67 2061 6e64 2076 ML parsing and v\n+00142540: 616c 6964 6174 696f 6e20 6572 726f 722c alidation error,\n+00142550: 2075 7365 203c 636f 6465 3e3c 6120 636c use soap_pr\n+00142600: 696e 745f 6661 756c 745f 6c6f 6361 7469 int_fault_locati\n+00142610: 6f6e 2873 7472 7563 7420 736f 6170 202a on(struct soap *\n+00142620: 736f 6170 2c20 4649 4c45 202a 6664 293c soap, FILE *fd)<\n+00142630: 2f61 3e3c 2f63 6f64 653e 206f 7220 3c63 /a> or soap_stream_fa\n+001426f0: 756c 745f 6c6f 6361 7469 6f6e 2873 7472 ult_location(str\n+00142700: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00142710: 7374 643a 3a6f 7374 7265 616d 2661 6d70 std::ostream&\n+00142720: 3b20 6f73 293c 2f61 3e3c 2f63 6f64 653e ; os)\n+00142730: 2074 6f20 7072 696e 7420 7061 7274 206f to print part o\n+00142740: 6620 7468 6520 584d 4c20 7769 7468 2074 f the XML with t\n+00142750: 6865 2065 7272 6f72 206c 6f63 6174 696f he error locatio\n+00142760: 6e20 6d61 726b 6564 2069 6e20 7468 6520 n marked in the \n+00142770: 584d 4c20 6f75 7470 7574 2e3c 2f70 3e0a XML output.

    .\n+00142780: 3c70 3e54 6f20 7361 7665 2074 6865 2065

    To save the e\n+00142790: 7272 6f72 2069 6e20 6120 7374 7269 6e67 rror in a string\n+001427a0: 2062 7566 6665 7220 3c63 6f64 653e 6275 buffer bu\n+001427b0: 665b 302e 2e2e 6c65 6e2d 315d 3c2f 636f f[0...len-1], use <\n+001427d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001427e0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001427f0: 5f66 6175 6c74 2e68 746d 6c23 6761 6663 _fault.html#gafc\n+00142800: 3964 3637 3036 3038 3839 6637 3234 3333 9d67060889f72433\n+00142810: 3831 3239 3930 3437 6630 6538 6536 2220 81299047f0e8e6\" \n+00142820: 7469 746c 653d 2250 7269 6e74 2065 7272 title=\"Print err\n+00142830: 6f72 206d 6573 7361 6765 2074 6f20 7468 or message to th\n+00142840: 6520 7370 6563 6966 6965 6420 7374 7269 e specified stri\n+00142850: 6e67 2062 7566 6665 722e 223e 736f 6170 ng buffer.\">soap\n+00142860: 5f73 7072 696e 745f 6661 756c 7428 7374 _sprint_fault(st\n+00142870: 7275 6374 2073 6f61 702a 2c20 6368 6172 ruct soap*, char\n+00142880: 202a 6275 662c 2073 697a 655f 7420 6c65 *buf, size_t le\n+00142890: 6e29 3c2f 613e 3c2f 636f 6465 3e2c 2077 n), w\n+001428a0: 6865 7265 203c 636f 6465 3e62 7566 3c2f here buf is populat\n+001428c0: 6564 2077 6974 6820 7468 6520 6661 756c ed with the faul\n+001428d0: 7420 6d65 7373 6167 6520 7465 726d 696e t message termin\n+001428e0: 6174 696e 6720 7769 7468 2061 203c 636f ating with a \\0..

    To determin\n+00142910: 6520 7468 6520 7479 7065 206f 6620 6572 e the type of er\n+00142920: 726f 7220 7468 6174 206f 6363 7572 7265 ror that occurre\n+00142930: 642c 2075 7365 3a3c 2f70 3e3c 756c 3e0a d, use:

    .

    An \n+001435e0: 4854 5450 2073 7461 7475 7320 636f 6465 HTTP status code\n+001435f0: 2069 7320 7265 7475 726e 6564 2077 6865 is returned whe\n+00143600: 6e20 7468 6520 636c 6965 6e74 2066 6169 n the client fai\n+00143610: 6c73 2074 6f20 636f 6e6e 6563 7420 746f ls to connect to\n+00143620: 2061 6e20 4854 5450 2073 6572 7665 7220 an HTTP server \n+00143630: 616e 6420 7468 6520 4854 5450 2073 6572 and the HTTP ser\n+00143640: 7665 7220 7265 7370 6f6e 7365 2077 6974 ver response wit\n+00143650: 6820 616e 2065 7272 6f72 2e20 5468 6520 h an error. The \n+00143660: 6c69 7374 206f 6620 4854 5450 2073 7461 list of HTTP sta\n+00143670: 7475 7320 636f 6465 7320 6973 2067 6976 tus codes is giv\n+00143680: 656e 2062 656c 6f77 3a3c 2f70 3e0a 3c74 en below:

    ...Cod\n+001436f0: 6520 2020 3c2f 7468 3e3c 7468 2063 6c61 e Descr\n+00143720: 6970 7469 6f6e 2020 2020 3c2f 7468 3e3c iption <\n+00143730: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..200 OK (no erro\n+001437b0: 7229 2020 2020 3c2f 7464 3e3c 2f74 723e r) \n+001437c0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..201 \n+00143810: 3c74 6420 636c 6173 733d 226d 6172 6b64 Created ..202 \n+00143890: 203c 2f74 643e 3c74 6420 636c 6173 733d Accepted\n+001438c0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+001438d0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+001438e0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+001438f0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .203 \n+00143940: 4e6f 6e2d 4175 7468 6f72 6974 6174 6976 Non-Authoritativ\n+00143950: 6520 496e 666f 726d 6174 696f 6e20 2020 e Information \n+00143960: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..2\n+001439b0: 3034 2020 203c 2f74 643e 3c74 6420 636c 04 No C\n+001439e0: 6f6e 7465 6e74 2020 2020 3c2f 7464 3e3c ontent <\n+001439f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..205 <\n+00143a40: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Reset Cont\n+00143a70: 656e 7420 2020 203c 2f74 643e 3c2f 7472 ent ..206 \n+00143ad0: 3c74 6420 636c 6173 733d 226d 6172 6b64 Partial Conten\n+00143b00: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t .\n+00143b10: 3c74 7220 636c 6173 733d 226d 6172 6b64 .300 <\n+00143b60: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143b70: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143b80: 3e4d 756c 7469 706c 6520 4368 6f69 6365 >Multiple Choice\n+00143b90: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n+00143ba0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00143bc0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .301 \n+00143c10: 4d6f 7665 6420 5065 726d 616e 656e 746c Moved Permanentl\n+00143c20: 7920 2020 203c 2f74 643e 3c2f 7472 3e0a y .\n+00143c30: 3c74 7220 636c 6173 733d 226d 6172 6b64 .302 <\n+00143c80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143c90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143ca0: 3e46 6f75 6e64 2020 2020 3c2f 7464 3e3c >Found <\n+00143cb0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..303 See Other \n+00143d30: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00143d60: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143d70: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143d80: 3e33 3034 2020 203c 2f74 643e 3c74 6420 >304 No\n+00143db0: 7420 4d6f 6469 6669 6564 2020 2020 3c2f t Modified ..305 \n+00143e10: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Use Pro\n+00143e40: 7879 2020 2020 3c2f 7464 3e3c 2f74 723e xy \n+00143e50: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..307 \n+00143ea0: 3c74 6420 636c 6173 733d 226d 6172 6b64 Temporary Redi\n+00143ed0: 7265 6374 2020 2020 3c2f 7464 3e3c 2f74 rect ..400 Bad Request \n+00143f60: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00143f90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143fa0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143fb0: 3e34 3031 2020 203c 2f74 643e 3c74 6420 >401 Un\n+00143fe0: 6175 7468 6f72 697a 6564 2020 2020 3c2f authorized ..402 \n+00144040: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Payment\n+00144070: 2052 6571 7569 7265 6420 2020 203c 2f74 Required ..403 \n+001440d0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Forbidd\n+00144100: 656e 2020 2020 3c2f 7464 3e3c 2f74 723e en \n+00144110: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..404 <\n+00144160: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144170: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144180: 3e4e 6f74 2046 6f75 6e64 2020 2020 3c2f >Not Found ..405\n+001441e0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Method\n+00144210: 204e 6f74 2041 6c6c 6f77 6564 2020 2020 Not Allowed \n+00144220: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..40\n+00144270: 3620 2020 3c2f 7464 3e3c 7464 2063 6c61 6 Not A\n+001442a0: 6363 6570 7461 626c 6520 2020 203c 2f74 cceptable ..407 \n+00144300: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Proxy A\n+00144330: 7574 6865 6e74 6963 6174 696f 6e20 5265 uthentication Re\n+00144340: 7175 6972 6564 2020 2020 3c2f 7464 3e3c quired <\n+00144350: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..408 Request Tim\n+001443d0: 652d 6f75 7420 2020 203c 2f74 643e 3c2f e-out ..409 Conflict \n+00144460: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..4\n+001444b0: 3130 2020 203c 2f74 643e 3c74 6420 636c 10 Gone\n+001444e0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+001444f0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00144500: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00144510: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .411 \n+00144560: 4c65 6e67 7468 2052 6571 7569 7265 6420 Length Required \n+00144570: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+001445a0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001445b0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001445c0: 3e34 3132 2020 203c 2f74 643e 3c74 6420 >412 Pr\n+001445f0: 6563 6f6e 6469 7469 6f6e 2046 6169 6c65 econdition Faile\n+00144600: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d .\n+00144610: 3c74 7220 636c 6173 733d 226d 6172 6b64 .413 <\n+00144660: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144670: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144680: 3e52 6571 7565 7374 2045 6e74 6974 7920 >Request Entity \n+00144690: 546f 6f20 4c61 7267 6520 2020 203c 2f74 Too Large ..414 \n+001446f0: 203c 2f74 643e 3c74 6420 636c 6173 733d Request-\n+00144720: 5552 4920 546f 6f20 4c61 7267 6520 2020 URI Too Large \n+00144730: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+00144780: 3431 3520 2020 3c2f 7464 3e3c 7464 2063 415 Uns\n+001447b0: 7570 706f 7274 6564 204d 6564 6961 2054 upported Media T\n+001447c0: 7970 6520 2020 203c 2f74 643e 3c2f 7472 ype ..416 \n+00144820: 3c74 6420 636c 6173 733d 226d 6172 6b64 Requested rang\n+00144850: 6520 6e6f 7420 7361 7469 7366 6961 626c e not satisfiabl\n+00144860: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n+00144870: 3c74 7220 636c 6173 733d 226d 6172 6b64 .417 <\n+001448c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001448d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001448e0: 3e45 7870 6563 7461 7469 6f6e 2046 6169 >Expectation Fai\n+001448f0: 6c65 6420 2020 203c 2f74 643e 3c2f 7472 led ..500 \n+00144950: 3c74 6420 636c 6173 733d 226d 6172 6b64 Internal Serve\n+00144980: 7220 4572 726f 7220 2020 203c 2f74 643e r Error \n+00144990: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..501 \n+001449e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Not Imple\n+00144a10: 6d65 6e74 6564 2020 2020 3c2f 7464 3e3c mented <\n+00144a20: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..502 Bad Gateway\n+00144aa0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00144ab0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00144ac0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00144ad0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .503 \n+00144b20: 5365 7276 6963 6520 556e 6176 6169 6c61 Service Unavaila\n+00144b30: 626c 6520 2020 203c 2f74 643e 3c2f 7472 ble ..504 \n+00144b90: 3c74 6420 636c 6173 733d 226d 6172 6b64 Gateway Time-o\n+00144bc0: 7574 2020 2020 3c2f 7464 3e3c 2f74 723e ut \n+00144bd0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..505 \n+00144c20: 3c74 6420 636c 6173 733d 226d 6172 6b64 HTTP Version n\n+00144c50: 6f74 2073 7570 706f 7274 6564 2020 203c ot supported <\n+00144c60: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>..

    HTTP statu\n+00144c80: 7320 636f 6465 2032 3030 2069 7320 6e6f s code 200 is no\n+00144c90: 7420 666c 6167 6765 6420 6173 2061 6e20 t flagged as an \n+00144ca0: 6572 726f 7220 6279 2074 6865 2065 6e67 error by the eng\n+00144cb0: 696e 652e 2053 7461 7475 7320 636f 6465 ine. Status code\n+00144cc0: 7320 3230 3120 616e 6420 3230 3220 6172 s 201 and 202 ar\n+00144cd0: 6520 696e 666f 726d 6174 6976 6520 616e e informative an\n+00144ce0: 6420 7368 6f75 6c64 206e 6f74 2062 6520 d should not be \n+00144cf0: 636f 6e73 6964 6572 6564 2065 7272 6f72 considered error\n+00144d00: 7320 6279 2074 6865 2061 7070 6c69 6361 s by the applica\n+00144d10: 7469 6f6e 206c 6f67 6963 2e3c 2f70 3e0a tion logic.

    .\n+00144d20: 3c70 3e53 6572 7665 722d 7369 6465 2069

    Server-side i\n+00144d30: 6d70 6c65 6d65 6e74 6174 696f 6e73 206f mplementations o\n+00144d40: 6620 7365 7276 6963 6520 6f70 6572 6174 f service operat\n+00144d50: 696f 6e73 2073 686f 756c 6420 7265 7475 ions should retu\n+00144d60: 726e 203c 636f 6465 3e23 534f 4150 5f4f rn #SOAP_O\n+00144d70: 4b3c 2f63 6f64 653e 2077 6865 6e20 7468 K when th\n+00144d80: 6520 6f70 6572 6174 696f 6e20 7761 7320 e operation was \n+00144d90: 7375 6363 6573 7366 756c 2c20 7768 6963 successful, whic\n+00144da0: 6820 7265 7475 726e 7320 6120 2232 3030 h returns a \"200\n+00144db0: 204f 4b22 2048 5454 5020 6865 6164 6572 OK\" HTTP header\n+00144dc0: 2077 6974 6820 7468 6520 584d 4c20 7265 with the XML re\n+00144dd0: 7370 6f6e 7365 206d 6573 7361 6765 2e20 sponse message. \n+00144de0: 5365 7276 6572 2d73 6964 6520 696d 706c Server-side impl\n+00144df0: 656d 656e 7461 7469 6f6e 7320 6f66 2073 ementations of s\n+00144e00: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n+00144e10: 7320 696e 2067 534f 4150 206d 6179 2064 s in gSOAP may d\n+00144e20: 6972 6563 746c 7920 7265 7475 726e 2061 irectly return a\n+00144e30: 6e20 4854 5450 2073 7461 7475 7320 636f n HTTP status co\n+00144e40: 6465 2077 6865 6e20 616e 2048 5454 502d de when an HTTP-\n+00144e50: 7265 6c61 7465 6420 6572 726f 7220 7368 related error sh\n+00144e60: 6f75 6c64 2062 6520 7265 7475 726e 6564 ould be returned\n+00144e70: 2e20 466f 7220 6578 616d 706c 652c 203c . For example, <\n+00144e80: 636f 6465 3e72 6574 7572 6e20 3430 343c code>return 404<\n+00144e90: 2f63 6f64 653e 2072 6574 7572 6e73 2022 /code> returns \"\n+00144ea0: 3430 3420 4e6f 7420 466f 756e 6422 2074 404 Not Found\" t\n+00144eb0: 6f20 7468 6520 636c 6965 6e74 2061 6e64 o the client and\n+00144ec0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::error\n+00144f80: 3c2f 636f 6465 3e20 7661 7269 6162 6c65 variable\n+00144f90: 2069 7320 7365 7420 746f 2034 3034 2061 is set to 404 a\n+00144fa0: 7420 7468 6520 636c 6965 6e74 2073 6964 t the client sid\n+00144fb0: 652e 3c2f 703e 0a3c 703e 546f 2072 6574 e.

    .

    To ret\n+00144fc0: 7572 6e20 6120 534f 4150 2046 6175 6c74 urn a SOAP Fault\n+00144fd0: 2066 726f 6d20 6120 7365 7276 6572 2d73 from a server-s\n+00144fe0: 6964 6520 696d 706c 656d 656e 7461 7469 ide implementati\n+00144ff0: 6f6e 206f 6620 6120 7365 7276 6963 6520 on of a service \n+00145000: 6f70 6572 6174 696f 6e2c 2075 7365 206f operation, use o\n+00145010: 6e65 206f 6620 7468 6520 666f 6c6c 6f77 ne of the follow\n+00145020: 696e 6720 6675 6e63 7469 6f6e 7320 746f ing functions to\n+00145030: 2070 6f70 756c 6174 6520 7468 6520 534f populate the SO\n+00145040: 4150 2046 6175 6c74 206d 6573 7361 6765 AP Fault message\n+00145050: 3a3c 2f70 3e3c 756c 3e0a 3c6c 693e 3c63 :

    .

    A r\n+00145930: 6563 6569 7665 7220 6572 726f 7220 696e eceiver error in\n+00145940: 6469 6361 7465 7320 7468 6174 2074 6865 dicates that the\n+00145950: 2073 6572 7669 6365 2063 6f75 6c64 206e service could n\n+00145960: 6f74 2068 616e 646c 6520 7468 6520 636c ot handle the cl\n+00145970: 6965 6e74 2072 6571 7565 7374 2c20 6275 ient request, bu\n+00145980: 7420 6974 2063 616e 2070 6f73 7369 626c t it can possibl\n+00145990: 7920 7265 636f 7665 7220 6672 6f6d 2074 y recover from t\n+001459a0: 6865 2065 7272 6f72 206c 6174 6572 2c20 he error later, \n+001459b0: 666f 7220 6578 616d 706c 6520 7768 656e for example when\n+001459c0: 2072 6573 6f75 7263 6573 2061 7265 2074 resources are t\n+001459d0: 656d 706f 7261 7269 6c79 2075 6e61 7661 emporarily unava\n+001459e0: 696c 6162 6c65 2e20 4120 7365 6e64 6572 ilable. A sender\n+001459f0: 2065 7272 6f72 2069 6e64 6963 6174 6573 error indicates\n+00145a00: 2074 6861 7420 7468 6520 636c 6965 6e74 that the client\n+00145a10: 2072 6571 7565 7374 2069 7320 6661 756c request is faul\n+00145a20: 7479 2061 6e64 2073 2072 656a 6563 7465 ty and s rejecte\n+00145a30: 6420 6279 2074 6865 2073 6572 7669 6365 d by the service\n+00145a40: 2e3c 2f70 3e0a 3c70 3e53 6565 2053 6563 .

    .

    See Sec\n+00145a50: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion SOAP \n+00145a80: 4661 756c 7420 7072 6f63 6573 7369 6e67 Fault processing\n+00145a90: 3c2f 613e 2066 6f72 206d 6f72 6520 6465 for more de\n+00145aa0: 7461 696c 7320 6f6e 2068 6f77 2074 6f20 tails on how to \n+00145ab0: 7573 6520 7468 6573 6520 6675 6e63 7469 use these functi\n+00145ac0: 6f6e 732e 3c2f 703e 0a3c 703e f09f 949d ons.

    .

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

    .<\n+00145b00: 6831 3e3c 6120 636c 6173 733d 2261 6e63 h1>.Memory man\n+00145b30: 6167 656d 656e 743c 2f68 313e 0a3c 703e agement.

    \n+00145b40: 4d65 6d6f 7279 206d 616e 6167 656d 656e Memory managemen\n+00145b50: 7420 7769 7468 2067 534f 4150 2069 7320 t with gSOAP is \n+00145b60: 6175 746f 6d61 7469 632e 2054 6865 2065 automatic. The e\n+00145b70: 6e67 696e 6520 636f 6e74 6578 7420 6d61 ngine context ma\n+00145b80: 6e61 6765 7320 616c 6c20 6d65 6d6f 7279 nages all memory\n+00145b90: 2061 6c6c 6f63 6174 6564 2074 6f20 7365 allocated to se\n+00145ba0: 7269 616c 697a 6520 6461 7461 2061 6e64 rialize data and\n+00145bb0: 2066 6f72 2074 656d 706f 7261 7279 2073 for temporary s\n+00145bc0: 746f 7261 6765 2e20 4465 7365 7269 616c torage. Deserial\n+00145bd0: 697a 6564 2064 6174 6120 6973 2061 6c6c ized data is all\n+00145be0: 6f63 6174 6564 2069 6e20 6d61 6e61 6765 ocated in manage\n+00145bf0: 6420 6d65 6d6f 7279 2061 6e64 2064 6174 d memory and dat\n+00145c00: 6120 7374 7275 6374 7572 6573 2063 616e a structures can\n+00145c10: 2062 6520 616c 6c6f 6361 7465 6420 696e be allocated in\n+00145c20: 206d 616e 6167 6564 206d 656d 6f72 7920 managed memory \n+00145c30: 6279 2074 6865 2075 7365 7220 7768 656e by the user when\n+00145c40: 2064 6573 6972 6564 2075 7369 6e67 203c desired using <\n+00145c50: 636f 6465 3e73 6f61 705f 6e65 775f 543c code>soap_new_T<\n+00145c60: 2f63 6f64 653e 2066 756e 6374 696f 6e73 /code> functions\n+00145c70: 2067 656e 6572 6174 6564 2062 7920 736f generated by so\n+00145c80: 6170 6370 7032 2066 6f72 2065 6163 6820 apcpp2 for each \n+00145c90: 7365 7269 616c 697a 6162 6c65 2074 7970 serializable typ\n+00145ca0: 6520 3c63 6f64 653e 543c 2f63 6f64 653e e T\n+00145cb0: 2e20 416c 6c20 6d65 6d6f 7279 206d 616e . All memory man\n+00145cc0: 6167 6564 2062 7920 6120 636f 6e74 6578 aged by a contex\n+00145cd0: 7420 6973 2064 6561 6c6c 6f63 6174 6564 t is deallocated\n+00145ce0: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soap_\n+00145da0: 6465 7374 726f 793c 2f61 3e3c 2f63 6f64 destroy to destroy ma\n+00145dc0: 6e61 6765 6420 432b 2b20 6f62 6a65 6374 naged C++ object\n+00145dd0: 7320 616e 6420 3c63 6f64 653e 3c61 2063 s and \n+00145ea0: 736f 6170 5f65 6e64 3c2f 613e 3c2f 636f soap_end to delete al\n+00145ec0: 6c20 6f74 6865 7220 6d61 6e61 6765 6420 l other managed \n+00145ed0: 6461 7461 2e20 5768 656e 2061 2063 6f6e data. When a con\n+00145ee0: 7465 7874 2069 7320 6669 6e61 6c69 7a65 text is finalize\n+00145ef0: 6420 6f72 2066 7265 6564 2077 6974 6820 d or freed with \n+00145f00: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n+00145fd0: 6f6e 6528 7374 7275 6374 2073 6f61 702a one(struct soap*\n+00145fe0: 293c 2f61 3e3c 2f63 6f64 653e 2061 6e64 ) and\n+00145ff0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_free\n+001460a0: 2873 7472 7563 7420 736f 6170 2a29 3c2f (struct soap*) then m\n+001460c0: 616e 6167 6564 206d 656d 6f72 7920 6973 anaged memory is\n+001460d0: 206e 6f74 2072 656c 6561 7365 642c 2073 not released, s\n+001460e0: 6f20 6974 2069 7320 696d 706f 7274 616e o it is importan\n+001460f0: 7420 746f 2063 616c 6c20 7468 6520 6465 t to call the de\n+00146100: 616c 6c6f 6361 7469 6f6e 2066 756e 6374 allocation funct\n+00146110: 696f 6e73 2066 6972 7374 2e20 5468 6973 ions first. This\n+00146120: 2077 6173 2064 6f6e 6520 746f 2061 6c6c was done to all\n+00146130: 6f77 206d 616e 6167 6564 2064 6174 6120 ow managed data \n+00146140: 746f 206f 7574 6c69 7665 2074 6865 2063 to outlive the c\n+00146150: 6f6e 7465 7874 2c20 7375 6368 2061 7320 ontext, such as \n+00146160: 6465 7365 7269 616c 697a 6564 206f 626a deserialized obj\n+00146170: 6563 7473 2c20 6275 7420 7468 6973 2069 ects, but this i\n+00146180: 7320 7261 7265 6c79 2069 6620 6576 6572 s rarely if ever\n+00146190: 2075 7365 6420 6265 6361 7573 6520 6465 used because de\n+001461a0: 6c65 7469 6e67 2074 6865 206f 7574 6c69 leting the outli\n+001461b0: 7665 6420 6461 7461 2065 7870 6c69 6369 ved data explici\n+001461c0: 746c 7920 6973 2070 726f 6e65 2074 6f20 tly is prone to \n+001461d0: 6d69 7374 616b 6573 2e3c 2f70 3e0a 3c70 mistakes.

    .If you want to \n+001461f0: 6c65 7420 6465 7365 7269 616c 697a 6564 let deserialized\n+00146200: 2064 6174 6120 6f75 746c 6976 6520 6120 data outlive a \n+00146210: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context that y\n+00146280: 6f75 2061 7265 2061 626f 7574 2074 6f20 ou are about to \n+00146290: 6672 6565 2c20 7468 656e 2079 6f75 2063 free, then you c\n+001462a0: 616e 2064 656c 6567 6174 6520 6d61 6e61 an delegate mana\n+001462b0: 6765 6d65 6e74 206f 6620 7468 6520 6461 gement of the da\n+001462c0: 7461 2074 6f20 616e 6f74 6865 7220 3c63 ta to another \n+00146320: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+00146330: 636f 6e74 6578 7420 7769 7468 203c 636f context with soap_dele\n+00146410: 6761 7465 5f64 656c 6574 696f 6e28 7374 gate_deletion(st\n+00146420: 7275 6374 2073 6f61 7020 2a73 6f61 705f ruct soap *soap_\n+00146430: 6672 6f6d 2c20 7374 7275 6374 2073 6f61 from, struct soa\n+00146440: 7020 2a73 6f61 705f 746f 293c 2f61 3e3c p *soap_to)<\n+00146450: 2f63 6f64 653e 2e20 5468 6973 206d 6f76 /code>. This mov\n+00146460: 6573 2061 6c6c 2064 6573 6572 6961 6c69 es all deseriali\n+00146470: 7a65 6420 616e 6420 7465 6d70 6f72 6172 zed and temporar\n+00146480: 7920 6461 7461 2074 6f20 7468 6520 6f74 y data to the ot\n+00146490: 6865 7220 3c63 6f64 653e 3c61 2063 6c61 her soap context soap_to, which will d\n+00146520: 656c 6574 6520 6974 7320 6461 7461 2061 elete its data a\n+00146530: 6e64 2061 6c6c 2074 6865 2064 656c 6567 nd all the deleg\n+00146540: 6174 6564 2064 6174 6120 6974 2069 7320 ated data it is \n+00146550: 7265 7370 6f6e 7369 626c 6520 666f 7220 responsible for \n+00146560: 7768 656e 2079 6f75 2063 616c 6c20 3c63 when you call soap_destroy<\n+00146630: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+00146640: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_en\n+00146710: 643c 2f61 3e3c 2f63 6f64 653e 2e20 5468 d. Th\n+00146720: 6973 2063 616e 2062 6520 7061 7274 6963 is can be partic\n+00146730: 756c 6172 6c79 2075 7365 6675 6c20 666f ularly useful fo\n+00146740: 7220 6d61 6b69 6e67 2063 6c69 656e 7420 r making client \n+00146750: 6361 6c6c 7320 696e 7369 6465 2061 2073 calls inside a s\n+00146760: 6572 7665 7220 6f70 6572 6174 696f 6e2c erver operation,\n+00146770: 2069 2e65 2e20 6120 6d69 7865 6420 7365 i.e. a mixed se\n+00146780: 7276 6572 2061 6e64 2063 6c69 656e 742e rver and client.\n+00146790: 2054 6865 2063 6c69 656e 7420 6361 6c6c The client call\n+001467a0: 2069 6e73 6964 6520 7468 6520 7365 7276 inside the serv\n+001467b0: 6572 206f 7065 7261 7469 6f6e 2072 6571 er operation req\n+001467c0: 7569 7265 7320 6120 6e65 7720 3c63 6f64 uires a new so\n+00146820: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n+00146830: 6e74 6578 742c 2065 2e67 2e20 636f 7069 ntext, e.g. copi\n+00146840: 6564 2066 726f 6d20 7468 6520 7365 7276 ed from the serv\n+00146850: 6572 2773 2077 6974 6820 3c63 6f64 653e er's with \n+00146860: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_\n+00146910: 636f 7079 3c2f 613e 3c2f 636f 6465 3e2e copy.\n+00146920: 2042 6566 6f72 6520 6465 7374 726f 7969 Before destroyi\n+00146930: 6e67 2074 6865 2063 6c69 656e 7420 636f ng the client co\n+00146940: 6e74 6578 7420 7769 7468 203c 636f 6465 ntext with soap_free, the data \n+00146a10: 6361 6e20 6265 2064 656c 6567 6174 6564 can be delegated\n+00146a20: 2074 6f20 7468 6520 7365 7276 6572 2773 to the server's\n+00146a30: 2063 6f6e 7465 7874 2077 6974 6820 3c63 context with soap_del\n+00146b10: 6567 6174 655f 6465 6c65 7469 6f6e 3c2f egate_deletion. See f\n+00146b30: 6f72 2065 7861 6d70 6c65 203c 656d 3e3c or example <\n+00146b40: 636f 6465 3e67 736f 6170 2f73 616d 706c code>gsoap/sampl\n+00146b50: 6573 2f6d 6173 6875 702f 6d61 7368 7570 es/mashup/mashup\n+00146b60: 7365 7276 6572 2e63 3c2f 636f 6465 3e3c server.c<\n+00146b70: 2f65 6d3e 2069 6e20 7468 6520 6753 4f41 /em> in the gSOA\n+00146b80: 5020 736f 7572 6365 2063 6f64 6520 7061 P source code pa\n+00146b90: 636b 6167 652e 3c2f 703e 0a3c 703e 5468 ckage.

    .

    Th\n+00146ba0: 6520 6675 6e63 7469 6f6e 7320 7265 6c61 e functions rela\n+00146bb0: 7465 6420 746f 206d 656d 6f72 7920 6d61 ted to memory ma\n+00146bc0: 6e61 6765 6d65 6e74 2062 7920 7468 6520 nagement by the \n+00146bd0: 636f 6e74 6578 7420 6172 653a 3c2f 703e context are:

    \n+00146be0: 0a3c 756c 3e0a 3c6c 693e 3c63 6f64 653e .
    .

    T\n+00148150: 6f20 6865 6c70 2075 6e64 6572 7374 616e o help understan\n+00148160: 6420 7468 6520 6469 6666 6572 656e 6365 d the difference\n+00148170: 7320 6265 7477 6565 6e20 6d61 6e61 6765 s between manage\n+00148180: 6420 6f62 6a65 6374 732c 206d 616e 6167 d objects, manag\n+00148190: 6564 2064 6174 612c 2061 6e64 206d 616e ed data, and man\n+001481a0: 6167 6564 2074 656d 706f 7261 7279 2064 aged temporary d\n+001481b0: 6174 613a 2074 656d 706f 7261 7279 2064 ata: temporary d\n+001481c0: 6174 6120 6973 2063 7265 6174 6564 2062 ata is created b\n+001481d0: 7920 7468 6520 656e 6769 6e65 2074 6f20 y the engine to \n+001481e0: 6b65 6570 2074 7261 636b 206f 6620 7468 keep track of th\n+001481f0: 696e 6773 2c20 7375 6368 2061 7320 6861 ings, such as ha\n+00148200: 7368 2074 6162 6c65 7320 746f 206b 6565 sh tables to kee\n+00148210: 7020 706f 696e 7465 7220 7265 6665 7265 p pointer refere\n+00148220: 6e63 6520 696e 666f 726d 6174 696f 6e20 nce information \n+00148230: 666f 7220 7365 7269 616c 697a 6174 696f for serializatio\n+00148240: 6e20 616e 6420 6861 7368 2074 6162 6c65 n and hash table\n+00148250: 7320 746f 206b 6565 7020 584d 4c20 6964 s to keep XML id\n+00148260: 2f68 7265 6620 696e 666f 726d 6174 696f /href informatio\n+00148270: 6e20 666f 7220 6d75 6c74 692d 7265 6665 n for multi-refe\n+00148280: 7265 6e63 6520 6f62 6a65 6374 2064 6573 rence object des\n+00148290: 6572 6961 6c69 7a61 7469 6f6e 2e20 4465 erialization. De\n+001482a0: 7365 7269 616c 697a 6564 2064 6174 6120 serialized data \n+001482b0: 6973 2061 6c6c 6f63 6174 6564 2062 7920 is allocated by \n+001482c0: 7468 6520 636f 6e74 6578 7420 696e 206d the context in m\n+001482d0: 616e 6167 6564 206d 656d 6f72 7920 7768 anaged memory wh\n+001482e0: 656e 2063 6f6e 7374 7275 6374 696e 6720 en constructing \n+001482f0: 6461 7461 2073 7472 7563 7475 7265 7320 data structures \n+00148300: 6279 2064 6573 6572 6961 6c69 7a69 6e67 by deserializing\n+00148310: 2058 4d4c 2061 6e64 204a 534f 4e20 6d65 XML and JSON me\n+00148320: 7373 6167 6573 2e20 4461 7461 2069 7320 ssages. Data is \n+00148330: 7374 6f72 6564 2069 6e20 6d65 6d6f 7279 stored in memory\n+00148340: 206d 616e 6167 6564 2062 7920 7468 6520 managed by the \n+00148350: 636f 6e74 6578 7420 7573 696e 6720 6361 context using ca\n+00148360: 6c6c 7320 746f 203c 636f 6465 3e3c 6120 lls to s\n+00148410: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 3c2f oap_malloc to allocat\n+00148430: 6520 6865 6170 2073 7061 6365 2077 6974 e heap space wit\n+00148440: 6820 3c63 6f64 653e 6d61 6c6c 6f63 3c2f h malloc. A tiny bi\n+00148460: 7420 6d6f 7265 2073 7061 6365 2069 7320 t more space is \n+00148470: 616c 6c6f 6361 7465 6420 746f 206b 6565 allocated to kee\n+00148480: 7020 7472 6163 6b20 6f66 2074 6865 2061 p track of the a\n+00148490: 6c6c 6f63 6174 696f 6e73 2061 6e64 2074 llocations and t\n+001484a0: 6f20 6164 6420 6120 2263 616e 6172 7922 o add a \"canary\"\n+001484b0: 2077 6f72 6420 746f 2064 6574 6563 7420 word to detect \n+001484c0: 6865 6170 206d 656d 6f72 7920 6f76 6572 heap memory over\n+001484d0: 666c 6f77 732e 2048 6561 7020 6d65 6d6f flows. Heap memo\n+001484e0: 7279 206f 7665 7266 6c6f 7773 2061 7265 ry overflows are\n+001484f0: 2064 6574 6563 7465 6420 7768 656e 2063 detected when c\n+00148500: 6f6e 7465 7874 2d6d 616e 6167 6564 2064 ontext-managed d\n+00148510: 6174 6120 6973 2064 6561 6c6c 6f63 6174 ata is deallocat\n+00148520: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with soap_end. C++ objec\n+00148610: 7473 2061 7265 2061 6c6c 6f63 6174 6564 ts are allocated\n+00148620: 2077 6974 6820 3c63 6f64 653e 6e65 773c with new<\n+00148630: 2f63 6f64 653e 2069 6e73 7465 6164 206f /code> instead o\n+00148640: 6620 3c63 6f64 653e 6d61 6c6c 6f63 3c2f f malloc and are tr\n+00148660: 6163 6b65 6420 6173 2077 656c 6c2e 2054 acked as well. T\n+00148670: 6865 7365 206f 626a 6563 7473 2061 7265 hese objects are\n+00148680: 2064 6561 6c6c 6f63 6174 6564 2077 6974 deallocated wit\n+00148690: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap_dest\n+00148750: 726f 793c 2f61 3e3c 2f63 6f64 653e 2e3c roy.<\n+00148760: 2f70 3e0a 3c70 3e57 6865 6e20 7468 6520 /p>.

    When the \n+00148770: 6753 4f41 5020 6170 706c 6963 6174 696f gSOAP applicatio\n+00148780: 6e20 6973 2063 6f6d 7069 6c65 6420 7769 n is compiled wi\n+00148790: 7468 203c 623e 3c63 6f64 653e 2d44 4445 th -DDE\n+001487a0: 4255 473c 2f63 6f64 653e 3c2f 623e 2075 BUG u\n+001487b0: 7369 6e67 2074 6865 2063 6f6d 7069 6c65 sing the compile\n+001487c0: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #DEBUG, \n+001487e0: 7468 6520 656e 6769 6e65 2072 6570 6f72 the engine repor\n+001487f0: 7473 206d 656d 6f72 7920 6c65 616b 7320 ts memory leaks \n+00148800: 7768 6963 6820 6172 6520 6465 7465 6374 which are detect\n+00148810: 6564 2062 7920 3c63 6f64 653e 3c61 2063 ed by \n+001488e0: 736f 6170 5f64 6f6e 653c 2f61 3e3c 2f63 soap_done and <\n+00148900: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00148910: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00148920: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00148930: 3537 3130 3863 6134 3638 3131 3836 6535 57108ca4681186e5\n+00148940: 3862 3562 3138 3963 3335 3238 6631 3061 8b5b189c3528f10a\n+00148950: 2220 7469 746c 653d 2246 696e 616c 697a \" title=\"Finaliz\n+00148960: 6520 616e 6420 6672 6565 2074 6865 2067 e and free the g\n+00148970: 6976 656e 2073 6f61 7020 636f 6e74 6578 iven soap contex\n+00148980: 7420 6672 6f6d 2075 6e6d 616e 6167 6564 t from unmanaged\n+00148990: 2068 6561 7020 6d65 6d6f 7279 2e22 3e73 heap memory.\">s\n+001489a0: 6f61 705f 6672 6565 3c2f 613e 3c2f 636f oap_free. To improve \n+001489c0: 7468 6520 6163 6375 7261 6379 206f 6620 the accuracy of \n+001489d0: 6465 7465 6374 696f 6e2c 206e 6f20 6d65 detection, no me\n+001489e0: 6d6f 7279 2069 7320 6163 7475 616c 6c79 mory is actually\n+001489f0: 2066 7265 6564 2075 6e74 696c 203c 636f freed until soap_done\n+00148ad0: 3c2f 613e 3c2f 636f 6465 3e20 6f72 203c or <\n+00148ae0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_free are ca\n+00148ba0: 6c6c 6564 2074 6f20 6465 7465 6374 206d lled to detect m\n+00148bb0: 656d 6f72 7920 6973 7375 6573 2c20 736f emory issues, so\n+00148bc0: 2061 6e79 2063 616c 6c73 2074 6f20 3c63 any calls to soap_destroy<\n+00148c90: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+00148ca0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_en\n+00148d70: 643c 2f61 3e3c 2f63 6f64 653e 2061 7265 d are\n+00148d80: 2061 6374 7561 6c6c 7920 6465 6665 7272 actually deferr\n+00148d90: 6564 2074 6f20 6265 2065 7865 6375 7465 ed to be execute\n+00148da0: 6420 7768 656e 2074 6865 2063 6f6e 7465 d when the conte\n+00148db0: 7874 2066 696e 616c 697a 6573 2e3c 2f70 xt finalizes..

    While memor\n+00148dd0: 7920 6d61 6e61 6765 6d65 6e74 2069 6e20 y management in \n+00148de0: 6753 4f41 5020 6973 2061 7574 6f6d 6174 gSOAP is automat\n+00148df0: 6963 2c20 6974 2064 6f65 7320 6e6f 7420 ic, it does not \n+00148e00: 656e 666f 7263 6520 6974 7320 6f77 6e20 enforce its own \n+00148e10: 6d65 6d6f 7279 206d 616e 6167 656d 656e memory managemen\n+00148e20: 7420 706f 6c69 6379 206f 6e20 7468 6520 t policy on the \n+00148e30: 7573 6572 2e20 546f 206d 6f76 6520 6d61 user. To move ma\n+00148e40: 6e61 6765 6420 6f62 6a65 6374 7320 616e naged objects an\n+00148e50: 6420 6461 7461 2069 6e74 6f20 756e 6d61 d data into unma\n+00148e60: 6e61 6765 6420 6865 6170 2073 7061 6365 naged heap space\n+00148e70: 2c20 7468 6520 3c63 6f64 653e 736f 6170 , the soap\n+00148e80: 5f64 7570 5f54 3c2f 636f 6465 3e20 6465 _dup_T de\n+00148e90: 6570 2063 6f70 7920 6675 6e63 7469 6f6e ep copy function\n+00148ea0: 7320 6765 6e65 7261 7465 6420 6279 203c s generated by <\n+00148eb0: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2\n+00148ec0: 202d 4563 3c2f 636f 6465 3e3c 2f62 3e20 -Ec \n+00148ed0: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+00148ee0: 2d45 633c 2f63 6f64 653e 3c2f 623e 2063 -Ec c\n+00148ef0: 616e 2062 6520 7573 6564 2e20 546f 2064 an be used. To d\n+00148f00: 656c 6574 6520 6465 6570 2063 6f70 6965 elete deep copie\n+00148f10: 732c 2074 6865 203c 636f 6465 3e73 6f61 s, the soa\n+00148f20: 705f 6465 6c5f 543c 2f63 6f64 653e 2064 p_del_T d\n+00148f30: 6565 7020 6465 6c65 7469 6f6e 2066 756e eep deletion fun\n+00148f40: 6374 696f 6e73 2067 656e 6572 6174 6564 ctions generated\n+00148f50: 2062 7920 3c62 3e3c 636f 6465 3e73 6f61 by soa\n+00148f60: 7063 7070 3220 2d45 643c 2f63 6f64 653e pcpp2 -Ed\n+00148f70: 3c2f 623e 206f 7074 696f 6e20 3c62 3e3c option <\n+00148f80: 636f 6465 3e2d 4564 3c2f 636f 6465 3e3c code>-Ed<\n+00148f90: 2f62 3e20 6361 6e20 6265 2075 7365 642e /b> can be used.\n+00148fa0: 2041 6674 6572 2063 6f70 7969 6e67 2074 After copying t\n+00148fb0: 6865 2075 7375 616c 203c 636f 6465 3e3c he usual <\n+00148fc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00148fd0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00148fe0: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00148ff0: 6637 6430 3137 3631 3631 6539 6465 6633 f7d0176161e9def3\n+00149000: 3639 3831 6532 3466 6161 3139 3133 6439 6981e24faa1913d9\n+00149010: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n+00149020: 616c 6c20 6479 6e61 6d69 6361 6c6c 792d all dynamically-\n+00149030: 616c 6c6f 6361 7465 6420 432b 2b20 6f62 allocated C++ ob\n+00149040: 6a65 6374 7320 6d61 6e61 6765 6420 6279 jects managed by\n+00149050: 2074 6865 2073 7065 6369 6669 6564 2073 the specified s\n+00149060: 6f61 7020 636f 6e74 6578 742e 223e 736f oap context.\">so\n+00149070: 6170 5f64 6573 7472 6f79 3c2f 613e 3c2f ap_destroy and \n+00149090: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end\n+00149160: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n+00149170: 7320 7265 6d6f 7665 2074 6865 206d 616e s remove the man\n+00149180: 6167 6564 206f 7269 6769 6e61 6c73 2e20 aged originals. \n+00149190: 5365 6520 616c 736f 2053 6563 7469 6f6e See also Section\n+001491a0: 203c 6120 636c 6173 733d 2265 6c22 2068 Generating\n+001491d0: 2064 6565 7020 636f 7079 2061 6e64 2064 deep copy and d\n+001491e0: 656c 6574 696f 6e20 6675 6e63 7469 6f6e eletion function\n+001491f0: 733c 2f61 3e2e 3c2f 703e 0a3c 703e 4675 s.

    .

    Fu\n+00149200: 7274 6865 726d 6f72 652c 2074 6865 206d rthermore, the m\n+00149210: 656d 6f72 7920 616c 6c6f 6361 7469 6f6e emory allocation\n+00149220: 2066 756e 6374 696f 6e73 203c 636f 6465 functions malloc a\n+00149240: 6e64 203c 636f 6465 3e6e 6577 3c2f 636f nd new used by the \n+00149260: 656e 6769 6e65 2069 6e74 6572 6e61 6c6c engine internall\n+00149270: 7920 6361 6e20 6265 2072 6570 6c61 6365 y can be replace\n+00149280: 6420 7769 7468 206f 7468 6572 2061 6c6c d with other all\n+00149290: 6f63 6174 6f72 7320 6279 2064 6566 696e ocators by defin\n+001492a0: 696e 6720 3c63 6f64 653e 534f 4150 5f4d ing SOAP_M\n+001492b0: 414c 4c4f 433c 2f63 6f64 653e 2061 6e64 ALLOC and\n+001492c0: 203c 636f 6465 3e53 4f41 505f 4652 4545 SOAP_FREE\n+001492d0: 3c2f 636f 6465 3e20 746f 2072 6570 6c61 to repla\n+001492e0: 6365 203c 636f 6465 3e6d 616c 6c6f 633c ce malloc<\n+001492f0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and free, an\n+00149310: 6420 6465 6669 6e65 203c 636f 6465 3e53 d define S\n+00149320: 4f41 505f 4e45 573c 2f63 6f64 653e 2c20 OAP_NEW, \n+00149330: 3c63 6f64 653e 534f 4150 5f4e 4557 5f41 SOAP_NEW_A\n+00149340: 5252 4159 3c2f 636f 6465 3e2c 203c 636f RRAY, SOAP_PLACEMEN\n+00149360: 545f 4e45 573c 2f63 6f64 653e 2c20 616e T_NEW, an\n+00149370: 6420 3c63 6f64 653e 534f 4150 5f44 454c d SOAP_DEL\n+00149380: 4554 453c 2f63 6f64 653e 2c20 3c63 6f64 ETE, SOAP_DELETE_AR\n+001493a0: 5241 593c 2f63 6f64 653e 2074 6f20 7265 RAY to re\n+001493b0: 706c 6163 6520 3c63 6f64 653e 6e65 773c place new<\n+001493c0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and delete u\n+001493e0: 7365 6420 6279 2074 6865 2065 6e67 696e sed by the engin\n+001493f0: 6520 746f 2061 6c6c 6f63 6174 6520 6d61 e to allocate ma\n+00149400: 6e61 6765 6420 6d65 6d6f 7279 2e20 4f6e naged memory. On\n+00149410: 6520 6361 6e20 666f 7220 6578 616d 706c e can for exampl\n+00149420: 6520 7573 6520 6120 6761 7262 6167 6520 e use a garbage \n+00149430: 636f 6c6c 6563 746f 7220 7769 7468 2067 collector with g\n+00149440: 534f 4150 2062 7920 6465 6669 6e69 6e67 SOAP by defining\n+00149450: 2073 7569 7461 626c 6520 7265 706c 6163 suitable replac\n+00149460: 656d 656e 7473 2e3c 2f70 3e0a 3c70 3e4d ements.

    .

    M\n+00149470: 6f72 6520 696e 666f 726d 6174 696f 6e20 ore information \n+00149480: 6f6e 206d 656d 6f72 7920 6d61 6e61 6765 on memory manage\n+00149490: 6d65 6e74 2063 616e 2062 6520 666f 756e ment can be foun\n+001494a0: 6420 696e 2074 6865 203c 6120 6872 6566 d in the C and C++ X\n+001494e0: 4d4c 2044 6174 6120 4269 6e64 696e 6773 ML Data Bindings\n+001494f0: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n+00149500: 6f6e 2074 6861 7420 6861 7320 7365 7061 on that has sepa\n+00149510: 7261 7465 2073 6563 7469 6f6e 7320 6f6e rate sections on\n+00149520: 206d 656d 6f72 7920 6d61 6e61 6765 6d65 memory manageme\n+00149530: 6e74 2069 6e20 4320 616e 6420 696e 2043 nt in C and in C\n+00149540: 2b2b 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ++.

    .

    .... \n+00149550: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+00149560: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+00149570: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..Intra-\n+001495b0: 636c 6173 7320 6d65 6d6f 7279 206d 616e class memory man\n+001495c0: 6167 656d 656e 743c 2f68 313e 0a3c 703e agement.

    \n+001495d0: 5768 656e 2061 2063 6c61 7373 203c 636f When a class T has \n+001495f0: 6120 3c63 6f64 653e 7374 7275 6374 2073 a struct s\n+00149600: 6f61 7020 2a20 543a 3a73 6f61 703c 2f63 oap * T::soap member decl\n+00149620: 6172 6564 2069 6e20 616e 2069 6e74 6572 ared in an inter\n+00149630: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n+00149640: 2066 6f72 2073 6f61 7063 7070 322c 2074 for soapcpp2, t\n+00149650: 6865 6e20 7468 6973 206d 656d 6265 7220 hen this member \n+00149660: 7769 6c6c 2062 6520 7365 7420 746f 2070 will be set to p\n+00149670: 6f69 6e74 2074 6f20 7468 6520 6375 7272 oint to the curr\n+00149680: 656e 7420 636f 6e74 6578 7420 6279 2074 ent context by t\n+00149690: 6865 2064 6573 6572 6961 6c69 7a65 7273 he deserializers\n+001496a0: 2061 6e64 2062 7920 7468 6520 3c63 6f64 and by the soap_default method of \n+001496d0: 7468 6520 636c 6173 7320 616e 6420 6279 the class and by\n+001496e0: 2074 6865 203c 636f 6465 3e73 6f61 705f the soap_\n+001496f0: 6465 6661 756c 745f 543c 2f63 6f64 653e default_T\n+00149700: 2061 6e64 203c 636f 6465 3e73 6f61 705f and soap_\n+00149710: 6e65 775f 543c 2f63 6f64 653e 2066 756e new_T fun\n+00149720: 6374 696f 6e73 2066 6f72 2074 6869 7320 ctions for this \n+00149730: 636c 6173 7320 6e61 6d65 6420 3c63 6f64 class named T. This\n+00149750: 2073 696d 706c 6966 6965 7320 6d65 6d6f simplifies memo\n+00149760: 7279 206d 616e 6167 656d 656e 7420 6279 ry management by\n+00149770: 2063 6c61 7373 206d 6574 686f 6473 2074 class methods t\n+00149780: 6861 7420 616c 6c6f 6361 7465 2064 6174 hat allocate dat\n+00149790: 6120 6173 736f 6369 6174 6564 2077 6974 a associated wit\n+001497a0: 6820 7468 6520 636c 6173 7320 696e 7374 h the class inst\n+001497b0: 616e 6365 2074 6861 7420 6d75 7374 2062 ance that must b\n+001497c0: 6520 6d61 6e61 6765 6420 6279 2074 6865 e managed by the\n+001497d0: 2063 6f6e 7465 7874 2e3c 2f70 3e0a 3c70 context.

    .Consider for ex\n+001497f0: 616d 706c 6520 7468 6520 666f 6c6c 6f77 ample the follow\n+00149800: 696e 6720 636c 6173 7320 6465 636c 6172 ing class declar\n+00149810: 6174 696f 6e3a 3c2f 703e 0a3c 6469 7620 ation:

    .
    class <\n+00149860: 2f73 7061 6e3e 436c 6173 7320 3c2f 6469 /span>Class .
    { pub\n+001498a0: 6c69 633c 2f73 7061 6e3e 3a3c 2f64 6976 lic:.
    Class();\n+001498d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ~Cl\n+001498f0: 6173 7328 293b 3c2f 6469 763e 0a3c 6469 ass();
    . \n+00149910: 2020 203c 7370 616e 2063 6c61 7373 3d22 struct \n+00149930: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+00149960: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *soap;
    \n+001499c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char *na\n+00149a00: 6d65 3b20 3c2f 6469 763e 0a3c 6469 7620 me;
    .
    \n+00149a20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+00149a40: 2f73 7061 6e3e 2073 6574 4e61 6d65 283c /span> setName(<\n+00149a50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00149a60: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+00149a90: 3c2f 7370 616e 3e20 2a73 293b 203c 2f64 *s); .
    char \n+00149ae0: 2a67 6574 4e61 6d65 2829 3b3c 2f64 6976 *getName();.
    };
    .

    Since the\n+00149b30: 203c 636f 6465 3e6e 616d 653c 2f63 6f64 name member is a c\n+00149b50: 6861 7261 6374 6572 2070 6f69 6e74 6572 haracter pointer\n+00149b60: 2074 6f20 6120 7374 7269 6e67 2c20 7768 to a string, wh\n+00149b70: 6572 6520 7368 6f75 6c64 2077 6520 616c ere should we al\n+00149b80: 6c6f 6361 7465 2074 6869 7320 7374 7269 locate this stri\n+00149b90: 6e67 3f20 496e 206d 6f73 7420 6361 7365 ng? In most case\n+00149ba0: 7320 7765 2077 696c 6c20 6164 6420 6120 s we will add a \n+00149bb0: 636f 6e73 7472 7563 746f 7220 7468 6174 constructor that\n+00149bc0: 2069 6e69 7469 616c 6c79 2073 6574 7320 initially sets \n+00149bd0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name to NULL and a \n+00149bf0: 6465 7374 7275 6374 6f72 2074 6861 7420 destructor that \n+00149c00: 6465 6c65 7465 7320 3c63 6f64 653e 6e61 deletes na\n+00149c10: 6d65 3c2f 636f 6465 3e20 7768 656e 206e me when n\n+00149c20: 6f6e 2d4e 554c 4c2c 206c 696b 6520 736f on-NULL, like so\n+00149c30: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    Cl\n+00149c60: 6173 733a 3a43 6c61 7373 2829 203c 2f64 ass::Class() .
    {
    .\n+00149ca0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap = NULL;
    .\n+00149ce0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    name = NULL;\n+00149d00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    Class::~Clas\n+00149d40: 7328 2920 3c2f 6469 763e 0a3c 6469 7620 s()
    .
    {.
    if (na\n+00149da0: 6d65 293c 2f64 6976 3e0a 3c64 6976 2063 me)
    .
    \n+00149dc0: 6672 6565 286e 616d 6529 3b3c 2f64 6976 free(name);.
    }
    .

    However, w\n+00149e10: 6865 6e20 696e 7374 616e 6365 7320 6f66 hen instances of\n+00149e20: 203c 636f 6465 3e43 6c61 7373 3c2f 636f Class are deserial\n+00149e40: 697a 6564 2077 6520 6861 7665 2061 2070 ized we have a p\n+00149e50: 726f 626c 656d 2077 6974 6820 7468 6973 roblem with this\n+00149e60: 2061 7070 726f 6163 6820 6265 6361 7573 approach becaus\n+00149e70: 6520 3c63 6f64 653e 6672 6565 286e 616d e free(nam\n+00149e80: 6529 3c2f 636f 6465 3e20 6465 6c65 7465 e) delete\n+00149e90: 7320 6120 6d61 6e61 6765 6420 7374 7269 s a managed stri\n+00149ea0: 6e67 2c20 7768 6963 6820 6973 206d 616e ng, which is man\n+00149eb0: 6167 6564 2062 7920 7468 6520 636f 6e74 aged by the cont\n+00149ec0: 6578 742e 2042 6563 6175 7365 2074 6865 ext. Because the\n+00149ed0: 2064 6573 6572 6961 6c69 7a65 7220 616c deserializer al\n+00149ee0: 736f 2073 6574 7320 7468 6520 3c63 6f64 so sets the soap me\n+00149f00: 6d62 6572 206f 6620 7468 6973 2063 6c61 mber of this cla\n+00149f10: 7373 2c20 7468 6572 6520 6973 2061 6e20 ss, there is an \n+00149f20: 6561 7379 2073 6f6c 7574 696f 6e20 746f easy solution to\n+00149f30: 2074 6869 7320 7072 6f62 6c65 6d3a 3c2f this problem:.

    . \n+0014a030: 2020 2066 7265 6528 6e61 6d65 293b 3c2f free(name);.
    }
    .<\n+0014a060: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This on\n+0014a080: 6c79 2066 7265 6573 203c 636f 6465 3e6e ly frees n\n+0014a090: 616d 653c 2f63 6f64 653e 2069 6620 7468 ame if th\n+0014a0a0: 6520 3c63 6f64 653e 736f 6170 3c2f 636f e soap context poin\n+0014a0c0: 7465 7220 6d65 6d62 6572 2069 7320 4e55 ter member is NU\n+0014a0d0: 4c4c 2c20 6d65 616e 696e 6720 7468 6174 LL, meaning that\n+0014a0e0: 2061 206d 616e 6167 6564 2073 7472 696e a managed strin\n+0014a0f0: 6720 3c63 6f64 653e 6e61 6d65 3c2f 636f g name will be dele\n+0014a110: 7465 6420 6173 2075 7375 616c 2077 6974 ted as usual wit\n+0014a120: 6820 7468 6520 6465 7365 7269 616c 697a h the deserializ\n+0014a130: 6564 2063 6c61 7373 2075 7369 6e67 203c ed class using <\n+0014a140: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_destroy\n+0014a200: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+0014a210: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_e\n+0014a2e0: 6e64 3c2f 613e 3c2f 636f 6465 3e2e 3c2f nd..

    The other \n+0014a300: 6d65 7468 6f64 7320 6172 6520 616c 736f methods are also\n+0014a310: 206d 6164 6520 636f 676e 697a 616e 7420 made cognizant \n+0014a320: 6f66 2074 6865 2070 7265 7365 6e63 6520 of the presence \n+0014a330: 6f66 2061 2063 6f6e 7465 7874 3a3c 2f70 of a context:.

    void \n+0014a390: 436c 6173 733a 3a73 6574 4e61 6d65 283c Class::setName(<\n+0014a3a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0014a3b0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+0014a3e0: 3c2f 7370 616e 3e20 2a73 293c 2f64 6976 *s).
    {
    . \n+0014a420: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap\n+0014a470: 3c2f 613e 293c 2f64 6976 3e0a 3c64 6976 )
    . \n+0014a490: 2020 6e61 6d65 203d 203c 6120 636c 6173 name = so\n+0014a4f0: 6170 5f73 7472 6475 703c 2f61 3e28 3c61 ap_strdup(soap, s\n+0014a530: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    else
    .
    n\n+0014a590: 616d 6520 3d20 7374 7264 7570 2873 293b ame = strdup(s);\n+0014a5a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n+0014a5c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n+0014a610: 6368 6172 3c2f 7370 616e 3e20 2a67 6574 char *get\n+0014a620: 4e61 6d65 2829 3c2f 6469 763e 0a3c 6469 Name()
    .{\n+0014a640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return name;
    .<\n+0014a690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0014a6a0: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
    .
    <\n+0014a6b0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0014a6c0: 3c70 3e41 6e6f 7468 6572 2061 7070 726f

    Another appro\n+0014a6d0: 6163 6820 6973 2074 6f20 7573 6520 3c63 ach is to use soap_unl\n+0014a7b0: 696e 6b3c 2f61 3e3c 2f63 6f64 653e 2074 ink t\n+0014a7c0: 6f20 756e 6c69 6e6b 2064 6174 6120 6d61 o unlink data ma\n+0014a7d0: 6e61 6765 6420 6279 2074 6865 2063 6f6e naged by the con\n+0014a7e0: 7465 7874 2061 6e64 206d 616b 6520 616c text and make al\n+0014a7f0: 6c20 616c 6c6f 6361 7469 6f6e 7320 6578 l allocations ex\n+0014a800: 706c 6963 6974 6c79 3a3c 2f70 3e0a 3c64 plicitly:

    .
    Class::~Cl\n+0014a840: 6173 7328 2920 3c2f 6469 763e 0a3c 6469 ass()
    .{\n+0014a860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+0014a8a0: 6e61 6d65 293c 2f64 6976 3e0a 3c64 6976 name)
    . \n+0014a8c0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..
    }.
    \n+0014aa50: 766f 6964 3c2f 7370 616e 3e20 436c 6173 void Clas\n+0014aa60: 733a 3a73 6574 4e61 6d65 283c 7370 616e s::setName(const char *s)
    .\n+0014aad0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    name\n+0014aaf0: 203d 2073 7472 6475 7028 7329 3b3c 2f64 = strdup(s);.
    }
    .\n+0014ab30: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+0014ab70: 723c 2f73 7061 6e3e 202a 6765 744e 616d r *getNam\n+0014ab80: 6528 293c 2f64 6976 3e0a 3c64 6976 2063 e()
    .
    {.
    return \n+0014abe0: 6e61 6d65 3b3c 2f64 6976 3e0a 3c64 6976 name;
    .}<\n+0014ac00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Unli\n+0014ad30: 6e6b 2061 2062 6c6f 636b 206f 6620 6865 nk a block of he\n+0014ad40: 6170 206d 656d 6f72 7920 6d61 6e61 6765 ap memory manage\n+0014ad50: 6420 6279 2074 6865 2073 7065 6369 6669 d by the specifi\n+0014ad60: 6564 2073 6f61 7020 636f 6e74 6578 742c ed soap context,\n+0014ad70: 2074 6f20 7265 6c65 6173 6520 7468 6520 to release the \n+0014ad80: 6d65 6d6f 7279 2065 7870 6c69 6369 746c memory explicitl\n+0014ad90: 792e 2e2e 3c2f 6469 763e 3c2f 6469 763e y...
    \n+0014ada0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The <\n+0014adc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_un\n+0014ae90: 6c69 6e6b 3c2f 613e 3c2f 636f 6465 3e20 link \n+0014aea0: 6361 6c6c 2075 6e6c 696e 6b73 2064 6174 call unlinks dat\n+0014aeb0: 6120 616e 6420 6f62 6a65 6374 7320 6672 a and objects fr\n+0014aec0: 6f6d 206d 616e 6167 6564 206d 656d 6f72 om managed memor\n+0014aed0: 792e 2049 6e20 7468 6973 2077 6179 203c y. In this way <\n+0014aee0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_destroy\n+0014afa0: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+0014afb0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_e\n+0014b080: 6e64 3c2f 613e 3c2f 636f 6465 3e20 6361 nd ca\n+0014b090: 6e20 6265 2063 616c 6c65 6420 6c61 7465 n be called late\n+0014b0a0: 7220 6576 656e 2077 6865 6e20 7468 6973 r even when this\n+0014b0b0: 2063 6c61 7373 2077 6173 2064 6573 6572 class was deser\n+0014b0c0: 6961 6c69 7a65 642e 3c2f 703e 0a3c 703e ialized.

    .

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

    .Deb\n+0014b130: 7567 6769 6e67 3c2f 6831 3e0a 3c70 3e54 ugging

    .

    T\n+0014b140: 6f20 6163 7469 7661 7465 2064 6562 7567 o activate debug\n+0014b150: 6769 6e67 2061 6e64 206d 6573 7361 6765 ging and message\n+0014b160: 206c 6f67 6769 6e67 2063 6f6d 7069 6c65 logging compile\n+0014b170: 2074 6865 2073 6f75 7263 6520 636f 6465 the source code\n+0014b180: 2077 6974 6820 636f 6d70 696c 652d 7469 with compile-ti\n+0014b190: 6d65 2066 6c61 6720 3c63 6f64 653e 2344 me flag #D\n+0014b1a0: 4542 5547 3c2f 636f 6465 3e2e 204f 7220 EBUG. Or \n+0014b1b0: 7768 656e 2075 7369 6e67 203c 623e 3c63 when using -lgsoap or -lgsoap++ then rei\n+0014b200: 6e73 7461 6c6c 2067 534f 4150 2077 6974 nstall gSOAP wit\n+0014b210: 6820 3c62 3e3c 636f 6465 3e2e 2f63 6f6e h ./con\n+0014b220: 6669 6775 7265 202d 2d65 6e61 626c 652d figure --enable-\n+0014b230: 6465 6275 673c 2f63 6f64 653e 3c2f 623e debug\n+0014b240: 2061 6e64 203c 623e 3c63 6f64 653e 6d61 and ma\n+0014b250: 6b65 3c2f 636f 6465 3e3c 2f62 3e2e 3c2f ke..

    When your \n+0014b270: 6753 4f41 5020 636c 6965 6e74 206f 7220 gSOAP client or \n+0014b280: 7365 7276 6572 2061 7070 6c69 6361 7469 server applicati\n+0014b290: 6f6e 7320 7275 6e2c 2074 6865 7920 7769 ons run, they wi\n+0014b2a0: 6c6c 206c 6f67 2074 6865 6972 2061 6374 ll log their act\n+0014b2b0: 6976 6974 7920 696e 2074 6872 6565 2073 ivity in three s\n+0014b2c0: 6570 6172 6174 6520 6669 6c65 733a 3c2f eparate files:.

    <\n+00156d30: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00156d40: 3c70 3e42 7920 6465 636c 6172 696e 6720

    By declaring \n+00156d50: 7374 7275 6374 203c 636f 6465 3e74 6d3c struct tm<\n+00156d60: 2f63 6f64 653e 2076 6f6c 6174 696c 652c /code> volatile,\n+00156d70: 2073 6f61 7063 7070 3220 646f 6573 206e soapcpp2 does n\n+00156d80: 6f74 2072 6564 6566 696e 6520 6974 2069 ot redefine it i\n+00156d90: 6e20 7468 6520 6f75 7470 7574 2073 6f75 n the output sou\n+00156da0: 7263 6520 636f 6465 2e20 5468 6520 3c63 rce code. The #include <\n+00156dc0: 3b74 696d 652e 6826 6774 3b3c 2f63 6f64 ;time.h> is copied to \n+00156de0: 7468 6520 736f 7572 6365 2063 6f64 6520 the source code \n+00156df0: 6f75 7470 7574 2e20 5765 2063 616e 206e output. We can n\n+00156e00: 6f77 2073 6572 6961 6c69 7a65 2074 6865 ow serialize the\n+00156e10: 203c 636f 6465 3e74 6d3c 2f63 6f64 653e tm\n+00156e20: 2073 7472 7563 7475 7265 2e20 5468 6520 structure. The \n+00156e30: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl\n+00156e40: 6520 7365 7269 616c 697a 6573 2074 6865 e serializes the\n+00156e50: 206c 6f63 616c 2074 696d 6520 7374 6f72 local time stor\n+00156e60: 6564 2069 6e20 6120 3c63 6f64 653e 746d ed in a tm\n+00156e70: 3c2f 636f 6465 3e20 7374 7275 6374 7572 structur\n+00156e80: 6520 746f 2073 7464 6f75 743a 3c2f 703e e to stdout:

    \n+00156e90: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+00156ed0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+00156f40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .ti\n+00156fc0: 6d65 5f74 2054 203d 2074 696d 6528 4e55 me_t T = time(NU\n+00156fd0: 4c4c 293b 203c 2f64 6976 3e0a 3c64 6976 LL);
    .struct tm *t = localt\n+00157020: 696d 6528 2661 6d70 3b54 293b 203c 2f64 ime(&T); ..\n+00157090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n+00157140: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+00157200: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
    .\n+00157dc0: 3c70 3e57 6520 7573 6564 2074 6865 2074

    We used the t\n+00157dd0: 7970 6564 6566 206e 616d 6520 3c63 6f64 ypedef name time__struct_t\n+00157df0: 6d3c 2f63 6f64 653e 2072 6174 6865 7220 m rather \n+00157e00: 7468 616e 203c 636f 6465 3e74 696d 655f than time_\n+00157e10: 5f74 6d3c 2f63 6f64 653e 2c20 6265 6361 _tm, beca\n+00157e20: 7573 6520 6120 7363 6865 6d61 206e 616d use a schema nam\n+00157e30: 6520 636c 6173 6820 7769 6c6c 206f 6363 e clash will occ\n+00157e40: 7572 2066 6f72 2074 6865 2066 6972 7374 ur for the first\n+00157e50: 2065 7861 6d70 6c65 2061 626f 7665 2074 example above t\n+00157e60: 6861 7420 6861 7320 3c63 6f64 653e 746d hat has tm\n+00157e70: 3c2f 636f 6465 3e20 616c 7265 6164 7920 already \n+00157e80: 6465 636c 6172 6564 2061 7320 7365 7269 declared as seri\n+00157e90: 616c 697a 6162 6c65 2074 7970 6520 696e alizable type in\n+00157ea0: 2074 6865 2073 6368 656d 6120 6f66 2074 the schema of t\n+00157eb0: 6865 2067 656e 6572 6174 6564 2057 5344 he generated WSD\n+00157ec0: 4c2e 2054 6865 2073 6563 6f6e 6420 6578 L. The second ex\n+00157ed0: 616d 706c 6520 7769 7468 2074 6865 2063 ample with the c\n+00157ee0: 6f6c 6f6e 206e 6f74 6174 696f 6e20 6176 olon notation av\n+00157ef0: 6f69 6473 2074 6869 7320 616c 746f 6765 oids this altoge\n+00157f00: 7468 6572 2e3c 2f70 3e0a 3c70 3ef0 9f94 ther.

    .

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

    .\n+00157f40: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .How to de\n+00157f70: 636c 6172 6520 6375 7374 6f6d 2073 6572 clare custom ser\n+00157f80: 6961 6c69 7a65 7273 2061 6e64 2064 6573 ializers and des\n+00157f90: 6572 6961 6c69 7a65 7273 3c2f 6832 3e0a erializers

    .\n+00157fa0: 3c70 3e59 6f75 2063 616e 2069 6d70 6c65

    You can imple\n+00157fb0: 6d65 6e74 2079 6f75 7220 6f77 6e20 6375 ment your own cu\n+00157fc0: 7374 6f6d 2073 6572 6961 6c69 7a65 7273 stom serializers\n+00157fd0: 2066 6f72 2064 6174 6120 7479 7065 732e for data types.\n+00157fe0: 2041 2063 7573 746f 6d20 7365 7269 616c A custom serial\n+00157ff0: 697a 6572 2069 7320 6465 636c 6172 6564 izer is declared\n+00158000: 2069 6e20 616e 2069 6e74 6572 6661 6365 in an interface\n+00158010: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n+00158020: 2073 6f61 7063 7070 3220 7573 696e 6720 soapcpp2 using \n+00158030: 7468 6520 7061 6972 206f 6620 6b65 7977 the pair of keyw\n+00158040: 6f72 6473 203c 636f 6465 3e65 7874 6572 ords exter\n+00158050: 6e20 7479 7065 6465 663c 2f63 6f64 653e n typedef\n+00158060: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

    extern <\n+001580c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001580d0: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef ch\n+00158100: 6172 3c2f 7370 616e 3e20 2a4d 7944 6174 ar *MyDat\n+00158110: 613b 203c 2f64 6976 3e0a 3c64 6976 2063 a;
    .
    struct \n+00158150: 5361 6d70 6c65 203c 2f64 6976 3e0a 3c64 Sample
    .\n+00158170: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    My\n+00158190: 4461 7461 2073 3b20 3c73 7061 6e20 636c Data s; //\n+001581b0: 2075 7365 2063 7573 746f 6d20 7365 7269 use custom seri\n+001581c0: 616c 697a 6572 2066 6f72 2074 6869 7320 alizer for this \n+001581d0: 6d65 6d62 6572 203c 2f73 7061 6e3e 3c2f member .
    char\n+00158220: 202a 743b 2020 3c73 7061 6e20 636c 6173 *t; // u\n+00158240: 7365 2061 7574 6f2d 6765 6e65 7261 7465 se auto-generate\n+00158250: 6420 7365 7269 616c 697a 6572 3c2f 7370 d serializer
    .
    };.

    T\n+001582a0: 6865 6e20 7072 6f76 6964 6520 7468 6520 hen provide the \n+001582b0: 666f 6c6c 6f77 696e 6720 6675 6e63 7469 following functi\n+001582c0: 6f6e 7320 666f 7220 6561 6368 203c 636f ons for each extern typede\n+001582e0: 663c 2f63 6f64 653e 2064 6563 6c61 7265 f declare\n+001582f0: 7320 7479 7065 203c 636f 6465 3e54 3c2f s type T:

    .
    int\n+00158350: 3c2f 7370 616e 3e20 736f 6170 5f73 6572 soap_ser\n+00158360: 6961 6c69 7a65 5f54 283c 7370 616e 2063 ialize_T(s\n+00158380: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001583f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00158400: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const T *a);
    .<\n+00158420: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00158430: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n+00158450: 2f73 7061 6e3e 2073 6f61 705f 6465 6661 /span> soap_defa\n+00158460: 756c 745f 5428 3c73 7061 6e20 636c 6173 ult_T(stru\n+00158480: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, T *a\n+001584f0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    int \n+00158530: 736f 6170 5f6f 7574 5f54 283c 7370 616e soap_out_T(struct <\n+00158560: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00158570: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00158580: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00158590: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001585c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n+00158600: 6172 3c2f 7370 616e 3e20 2a74 6167 2c20 ar *tag, \n+00158610: 3c73 7061 6e20 636c 6173 733d 226b 6579 int i\n+00158650: 643c 2f73 7061 6e3e 2c20 3c73 7061 6e20 d, \n+00158670: 636f 6e73 743c 2f73 7061 6e3e 2054 202a const T *\n+00158680: 612c 203c 7370 616e 2063 6c61 7373 3d22 a, const \n+001586c0: 6368 6172 3c2f 7370 616e 3e20 2a74 7970 char *typ\n+001586d0: 6529 3b3c 2f64 6976 3e0a 3c64 6976 2063 e);
    .
    T *s\n+001586f0: 6f61 705f 696e 5f54 283c 7370 616e 2063 oap_in_T(s\n+00158710: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+00158780: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00158790: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001587c0: 3c2f 7370 616e 3e20 2a74 6167 2c20 5420 *tag, T \n+001587d0: 2a61 2c20 3c73 7061 6e20 636c 6173 733d *a, const<\n+001587f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty\n+00158820: 7065 293b 3c2f 6469 763e 0a3c 2f64 6976 pe);
    .

    Mo\n+0015a840: 7265 2069 6e66 6f72 6d61 7469 6f6e 206f re information o\n+0015a850: 6e20 6375 7374 6f6d 2073 6572 6961 6c69 n custom seriali\n+0015a860: 7a61 7469 6f6e 2069 7320 6176 6169 6c61 zation is availa\n+0015a870: 626c 6520 696e 2074 6865 2067 534f 4150 ble in the gSOAP\n+0015a880: 2073 6f75 7263 6520 636f 6465 2070 6163 source code pac\n+0015a890: 6b61 6765 2069 6e20 7468 6520 3c65 6d3e kage in the \n+0015a8a0: 3c63 6f64 653e 6773 6f61 702f 6375 7374 gsoap/cust\n+0015a8b0: 6f6d 3c2f 636f 6465 3e3c 2f65 6d3e 2064 om d\n+0015a8c0: 6972 6563 746f 7279 2c20 7768 6572 6520 irectory, where \n+0015a8d0: 796f 7520 6361 6e20 616c 736f 2066 696e you can also fin\n+0015a8e0: 6420 7365 7665 7261 6c20 6375 7374 6f6d d several custom\n+0015a8f0: 2073 6572 6961 6c69 7a65 7273 2074 6f20 serializers to \n+0015a900: 7573 6520 7769 7468 2079 6f75 7220 7072 use with your pr\n+0015a910: 6f6a 6563 7473 2e3c 2f70 3e0a 3c70 3ef0 ojects.

    .

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

    .Funct\n+0015a980: 696f 6e20 6361 6c6c 6261 636b 7320 666f ion callbacks fo\n+0015a990: 7220 6375 7374 6f6d 697a 6564 2049 2f4f r customized I/O\n+0015a9a0: 2061 6e64 2048 5454 5020 6861 6e64 6c69 and HTTP handli\n+0015a9b0: 6e67 3c2f 6832 3e0a 3c70 3e54 6865 2066 ng

    .

    The f\n+0015a9c0: 6f6c 6c6f 7769 6e67 206c 6973 7420 6f66 ollowing list of\n+0015a9d0: 2066 756e 6374 696f 6e73 2063 616e 2062 functions can b\n+0015a9e0: 6520 7573 6564 2066 6f72 2063 7573 746f e used for custo\n+0015a9f0: 6d69 7a65 6420 4854 5450 2068 616e 646c mized HTTP handl\n+0015aa00: 696e 6720 616e 6420 492f 4f2e 3c2f 703e ing and I/O.

    \n+0015aa10: 0a3c 703e 5365 6520 616c 736f 2041 5049 .

    See also API\n+0015aa20: 2064 6f63 756d 656e 7461 7469 6f6e 204d documentation M\n+0015aa30: 6f64 756c 6520 3c61 2063 6c61 7373 3d22 odule Callback\n+0015aa70: 2066 756e 6374 696f 6e73 3c2f 613e 2e3c functions.<\n+0015aa80: 2f70 3e0a 3c70 3e54 6f20 7265 7365 7420 /p>.

    To reset \n+0015aa90: 7468 6520 6361 6c6c 6261 636b 2066 756e the callback fun\n+0015aaa0: 6374 696f 6e73 2074 6f20 7468 6520 696e ctions to the in\n+0015aab0: 7465 726e 616c 2066 756e 6374 696f 6e73 ternal functions\n+0015aac0: 206f 6620 7468 6520 656e 6769 6e65 2c20 of the engine, \n+0015aad0: 7573 6520 3c63 6f64 653e 3c61 2063 6c61 use so\n+0015aba0: 6170 5f64 6f6e 653c 2f61 3e3c 2f63 6f64 ap_done followed by <\n+0015abc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_\n+0015ac50: 696e 6974 3c2f 613e 3c2f 636f 6465 3e2e init.\n+0015ac60: 2054 6869 7320 7265 2d69 6e69 7469 616c This re-initial\n+0015ac70: 697a 6573 2074 6865 203c 636f 6465 3e3c izes the <\n+0015ac80: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015ac90: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0015aca0: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n+0015acb0: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n+0015acc0: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n+0015acd0: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n+0015ace0: 7874 2c20 7265 6d6f 7665 7320 616c 6c20 xt, removes all \n+0015acf0: 706c 7567 696e 732c 2061 6e64 2072 6573 plugins, and res\n+0015ad00: 6574 7320 6675 6e63 7469 6f6e 2063 616c ets function cal\n+0015ad10: 6c62 6163 6b73 2e3c 2f70 3e0a 3c68 333e lbacks.

    .

    \n+0015ad20: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fpost.

    int\n+0015ad60: 2028 3c61 2063 6c61 7373 3d22 656c 2220 (soap::fpost<\n+0015ae30: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+0015ae40: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+0015ae50: 6172 202a 656e 6470 6f69 6e74 2c20 636f ar *endpoint, co\n+0015ae60: 6e73 7420 6368 6172 202a 686f 7374 2c20 nst char *host, \n+0015ae70: 696e 7420 706f 7274 2c20 636f 6e73 7420 int port, const \n+0015ae80: 6368 6172 202a 7061 7468 2c20 636f 6e73 char *path, cons\n+0015ae90: 7420 6368 6172 202a 6163 7469 6f6e 2c20 t char *action, \n+0015aea0: 554c 4f4e 4736 3420 636f 756e 7429 3c2f ULONG64 count)

    .

    Thi\n+0015aec0: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+0015aed0: 6c6c 6564 2061 7420 7468 6520 7365 7276 lled at the serv\n+0015aee0: 6572 2073 6964 6520 6279 2074 6865 2065 er side by the e\n+0015aef0: 6e67 696e 6520 746f 2073 656e 6420 7468 ngine to send th\n+0015af00: 6520 4854 5450 2068 6561 6465 7273 2074 e HTTP headers t\n+0015af10: 6f20 7468 6520 636f 6e6e 6563 7465 6420 o the connected \n+0015af20: 636c 6965 6e74 2e20 5468 6520 7061 7261 client. The para\n+0015af30: 6d65 7465 7220 3c63 6f64 653e 7374 6174 meter stat\n+0015af40: 7573 3c2f 636f 6465 3e20 7368 6f75 6c64 us should\n+0015af50: 2062 6520 616e 2048 5454 5020 7374 6174 be an HTTP stat\n+0015af60: 7573 2065 7272 6f72 2063 6f64 6520 6f72 us error code or\n+0015af70: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0015af80: 2f63 6f64 653e 2028 3230 3020 4f4b 2920 /code> (200 OK) \n+0015af90: 6f72 203c 636f 6465 3e23 534f 4150 5f48 or #SOAP_H\n+0015afa0: 544d 4c3c 2f63 6f64 653e 206f 7220 3c63 TML or #SOAP_FILE. Using #SOAP_HTML sets the co\n+0015aff0: 6e74 656e 742d 7479 7065 2068 6561 6465 ntent-type heade\n+0015b000: 7220 746f 203c 636f 6465 3e74 6578 742f r to text/\n+0015b010: 6874 6d6c 3b20 6368 6172 7365 743d 7574 html; charset=ut\n+0015b020: 662d 383c 2f63 6f64 653e 2e20 5573 696e f-8. Usin\n+0015b030: 6720 3c63 6f64 653e 2353 4f41 505f 4649 g #SOAP_FI\n+0015b040: 4c45 3c2f 636f 6465 3e20 7365 7473 2074 LE sets t\n+0015b050: 6865 2063 6f6e 7465 6e74 2d74 7970 6520 he content-type \n+0015b060: 6865 6164 6572 2074 6f20 7468 6520 7661 header to the va\n+0015b070: 6c75 6520 6f66 203c 636f 6465 3e3c 6120 lue of soap::http_\n+0015b140: 636f 6e74 656e 743c 2f61 3e3c 2f63 6f64 content. Extra HTTP h\n+0015b160: 6561 6465 7273 2061 7265 2061 6464 6564 eaders are added\n+0015b170: 2077 6865 6e20 3c63 6f64 653e 3c61 2063 when soap:\n+0015b230: 3a68 7474 705f 6578 7472 615f 6865 6164 :http_extra_head\n+0015b240: 6572 3c2f 613e 3c2f 636f 6465 3e20 6973 er is\n+0015b250: 2073 6574 2074 6f20 6f6e 6520 6f72 206d set to one or m\n+0015b260: 6f72 6520 6865 6164 6572 206c 696e 6573 ore header lines\n+0015b270: 2073 6570 6172 6174 6564 2062 7920 4352 separated by CR\n+0015b280: 4c46 2e20 5768 656e 2072 6564 6566 696e LF. When redefin\n+0015b290: 696e 6720 7468 6973 2063 616c 6c62 6163 ing this callbac\n+0015b2a0: 6b2c 2075 7365 2066 756e 6374 696f 6e20 k, use function \n+0015b2b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_\n+0015b320: 7365 6e64 3c2f 613e 3c2f 636f 6465 3e20 send \n+0015b330: 746f 2077 7269 7465 2074 6865 2068 6561 to write the hea\n+0015b340: 6465 7220 636f 6e74 656e 7473 2e20 5265 der contents. Re\n+0015b350: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n+0015b360: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n+0015b370: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n+0015b430: 7475 733c 2f61 3e3c 2f63 6f64 653e 2065 tus e\n+0015b440: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n+0015b450: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+0015b460: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to \n+0015b530: 736f 6170 3a3a 6672 6573 706f 6e73 653c soap::fresponse<\n+0015b540: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is http_respons\n+0015b560: 653c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 e.

    ..fresp\n+0015b5a0: 6f6e 7365 3c2f 6833 3e0a 3c70 3e3c 636f onse

    .

    int (soap::fresp\n+0015b680: 6f6e 7365 3c2f 613e 2928 7374 7275 6374 onse)(struct\n+0015b690: 2073 6f61 7020 2a73 6f61 702c 2069 6e74 soap *soap, int\n+0015b6a0: 2073 6f61 705f 6572 726f 725f 636f 6465 soap_error_code\n+0015b6b0: 2c20 554c 4f4e 4736 3420 636f 756e 7429 , ULONG64 count)\n+0015b6c0: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n+0015b6d0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n+0015b6e0: 6361 6c6c 6564 2061 7420 7468 6520 7365 called at the se\n+0015b6f0: 7276 6572 2073 6964 6520 6279 2074 6865 rver side by the\n+0015b700: 2065 6e67 696e 6520 746f 2073 656e 6420 engine to send \n+0015b710: 7468 6520 4854 5450 2068 6561 6465 7273 the HTTP headers\n+0015b720: 2074 6f20 7468 6520 636f 6e6e 6563 7465 to the connecte\n+0015b730: 6420 636c 6965 6e74 2e20 5468 6520 7061 d client. The pa\n+0015b740: 7261 6d65 7465 7220 3c63 6f64 653e 7374 rameter st\n+0015b750: 6174 7573 3c2f 636f 6465 3e20 7368 6f75 atus shou\n+0015b760: 6c64 2062 6520 616e 2048 5454 5020 7374 ld be an HTTP st\n+0015b770: 6174 7573 2065 7272 6f72 2063 6f64 6520 atus error code \n+0015b780: 6f72 203c 636f 6465 3e23 534f 4150 5f4f or #SOAP_O\n+0015b790: 4b3c 2f63 6f64 653e 2028 3230 3020 4f4b K (200 OK\n+0015b7a0: 2920 6f72 203c 636f 6465 3e23 534f 4150 ) or #SOAP\n+0015b7b0: 5f48 544d 4c3c 2f63 6f64 653e 206f 7220 _HTML or \n+0015b7c0: 3c63 6f64 653e 2353 4f41 505f 4649 4c45 #SOAP_FILE\n+0015b7d0: 3c2f 636f 6465 3e2e 2055 7369 6e67 203c . Using <\n+0015b7e0: 636f 6465 3e23 534f 4150 5f48 544d 4c3c code>#SOAP_HTML<\n+0015b7f0: 2f63 6f64 653e 2073 6574 7320 7468 6520 /code> sets the \n+0015b800: 636f 6e74 656e 742d 7479 7065 2068 6561 content-type hea\n+0015b810: 6465 7220 746f 203c 636f 6465 3e74 6578 der to tex\n+0015b820: 742f 6874 6d6c 3b20 6368 6172 7365 743d t/html; charset=\n+0015b830: 7574 662d 383c 2f63 6f64 653e 2e20 5573 utf-8. Us\n+0015b840: 696e 6720 3c63 6f64 653e 2353 4f41 505f ing #SOAP_\n+0015b850: 4649 4c45 3c2f 636f 6465 3e20 7365 7473 FILE sets\n+0015b860: 2074 6865 2063 6f6e 7465 6e74 2d74 7970 the content-typ\n+0015b870: 6520 6865 6164 6572 2074 6f20 7468 6520 e header to the \n+0015b880: 7661 6c75 6520 6f66 203c 636f 6465 3e3c value of <\n+0015b890: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015b8a0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0015b8b0: 6d6c 2361 6535 6539 3837 3333 6134 3334 ml#ae5e98733a434\n+0015b8c0: 3962 3565 3134 3636 6139 6530 6363 6332 9b5e1466a9e0ccc2\n+0015b8d0: 3263 3131 2220 7469 746c 653d 2253 7472 2c11\" title=\"Str\n+0015b8e0: 696e 6720 7769 7468 2048 5454 5020 636f ing with HTTP co\n+0015b8f0: 6e74 656e 7420 7479 7065 2068 6561 6465 ntent type heade\n+0015b900: 7220 7661 6c75 6520 7265 6365 6976 6564 r value received\n+0015b910: 2c20 6361 6e20 616c 736f 2062 6520 6173 , can also be as\n+0015b920: 7369 676e 6564 2074 6f20 7370 6563 6966 signed to specif\n+0015b930: 7920 6120 636f 6e74 656e 7420 7479 7065 y a content type\n+0015b940: 2068 2e2e 2e22 3e73 6f61 703a 3a68 7474 h...\">soap::htt\n+0015b950: 705f 636f 6e74 656e 743c 2f61 3e3c 2f63 p_content. Extra HTTP\n+0015b970: 2068 6561 6465 7273 2061 7265 2061 6464 headers are add\n+0015b980: 6564 2077 6865 6e20 3c63 6f64 653e 3c61 ed when soa\n+0015ba40: 703a 3a68 7474 705f 6578 7472 615f 6865 p::http_extra_he\n+0015ba50: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n+0015ba60: 6973 2073 6574 2074 6f20 6f6e 6520 6f72 is set to one or\n+0015ba70: 206d 6f72 6520 6865 6164 6572 206c 696e more header lin\n+0015ba80: 6573 2073 6570 6172 6174 6564 2062 7920 es separated by \n+0015ba90: 4352 4c46 2e20 5768 656e 2072 6564 6566 CRLF. When redef\n+0015baa0: 696e 696e 6720 7468 6973 2063 616c 6c62 ining this callb\n+0015bab0: 6163 6b2c 2075 7365 2066 756e 6374 696f ack, use functio\n+0015bac0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soa\n+0015bb30: 705f 7365 6e64 3c2f 613e 3c2f 636f 6465 p_send to write the h\n+0015bb50: 6561 6465 7220 636f 6e74 656e 7473 2e20 eader contents. \n+0015bb60: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+0015bb70: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+0015bb80: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+0015bc40: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+0015bc50: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n+0015bc60: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n+0015bc70: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n+0015bc80: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::frespons\n+0015bd50: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is \n+0015bd60: 3c63 6f64 653e 6874 7470 5f72 6573 706f http_respo\n+0015bd70: 6e73 653c 2f63 6f64 653e 2e3c 2f70 3e0a nse.

    .\n+0015bd80: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fpo\n+0015bdb0: 7374 6864 723c 2f68 333e 0a3c 703e 3c63 sthdr

    .

    int (soap::fpo\n+0015be70: 7374 6864 723c 2f61 3e29 2873 7472 7563 sthdr)(struc\n+0015be80: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n+0015be90: 6e73 7420 6368 6172 202a 6b65 792c 2063 nst char *key, c\n+0015bea0: 6f6e 7374 2063 6861 7220 2a76 616c 293c onst char *val)<\n+0015beb0: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+0015bec0: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+0015bed0: 616c 6c65 6420 6279 203c 636f 6465 3e3c alled by <\n+0015bee0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015bef0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015bf00: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0015bf10: 6761 3738 6432 6235 3434 3062 3333 6433 ga78d2b5440b33d3\n+0015bf20: 3838 3262 3539 3563 6138 6366 6465 6334 882b595ca8cfdec4\n+0015bf30: 3235 2220 7469 746c 653d 2243 616c 6c62 25\" title=\"Callb\n+0015bf40: 6163 6b20 7468 6174 2070 6f70 756c 6174 ack that populat\n+0015bf50: 6573 2061 6e64 2074 6865 6e20 7365 6e64 es and then send\n+0015bf60: 7320 4854 5450 2068 6561 6465 7273 2066 s HTTP headers f\n+0015bf70: 726f 6d20 7468 6520 636c 6965 6e74 2d73 rom the client-s\n+0015bf80: 6964 6520 746f 2061 2063 6f6e 6e65 6374 ide to a connect\n+0015bf90: 6564 2048 5454 5020 7365 7276 6572 2e22 ed HTTP server.\"\n+0015bfa0: 3e73 6f61 703a 3a66 706f 7374 3c2f 613e >soap::fpost\n+0015bfb0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and s\n+0015c080: 6f61 703a 3a66 7265 7370 6f6e 7365 3c2f oap::fresponse to sen\n+0015c0a0: 6420 616e 2048 5454 5020 6865 6164 6572 d an HTTP header\n+0015c0b0: 2077 6974 6820 6120 6b65 7920 616e 6420 with a key and \n+0015c0c0: 616e 206f 7074 696f 6e61 6c20 7661 6c75 an optional valu\n+0015c0d0: 652e 2052 6574 7572 6e73 203c 636f 6465 e. Returns #SOAP_OK\n+0015c0f0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+0015c1b0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+0015c1d0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n+0015c1e0: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n+0015c1f0: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap\n+0015c2a0: 3a3a 6670 6f73 7468 6472 3c2f 613e 3c2f ::fposthdr is h\n+0015c2c0: 7474 705f 706f 7374 5f68 6561 6465 723c ttp_post_header<\n+0015c2d0: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    \n+0015c2e0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fparse<\n+0015c310: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n+0015c320: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::fpar\n+0015c3c0: 7365 3c2f 613e 2928 7374 7275 6374 2073 se)(struct s\n+0015c3d0: 6f61 7020 2a73 6f61 7029 3c2f 636f 6465 oap *soap)

    .

    This ca\n+0015c3f0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+0015c400: 2062 7920 7468 6520 656e 6769 6e65 2028 by the engine (\n+0015c410: 6173 2061 2063 6c69 656e 7420 6f72 2073 as a client or s\n+0015c420: 6572 7665 7229 2074 6f20 7265 6164 2061 erver) to read a\n+0015c430: 6e64 2070 6172 7365 2048 5454 5020 6865 nd parse HTTP he\n+0015c440: 6164 6572 7320 6f72 204d 494d 4520 6865 aders or MIME he\n+0015c450: 6164 6572 732e 2057 6865 6e20 7265 6465 aders. When rede\n+0015c460: 6669 6e65 642c 2074 6869 7320 6675 6e63 fined, this func\n+0015c470: 7469 6f6e 2073 686f 756c 6420 6174 2072 tion should at r\n+0015c480: 6561 6420 6f72 2073 6b69 7020 7468 6520 ead or skip the \n+0015c490: 656e 7469 7265 2048 5454 5020 6865 6164 entire HTTP head\n+0015c4a0: 6572 2074 6f20 7265 6163 6820 7468 6520 er to reach the \n+0015c4b0: 6d65 7373 6167 6520 626f 6479 2e20 4675 message body. Fu\n+0015c4c0: 6e63 7469 6f6e 203c 636f 6465 3e3c 6120 nction soap_getli\n+0015c540: 6e65 3c2f 613e 3c2f 636f 6465 3e20 6973 ne is\n+0015c550: 2075 7365 6420 6279 2074 6869 7320 6361 used by this ca\n+0015c560: 6c6c 6261 636b 2074 6f20 7265 6164 2065 llback to read e\n+0015c570: 6163 6820 6865 6164 6572 206c 696e 6520 ach header line \n+0015c580: 696e 746f 2061 6e20 696e 7465 726e 616c into an internal\n+0015c590: 2062 7566 6665 7220 3c63 6f64 653e 3c61 buffer soap::msgb\n+0015c660: 7566 3c2f 613e 3c2f 636f 6465 3e20 7769 uf wi\n+0015c670: 7468 203c 636f 6465 3e3c 6120 636c 6173 th soap_getline(soap, soap-&g\n+0015c700: 743b 6d73 6762 7566 2c20 7369 7a65 6f66 t;msgbuf, sizeof\n+0015c710: 2873 6f61 702d 2667 743b 6d73 6762 7566 (soap->msgbuf\n+0015c720: 2929 3c2f 636f 6465 3e2e 2052 6574 7572 )). Retur\n+0015c730: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+0015c740: 4b3c 2f63 6f64 653e 2c20 6f72 2061 2067 K, or a g\n+0015c750: 534f 4150 2065 7272 6f72 2063 6f64 652e SOAP error code.\n+0015c760: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n+0015c770: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n+0015c780: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap\n+0015c820: 3a3a 6670 6172 7365 3c2f 613e 3c2f 636f ::fparse is htt\n+0015c840: 705f 7061 7273 653c 2f63 6f64 653e 2e3c p_parse.<\n+0015c850: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+0015c880: 0a66 7061 7273 6568 6472 3c2f 6833 3e0a .fparsehdr

    .\n+0015c890: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fparse\n+0015c950: 6864 723c 2f61 3e29 2873 7472 7563 7420 hdr)(struct \n+0015c960: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n+0015c970: 7420 6368 6172 202a 6b65 792c 2063 6f6e t char *key, con\n+0015c980: 7374 2063 6861 7220 2a76 616c 293c 2f63 st char *val)

    .

    This\n+0015c9a0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015c9b0: 6c65 6420 6279 203c 636f 6465 3e3c 6120 led by \n+0015ca50: 736f 6170 3a3a 6670 6172 7365 3c2f 613e soap::fparse\n+0015ca60: 3c2f 636f 6465 3e2c 2063 6f6e 7375 6d65 , consume\n+0015ca70: 7320 616e 2048 5454 5020 6865 6164 6572 s an HTTP header\n+0015ca80: 2074 6861 7420 6973 2073 706c 6974 2069 that is split i\n+0015ca90: 6e20 6120 6b65 792d 7661 6c75 6520 7061 n a key-value pa\n+0015caa0: 6972 2061 6e64 2075 7064 6174 6573 2074 ir and updates t\n+0015cab0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context sta\n+0015cb20: 7465 2061 6363 6f72 6469 6e67 6c79 2e20 te accordingly. \n+0015cb30: 5468 6520 636f 6e74 6578 7420 6973 2075 The context is u\n+0015cb40: 7064 6174 6564 2077 6974 6820 7468 6520 pdated with the \n+0015cb50: 4854 5450 2068 6561 6465 7220 696e 666f HTTP header info\n+0015cb60: 726d 6174 696f 6e20 7265 6365 6976 6564 rmation received\n+0015cb70: 2c20 6275 7420 4854 5450 2068 6561 6465 , but HTTP heade\n+0015cb80: 7273 2061 7265 206e 6f74 206c 6974 6572 rs are not liter\n+0015cb90: 616c 6c79 2072 6574 6169 6e65 6420 6279 ally retained by\n+0015cba0: 2074 6865 2065 6e67 696e 652e 2052 6574 the engine. Ret\n+0015cbb0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n+0015cbc0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 3c63 _OK or #SOAP_STOP to prevent\n+0015cbf0: 2066 7572 7468 6572 2072 6561 6469 6e67 further reading\n+0015cc00: 206f 6620 7468 6520 4854 5450 2062 6f64 of the HTTP bod\n+0015cc10: 792c 206f 7220 6120 3c63 6f64 653e 3c61 y, or a s\n+0015ccd0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n+0015ccf0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n+0015cd00: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n+0015cd10: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+0015cd20: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fpar\n+0015cdd0: 7365 6864 723c 2f61 3e3c 2f63 6f64 653e sehdr\n+0015cde0: 2069 7320 3c63 6f64 653e 6874 7470 5f70 is http_p\n+0015cdf0: 6172 7365 5f68 6561 6465 723c 2f63 6f64 arse_header.

    .

    \n+0015ce30: 3c2f 613e 0a66 6765 743c 2f68 333e 0a3c .fget

    .<\n+0015ce40: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (s\n+0015cf10: 6f61 703a 3a66 6765 743c 2f61 3e29 2873 oap::fget)(s\n+0015cf20: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0015cf30: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n+0015cf40: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+0015cf50: 2063 616c 6c65 6420 6279 2074 6865 2073 called by the s\n+0015cf60: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n+0015cf70: 7220 7768 656e 2061 6e20 4854 5450 2047 r when an HTTP G\n+0015cf80: 4554 2072 6571 7565 7374 2069 7320 7065 ET request is pe\n+0015cf90: 6e64 696e 672e 2052 6564 6566 696e 6520 nding. Redefine \n+0015cfa0: 7468 6973 2063 616c 6c62 6163 6b20 746f this callback to\n+0015cfb0: 2072 6573 706f 6e64 2074 6f20 4854 5450 respond to HTTP\n+0015cfc0: 2047 4554 2072 6571 7565 7374 7320 7769 GET requests wi\n+0015cfd0: 7468 2063 6f6e 7465 6e74 2c20 7365 6520 th content, see \n+0015cfe0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the http_\n+0015d070: 6765 743c 2f61 3e3c 2f63 6f64 653e 2048 get H\n+0015d080: 5454 5020 4745 5420 706c 7567 696e 2066 TTP GET plugin f\n+0015d090: 6f72 206d 6f72 6520 6465 7461 696c 732e or more details.\n+0015d0a0: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n+0015d0b0: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n+0015d0c0: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+0015d180: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n+0015d1a0: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n+0015d1b0: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n+0015d1c0: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to so\n+0015d290: 6170 3a3a 6667 6574 3c2f 613e 3c2f 636f ap::fget is the inter\n+0015d2b0: 6e61 6c20 7374 6174 6963 2066 756e 6374 nal static funct\n+0015d2c0: 696f 6e20 3c63 6f64 653e 6874 7470 5f67 ion http_g\n+0015d2d0: 6574 3c2f 636f 6465 3e20 7468 6174 2072 et that r\n+0015d2e0: 6574 7572 6e73 2074 6865 203c 636f 6465 eturns the #SOAP_GET_METHO\n+0015d300: 443c 2f63 6f64 653e 2065 7272 6f72 2e3c D error.<\n+0015d310: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+0015d340: 0a66 7075 743c 2f68 333e 0a3c 703e 3c63 .fput

    .

    int (soap:\n+0015d420: 3a66 7075 743c 2f61 3e29 2873 7472 7563 :fput)(struc\n+0015d430: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

    .

    This\n+0015d450: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015d460: 6c65 6420 6279 2074 6865 2073 6572 7669 led by the servi\n+0015d470: 6365 2064 6973 7061 7463 6865 7220 7768 ce dispatcher wh\n+0015d480: 656e 2061 6e20 4854 5450 2050 5554 2072 en an HTTP PUT r\n+0015d490: 6571 7565 7374 2069 7320 7065 6e64 696e equest is pendin\n+0015d4a0: 672e 2052 6564 6566 696e 6520 7468 6973 g. Redefine this\n+0015d4b0: 2063 616c 6c62 6163 6b20 746f 2072 6573 callback to res\n+0015d4c0: 706f 6e64 2074 6f20 4854 5450 2050 5554 pond to HTTP PUT\n+0015d4d0: 2072 6571 7565 7374 732c 2073 6565 2074 requests, see t\n+0015d4e0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_\n+0015d570: 706f 7374 3c2f 613e 3c2f 636f 6465 3e20 post \n+0015d580: 4854 5450 2050 4f53 5420 706c 7567 696e HTTP POST plugin\n+0015d590: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail\n+0015d5a0: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK\n+0015d5c0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+0015d680: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status error code. \n+0015d6a0: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n+0015d6b0: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n+0015d6c0: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::\n+0015d790: 6670 7574 3c2f 613e 3c2f 636f 6465 3e20 fput \n+0015d7a0: 6973 2074 6865 2069 6e74 6572 6e61 6c20 is the internal \n+0015d7b0: 7374 6174 6963 2066 756e 6374 696f 6e20 static function \n+0015d7c0: 3c63 6f64 653e 6874 7470 5f70 7574 3c2f http_put that retur\n+0015d7e0: 6e73 2074 6865 203c 636f 6465 3e23 534f ns the #SO\n+0015d7f0: 4150 5f50 5554 5f4d 4554 484f 443c 2f63 AP_PUT_METHOD error.

    .\n+0015d810: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fpa\n+0015d840: 7463 683c 2f68 333e 0a3c 703e 3c63 6f64 tch

    .

    int (soa\n+0015d920: 703a 3a66 7061 7463 683c 2f61 3e29 2873 p::fpatch)(s\n+0015d930: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0015d940: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n+0015d950: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+0015d960: 2063 616c 6c65 6420 6279 2074 6865 2073 called by the s\n+0015d970: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n+0015d980: 7220 7768 656e 2061 6e20 4854 5450 2050 r when an HTTP P\n+0015d990: 4154 4348 2072 6571 7565 7374 2069 7320 ATCH request is \n+0015d9a0: 7065 6e64 696e 672e 2052 6564 6566 696e pending. Redefin\n+0015d9b0: 6520 7468 6973 2063 616c 6c62 6163 6b20 e this callback \n+0015d9c0: 746f 2072 6573 706f 6e64 2074 6f20 4854 to respond to HT\n+0015d9d0: 5450 2050 4154 4348 2072 6571 7565 7374 TP PATCH request\n+0015d9e0: 732c 2073 6565 2074 6865 203c 636f 6465 s, see the http_post\n+0015da80: 3c2f 636f 6465 3e20 4854 5450 2050 4f53 HTTP POS\n+0015da90: 5420 706c 7567 696e 2066 6f72 206d 6f72 T plugin for mor\n+0015daa0: 6520 6465 7461 696c 732e 2052 6574 7572 e details. Retur\n+0015dab0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+0015dac0: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n+0015db90: 3c2f 613e 3c2f 636f 6465 3e20 6572 726f erro\n+0015dba0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n+0015dbb0: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n+0015dbc0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+0015dbd0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fpat\n+0015dca0: 6368 3c2f 613e 3c2f 636f 6465 3e20 6973 ch is\n+0015dcb0: 2074 6865 2069 6e74 6572 6e61 6c20 7374 the internal st\n+0015dcc0: 6174 6963 2066 756e 6374 696f 6e20 3c63 atic function http_patch that retur\n+0015dcf0: 6e73 2074 6865 203c 636f 6465 3e23 534f ns the #SO\n+0015dd00: 4150 5f50 4154 4348 5f4d 4554 484f 443c AP_PATCH_METHOD<\n+0015dd10: 2f63 6f64 653e 2065 7272 6f72 2e3c 2f70 /code> error..

    .f\n+0015dd50: 6465 6c3c 2f68 333e 0a3c 703e 3c63 6f64 del

    .

    int (soa\n+0015de30: 703a 3a66 6465 6c3c 2f61 3e29 2873 7472 p::fdel)(str\n+0015de40: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+0015de50: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+0015de60: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+0015de70: 616c 6c65 6420 6279 2074 6865 2073 6572 alled by the ser\n+0015de80: 7669 6365 2064 6973 7061 7463 6865 7220 vice dispatcher \n+0015de90: 7768 656e 2061 6e20 4854 5450 2044 454c when an HTTP DEL\n+0015dea0: 4554 4520 7265 7175 6573 7420 6973 2070 ETE request is p\n+0015deb0: 656e 6469 6e67 2e20 5265 6465 6669 6e65 ending. Redefine\n+0015dec0: 2074 6869 7320 6361 6c6c 6261 636b 2074 this callback t\n+0015ded0: 6f20 7265 7370 6f6e 6420 746f 2048 5454 o respond to HTT\n+0015dee0: 5020 4445 4c45 5445 2072 6571 7565 7374 P DELETE request\n+0015def0: 732c 2073 6565 2074 6865 203c 636f 6465 s, see the http_post\n+0015df90: 3c2f 636f 6465 3e20 4854 5450 2050 4f53 HTTP POS\n+0015dfa0: 5420 706c 7567 696e 2066 6f72 206d 6f72 T plugin for mor\n+0015dfb0: 6520 6465 7461 696c 732e 2052 6574 7572 e details. Retur\n+0015dfc0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+0015dfd0: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n+0015e0a0: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n+0015e0b0: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n+0015e0c0: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n+0015e0d0: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n+0015e0e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n+0015e1b0: 3a3a 6664 656c 3c2f 613e 3c2f 636f 6465 ::fdel is the interna\n+0015e1d0: 6c20 7374 6174 6963 2066 756e 6374 696f l static functio\n+0015e1e0: 6e20 3c63 6f64 653e 6874 7470 5f64 656c n http_del\n+0015e1f0: 3c2f 636f 6465 3e20 7468 6174 2072 6574 that ret\n+0015e200: 7572 6e73 2074 6865 203c 636f 6465 3e23 urns the #\n+0015e210: 534f 4150 5f44 454c 5f4d 4554 484f 443c SOAP_DEL_METHOD<\n+0015e220: 2f63 6f64 653e 2065 7272 6f72 2e3c 2f70 /code> error..

    .f\n+0015e260: 6f70 743c 2f68 333e 0a3c 703e 3c63 6f64 opt

    .

    int (soa\n+0015e340: 703a 3a66 6f70 743c 2f61 3e29 2873 7472 p::fopt)(str\n+0015e350: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+0015e360: 2f63 6f64 653e 3c2f 703e 0a3c 703e 4361 /code>

    .

    Ca\n+0015e370: 6c6c 6564 2062 7920 7468 6520 7365 7276 lled by the serv\n+0015e380: 6963 6520 6469 7370 6174 6368 6572 2077 ice dispatcher w\n+0015e390: 6865 6e20 616e 2048 5454 5020 4f50 5449 hen an HTTP OPTI\n+0015e3a0: 4f4e 2072 6571 7565 7374 2069 7320 7065 ON request is pe\n+0015e3b0: 6e64 696e 672e 2052 6564 6566 696e 6520 nding. Redefine \n+0015e3c0: 7468 6973 2063 616c 6c62 6163 6b20 746f this callback to\n+0015e3d0: 2072 6573 706f 6e64 2074 6f20 4854 5450 respond to HTTP\n+0015e3e0: 204f 5054 494f 4e20 7265 7175 6573 7473 OPTION requests\n+0015e3f0: 2c20 7365 6520 7468 6520 3c63 6f64 653e , see the \n+0015e400: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_post<\n+0015e490: 2f63 6f64 653e 2048 5454 5020 504f 5354 /code> HTTP POST\n+0015e4a0: 2070 6c75 6769 6e20 666f 7220 6d6f 7265 plugin for more\n+0015e4b0: 2064 6574 6169 6c73 2e20 5265 7475 726e details. Return\n+0015e4c0: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n+0015e4d0: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n+0015e5a0: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n+0015e5b0: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n+0015e5c0: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n+0015e5d0: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n+0015e5e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n+0015e6b0: 3a66 6f70 743c 2f61 3e3c 2f63 6f64 653e :fopt\n+0015e6c0: 2069 7320 7468 6520 696e 7465 726e 616c is the internal\n+0015e6d0: 2073 7461 7469 6320 6675 6e63 7469 6f6e static function\n+0015e6e0: 203c 636f 6465 3e68 7474 705f 3230 303c http_200<\n+0015e6f0: 2f63 6f64 653e 2074 6861 7420 7265 7475 /code> that retu\n+0015e700: 726e 7320 4854 5450 2032 3030 204f 4b2e rns HTTP 200 OK.\n+0015e710: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fhead

    .

    \n+0015e750: 3c63 6f64 653e 696e 7420 283c 6120 636c int (so\n+0015e820: 6170 3a3a 6668 6561 643c 2f61 3e29 2873 ap::fhead)(s\n+0015e830: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0015e840: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n+0015e850: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+0015e860: 2063 616c 6c65 6420 6279 2074 6865 2073 called by the s\n+0015e870: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n+0015e880: 7220 7768 656e 2061 6e20 4854 5450 2048 r when an HTTP H\n+0015e890: 4541 4420 7265 7175 6573 7420 6973 2070 EAD request is p\n+0015e8a0: 656e 6469 6e67 2e20 5265 6465 6669 6e65 ending. Redefine\n+0015e8b0: 2074 6869 7320 6361 6c6c 6261 636b 2074 this callback t\n+0015e8c0: 6f20 7265 7370 6f6e 6420 746f 2048 5454 o respond to HTT\n+0015e8d0: 5020 4845 4144 2072 6571 7565 7374 7320 P HEAD requests \n+0015e8e0: 6d6f 7265 2073 7065 6369 6669 6361 6c6c more specificall\n+0015e8f0: 792e 2052 6574 7572 6e73 203c 636f 6465 y. Returns #SOAP_OK\n+0015e910: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+0015e9d0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+0015e9f0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n+0015ea00: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n+0015ea10: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fhead\n+0015eaf0: 3c2f 636f 6465 3e20 6973 2074 6865 2069 is the i\n+0015eb00: 6e74 6572 6e61 6c20 7374 6174 6963 2066 nternal static f\n+0015eb10: 756e 6374 696f 6e20 3c63 6f64 653e 6874 unction ht\n+0015eb20: 7470 5f32 3030 3c2f 636f 6465 3e20 7468 tp_200 th\n+0015eb30: 6174 2072 6574 7572 6e73 2048 5454 5020 at returns HTTP \n+0015eb40: 3230 3020 4f4b 2e3c 2f70 3e0a 3c68 333e 200 OK.

    .

    \n+0015eb50: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fform.

    int\n+0015eb90: 2028 3c61 2063 6c61 7373 3d22 656c 2220 (soap::ff\n+0015ec60: 6f72 6d3c 2f61 3e29 2873 7472 7563 7420 orm)(struct \n+0015ec70: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

    .

    This c\n+0015ec90: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n+0015eca0: 6420 6279 2074 6865 2048 5454 5020 464f d by the HTTP FO\n+0015ecb0: 524d 2068 616e 646c 6572 2070 6c75 6769 RM handler plugi\n+0015ecc0: 6e20 746f 2070 6172 7365 2048 544d 4c20 n to parse HTML \n+0015ecd0: 666f 726d 7320 7265 6365 6976 6564 2077 forms received w\n+0015ece0: 6974 6820 4854 5450 2050 4f53 5420 616e ith HTTP POST an\n+0015ecf0: 6420 5055 5420 7265 7175 6573 7473 2c20 d PUT requests, \n+0015ed00: 7365 6520 7468 6520 3c63 6f64 653e 3b3a see the ;:\n+0015ed10: 6874 7470 5f66 6f72 6d3c 2f63 6f64 653e http_form\n+0015ed20: 2048 5454 5020 464f 524d 2070 6c75 6769 HTTP FORM plugi\n+0015ed30: 6e20 666f 7220 6d6f 7265 2064 6574 6169 n for more detai\n+0015ed40: 6c73 2e20 5468 6520 4854 5450 2062 6f64 ls. The HTTP bod\n+0015ed50: 7920 7769 7468 2074 6865 2066 6f72 6d20 y with the form \n+0015ed60: 6461 7461 2073 686f 756c 6420 6265 2070 data should be p\n+0015ed70: 6172 7365 6420 6279 2074 6869 7320 6361 arsed by this ca\n+0015ed80: 6c6c 6261 636b 2c20 6f74 6865 7277 6973 llback, otherwis\n+0015ed90: 6520 4854 5450 206b 6565 702d 616c 6976 e HTTP keep-aliv\n+0015eda0: 6520 6d65 7373 6167 6573 2077 696c 6c20 e messages will \n+0015edb0: 656e 6420 7570 206f 7574 206f 6620 7379 end up out of sy\n+0015edc0: 6e63 2061 7320 6120 7265 7375 6c74 206f nc as a result o\n+0015edd0: 6620 7468 6520 6375 7272 656e 7420 706f f the current po\n+0015ede0: 7369 7469 6f6e 206e 6f74 2062 6569 6e67 sition not being\n+0015edf0: 2061 6476 616e 6365 6420 746f 2074 6865 advanced to the\n+0015ee00: 2065 6e64 206f 6620 7468 6520 4854 5450 end of the HTTP\n+0015ee10: 2062 6f64 792e 2052 6574 7572 6e73 203c body. Returns <\n+0015ee20: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+0015ee40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+0015ef00: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n+0015ef10: 726f 7220 636f 6465 2e20 4e6f 2062 7569 ror code. No bui\n+0015ef20: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i\n+0015ef30: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to soap::\n+0015f010: 6666 6f72 6d3c 2f61 3e3c 2f63 6f64 653e fform\n+0015f020: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fheader

    .\n+0015f060: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fheade\n+0015f140: 723c 2f61 3e29 2873 7472 7563 7420 736f r)(struct so\n+0015f150: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n+0015f160: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+0015f170: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015f180: 696d 6d65 6469 6174 656c 7920 6166 7465 immediately afte\n+0015f190: 7220 7061 7273 696e 6720 6120 534f 4150 r parsing a SOAP\n+0015f1a0: 2048 6561 6465 7220 696e 746f 2074 6865 Header into the\n+0015f1b0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+0015f270: 6f61 703a 3a68 6561 6465 723c 2f61 3e3c oap::header<\n+0015f280: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure\n+0015f290: 2e20 5468 6520 534f 4150 2048 6561 6465 . The SOAP Heade\n+0015f2a0: 7220 7374 7275 6374 7572 6520 3c63 6f64 r structure soap::\n+0015f370: 6865 6164 6572 3c2f 613e 3c2f 636f 6465 header can be inspect\n+0015f390: 6564 2062 7920 7468 6973 2066 756e 6374 ed by this funct\n+0015f3a0: 696f 6e20 616e 6420 7665 7269 6669 6564 ion and verified\n+0015f3b0: 206f 7220 7265 6a65 6374 6564 2062 6566 or rejected bef\n+0015f3c0: 6f72 6520 7468 6520 7265 7374 206f 6620 ore the rest of \n+0015f3d0: 7468 6520 6d65 7373 6167 6520 7769 7468 the message with\n+0015f3e0: 2074 6865 2053 4f41 5020 426f 6479 2069 the SOAP Body i\n+0015f3f0: 7320 636f 6e73 756d 6564 2e20 5265 7475 s consumed. Retu\n+0015f400: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n+0015f410: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n+0015f420: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n+0015f4e0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n+0015f4f0: 7429 2065 7272 6f72 2063 6f64 652e 204e t) error code. N\n+0015f500: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n+0015f510: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n+0015f520: 746f 203c 636f 6465 3e3c 6120 636c 6173 to s\n+0015f5f0: 6f61 703a 3a66 6865 6164 6572 3c2f 613e oap::fheader\n+0015f600: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..fignor\n+0015f640: 653c 2f68 333e 0a3c 703e 3c63 6f64 653e e

    .

    \n+0015f650: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap:\n+0015f720: 3a66 6967 6e6f 7265 3c2f 613e 2928 7374 :fignore)(st\n+0015f730: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0015f740: 2063 6f6e 7374 2063 6861 7220 2a74 6167 const char *tag\n+0015f750: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n+0015f760: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+0015f770: 2063 616c 6c65 6420 7768 656e 2061 6e20 called when an \n+0015f780: 756e 7265 636f 676e 697a 6564 2058 4d4c unrecognized XML\n+0015f790: 2065 6c65 6d65 6e74 2077 6173 2065 6e63 element was enc\n+0015f7a0: 6f75 6e74 6572 6564 206f 6e20 7468 6520 ountered on the \n+0015f7b0: 696e 7075 7420 7468 6174 2063 6f75 6c64 input that could\n+0015f7c0: 2062 6520 6967 6e6f 7265 6420 6465 7065 be ignored depe\n+0015f7d0: 6e64 696e 6720 6f6e 2073 6f6d 6520 7370 nding on some sp\n+0015f7e0: 6563 6966 6965 6420 6c6f 6769 632e 2054 ecified logic. T\n+0015f7f0: 6865 203c 636f 6465 3e74 6167 3c2f 636f he tag parameter is\n+0015f810: 2074 6865 206f 6666 656e 6469 6e67 2058 the offending X\n+0015f820: 4d4c 2065 6c65 6d65 6e74 2074 6167 206e ML element tag n\n+0015f830: 616d 6520 7374 7269 6e67 2e20 5468 6520 ame string. The \n+0015f840: 6361 6c6c 6261 636b 2073 686f 756c 6420 callback should \n+0015f850: 7265 7475 726e 203c 636f 6465 3e23 534f return #SO\n+0015f860: 4150 5f4f 4b3c 2f63 6f64 653e 2074 6f20 AP_OK to \n+0015f870: 6967 6e6f 7265 2074 6865 2065 6c65 6d65 ignore the eleme\n+0015f880: 6e74 206f 7220 7265 7475 726e 2061 6e20 nt or return an \n+0015f890: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n+0015f950: 7573 3c2f 613e 3c2f 636f 6465 3e20 6572 us er\n+0015f960: 726f 7220 636f 6465 2073 7563 6820 6173 ror code such as\n+0015f970: 203c 636f 6465 3e23 534f 4150 5f54 4147 #SOAP_TAG\n+0015f980: 5f4d 4953 4d41 5443 483c 2f63 6f64 653e _MISMATCH\n+0015f990: 2074 6f20 7472 6967 6765 7220 6120 7661 to trigger a va\n+0015f9a0: 6c69 6461 7469 6f6e 2065 7272 6f72 2e20 lidation error. \n+0015f9b0: 5468 6973 2063 616c 6c62 6163 6b20 616c This callback al\n+0015f9c0: 736f 206f 7665 7272 6964 6573 203c 636f so overrides mustUnderstan\n+0015f9e0: 643c 2f63 6f64 653e 2061 7474 7269 6275 d attribu\n+0015f9f0: 7465 7320 6f6e 2075 6e72 6563 6f67 6e69 tes on unrecogni\n+0015fa00: 7a65 6420 534f 4150 2048 6561 6465 7220 zed SOAP Header \n+0015fa10: 656c 656d 656e 7473 2074 6861 7420 6e6f elements that no\n+0015fa20: 726d 616c 6c79 2072 6169 7365 2066 6175 rmally raise fau\n+0015fa30: 6c74 732e 2049 7420 6973 2073 7472 6f6e lts. It is stron\n+0015fa40: 676c 7920 7265 636f 6d6d 656e 6465 6420 gly recommended \n+0015fa50: 7468 6174 2074 6865 2063 616c 6c62 6163 that the callbac\n+0015fa60: 6b20 7265 7475 726e 7320 3c63 6f64 653e k returns \n+0015fa70: 2353 4f41 505f 4d55 5354 554e 4445 5253 #SOAP_MUSTUNDERS\n+0015fa80: 5441 4e44 3c2f 636f 6465 3e20 7768 656e TAND when\n+0015fa90: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+0015fb50: 6f61 703a 3a6d 7573 7455 6e64 6572 7374 oap::mustUnderst\n+0015fb60: 616e 643c 2f61 3e3c 2f63 6f64 653e 2021 and !\n+0015fb70: 3d20 3c63 6f64 653e 303c 2f63 6f64 653e = 0\n+0015fb80: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns \n+0015fb90: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK \n+0015fba0: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap\n+0015fc60: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status (int) error c\n+0015fc80: 6f64 652e 204e 6f20 6275 696c 742d 696e ode. No built-in\n+0015fc90: 2066 756e 6374 696f 6e20 6973 2061 7373 function is ass\n+0015fca0: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n+0015fcb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015fcc0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015fcd0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0015fce0: 6761 3063 3265 3161 3062 3561 3531 3937 ga0c2e1a0b5a5197\n+0015fcf0: 3132 3861 6631 6163 6334 3836 3632 6231 128af1acc48662b1\n+0015fd00: 6264 2220 7469 746c 653d 2243 616c 6c62 bd\" title=\"Callb\n+0015fd10: 6163 6b20 746f 2063 6174 6368 2075 6e72 ack to catch unr\n+0015fd20: 6563 6f67 6e69 7a65 6420 584d 4c20 656c ecognized XML el\n+0015fd30: 656d 656e 7473 2061 6e64 206f 7665 7272 ements and overr\n+0015fd40: 6964 6573 2023 534f 4150 5f58 4d4c 5f53 ides #SOAP_XML_S\n+0015fd50: 5452 4943 5420 7661 6c69 6461 7469 6f6e TRICT validation\n+0015fd60: 2065 7272 6f72 7320 666f 7220 7468 6573 errors for thes\n+0015fd70: 2e2e 2e22 3e73 6f61 703a 3a66 6967 6e6f ...\">soap::figno\n+0015fd80: 7265 3c2f 613e 3c2f 636f 6465 3e2e 3c2f re..

    .\n+0015fdc0: 6673 7661 6c69 6461 7465 3c2f 6833 3e0a fsvalidate

    .\n+0015fdd0: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fsvali\n+0015fe80: 6461 7465 3c2f 613e 2928 7374 7275 6374 date)(struct\n+0015fe90: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n+0015fea0: 7374 2063 6861 7220 2a70 6174 7465 726e st char *pattern\n+0015feb0: 2c20 636f 6e73 7420 6368 6172 202a 7374 , const char *st\n+0015fec0: 7269 6e67 293c 2f63 6f64 653e 3c2f 703e ring)

    \n+0015fed0: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

    This callbac\n+0015fee0: 6b20 6973 2063 616c 6c65 6420 746f 2076 k is called to v\n+0015fef0: 616c 6964 6174 6520 6120 7374 7269 6e67 alidate a string\n+0015ff00: 2061 6761 696e 7374 2061 6e20 584d 4c20 against an XML \n+0015ff10: 7265 6765 7820 7061 7474 6572 6e2e 2050 regex pattern. P\n+0015ff20: 6174 7465 726e 7320 7573 6520 584d 4c20 atterns use XML \n+0015ff30: 7363 6865 6d61 2072 6567 6578 2073 796e schema regex syn\n+0015ff40: 7461 782e 2054 6869 7320 6361 6c6c 6261 tax. This callba\n+0015ff50: 636b 2061 6c6c 6f77 7320 7573 6572 2d64 ck allows user-d\n+0015ff60: 6566 696e 6564 2070 6174 7465 726e 2076 efined pattern v\n+0015ff70: 616c 6964 6174 696f 6e20 7468 6174 2069 alidation that i\n+0015ff80: 7320 6e6f 726d 616c 6c79 2064 6973 6162 s normally disab\n+0015ff90: 6c65 642e 2052 6574 7572 6e73 203c 636f led. Returns #SOAP_OK when the stri\n+0015ffc0: 6e67 206d 6174 6368 6573 2074 6865 2070 ng matches the p\n+0015ffd0: 6174 7465 726e 206f 7220 3c63 6f64 653e attern or \n+0015ffe0: 2353 4f41 505f 5459 5045 3c2f 636f 6465 #SOAP_TYPE when the strin\n+00160000: 6720 646f 6573 206e 6f74 206d 6174 6368 g does not match\n+00160010: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu\n+00160020: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign\n+00160030: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fsvalida\n+001600e0: 7465 3c2f 613e 3c2f 636f 6465 3e2e 3c2f te..

    .\n+00160120: 6677 7661 6c69 6461 7465 3c2f 6833 3e0a fwvalidate

    .\n+00160130: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::f\n+001601e0: 7776 616c 6964 6174 653c 2f61 3e29 2873 wvalidate)(s\n+001601f0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00160200: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa\n+00160210: 7474 6572 6e2c 2063 6f6e 7374 2077 6368 ttern, const wch\n+00160220: 6172 5f74 202a 7374 7269 6e67 293c 2f63 ar_t *string) This callba\n+00160240: 636b 2069 7320 6361 6c6c 6564 2074 6f20 ck is called to \n+00160250: 7661 6c69 6461 7465 2061 2077 6964 6520 validate a wide \n+00160260: 7374 7269 6e67 2061 6761 696e 7374 2061 string against a\n+00160270: 6e20 584d 4c20 7265 6765 7820 7061 7474 n XML regex patt\n+00160280: 6572 6e2e 2050 6174 7465 726e 7320 7573 ern. Patterns us\n+00160290: 6520 584d 4c20 7363 6865 6d61 2072 6567 e XML schema reg\n+001602a0: 6578 2073 796e 7461 782e 2054 6869 7320 ex syntax. This \n+001602b0: 6361 6c6c 6261 636b 2061 6c6c 6f77 7320 callback allows \n+001602c0: 7573 6572 2d64 6566 696e 6564 2070 6174 user-defined pat\n+001602d0: 7465 726e 2076 616c 6964 6174 696f 6e20 tern validation \n+001602e0: 7468 6174 2069 7320 6e6f 726d 616c 6c79 that is normally\n+001602f0: 2064 6973 6162 6c65 642e 2052 6574 7572 disabled. Retur\n+00160300: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+00160310: 4b3c 2f63 6f64 653e 2077 6865 6e20 7468 K when th\n+00160320: 6520 7374 7269 6e67 206d 6174 6368 6573 e string matches\n+00160330: 2074 6865 2070 6174 7465 726e 206f 7220 the pattern or \n+00160340: 3c63 6f64 653e 2353 4f41 505f 5459 5045 #SOAP_TYPE\n+00160350: 3c2f 636f 6465 3e20 7768 656e 2074 6865 when the\n+00160360: 2073 7472 696e 6720 646f 6573 206e 6f74 string does not\n+00160370: 206d 6174 6368 2e20 4e6f 2062 7569 6c74 match. No built\n+00160380: 2d69 6e20 6675 6e63 7469 6f6e 2069 7320 -in function is \n+00160390: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soa\n+00160440: 703a 3a66 7776 616c 6964 6174 653c 2f61 p::fwvalidate.

    ..fsete\n+00160490: 7272 6f72 3c2f 6833 3e0a 3c70 3e3c 636f rror.

    void (soap:\n+00160550: 3a66 7365 7465 7272 6f72 3c2f 613e 2928 :fseterror)(\n+00160560: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00160570: 702c 2063 6f6e 7374 2063 6861 7220 2a2a p, const char **\n+00160580: 636f 6465 2c20 636f 6e73 7420 6368 6172 code, const char\n+00160590: 202a 2a73 7472 696e 6729 3c2f 636f 6465 **string)

    .

    This ca\n+001605b0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+001605c0: 2062 7920 7468 6520 656e 6769 6e65 2077 by the engine w\n+001605d0: 6865 6e20 616e 2065 7272 6f72 2069 7320 hen an error is \n+001605e0: 7261 6973 6564 2074 6f20 616c 6c6f 7720 raised to allow \n+001605f0: 696e 7370 6563 7469 6f6e 206f 7220 6f76 inspection or ov\n+00160600: 6572 7269 6469 6e67 206f 6620 7468 6520 erriding of the \n+00160610: 6661 756c 7420 636f 6465 206f 7220 6661 fault code or fa\n+00160620: 756c 7420 7374 7269 6e67 206d 6573 7361 ult string messa\n+00160630: 6765 7320 6265 666f 7265 2074 6865 2065 ges before the e\n+00160640: 7272 6f72 2069 7320 7265 706f 7274 6564 rror is reported\n+00160650: 206f 7220 7472 616e 736d 6974 7465 642e or transmitted.\n+00160660: 204e 6f20 6275 696c 742d 696e 2066 756e No built-in fun\n+00160670: 6374 696f 6e20 6973 2061 7373 6967 6e65 ction is assigne\n+00160680: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soa\n+00160730: 703a 3a66 7365 7465 7272 6f72 3c2f 613e p::fseterror\n+00160740: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..fopen<\n+00160780: 2f68 333e 0a3c 703e 3c63 6f64 653e 534f /h3>.

    SO\n+00160790: 4150 5f53 4f43 4b45 5420 283c 6120 636c AP_SOCKET (soap::fope\n+00160840: 6e3c 2f61 3e29 2873 7472 7563 7420 736f n)(struct so\n+00160850: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n+00160860: 6368 6172 202a 656e 6470 6f69 6e74 2c20 char *endpoint, \n+00160870: 636f 6e73 7420 6368 6172 202a 686f 7374 const char *host\n+00160880: 2c20 696e 7420 706f 7274 293c 2f63 6f64 , int port)

    .

    This c\n+001608a0: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n+001608b0: 6420 6279 2074 6865 2065 6e67 696e 6520 d by the engine \n+001608c0: 6174 2074 6865 2063 6c69 656e 742d 7369 at the client-si\n+001608d0: 6465 2062 7920 3c63 6f64 653e 3c61 2063 de by soap_conn\n+00160960: 6563 743c 2f61 3e3c 2f63 6f64 653e 206f ect o\n+00160970: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_connect_\n+001609f0: 636f 6d6d 616e 643c 2f61 3e3c 2f63 6f64 command to open a TCP\n+00160a10: 206f 7220 5544 5020 636f 6e6e 6563 7469 or UDP connecti\n+00160a20: 6f6e 2074 6f20 6120 7365 7276 6572 2073 on to a server s\n+00160a30: 7065 6369 6669 6564 2061 7420 616e 2065 pecified at an e\n+00160a40: 6e64 706f 696e 742e 2050 6172 616d 6574 ndpoint. Paramet\n+00160a50: 6572 7320 3c63 6f64 653e 686f 7374 3c2f ers host and \n+00160a70: 706f 7274 3c2f 636f 6465 3e20 6172 6520 port are \n+00160a80: 6d69 6372 6f2d 7061 7273 6564 2066 726f micro-parsed fro\n+00160a90: 6d20 3c63 6f64 653e 656e 6470 6f69 6e74 m endpoint\n+00160aa0: 3c2f 636f 6465 3e20 6265 666f 7265 2062 before b\n+00160ab0: 6569 6e67 2070 6173 7365 6420 746f 203c eing passed to <\n+00160ac0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+00160b60: 736f 6170 3a3a 666f 7065 6e3c 2f61 3e3c soap::fopen<\n+00160b70: 2f63 6f64 653e 2e20 5265 7475 726e 7320 /code>. Returns \n+00160b80: 6120 7661 6c69 6420 736f 636b 6574 206f a valid socket o\n+00160b90: 7220 3c63 6f64 653e 2353 4f41 505f 494e r #SOAP_IN\n+00160ba0: 5641 4c49 445f 534f 434b 4554 3c2f 636f VALID_SOCKET with a soap::err\n+00160c70: 6f72 3c2f 613e 3c2f 636f 6465 3e20 7365 or se\n+00160c80: 7420 746f 2061 203c 636f 6465 3e3c 6120 t to a so\n+00160d40: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n+00160d60: 2063 6f64 6520 616e 6420 3c63 6f64 653e code and \n+00160d70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+00160df0: 736f 6170 3a3a 6572 726e 756d 3c2f 613e soap::errnum\n+00160e00: 3c2f 636f 6465 3e20 7365 7420 746f 203c set to <\n+00160e10: 636f 6465 3e65 7272 6e6f 3c2f 636f 6465 code>errno of the connect\n+00160e30: 696f 6e20 6661 696c 7572 652e 2054 6865 ion failure. The\n+00160e40: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n+00160e50: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n+00160e60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+00160f00: 736f 6170 3a3a 666f 7065 6e3c 2f61 3e3c soap::fopen<\n+00160f10: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n+00160f20: 7463 705f 636f 6e6e 6563 743c 2f63 6f64 tcp_connect.

    .

    \n+00160f60: 3c2f 613e 0a66 6163 6365 7074 3c2f 6833 .faccept.

    SOAP_\n+00160f80: 534f 434b 4554 2028 3c61 2063 6c61 7373 SOCKET (soap::faccep\n+00161040: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so\n+00161050: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S\n+00161060: 4f43 4b45 5420 732c 2073 7472 7563 7420 OCKET s, struct \n+00161070: 736f 636b 6164 6472 202a 612c 2069 6e74 sockaddr *a, int\n+00161080: 202a 6e29 3c2f 636f 6465 3e3c 2f70 3e0a *n)

    .\n+00161090: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n+001610a0: 2069 7320 6361 6c6c 6564 2062 7920 3c63 is called by soa\n+00161130: 705f 6163 6365 7074 3c2f 613e 3c2f 636f p_accept (or the C++ \n+00161150: 7365 7276 6963 6520 636c 6173 7320 3c63 service class accept method) to wai\n+00161180: 7420 666f 7220 616e 6420 6163 6365 7074 t for and accept\n+00161190: 2061 2073 6f63 6b65 7420 636f 6e6e 6563 a socket connec\n+001611a0: 7469 6f6e 2072 6571 7565 7374 6564 2062 tion requested b\n+001611b0: 7920 6120 636c 6965 6e74 2e20 5265 7475 y a client. Retu\n+001611c0: 726e 7320 6120 7661 6c69 6420 736f 636b rns a valid sock\n+001611d0: 6574 206f 7220 3c63 6f64 653e 2353 4f41 et or #SOA\n+001611e0: 505f 494e 5641 4c49 445f 534f 434b 4554 P_INVALID_SOCKET\n+001611f0: 3c2f 636f 6465 3e20 7768 656e 2061 6e20 when an \n+00161200: 6572 726f 7220 6f63 6375 7272 6564 2061 error occurred a\n+00161210: 6e64 2073 6574 7320 3c63 6f64 653e 3c61 nd sets soap::error<\n+001612d0: 2f61 3e3c 2f63 6f64 653e 2074 6f20 6120 /a> to a \n+001612e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n+001613a0: 7573 3c2f 613e 3c2f 636f 6465 3e20 7661 us va\n+001613b0: 6c75 652e 2054 6865 2062 7569 6c74 2d69 lue. The built-i\n+001613c0: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig\n+001613d0: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::f\n+00161490: 6163 6365 7074 3c2f 613e 3c2f 636f 6465 accept is tcp_a\n+001614b0: 6363 6570 743c 2f63 6f64 653e 2e3c 2f70 ccept..

    .f\n+001614f0: 636c 6f73 653c 2f68 333e 0a3c 703e 3c63 close

    .

    int (soap::\n+001615a0: 6663 6c6f 7365 3c2f 613e 2928 7374 7275 fclose)(stru\n+001615b0: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)

    .

    Thi\n+001615d0: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+001615e0: 6c6c 6564 2062 7920 7468 6520 656e 6769 lled by the engi\n+001615f0: 6e65 2061 7420 7468 6520 636c 6965 6e74 ne at the client\n+00161600: 2d73 6964 6520 746f 2063 6c6f 7365 2074 -side to close t\n+00161610: 6865 2063 7572 7265 6e74 2073 6f63 6b65 he current socke\n+00161620: 7420 636f 6e6e 6563 7469 6f6e 2062 6566 t connection bef\n+00161630: 6f72 6520 6120 6e65 7720 736f 636b 6574 ore a new socket\n+00161640: 2063 6f6e 6e65 6374 696f 6e20 6973 2065 connection is e\n+00161650: 7374 6162 6c69 7368 6564 2e20 5468 6973 stablished. This\n+00161660: 2063 616c 6c62 6163 6b20 6d61 7920 6265 callback may be\n+00161670: 2063 616c 6c65 6420 6d75 6c74 6970 6c65 called multiple\n+00161680: 2074 696d 6573 2028 652e 672e 2062 7920 times (e.g. by \n+00161690: 7468 6520 656e 6769 6e65 2061 6e64 2062 the engine and b\n+001616a0: 7920 706c 7567 696e 7329 2074 6f20 636c y plugins) to cl\n+001616b0: 6f73 6520 7468 6520 7361 6d65 2073 6f63 ose the same soc\n+001616c0: 6b65 7420 3c63 6f64 653e 3c61 2063 6c61 ket soap::socket. Check\n+001617a0: 7320 696e 7465 726e 616c 6c79 2069 6620 s internally if \n+001617b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00161870: 6170 3a3a 736f 636b 6574 3c2f 613e 3c2f ap::socket == #\n+00161890: 534f 4150 5f49 4e56 414c 4944 5f53 4f43 SOAP_INVALID_SOC\n+001618a0: 4b45 543c 2f63 6f64 653e 2062 6566 6f72 KET befor\n+001618b0: 6520 636c 6f73 696e 672c 2077 6869 6368 e closing, which\n+001618c0: 206d 6561 6e73 2074 6861 7420 7468 6520 means that the \n+001618d0: 736f 636b 6574 2077 6173 2061 6c72 6561 socket was alrea\n+001618e0: 6479 2063 6c6f 7365 642e 2052 6574 7572 dy closed. Retur\n+001618f0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+00161900: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n+001619d0: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n+001619e0: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n+001619f0: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n+00161a00: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n+00161a10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fcl\n+00161ab0: 6f73 653c 2f61 3e3c 2f63 6f64 653e 2069 ose i\n+00161ac0: 7320 3c63 6f64 653e 7463 705f 6469 7363 s tcp_disc\n+00161ad0: 6f6e 6e65 6374 3c2f 636f 6465 3e2e 3c2f onnect..

    .\n+00161b10: 6672 6573 6f6c 7665 3c2f 6833 3e0a 3c70 fresolve

    .int (soap::fresol\n+00161bd0: 7665 3c2f 613e 2928 7374 7275 6374 2073 ve)(struct s\n+00161be0: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+00161bf0: 2063 6861 7220 2a61 6464 722c 2073 7472 char *addr, str\n+00161c00: 7563 7420 696e 5f61 6464 7220 2a69 6e61 uct in_addr *ina\n+00161c10: 6464 7229 3c2f 636f 6465 3e3c 2f70 3e0a ddr)

    .\n+00161c20: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n+00161c30: 2069 7320 6361 6c6c 6564 2062 7920 3c63 is called by soap_bind (or th\n+00161cd0: 6520 432b 2b20 7365 7276 6963 6520 636c e C++ service cl\n+00161ce0: 6173 7320 3c63 6f64 653e 6269 6e64 3c2f ass bind method) at\n+00161d00: 2074 6865 2073 6572 7665 722d 7369 6465 the server-side\n+00161d10: 2061 6e64 2062 7920 3c63 6f64 653e 3c61 and by soap_co\n+00161da0: 6e6e 6563 743c 2f61 3e3c 2f63 6f64 653e nnect\n+00161db0: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or soap_connec\n+00161e30: 745f 636f 6d6d 616e 643c 2f61 3e3c 2f63 t_command at the clie\n+00161e50: 6e74 2d73 6964 6520 7769 7468 2061 2068 nt-side with a h\n+00161e60: 6f73 7420 3c63 6f64 653e 6e61 6d65 3c2f ost name parameter \n+00161e80: 746f 2072 6573 6f6c 7665 2074 6f20 6164 to resolve to ad\n+00161e90: 6472 6573 7320 3c63 6f64 653e 696e 6164 dress inad\n+00161ea0: 6472 3c2f 636f 6465 3e20 6279 2061 6464 dr by add\n+00161eb0: 7265 7373 2074 7261 6e73 6c61 7469 6f6e ress translation\n+00161ec0: 2e20 5768 656e 2073 7563 6365 7373 6675 . When successfu\n+00161ed0: 6c20 7365 7473 2070 6172 616d 6574 6572 l sets parameter\n+00161ee0: 203c 636f 6465 3e69 6e61 6464 723c 2f63 inaddr and returns\n+00161f00: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+00161f10: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n+00161ff0: 6572 726f 7220 636f 6465 2e20 5468 6520 error code. The \n+00162000: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+00162010: 6e20 6173 7369 676e 6564 2074 6f20 3c63 n assigned to soap\n+001620c0: 3a3a 6672 6573 6f6c 7665 3c2f 613e 3c2f ::fresolve is t\n+001620e0: 6370 5f67 6574 686f 7374 3c2f 636f 6465 cp_gethost.

    .

    <\n+00162120: 2f61 3e0a 6663 6f6e 6e65 6374 3c2f 6833 /a>.fconnect.

    int (\n+00162140: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+001621e0: 3a3a 6663 6f6e 6e65 6374 3c2f 613e 2928 ::fconnect)(\n+001621f0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00162200: 702c 2063 6f6e 7374 2063 6861 7220 2a65 p, const char *e\n+00162210: 6e64 706f 696e 742c 2063 6f6e 7374 2063 ndpoint, const c\n+00162220: 6861 7220 2a68 6f73 742c 2069 6e74 2070 har *host, int p\n+00162230: 6f72 7429 3c2f 636f 6465 3e3c 2f70 3e0a ort)

    .\n+00162240: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n+00162250: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n+00162260: 6520 656e 6769 6e65 2074 6f20 6f70 7469 e engine to opti\n+00162270: 6f6e 616c 6c79 206f 7665 7272 6964 6520 onally override \n+00162280: 636c 6965 6e74 2d73 6964 6520 636f 6e6e client-side conn\n+00162290: 6563 7469 6e67 2e20 5468 6520 7061 7261 ecting. The para\n+001622a0: 6d65 7465 7273 203c 636f 6465 3e68 6f73 meters hos\n+001622b0: 743c 2f63 6f64 653e 2061 6e64 203c 636f t and port w\n+001622d0: 6572 6520 6d69 6372 6f2d 7061 7273 6564 ere micro-parsed\n+001622e0: 2066 726f 6d20 7468 6520 3c63 6f64 653e from the \n+001622f0: 656e 6470 6f69 6e74 3c2f 636f 6465 3e20 endpoint \n+00162300: 7072 696f 7220 746f 2070 6173 7369 6e67 prior to passing\n+00162310: 2074 6865 6d20 746f 2074 6869 7320 6361 them to this ca\n+00162320: 6c6c 6261 636b 2e20 5265 7475 726e 7320 llback. Returns \n+00162330: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n+00162420: 7272 6f72 2063 6f64 652e 204e 6f20 6275 rror code. No bu\n+00162430: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n+00162440: 6973 2061 7373 6967 6e65 6420 746f 203c is assigned to <\n+00162450: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fconnect<\n+00162500: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n+00162510: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fdi\n+00162540: 7363 6f6e 6e65 6374 3c2f 6833 3e0a 3c70 sconnect

    .int (soap::fdisconne\n+00162600: 6374 3c2f 613e 2928 7374 7275 6374 2073 ct)(struct s\n+00162610: 6f61 7020 2a73 6f61 7029 3c2f 636f 6465 oap *soap)

    .

    This ca\n+00162630: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+00162640: 2062 7920 7468 6520 656e 6769 6e65 203c by the engine <\n+00162650: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_clo\n+001626d0: 7365 736f 636b 3c2f 613e 3c2f 636f 6465 sesock before the soap::fclose\n+00162790: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+001627a0: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t\n+001627b0: 6f20 7368 7574 646f 776e 2f64 6973 636f o shutdown/disco\n+001627c0: 6e6e 6563 742e 2052 6574 7572 6e73 203c nnect. Returns <\n+001627d0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+001627f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+001628b0: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n+001628c0: 726f 7220 636f 6465 2e20 4e6f 2062 7569 ror code. No bui\n+001628d0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i\n+001628e0: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to soap::f\n+00162990: 6469 7363 6f6e 6e65 6374 3c2f 613e 3c2f disconnect.

    .

    <\n+001629b0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001629c0: 2069 643d 2261 7574 6f74 6f63 5f6d 6435 id=\"autotoc_md5\n+001629d0: 3122 3e3c 2f61 3e0a 6663 6c6f 7365 736f 1\">.fcloseso\n+001629e0: 636b 6574 3c2f 6833 3e0a 3c70 3e3c 636f cket

    .

    int (soap::\n+00162a80: 6663 6c6f 7365 736f 636b 6574 3c2f 613e fclosesocket\n+00162a90: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n+00162aa0: 6f61 702c 2053 4f41 505f 534f 434b 4554 oap, SOAP_SOCKET\n+00162ab0: 2073 6f63 6b29 3c2f 636f 6465 3e3c 2f70 sock).

    This callba\n+00162ad0: 636b 2069 7320 6361 6c6c 6564 2074 6f20 ck is called to \n+00162ae0: 636c 6f73 6520 6120 736f 636b 6574 2062 close a socket b\n+00162af0: 7920 7468 6520 656e 6769 6e65 2e20 5265 y the engine. Re\n+00162b00: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n+00162b10: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n+00162b20: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n+00162be0: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n+00162bf0: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n+00162c00: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n+00162c10: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n+00162c20: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap:\n+00162cb0: 3a66 636c 6f73 6573 6f63 6b65 743c 2f61 :fclosesocket is tcp_closesocke\n+00162ce0: 743c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 t.

    ..fshut\n+00162d20: 646f 776e 736f 636b 6574 3c2f 6833 3e0a downsocket

    .\n+00162d30: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fshutd\n+00162dd0: 6f77 6e73 6f63 6b65 743c 2f61 3e29 2873 ownsocket)(s\n+00162de0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00162df0: 2c20 534f 4150 5f53 4f43 4b45 5420 736f , SOAP_SOCKET so\n+00162e00: 636b 2c20 696e 7420 686f 7729 3c2f 636f ck, int how)

    .

    This \n+00162e20: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+00162e30: 6564 2074 6f20 7368 7574 2064 6f77 6e20 ed to shut down \n+00162e40: 6120 736f 636b 6574 2062 7920 7468 6520 a socket by the \n+00162e50: 656e 6769 6e65 2e20 5265 7475 726e 7320 engine. Returns \n+00162e60: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n+00162f50: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n+00162f60: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+00162f70: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::f\n+00163010: 7368 7574 646f 776e 736f 636b 6574 3c2f shutdownsocket is tcp_shutdowns\n+00163040: 6f63 6b65 743c 2f63 6f64 653e 2e3c 2f70 ocket..

    .f\n+00163080: 706f 6c6c 3c2f 6833 3e0a 3c70 3e3c 636f poll

    .

    int (soap::fpoll<\n+00163160: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+00163170: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

    This callb\n+00163190: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n+001631a0: 2074 6865 2065 6e67 696e 6520 746f 2077 the engine to w\n+001631b0: 6169 7420 666f 7220 6163 7469 7669 7479 ait for activity\n+001631c0: 206f 6e20 7468 6520 3c63 6f64 653e 3c61 on the soap::sock\n+00163290: 6574 3c2f 613e 3c2f 636f 6465 3e20 6f72 et or\n+001632a0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00163360: 6f61 703a 3a6d 6173 7465 723c 2f61 3e3c oap::master<\n+00163370: 2f63 6f64 653e 2073 6f63 6b65 7420 7573 /code> socket us\n+00163380: 696e 6720 3c63 6f64 653e 706f 6c6c 3c2f ing poll or s\n+001633a0: 656c 6563 743c 2f63 6f64 653e 2e20 5469 elect. Ti\n+001633b0: 6d65 7320 6f75 7420 7768 656e 203c 636f mes out when soap:\n+00163470: 3a73 656e 645f 7469 6d65 6f75 743c 2f61 :send_timeout or soa\n+00163540: 703a 3a72 6563 765f 7469 6d65 6f75 743c p::recv_timeout<\n+00163550: 2f61 3e3c 2f63 6f64 653e 2061 7265 206e /a> are n\n+00163560: 6f6e 7a65 726f 2e20 5265 7475 726e 7320 onzero. Returns \n+00163570: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n+00163660: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n+00163670: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+00163680: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to s\n+00163750: 6f61 703a 3a66 706f 6c6c 3c2f 613e 3c2f oap::fpoll is s\n+00163770: 6f61 705f 706f 6c6c 3c2f 636f 6465 3e2e oap_poll.\n+00163780: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .frecv

    .

    \n+001637c0: 3c63 6f64 653e 7369 7a65 5f74 2028 3c61 size_t (soap::fre\n+00163870: 6376 3c2f 613e 2928 7374 7275 6374 2073 cv)(struct s\n+00163880: 6f61 7020 2a73 6f61 702c 2063 6861 7220 oap *soap, char \n+00163890: 2a62 7566 2c20 7369 7a65 5f74 206c 656e *buf, size_t len\n+001638a0: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n+001638b0: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+001638c0: 2063 616c 6c65 6420 6279 2074 6865 2065 called by the e\n+001638d0: 6e67 696e 6520 746f 2072 6563 6569 7665 ngine to receive\n+001638e0: 2028 6f72 2072 6561 6429 2064 6174 6120 (or read) data \n+001638f0: 696e 746f 2061 2073 7065 6369 6669 6564 into a specified\n+00163900: 2062 7566 6665 7220 3c63 6f64 653e 6275 buffer bu\n+00163910: 663c 2f63 6f64 653e 2061 6e64 203c 636f f and len. T\n+00163930: 6865 2073 6f75 7263 6520 666f 7220 7468 he source for th\n+00163940: 6520 6461 7461 2074 6f20 7265 6164 2062 e data to read b\n+00163950: 7920 7468 6973 2063 616c 6c62 6163 6b20 y this callback \n+00163960: 6973 203c 636f 6465 3e3c 6120 636c 6173 is soap::is when non-NU\n+00163a40: 4c4c 2c20 3c63 6f64 653e 3c61 2063 6c61 LL, soap::socket when v\n+00163b20: 616c 6964 2c20 6f72 203c 636f 6465 3e3c alid, or <\n+00163b30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00163b40: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00163b50: 6d6c 2361 3139 3263 3235 6363 3230 3636 ml#a192c25cc2066\n+00163b60: 3638 3630 3032 3132 6664 3334 6636 3534 68600212fd34f654\n+00163b70: 3166 3334 2220 7469 746c 653d 2254 6865 1f34\" title=\"The\n+00163b80: 2066 696c 6520 6465 7363 7269 7074 6f72 file descriptor\n+00163b90: 2074 6f20 7265 6164 2064 6174 6120 6672 to read data fr\n+00163ba0: 6f6d 2077 6865 6e20 6e6f 2073 6f63 6b65 om when no socke\n+00163bb0: 7420 636f 6d6d 756e 6963 6174 696f 6e73 t communications\n+00163bc0: 2061 7265 2073 6574 2028 736f 6170 3a3a are set (soap::\n+00163bd0: 736f 636b 6574 203d 3d20 2353 4f41 505f socket == #SOAP_\n+00163be0: 494e 2e2e 2e22 3e73 6f61 703a 3a72 6563 IN...\">soap::rec\n+00163bf0: 7666 643c 2f61 3e3c 2f63 6f64 653e 2e20 vfd. \n+00163c00: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+00163c10: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+00163c20: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+00163ce0: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+00163cf0: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n+00163d00: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n+00163d10: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n+00163d20: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::frecv<\n+00163dd0: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is frecv\n+00163df0: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fsend

    .int (soap::fsen\n+00163ed0: 643c 2f61 3e29 2873 7472 7563 7420 736f d)(struct so\n+00163ee0: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n+00163ef0: 6368 6172 202a 6275 662c 2073 697a 655f char *buf, size_\n+00163f00: 7420 6c65 6e29 3c2f 636f 6465 3e3c 2f70 t len).

    This callba\n+00163f20: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n+00163f30: 7468 6520 656e 6769 6e65 2074 6f20 7365 the engine to se\n+00163f40: 6e64 2028 6f72 2077 7269 7465 2920 6461 nd (or write) da\n+00163f50: 7461 2073 7065 6369 6669 6564 2062 7920 ta specified by \n+00163f60: 3c63 6f64 653e 6461 7461 3c2f 636f 6465 data bytes of lengt\n+00163f80: 6820 3c63 6f64 653e 6c65 6e3c 2f63 6f64 h len. The sink for\n+00163fa0: 2074 6865 2064 6174 6120 746f 2062 6520 the data to be \n+00163fb0: 7365 6e74 2074 6f20 6973 2074 7970 6963 sent to is typic\n+00163fc0: 616c 6c79 203c 636f 6465 3e3c 6120 636c ally soap::socket<\n+00164090: 2f61 3e3c 2f63 6f64 653e 2c20 3c63 6f64 /a>, soap::\n+00164160: 7365 6e64 6664 3c2f 613e 3c2f 636f 6465 sendfd or soap::os<\n+00164240: 2f63 6f64 653e 2e20 5265 7475 726e 7320 /code>. Returns \n+00164250: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n+00164340: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n+00164350: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+00164360: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soa\n+00164400: 703a 3a66 7365 6e64 3c2f 613e 3c2f 636f p::fsend is fse\n+00164420: 6e64 3c2f 636f 6465 3e2e 3c2f 703e 0a3c nd.

    .<\n+00164430: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fser\n+00164460: 7665 726c 6f6f 703c 2f68 333e 0a3c 703e verloop.

    \n+00164470: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soap::fserveloo\n+00164550: 703c 2f61 3e29 2873 7472 7563 7420 736f p)(struct so\n+00164560: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n+00164570: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+00164580: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+00164590: 6166 7465 7220 6561 6368 2073 7563 6365 after each succe\n+001645a0: 7373 6675 6c20 636f 6d70 6c65 7469 6f6e ssful completion\n+001645b0: 206f 6620 6120 7365 7276 6572 206f 7065 of a server ope\n+001645c0: 7261 7469 6f6e 2069 6e20 7468 6520 7365 ration in the se\n+001645d0: 7276 6572 206c 6f6f 702e 2045 7865 6375 rver loop. Execu\n+001645e0: 7465 7320 696d 6d65 6469 6174 656c 7920 tes immediately \n+001645f0: 6166 7465 7220 7365 6e64 696e 6720 7468 after sending th\n+00164600: 6520 7265 7370 6f6e 7365 2074 6f20 6120 e response to a \n+00164610: 636c 6965 6e74 2061 6e64 2062 6566 6f72 client and befor\n+00164620: 6520 7468 6520 6e65 7874 206b 6565 702d e the next keep-\n+00164630: 616c 6976 6520 7365 7276 6572 206c 6f6f alive server loo\n+00164640: 7020 6974 6572 6174 696f 6e20 7768 656e p iteration when\n+00164650: 2065 6e61 626c 6564 2077 6974 6820 3c63 enabled with #SOAP_IO_KEE\n+00164670: 5041 4c49 5645 3c2f 636f 6465 3e2e 2054 PALIVE. T\n+00164680: 6869 7320 6361 6c6c 6261 636b 2063 616e his callback can\n+00164690: 2062 6520 7573 6564 2074 6f20 7265 636c be used to recl\n+001646a0: 6169 6d20 7265 736f 7572 6365 7320 696e aim resources in\n+001646b0: 2074 6865 206b 6565 702d 616c 6976 6520 the keep-alive \n+001646c0: 7365 7276 6572 206c 6f6f 702c 2066 6f72 server loop, for\n+001646d0: 2065 7861 6d70 6c65 206d 616e 6167 6564 example managed\n+001646e0: 206d 656d 6f72 7920 6361 6e20 6265 2072 memory can be r\n+001646f0: 6563 6c61 696d 6564 2062 7920 6361 6c6c eclaimed by call\n+00164700: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing soap_de\n+001647c0: 7374 726f 793c 2f61 3e3c 2f63 6f64 653e stroy\n+001647d0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and s\n+001648a0: 6f61 705f 656e 643c 2f61 3e3c 2f63 6f64 oap_end in that order\n+001648c0: 2061 6e64 2061 6c6c 2064 6573 6572 6961 and all deseria\n+001648d0: 6c69 7a65 6420 616e 6420 6f74 6865 7220 lized and other \n+001648e0: 6479 6e61 6d69 6361 6c6c 792d 616c 6c6f dynamically-allo\n+001648f0: 6361 7465 6420 6461 7461 206d 616e 6167 cated data manag\n+00164900: 6564 2062 7920 7468 6520 636f 6e74 6578 ed by the contex\n+00164910: 7420 7769 6c6c 2062 6520 6465 616c 6c6f t will be deallo\n+00164920: 6361 7465 642e 2052 6574 7572 6e73 203c cated. Returns <\n+00164930: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+00164950: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+00164a10: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n+00164a20: 726f 7220 636f 6465 2e20 4e6f 2062 7569 ror code. No bui\n+00164a30: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i\n+00164a40: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to soap::\n+00164b20: 6673 6572 7665 6c6f 6f70 3c2f 613e 3c2f fserveloop.

    .

    <\n+00164b40: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00164b50: 2069 643d 2261 7574 6f74 6f63 5f6d 6435 id=\"autotoc_md5\n+00164b60: 3722 3e3c 2f61 3e0a 666d 616c 6c6f 633c 7\">.fmalloc<\n+00164b70: 2f68 333e 0a3c 703e 3c63 6f64 653e 766f /h3>.

    vo\n+00164b80: 6964 2028 3c61 2063 6c61 7373 3d22 656c id (\n+00164c20: 736f 6170 3a3a 666d 616c 6c6f 633c 2f61 soap::fmalloc)(struct soap *\n+00164c40: 736f 6170 2c20 7369 7a65 5f74 2073 697a soap, size_t siz\n+00164c50: 6529 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 e)

    .This callback c\n+00164c70: 616e 2062 6520 7573 6564 2074 6f20 6f76 an be used to ov\n+00164c80: 6572 7269 6465 206d 656d 6f72 7920 616c erride memory al\n+00164c90: 6c6f 6361 7469 6f6e 2061 6e64 206d 616e location and man\n+00164ca0: 6167 656d 656e 7420 646f 6e65 2062 7920 agement done by \n+00164cb0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_mal\n+00164d60: 6c6f 633c 2f61 3e3c 2f63 6f64 653e 2069 loc i\n+00164d70: 6e20 432e 204d 656d 6f72 7920 616c 6c6f n C. Memory allo\n+00164d80: 6361 7465 6420 7669 6120 7468 6973 2063 cated via this c\n+00164d90: 616c 6c62 6163 6b20 7769 6c6c 206e 6f74 allback will not\n+00164da0: 2062 6520 6d61 6e61 6765 6420 616e 6420 be managed and \n+00164db0: 6e6f 7420 6265 2061 7574 6f6d 6174 6963 not be automatic\n+00164dc0: 616c 6c79 2072 656c 6561 7365 6420 6279 ally released by\n+00164dd0: 2074 6865 2065 6e67 696e 652e 2049 6e73 the engine. Ins\n+00164de0: 7465 6164 2c20 7468 6520 6170 706c 6963 tead, the applic\n+00164df0: 6174 696f 6e20 7573 696e 6720 7468 6973 ation using this\n+00164e00: 2063 616c 6c62 6163 6b20 7368 6f75 6c64 callback should\n+00164e10: 2072 656c 6561 7365 2061 6c6c 6f63 6174 release allocat\n+00164e20: 6564 206d 656d 6f72 792e 2041 6c6c 2061 ed memory. All a\n+00164e30: 6c6c 6f63 6174 696f 6e73 2064 6f6e 6520 llocations done \n+00164e40: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap_\n+00164ef0: 6d61 6c6c 6f63 3c2f 613e 3c2f 636f 6465 malloc are replaced w\n+00164f10: 6974 6820 6120 6361 6c6c 2074 6f20 3c63 ith a call to \n+00164fc0: 736f 6170 3a3a 666d 616c 6c6f 633c 2f61 soap::fmalloc. Howeve\n+00164fe0: 722c 206e 6f20 6f74 6865 7220 616c 6c6f r, no other allo\n+00164ff0: 6361 7469 6f6e 732c 2073 7563 6820 6173 cations, such as\n+00165000: 203c 636f 6465 3e3c 6120 636c 6173 733d so\n+00165090: 6170 5f6e 6577 3c2f 613e 3c2f 636f 6465 ap_new and soap\n+001650b0: 5f6e 6577 5f54 3c2f 636f 6465 3e20 666f _new_T fo\n+001650c0: 7220 432b 2b20 636c 6173 7365 7320 3c63 r C++ classes T are\n+001650e0: 2061 6666 6563 7465 642c 2062 6563 6175 affected, becau\n+001650f0: 7365 206f 626a 6563 7473 2061 7265 2061 se objects are a\n+00165100: 6c6c 6f63 6174 6564 2064 6966 6665 7265 llocated differe\n+00165110: 6e74 6c79 2e20 5468 6973 2063 616c 6c62 ntly. This callb\n+00165120: 6163 6b20 6973 2074 6865 7265 666f 7265 ack is therefore\n+00165130: 206e 6f74 2075 7365 6675 6c20 666f 7220 not useful for \n+00165140: 432b 2b20 6170 706c 6963 6174 696f 6e73 C++ applications\n+00165150: 2e20 5265 7475 726e 7320 6120 706f 696e . Returns a poin\n+00165160: 7465 7220 746f 2064 796e 616d 6963 616c ter to dynamical\n+00165170: 6c79 2061 6c6c 6f63 6174 6564 206d 656d ly allocated mem\n+00165180: 6f72 7920 6f72 204e 554c 4c20 6f6e 2066 ory or NULL on f\n+00165190: 6169 6c75 7265 2074 6f20 616c 6c6f 6361 ailure to alloca\n+001651a0: 7465 2e20 4e6f 2062 7569 6c74 2d69 6e20 te. No built-in \n+001651b0: 6675 6e63 7469 6f6e 2069 7320 6173 7369 function is assi\n+001651c0: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::\n+00165270: 666d 616c 6c6f 633c 2f61 3e3c 2f63 6f64 fmalloc.

    .
    Warning<\n+001652b0: 2f64 743e 3c64 643e 4465 7072 6563 6174 /dt>
    Deprecat\n+001652c0: 6564 2073 696e 6365 2032 2e38 2e37 322e ed since 2.8.72.\n+001652d0: 2044 6566 696e 6520 3c63 6f64 653e 2353 Define #S\n+001652e0: 4f41 505f 4d41 4c4c 4f43 3c2f 636f 6465 OAP_MALLOC and #SOA\n+00165300: 505f 4652 4545 3c2f 636f 6465 3e20 696e P_FREE in\n+00165310: 7374 6561 642e 3c2f 6464 3e3c 2f64 6c3e stead.
    \n+00165320: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    .us\n+00165350: 6572 2076 6172 6961 626c 653c 2f68 333e er variable

    \n+00165360: 0a3c 703e 4120 3c63 6f64 653e 766f 6964 .

    A void\n+00165370: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::\n+00165430: 7573 6572 3c2f 613e 3c2f 636f 6465 3e20 user \n+00165440: 7661 7269 6162 6c65 2069 7320 6176 6169 variable is avai\n+00165450: 6c61 626c 6520 746f 2070 6173 7320 7573 lable to pass us\n+00165460: 6572 2d64 6566 696e 6564 2064 6174 6120 er-defined data \n+00165470: 746f 2074 6865 2063 616c 6c62 6163 6b73 to the callbacks\n+00165480: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .Examples

    \n+001654c0: 0a3c 703e 5468 6520 666f 6c6c 6f77 696e .

    The followin\n+001654d0: 6720 6578 616d 706c 6520 7573 6573 2049 g example uses I\n+001654e0: 2f4f 2063 616c 6c62 6163 6b73 2066 6f72 /O callbacks for\n+001654f0: 2063 7573 746f 6d69 7a65 6420 7365 7269 customized seri\n+00165500: 616c 697a 6174 696f 6e20 6f66 2064 6174 alization of dat\n+00165510: 6120 696e 746f 2061 2066 6978 6564 2d73 a into a fixed-s\n+00165520: 697a 6520 6275 6666 6572 2061 6e64 2064 ize buffer and d\n+00165530: 6573 6572 6961 6c69 7a61 7469 6f6e 2062 eserialization b\n+00165540: 6163 6b20 696e 746f 2061 2064 6174 6120 ack into a data \n+00165550: 7374 7275 6374 7572 653a 3c2f 703e 0a3c structure:

    .<\n+00165560: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00165570: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    char buf\n+001655b0: 5b31 3030 3030 5d3b 203c 7370 616e 2063 [10000]; /\n+001655d0: 2f20 584d 4c20 6275 6666 6572 203c 2f73 / XML buffer
    .
    int len1 = 0; <\n+00165630: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00165640: 656e 7422 3e2f 2f20 2363 6861 7273 2077 ent\">// #chars w\n+00165650: 7269 7474 656e 203c 2f73 7061 6e3e 3c2f ritten .
    int len2\n+001656a0: 203d 2030 3b20 2020 203c 7370 616e 2063 = 0; /\n+001656c0: 2f20 2363 6861 7273 2072 6561 6420 3c2f / #chars read
    . <\n+001656f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+00165720: 206d 7973 656e 643a 2070 7574 2058 4d4c mysend: put XML\n+00165730: 2069 6e20 6275 665b 5d20 3c2f 7370 616e in buf[]
    .
    int m\n+00165780: 7973 656e 6428 3c73 7061 6e20 636c 6173 ysend(stru\n+001657a0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, const <\n+00165830: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00165840: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *s, size_t\n+00165880: 206e 2920 3c2f 6469 763e 0a3c 6469 7620 n)
    .
    {.
    if (le\n+001658e0: 6e31 202b 206e 2026 6774 3b20 3c73 7061 n1 + n > sizeof(\n+00165910: 6275 6629 2920 3c2f 6469 763e 0a3c 6469 buf))
    . \n+00165930: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n+00165950: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n+001659b0: 4f41 505f 454f 463c 2f61 3e3b 203c 2f64 OAP_EOF; .
    strcpy(b\n+001659e0: 7566 202b 206c 656e 312c 2073 293b 203c uf + len1, s); <\n+001659f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    len1 +\n+00165a10: 3d20 6e3b 203c 2f64 6976 3e0a 3c64 6976 = n;
    . \n+00165a30: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+00165a50: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n+00165ab0: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    .\n+00165ac0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    // \n+00165b20: 6d79 7265 6376 3a20 6765 7420 584d 4c20 myrecv: get XML \n+00165b30: 6672 6f6d 2062 7566 5b5d 203c 2f73 7061 from buf[]
    .
    size_t myrecv(\n+00165ba0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00165be0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00165bf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00165c00: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00165c10: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *s, size_t n)
    .{<\n+00165c80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (l\n+00165cc0: 656e 3220 2b20 6e20 2667 743b 206c 656e en2 + n > len\n+00165cd0: 3129 203c 2f64 6976 3e0a 3c64 6976 2063 1)
    .
    \n+00165cf0: 6e20 3d20 6c65 6e31 202d 206c 656e 323b n = len1 - len2;\n+00165d00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    strn\n+00165d20: 6370 7928 732c 2062 7566 202b 206c 656e cpy(s, buf + len\n+00165d30: 322c 206e 293b 203c 2f64 6976 3e0a 3c64 2, n);
    .\n+00165d50: 2020 6c65 6e32 202b 3d20 6e3b 203c 2f64 len2 += n; .
    return \n+00165da0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    } .
    .<\n+00165de0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00165df0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main() .
    {
    .\n+00165e50: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+00165e70: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+00165ea0: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa\n+00165ed0: 703c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 p;
    .\n+00165ef0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+00165f10: 2f73 7061 6e3e 6e73 5f5f 7065 7273 6f6e /span>ns__person\n+00165f20: 2070 3b20 3c2f 6469 763e 0a3c 6469 7620 p;
    .
    <\n+00165f40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00165f50: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00165f60: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00165f70: 6761 6338 3731 3236 6333 6534 3564 3266 gac87126c3e45d2f\n+00165f80: 6461 3438 3865 3938 3332 6332 6464 3562 da488e9832c2dd5b\n+00165f90: 6531 223e 736f 6170 5f69 6e69 7431 3c2f e1\">soap_init1(&s\n+00165fd0: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, SOAP\n+00166030: 5f58 4d4c 5f54 5245 453c 2f61 3e29 3b20 _XML_TREE); \n+00166040: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    len1 \n+00166060: 3d20 6c65 6e32 203d 2030 3b20 2020 2020 = len2 = 0; \n+00166070: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // reset b\n+00166090: 7566 6665 7220 706f 696e 7465 7273 203c uffer pointers <\n+001660a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001660c0: 2070 2e6e 616d 6520 3d20 3c73 7061 6e20 p.name = "John\n+001660f0: 2044 6f65 2671 756f 743b 3c2f 7370 616e Doe";
    .
    p.\n+00166120: 6167 6520 3d20 3235 3b20 3c2f 6469 763e age = 25;
    \n+00166130: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n+00166170: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fsen\n+001661d0: 643c 2f61 3e20 3d20 6d79 7365 6e64 3b20 d = mysend; \n+001661e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // assign \n+00166200: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback \n+00166210: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.frecv = my\n+001662c0: 7265 6376 3b20 3c73 7061 6e20 636c 6173 recv; // a\n+001662e0: 7373 6967 6e20 6361 6c6c 6261 636b 203c ssign callback <\n+001662f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00166310: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_write\n+00166340: 5f6e 735f 5f70 6572 736f 6e28 2661 6d70 _ns__person(&\n+00166350: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00166380: 2c20 2661 6d70 3b70 2929 3c2f 6469 763e , &p))
    \n+00166390: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+001663c0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print\n+00166420: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(&\n+00166430: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00166460: 2073 7464 6f75 7429 3b20 3c2f 6469 763e stdout);

    \n+00166470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT\n+00166490: 5f46 4149 4c55 5245 293b 203c 2f64 6976 _FAILURE); .
    }
    .<\n+001664c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001664d0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+001664f0: 2f73 7061 6e3e 2028 736f 6170 5f72 6561 /span> (soap_rea\n+00166500: 645f 6e73 5f5f 5065 7273 6f6e 2826 616d d_ns__Person(&am\n+00166510: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, &p)).
    {
    .\n+00166580: 2020 2020 3c61 2063 6c61 7373 3d22 636f
    soap_prin\n+001665e0: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(&\n+001665f0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00166620: 2c20 7374 646f 7574 293b 203c 2f64 6976 , stdout); .
    exit(EXI\n+00166650: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    }
    .\n+00166680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_de\n+001666f0: 7374 726f 793c 2f61 3e28 2661 6d70 3b3c stroy(&<\n+00166700: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00166710: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00166720: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+00166730: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_end(&a\n+001667b0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    . \n+00166800: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s\n+00166890: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n+001668a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    s\n+00166970: 6f61 703a 3a66 7265 6376 3c2f 613e 3c2f oap::frecv
    size_t(*\n+001669a0: 2066 7265 6376 2928 7374 7275 6374 2073 frecv)(struct s\n+001669b0: 6f61 7020 2a73 6f61 702c 2063 6861 7220 oap *soap, char \n+001669c0: 2a62 7566 2c20 7369 7a65 5f74 206c 656e *buf, size_t len\n+001669d0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n+001669f0: 636b 2074 6861 7420 7265 6365 6976 6573 ck that receives\n+00166a00: 2062 7974 6573 206f 6620 6461 7461 2069 bytes of data i\n+00166a10: 6e74 6f20 7468 6520 6769 7665 6e20 6275 nto the given bu\n+00166a20: 6666 6572 2e3c 2f64 6976 3e3c 6469 7620 ffer.
    Definition:\n+00166a50: 2073 7464 736f 6170 322e 683a 3436 3037 stdsoap2.h:4607\n+00166a60: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .Callback that s\n+00166bb0: 656e 6473 2074 6865 2067 6976 656e 2062 ends the given b\n+00166bc0: 7974 6573 206f 6620 6461 7461 2e3c 2f64 ytes of data.
    Definit\n+00166bf0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00166c00: 322e 683a 3436 3230 3c2f 6469 763e 3c2f 2.h:4620
    .

    A\n+00166c30: 2066 6978 6564 2d73 697a 6520 6275 6666 fixed-size buff\n+00166c40: 6572 2074 6f20 7374 6f72 6520 7468 6520 er to store the \n+00166c50: 6f75 7462 6f75 6e64 206d 6573 7361 6765 outbound message\n+00166c60: 2073 656e 7420 6973 206e 6f74 2066 6c65 sent is not fle\n+00166c70: 7869 626c 6520 746f 2068 616e 646c 6520 xible to handle \n+00166c80: 6c61 7267 6520 636f 6e74 656e 742e 2054 large content. T\n+00166c90: 6f20 7374 6f72 6520 7468 6520 6d65 7373 o store the mess\n+00166ca0: 6167 6520 696e 2061 6e20 6578 7061 6e64 age in an expand\n+00166cb0: 696e 6720 6275 6666 6572 3a3c 2f70 3e0a ing buffer:

    .\n+00166cc0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+00166d00: 7275 6374 203c 2f73 7061 6e3e 6275 6666 ruct buff\n+00166d10: 6572 203c 2f64 6976 3e0a 3c64 6976 2063 er
    .
    {.
    size_t \n+00166d70: 6c65 6e3b 203c 2f64 6976 3e0a 3c64 6976 len;
    . \n+00166d90: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+00166db0: 3c2f 7370 616e 3e20 6d61 783b 203c 2f64 max; .
    char *b\n+00166e00: 7566 3b20 3c2f 6469 763e 0a3c 6469 7620 uf;
    .
    }; \n+00166e20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00166e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n+00166e70: 3c2f 7370 616e 3e20 6d61 696e 2829 203c main() <\n+00166e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+00166ea0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .\n+00166f40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n+00166f70: 203c 2f73 7061 6e3e 6e73 5f5f 7065 7273 ns__pers\n+00166f80: 6f6e 2070 3b20 3c2f 6469 763e 0a3c 6469 on p;
    . \n+00166fa0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct buffer *h =\n+00166fd0: 206d 616c 6c6f 6328 3c73 7061 6e20 636c malloc(si\n+00166ff0: 7a65 6f66 3c2f 7370 616e 3e28 3c73 7061 zeof(struct \n+00167020: 6275 6666 6572 2929 3b20 3c2f 6469 763e buffer));
    \n+00167030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    h->len =\n+00167050: 2030 3b20 3c2f 6469 763e 0a3c 6469 7620 0;
    .
    h\n+00167070: 2d26 6774 3b6d 6178 203d 2030 3b20 3c2f ->max = 0; .
    h->b\n+001670a0: 7566 203d 204e 554c 4c3b 203c 2f64 6976 uf = NULL; .
    soap_\n+00167120: 696e 6974 313c 2f61 3e28 2661 6d70 3b3c init1(&<\n+00167130: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00167140: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00167150: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00167160: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_XML_TREE\n+001671c0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+001671e0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.user<\n+00167260: 2f61 3e20 3d20 283c 7370 616e 2063 6c61 /a> = (void*)h;\n+00167290: 203c 7370 616e 2063 6c61 7373 3d22 636f // pass b\n+001672b0: 7566 6665 7220 6173 2061 2068 616e 646c uffer as a handl\n+001672c0: 6520 746f 2074 6865 2063 616c 6c62 6163 e to the callbac\n+001672d0: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    .\n+001672e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n+00167320: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.fsend\n+00167380: 3c2f 613e 203d 206d 7973 656e 643b 2020 = mysend; \n+00167390: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // assign \n+001673b0: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback \n+001673c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+00167400: 736f 6170 5f77 7269 7465 5f6e 735f 5f70 soap_write_ns__p\n+00167410: 6572 736f 6e28 2661 6d70 3b3c 6120 636c erson(&soap, &\n+00167450: 3b70 2929 3c2f 6469 763e 0a3c 6469 7620 ;p))
    .
    {\n+00167470: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    \n+00167550: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n+00167560: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    . \n+00167580: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    if\n+001675c0: 2028 682d 2667 743b 6c65 6e29 203c 2f64 (h->len) .
    {
    .\n+001675f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... \n+00167620: 2f2f 2075 7365 2068 2d26 6774 3b62 7566 // use h->buf\n+00167630: 5b30 2e2e 682d 2667 743b 6c65 6e2d 315d [0..h->len-1]\n+00167640: 2063 6f6e 7465 6e74 203c 2f73 7061 6e3e content \n+00167650: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    // then clean\n+00167690: 7570 3a20 3c2f 7370 616e 3e3c 2f64 6976 up: .
    h->le\n+001676c0: 6e20 3d20 303b 203c 2f64 6976 3e0a 3c64 n = 0;
    .\n+001676e0: 2020 2020 682d 2667 743b 6d61 7820 3d20 h->max = \n+001676f0: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
    .
    \n+00167710: 6672 6565 2868 2d26 6774 3b62 7566 293b free(h->buf);\n+00167720: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    h-\n+00167740: 2667 743b 6275 6620 3d20 4e55 4c4c 3b20 >buf = NULL; \n+00167750: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n+001678e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_do\n+00167950: 6e65 3c2f 613e 2826 616d 703b 3c61 2063 ne(&soap);.
    }
    .<\n+001679b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001679c0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n+00167a00: 6d79 7365 6e64 283c 7370 616e 2063 6c61 mysend(str\n+00167a20: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n+00167ab0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *s, size_t n)
    .{<\n+00167b20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00167b50: 7374 7275 6374 203c 2f73 7061 6e3e 6275 struct bu\n+00167b60: 6666 6572 202a 6820 3d20 283c 7370 616e ffer *h = (struct b\n+00167b90: 7566 6665 722a 293c 6120 636c 6173 733d uffer*)so\n+00167bc0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->user; // get buffe\n+00167c40: 7220 7468 726f 7567 6820 6861 6e64 6c65 r through handle\n+00167c50: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00167c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167c70: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > int\n+00167c90: 3c2f 7370 616e 3e20 6d20 3d20 682d 2667 m = h-&g\n+00167ca0: 743b 6d61 782c 206b 203d 2068 2d26 6774 t;max, k = h->\n+00167cb0: 3b6c 656e 202b 206e 3b20 3c2f 6469 763e ;len + n;
    \n+00167cc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // ne\n+00167cf0: 6564 2074 6f20 696e 6372 6561 7365 2073 ed to increase s\n+00167d00: 7061 6365 3f20 3c2f 7370 616e 3e3c 2f64 pace? .
    if (m ==\n+00167d30: 2030 2920 3c2f 6469 763e 0a3c 6469 7620 0)
    .
    \n+00167d50: 206d 203d 2031 3032 343b 203c 2f64 6976 m = 1024; .
    \n+00167d90: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    while \n+00167de0: 286b 2026 6774 3b3d 206d 2920 3c2f 6469 (k >= m) .
    m *= \n+00167e10: 323b 203c 2f64 6976 3e0a 3c64 6976 2063 2;
    .
    if (m != h->ma\n+00167e60: 7829 203c 2f64 6976 3e0a 3c64 6976 2063 x)
    .
    {<\n+00167e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *buf = malloc(\n+00167ed0: 6d29 3b20 3c2f 6469 763e 0a3c 6469 7620 m);
    .
    \n+00167ef0: 206d 656d 6370 7928 6275 662c 2068 2d26 memcpy(buf, h-&\n+00167f00: 6774 3b62 7566 2c20 682d 2667 743b 6c65 gt;buf, h->le\n+00167f10: 6e29 3b20 3c2f 6469 763e 0a3c 6469 7620 n);
    .
    \n+00167f30: 2068 2d26 6774 3b6d 6178 203d 206d 3b20 h->max = m; \n+00167f40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if\n+00167f80: 2028 682d 2667 743b 6275 6629 203c 2f64 (h->buf) .
    free\n+00167fb0: 2868 2d26 6774 3b62 7566 293b 203c 2f64 (h->buf); .
    h->\n+00167fe0: 6275 6620 3d20 6275 663b 203c 2f64 6976 buf = buf; .
    }
    .<\n+00168010: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00168020: 3e20 206d 656d 6370 7928 682d 2667 743b > memcpy(h->\n+00168030: 6275 6620 2b20 682d 2667 743b 6c65 6e2c buf + h->len,\n+00168040: 2073 2c20 6e29 3b20 3c2f 6469 763e 0a3c s, n);
    .<\n+00168050: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00168060: 3e20 2068 2d26 6774 3b6c 656e 202b 3d20 > h->len += \n+00168070: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    ..\n+00168130: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n+00168150: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following \n+00168160: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra\n+00168170: 7465 7320 6375 7374 6f6d 697a 6564 2049 tes customized I\n+00168180: 2f4f 2061 6e64 2048 5454 5020 6865 6164 /O and HTTP head\n+00168190: 6572 2068 616e 646c 696e 672e 2054 6865 er handling. The\n+001681a0: 2058 4d4c 206d 6573 7361 6765 2069 7320 XML message is \n+001681b0: 7361 7665 6420 746f 2061 2066 696c 6520 saved to a file \n+001681c0: 746f 2064 656d 6f6e 7374 7261 7465 2049 to demonstrate I\n+001681d0: 2f4f 2061 6e64 2048 5454 5020 6361 6c6c /O and HTTP call\n+001681e0: 6261 636b 732e 2054 6865 2063 6c69 656e backs. The clien\n+001681f0: 7420 7072 6f78 7920 7468 656e 2072 6561 t proxy then rea\n+00168200: 6473 2074 6865 2066 696c 6520 636f 6e74 ds the file cont\n+00168210: 656e 7473 2061 7320 7468 6520 7365 7276 ents as the serv\n+00168220: 6963 6520 7265 7370 6f6e 7365 2e20 546f ice response. To\n+00168230: 2070 6572 666f 726d 2074 6869 7320 7472 perform this tr\n+00168240: 6963 6b2c 2074 6865 2073 6572 7669 6365 ick, the service\n+00168250: 2072 6573 706f 6e73 6520 6861 7320 6578 response has ex\n+00168260: 6163 746c 7920 7468 6520 7361 6d65 2073 actly the same s\n+00168270: 7472 7563 7475 7265 2061 7320 7468 6520 tructure as the \n+00168280: 7265 7175 6573 742e 2054 6869 7320 6973 request. This is\n+00168290: 2064 6563 6c61 7265 6420 6279 2074 6865 declared by the\n+001682a0: 203c 636f 6465 3e73 7472 7563 7420 6e73 struct ns\n+001682b0: 5f5f 7465 7374 3c2f 636f 6465 3e20 6f75 __test ou\n+001682c0: 7470 7574 2070 6172 616d 6574 6572 2070 tput parameter p\n+001682d0: 6172 7420 6f66 2074 6865 2073 6572 7669 art of the servi\n+001682e0: 6365 206f 7065 7261 7469 6f6e 2064 6563 ce operation dec\n+001682f0: 6c61 7261 7469 6f6e 2e20 5468 6973 2073 laration. This s\n+00168300: 7472 7563 7420 7265 7365 6d62 6c65 7320 truct resembles \n+00168310: 7468 6520 7365 7276 6963 6520 7265 7175 the service requ\n+00168320: 6573 7420 2873 6565 2074 6865 2067 656e est (see the gen\n+00168330: 6572 6174 6564 203c 656d 3e3c 636f 6465 erated soapStub.h file gen\n+00168360: 6572 6174 6564 2062 7920 736f 6170 6370 erated by soapcp\n+00168370: 7032 2066 726f 6d20 7468 6520 696e 7465 p2 from the inte\n+00168380: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+00168390: 6520 696e 7075 7429 2e3c 2f70 3e0a 3c70 e input).

    .The interface h\n+001683b0: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s\n+001683c0: 6f61 7063 7070 3220 6973 3a3c 2f70 3e0a oapcpp2 is:

    .\n+001683d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n+00168410: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+00168420: 206e 616d 653a 2063 616c 6c62 6163 6b20 name: callback \n+00168430: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00168450: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+00168470: 2073 6572 7669 6365 206e 616d 6573 7061 service namespa\n+00168480: 6365 3a20 7572 6e3a 6361 6c6c 6261 636b ce: urn:callback\n+00168490: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001684a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001684b0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__person \n+001684e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00168500: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char *na\n+00168540: 6d65 3b20 3c2f 6469 763e 0a3c 6469 7620 me;
    .
    \n+00168560: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int age; .
    };
    .\n+001685c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__test(struct ns__person in,\n+00168620: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct ns__test &a\n+00168650: 6d70 3b6f 7574 293b 3c2f 6469 763e 0a3c mp;out);
    .<\n+00168660: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The cli\n+00168680: 656e 7420 7072 6f67 7261 6d20 6973 3a3c ent program is:<\n+00168690: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #include \n+001686e0: 2671 756f 743b 736f 6170 482e 6826 7175 "soapH.h&qu\n+001686f0: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .
    #\n+00168730: 696e 636c 7564 6520 2671 756f 743b 6e73 include "ns\n+00168740: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap"
    .
    .
    SOAP_SO\n+001687e0: 434b 4554 3c2f 613e 206d 796f 7065 6e28 CKET myopen(\n+001687f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00168840: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+00168870: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , cons\n+00168890: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001688c0: 656e 6470 6f69 6e74 2c20 3c73 7061 6e20 endpoint, \n+001688e0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *host, int p\n+00168940: 6f72 7429 203c 2f64 6976 3e0a 3c64 6976 ort)
    .{<\n+00168960: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (s\n+001689a0: 7472 6e63 6d70 2865 6e64 706f 696e 742c trncmp(endpoint,\n+001689b0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+001689d0: 6f74 3b66 696c 653a 2671 756f 743b 3c2f ot;file:", 5)) .
    {
    .\n+00168a20: 2020 2020 7072 696e 7466 283c 7370 616e printf("Fil\n+00168a50: 6520 6e61 6d65 2065 7870 6563 7465 645c e name expected\\\n+00168a60: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 293b n"
    );\n+00168a70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return SOAP_INV\n+00168b10: 414c 4944 5f53 4f43 4b45 543c 2f61 3e3b ALID_SOCKET;\n+00168b20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    if ((<\n+00168b80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00168b90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00168ba0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00168bb0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;send\n+00168c00: 6664 3c2f 613e 203d 203c 6120 636c 6173 fd = \n+00168c30: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->recvfd\n+00168c90: 203d 206f 7065 6e28 686f 7374 2c20 4f5f = open(host, O_\n+00168ca0: 5244 5752 7c4f 5f43 5245 4154 2c20 535f RDWR|O_CREAT, S_\n+00168cb0: 4957 5553 527c 535f 4952 5553 5229 2920 IWUSR|S_IRUSR)) \n+00168cc0: 266c 743b 2030 2920 3c2f 6469 763e 0a3c < 0)
    .<\n+00168cd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00168ce0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n+00168d00: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn S\n+00168d60: 4f41 505f 494e 5641 4c49 445f 534f 434b OAP_INVALID_SOCK\n+00168d70: 4554 3c2f 613e 3b20 3c2f 6469 763e 0a3c ET;
    .<\n+00168d80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00168d90: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+00168db0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn soap-><\n+00168df0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00168e00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00168e10: 6874 6d6c 2361 3230 3064 3731 6139 3031 html#a200d71a901\n+00168e20: 6364 6335 6339 6161 3032 3134 3065 3964 cdc5c9aa02140e9d\n+00168e30: 3233 3639 6239 223e 7365 6e64 6664 3c2f 2369b9\">sendfd;
    .
    } <\n+00168e60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n+00168e80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n+00168eb0: 3c2f 7370 616e 3e20 6d79 636c 6f73 6528 myclose(\n+00168ec0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00168f10: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+00168f40: 3c2f 613e 2920 3c2f 6469 763e 0a3c 6469 )
    .{\n+00168f60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+00168fa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00168fd0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >sen\n+00169020: 6466 643c 2f61 3e20 2667 743b 2032 2920 dfd > 2) \n+00169030: 203c 7370 616e 2063 6c61 7373 3d22 636f // still \n+00169050: 6f70 656e 3f20 3c2f 7370 616e 3e3c 2f64 open? .
    close(\n+00169080: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001690b0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >sen\n+00169100: 6466 643c 2f61 3e29 3b20 3c73 7061 6e20 dfd); \n+00169120: 2f2f 2074 6865 6e20 636c 6f73 6520 6974 // then close it\n+00169130: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00169140: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00169150: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n+001691d0: 7265 6376 6664 3c2f 613e 203d 2030 3b20 recvfd = 0; \n+001691e0: 2020 2020 203c 7370 616e 2063 6c61 7373 // se\n+00169200: 7420 6261 636b 2074 6f20 7374 6469 6e20 t back to stdin \n+00169210: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00169230: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->s\n+001692b0: 656e 6466 643c 2f61 3e20 3d20 313b 2020 endfd = 1; \n+001692c0: 2020 2020 3c73 7061 6e20 636c 6173 733d // set\n+001692e0: 2062 6163 6b20 746f 2073 7464 6f75 7420 back to stdout \n+001692f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00169310: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    i\n+00169360: 6e74 3c2f 7370 616e 3e20 6d79 706f 7374 nt mypost\n+00169370: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001693c0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001693f0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, con\n+00169410: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00169440: 2a65 6e64 706f 696e 742c 203c 7370 616e *endpoint, const char *host, const char *path, const char *action, U\n+00169590: 4c4f 4e47 3634 3c2f 613e 2063 6f75 6e74 LONG64 count\n+001695a0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    return <\n+00169600: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169610: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00169620: 705f 5f69 6f2e 6874 6d6c 2367 6137 3731 p__io.html#ga771\n+00169630: 3266 3562 6333 3631 3237 3035 3061 3131 2f5bc36127050a11\n+00169640: 6164 3939 3564 3035 3933 6264 6322 3e73 ad995d0593bdc\">s\n+00169650: 6f61 705f 7365 6e64 3c2f 613e 283c 6120 oap_send(soap, "\n+001696b0: 4375 7374 6f6d 2d67 656e 6572 6174 6564 Custom-generated\n+001696c0: 2066 696c 655c 6e26 7175 6f74 3b3c 2f73 file\\n"); // \n+001696f0: 7772 6974 6573 2074 6f20 736f 6170 2d26 writes to soap-&\n+00169700: 6774 3b73 656e 6466 6420 3c2f 7370 616e gt;sendfd
    .
    } .
    .<\n+00169760: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00169770: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int myparse(struct \n+001697b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001697e0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00169810: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    char buf\n+00169870: 5b32 3536 5d3b 203c 2f64 6976 3e0a 3c64 [256];
    .\n+00169890: 2020 3c73 7061 6e20 636c 6173 733d 226b if (lseek(soap->\n+001698f0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;recvfd\n+00169940: 3c2f 613e 2c20 302c 2053 4545 4b5f 5345 , 0, SEEK_SE\n+00169950: 5429 2026 6c74 3b20 3020 7c7c 203c 6120 T) < 0 || soa\n+001699b0: 705f 6765 746c 696e 653c 2f61 3e28 3c61 p_getline(soap, b\n+001699f0: 7566 2c20 3235 3629 2920 3c73 7061 6e20 uf, 256)) \n+00169a10: 2f2f 2067 6f20 746f 2062 6567 696e 2061 // go to begin a\n+00169a20: 6e64 2073 6b69 7020 6375 7374 6f6d 2068 nd skip custom h\n+00169a30: 6561 6465 7220 3c2f 7370 616e 3e3c 2f64 eader .
    return SOAP_EOF;
    ..<\n+00169b90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00169ba0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    \n+00169bf0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n+00169c00: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str\n+00169c50: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    str\n+00169cf0: 7563 7420 3c2f 7370 616e 3e6e 735f 5f74 uct ns__t\n+00169d00: 6573 7420 723b 203c 2f64 6976 3e0a 3c64 est r;
    .\n+00169d20: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+00169d40: 2f73 7061 6e3e 6e73 5f5f 7065 7273 6f6e /span>ns__person\n+00169d50: 2070 3b20 3c2f 6469 763e 0a3c 6469 7620 p;
    .
    <\n+00169d70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169d80: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00169d90: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00169da0: 6761 3865 3033 3465 3161 3764 3630 3933 ga8e034e1a7d6093\n+00169db0: 6561 6464 6331 3162 3634 3731 3739 3635 eaddc11b64717965\n+00169dc0: 3763 223e 736f 6170 5f69 6e69 743c 2f61 7c\">soap_init(&so\n+00169e00: 6170 3c2f 613e 293b 3c2f 6469 763e 0a3c ap);
    .<\n+00169e10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00169e20: 3e20 2070 2e6e 616d 6520 3d20 3c73 7061 > p.name = "Jo\n+00169e50: 686e 2044 6f65 2671 756f 743b 3c2f 7370 hn Doe";
    . \n+00169e80: 702e 6167 6520 3d20 3939 3b20 3c2f 6469 p.age = 99; .
    so\n+00169ed0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fo\n+00169f30: 7065 6e3c 2f61 3e20 3d20 6d79 6f70 656e pen = myopen\n+00169f40: 3b20 2020 3c73 7061 6e20 636c 6173 733d ; // use\n+00169f60: 2063 7573 746f 6d20 6f70 656e 203c 2f73 custom open
    .
    <\n+00169f90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169fa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00169fb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+00169fc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169fd0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00169fe0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+00169ff0: 6c23 6761 3738 6432 6235 3434 3062 3333 l#ga78d2b5440b33\n+0016a000: 6433 3838 3262 3539 3563 6138 6366 6465 d3882b595ca8cfde\n+0016a010: 6334 3235 223e 6670 6f73 743c 2f61 3e20 c425\">fpost \n+0016a020: 3d20 6d79 706f 7374 3b20 2020 3c73 7061 = mypost; // use custom \n+0016a050: 706f 7374 203c 2f73 7061 6e3e 3c2f 6469 post .
    so\n+0016a0a0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fp\n+0016a100: 6172 7365 3c2f 613e 203d 206d 7970 6172 arse = mypar\n+0016a110: 7365 3b20 3c73 7061 6e20 636c 6173 733d se; // use\n+0016a130: 2063 7573 746f 6d20 7265 7370 6f6e 7365 custom response\n+0016a140: 2070 6172 7365 7220 3c2f 7370 616e 3e3c parser <\n+0016a150: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fclose = my\n+0016a200: 636c 6f73 653b 203c 7370 616e 2063 6c61 close; // \n+0016a220: 7573 6520 6375 7374 6f6d 2063 6c6f 7365 use custom close\n+0016a230: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0016a240: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016a250: 3e20 2073 6f61 705f 6361 6c6c 5f6e 735f > soap_call_ns_\n+0016a260: 5f74 6573 7428 2661 6d70 3b3c 6120 636c _test(&soap, "fi\n+0016a2c0: 6c65 3a2f 2f74 6573 742e 786d 6c26 7175 le://test.xml&qu\n+0016a2d0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "&q\n+0016a300: 756f 743b 3c2f 7370 616e 3e2c 2070 2c20 uot;, p, \n+0016a310: 7229 3b20 3c2f 6469 763e 0a3c 6469 7620 r);
    .
    <\n+0016a330: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016a340: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n+0016a380: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.err\n+0016a3d0: 6f72 3c2f 613e 2920 3c2f 6469 763e 0a3c or)
    .<\n+0016a3e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016a3f0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n+0016a410: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+0016a470: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n+0016a4b0: 7464 6f75 7429 3b20 3c2f 6469 763e 0a3c tdout);
    .<\n+0016a4c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016a4d0: 3e20 2020 2065 7869 7428 4558 4954 5f46 > exit(EXIT_F\n+0016a4e0: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    .\n+0016a4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n+0016a520: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_destr\n+0016a580: 6f79 3c2f 613e 2826 616d 703b 3c61 2063 oy(&soap);.
    soa\n+0016a630: 705f 656e 643c 2f61 3e28 2661 6d70 3b3c p_end(&<\n+0016a640: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016a650: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016a660: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+0016a670: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_done(&\n+0016a6f0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0016a720: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .}<\n+0016a740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+0016a810: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int(* fpost)\n+0016a830: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0016a840: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+0016a850: 656e 6470 6f69 6e74 2c20 636f 6e73 7420 endpoint, const \n+0016a860: 6368 6172 202a 686f 7374 2c20 696e 7420 char *host, int \n+0016a870: 706f 7274 2c20 636f 6e73 7420 6368 6172 port, const char\n+0016a880: 202a 7061 7468 2c20 636f 6e73 7420 6368 *path, const ch\n+0016a890: 6172 202a 6163 7469 6f6e 2c20 554c 4f4e ar *action, ULON\n+0016a8a0: 4736 3420 636f 756e 7429 3c2f 6469 763e G64 count)
    \n+0016a8b0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback that\n+0016a8d0: 2070 6f70 756c 6174 6573 2061 6e64 2074 populates and t\n+0016a8e0: 6865 6e20 7365 6e64 7320 4854 5450 2068 hen sends HTTP h\n+0016a8f0: 6561 6465 7273 2066 726f 6d20 7468 6520 eaders from the \n+0016a900: 636c 6965 6e74 2d73 6964 6520 746f 2061 client-side to a\n+0016a910: 2063 6f6e 6e65 6374 6564 2048 5454 5020 connected HTTP \n+0016a920: 7365 7276 6572 2e3c 2f64 6976 3e3c 6469 server.
    \n+0016a940: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:42\n+0016a960: 3230 3c2f 6469 763e 3c2f 6469 763e 0a3c 20
    .<\n+0016a970: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0016a980: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0016a990: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n+0016a9a0: 6c5f 6761 3963 6230 3563 6539 3866 3834 l_ga9cb05ce98f84\n+0016a9b0: 3566 3136 6339 3230 6334 3434 3236 6163 5f16c920c44426ac\n+0016a9c0: 3335 6135 223e 3c64 6976 2063 6c61 7373 35a5\">
    in\n+0016aa50: 7428 2a20 6670 6172 7365 2928 7374 7275 t(* fparse)(stru\n+0016aa60: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)
    Callback \n+0016aa90: 7468 6174 2072 6561 6473 2061 6e64 2070 that reads and p\n+0016aaa0: 6172 7365 7320 4854 5450 2061 6e64 204d arses HTTP and M\n+0016aab0: 494d 4520 6865 6164 6572 732e 3c2f 6469 IME headers.
    Definiti\n+0016aae0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0016aaf0: 2e68 3a34 3235 303c 2f64 6976 3e3c 2f64 .h:4250
    .
    soap_\n+0016abb0: 6765 746c 696e 653c 2f61 3e3c 2f64 6976 getline
    int soap_ge\n+0016abe0: 746c 696e 6528 7374 7275 6374 2073 6f61 tline(struct soa\n+0016abf0: 7020 2a73 6f61 702c 2063 6861 7220 2a62 p *soap, char *b\n+0016ac00: 7566 2c20 696e 7420 6c65 6e29 3c2f 6469 uf, int len)
    Get a heade\n+0016ac30: 7220 6c69 6e65 2e3c 2f64 6976 3e3c 2f64 r line.
    .

    SO\n+0016ac60: 4150 2031 2e31 2f31 2e32 2052 5043 2065 AP 1.1/1.2 RPC e\n+0016ac70: 6e63 6f64 696e 6720 7370 6563 6966 6965 ncoding specifie\n+0016ac80: 7320 7468 6174 2053 4f41 502f 584d 4c20 s that SOAP/XML \n+0016ac90: 656c 656d 656e 7473 206d 6179 2062 6520 elements may be \n+0016aca0: 6967 6e6f 7265 6420 7768 656e 2070 7265 ignored when pre\n+0016acb0: 7365 6e74 2069 6e20 6120 534f 4150 2070 sent in a SOAP p\n+0016acc0: 6179 6c6f 6164 206f 6e20 7468 6520 7265 ayload on the re\n+0016acd0: 6365 6976 696e 6720 7369 6465 2e20 486f ceiving side. Ho\n+0016ace0: 7765 7665 722c 2064 6f63 756d 656e 742f wever, document/\n+0016acf0: 6c69 7465 7261 6c20 7374 796c 6520 6d65 literal style me\n+0016ad00: 7373 6167 696e 6720 7661 6c69 6461 7465 ssaging validate\n+0016ad10: 7320 584d 4c20 6d65 7373 6167 6573 2061 s XML messages a\n+0016ad20: 6e64 2065 7874 7261 2065 6c65 6d65 6e74 nd extra element\n+0016ad30: 7320 6361 6e6e 6f74 206a 7573 7420 6265 s cannot just be\n+0016ad40: 2069 676e 6f72 6564 2061 7320 7375 6368 ignored as such\n+0016ad50: 2e20 5769 7468 2053 4f41 5020 646f 6375 . With SOAP docu\n+0016ad60: 6d65 6e74 2f6c 6974 6572 616c 2073 7479 ment/literal sty\n+0016ad70: 6c65 2069 7420 6973 2072 6563 6f6d 6d65 le it is recomme\n+0016ad80: 6e64 6564 2074 6f20 656e 6162 6c65 2074 nded to enable t\n+0016ad90: 6865 203c 636f 6465 3e23 534f 4150 5f58 he #SOAP_X\n+0016ada0: 4d4c 5f53 5452 4943 543c 2f63 6f64 653e ML_STRICT\n+0016adb0: 206d 6f64 6520 666c 6167 2e20 5769 7468 mode flag. With\n+0016adc0: 2053 4f41 5020 5250 4320 656e 636f 6469 SOAP RPC encodi\n+0016add0: 6e67 2c20 7468 6520 656e 6769 6e65 2069 ng, the engine i\n+0016ade0: 676e 6f72 6573 2058 4d4c 2065 6c65 6d65 gnores XML eleme\n+0016adf0: 6e74 7320 7468 6174 2061 7265 2075 6e6b nts that are unk\n+0016ae00: 6e6f 776e 2062 7920 6465 6661 756c 742c nown by default,\n+0016ae10: 2075 6e6c 6573 7320 7468 6520 584d 4c20 unless the XML \n+0016ae20: 6174 7472 6962 7574 6520 3c65 6d3e 3c63 attribute mustUndersta\n+0016ae40: 6e64 3d22 7472 7565 223c 2f63 6f64 653e nd=\"true\"\n+0016ae50: 3c2f 656d 3e20 6973 2070 7265 7365 6e74 is present\n+0016ae60: 2069 6e20 7468 6520 584d 4c20 656c 656d in the XML elem\n+0016ae70: 656e 742e 2049 7420 6d61 7920 6265 2075 ent. It may be u\n+0016ae80: 6e64 6573 6972 6162 6c65 2066 6f72 2065 ndesirable for e\n+0016ae90: 6c65 6d65 6e74 7320 746f 2062 6520 6967 lements to be ig\n+0016aea0: 6e6f 7265 6420 7768 656e 2074 6865 206f nored when the o\n+0016aeb0: 7574 636f 6d65 206f 6620 7468 6520 6f6d utcome of the om\n+0016aec0: 6973 7369 6f6e 2069 7320 756e 6365 7274 ission is uncert\n+0016aed0: 6169 6e2e 2054 6865 203c 636f 6465 3e3c ain. The <\n+0016aee0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0016aef0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0016af00: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0016af10: 6761 3063 3265 3161 3062 3561 3531 3937 ga0c2e1a0b5a5197\n+0016af20: 3132 3861 6631 6163 6334 3836 3632 6231 128af1acc48662b1\n+0016af30: 6264 2220 7469 746c 653d 2243 616c 6c62 bd\" title=\"Callb\n+0016af40: 6163 6b20 746f 2063 6174 6368 2075 6e72 ack to catch unr\n+0016af50: 6563 6f67 6e69 7a65 6420 584d 4c20 656c ecognized XML el\n+0016af60: 656d 656e 7473 2061 6e64 206f 7665 7272 ements and overr\n+0016af70: 6964 6573 2023 534f 4150 5f58 4d4c 5f53 ides #SOAP_XML_S\n+0016af80: 5452 4943 5420 7661 6c69 6461 7469 6f6e TRICT validation\n+0016af90: 2065 7272 6f72 7320 666f 7220 7468 6573 errors for thes\n+0016afa0: 2e2e 2e22 3e73 6f61 703a 3a66 6967 6e6f ...\">soap::figno\n+0016afb0: 7265 3c2f 613e 3c2f 636f 6465 3e20 6361 re ca\n+0016afc0: 6c6c 6261 636b 2063 616e 2062 6520 7365 llback can be se\n+0016afd0: 7420 746f 2061 2066 756e 6374 696f 6e20 t to a function \n+0016afe0: 7468 6174 2072 6574 7572 6e73 203c 636f that returns #SOAP_OK in case the e\n+0016b010: 6c65 6d65 6e74 2063 616e 2062 6520 7361 lement can be sa\n+0016b020: 6665 6c79 2069 676e 6f72 6564 2c20 6f72 fely ignored, or\n+0016b030: 203c 636f 6465 3e23 534f 4150 5f4d 5553 #SOAP_MUS\n+0016b040: 5455 4e44 4552 5354 414e 443c 2f63 6f64 TUNDERSTAND to throw an e\n+0016b060: 7863 6570 7469 6f6e 2c20 6f72 2074 6f20 xception, or to \n+0016b070: 7065 7266 6f72 6d20 736f 6d65 2061 7070 perform some app\n+0016b080: 6c69 6361 7469 6f6e 2d73 7065 6369 6669 lication-specifi\n+0016b090: 6320 6163 7469 6f6e 2e20 466f 7220 6578 c action. For ex\n+0016b0a0: 616d 706c 652c 2074 6f20 7468 726f 7720 ample, to throw \n+0016b0b0: 616e 2065 7863 6570 7469 6f6e 2061 7320 an exception as \n+0016b0c0: 736f 6f6e 2061 7320 616e 2075 6e6b 6e6f soon as an unkno\n+0016b0d0: 776e 2065 6c65 6d65 6e74 2069 7320 656e wn element is en\n+0016b0e0: 636f 756e 7465 7265 6420 6f6e 2074 6865 countered on the\n+0016b0f0: 2069 6e70 7574 2c20 7573 653a 3c2f 703e input, use:

    \n+0016b100: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ma\n+0016b150: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
    .
    {.
    s\n+0016b1a0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+0016b210: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    ..
    ...\n+0016b350: 203c 7370 616e 2063 6c61 7373 3d22 636f // soap_c\n+0016b370: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n+0016b380: 6428 736f 6170 2c20 2e2e 2e29 206f 7220 d(soap, ...) or \n+0016b390: 736f 6170 5f73 6572 7665 2873 6f61 7029 soap_serve(soap)\n+0016b3a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0016b3b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016b3c0: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    .
    i\n+0016b410: 6e74 3c2f 7370 616e 3e20 6d79 6967 6e6f nt myigno\n+0016b420: 7265 283c 7370 616e 2063 6c61 7373 3d22 re(struct<\n+0016b440: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+0016b470: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+0016b4a0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n+0016b4c0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *tag)
    .<\n+0016b500: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016b510: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    return SOAP_MU\n+0016b5b0: 5354 554e 4445 5253 5441 4e44 3c2f 613e STUNDERSTAND\n+0016b5c0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // never\n+0016b5e0: 2073 6b69 7020 656c 656d 656e 7473 2028 skip elements (\n+0016b5f0: 7365 6375 7265 2920 3c2f 7370 616e 3e3c secure) <\n+0016b600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+0016b620: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    int(* fignore)(\n+0016b710: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+0016b720: 702c 2063 6f6e 7374 2063 6861 7220 2a74 p, const char *t\n+0016b730: 6167 293c 2f64 6976 3e3c 6469 7620 636c ag)
    Call\n+0016b750: 6261 636b 2074 6f20 6361 7463 6820 756e back to catch un\n+0016b760: 7265 636f 676e 697a 6564 2058 4d4c 2065 recognized XML e\n+0016b770: 6c65 6d65 6e74 7320 616e 6420 6f76 6572 lements and over\n+0016b780: 7269 6465 7320 2353 4f41 505f 584d 4c5f rides #SOAP_XML_\n+0016b790: 5354 5249 4354 2076 616c 6964 6174 696f STRICT validatio\n+0016b7a0: 6e20 6572 726f 7273 2066 6f72 2074 6865 n errors for the\n+0016b7b0: 732e 2e2e 3c2f 6469 763e 3c64 6976 2063 s...
    \n+0016b7d0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0016b7e0: 7374 6473 6f61 7032 2e68 3a34 3434 333c stdsoap2.h:4443<\n+0016b7f0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+0016b850: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+0016b910: 4120 736f 6170 5f73 7461 7475 7320 6572 A soap_status er\n+0016b920: 726f 7220 636f 6465 3a20 616e 2058 4d4c ror code: an XML\n+0016b930: 2065 6c65 6d65 6e74 2069 7320 7072 6573 element is pres\n+0016b940: 656e 7420 7769 7468 2061 206d 7573 7455 ent with a mustU\n+0016b950: 6e64 6572 7374 616e 6420 6174 7472 6962 nderstand attrib\n+0016b960: 7574 6520 7768 6963 6820 6d75 7374 2062 ute which must b\n+0016b970: 6520 756e 642e 2e2e 3c2f 6469 763e 3c64 e und...
    Definition:<\n+0016b9a0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2\n+0016b9b0: 3439 303c 2f64 6976 3e3c 2f64 6976 3e0a 490
    .\n+0016b9c0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    To sel\n+0016b9e0: 6563 7469 7665 6c79 2074 6872 6f77 2061 ectively throw a\n+0016b9f0: 6e20 6578 6365 7074 696f 6e20 7768 656e n exception when\n+0016ba00: 203c 656d 3e3c 636f 6465 3e6d 7573 7455 mustU\n+0016ba10: 6e64 6572 7374 616e 643d 2274 7275 6522 nderstand=\"true\"\n+0016ba20: 3c2f 636f 6465 3e3c 2f65 6d3e 2053 4f41 SOA\n+0016ba30: 5020 4865 6164 6572 2065 6c65 6d65 6e74 P Header element\n+0016ba40: 2069 7320 656e 636f 756e 7465 7265 6420 is encountered \n+0016ba50: 6f72 2077 6865 6e20 616e 2075 6e6b 6e6f or when an unkno\n+0016ba60: 776e 2065 6c65 6d65 6e74 2069 7320 656e wn element is en\n+0016ba70: 636f 756e 7465 7265 6420 6578 6365 7074 countered except\n+0016ba80: 2066 6f72 2065 6c65 6d65 6e74 203c 656d for element ns:xyz, use:<\n+0016bab0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    .
    struct \n+0016bb60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+0016bb90: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+0016bbc0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+0016bc20: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
    .\n+0016bc40: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->fig\n+0016bcd0: 6e6f 7265 3c2f 613e 203d 2069 676e 6f72 nore = ignor\n+0016bce0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    ..\n+0016bd00: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // soap_\n+0016bd20: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n+0016bd30: 6f64 2873 6f61 702c 202e 2e2e 2920 6f72 od(soap, ...) or\n+0016bd40: 2073 6f61 705f 7365 7276 6528 736f 6170 soap_serve(soap\n+0016bd50: 2920 3c2f 7370 616e 3e3c 2f64 6976 3e0a )
    .\n+0016bd60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    \n+0016bdc0: 696e 743c 2f73 7061 6e3e 2069 676e 6f72 int ignor\n+0016bdd0: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa\n+0016be20: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+0016be50: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, co\n+0016be70: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+0016bea0: 202a 7461 6729 203c 2f64 6976 3e0a 3c64 *tag)
    .\n+0016bec0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    // do not igno\n+0016bf00: 7265 206d 7573 7455 6e64 6572 7374 616e re mustUnderstan\n+0016bf10: 643d 2671 756f 743b 7472 7565 2671 756f d="true&quo\n+0016bf20: 743b 203c 2f73 7061 6e3e 3c2f 6469 763e t;
    \n+0016bf30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+0016bf60: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soap-><\n+0016bfa0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016bfb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016bfc0: 6874 6d6c 2361 3137 6337 3530 6632 3064 html#a17c750f20d\n+0016bfd0: 6162 3537 3961 3661 3233 6333 3031 3939 ab579a6a23c30199\n+0016bfe0: 6564 3132 3633 223e 6d75 7374 556e 6465 ed1263\">mustUnde\n+0016bff0: 7273 7461 6e64 3c2f 613e 293c 2f64 6976 rstand).
    {
    .\n+0016c030: 2020 2020 3c73 7061 6e20 636c 6173 733d // tag\n+0016c050: 7320 266c 743b 6e73 3a73 6f6d 6545 6c65 s <ns:someEle\n+0016c060: 6d65 6e74 2667 743b 2063 616e 2062 6520 ment> can be \n+0016c070: 7361 6665 6c79 2069 676e 6f72 6564 3c2f safely ignored
    . \n+0016c0a0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_ma\n+0016c120: 7463 685f 7461 673c 2f61 3e28 3c61 2063 tch_tag(soap, tag\n+0016c160: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+0016c180: 756f 743b 6e73 3a73 6f6d 6545 6c65 6d65 uot;ns:someEleme\n+0016c190: 6e74 2671 756f 743b 3c2f 7370 616e 3e29 nt")\n+0016c1a0: 203d 3d20 3c61 2063 6c61 7373 3d22 636f == SOAP_OK<\n+0016c200: 2f61 3e29 3c2f 6469 763e 0a3c 6469 7620 /a>)
    ..\n+0016c390: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    .
    struct\n+0016c3e0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 Namespace namesp\n+0016c480: 6163 6573 3c2f 613e 5b5d 203d 203c 2f64 aces[] = .
    {
    .\n+0016c4c0: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+0016c4e0: 2671 756f 743b 534f 4150 2d45 4e56 2671 "SOAP-ENV&q\n+0016c4f0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "h\n+0016c520: 7474 703a 2f2f 7363 6865 6d61 732e 786d ttp://schemas.xm\n+0016c530: 6c73 6f61 702e 6f72 672f 736f 6170 2f65 lsoap.org/soap/e\n+0016c540: 6e76 656c 6f70 652f 2671 756f 743b 3c2f nvelope/" },
    .\n+0016c560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "SOAP-ENC\n+0016c5a0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n+0016c5b0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0016c5c0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0016c5d0: 3b68 7474 703a 2f2f 7363 6865 6d61 732e ;http://schemas.\n+0016c5e0: 786d 6c73 6f61 702e 6f72 672f 736f 6170 xmlsoap.org/soap\n+0016c5f0: 2f65 6e63 6f64 696e 672f 2671 756f 743b /encoding/"\n+0016c600: 3c2f 7370 616e 3e20 7d2c 203c 2f64 6976 }, .
    { "xsi&qu\n+0016c650: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+0016c660: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0016c680: 6f74 3b68 7474 703a 2f2f 7777 772e 7733 ot;http://www.w3\n+0016c690: 2e6f 7267 2f32 3030 312f 584d 4c53 6368 .org/2001/XMLSch\n+0016c6a0: 656d 612d 696e 7374 616e 6365 2671 756f ema-instance&quo\n+0016c6b0: 743b 3c2f 7370 616e 3e20 7d2c 203c 2f64 t; }, .
    { "xsd&\n+0016c700: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n+0016c710: 2020 203c 7370 616e 2063 6c61 7373 3d22 &\n+0016c730: 7175 6f74 3b68 7474 703a 2f2f 7777 772e quot;http://www.\n+0016c740: 7733 2e6f 7267 2f32 3030 312f 584d 4c53 w3.org/2001/XMLS\n+0016c750: 6368 656d 6126 7175 6f74 3b3c 2f73 7061 chema" },
    . \n+0016c780: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n+0016c7a0: 7175 6f74 3b6e 7326 7175 6f74 3b3c 2f73 quot;ns", "so\n+0016c7e0: 6d65 2d55 5249 2671 756f 743b 3c2f 7370 me-URI"}, // b\n+0016c810: 696e 6473 2026 7175 6f74 3b6e 7326 7175 inds "ns&qu\n+0016c820: 6f74 3b20 6e61 6d65 7370 6163 6520 7072 ot; namespace pr\n+0016c830: 6566 6978 2074 6f20 7363 6865 6d61 2055 efix to schema U\n+0016c840: 5249 3c2f 7370 616e 3e3c 2f64 6976 3e0a RI
    .\n+0016c850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { NULL, NULL\n+0016c870: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    ];.
    s\n+0016c960: 686f 7274 206d 7573 7455 6e64 6572 7374 hort mustUnderst\n+0016c970: 616e 643c 2f64 6976 3e3c 6469 7620 636c and
    The \n+0016c990: 736f 6170 3a3a 6d75 7374 556e 6465 7273 soap::mustUnders\n+0016c9a0: 7461 6e64 2066 6c61 6720 6973 2073 6574 tand flag is set\n+0016c9b0: 2077 6865 6e20 6120 534f 4150 2048 6561 when a SOAP Hea\n+0016c9c0: 6465 7220 656c 656d 656e 7420 6361 7272 der element carr\n+0016c9d0: 6965 7320 6120 534f 4150 2d45 4e56 3a6d ies a SOAP-ENV:m\n+0016c9e0: 7573 7455 6e64 6572 7374 616e 6420 6174 ustUnderstand at\n+0016c9f0: 742e 2e2e 3c2f 6469 763e 3c64 6976 2063 t...
    \n+0016ca10: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0016ca20: 7374 6473 6f61 7032 2e68 3a32 3936 313c stdsoap2.h:2961<\n+0016ca30: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    Function <\n+0016ca60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_match_t\n+0016cae0: 6167 3c2f 613e 3c2f 636f 6465 3e20 636f ag co\n+0016caf0: 6d70 6172 6573 2074 776f 2074 6167 732e mpares two tags.\n+0016cb00: 2054 6865 2074 6869 7264 2070 6172 616d The third param\n+0016cb10: 6574 6572 206d 6179 2062 6520 6120 7061 eter may be a pa\n+0016cb20: 7474 6572 6e20 7768 6572 6520 3c63 6f64 ttern where * is a \n+0016cb40: 7769 6c64 6361 7264 2061 6e64 203c 636f wildcard and - is a\n+0016cb60: 2073 696e 676c 6520 6368 6172 6163 7465 single characte\n+0016cb70: 7220 7769 6c64 6361 7264 2e20 536f 2066 r wildcard. So f\n+0016cb80: 6f72 2065 7861 6d70 6c65 203c 636f 6465 or example soap_match_tag(\n+0016cba0: 736f 6170 2c20 7461 672c 2022 6e73 3a2a soap, tag, \"ns:*\n+0016cbb0: 2229 3c2f 636f 6465 3e20 7769 6c6c 206d \") will m\n+0016cbc0: 6174 6368 2061 6e79 2065 6c65 6d65 6e74 atch any element\n+0016cbd0: 2069 6e20 6e61 6d65 7370 6163 6520 3c63 in namespace ns or\n+0016cbf0: 2077 6865 6e20 6e6f 206e 616d 6573 7061 when no namespa\n+0016cc00: 6365 2070 7265 6669 7820 6973 2070 7265 ce prefix is pre\n+0016cc10: 7365 6e74 2069 6e20 7468 6520 584d 4c20 sent in the XML \n+0016cc20: 6d65 7373 6167 652e 3c2f 703e 0a3c 703e message.

    .

    \n+0016cc30: 5468 6520 6361 6c6c 6261 636b 2063 616e The callback can\n+0016cc40: 2061 6c73 6f20 6265 2075 7365 6420 746f also be used to\n+0016cc50: 206b 6565 7020 7472 6163 6b20 6f66 2075 keep track of u\n+0016cc60: 6e6b 6e6f 776e 2065 6c65 6d65 6e74 7320 nknown elements \n+0016cc70: 696e 2061 6e20 696e 7465 726e 616c 2064 in an internal d\n+0016cc80: 6174 6120 7374 7275 6374 7572 6520 7375 ata structure su\n+0016cc90: 6368 2061 7320 6120 6c69 7374 3a3c 2f70 ch as a list:.

    \n+0016cce0: 7374 7275 6374 203c 2f73 7061 6e3e 556e struct Un\n+0016ccf0: 6b6e 6f77 6e20 3c2f 6469 763e 0a3c 6469 known
    .{\n+0016cd10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char\n+0016cd50: 202a 7461 673b 203c 2f64 6976 3e0a 3c64 *tag;
    .\n+0016cd70: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+0016cd90: 2f73 7061 6e3e 556e 6b6e 6f77 6e20 2a6e /span>Unknown *n\n+0016cda0: 6578 743b 203c 2f64 6976 3e0a 3c64 6976 ext;
    .};\n+0016cdc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n+0016ce00: 7969 676e 6f72 6528 3c73 7061 6e20 636c yignore(st\n+0016ce20: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n+0016ceb0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+0016ced0: 2f73 7061 6e3e 202a 7461 6729 203c 2f64 /span> *tag) .
    {
    .\n+0016cf10: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+0016cf30: 3c2f 7370 616e 3e20 2a73 203d 2028 3c73 *s = (char*)soap_m\n+0016cfc0: 616c 6c6f 633c 2f61 3e28 3c61 2063 6c61 alloc(soap, strle\n+0016d000: 6e28 7461 6729 2b31 293b 203c 2f64 6976 n(tag)+1); .
    stru\n+0016d040: 6374 203c 2f73 7061 6e3e 556e 6b6e 6f77 ct Unknow\n+0016d050: 6e20 2a75 203d 2028 3c73 7061 6e20 636c n *u = (st\n+0016d070: 7275 6374 203c 2f73 7061 6e3e 556e 6b6e ruct Unkn\n+0016d080: 6f77 6e2a 293c 6120 636c 6173 733d 2263 own*)soap_m\n+0016d0e0: 616c 6c6f 633c 2f61 3e28 3c61 2063 6c61 alloc(soap, sizeof(<\n+0016d140: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016d150: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct Unknown)); .
    if (s \n+0016d1b0: 2661 6d70 3b26 616d 703b 2075 2920 3c2f && u) .
    {
    \n+0016d1e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    strcpy(s,\n+0016d200: 2074 6167 293b 203c 2f64 6976 3e0a 3c64 tag);
    .\n+0016d220: 2020 2020 752d 2667 743b 7461 6720 3d20 u->tag = \n+0016d230: 733b 203c 2f64 6976 3e0a 3c64 6976 2063 s;
    .
    \n+0016d250: 752d 2667 743b 6e65 7874 203d 2075 6c69 u->next = uli\n+0016d260: 7374 3b20 3c2f 6469 763e 0a3c 6469 7620 st;
    .
    \n+0016d280: 2075 6c69 7374 203d 2075 3b20 3c2f 6469 ulist = u; .
    }
    .\n+0016d2b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int main\n+0016d320: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
    .
    {.
    str\n+0016d370: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap; <\n+0016d400: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0016d430: 7374 7275 6374 203c 2f73 7061 6e3e 556e struct Un\n+0016d440: 6b6e 6f77 6e20 2a75 6c69 7374 203d 204e known *ulist = N\n+0016d450: 554c 4c3b 203c 2f64 6976 3e0a 3c64 6976 ULL;
    . \n+0016d470: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_init(&s\n+0016d500: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n+0016d510: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    .\n+0016d5e0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // soap\n+0016d600: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n+0016d610: 686f 6428 736f 6170 2c20 2e2e 2e29 206f hod(soap, ...) o\n+0016d620: 7220 736f 6170 5f73 6572 7665 2873 6f61 r soap_serve(soa\n+0016d630: 7029 203c 2f73 7061 6e3e 3c2f 6469 763e p)
    \n+0016d640: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n+0016d670: 2f20 7072 696e 7420 7468 6520 6c69 7374 / print the list\n+0016d680: 206f 6620 756e 6b6e 6f77 6e20 656c 656d of unknown elem\n+0016d690: 656e 7473 2073 746f 7265 6420 696e 2075 ents stored in u\n+0016d6a0: 6c69 7374 3c2f 7370 616e 3e3c 2f64 6976 list.
    soap_\n+0016d720: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(&\n+0016d730: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+0016d760: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    soap_end(&\n+0016d7e0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0016d810: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    . \n+0016d830: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s\n+0016d8c0: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n+0016d8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    \n+0016d8f0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

    .\n+0016e5c0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    <\n+0016e5e0: 2f61 3e0a 486f 7720 746f 2069 6d70 6c65 /a>.How to imple\n+0016e5f0: 6d65 6e74 2048 5454 5020 4745 542c 2050 ment HTTP GET, P\n+0016e600: 5554 2c20 616e 6420 5041 5443 4820 7365 UT, and PATCH se\n+0016e610: 7276 6963 6573 3c2f 6832 3e0a 3c70 3e54 rvices

    .

    T\n+0016e620: 6f20 696d 706c 656d 656e 7420 4854 5450 o implement HTTP\n+0016e630: 2047 4554 2072 6571 7565 7374 2072 6573 GET request res\n+0016e640: 706f 6e73 6573 2c20 6465 6669 6e65 2074 ponses, define t\n+0016e650: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap:\n+0016e720: 3a66 6765 743c 2f61 3e3c 2f63 6f64 653e :fget\n+0016e730: 2063 616c 6c62 6163 6b20 6675 6e63 7469 callback functi\n+0016e740: 6f6e 2e20 5468 6520 6361 6c6c 6261 636b on. The callback\n+0016e750: 2069 7320 7265 7175 6972 6564 2074 6f20 is required to \n+0016e760: 7072 6f64 7563 6520 6120 7265 7370 6f6e produce a respon\n+0016e770: 7365 2074 6f20 7468 6520 7265 7175 6573 se to the reques\n+0016e780: 7420 696e 2074 6578 7475 616c 2066 6f72 t in textual for\n+0016e790: 6d2c 2073 7563 6820 6173 2061 2057 6562 m, such as a Web\n+0016e7a0: 2070 6167 6520 6f72 2061 6e20 584d 4c20 page or an XML \n+0016e7b0: 6f72 204a 534f 4e20 7265 7370 6f6e 7365 or JSON response\n+0016e7c0: 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 616e .

    .

    You can\n+0016e7d0: 2061 6c73 6f20 7573 6520 7468 6520 3c63 also use the http_get plugin \n+0016e880: 7768 6963 6820 6573 7365 6e74 6961 6c6c which essentiall\n+0016e890: 7920 7365 7473 2074 6865 203c 636f 6465 y sets the soap::fget callbac\n+0016e980: 6b20 616e 6420 616c 736f 206b 6565 7073 k and also keeps\n+0016e990: 2074 7261 636b 206f 6620 7468 6520 6e75 track of the nu\n+0016e9a0: 6d62 6572 206f 6620 4854 5450 2047 4554 mber of HTTP GET\n+0016e9b0: 2061 6e64 2050 4f53 5420 7265 7175 6573 and POST reques\n+0016e9c0: 7473 206d 6164 6520 6174 2074 6865 2073 ts made at the s\n+0016e9d0: 6572 7665 7220 7369 6465 2e3c 2f70 3e0a erver side.

    .\n+0016e9e0: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n+0016e9f0: 2065 7861 6d70 6c65 2070 726f 6475 6365 example produce\n+0016ea00: 7320 6120 5765 6220 7061 6765 2075 706f s a Web page upo\n+0016ea10: 6e20 6120 4854 5450 2047 4554 2072 6571 n a HTTP GET req\n+0016ea20: 7565 7374 2028 652e 672e 2066 726f 6d20 uest (e.g. from \n+0016ea30: 6120 6272 6f77 7365 7229 3a3c 2f70 3e0a a browser):

    .\n+0016ea40: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int mai\n+0016ea90: 6e28 293c 2f64 6976 3e0a 3c64 6976 2063 n()
    .
    {.
    st\n+0016eae0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+0016eb50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016eb60: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016eb70: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0016eb80: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n+0016eb90: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n+0016eba0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n+0016ebb0: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    <\n+0016ebd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016ebe0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016ebf0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0016ec00: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;fget = http_get;
    .
    ..\n+0016ece0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    soap\n+0016ed70: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap); .
    ... //.
    }
    . <\n+0016ee20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int htt\n+0016eeb0: 705f 6765 743c 2f61 3e28 3c73 7061 6e20 p_get(\n+0016eed0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+0016ef10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016ef20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016ef30: 6874 6d6c 223e 736f 6170 3c2f 613e 2920 html\">soap) \n+0016ef40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+0016ef60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+0016ef90: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap_r\n+0016eff0: 6573 706f 6e73 653c 2f61 3e28 3c61 2063 esponse(soap, SOA\n+0016f080: 505f 4854 4d4c 3c2f 613e 2920 3c73 7061 P_HTML) // HTTP respon\n+0016f0b0: 7365 2068 6561 6465 7220 7769 7468 2074 se header with t\n+0016f0c0: 6578 742f 6874 6d6c 203c 2f73 7061 6e3e ext/html \n+0016f0d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    || <\n+0016f0f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016f100: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016f110: 705f 5f69 6f2e 6874 6d6c 2367 6137 3731 p__io.html#ga771\n+0016f120: 3266 3562 6333 3631 3237 3035 3061 3131 2f5bc36127050a11\n+0016f130: 6164 3939 3564 3035 3933 6264 6322 3e73 ad995d0593bdc\">s\n+0016f140: 6f61 705f 7365 6e64 3c2f 613e 283c 6120 oap_send(soap, "\n+0016f1a0: 266c 743b 4854 4d4c 2667 743b 4d79 2057 <HTML>My W\n+0016f1b0: 6562 2073 6572 7665 7220 6973 206f 7065 eb server is ope\n+0016f1c0: 7261 7469 6f6e 616c 2e26 6c74 3b2f 4854 rational.</HT\n+0016f1d0: 4d4c 2667 743b 2671 756f 743b 3c2f 7370 ML>")
    .. \n+0016f2b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n+0016f2d0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn soap_\n+0016f330: 636c 6f73 6573 6f63 6b3c 2f61 3e28 3c61 closesock(soap);<\n+0016f370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..}\n+0016f460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .\n+0016f530: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int(* fget)(\n+0016f550: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+0016f560: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
    Callb\n+0016f580: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n+0016f590: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n+0016f5a0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n+0016f5b0: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n+0016f5c0: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request\n+0016f5d0: 7320 6672 6f6d 2063 6c69 656e 7473 2e3c s from clients.<\n+0016f5e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+0016f600: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+0016f610: 6170 322e 683a 3433 3330 3c2f 6469 763e ap2.h:4330
    \n+0016f620: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n+0016f6d0: 6170 5f72 6573 706f 6e73 653c 2f61 3e3c ap_response<\n+0016f6e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa\n+0016f700: 705f 7265 7370 6f6e 7365 2873 7472 7563 p_response(struc\n+0016f710: 7420 736f 6170 202a 736f 6170 2c20 696e t soap *soap, in\n+0016f720: 7420 7374 6174 7573 293c 2f64 6976 3e3c t status)
    <\n+0016f730: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0016f740: 223e 496e 6974 6961 6c69 7a65 2074 6865 \">Initialize the\n+0016f750: 2063 6f6e 7465 7874 2066 6f72 2073 6572 context for ser\n+0016f760: 7665 722d 7369 6465 2073 656e 6469 6e67 ver-side sending\n+0016f770: 2061 6e64 2073 656e 6420 6120 4854 5450 and send a HTTP\n+0016f780: 2072 6573 706f 6e73 6520 6865 6164 6572 response header\n+0016f790: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .soap_closes\n+0016f850: 6f63 6b3c 2f61 3e3c 2f64 6976 3e3c 6469 ock
    int soap_closes\n+0016f880: 6f63 6b28 7374 7275 6374 2073 6f61 7020 ock(struct soap \n+0016f890: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    C\n+0016f8b0: 6c6f 7365 2074 6865 2073 6f63 6b65 7420 lose the socket \n+0016f8c0: 636f 6e6e 6563 7469 6f6e 2e3c 2f64 6976 connection.
    .
    h\n+0016f980: 7474 705f 6765 743c 2f61 3e3c 2f64 6976 ttp_get
    int http_ge\n+0016f9b0: 7428 7374 7275 6374 2073 6f61 7020 2a2c t(struct soap *,\n+0016f9c0: 2073 7472 7563 7420 736f 6170 5f70 6c75 struct soap_plu\n+0016f9d0: 6769 6e20 2a2c 2076 6f69 6420 2a29 3c2f gin *, void *)
    The HTTP \n+0016fa00: 4745 5420 706c 7567 696e 2072 6567 6973 GET plugin regis\n+0016fa10: 7472 6174 696f 6e20 6675 6e63 7469 6f6e tration function\n+0016fa20: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .SOAP_HTML
    #def\n+0016fb00: 696e 6520 534f 4150 5f48 544d 4c3c 2f64 ine SOAP_HTML
    A special \n+0016fb30: 736f 6170 5f73 7461 7475 7320 6572 726f soap_status erro\n+0016fb40: 7220 636f 6465 2074 6f20 7369 676e 616c r code to signal\n+0016fb50: 2074 6861 7420 6120 6375 7374 6f6d 2048 that a custom H\n+0016fb60: 5454 5020 7265 7370 6f6e 7365 2069 7320 TTP response is \n+0016fb70: 7072 6573 656e 7420 616e 6420 6e6f 2048 present and no H\n+0016fb80: 5454 5020 7265 7370 6f6e 732e 2e2e 3c2f TTP respons...
    Defini\n+0016fbb0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+0016fbc0: 7032 2e68 3a32 3731 323c 2f64 6976 3e3c p2.h:2712
    <\n+0016fbd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+0016fc80: 705f 656e 645f 7365 6e64 3c2f 613e 3c2f p_end_send
    int soap\n+0016fcb0: 5f65 6e64 5f73 656e 6428 7374 7275 6374 _end_send(struct\n+0016fcc0: 2073 6f61 7020 2a73 6f61 7029 3c2f 6469 soap *soap)
    Finalize th\n+0016fcf0: 6520 636f 6e74 6578 7420 6166 7465 7220 e context after \n+0016fd00: 7365 6e64 696e 672e 3c2f 6469 763e 3c2f sending.
    .

    T\n+0016fd30: 6865 2065 7861 6d70 6c65 2062 656c 6f77 he example below\n+0016fd40: 2070 726f 6475 6365 7320 6120 5753 444c produces a WSDL\n+0016fd50: 2066 696c 6520 7570 6f6e 2061 2048 5454 file upon a HTT\n+0016fd60: 5020 4745 5420 7769 7468 2070 6174 6820 P GET with path \n+0016fd70: 3c63 6f64 653e 3f77 7364 6c3c 2f63 6f64 ?wsdl:

    ..<\n+0016fec0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016fed0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    FIL\n+0016fef0: 4520 2a66 6420 3d20 4e55 4c4c 3b3c 2f64 E *fd = NULL;.
    char *s\n+0016ff40: 203d 2073 7472 6368 7228 3c61 2063 6c61 = strchr(soap->path,\n+0016ffd0: 203c 7370 616e 2063 6c61 7373 3d22 6368 '\n+0016fff0: 3f26 2333 393b 3c2f 7370 616e 3e29 3b20 ?'); \n+00170000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+00170040: 2173 207c 7c20 7374 7263 6d70 2873 2c20 !s || strcmp(s, \n+00170050: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00170070: 743b 3f77 7364 6c26 7175 6f74 3b3c 2f73 t;?wsdl"))
    .\n+001700a0: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n+001700c0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+00170120: 534f 4150 5f47 4554 5f4d 4554 484f 443c SOAP_GET_METHOD<\n+00170130: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n+00170150: 6664 203d 203c 6120 636c 6173 733d 2263 fd = fope\n+001701b0: 6e3c 2f61 3e28 3c73 7061 6e20 636c 6173 n("myservic\n+001701e0: 652e 7773 646c 2671 756f 743b 3c2f 7370 e.wsdl", "rb"<\n+00170220: 2f73 7061 6e3e 293b 203c 7370 616e 2063 /span>); /\n+00170240: 2f20 6f70 656e 2057 5344 4c20 6669 6c65 / open WSDL file\n+00170250: 2074 6f20 636f 7079 203c 2f73 7061 6e3e to copy \n+00170260: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+001702a0: 2166 6429 203c 2f64 6976 3e0a 3c64 6976 !fd)
    . \n+001702c0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+001702e0: 726e 3c2f 7370 616e 3e20 3430 343b 203c rn 404; <\n+001702f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00170300: 656e 7422 3e2f 2f20 7265 7475 726e 2048 ent\">// return H\n+00170310: 5454 5020 6e6f 7420 666f 756e 6420 6572 TTP not found er\n+00170320: 726f 7220 3c2f 7370 616e 3e3c 2f64 6976 ror ... \n+00170600: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n+00170620: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00170630: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (1)
    .\n+00170650: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n+00170680: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+001706a0: 7369 7a65 5f74 3c2f 7370 616e 3e20 7220 size_t r \n+001706b0: 3d20 6672 6561 6428 3c61 2063 6c61 7373 = fread(s\n+001706e0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->tmpbuf,\n+00170740: 2031 2c20 3c73 7061 6e20 636c 6173 733d 1, sizeof\n+00170760: 3c2f 7370 616e 3e28 3c61 2063 6c61 7373 (s\n+00170790: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->tmpbuf)\n+001707f0: 2c20 6664 293b 203c 2f64 6976 3e0a 3c64 , fd);
    .\n+00170810: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+00170830: 6966 3c2f 7370 616e 3e20 2821 7220 7c7c if (!r ||\n+00170840: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send_raw(soap, soap<\n+00170900: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->tmpbuf, r))\n+00170960: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+00170980: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n+001709a0: 6b3c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a k;
    .\n+001709b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .<\n+001709d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001709e0: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    <\n+00170a00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00170a10: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00170a20: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+00170a30: 6c23 6761 6239 3539 3164 6438 3064 6262 l#gab9591dd80dbb\n+00170a40: 3065 3537 3137 3834 6261 6435 3432 3162 0e571784bad5421b\n+00170a50: 3232 3032 223e 6663 6c6f 7365 3c2f 613e 2202\">fclose\n+00170a60: 2866 6429 3b20 3c2f 6469 763e 0a3c 6469 (fd);
    . \n+00170a80: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_end_send(soap);
    .
    <\n+00170b30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00170b40: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00170b50: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_clos\n+00170bb0: 6573 6f63 6b3c 2f61 3e28 3c61 2063 6c61 esock(soap);.
    }
    .\n+00170c60: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    SOAP_\n+00170cc0: 4745 545f 4d45 5448 4f44 3c2f 613e 3c2f GET_METHOD
    #define \n+00170cf0: 534f 4150 5f47 4554 5f4d 4554 484f 443c SOAP_GET_METHOD<\n+00170d00: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    A soap_s\n+00170d20: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code\n+00170d30: 3a20 616e 2048 5454 5020 4745 5420 7265 : an HTTP GET re\n+00170d40: 7175 6573 7420 7761 7320 7265 6365 6976 quest was receiv\n+00170d50: 6564 2062 7920 7468 6520 7365 7276 6963 ed by the servic\n+00170d60: 6520 6275 7420 7468 6520 4745 5420 7265 e but the GET re\n+00170d70: 7175 6573 7420 6361 6c6c 6261 632e 2e2e quest callbac...\n+00170d80: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00170da0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00170db0: 6f61 7032 2e68 3a32 3339 373c 2f64 6976 oap2.h:2397
    .
    S\n+00170e70: 4f41 505f 4649 4c45 3c2f 613e 3c2f 6469 OAP_FILE
    #define SO\n+00170ea0: 4150 5f46 494c 453c 2f64 6976 3e3c 6469 AP_FILE
    \n+00170ec0: 4120 7370 6563 6961 6c20 736f 6170 5f73 A special soap_s\n+00170ed0: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code\n+00170ee0: 2074 6f20 7369 676e 616c 2074 6861 7420 to signal that \n+00170ef0: 6120 6375 7374 6f6d 2066 696c 652d 6261 a custom file-ba\n+00170f00: 7365 6420 4854 5450 2072 6573 706f 6e73 sed HTTP respons\n+00170f10: 6520 6973 2070 7265 7365 6e74 2061 6e64 e is present and\n+00170f20: 206e 6f20 482e 2e2e 3c2f 6469 763e 3c64 no H...
    Definition:<\n+00170f50: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2\n+00170f60: 3731 393c 2f64 6976 3e3c 2f64 6976 3e0a 719
    .\n+00170f70: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n+00170fc0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 int soap_send_\n+00171050: 7261 7728 7374 7275 6374 2073 6f61 7020 raw(struct soap \n+00171060: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+00171070: 7220 2a73 2c20 7369 7a65 5f74 206e 293c r *s, size_t n)<\n+00171080: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Send raw\n+001710a0: 2062 7974 6573 2e3c 2f64 6976 3e3c 2f64 bytes.
    .
    soa\n+00171150: 703a 3a74 6d70 6275 663c 2f61 3e3c 2f64 p::tmpbuf
    char tmpb\n+00171180: 7566 5b53 4f41 505f 544d 504c 454e 5d3c uf[SOAP_TMPLEN]<\n+00171190: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Internal\n+001711b0: 2062 7566 6665 7220 746f 2068 6f6c 6420 buffer to hold \n+001711c0: 7465 6d70 6f72 6172 7920 7374 7269 6e67 temporary string\n+001711d0: 7320 7375 6368 2061 7320 7374 7269 6e67 s such as string\n+001711e0: 2072 6570 7265 7365 6e74 6174 696f 6e73 representations\n+001711f0: 206f 6620 7072 696d 6974 6976 6520 7661 of primitive va\n+00171200: 6c75 6573 2c2e 2e2e 3c2f 6469 763e 3c64 lues,...
    Definition:<\n+00171230: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n+00171240: 3139 393c 2f64 6976 3e3c 2f64 6976 3e0a 199
    .\n+00171250: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::h\n+001712f0: 7474 705f 636f 6e74 656e 743c 2f61 3e3c ttp_content<\n+00171300: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c\n+00171320: 6861 7220 2a20 6874 7470 5f63 6f6e 7465 har * http_conte\n+00171330: 6e74 3c2f 6469 763e 3c64 6976 2063 6c61 nt
    Strin\n+00171350: 6720 7769 7468 2048 5454 5020 636f 6e74 g with HTTP cont\n+00171360: 656e 7420 7479 7065 2068 6561 6465 7220 ent type header \n+00171370: 7661 6c75 6520 7265 6365 6976 6564 2c20 value received, \n+00171380: 6361 6e20 616c 736f 2062 6520 6173 7369 can also be assi\n+00171390: 676e 6564 2074 6f20 7370 6563 6966 7920 gned to specify \n+001713a0: 6120 636f 6e74 656e 7420 7479 7065 2068 a content type h\n+001713b0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n+001713d0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+001713e0: 7464 736f 6170 322e 683a 3239 3830 3c2f tdsoap2.h:2980
    .<\n+00171de0: 703e 5468 6520 6765 6e65 7261 7465 6420 p>The generated \n+00171df0: 3c65 6d3e 3c63 6f64 653e 736f 6170 436c soapCl\n+00171e00: 6965 6e74 2e63 7070 3c2f 636f 6465 3e3c ient.cpp<\n+00171e10: 2f65 6d3e 2069 6e63 6c75 6465 7320 7468 /em> includes th\n+00171e20: 6520 7365 6e64 696e 672d 7369 6465 2073 e sending-side s\n+00171e30: 7475 6220 6675 6e63 7469 6f6e 2e3c 2f70 tub function..

    The example\n+00171e50: 7320 6162 6f76 6520 6172 6520 666f 7220 s above are for \n+00171e60: 4854 5450 2047 4554 2e20 546f 2069 6d70 HTTP GET. To imp\n+00171e70: 6c65 6d65 6e74 2048 5454 5020 5055 5420 lement HTTP PUT \n+00171e80: 616e 6420 5041 5443 4820 7365 7420 7468 and PATCH set th\n+00171e90: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::\n+00171f60: 6670 7574 3c2f 613e 3c2f 636f 6465 3e20 fput \n+00171f70: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and \n+00172040: 736f 6170 3a3a 6670 6174 6368 3c2f 613e soap::fpatch\n+00172050: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+00172060: 2066 756e 6374 696f 6e73 206f 7220 7573 functions or us\n+00172070: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the ht\n+00172100: 7470 5f70 6f73 743c 2f61 3e3c 2f63 6f64 tp_post plugin which \n+00172120: 6973 206d 6f72 6520 6361 7061 626c 652e is more capable.\n+00172130: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+00172170: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00172180: 2069 643d 226b 6565 7061 6c69 7665 223e id=\"keepalive\">\n+00172190: 3c2f 613e 0a54 4350 2061 6e64 2048 5454 .TCP and HTT\n+001721a0: 5020 6b65 6570 2d61 6c69 7665 3c2f 6832 P keep-alive.

    To activate\n+001721c0: 2048 5454 5020 6b65 6570 2d61 6c69 7665 HTTP keep-alive\n+001721d0: 2c20 7365 7420 7468 6520 3c63 6f64 653e , set the \n+001721e0: 2353 4f41 505f 494f 5f4b 4545 5041 4c49 #SOAP_IO_KEEPALI\n+001721f0: 5645 3c2f 636f 6465 3e20 666c 6167 2066 VE flag f\n+00172200: 6f72 2062 6f74 6820 696e 7075 7420 616e or both input an\n+00172210: 6420 6f75 7470 7574 206d 6f64 6573 2c20 d output modes, \n+00172220: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Run-time flags\n+00172260: 3c2f 613e 202e 2046 6f72 2065 7861 6d70 . For examp\n+00172270: 6c65 3c2f 703e 0a3c 6469 7620 636c 6173 le

    .
    <\n+001722a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001722b0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
    .
    soap_init1\n+001723a0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001723d0: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_I\n+00172430: 4f5f 4b45 4550 414c 4956 453c 2f61 3e29 O_KEEPALIVE)\n+00172440: 3b20 3c2f 6469 763e 0a3c 2f64 6976 3e3c ;
    .

    <\n+00172450: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00172460: 3c70 3e57 6865 6e20 6120 636c 6965 6e74

    When a client\n+00172470: 206f 7220 6120 7365 7276 6963 6520 636f or a service co\n+00172480: 6d6d 756e 6963 6174 6573 2077 6974 6820 mmunicates with \n+00172490: 616e 6f74 6865 7220 636c 6965 6e74 206f another client o\n+001724a0: 7220 7365 7276 6963 6520 7468 6174 2073 r service that s\n+001724b0: 7570 706f 7274 7320 6b65 6570 2061 6c69 upports keep ali\n+001724c0: 7665 2c20 7468 6520 3c63 6f64 653e 3c61 ve, the soap\n+00172580: 3a3a 6b65 6570 5f61 6c69 7665 3c2f 613e ::keep_alive\n+00172590: 3c2f 636f 6465 3e20 7661 7269 6162 6c65 variable\n+001725a0: 2077 696c 6c20 6265 2073 6574 2074 6f20 will be set to \n+001725b0: 312c 206f 7468 6572 7769 7365 2069 7420 1, otherwise it \n+001725c0: 6973 2072 6573 6574 2074 6f20 3020 696e is reset to 0 in\n+001725d0: 6469 6361 7469 6e67 2074 6861 7420 7468 dicating that th\n+001725e0: 6520 6f74 6865 7220 7061 7274 7920 7761 e other party wa\n+001725f0: 6e74 7320 746f 2063 6c6f 7365 2074 6865 nts to close the\n+00172600: 2063 6f6e 6e65 6374 696f 6e2e 2054 6865 connection. The\n+00172610: 2063 6f6e 6e65 6374 696f 6e20 6d61 7962 connection mayb\n+00172620: 6520 7465 726d 696e 6174 6564 206f 6e20 e terminated on \n+00172630: 6569 7468 6572 2065 6e64 2062 6566 6f72 either end befor\n+00172640: 6520 7468 6520 636f 6d6d 756e 6963 6174 e the communicat\n+00172650: 696f 6e20 636f 6d70 6c65 7465 642c 2066 ion completed, f\n+00172660: 6f72 2065 7861 6d70 6c65 2077 6865 6e20 or example when \n+00172670: 7468 6520 7365 7276 6572 206b 6565 702d the server keep-\n+00172680: 616c 6976 6520 636f 6e6e 6563 7469 6f6e alive connection\n+00172690: 2068 6173 2074 696d 6564 206f 7574 2e20 has timed out. \n+001726a0: 5468 6973 206d 6179 2067 656e 6572 6174 This may generat\n+001726b0: 6520 6120 2242 726f 6b65 6e20 5069 7065 e a \"Broken Pipe\n+001726c0: 2220 7369 676e 616c 206f 6e20 556e 6978 \" signal on Unix\n+001726d0: 2f4c 696e 7578 2070 6c61 7466 6f72 6d73 /Linux platforms\n+001726e0: 2e20 5468 6973 2073 6967 6e61 6c20 6361 . This signal ca\n+001726f0: 6e20 6265 2063 6175 6768 7420 7769 7468 n be caught with\n+00172700: 2061 2073 6967 6e61 6c20 6861 6e64 6c65 a signal handle\n+00172710: 723a 3c2f 703e 0a3c 6469 7620 636c 6173 r:

    .
    s\n+00172740: 6967 6e61 6c28 5349 4750 4950 452c 2073 ignal(SIGPIPE, s\n+00172750: 6967 7069 7065 5f68 616e 646c 6529 3b3c igpipe_handle);<\n+00172760: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00172780: 7768 6572 652c 2066 6f72 2065 7861 6d70 where, for examp\n+00172790: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

    .
    \n+001727c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void sigpipe_ha\n+001727f0: 6e64 6c65 283c 7370 616e 2063 6c61 7373 ndle(i\n+00172810: 6e74 3c2f 7370 616e 3e20 7829 207b 207d nt x) { }\n+00172820: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Alternatively, \n+00172850: 6272 6f6b 656e 2070 6970 6573 2063 616e broken pipes can\n+00172860: 2062 6520 6b65 7074 2073 696c 656e 7420 be kept silent \n+00172870: 6279 2073 6574 7469 6e67 3a3c 2f70 3e0a by setting:

    .\n+00172880: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .
    int socket_flag\n+00172a20: 733c 2f64 6976 3e3c 6469 7620 636c 6173 s
    User-d\n+00172a40: 6566 696e 6162 6c65 2073 6f63 6b65 7420 efinable socket \n+00172a50: 7365 6e64 2061 6e64 2072 6563 7620 666c send and recv fl\n+00172a60: 6167 732c 2066 6f72 2065 7861 6d70 6c65 ags, for example\n+00172a70: 2061 7373 6967 6e20 4d53 475f 4e4f 5349 assign MSG_NOSI\n+00172a80: 474e 414c 2074 6f20 6469 7361 626c 6520 GNAL to disable \n+00172a90: 7369 6770 6970 6520 2874 6865 2076 612e sigpipe (the va.\n+00172aa0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De\n+00172ac0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00172ad0: 6473 6f61 7032 2e68 3a33 3335 393c 2f64 dsoap2.h:3359
    .
    \n+00172af0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

    .

    .HT\n+00176a40: 5450 2062 6173 6963 2061 7574 6865 6e74 TP basic authent\n+00176a50: 6963 6174 696f 6e3c 2f68 333e 0a3c 703e ication

    .

    \n+00176a60: 4854 5450 2062 6173 6963 2061 7574 6865 HTTP basic authe\n+00176a70: 6e74 6963 6174 696f 6e20 6973 2065 6e61 ntication is ena\n+00176a80: 626c 6564 2061 7420 7468 6520 636c 6965 bled at the clie\n+00176a90: 6e74 2d73 6964 6520 6279 2073 6574 7469 nt-side by setti\n+00176aa0: 6e67 2074 6865 203c 636f 6465 3e63 6f6e ng the con\n+00176ab0: 7374 2063 6861 722a 203c 6120 636c 6173 st char* soap::userid and const char* <\n+00176ba0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00176bb0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00176bc0: 6d6c 2361 3232 6432 3139 6339 3866 3066 ml#a22d219c98f0f\n+00176bd0: 6366 3435 3636 3431 3237 3763 6336 3431 cf456641277cc641\n+00176be0: 3734 6133 2220 7469 746c 653d 2255 7365 74a3\" title=\"Use\n+00176bf0: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP\n+00176c00: 2061 6e64 204e 544c 4d20 6175 7468 6f72 and NTLM author\n+00176c10: 697a 6174 696f 6e20 7061 7373 776f 7264 ization password\n+00176c20: 2073 7472 696e 6720 7265 7175 6972 6564 string required\n+00176c30: 2066 6f72 2048 5454 5020 6261 7369 6320 for HTTP basic \n+00176c40: 616e 6420 4e54 4c4d 2061 7574 6865 6e74 and NTLM authent\n+00176c50: 6963 2e2e 2e22 3e73 6f61 703a 3a70 6173 ic...\">soap::pas\n+00176c60: 7377 643c 2f61 3e3c 2f63 6f64 653e 2073 swd s\n+00176c70: 7472 696e 6773 2074 6f20 6120 7573 6572 trings to a user\n+00176c80: 6e61 6d65 2061 6e64 2070 6173 7377 6f72 name and passwor\n+00176c90: 642c 2072 6573 7065 6374 6976 656c 792e d, respectively.\n+00176ca0: 2041 2073 6572 7665 7220 6d61 7920 7265 A server may re\n+00176cb0: 7175 6573 7420 7573 6572 2061 7574 6865 quest user authe\n+00176cc0: 6e74 6963 6174 696f 6e20 616e 6420 6465 ntication and de\n+00176cd0: 6e69 6573 2061 6363 6573 7320 2848 5454 nies access (HTT\n+00176ce0: 5020 3430 3120 6572 726f 7229 2077 6865 P 401 error) whe\n+00176cf0: 6e20 7468 6520 636c 6965 6e74 2074 7269 n the client tri\n+00176d00: 6573 2074 6f20 636f 6e6e 6563 7420 7769 es to connect wi\n+00176d10: 7468 6f75 7420 4854 5450 2061 7574 6865 thout HTTP authe\n+00176d20: 6e74 6963 6174 696f 6e20 286f 7220 7769 ntication (or wi\n+00176d30: 7468 2074 6865 2077 726f 6e67 2061 7574 th the wrong aut\n+00176d40: 6865 6e74 6963 6174 696f 6e20 696e 666f hentication info\n+00176d50: 726d 6174 696f 6e29 2e3c 2f70 3e0a 3c70 rmation).

    .Basic authentic\n+00176d70: 6174 696f 6e20 7368 6f75 6c64 206f 6e6c ation should onl\n+00176d80: 7920 6265 2075 7365 6420 6f76 6572 2048 y be used over H\n+00176d90: 5454 5053 2c20 6265 6361 7573 6520 7468 TTPS, because th\n+00176da0: 6520 6372 6564 656e 7469 616c 7320 6172 e credentials ar\n+00176db0: 6520 7365 6e74 2069 6e20 7468 6520 636c e sent in the cl\n+00176dc0: 6561 7220 7769 7468 2048 5454 502e 2053 ear with HTTP. S\n+00176dd0: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section The HTTP\n+00176e10: 2064 6967 6573 7420 6175 7468 656e 7469 digest authenti\n+00176e20: 6361 7469 6f6e 2070 6c75 6769 6e3c 2f61 cation plugin to use the HTT\n+00176e40: 5020 6469 6765 7374 2070 6c75 6769 6e20 P digest plugin \n+00176e50: 7468 6174 2069 7320 7361 6665 2066 6f72 that is safe for\n+00176e60: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+00176e70: 6f76 6572 2048 5454 502e 3c2f 703e 0a3c over HTTP.

    .<\n+00176e80: 703e 4865 7265 2069 7320 616e 2065 7861 p>Here is an exa\n+00176e90: 6d70 6c65 2063 6c69 656e 7420 636f 6465 mple client code\n+00176ea0: 2066 7261 676d 656e 7420 746f 2073 6574 fragment to set\n+00176eb0: 2074 6865 2048 5454 5020 6175 7468 656e the HTTP authen\n+00176ec0: 7469 6361 7469 6f6e 2075 7365 726e 616d tication usernam\n+00176ed0: 6520 616e 6420 7061 7373 776f 7264 3a3c e and password:<\n+00176ee0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    struct \n+00176f30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00176f60: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00176f90: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+00176ff0: 3c2f 613e 2829 3b20 3c2f 6469 763e 0a3c ();
    .<\n+00177000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00177010: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+00177040: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->us\n+00177090: 6572 6964 3c2f 613e 203d 203c 7370 616e erid = "gue\n+001770c0: 7374 2671 756f 743b 3c2f 7370 616e 3e3b st";\n+001770d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->passwd = \n+00177190: 2671 756f 743b 7669 7369 7426 7175 6f74 "visit"\n+001771a0: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n+001771b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n+001771e0: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n+001771f0: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n+00177200: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00177230: 202e 2e2e 2929 3c2f 6469 763e 0a3c 6469 ...))
    . \n+00177250: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+00177270: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    \n+00177280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    els\n+001772b0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n+001772c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001772d0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n+001772f0: 7375 6363 6573 733c 2f73 7061 6e3e 3c2f success.
    so\n+001773a0: 6170 3a3a 7061 7373 7764 3c2f 613e 3c2f ap::passwd
    const ch\n+001773d0: 6172 202a 2070 6173 7377 643c 2f64 6976 ar * passwd
    User-definab\n+00177400: 6c65 2048 5454 5020 616e 6420 4e54 4c4d le HTTP and NTLM\n+00177410: 2061 7574 686f 7269 7a61 7469 6f6e 2070 authorization p\n+00177420: 6173 7377 6f72 6420 7374 7269 6e67 2072 assword string r\n+00177430: 6571 7569 7265 6420 666f 7220 4854 5450 equired for HTTP\n+00177440: 2062 6173 6963 2061 6e64 204e 544c 4d20 basic and NTLM \n+00177450: 6175 7468 656e 7469 632e 2e2e 3c2f 6469 authentic...
    Definiti\n+00177480: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00177490: 2e68 3a33 3832 373c 2f64 6976 3e3c 2f64 .h:3827
    .
    soa\n+00177540: 703a 3a75 7365 7269 643c 2f61 3e3c 2f64 p::userid
    const cha\n+00177570: 7220 2a20 7573 6572 6964 3c2f 6469 763e r * userid
    \n+00177580: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n+001775a0: 6520 4854 5450 2061 6e64 204e 544c 4d20 e HTTP and NTLM \n+001775b0: 6175 7468 6f72 697a 6174 696f 6e20 7573 authorization us\n+001775c0: 6572 2069 6420 7374 7269 6e67 2066 6f72 er id string for\n+001775d0: 2048 5454 5020 6261 7369 6320 616e 6420 HTTP basic and \n+001775e0: 4e54 4c4d 2061 7574 6865 6e74 6963 6174 NTLM authenticat\n+001775f0: 696f 6e20 6279 2074 2e2e 2e3c 2f64 6976 ion by t...
    Definitio\n+00177620: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00177630: 683a 3338 3232 3c2f 6469 763e 3c2f 6469 h:3822
    .

    A c\n+00177660: 6c69 656e 7420 534f 4150 2072 6571 7565 lient SOAP reque\n+00177670: 7374 2077 696c 6c20 6861 7665 2074 6865 st will have the\n+00177680: 2066 6f6c 6c6f 7769 6e67 2048 5454 5020 following HTTP \n+00177690: 6865 6164 6572 3a20 3c2f 703e 3c70 7265 header:

    POST /XXX HTTP\n+001776c0: 2f31 2e31 200a 486f 7374 3a20 5959 5920 /1.1 .Host: YYY \n+001776d0: 0a55 7365 722d 4167 656e 743a 2067 534f .User-Agent: gSO\n+001776e0: 4150 2f32 2e38 200a 436f 6e74 656e 742d AP/2.8 .Content-\n+001776f0: 5479 7065 3a20 7465 7874 2f78 6d6c 3b20 Type: text/xml; \n+00177700: 6368 6172 7365 743d 7574 662d 3820 0a43 charset=utf-8 .C\n+00177710: 6f6e 7465 6e74 2d4c 656e 6774 683a 205a ontent-Length: Z\n+00177720: 5a5a 200a 4175 7468 6f72 697a 6174 696f ZZ .Authorizatio\n+00177730: 6e3a 2042 6173 6963 205a 3356 6c63 3351 n: Basic Z3Vlc3Q\n+00177740: 365a 3356 6c63 3351 3d20 0a3c 2f70 7265 6Z3Vlc3Q= .

    A client mu\n+00177760: 7374 2073 6574 2074 6865 203c 636f 6465 st set the const char* soap::useri\n+00177840: 643c 2f61 3e3c 2f63 6f64 653e 2061 6e64 d and\n+00177850: 203c 636f 6465 3e63 6f6e 7374 2063 6861 const cha\n+00177860: 722a 203c 6120 636c 6173 733d 2265 6c22 r* soap:\n+00177920: 3a70 6173 7377 643c 2f61 3e3c 2f63 6f64 :passwd strings for e\n+00177940: 6163 6820 6361 6c6c 2074 6861 7420 7265 ach call that re\n+00177950: 7175 6972 6573 2063 6c69 656e 7420 6175 quires client au\n+00177960: 7468 656e 7469 6361 7469 6f6e 2e20 5468 thentication. Th\n+00177970: 6520 7374 7269 6e67 7320 6172 6520 7265 e strings are re\n+00177980: 7365 7420 6166 7465 7220 6561 6368 2073 set after each s\n+00177990: 7563 6365 7373 6675 6c20 6f72 2075 6e73 uccessful or uns\n+001779a0: 7563 6365 7373 6675 6c20 6361 6c6c 2e3c uccessful call.<\n+001779b0: 2f70 3e0a 3c70 3e57 6865 6e20 7072 6573 /p>.

    When pres\n+001779c0: 656e 742c 2074 6865 203c 636f 6465 3e57 ent, the W\n+001779d0: 5757 2d41 7574 6865 6e74 6963 6174 653c WW-Authenticate<\n+001779e0: 2f63 6f64 653e 2048 5454 5020 6865 6164 /code> HTTP head\n+001779f0: 6572 2072 6574 7572 6e65 6420 6279 2074 er returned by t\n+00177a00: 6865 2073 6572 7665 7220 7769 7468 2074 he server with t\n+00177a10: 6865 2061 7574 6865 6e74 6963 6174 696f he authenticatio\n+00177a20: 6e20 7265 616c 6d20 6973 2073 746f 7265 n realm is store\n+00177a30: 6420 696e 2074 6865 2074 6865 203c 636f d in the the soap:\n+00177b00: 3a61 7574 6872 6561 6c6d 3c2f 613e 3c2f :authrealm string. Th\n+00177b20: 6973 2069 7320 7573 6566 756c 2066 6f72 is is useful for\n+00177b30: 2063 6c69 656e 7473 2074 6f20 7573 6520 clients to use \n+00177b40: 7468 6973 2064 6f6d 6169 6e20 696e 666f this domain info\n+00177b50: 726d 6174 696f 6e20 746f 2072 6573 706f rmation to respo\n+00177b60: 6e64 2074 6f20 6175 7468 656e 7469 6361 nd to authentica\n+00177b70: 7469 6f6e 2072 6571 7565 7374 732e 3c2f tion requests..

    A stand-al\n+00177b90: 6f6e 6520 6753 4f41 5020 5765 6220 5365 one gSOAP Web Se\n+00177ba0: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n+00177bb0: 6e20 6361 6e20 656e 666f 7263 6520 4854 n can enforce HT\n+00177bc0: 5450 2061 7574 6865 6e74 6963 6174 696f TP authenticatio\n+00177bd0: 6e20 6f6e 2063 6c69 656e 7473 2062 7920 n on clients by \n+00177be0: 6368 6563 6b69 6e67 2074 6865 203c 636f checking the const char* <\n+00177c00: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00177c10: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00177c20: 6d6c 2361 3265 6465 3032 3039 3564 3938 ml#a2ede02095d98\n+00177c30: 3934 3266 3463 3232 3066 6431 3762 3439 942f4c220fd17b49\n+00177c40: 3537 3033 2220 7469 746c 653d 2255 7365 5703\" title=\"Use\n+00177c50: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP\n+00177c60: 2061 6e64 204e 544c 4d20 6175 7468 6f72 and NTLM author\n+00177c70: 697a 6174 696f 6e20 7573 6572 2069 6420 ization user id \n+00177c80: 7374 7269 6e67 2066 6f72 2048 5454 5020 string for HTTP \n+00177c90: 6261 7369 6320 616e 6420 4e54 4c4d 2061 basic and NTLM a\n+00177ca0: 7574 6865 6e74 6963 6174 696f 6e20 6279 uthentication by\n+00177cb0: 2074 2e2e 2e22 3e73 6f61 703a 3a75 7365 t...\">soap::use\n+00177cc0: 7269 643c 2f61 3e3c 2f63 6f64 653e 2061 rid a\n+00177cd0: 6e64 203c 636f 6465 3e63 6f6e 7374 2063 nd const c\n+00177ce0: 6861 722a 203c 6120 636c 6173 733d 2265 har* soa\n+00177da0: 703a 3a70 6173 7377 643c 2f61 3e3c 2f63 p::passwd strings. Th\n+00177dc0: 6573 6520 7374 7269 6e67 7320 6172 6520 ese strings are \n+00177dd0: 7365 7420 7768 656e 2061 2063 6c69 656e set when a clien\n+00177de0: 7420 7265 7175 6573 7420 636f 6e74 6169 t request contai\n+00177df0: 6e73 2048 5454 5020 6175 7468 656e 7469 ns HTTP authenti\n+00177e00: 6361 7469 6f6e 2068 6561 6465 7273 2e20 cation headers. \n+00177e10: 5468 6520 7374 7269 6e67 7320 7368 6f75 The strings shou\n+00177e20: 6c64 2062 6520 6368 6563 6b65 6420 696e ld be checked in\n+00177e30: 2065 6163 6820 7365 7276 6963 6520 6d65 each service me\n+00177e40: 7468 6f64 2028 7468 6174 2072 6571 7569 thod (that requi\n+00177e50: 7265 7320 6175 7468 656e 7469 6361 7469 res authenticati\n+00177e60: 6f6e 2074 6f20 6578 6563 7574 6529 2e3c on to execute).<\n+00177e70: 2f70 3e0a 3c70 3e48 6572 6520 6973 2061 /p>.

    Here is a\n+00177e80: 6e20 6578 616d 706c 6520 7365 7276 6963 n example servic\n+00177e90: 6520 6d65 7468 6f64 2069 6d70 6c65 6d65 e method impleme\n+00177ea0: 6e74 6174 696f 6e20 7468 6174 2065 6e66 ntation that enf\n+00177eb0: 6f72 6365 6420 636c 6965 6e74 2061 7574 orced client aut\n+00177ec0: 6865 6e74 6963 6174 696f 6e3a 3c2f 703e hentication:

    \n+00177ed0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ns\n+00177f20: 5f5f 7765 626d 6574 686f 6428 3c73 7061 __webmethod(struct \n+00177f50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00177f80: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00177fb0: 2c20 2e2e 2e29 203c 2f64 6976 3e0a 3c64 , ...)
    .\n+00177fd0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n+00178010: 2821 3c61 2063 6c61 7373 3d22 636f 6465 (!soap->u\n+00178090: 7365 7269 643c 2f61 3e3c 2f64 6976 3e0a serid
    .\n+001780a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    || !\n+001780e0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->passwd\n+00178140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    || s\n+00178160: 7472 636d 7028 3c61 2063 6c61 7373 3d22 trcmp(soa\n+00178190: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->userid, <\n+001781f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00178200: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00178210: 3b67 7565 7374 2671 756f 743b 3c2f 7370 ;guest")
    .
    \n+00178240: 7c7c 2073 7472 636d 7028 3c61 2063 6c61 || strcmp(soap->passwd, &\n+001782f0: 7175 6f74 3b76 6973 6974 2671 756f 743b quot;visit"\n+00178300: 3c2f 7370 616e 3e29 2920 3c2f 6469 763e ))
    \n+00178310: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+00178340: 2020 203c 6120 636c 6173 733d 2263 6f64 soap->\n+001783c0: 6175 7468 7265 616c 6d3c 2f61 3e20 3d20 authrealm = \n+001783d0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001783f0: 743b 2e2e 2e26 7175 6f74 3b3c 2f73 7061 t;..."; // dom\n+00178420: 6169 6e20 7265 616c 6d20 6163 6365 7373 ain realm access\n+00178430: 6564 2028 6f70 7469 6f6e 616c 2c20 4e55 ed (optional, NU\n+00178440: 4c4c 2074 6f20 6f6d 6974 293c 2f73 7061 LL to omit)
    .
    <\n+00178470: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00178480: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00178490: 2f73 7061 6e3e 2034 3031 3b20 3c2f 6469 /span> 401; .
    }
    .<\n+001784c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001784d0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n+001784f0: 7765 626d 6574 686f 6420 6c6f 6769 633c webmethod logic<\n+00178500: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00178520: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00178540: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+001785a0: 505f 4f4b 3c2f 613e 3b3c 2f64 6976 3e0a P_OK;
    .\n+001785b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    \n+00178690: 636f 6e73 7420 6368 6172 202a 2061 7574 const char * aut\n+001786a0: 6872 6561 6c6d 3c2f 6469 763e 3c64 6976 hrealm
    T\n+001786c0: 6865 2048 5454 5020 616e 6420 4e54 4c4d he HTTP and NTLM\n+001786d0: 2061 7574 686f 7269 7a61 7469 6f6e 2072 authorization r\n+001786e0: 6561 6c6d 2f64 6f6d 6169 6e20 7374 7269 ealm/domain stri\n+001786f0: 6e67 2072 6563 6569 7665 6420 6279 2074 ng received by t\n+00178700: 6865 2063 6c69 656e 7420 7769 7468 2074 he client with t\n+00178710: 6865 2057 5757 2d41 7574 6865 6e74 6963 he WWW-Authentic\n+00178720: 6174 6520 2e2e 2e3c 2f64 6976 3e3c 6469 ate ...
    \n+00178740: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:38\n+00178760: 3332 3c2f 6469 763e 3c2f 6469 763e 0a3c 32
    .<\n+00178770: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    When th\n+00178790: 6520 6175 7468 656e 7469 6361 7469 6f6e e authentication\n+001787a0: 2066 6169 6c73 2c20 7468 6520 7365 7276 fails, the serv\n+001787b0: 6963 6520 7265 7370 6f6e 7365 2077 6974 ice response wit\n+001787c0: 6820 6120 534f 4150 2046 6175 6c74 206d h a SOAP Fault m\n+001787d0: 6573 7361 6765 2061 6e64 2061 2048 5454 essage and a HTT\n+001787e0: 5020 6572 726f 7220 636f 6465 2022 3430 P error code \"40\n+001787f0: 3120 556e 6175 7468 6f72 697a 6564 222e 1 Unauthorized\".\n+00178800: 2054 6865 2048 5454 5020 6572 726f 7220 The HTTP error \n+00178810: 636f 6465 7320 6172 6520 6465 7363 7269 codes are descri\n+00178820: 6265 6420 696e 2053 6563 7469 6f6e 203c bed in Section <\n+00178830: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00178840: 663d 2269 6e64 6578 2e68 746d 6c23 6572 f=\"index.html#er\n+00178850: 7263 6f64 6573 223e 5275 6e2d 7469 6d65 rcodes\">Run-time\n+00178860: 2065 7272 6f72 2063 6f64 6573 3c2f 613e error codes\n+00178870: 202e 3c2f 703e 0a3c 703e 546f 2072 6574 .

    .

    To ret\n+00178880: 7572 6e20 6120 6e6f 6e2d 534f 4150 2065 urn a non-SOAP e\n+00178890: 7272 6f72 2c20 7573 653a 3c2f 703e 0a3c rror, use:

    .<\n+001788a0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001788b0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    return <\n+001788f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00178900: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00178910: 705f 5f69 6f2e 6874 6d6c 2367 6136 6163 p__io.html#ga6ac\n+00178920: 3565 3535 3030 3732 6135 3963 3862 3664 5e550072a59c8b6d\n+00178930: 3433 3262 3633 6363 3335 3433 6122 3e73 432b63cc3543a\">s\n+00178940: 6f61 705f 7365 6e64 5f65 6d70 7479 5f72 oap_send_empty_r\n+00178950: 6573 706f 6e73 653c 2f61 3e28 3c61 2063 esponse(soap, 401\n+00178990: 293b 203c 2f64 6976 3e0a 3c2f 6469 763e );
    .
    \n+001789a0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d The following N\n+00179550: 544c 4d20 6861 6e64 7368 616b 6520 6265 TLM handshake be\n+00179560: 7477 6565 6e20 7468 6520 636c 6965 6e74 tween the client\n+00179570: 2043 2061 6e64 2073 6572 7665 7220 5320 C and server S \n+00179580: 6973 2070 6572 666f 726d 6564 3a20 3c2f is performed:
    1: C  --\n+001795b0: 2667 743b 2053 2026 616d 703b 2050 4f53  > S & POS\n+001795c0: 5420 2e2e 2e20 0a20 2020 2020 2020 2020  T ... .         \n+001795d0: 2020 2026 616d 703b 2043 6f6e 7465 6e74     & Content\n+001795e0: 2d54 7970 653a 2074 6578 742f 786d 6c3b  -Type: text/xml;\n+001795f0: 2063 6861 7273 6574 3d75 7466 2d38 200a   charset=utf-8 .\n+00179600: 0a32 3a20 4320 266c 743b 2d2d 2020 5320  .2: C <--  S \n+00179610: 2661 6d70 3b20 3430 3120 556e 6175 7468  & 401 Unauth\n+00179620: 6f72 697a 6564 200a 2020 2020 2020 2020  orized .        \n+00179630: 2020 2020 2661 6d70 3b20 5757 572d 4175      & WWW-Au\n+00179640: 7468 656e 7469 6361 7465 3a20 4e54 4c4d  thenticate: NTLM\n+00179650: 200a 0a33 3a20 4320 202d 2d26 6774 3b20   ..3: C  --> \n+00179660: 5320 2661 6d70 3b20 4745 5420 2e2e 2e20  S & GET ... \n+00179670: 0a20 2020 2020 2020 2020 2020 2026 616d  .            &am\n+00179680: 703b 2041 7574 686f 7269 7a61 7469 6f6e  p; Authorization\n+00179690: 3a20 4e54 4c4d 2026 6c74 3b62 6173 6536  : NTLM <base6\n+001796a0: 342d 656e 636f 6465 6420 7479 7065 2d31  4-encoded type-1\n+001796b0: 2d6d 6573 7361 6765 2667 743b 200a 0a34  -message> ..4\n+001796c0: 3a20 4320 266c 743b 2d2d 2020 5320 2661  : C <--  S &a\n+001796d0: 6d70 3b20 3430 3120 556e 6175 7468 6f72  mp; 401 Unauthor\n+001796e0: 697a 6564 200a 2020 2020 2020 2020 2020  ized .          \n+001796f0: 2020 2661 6d70 3b20 5757 572d 4175 7468    & WWW-Auth\n+00179700: 656e 7469 6361 7465 3a20 4e54 4c4d 2026  enticate: NTLM &\n+00179710: 6c74 3b62 6173 6536 342d 656e 636f 6465  lt;base64-encode\n+00179720: 6420 7479 7065 2d32 2d6d 6573 7361 6765  d type-2-message\n+00179730: 2667 743b 200a 0a35 3a20 4320 202d 2d26  > ..5: C  --&\n+00179740: 6774 3b20 5320 2661 6d70 3b20 504f 5354  gt; S & POST\n+00179750: 202e 2e2e 200a 2020 2020 2020 2020 2020   ... .          \n+00179760: 2020 2661 6d70 3b20 436f 6e74 656e 742d    & Content-\n+00179770: 5479 7065 3a20 7465 7874 2f78 6d6c 3b20  Type: text/xml; \n+00179780: 6368 6172 7365 743d 7574 662d 3820 0a20  charset=utf-8 . \n+00179790: 2020 2020 2020 2020 2020 2026 616d 703b             &\n+001797a0: 2041 7574 686f 7269 7a61 7469 6f6e 3a20   Authorization: \n+001797b0: 4e54 4c4d 2026 6c74 3b62 6173 6536 342d  NTLM <base64-\n+001797c0: 656e 636f 6465 6420 7479 7065 2d33 2d6d  encoded type-3-m\n+001797d0: 6573 7361 6765 2667 743b 200a 0a36 3a20  essage> ..6: \n+001797e0: 4320 266c 743b 2d2d 2020 5320 2661 6d70  C <--  S &\n+001797f0: 3b20 3230 3020 4f4b 0a3c 2f70 7265 3e3c  ; 200 OK.
    <\n+00179800: 703e 2077 6865 7265 2073 7461 6765 7320 p> where stages \n+00179810: 3120 616e 6420 3220 696e 6469 6361 7465 1 and 2 indicate\n+00179820: 7320 6120 636c 6965 6e74 2061 7474 656d s a client attem\n+00179830: 7074 696e 6720 746f 2063 6f6e 6e65 6374 pting to connect\n+00179840: 2077 6974 686f 7574 2061 7574 686f 7269 without authori\n+00179850: 7a61 7469 6f6e 2069 6e66 6f72 6d61 7469 zation informati\n+00179860: 6f6e 2c20 7768 6963 6820 6973 2074 6865 on, which is the\n+00179870: 2066 6972 7374 206d 6574 686f 6420 6361 first method ca\n+00179880: 6c6c 2069 6e20 7468 6520 636f 6465 2061 ll in the code a\n+00179890: 626f 7665 2e20 5374 6167 6520 3320 746f bove. Stage 3 to\n+001798a0: 2036 2068 6170 7065 6e20 7769 7468 2074 6 happen with t\n+001798b0: 6865 2070 726f 7065 7220 636c 6965 6e74 he proper client\n+001798c0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001798d0: 7365 7420 7769 7468 203c 636f 6465 3e63 set with c\n+001798e0: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::userid<\n+001799b0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+001799c0: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n+001799d0: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::p\n+00179a90: 6173 7377 643c 2f61 3e3c 2f63 6f64 653e asswd
    \n+00179aa0: 2e20 4f70 7469 6f6e 616c 6c79 2c20 7468 . Optionally, th\n+00179ab0: 6520 3c63 6f64 653e 636f 6e73 7420 6368 e const ch\n+00179ac0: 6172 2a20 3c61 2063 6c61 7373 3d22 656c ar* soap\n+00179b80: 3a3a 6175 7468 7265 616c 6d3c 2f61 3e3c ::authrealm<\n+00179b90: 2f63 6f64 653e 2073 7472 696e 6720 7368 /code> string sh\n+00179ba0: 6f75 6c64 2062 6520 7365 7420 6173 2077 ould be set as w\n+00179bb0: 656c 6c20 746f 2069 6e64 6963 6174 6520 ell to indicate \n+00179bc0: 7468 6520 646f 6d61 696e 2061 6363 6573 the domain acces\n+00179bd0: 7365 6420 2874 6869 7320 7374 7269 6e67 sed (this string\n+00179be0: 2069 7320 6e6f 726d 616c 6c79 2073 6574 is normally set\n+00179bf0: 2077 6865 6e20 7468 6520 7365 7276 6572 when the server\n+00179c00: 2072 6573 706f 6e64 7320 7769 7468 2048 responds with H\n+00179c10: 5454 5020 3430 3120 736f 2074 6865 2063 TTP 401 so the c\n+00179c20: 6c69 656e 7420 7265 6365 6976 6573 2074 lient receives t\n+00179c30: 6869 7320 7365 7276 6572 2064 6f6d 6169 his server domai\n+00179c40: 6e20 696e 666f 726d 6174 696f 6e29 2e20 n information). \n+00179c50: 4e54 4c4d 2061 7574 6865 6e74 6963 6174 NTLM authenticat\n+00179c60: 6573 2063 6f6e 6e65 6374 696f 6e73 2c20 es connections, \n+00179c70: 6e6f 7420 7265 7175 6573 7473 2e20 5768 not requests. Wh\n+00179c80: 656e 2074 6865 2063 6f6e 6e65 6374 696f en the connectio\n+00179c90: 6e20 6973 206b 6570 7420 616c 6976 652c n is kept alive,\n+00179ca0: 2073 7562 7365 7175 656e 7420 6d65 7373 subsequent mess\n+00179cb0: 6167 6573 2063 616e 2062 6520 6578 6368 ages can be exch\n+00179cc0: 616e 6765 6420 7769 7468 6f75 7420 7265 anged without re\n+00179cd0: 2d61 7574 6865 6e74 6963 6174 696f 6e2e -authentication.\n+00179ce0: 3c2f 703e 0a3c 703e 546f 2061 766f 6964

    .

    To avoid\n+00179cf0: 2074 6865 206f 7665 7268 6561 6420 6f66 the overhead of\n+00179d00: 2074 6865 2066 6972 7374 2072 656a 6563 the first rejec\n+00179d10: 7465 6420 6361 6c6c 2c20 7573 653a 3c2f ted call, use:.

    struct <\n+00179d70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00179d80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00179d90: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00179da0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00179dd0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new1\n+00179e30: 3c2f 613e 283c 6120 636c 6173 733d 2263 (SOAP_IO_\n+00179e90: 4b45 4550 414c 4956 453c 2f61 3e29 3b20 KEEPALIVE); \n+00179ea0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00179ee0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->ntlm_chall\n+00179f40: 656e 6765 3c2f 613e 203d 203c 7370 616e enge = "&qu\n+00179f70: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    soap\n+00179fc0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->userid = <\n+0017a020: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0017a030: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0017a040: 3b5a 6170 686f 6426 7175 6f74 3b3c 2f73 ;Zaphod";
    .<\n+0017a070: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017a080: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017a090: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0017a0a0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;pass\n+0017a0f0: 7764 3c2f 613e 203d 203c 7370 616e 2063 wd = "Beebl\n+0017a120: 6562 726f 7826 7175 6f74 3b3c 2f73 7061 ebrox";
    .
    soap->\n+0017a180: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;authre\n+0017a1d0: 616c 6d3c 2f61 3e20 3d20 3c73 7061 6e20 alm = "Ursa\n+0017a200: 2d4d 696e 6f72 2671 756f 743b 3c2f 7370 -Minor";
    .if (soap_call_ns_\n+0017a260: 5f77 6562 6d65 7468 6f64 283c 6120 636c _webmethod(soap, ...)\n+0017a2a0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    ...\n+0017a2c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+0017a2e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0017a300: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0017a310: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    .\n+0017a340: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n+0017a360: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
    \n+0017a370: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n+0017a410: 6e74 6c6d 5f63 6861 6c6c 656e 6765 3c2f ntlm_challenge
    cons\n+0017a440: 7420 6368 6172 202a 206e 746c 6d5f 6368 t char * ntlm_ch\n+0017a450: 616c 6c65 6e67 653c 2f64 6976 3e3c 6469 allenge
    \n+0017a470: 5573 6572 2d64 6566 696e 6162 6c65 204e User-definable N\n+0017a480: 544c 4d20 6175 7468 656e 7469 6361 7469 TLM authenticati\n+0017a490: 6f6e 2063 6861 6c6c 656e 6765 206b 6579 on challenge key\n+0017a4a0: 2073 7472 696e 672e 3c2f 6469 763e 3c64 string.
    Definition:<\n+0017a4d0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n+0017a4e0: 3837 383c 2f64 6976 3e3c 2f64 6976 3e0a 878
    .\n+0017a4f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    When t\n+0017a510: 6865 2061 7574 6865 6e74 6963 6174 696f he authenticatio\n+0017a520: 6e20 6661 696c 7320 2873 7461 6765 2031 n fails (stage 1\n+0017a530: 2061 6e64 2032 292c 2074 6865 2073 6572 and 2), the ser\n+0017a540: 7669 6365 2072 6573 706f 6e73 6520 7769 vice response wi\n+0017a550: 7468 2048 5454 5020 6572 726f 7220 636f th HTTP error co\n+0017a560: 6465 2022 3430 3120 556e 6175 7468 6f72 de \"401 Unauthor\n+0017a570: 697a 6564 2220 616e 6420 3c63 6f64 653e ized\" and \n+0017a580: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::erro\n+0017a630: 723c 2f61 3e3c 2f63 6f64 653e 2069 7320 r is \n+0017a640: 7365 7420 746f 2048 5454 5020 636f 6465 set to HTTP code\n+0017a650: 2034 3031 2e3c 2f70 3e0a 3c70 3ef0 9f94 401.

    .

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

    .\n+0017a690: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .HTTP pro\n+0017a6d0: 7879 204e 544c 4d20 6175 7468 656e 7469 xy NTLM authenti\n+0017a6e0: 6361 7469 6f6e 3c2f 6833 3e0a 3c70 3e46 cation

    .

    F\n+0017a6f0: 6f72 2048 5454 5020 3430 3720 5072 6f78 or HTTP 407 Prox\n+0017a700: 7920 4175 7468 656e 7469 6361 7469 6f6e y Authentication\n+0017a710: 2052 6571 7569 7265 6420 7365 7420 7468 Required set th\n+0017a720: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::pro\n+0017a7e0: 7879 5f75 7365 7269 643c 2f61 3e3c 2f63 xy_userid and <\n+0017a800: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017a810: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017a820: 6d6c 2361 6437 3561 3461 6265 3131 3961 ml#ad75a4abe119a\n+0017a830: 3161 3734 6132 3664 3036 3430 3166 6131 1a74a26d06401fa1\n+0017a840: 3163 3361 2220 7469 746c 653d 2255 7365 1c3a\" title=\"Use\n+0017a850: 722d 6465 6669 6e61 626c 6520 7072 6f78 r-definable prox\n+0017a860: 7920 6175 7468 6f72 697a 6174 696f 6e20 y authorization \n+0017a870: 7061 7373 776f 7264 2073 7472 696e 6720 password string \n+0017a880: 746f 2061 7574 6865 6e74 6963 6174 6520 to authenticate \n+0017a890: 616e 6420 636f 6e6e 6563 7420 746f 2061 and connect to a\n+0017a8a0: 6e20 4854 5450 2070 726f 7879 2e22 3e73 n HTTP proxy.\">s\n+0017a8b0: 6f61 703a 3a70 726f 7879 5f70 6173 7377 oap::proxy_passw\n+0017a8c0: 643c 2f61 3e3c 2f63 6f64 653e 3a3c 2f70 d:.

    \n+0017a910: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+0017a950: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017a960: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017a970: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+0017a980: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new1<\n+0017a9e0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(SOAP_IO_K\n+0017aa40: 4545 5041 4c49 5645 3c2f 613e 293b 203c EEPALIVE); <\n+0017aa50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+0017ab30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n+0017abc0: 7072 6f78 795f 706f 7274 3c2f 613e 203d proxy_port =\n+0017abd0: 202e 2e2e 3b20 3c2f 6469 763e 0a3c 6469 ...;
    .<\n+0017abf0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0017ac00: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n+0017ac20: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, ...\n+0017ac60: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {.
    if (soap->\n+0017acf0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;error<\n+0017ad40: 2f61 3e20 3d3d 2034 3037 2920 3c2f 6469 /a> == 407) .
    {
    .<\n+0017ad70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017ad80: 3e20 2020 203c 6120 636c 6173 733d 2263 >
    soap\n+0017adb0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_userid = "Zaphod&qu\n+0017ae40: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; ..
    \n+0017af50: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0017af80: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->au\n+0017afd0: 7468 7265 616c 6d3c 2f61 3e20 3d20 3c73 threalm = "\n+0017b000: 5572 7361 2d4d 696e 6f72 2671 756f 743b Ursa-Minor"\n+0017b010: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n+0017b020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0017b050: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+0017b060: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n+0017b070: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    \n+0017b0b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // error
    .
    <\n+0017b110: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0017b120: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    \n+0017b150: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+0017b170: 7375 6363 6573 733c 2f73 7061 6e3e 3c2f success.\n+0017b260: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n+0017b280: 6520 7072 6f78 7920 706f 7274 2077 6869 e proxy port whi\n+0017b290: 6368 2073 686f 756c 6420 6265 2073 6574 ch should be set\n+0017b2a0: 2074 6f20 636f 6e6e 6563 7420 7468 726f to connect thro\n+0017b2b0: 7567 6820 616e 2048 5454 5020 7072 6f78 ugh an HTTP prox\n+0017b2c0: 7920 2874 6865 2076 616c 7565 2069 7320 y (the value is \n+0017b2d0: 3830 3830 2062 7920 2e2e 2e3c 2f64 6976 8080 by ...
    Definitio\n+0017b300: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0017b310: 683a 3339 3036 3c2f 6469 763e 3c2f 6469 h:3906
    .
    .<\n+0017b660: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0017b670: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+0017b680: 6874 6d6c 5f61 6437 3561 3461 6265 3131 html_ad75a4abe11\n+0017b690: 3961 3161 3734 6132 3664 3036 3430 3166 9a1a74a26d06401f\n+0017b6a0: 6131 3163 3361 223e 3c64 6976 2063 6c61 a11c3a\">
    soap::pr\n+0017b700: 6f78 795f 7061 7373 7764 3c2f 613e 3c2f oxy_passwd
    const ch\n+0017b730: 6172 202a 2070 726f 7879 5f70 6173 7377 ar * proxy_passw\n+0017b740: 643c 2f64 6976 3e3c 6469 7620 636c 6173 d
    User-d\n+0017b760: 6566 696e 6162 6c65 2070 726f 7879 2061 efinable proxy a\n+0017b770: 7574 686f 7269 7a61 7469 6f6e 2070 6173 uthorization pas\n+0017b780: 7377 6f72 6420 7374 7269 6e67 2074 6f20 sword string to \n+0017b790: 6175 7468 656e 7469 6361 7465 2061 6e64 authenticate and\n+0017b7a0: 2063 6f6e 6e65 6374 2074 6f20 616e 2048 connect to an H\n+0017b7b0: 5454 5020 7072 6f78 792e 3c2f 6469 763e TTP proxy.
    \n+0017b7c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+0017b7e0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0017b7f0: 3a33 3931 363c 2f64 6976 3e3c 2f64 6976 :3916
    .

    To a\n+0017b820: 766f 6964 2074 6865 206f 7665 7268 6561 void the overhea\n+0017b830: 6420 6f66 2074 6865 2066 6972 7374 2072 d of the first r\n+0017b840: 656a 6563 7465 6420 6361 6c6c 2c20 7573 ejected call, us\n+0017b850: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n+0017b880: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0017b890: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+0017b900: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+0017b960: 6e65 7731 3c2f 613e 283c 6120 636c 6173 new1(SOAP\n+0017b9c0: 5f49 4f5f 4b45 4550 414c 4956 453c 2f61 _IO_KEEPALIVE);
    .
    soap->\n+0017ba20: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_\n+0017ba70: 686f 7374 3c2f 613e 203d 203c 7370 616e host = "...\n+0017baa0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+0017bab0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+0017baf0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->proxy_port<\n+0017bb50: 2f61 3e20 3d20 2e2e 2e3b 203c 2f64 6976 /a> = ...; .
    soap<\n+0017bba0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->proxy_userid = \n+0017bc20: 2671 756f 743b 5a61 7068 6f64 2671 756f "Zaphod&quo\n+0017bc30: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    soap<\n+0017bc80: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->proxy_passwd = \n+0017bd00: 2671 756f 743b 4265 6562 6c65 6272 6f78 "Beeblebrox\n+0017bd10: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+0017bd20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    \n+0017be40: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->ntlm_chall\n+0017bea0: 656e 6765 3c2f 613e 203d 203c 7370 616e enge = "&qu\n+0017bed0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    i\n+0017bf10: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n+0017bf20: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n+0017bf30: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap, ...))
    .\n+0017bf70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n+0017bfa0: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    \n+0017bfe0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... \n+0017c020: 2f2f 2073 7563 6365 7373 3c2f 7370 616e // success
    .
    <\n+0017c050: 703e f09f 949d 203c 6120 6872 6566 3d22 p>....
    Back to table\n+0017c070: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+0017c080: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .HTTP pr\n+0017c0c0: 6f78 7920 6261 7369 6320 6175 7468 656e oxy basic authen\n+0017c0d0: 7469 6361 7469 6f6e 3c2f 6833 3e0a 3c70 tication

    .HTTP proxy auth\n+0017c0f0: 656e 7469 6361 7469 6f6e 2028 6261 7369 entication (basi\n+0017c100: 6329 2069 7320 656e 6162 6c65 6420 6174 c) is enabled at\n+0017c110: 2074 6865 2063 6c69 656e 742d 7369 6465 the client-side\n+0017c120: 2062 7920 7365 7474 696e 6720 7468 6520 by setting the \n+0017c130: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::proxy\n+0017c1f0: 5f75 7365 7269 643c 2f61 3e3c 2f63 6f64 _userid and soa\n+0017c2c0: 703a 3a70 726f 7879 5f70 6173 7377 643c p::proxy_passwd<\n+0017c2d0: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n+0017c2e0: 6773 2074 6f20 6120 7573 6572 6e61 6d65 gs to a username\n+0017c2f0: 2061 6e64 2070 6173 7377 6f72 642c 2072 and password, r\n+0017c300: 6573 7065 6374 6976 656c 792e 2046 6f72 espectively. For\n+0017c310: 2065 7861 6d70 6c65 2c20 6120 7072 6f78 example, a prox\n+0017c320: 7920 7365 7276 6572 206d 6179 2072 6571 y server may req\n+0017c330: 7565 7374 2075 7365 7220 6175 7468 656e uest user authen\n+0017c340: 7469 6361 7469 6f6e 2e20 4f74 6865 7277 tication. Otherw\n+0017c350: 6973 652c 2061 6363 6573 7320 6973 2064 ise, access is d\n+0017c360: 656e 6965 6420 6279 2074 6865 2070 726f enied by the pro\n+0017c370: 7879 2028 4854 5450 2034 3037 2065 7272 xy (HTTP 407 err\n+0017c380: 6f72 292e 2045 7861 6d70 6c65 2063 6c69 or). Example cli\n+0017c390: 656e 7420 636f 6465 2066 7261 676d 656e ent code fragmen\n+0017c3a0: 7420 746f 2073 6574 2070 726f 7879 2073 t to set proxy s\n+0017c3b0: 6572 7665 722c 2075 7365 726e 616d 652c erver, username,\n+0017c3c0: 2061 6e64 2070 6173 7377 6f72 643a 3c2f and password:.
    .\n+0017c500: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017c530: 2667 743b 3c61 2063 6c61 7373 3d22 636f >pro\n+0017c580: 7879 5f68 6f73 743c 2f61 3e20 3d20 3c73 xy_host = "\n+0017c5b0: 7878 2e78 782e 7878 2e78 7826 7175 6f74 xx.xx.xx.xx"\n+0017c5c0: 3b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 ;; \n+0017c5e0: 2f2f 2049 5020 6f72 2064 6f6d 6169 6e20 // IP or domain \n+0017c5f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0017c610: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017c640: 2667 743b 3c61 2063 6c61 7373 3d22 636f >pro\n+0017c690: 7879 5f70 6f72 743c 2f61 3e20 3d20 3830 xy_port = 80\n+0017c6a0: 3830 3b20 3c2f 6469 763e 0a3c 6469 7620 80;
    .
    soap->\n+0017c6f0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_\n+0017c740: 7573 6572 6964 3c2f 613e 203d 203c 7370 userid = "g\n+0017c770: 7565 7374 2671 756f 743b 3c2f 7370 616e uest";
    .
    soap->\n+0017c7d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 proxy_p\n+0017c820: 6173 7377 643c 2f61 3e20 3d20 3c73 7061 asswd = "gu\n+0017c850: 6573 7426 7175 6f74 3b3c 2f73 7061 6e3e est"\n+0017c860: 3b20 3c2f 6469 763e 0a3c 2f64 6976 3e3c ;
    .
    <\n+0017c870: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0017c880: 3c70 3e41 2063 6c69 656e 7420 534f 4150

    A client SOAP\n+0017c890: 2072 6571 7565 7374 2077 696c 6c20 6861 request will ha\n+0017c8a0: 7665 2074 6865 2066 6f6c 6c6f 7769 6e67 ve the following\n+0017c8b0: 2048 5454 5020 6865 6164 6572 3a20 3c2f HTTP header:

    POST /XX\n+0017c8e0: 5820 4854 5450 2f31 2e31 200a 486f 7374  X HTTP/1.1 .Host\n+0017c8f0: 3a20 5959 5920 0a55 7365 722d 4167 656e  : YYY .User-Agen\n+0017c900: 743a 2067 534f 4150 2f32 2e38 200a 436f  t: gSOAP/2.8 .Co\n+0017c910: 6e74 656e 742d 5479 7065 3a20 7465 7874  ntent-Type: text\n+0017c920: 2f78 6d6c 3b20 6368 6172 7365 743d 7574  /xml; charset=ut\n+0017c930: 662d 3820 0a43 6f6e 7465 6e74 2d4c 656e  f-8 .Content-Len\n+0017c940: 6774 683a 205a 5a5a 200a 5072 6f78 792d  gth: ZZZ .Proxy-\n+0017c950: 4175 7468 6f72 697a 6174 696f 6e3a 2042  Authorization: B\n+0017c960: 6173 6963 205a 3356 6c63 3351 365a 3356  asic Z3Vlc3Q6Z3V\n+0017c970: 6c63 3351 3d20 0a3c 2f70 7265 3e3c 703e  lc3Q= .

    \n+0017c980: 2057 6865 6e20 582d 466f 7277 6172 6465 When X-Forwarde\n+0017c990: 642d 466f 7220 6865 6164 6572 7320 6172 d-For headers ar\n+0017c9a0: 6520 7265 7475 726e 6564 2062 7920 7468 e returned by th\n+0017c9b0: 6520 7072 6f78 792c 2074 6865 2068 6561 e proxy, the hea\n+0017c9c0: 6465 7220 6361 6e20 6265 2061 6363 6573 der can be acces\n+0017c9d0: 7365 6420 696e 2074 6865 203c 636f 6465 sed in the soap::pr\n+0017ca70: 6f78 795f 6672 6f6d 3c2f 613e 3c2f 636f oxy_from string.

    .\n+0017ca90: 3c70 3e54 6865 2043 4f4e 4e45 4354 206d

    The CONNECT m\n+0017caa0: 6574 686f 6420 6973 2075 7365 6420 666f ethod is used fo\n+0017cab0: 7220 4854 5450 2070 726f 7879 2061 7574 r HTTP proxy aut\n+0017cac0: 6865 6e74 6963 6174 696f 6e3a 203c 2f70 hentication:

    CONNECT s\n+0017caf0: 6572 7665 722e 6578 616d 706c 652e 636f  erver.example.co\n+0017cb00: 6d3a 3830 2048 5454 502f 312e 310a 3c2f  m:80 HTTP/1.1.

    In some \n+0017cb20: 6361 7365 732c 2079 6f75 2077 696c 6c20 cases, you will \n+0017cb30: 6e6f 7469 6365 2074 6861 7420 7468 6520 notice that the \n+0017cb40: 486f 7374 2048 5454 5020 6865 6164 6572 Host HTTP header\n+0017cb50: 2075 7365 7320 7468 6520 434f 4e4e 4543 uses the CONNEC\n+0017cb60: 5420 7072 6f74 6f63 6f6c 3a20 3c2f 703e T protocol:

    \n+0017cb70: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    CONNECT se\n+0017cb90: 7276 6572 2e65 7861 6d70 6c65 2e63 6f6d  rver.example.com\n+0017cba0: 3a38 3020 4854 5450 2f31 2e31 200a 486f  :80 HTTP/1.1 .Ho\n+0017cbb0: 7374 3a20 7365 7276 6572 2e65 7861 6d70  st: server.examp\n+0017cbc0: 6c65 2e63 6f6d 3a38 300a 3c2f 7072 653e  le.com:80.
    \n+0017cbd0: 3c70 3e20 f09f 949d 203c 6120 6872 6566

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

    .

    .Perf\n+0017cc30: 6f72 6d61 6e63 6520 696d 7072 6f76 656d ormance improvem\n+0017cc40: 656e 7420 7469 7073 3c2f 6832 3e0a 3c70 ent tips

    .Here are some t\n+0017cc60: 6970 7320 796f 7520 6361 6e20 7573 6520 ips you can use \n+0017cc70: 746f 2073 7065 6564 2075 7020 6753 4f41 to speed up gSOA\n+0017cc80: 502e 2054 6865 2064 6566 6175 6c74 2073 P. The default s\n+0017cc90: 6574 7469 6e67 7320 6172 6520 6368 6f73 ettings are chos\n+0017cca0: 656e 2074 6f20 6d61 7869 6d69 7a65 2070 en to maximize p\n+0017ccb0: 6f72 7461 6269 6c69 7479 2061 6e64 2063 ortability and c\n+0017ccc0: 6f6d 7061 7469 6269 6c69 7479 2e20 5468 ompatibility. Th\n+0017ccd0: 6520 7365 7474 696e 6773 2063 616e 2062 e settings can b\n+0017cce0: 6520 7477 6561 6b65 6420 746f 206f 7074 e tweaked to opt\n+0017ccf0: 696d 697a 6520 7468 6520 7065 7266 6f72 imize the perfor\n+0017cd00: 6d61 6e63 6520 6173 2066 6f6c 6c6f 7773 mance as follows\n+0017cd10: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e49 :

    ..

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

    .Safety\n+0017d390: 2067 7561 7264 733c 2f68 323e 0a3c 703e guards

    .

    \n+0017d3a0: 5468 6520 666f 6c6c 6f77 696e 6720 7365 The following se\n+0017d3b0: 7474 696e 6773 2061 7265 2069 6d70 6f72 ttings are impor\n+0017d3c0: 7461 6e74 2074 6f20 656e 7375 7265 2074 tant to ensure t\n+0017d3d0: 6861 7420 584d 4c20 6d65 7373 6167 696e hat XML messagin\n+0017d3e0: 6720 6973 2073 6166 6520 6279 2064 6566 g is safe by def\n+0017d3f0: 696e 696e 6720 7265 6173 6f6e 6162 6c65 ining reasonable\n+0017d400: 2058 4d4c 206d 6573 7361 6765 2072 6573 XML message res\n+0017d410: 7472 6963 7469 6f6e 732e 2041 6c73 6f20 trictions. Also \n+0017d420: 6d65 7373 6167 696e 6720 7469 6d65 6f75 messaging timeou\n+0017d430: 7473 2073 686f 756c 6420 6265 2073 6574 ts should be set\n+0017d440: 2061 7320 6578 706c 6169 6e65 6420 696e as explained in\n+0017d450: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Timeout managem\n+0017d490: 656e 7420 666f 7220 6e6f 6e2d 626c 6f63 ent for non-bloc\n+0017d4a0: 6b69 6e67 206f 7065 7261 7469 6f6e 733c king operations<\n+0017d4b0: 2f61 3e2e 3c2f 703e 0a3c 703e 5468 6520 /a>.

    .

    The \n+0017d4c0: 584d 4c20 7061 7273 6572 2069 7320 636f XML parser is co\n+0017d4d0: 6e66 6967 7572 6564 2074 6f20 7265 7374 nfigured to rest\n+0017d4e0: 7269 6374 2074 6865 2058 4d4c 206e 6573 rict the XML nes\n+0017d4f0: 7469 6e67 2064 6570 7468 206c 6576 656c ting depth level\n+0017d500: 2074 6f20 3c63 6f64 653e 2353 4f41 505f to #SOAP_\n+0017d510: 4d41 584c 4556 454c 3c2f 636f 6465 3e20 MAXLEVEL \n+0017d520: 616e 6420 7265 7374 7269 6374 7320 7468 and restricts th\n+0017d530: 6520 7265 7065 6174 6564 206f 6363 7572 e repeated occur\n+0017d540: 7265 6e63 6520 6f66 2065 6c65 6d65 6e74 rence of element\n+0017d550: 7320 7468 6174 2061 7265 2064 6573 6572 s that are deser\n+0017d560: 6961 6c69 7a65 6420 696e 746f 2061 7272 ialized into arr\n+0017d570: 6179 7320 616e 6420 636f 6e74 6169 6e65 ays and containe\n+0017d580: 7273 2062 7920 3c63 6f64 653e 2353 4f41 rs by #SOA\n+0017d590: 505f 4d41 584f 4343 5552 533c 2f63 6f64 P_MAXOCCURS. These macros\n+0017d5b0: 2063 616e 2062 6520 6368 616e 6765 642c can be changed,\n+0017d5c0: 2062 7574 2079 6f75 2063 616e 2061 6c73 but you can als\n+0017d5d0: 6f20 6368 616e 6765 2074 6865 2066 6f6c o change the fol\n+0017d5e0: 6c6f 7769 6e67 2063 6f6e 7465 7874 2061 lowing context a\n+0017d5f0: 7474 7269 6275 7465 7320 6174 2072 756e ttributes at run\n+0017d600: 2d74 696d 652c 2065 2e67 2e20 746f 2065 -time, e.g. to e\n+0017d610: 6e68 616e 6365 2074 6865 2073 6166 6574 nhance the safet\n+0017d620: 7920 666f 7220 7370 6563 6966 6963 2073 y for specific s\n+0017d630: 6572 7669 6365 2061 6e64 2f6f 7220 636c ervice and/or cl\n+0017d640: 6965 6e74 206f 7065 7261 7469 6f6e 733a ient operations:\n+0017d650: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 3c63

    .
      .
    • soap\n+0017d720: 3a3a 6d61 786c 6576 656c 3c2f 613e 3c2f ::maxlevel restricts \n+0017d740: 7468 6520 584d 4c20 6e65 7374 696e 6720 the XML nesting \n+0017d750: 6465 7074 6820 6c65 7665 6c2c 2077 6865 depth level, whe\n+0017d760: 7265 2074 6865 2064 6566 6175 6c74 2076 re the default v\n+0017d770: 616c 7565 2069 7320 3c63 6f64 653e 2353 alue is #S\n+0017d780: 4f41 505f 4d41 584c 4556 454c 3c2f 636f OAP_MAXLEVEL = 10000..
    • soap::maxocc\n+0017d870: 7572 733c 2f61 3e3c 2f63 6f64 653e 2072 urs r\n+0017d880: 6573 7472 6963 7473 2074 6865 206e 756d estricts the num\n+0017d890: 6265 7220 6f66 2072 6570 6561 7465 6420 ber of repeated \n+0017d8a0: 6f63 6375 7272 656e 6365 7320 6f66 2065 occurrences of e\n+0017d8b0: 6c65 6d65 6e74 7320 7468 6174 2061 7265 lements that are\n+0017d8c0: 2064 6573 6572 6961 6c69 7a65 6420 696e deserialized in\n+0017d8d0: 746f 2061 7272 6179 7320 616e 6420 7374 to arrays and st\n+0017d8e0: 7275 6374 732c 2077 6865 7265 2074 6865 ructs, where the\n+0017d8f0: 2064 6566 6175 6c74 2076 616c 7565 2069 default value i\n+0017d900: 7320 3c63 6f64 653e 2353 4f41 505f 4d41 s #SOAP_MA\n+0017d910: 584f 4343 5552 533c 2f63 6f64 653e 203d XOCCURS =\n+0017d920: 2031 3030 3030 302e 3c2f 6c69 3e0a 3c6c 100000.
    • .soap:\n+0017d9f0: 3a6d 6178 6c65 6e67 7468 3c2f 613e 3c2f :maxlength restricts \n+0017da10: 7468 6520 6c65 6e67 7468 206f 6620 7374 the length of st\n+0017da20: 7269 6e67 7320 6465 7365 7269 616c 697a rings deserializ\n+0017da30: 6564 2066 726f 6d20 584d 4c2e 2041 207a ed from XML. A z\n+0017da40: 6572 6f20 6f72 206e 6567 6174 6976 6520 ero or negative \n+0017da50: 7661 6c75 6520 6973 2075 6e72 6573 7472 value is unrestr\n+0017da60: 6963 7465 6420 6c65 6e67 7468 2e20 5768 icted length. Wh\n+0017da70: 656e 2072 6573 7472 6963 7465 642c 2074 en restricted, t\n+0017da80: 6865 2058 4d4c 2073 6368 656d 6120 7661 he XML schema va\n+0017da90: 6c69 6461 7469 6f6e 206d 6178 4c65 6e67 lidation maxLeng\n+0017daa0: 7468 2074 616b 6573 2070 7265 6365 6465 th takes precede\n+0017dab0: 6e63 6520 6f76 6572 2074 6869 7320 6c65 nce over this le\n+0017dac0: 6e67 7468 2072 6573 7472 6963 7469 6f6e ngth restriction\n+0017dad0: 2e20 536f 2073 6574 7469 6e67 2061 2073 . So setting a s\n+0017dae0: 6d61 6c6c 6572 2076 616c 7565 2077 696c maller value wil\n+0017daf0: 6c20 6e6f 7420 696e 7465 7266 6572 6520 l not interfere \n+0017db00: 7769 7468 2074 6865 2058 4d4c 2076 616c with the XML val\n+0017db10: 6964 6174 696f 6e20 7275 6c65 732e 2054 idation rules. T\n+0017db20: 6865 2064 6566 6175 6c74 2076 616c 7565 he default value\n+0017db30: 2069 7320 3c63 6f64 653e 2353 4f41 505f is #SOAP_\n+0017db40: 4d41 584c 454e 4754 483c 2f63 6f64 653e MAXLENGTH\n+0017db50: 203d 2030 2e20 4e6f 7465 2074 6861 7420 = 0. Note that \n+0017db60: 7374 7269 6e67 206c 656e 6774 6820 6973 string length is\n+0017db70: 2065 7870 7265 7373 6564 2069 6e20 6e75 expressed in nu\n+0017db80: 6d62 6572 206f 6620 6368 6172 6163 7465 mber of characte\n+0017db90: 7273 2c20 6e6f 7420 6279 7465 732e 2053 rs, not bytes. S\n+0017dba0: 6f20 5554 462d 3820 656e 636f 6469 6e67 o UTF-8 encoding\n+0017dbb0: 7320 6172 6520 6e6f 7420 7472 756e 6361 s are not trunca\n+0017dbc0: 7465 642e 3c2f 6c69 3e0a 3c6c 693e 3c63 ted..
    • soap\n+0017dc90: 3a3a 7265 6376 5f6d 6178 6c65 6e67 7468 ::recv_maxlength\n+0017dca0: 3c2f 613e 3c2f 636f 6465 3e20 7468 6520 the \n+0017dcb0: 6d61 7869 6d75 6d20 6c65 6e67 7468 206f maximum length o\n+0017dcc0: 6620 6d65 7373 6167 6573 2072 6563 6569 f messages recei\n+0017dcd0: 7665 642c 2032 4742 2062 7920 6465 6661 ved, 2GB by defa\n+0017dce0: 756c 742e 3c2f 6c69 3e0a 3c2f 756c 3e0a ult.
    • .
    .\n+0017dcf0: 3c70 3e58 4d4c 2073 6368 656d 6120 7661

    XML schema va\n+0017dd00: 6c69 6461 7469 6f6e 2063 6f6e 7374 7261 lidation constra\n+0017dd10: 696e 7473 2061 7265 2065 6e66 6f72 6365 ints are enforce\n+0017dd20: 6420 7769 7468 2074 6865 203c 636f 6465 d with the #SOAP_XML_STRIC\n+0017dd40: 543c 2f63 6f64 653e 2063 6f6e 7465 7874 T context\n+0017dd50: 2066 6c61 672e 2054 6865 2073 6368 656d flag. The schem\n+0017dd60: 6120 6d61 784c 656e 6774 6820 7661 6c69 a maxLength vali\n+0017dd70: 6461 7469 6f6e 2063 6f6e 7374 7261 696e dation constrain\n+0017dd80: 7420 6f76 6572 7275 6c65 7320 7468 6520 t overrules the \n+0017dd90: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::m\n+0017de50: 6178 6c65 6e67 7468 3c2f 613e 3c2f 636f axlength guard. The s\n+0017de70: 6368 656d 6120 6d61 784f 6363 7572 7320 chema maxOccurs \n+0017de80: 7661 6c69 6461 7469 6f6e 2063 6f6e 7374 validation const\n+0017de90: 7261 696e 7420 646f 6573 206e 6f74 206f raint does not o\n+0017dea0: 7665 7272 756c 6520 7468 6520 3c63 6f64 verrule the soap::\n+0017df70: 6d61 786f 6363 7572 733c 2f61 3e3c 2f63 maxoccurs guard, so a\n+0017df90: 7272 6179 7320 616e 6420 636f 6e74 6169 rrays and contai\n+0017dfa0: 6e65 7273 2061 7265 2061 6c77 6179 7320 ners are always \n+0017dfb0: 7265 7374 7269 6374 6564 2069 6e20 6c65 restricted in le\n+0017dfc0: 6e67 7468 2062 7920 7468 6973 2067 7561 ngth by this gua\n+0017dfd0: 7264 2e3c 2f70 3e0a 3c70 3e4f 7468 6572 rd.

    .

    Other\n+0017dfe0: 2063 6f6d 7069 6c65 2d74 696d 6520 636f compile-time co\n+0017dff0: 6e66 6967 7572 6174 696f 6e20 7365 7474 nfiguration sett\n+0017e000: 696e 6773 2061 7265 3a3c 2f70 3e0a 3c75 ings are:

    ..
  • #SO\n+0017e020: 4150 5f4d 4158 414c 4c4f 4353 495a 453c AP_MAXALLOCSIZE<\n+0017e030: 2f63 6f64 653e 2074 6865 206d 6178 696d /code> the maxim\n+0017e040: 756d 2073 697a 6520 6f66 2061 2062 6c6f um size of a blo\n+0017e050: 636b 206f 6620 6d65 6d6f 7279 2074 6861 ck of memory tha\n+0017e060: 7420 3c63 6f64 653e 6d61 6c6c 6f63 3c2f t malloc can alloca\n+0017e080: 7465 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f te.
  • .
  • #SOAP_MAXARRA\n+0017e0a0: 5953 495a 453c 2f63 6f64 653e 2074 6865 YSIZE the\n+0017e0b0: 206d 6178 696d 756d 2061 6c6c 6f63 6174 maximum allocat\n+0017e0c0: 696f 6e20 7468 7265 7368 6f6c 6420 746f ion threshold to\n+0017e0d0: 2070 7265 2d61 6c6c 6f63 6174 6520 534f pre-allocate SO\n+0017e0e0: 4150 2061 7272 6179 7320 696e 206d 656d AP arrays in mem\n+0017e0f0: 6f72 792e 3c2f 6c69 3e0a 3c6c 693e 3c63 ory.
  • .
  • #SOAP_MAXDIM\n+0017e110: 4553 495a 453c 2f63 6f64 653e 2074 6865 ESIZE the\n+0017e120: 206d 6178 696d 756d 2044 494d 4520 6174 maximum DIME at\n+0017e130: 7461 6368 6d65 6e74 2073 697a 6520 616c tachment size al\n+0017e140: 6c6f 7765 6420 746f 2072 6563 6569 7665 lowed to receive\n+0017e150: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
  • .
  • #SOAP_MAXEINTR<\n+0017e170: 2f63 6f64 653e 206d 6178 696d 756d 206e /code> maximum n\n+0017e180: 756d 6265 7220 6f66 2045 494e 5452 2069 umber of EINTR i\n+0017e190: 6e74 6572 7275 7074 7320 746f 2069 676e nterrupts to ign\n+0017e1a0: 6f72 6520 7768 696c 6520 706f 6c6c 696e ore while pollin\n+0017e1b0: 6720 6120 736f 636b 6574 2066 6f72 2070 g a socket for p\n+0017e1c0: 656e 6469 6e67 2061 6374 6976 6974 792e ending activity.\n+0017e1d0: 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 3ef0
  • ..

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

    .Timeou\n+0017e240: 7420 6d61 6e61 6765 6d65 6e74 2066 6f72 t management for\n+0017e250: 206e 6f6e 2d62 6c6f 636b 696e 6720 6f70 non-blocking op\n+0017e260: 6572 6174 696f 6e73 3c2f 6832 3e0a 3c70 erations

    .Socket connect,\n+0017e280: 2061 6363 6570 742c 2073 656e 642c 2061 accept, send, a\n+0017e290: 6e64 2072 6563 6569 7665 2074 696d 656f nd receive timeo\n+0017e2a0: 7574 2076 616c 7565 7320 6361 6e20 6265 ut values can be\n+0017e2b0: 2073 6574 2074 6f20 6d61 6e61 6765 2073 set to manage s\n+0017e2c0: 6f63 6b65 7420 636f 6d6d 756e 6963 6174 ocket communicat\n+0017e2d0: 696f 6e20 7469 6d65 6f75 7473 2e20 5468 ion timeouts. Th\n+0017e2e0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n+0017e3a0: 736f 6170 3a3a 636f 6e6e 6563 745f 7469 soap::connect_ti\n+0017e3b0: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout\n+0017e3c0: 2c20 3c63 6f64 653e 3c61 2063 6c61 7373 , \n+0017e480: 736f 6170 3a3a 6163 6365 7074 5f74 696d soap::accept_tim\n+0017e490: 656f 7574 3c2f 613e 3c2f 636f 6465 3e2c eout,\n+0017e4a0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+0017e550: 6f61 703a 3a73 656e 645f 7469 6d65 6f75 oap::send_timeou\n+0017e560: 743c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 t, s\n+0017e620: 6f61 703a 3a72 6563 765f 7469 6d65 6f75 oap::recv_timeou\n+0017e630: 743c 2f61 3e3c 2f63 6f64 653e 2061 6e64 t
    and\n+0017e640: 203c 636f 6465 3e3c 6120 636c 6173 733d soap:\n+0017e700: 3a74 7261 6e73 6665 725f 7469 6d65 6f75 :transfer_timeou\n+0017e710: 743c 2f61 3e3c 2f63 6f64 653e 2063 6f6e t con\n+0017e720: 7465 7874 2061 7474 7269 6275 7465 7320 text attributes \n+0017e730: 6f66 2074 6865 2063 7572 7265 6e74 2063 of the current c\n+0017e740: 6f6e 7465 7874 203c 636f 6465 3e3c 6120 ontext soap can be \n+0017e7b0: 7365 7420 746f 2074 6865 2061 7070 726f set to the appro\n+0017e7c0: 7072 6961 7465 2075 7365 722d 6465 6669 priate user-defi\n+0017e7d0: 6e65 6420 736f 636b 6574 2073 656e 642c ned socket send,\n+0017e7e0: 2072 6563 6569 7665 2c20 616e 6420 6163 receive, and ac\n+0017e7f0: 6365 7074 2074 696d 656f 7574 2076 616c cept timeout val\n+0017e800: 7565 732e 2041 2070 6f73 6974 6976 6520 ues. A positive \n+0017e810: 7661 6c75 6520 6d65 6173 7572 6573 2074 value measures t\n+0017e820: 6865 2074 696d 656f 7574 2069 6e20 7365 he timeout in se\n+0017e830: 636f 6e64 732e 2041 206e 6567 6174 6976 conds. A negativ\n+0017e840: 6520 7469 6d65 6f75 7420 7661 6c75 6520 e timeout value \n+0017e850: 6d65 6173 7572 6573 2074 6865 2074 696d measures the tim\n+0017e860: 656f 7574 2069 6e20 6d69 6372 6f73 6563 eout in microsec\n+0017e870: 6f6e 6473 2028 3130 5e2d 3620 7365 6329 onds (10^-6 sec)\n+0017e880: 2e3c 2f70 3e0a 3c70 3e54 6865 203c 636f .

    .

    The soap:\n+0017e950: 3a63 6f6e 6e65 6374 5f74 696d 656f 7574 :connect_timeout\n+0017e960: 3c2f 613e 3c2f 636f 6465 3e20 7370 6563 spec\n+0017e970: 6966 6965 7320 7468 6520 7469 6d65 6f75 ifies the timeou\n+0017e980: 7420 666f 7220 3c63 6f64 653e 736f 6170 t for soap\n+0017e990: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n+0017e9a0: 686f 643c 2f63 6f64 653e 2073 7475 6220 hod stub \n+0017e9b0: 6675 6e63 7469 6f6e 2063 616c 6c73 2061 function calls a\n+0017e9c0: 6e64 2066 6f72 2043 2b2b 2070 726f 7879 nd for C++ proxy\n+0017e9d0: 2063 6c61 7373 2063 616c 6c73 2e3c 2f70 class calls..

    The <\n+0017e9f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017ea00: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017ea10: 6d6c 2361 3738 3139 3961 3831 6335 3034 ml#a78199a81c504\n+0017ea20: 3833 3330 3437 3232 3461 3063 6566 6636 833047224a0ceff6\n+0017ea30: 6639 3036 2220 7469 746c 653d 2255 7365 f906\" title=\"Use\n+0017ea40: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time\n+0017ea50: 6f75 7420 7768 656e 2077 6169 7469 6e67 out when waiting\n+0017ea60: 2074 6f20 6163 6365 7074 2061 2072 6571 to accept a req\n+0017ea70: 7565 7374 2066 726f 6d20 6120 636c 6965 uest from a clie\n+0017ea80: 6e74 2061 7420 7468 6520 7365 7276 6572 nt at the server\n+0017ea90: 2d73 6964 6520 7769 7468 2073 6f61 705f -side with soap_\n+0017eaa0: 6163 2e2e 2e22 3e73 6f61 703a 3a61 6363 ac...\">soap::acc\n+0017eab0: 6570 745f 7469 6d65 6f75 743c 2f61 3e3c ept_timeout<\n+0017eac0: 2f63 6f64 653e 2073 7065 6369 6669 6573 /code> specifies\n+0017ead0: 2074 6865 2074 696d 656f 7574 2066 6f72 the timeout for\n+0017eae0: 203c 636f 6465 3e3c 6120 636c 6173 733d \n+0017eb60: 736f 6170 5f61 6363 6570 743c 2f61 3e3c soap_accept<\n+0017eb70: 2f63 6f64 653e 2063 616c 6c73 2e3c 2f70 /code> calls..

    The <\n+0017eb90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017eba0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017ebb0: 6d6c 2361 3731 3162 6233 6135 3364 6537 ml#a711bb3a53de7\n+0017ebc0: 6363 3632 3432 3965 3464 3361 3265 3062 cc62429e4d3a2e0b\n+0017ebd0: 3534 3734 2220 7469 746c 653d 2255 7365 5474\" title=\"Use\n+0017ebe0: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time\n+0017ebf0: 6f75 7420 746f 2073 656e 6420 6120 7061 out to send a pa\n+0017ec00: 636b 6574 206f 6620 6461 7461 2c20 706f cket of data, po\n+0017ec10: 7369 7469 7665 2074 696d 656f 7574 2076 sitive timeout v\n+0017ec20: 616c 7565 7320 6172 6520 7365 636f 6e64 alues are second\n+0017ec30: 732c 2e2e 2e22 3e73 6f61 703a 3a73 656e s,...\">soap::sen\n+0017ec40: 645f 7469 6d65 6f75 743c 2f61 3e3c 2f63 d_timeout and <\n+0017ec60: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017ec70: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017ec80: 6d6c 2361 6335 6435 6662 3932 6666 6664 ml#ac5d5fb92fffd\n+0017ec90: 6137 3234 6363 6233 6230 3338 6432 6262 a724ccb3b038d2bb\n+0017eca0: 3233 3838 2220 7469 746c 653d 2255 7365 2388\" title=\"Use\n+0017ecb0: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time\n+0017ecc0: 6f75 7420 746f 2072 6563 6569 7665 2061 out to receive a\n+0017ecd0: 2070 6163 6b65 7420 6f66 2064 6174 612c packet of data,\n+0017ece0: 2070 6f73 6974 6976 6520 7469 6d65 6f75 positive timeou\n+0017ecf0: 7420 7661 6c75 6573 2061 7265 2073 6563 t values are sec\n+0017ed00: 6f6e 6473 2c2e 2e2e 223e 736f 6170 3a3a onds,...\">soap::\n+0017ed10: 7265 6376 5f74 696d 656f 7574 3c2f 613e recv_timeout\n+0017ed20: 3c2f 636f 6465 3e20 7370 6563 6966 7920 specify \n+0017ed30: 7468 6520 7469 6d65 6f75 7420 666f 7220 the timeout for \n+0017ed40: 6e6f 6e2d 626c 6f63 6b69 6e67 2073 6f63 non-blocking soc\n+0017ed50: 6b65 7420 492f 4f20 6f70 6572 6174 696f ket I/O operatio\n+0017ed60: 6e73 2e20 5468 6973 2069 7320 7468 6520 ns. This is the \n+0017ed70: 6d61 7869 6d75 6d20 6465 6c61 7920 6f6e maximum delay on\n+0017ed80: 2074 6865 2073 6f63 6b65 7420 6f70 6572 the socket oper\n+0017ed90: 6174 696f 6e20 7065 726d 6974 7465 642e ation permitted.\n+0017eda0: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The soap::tran\n+0017ee70: 7366 6572 5f74 696d 656f 7574 3c2f 613e sfer_timeout\n+0017ee80: 3c2f 636f 6465 3e20 6973 206e 6577 2073 is new s\n+0017ee90: 696e 6365 2032 2e38 2e34 3820 616e 6420 ince 2.8.48 and \n+0017eea0: 6c69 6d69 7473 2074 6865 2074 696d 6520 limits the time \n+0017eeb0: 6120 6d65 7373 6167 6520 7365 6e64 2061 a message send a\n+0017eec0: 6e64 2061 206d 6573 7361 6765 2072 6563 nd a message rec\n+0017eed0: 6569 7665 206f 7065 7261 7469 6f6e 2063 eive operation c\n+0017eee0: 616e 2074 616b 652e 2054 6869 7320 7661 an take. This va\n+0017eef0: 6c75 6520 7368 6f75 6c64 2062 6520 7573 lue should be us\n+0017ef00: 6564 2069 6e20 636f 6d62 696e 6174 696f ed in combinatio\n+0017ef10: 6e20 7769 7468 203c 636f 6465 3e3c 6120 n with soap::send_\n+0017efd0: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout and soap::re\n+0017f0a0: 6376 5f74 696d 656f 7574 3c2f 613e 3c2f cv_timeout for accura\n+0017f0c0: 7465 2074 696d 656f 7574 2063 6f6e 7472 te timeout contr\n+0017f0d0: 6f6c 2e20 5468 6520 3c63 6f64 653e 3c61 ol. The soap::recv\n+0017f1a0: 5f6d 6178 6c65 6e67 7468 3c2f 613e 3c2f _maxlength value when\n+0017f1c0: 206e 6f6e 2d7a 6572 6f20 6c69 6d69 7473 non-zero limits\n+0017f1d0: 2074 6865 206c 656e 6774 6820 6f66 206d the length of m\n+0017f1e0: 6573 7361 6765 7320 7468 6174 2063 616e essages that can\n+0017f1f0: 2062 6520 7265 6365 6976 6564 2069 6e20 be received in \n+0017f200: 6279 7465 7320 696e 2074 6f74 616c 2069 bytes in total i\n+0017f210: 6e20 6465 636f 6d70 7265 7373 6564 2066 n decompressed f\n+0017f220: 6f72 6d20 286d 6573 7361 6765 206c 656e orm (message len\n+0017f230: 6774 6820 696e 636c 7564 6573 2048 5454 gth includes HTT\n+0017f240: 5020 6865 6164 6572 7320 616e 6420 4854 P headers and HT\n+0017f250: 5450 2063 6875 6e6b 2073 697a 6520 6669 TP chunk size fi\n+0017f260: 656c 6473 292e 2054 6865 2076 616c 7565 elds). The value\n+0017f270: 206f 6620 3c63 6f64 653e 3c61 2063 6c61 of soap::recv_max\n+0017f340: 6c65 6e67 7468 3c2f 613e 3c2f 636f 6465 length is 2GB by defa\n+0017f360: 756c 742e 3c2f 703e 0a3c 703e 4578 616d ult.

    .

    Exam\n+0017f370: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    <\n+0017f390: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017f3a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+0017f3f0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+0017f420: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+0017f480: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); .\n+0017f540: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n+0017f5d0: 7265 6376 5f74 696d 656f 7574 3c2f 613e recv_timeout\n+0017f5e0: 203d 2031 303b 203c 2f64 6976 3e0a 3c64 = 10;
    .\n+0017f600: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017f630: 2667 743b 3c61 2063 6c61 7373 3d22 636f >rec\n+0017f680: 765f 7469 6d65 6f75 743c 2f61 3e20 3d20 v_timeout = \n+0017f690: 3630 3b20 3c2f 6469 763e 0a3c 2f64 6976 60;
    .

    Whe\n+0017fad0: 6e20 6120 7469 6d65 6f75 7420 6f63 6375 n a timeout occu\n+0017fae0: 7273 2069 6e20 7468 6520 7365 6e64 206f rs in the send o\n+0017faf0: 7220 7265 6365 6976 6520 6f70 6572 6174 r receive operat\n+0017fb00: 696f 6e73 2c20 6120 3c63 6f64 653e 2353 ions, a #S\n+0017fb10: 4f41 505f 454f 463c 2f63 6f64 653e 2065 OAP_EOF e\n+0017fb20: 7863 6570 7469 6f6e 2077 696c 6c20 6265 xception will be\n+0017fb30: 2072 6169 7365 6420 2822 656e 6420 6f66 raised (\"end of\n+0017fb40: 2066 696c 6520 6f72 206e 6f20 696e 7075 file or no inpu\n+0017fb50: 7422 292e 204e 6567 6174 6976 6520 7469 t\"). Negative ti\n+0017fb60: 6d65 6f75 7420 7661 6c75 6573 206d 6561 meout values mea\n+0017fb70: 7375 7265 2074 696d 656f 7574 7320 696e sure timeouts in\n+0017fb80: 206d 6963 726f 7365 636f 6e64 732c 2066 microseconds, f\n+0017fb90: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n+0017fba0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #define uSec \n+0017fbf0: 2a2d 3120 3c2f 7370 616e 3e3c 2f64 6976 *-1 .
    #\n+0017fc30: 6465 6669 6e65 206d 5365 6320 2a2d 3130 define mSec *-10\n+0017fc40: 3030 203c 2f73 7061 6e3e 3c2f 6469 763e 00
    \n+0017fc50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    struct soap\n+0017fcd0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+0017fd60: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    .\n+0017fd70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->a\n+0017fe00: 6363 6570 745f 7469 6d65 6f75 743c 2f61 ccept_timeout = 10 uSec; .
    soa\n+0017fe60: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->send_timeout<\n+0017fec0: 2f61 3e20 3d20 3230 206d 5365 633b 203c /a> = 20 mSec; <\n+0017fed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    soap->recv_time\n+00180020: 6f75 743c 2f61 3e20 3d20 3130 3b3c 2f64 out = 10;.
    Warni\n+00180070: 6e67 3c2f 6474 3e3c 6464 3e4d 616e 7920 ng
    Many \n+00180080: 4c69 6e75 7820 7665 7273 696f 6e73 2064 Linux versions d\n+00180090: 6f20 6e6f 7420 7375 7070 6f72 7420 6e6f o not support no\n+001800a0: 6e2d 626c 6f63 6b69 6e67 203c 636f 6465 n-blocking connect(). Therefore, se\n+001800d0: 7474 696e 6720 3c63 6f64 653e 3c61 2063 tting soap::connec\n+001801a0: 745f 7469 6d65 6f75 743c 2f61 3e3c 2f63 t_timeout for non-blo\n+001801c0: 636b 696e 6720 3c63 6f64 653e 736f 6170 cking soap\n+001801d0: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n+001801e0: 686f 643c 2f63 6f64 653e 2063 616c 6c73 hod calls\n+001801f0: 206d 6179 206e 6f74 2077 6f72 6b20 756e may not work un\n+00180200: 6465 7220 4c69 6e75 782e 3c2f 6464 3e0a der Linux.
    .\n+00180210: 3c64 643e 0a49 6e74 6572 7275 7074 7320
    .Interrupts \n+00180220: 2845 494e 5452 2920 6361 6e20 6166 6665 (EINTR) can affe\n+00180230: 6374 2074 6865 2062 6c6f 636b 696e 6720 ct the blocking \n+00180240: 7469 6d65 2069 6e20 492f 4f20 6f70 6572 time in I/O oper\n+00180250: 6174 696f 6e73 2e20 5468 6520 6d61 7869 ations. The maxi\n+00180260: 6d75 6d20 6e75 6d62 6572 206f 6620 4549 mum number of EI\n+00180270: 4e54 5220 7468 6174 2077 696c 6c20 6e6f NTR that will no\n+00180280: 7420 7472 6967 6765 7220 616e 2065 7272 t trigger an err\n+00180290: 6f72 2069 7320 7365 7420 6279 203c 636f or is set by #SOAP_MAXEINT\n+001802b0: 523c 2f63 6f64 653e 2069 6e20 3c65 6d3e R in \n+001802c0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n+001802d0: 6f61 7032 2e68 3c2f 636f 6465 3e3c 2f65 oap2.h, which is 10 \n+001802f0: 6279 2064 6566 6175 6c74 2e20 4561 6368 by default. Each\n+00180300: 2045 494e 5452 206d 6179 2069 6e63 7265 EINTR may incre\n+00180310: 6173 6520 7468 6520 626c 6f63 6b69 6e67 ase the blocking\n+00180320: 2074 696d 6520 6279 2075 7020 746f 206f time by up to o\n+00180330: 6e65 2073 6563 6f6e 642c 2075 7020 746f ne second, up to\n+00180340: 203c 636f 6465 3e23 534f 4150 5f4d 4158 #SOAP_MAX\n+00180350: 4549 4e54 523c 2f63 6f64 653e 2073 6563 EINTR sec\n+00180360: 6f6e 6473 2074 6f74 616c 2e3c 2f64 643e onds total.
    \n+00180370: 3c2f 646c 3e0a 3c70 3ef0 9f94 9d20 3c61
    .

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

    .

    \n+001803b0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Closing c\n+001803e0: 6f6e 6e65 6374 696f 6e73 2062 7920 666f onnections by fo\n+001803f0: 7263 653c 2f68 323e 0a3c 703e 546f 2063 rce

    .

    To c\n+00180400: 6c6f 7365 2061 2073 6f63 6b65 7420 636f lose a socket co\n+00180410: 6e6e 6563 7469 6f6e 2062 7920 666f 7263 nnection by forc\n+00180420: 652c 2079 6f75 2063 616e 2075 7365 203c e, you can use <\n+00180430: 636f 6465 3e73 6f61 705f 666f 7263 655f code>soap_force_\n+00180440: 636c 6f73 6573 6f63 6b28 736f 6170 293c closesock(soap)<\n+00180450: 2f63 6f64 653e 2c20 7768 6963 6820 636c /code>, which cl\n+00180460: 6f73 6573 2074 6865 2063 6f6e 6e65 6374 oses the connect\n+00180470: 696f 6e20 7265 6761 7264 6c65 7373 2069 ion regardless i\n+00180480: 6620 6b65 6570 2d61 6c69 7665 2069 7320 f keep-alive is \n+00180490: 6163 7469 7665 2e20 4279 2063 6f6e 7472 active. By contr\n+001804a0: 6173 742c 203c 636f 6465 3e73 6f61 705f ast, soap_\n+001804b0: 636c 6f73 6573 6f63 6b28 736f 6170 293c closesock(soap)<\n+001804c0: 2f63 6f64 653e 206f 6e6c 7920 636c 6f73 /code> only clos\n+001804d0: 6573 2074 6865 2063 6f6e 6e65 6374 696f es the connectio\n+001804e0: 6e20 7768 656e 206b 6565 702d 616c 6976 n when keep-aliv\n+001804f0: 6520 6973 206e 6f74 2061 6374 6976 652e e is not active.\n+00180500: 3c2f 703e 0a3c 703e 546f 2066 6f72 6365

    .

    To force\n+00180510: 2d63 6c6f 7365 2061 2063 6f6e 6e65 6374 -close a connect\n+00180520: 696f 6e20 6672 6f6d 2061 6e6f 7468 6572 ion from another\n+00180530: 2074 6872 6561 642c 2063 6f6d 7069 6c65 thread, compile\n+00180540: 2073 7464 736f 6170 322e 6320 6f72 2073 stdsoap2.c or s\n+00180550: 7464 736f 6170 322e 6370 7020 616e 6420 tdsoap2.cpp and \n+00180560: 796f 7572 2070 726f 6a65 6374 2073 6f75 your project sou\n+00180570: 7263 6520 636f 6465 2077 6974 6820 3c63 rce code with #WITH_SELF_P\n+00180590: 4950 453c 2f63 6f64 653e 2074 6f20 656e IPE to en\n+001805a0: 6162 6c65 2074 6869 7320 6665 6174 7572 able this featur\n+001805b0: 652e 2055 7365 203c 636f 6465 3e73 6f61 e. Use soa\n+001805c0: 705f 636c 6f73 655f 636f 6e6e 6563 7469 p_close_connecti\n+001805d0: 6f6e 2873 6f61 7029 3c2f 636f 6465 3e20 on(soap) \n+001805e0: 6f6e 2074 6865 203c 636f 6465 3e3c 6120 on the soap context\n+00180650: 2074 6861 7420 6d75 7374 2063 6c6f 7365 that must close\n+00180660: 2e20 596f 7520 6361 6e20 6d61 6b65 2074 . You can make t\n+00180670: 6869 7320 6361 6c6c 2066 726f 6d20 616e his call from an\n+00180680: 6f74 6865 7220 7468 7265 6164 2061 6e64 other thread and\n+00180690: 2070 6173 7320 7468 6520 3c63 6f64 653e pass the \n+001806a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+001806f0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+00180700: 6578 7420 746f 2074 6869 7320 6675 6e63 ext to this func\n+00180710: 7469 6f6e 206f 6620 7468 6520 7468 7265 tion of the thre\n+00180720: 6164 2074 6861 7420 6d75 7374 2063 6c6f ad that must clo\n+00180730: 7365 2063 6f6e 6e65 6374 696f 6e73 2e3c se connections.<\n+00180740: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    <\n+001807a0: 2f61 3e0a 536f 636b 6574 206f 7074 696f /a>.Socket optio\n+001807b0: 6e73 2061 6e64 2066 6c61 6773 3c2f 6832 ns and flags.

    Socket comm\n+001807d0: 756e 6963 6174 696f 6e73 2063 616e 2062 unications can b\n+001807e0: 6520 636f 6e74 726f 6c6c 6564 2077 6974 e controlled wit\n+001807f0: 6820 736f 636b 6574 206f 7074 696f 6e73 h socket options\n+00180800: 2061 6e64 2066 6c61 6773 2e20 5468 6520 and flags. The \n+00180810: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context flags \n+00180880: 6172 653a 3c2f 703e 0a3c 756c 3e0a 3c6c are:

    .

    .

    The\n-0019c1b0: 2077 7364 6c32 6820 746f 6f6c 2063 616e wsdl2h tool can\n-0019c1c0: 2062 6520 7573 6564 2074 6f20 696d 706f be used to impo\n-0019c1d0: 7274 206d 756c 7469 706c 6520 5753 444c rt multiple WSDL\n-0019c1e0: 7320 616e 6420 7363 6865 6d61 7320 6174 s and schemas at\n-0019c1f0: 206f 6e63 652e 2054 6865 2073 6572 7669 once. The servi\n-0019c200: 6365 2064 6566 696e 6974 696f 6e73 2061 ce definitions a\n-0019c210: 7265 2063 6f6d 6269 6e65 6420 696e 206f re combined in o\n-0019c220: 6e65 2068 6561 6465 7220 6669 6c65 2074 ne header file t\n-0019c230: 6f20 6265 2070 6172 7365 6420 6279 2073 o be parsed by s\n-0019c240: 6f61 7063 7070 322e 2049 7420 6973 2069 oapcpp2. It is i\n-0019c250: 6d70 6f72 7461 6e74 2074 6f20 6173 7369 mportant to assi\n-0019c260: 676e 206e 616d 6573 7061 6365 2070 7265 gn namespace pre\n-0019c270: 6669 7865 7320 746f 206e 616d 6573 7061 fixes to namespa\n-0019c280: 6365 2055 5249 7320 7573 696e 6720 7468 ce URIs using th\n-0019c290: 6520 3c65 6d3e 3c63 6f64 653e 7479 7065 e type\n-0019c2a0: 6d61 702e 6461 743c 2f63 6f64 653e 3c2f map.dat file. Otherw\n-0019c2c0: 6973 652c 2077 7364 6c32 6820 7769 6c6c ise, wsdl2h will\n-0019c2d0: 2061 7373 6967 6e20 6e61 6d65 7370 6163 assign namespac\n-0019c2e0: 6520 7072 6566 6978 6573 203c 636f 6465 e prefixes ns1, ns2, a\n-0019c310: 6e64 2073 6f20 6f6e 2074 6f20 7468 6520 nd so on to the \n-0019c320: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-0019c330: 6e73 2061 6e64 2073 6368 656d 6120 7479 ns and schema ty\n-0019c340: 7065 732e 2054 6875 732c 2061 6e79 2063 pes. Thus, any c\n-0019c350: 6861 6e67 6520 746f 2061 2057 5344 4c20 hange to a WSDL \n-0019c360: 6f72 2073 6368 656d 6120 6d61 7920 7265 or schema may re\n-0019c370: 7375 6c74 2069 6e20 6120 6e65 7720 7072 sult in a new pr\n-0019c380: 6566 6978 2061 7373 6967 6e6d 656e 742e efix assignment.\n-0019c390: 2046 6f72 206d 6f72 6520 6465 7461 696c For more detail\n-0019c3a0: 732c 2070 6c65 6173 6520 7365 6520 5365 s, please see Se\n-0019c3b0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Cu\n-0019c3e0: 7374 6f6d 697a 696e 6720 584d 4c20 6461 stomizing XML da\n-0019c3f0: 7461 2062 696e 6469 6e67 7320 7769 7468 ta bindings with\n-0019c400: 2074 6865 2074 7970 656d 6170 2e64 6174 the typemap.dat\n-0019c410: 2066 696c 653c 2f61 3e20 2e3c 2f70 3e0a file .

    .\n-0019c420: 3c70 3e41 6e6f 7468 6572 2061 7070 726f

    Another appro\n-0019c430: 6163 6820 746f 2063 6f6d 6269 6e65 206d ach to combine m\n-0019c440: 756c 7469 706c 6520 636c 6965 6e74 2061 ultiple client a\n-0019c450: 6e64 2073 6572 7669 6365 2061 7070 6c69 nd service appli\n-0019c460: 6361 7469 6f6e 7320 696e 746f 206f 6e65 cations into one\n-0019c470: 2065 7865 6375 7461 626c 6520 6973 2062 executable is b\n-0019c480: 7920 7573 696e 6720 432b 2b20 6e61 6d65 y using C++ name\n-0019c490: 7370 6163 6573 2074 6f20 7374 7275 6374 spaces to struct\n-0019c4a0: 7572 616c 6c79 2073 6570 6172 6174 6520 urally separate \n-0019c4b0: 7468 6520 6465 6669 6e69 7469 6f6e 732e the definitions.\n-0019c4c0: 2054 6869 7320 6973 2061 7574 6f6d 6174 This is automat\n-0019c4d0: 6564 2077 6974 6820 3c61 2068 7265 663d ed with <\n-0019c4f0: 636f 6465 3e77 7364 6c32 6820 2d71 206e code>wsdl2h -q n\n-0019c500: 616d 653c 2f63 6f64 653e 3c2f 623e 206f ame o\n-0019c510: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n-0019c520: 7120 6e61 6d65 3c2f 636f 6465 3e3c 2f62 q name. Or by cre\n-0019c540: 6174 696e 6720 6c69 6272 6172 6965 7320 ating libraries \n-0019c550: 696e 2043 2066 6f72 2074 6865 2063 6c69 in C for the cli\n-0019c560: 656e 742f 7365 7276 6572 206f 626a 6563 ent/server objec\n-0019c570: 7473 2061 7320 6578 706c 6169 6e65 6420 ts as explained \n-0019c580: 696e 2073 7562 7365 7175 656e 7420 7365 in subsequent se\n-0019c590: 6374 696f 6e73 3c2f 703e 0a3c 703e 426f ctions

    .

    Bo\n-0019c5a0: 7468 2061 7070 726f 6163 6865 7320 6172 th approaches ar\n-0019c5b0: 6520 6465 6d6f 6e73 7472 6174 6564 2062 e demonstrated b\n-0019c5c0: 7920 6578 616d 706c 6573 2069 6e20 7468 y examples in th\n-0019c5d0: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c\n-0019c5e0: 6f64 6520 7061 636b 6167 652c 2074 6865 ode package, the\n-0019c5f0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-0019c600: 2f73 616d 706c 6573 2f6c 696e 6b3c 2f63 /samples/link (C onl\n-0019c620: 7929 2061 6e64 203c 656d 3e3c 636f 6465 y) and gsoap/samples/l\n-0019c640: 696e 6b2b 2b3c 2f63 6f64 653e 3c2f 656d ink++ (C++ with C++ \n-0019c660: 6e61 6d65 7370 6163 6573 2920 6578 616d namespaces) exam\n-0019c670: 706c 6573 2e3c 2f70 3e0a 3c70 3ef0 9f94 ples.

    .

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

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

    .Ho\n-0019c6e0: 7720 746f 2062 7569 6c64 2061 2063 6c69 w to build a cli\n-0019c6f0: 656e 7420 6f72 2073 6572 7665 7220 696e ent or server in\n-0019c700: 2061 2043 2b2b 2063 6f64 6520 6e61 6d65 a C++ code name\n-0019c710: 7370 6163 653c 2f68 323e 0a3c 703e 596f space

    .

    Yo\n-0019c720: 7520 6361 6e20 7573 6520 6120 432b 2b20 u can use a C++ \n-0019c730: 636f 6465 206e 616d 6573 7061 6365 206f code namespace o\n-0019c740: 6620 796f 7572 2063 686f 6963 6520 696e f your choice in\n-0019c750: 2079 6f75 7220 696e 7465 7266 6163 6520 your interface \n-0019c760: 6865 6164 6572 2066 696c 6520 746f 2062 header file to b\n-0019c770: 7569 6c64 2061 2063 6c69 656e 7420 6f72 uild a client or\n-0019c780: 2073 6572 7665 7220 696e 2074 6861 7420 server in that \n-0019c790: 432b 2b20 6e61 6d65 7370 6163 652e 2049 C++ namespace. I\n-0019c7a0: 6e20 7468 6973 2077 6179 2c20 796f 7520 n this way, you \n-0019c7b0: 6361 6e20 6372 6561 7465 206d 756c 7469 can create multi\n-0019c7c0: 706c 6520 636c 6965 6e74 7320 616e 6420 ple clients and \n-0019c7d0: 7365 7276 6572 7320 7468 6174 2063 616e servers that can\n-0019c7e0: 2062 6520 636f 6d62 696e 6564 2061 6e64 be combined and\n-0019c7f0: 206c 696e 6b65 6420 746f 6765 7468 6572 linked together\n-0019c800: 2077 6974 686f 7574 2063 6f6e 666c 6963 without conflic\n-0019c810: 7473 2c20 7768 6963 6820 6973 2065 7870 ts, which is exp\n-0019c820: 6c61 696e 6564 2069 6e20 6d6f 7265 2064 lained in more d\n-0019c830: 6574 6169 6c20 696e 2074 6865 206e 6578 etail in the nex\n-0019c840: 7420 7365 6374 696f 6e20 2877 6869 6368 t section (which\n-0019c850: 2061 6c73 6f20 7368 6f77 7320 616e 2065 also shows an e\n-0019c860: 7861 6d70 6c65 2063 6f6d 6269 6e69 6e67 xample combining\n-0019c870: 2074 776f 2063 6c69 656e 7420 6c69 6272 two client libr\n-0019c880: 6172 6965 7320 6465 6669 6e65 6420 696e aries defined in\n-0019c890: 2074 776f 2043 2b2b 2063 6f64 6520 6e61 two C++ code na\n-0019c8a0: 6d65 7370 6163 6573 292e 3c2f 703e 0a3c mespaces).

    .<\n-0019c8b0: 703e 5573 6520 3c61 2068 7265 663d 2223 p>Use wsdl2h -q nam\n-0019c8e0: 653c 2f63 6f64 653e 3c2f 623e 206f 7074 e opt\n-0019c8f0: 696f 6e20 3c62 3e3c 636f 6465 3e2d 7120 ion -q \n-0019c900: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e3c name<\n-0019c910: 2f61 3e20 746f 2067 656e 6572 6174 6520 /a> to generate \n-0019c920: 6465 6669 6e69 7469 6f6e 7320 696e 2074 definitions in t\n-0019c930: 6865 2043 2b2b 203c 636f 6465 3e6e 616d he C++ nam\n-0019c940: 653c 2f63 6f64 653e 206e 616d 6573 7061 e namespa\n-0019c950: 6365 2e20 5468 6973 206f 7074 696f 6e20 ce. This option \n-0019c960: 6361 6e20 616c 736f 2062 6520 7573 6564 can also be used\n-0019c970: 2069 6e20 636f 6d62 696e 6174 696f 6e20 in combination \n-0019c980: 7769 7468 2043 2b2b 2070 726f 7879 2061 with C++ proxy a\n-0019c990: 6e64 2073 6572 7665 7220 6f62 6a65 6374 nd server object\n-0019c9a0: 2067 656e 6572 6174 696f 6e2c 2075 7369 generation, usi\n-0019c9b0: 6e67 203c 623e 3c63 6f64 653e 736f 6170 ng soap\n-0019c9c0: 6370 7032 202d 6a3c 2f63 6f64 653e 3c2f cpp2 -j option -j\n-0019c9f0: 206f 7220 6f70 7469 6f6e 203c 623e 3c63 or option -i).

    .

    At mo\n-0019ca20: 7374 206f 6e65 206e 616d 6573 7061 6365 st one namespace\n-0019ca30: 2063 616e 2062 6520 6465 6669 6e65 6420 can be defined \n-0019ca40: 666f 7220 7468 6520 656e 7469 7265 2069 for the entire i\n-0019ca50: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-0019ca60: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n-0019ca70: 322e 2054 6865 2043 2b2b 206e 616d 6573 2. The C++ names\n-0019ca80: 7061 6365 206d 7573 7420 636f 6d70 6c65 pace must comple\n-0019ca90: 7465 6c79 2065 6e63 6170 7375 6c61 7465 tely encapsulate\n-0019caa0: 2074 6865 2065 6e74 6972 6520 636f 6e74 the entire cont\n-0019cab0: 656e 7473 206f 6620 7468 6520 6865 6164 ents of the head\n-0019cac0: 6572 2066 696c 653a 3c2f 703e 0a3c 6469 er file:

    .
    names\n-0019cb10: 7061 6365 203c 2f73 7061 6e3e 4e61 6d65 pace Name\n-0019cb20: 7370 6163 654e 616d 6520 7b3c 2f64 6976 spaceName {.
    ... \n-0019cb60: 696e 7465 7266 6163 6520 3c2f 7370 616e interface header file con\n-0019cb80: 7465 6e74 7320 2e2e 2e20 3c2f 6469 763e tents ...
    \n-0019cb90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    It is imp\n-0019f420: 6f72 7461 6e74 2074 6f20 7573 6520 3c62 ortant to use soapcpp2 \n-0019f440: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -n op\n-0019f450: 7469 6f6e 203c 623e 3c63 6f64 653e 2d6e tion -n\n-0019f460: 3c2f 636f 6465 3e3c 2f62 3e2c 2073 6565 , see\n-0019f470: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section soapcpp\n-0019f4b0: 3220 6f70 7469 6f6e 733c 2f61 3e2c 2074 2 options, t\n-0019f4c0: 6f20 7265 6e61 6d65 2074 6865 206e 616d o rename the nam\n-0019f4d0: 6573 7061 6365 2074 6162 6c65 7320 736f espace tables so\n-0019f4e0: 2077 6520 6361 6e20 696e 636c 7564 6520 we can include \n-0019f4f0: 7468 656d 2061 6c6c 2077 6974 686f 7574 them all without\n-0019f500: 2072 756e 6e69 6e67 2069 6e74 6f20 7265 running into re\n-0019f510: 6465 6669 6e69 7469 6f6e 732e 3c2f 703e definitions.

    \n-0019f520: 0a3c 646c 2063 6c61 7373 3d22 7365 6374 .
    No\n-0019f540: 7465 3c2f 6474 3e3c 6464 3e4c 696e 6b20 te
    Link \n-0019f550: 636f 6e66 6c69 6374 7320 6d61 7920 7374 conflicts may st\n-0019f560: 696c 6c20 6f63 6375 7220 696e 2074 6865 ill occur in the\n-0019f570: 2075 6e6c 696b 656c 7920 7369 7475 6174 unlikely situat\n-0019f580: 696f 6e20 7468 6174 2069 6465 6e74 6963 ion that identic\n-0019f590: 616c 2073 6572 7669 6365 206f 7065 7261 al service opera\n-0019f5a0: 7469 6f6e 206e 616d 6573 2061 7265 2064 tion names are d\n-0019f5b0: 6566 696e 6564 2069 6e20 7477 6f20 6f72 efined in two or\n-0019f5c0: 206d 6f72 6520 7374 7562 206f 7220 736b more stub or sk\n-0019f5d0: 656c 6574 6f6e 2066 756e 6374 696f 6e73 eleton functions\n-0019f5e0: 2077 6865 6e20 7468 6573 6520 6d65 7468 when these meth\n-0019f5f0: 6f64 7320 7368 6172 6520 7468 6520 7361 ods share the sa\n-0019f600: 6d65 2058 4d4c 206e 616d 6573 7061 6365 me XML namespace\n-0019f610: 2070 7265 6669 782e 3c2f 6464 3e3c 2f64 prefix.
    .

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

    .

    .C++ examples<\n-0019f690: 2f68 333e 0a3c 703e 4173 2061 6e20 6578 /h3>.

    As an ex\n-0019f6a0: 616d 706c 6520 7765 2077 696c 6c20 6275 ample we will bu\n-0019f6b0: 696c 6420 6120 4465 6c61 7965 6420 5374 ild a Delayed St\n-0019f6c0: 6f63 6b20 5175 6f74 6520 636c 6965 6e74 ock Quote client\n-0019f6d0: 206c 6962 7261 7279 2061 6e64 2061 2043 library and a C\n-0019f6e0: 7572 7265 6e63 7920 4578 6368 616e 6765 urrency Exchange\n-0019f6f0: 2052 6174 6520 636c 6965 6e74 206c 6962 Rate client lib\n-0019f700: 7261 7279 2e3c 2f70 3e0a 3c70 3e46 6972 rary.

    .

    Fir\n-0019f710: 7374 2c20 7765 2063 7265 6174 6520 616e st, we create an\n-0019f720: 2065 6d70 7479 2068 6561 6465 7220 6669 empty header fi\n-0019f730: 6c65 203c 656d 3e3c 636f 6465 3e65 6e76 le env\n-0019f740: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .h, \n-0019f750: 7768 6963 6820 6d61 7920 6265 2065 6d70 which may be emp\n-0019f760: 7479 206f 7220 7368 6f75 6c64 2063 6f6e ty or should con\n-0019f770: 7461 696e 2053 4f41 5020 4865 6164 6572 tain SOAP Header\n-0019f780: 2061 6e64 2046 6175 6c74 2064 6566 696e and Fault defin\n-0019f790: 6974 696f 6e73 2061 7320 6578 706c 6169 itions as explai\n-0019f7a0: 6e65 6420 696e 2053 6563 7469 6f6e 203c ned in Section <\n-0019f7b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0019f7c0: 663d 2269 6e64 6578 2e68 746d 6c23 6479 f=\"index.html#dy\n-0019f7d0: 6c69 6273 223e 486f 7720 746f 2063 7265 libs\">How to cre\n-0019f7e0: 6174 6520 636c 6965 6e74 2f73 6572 7665 ate client/serve\n-0019f7f0: 7220 6c69 6272 6172 6965 733c 2f61 3e2c r libraries,\n-0019f800: 2061 6e64 2063 6f6d 7069 6c65 2069 7420 and compile it \n-0019f810: 6173 2066 6f6c 6c6f 7773 3a20 3c2f 703e as follows:

    \n-0019f820: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     soapcpp2 \n-0019f840: 2d70 656e 7620 656e 762e 680a 2063 2b2b  -penv env.h. c++\n-0019f850: 202d 6320 656e 7643 2e63 7070 0a3c 2f70   -c envC.cpp.

    We also c\n-0019f870: 6f6d 7069 6c65 203c 656d 3e3c 636f 6465 ompile gsoap/stdsoap2.\n-0019f890: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n-0019f8a0: 7769 7468 6f75 7420 6e61 6d65 7370 6163 without namespac\n-0019f8b0: 6573 3a20 3c2f 703e 3c70 7265 2063 6c61 es:

     c\n-0019f8d0: 2b2b 202d 6320 2d44 5749 5448 5f4e 4f4e  ++ -c -DWITH_NON\n-0019f8e0: 414d 4553 5041 4345 5320 7374 6473 6f61  AMESPACES stdsoa\n-0019f8f0: 7032 2e63 7070 0a3c 2f70 7265 3e3c 703e  p2.cpp.

    \n-0019f900: 2049 6620 796f 7520 646f 206e 6f74 2075 If you do not u\n-0019f910: 7365 203c 636f 6465 3e23 5749 5448 5f4e se #WITH_N\n-0019f920: 4f4e 414d 4553 5041 4345 533c 2f63 6f64 ONAMESPACES then you will\n-0019f940: 2067 6574 2061 6e20 756e 7265 736f 6c76 get an unresolv\n-0019f950: 6564 206c 696e 6b20 6572 726f 7220 666f ed link error fo\n-0019f960: 7220 7468 6520 676c 6f62 616c 203c 636f r the global namespaces table. You \n-0019f990: 6361 6e20 6465 6669 6e65 2061 2064 756d can define a dum\n-0019f9a0: 6d79 2074 6162 6c65 2074 6f20 6176 6f69 my table to avoi\n-0019f9b0: 6420 6861 7669 6e67 2074 6f20 7265 636f d having to reco\n-0019f9c0: 6d70 696c 6520 3c65 6d3e 3c63 6f64 653e mpile \n-0019f9d0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c\n-0019f9e0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c pp.<\n-0019f9f0: 2f70 3e0a 3c70 3e53 6563 6f6e 642c 2077 /p>.

    Second, w\n-0019fa00: 6520 6372 6561 7465 2074 6865 2044 656c e create the Del\n-0019fa10: 6179 6564 2053 746f 636b 2051 756f 7465 ayed Stock Quote\n-0019fa20: 2068 6561 6465 7220 6669 6c65 2073 7065 header file spe\n-0019fa30: 6369 6669 6361 7469 6f6e 2c20 7768 6963 cification, whic\n-0019fa40: 6820 6d61 7920 6265 206f 6274 6169 6e65 h may be obtaine\n-0019fa50: 6420 7573 696e 6720 7468 6520 5753 444c d using the WSDL\n-0019fa60: 2069 6d70 6f72 7465 722e 2049 6620 796f importer. If yo\n-0019fa70: 7520 7761 6e74 2074 6f20 7573 6520 432b u want to use C+\n-0019fa80: 2b20 6e61 6d65 7370 6163 6573 2074 6865 + namespaces the\n-0019fa90: 6e20 796f 7520 6e65 6564 2074 6f20 6d61 n you need to ma\n-0019faa0: 6e75 616c 6c79 2061 6464 2074 6865 203c nually add the <\n-0019fab0: 636f 6465 3e6e 616d 6573 7061 6365 3c2f code>namespace declaratio\n-0019fad0: 6e20 746f 2074 6865 2067 656e 6572 6174 n to the generat\n-0019fae0: 6564 2068 6561 6465 7220 6669 6c65 3a3c ed header file:<\n-0019faf0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    namespace quote {
    \n-0019fb50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    //gsoap ns se\n-0019fba0: 7276 6963 6520 6e61 6d65 3a20 5365 7276 rvice name: Serv\n-0019fbb0: 6963 6520 3c2f 7370 616e 3e3c 2f64 6976 ice .
    //gsoa\n-0019fbf0: 7020 6e73 2073 6572 7669 6365 2073 7479 p ns service sty\n-0019fc00: 6c65 3a20 7270 6320 3c2f 7370 616e 3e3c le: rpc <\n-0019fc10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-0019fc40: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-0019fc50: 2065 6e63 6f64 696e 673a 2065 6e63 6f64 encoding: encod\n-0019fc60: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    \n-0019fc70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-0019fca0: 206e 7320 7365 7276 6963 6520 6c6f 6361 ns service loca\n-0019fcb0: 7469 6f6e 3a20 6874 7470 3a2f 2f73 6572 tion: http://ser\n-0019fcc0: 7669 6365 732e 786d 6574 686f 6473 2e6e vices.xmethods.n\n-0019fcd0: 6574 2f73 6f61 7020 3c2f 7370 616e 3e3c et/soap <\n-0019fce0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-0019fd10: 6773 6f61 7020 6e73 2073 6368 656d 6120 gsoap ns schema \n-0019fd20: 6e61 6d65 7370 6163 653a 2075 726e 3a78 namespace: urn:x\n-0019fd30: 6d65 7468 6f64 732d 6465 6c61 7965 642d methods-delayed-\n-0019fd40: 7175 6f74 6573 203c 2f73 7061 6e3e 3c2f quotes .
    //g\n-0019fd80: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-0019fd90: 6d65 7468 6f64 2d61 6374 696f 6e3a 2067 method-action: g\n-0019fda0: 6574 5175 6f74 6520 2671 756f 743b 2671 etQuote "&q\n-0019fdb0: 756f 743b 203c 2f73 7061 6e3e 3c2f 6469 uot; .
    i\n-0019fdf0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6765 nt ns__ge\n-0019fe00: 7451 756f 7465 283c 7370 616e 2063 6c61 tQuote(char *sy\n-0019fe30: 6d62 6f6c 2c20 3c73 7061 6e20 636c 6173 mbol, \n-0019fe50: 666c 6f61 743c 2f73 7061 6e3e 2026 616d float &am\n-0019fe60: 703b 5265 7375 6c74 293b 203c 2f64 6976 p;Result); .
    .} \n-0019fea0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // namespa\n-0019fec0: 6365 2071 756f 7465 3c2f 7370 616e 3e3c ce quote<\n-0019fed0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-0019fef0: 5765 2074 6865 6e20 636f 6d70 696c 6520 We then compile \n-0019ff00: 6974 2061 7320 6120 6c69 6272 6172 7920 it as a library \n-0019ff10: 616e 6420 7765 2075 7365 206f 7074 696f and we use optio\n-0019ff20: 6e20 3c62 3e3c 636f 6465 3e2d 6e3c 2f63 n -n to pref\n-0019ff40: 6978 2074 6865 2067 656e 6572 6174 6564 ix the generated\n-0019ff50: 2066 696c 6573 2061 6e64 2074 6f20 7265 files and to re\n-0019ff60: 6e61 6d65 2074 6865 206e 616d 6573 7061 name the namespa\n-0019ff70: 6365 2074 6162 6c65 2074 6f20 6176 6f69 ce table to avoi\n-0019ff80: 6420 6c69 6e6b 2063 6f6e 666c 6963 7473 d link conflicts\n-0019ff90: 206c 6174 6572 3a20 3c2f 703e 3c70 7265 later:

    soapcpp2 -n q\n-0019ffc0: 756f 7465 2e68 0a20 632b 2b20 2d63 2071 uote.h. c++ -c q\n-0019ffd0: 756f 7465 436c 6965 6e74 4c69 622e 6370 uoteClientLib.cp\n-0019ffe0: 700a 3c2f 7072 653e 3c70 3e20 4966 2079 p.

    If y\n-0019fff0: 6f75 2064 6f6e 2774 2077 616e 7420 746f ou don't want to\n-001a0000: 2075 7365 2061 2043 2b2b 2063 6f64 6520 use a C++ code \n-001a0010: 6e61 6d65 7370 6163 652c 2079 6f75 2073 namespace, you s\n-001a0020: 686f 756c 6420 636f 6d70 696c 6520 3c65 hould compile quote.h<\n-001a0040: 2f63 6f64 653e 3c2f 656d 3e20 2261 7320 /code> \"as \n-001a0050: 6973 2220 7769 7468 206f 7074 696f 6e20 is\" with option \n-001a0060: 3c62 3e3c 636f 6465 3e2d 7071 756f 7465 -pquote\n-001a0070: 3c2f 636f 6465 3e3c 2f62 3e3a 203c 2f70 :

     soapcpp2\n-001a00a0: 202d 6e20 2d70 7175 6f74 6520 7175 6f74   -n -pquote quot\n-001a00b0: 652e 680a 2063 2b2b 202d 6320 7175 6f74  e.h. c++ -c quot\n-001a00c0: 6543 6c69 656e 744c 6962 2e63 7070 0a3c  eClientLib.cpp.<\n-001a00d0: 2f70 7265 3e3c 703e 2054 6869 7264 2c20  /pre>

    Third, \n-001a00e0: 7765 2063 7265 6174 6520 7468 6520 4375 we create the Cu\n-001a00f0: 7272 656e 6379 2045 7863 6861 6e67 6520 rrency Exchange \n-001a0100: 5261 7465 2068 6561 6465 7220 6669 6c65 Rate header file\n-001a0110: 2073 7065 6369 6669 6361 7469 6f6e 3a3c specification:<\n-001a0120: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    namespace rate {
    .\n-001a0180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    //gsoap ns ser\n-001a01d0: 7669 6365 206e 616d 653a 2053 6572 7669 vice name: Servi\n-001a01e0: 6365 203c 2f73 7061 6e3e 3c2f 6469 763e ce
    \n-001a01f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-001a0220: 206e 7320 7365 7276 6963 6520 7374 796c ns service styl\n-001a0230: 653a 2072 7063 203c 2f73 7061 6e3e 3c2f e: rpc .
    //g\n-001a0270: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-001a0280: 656e 636f 6469 6e67 3a20 656e 636f 6465 encoding: encode\n-001a0290: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n-001a02a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-001a02d0: 6e73 2073 6572 7669 6365 206c 6f63 6174 ns service locat\n-001a02e0: 696f 6e3a 2068 7474 703a 2f2f 7365 7276 ion: http://serv\n-001a02f0: 6963 6573 2e78 6d65 7468 6f64 732e 6e65 ices.xmethods.ne\n-001a0300: 742f 736f 6170 203c 2f73 7061 6e3e 3c2f t/soap .
    //g\n-001a0340: 736f 6170 206e 7320 7363 6865 6d61 206e soap ns schema n\n-001a0350: 616d 6573 7061 6365 3a20 7572 6e3a 786d amespace: urn:xm\n-001a0360: 6574 686f 6473 2d43 7572 7265 6e63 7945 ethods-CurrencyE\n-001a0370: 7863 6861 6e67 6520 3c2f 7370 616e 3e3c xchange <\n-001a0380: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-001a03b0: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-001a03c0: 206d 6574 686f 642d 6163 7469 6f6e 3a20 method-action: \n-001a03d0: 6765 7452 6174 6520 2671 756f 743b 2671 getRate "&q\n-001a03e0: 756f 743b 203c 2f73 7061 6e3e 3c2f 6469 uot; .
    i\n-001a0420: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6765 nt ns__ge\n-001a0430: 7452 6174 6528 3c73 7061 6e20 636c 6173 tRate(\n-001a0450: 6368 6172 3c2f 7370 616e 3e20 2a63 6f75 char *cou\n-001a0460: 6e74 7279 312c 203c 7370 616e 2063 6c61 ntry1, char *co\n-001a0490: 756e 7472 7932 2c20 3c73 7061 6e20 636c untry2, float &\n-001a04c0: 616d 703b 5265 7375 6c74 293b 203c 2f64 amp;Result); .
    .\n-001a0500: 7d20 3c73 7061 6e20 636c 6173 733d 2263 } // names\n-001a0520: 7061 6365 2072 6174 653c 2f73 7061 6e3e pace rate\n-001a0530: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Similar to the \n-001a0560: 5175 6f74 6520 6578 616d 706c 6520 6162 Quote example ab\n-001a0570: 6f76 652c 2077 6520 6765 6e65 7261 7465 ove, we generate\n-001a0580: 2073 6f75 7263 6520 636f 6465 2075 7369 source code usi\n-001a0590: 6e67 206f 7074 696f 6e20 3c62 3e3c 636f ng option -n
    \n-001a05b0: 2074 6f20 7072 6566 6978 2074 6865 2067 to prefix the g\n-001a05c0: 656e 6572 6174 6564 2066 696c 6573 2061 enerated files a\n-001a05d0: 6e64 2074 6f20 7265 6e61 6d65 2074 6865 nd to rename the\n-001a05e0: 206e 616d 6573 7061 6365 2074 6162 6c65 namespace table\n-001a05f0: 2074 6f20 6176 6f69 6420 6c69 6e6b 2063 to avoid link c\n-001a0600: 6f6e 666c 6963 7473 3a20 3c2f 703e 3c70 onflicts:

    soapcpp2 -n\n-001a0630: 2072 6174 652e 680a 3c2f 7072 653e 3c70 rate.h.
    Fourth, we use\n-001a0650: 2074 6865 2067 656e 6572 6174 6564 2073 the generated s\n-001a0660: 6f75 7263 6520 636f 6465 206c 6962 7261 ource code libra\n-001a0670: 7269 6573 2077 6974 6820 7468 6520 6d61 ries with the ma\n-001a0680: 696e 2070 726f 6772 616d 2e3c 2f70 3e0a in program.

    .\n-001a0690: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n-001a06e0: 743b 7175 6f74 6548 2e68 2e68 2671 756f t;quoteH.h.h&quo\n-001a06f0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001a0700: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n-001a0730: 636c 7564 6520 2671 756f 743b 7261 7465 clude "rate\n-001a0740: 482e 682e 6826 7175 6f74 3b3c 2f73 7061 H.h.h"
    .
    #include &\n-001a0790: 7175 6f74 3b71 756f 7465 2e6e 736d 6170 quot;quote.nsmap\n-001a07a0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n-001a07f0: 7261 7465 2e6e 736d 6170 2671 756f 743b rate.nsmap"\n-001a0800: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a0820: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n-001a0860: 6169 6e28 3c73 7061 6e20 636c 6173 733d ain(in\n-001a0880: 743c 2f73 7061 6e3e 2061 7267 632c 203c t argc, <\n-001a0890: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a08a0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *argv[]) .
    {
    .<\n-001a08e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a08f0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-001a0910: 2f73 7061 6e3e 2028 6172 6763 2026 6c74 /span> (argc <\n-001a0920: 3b3d 2031 2920 3c2f 6469 763e 0a3c 6469 ;= 1)
    . \n-001a0940: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    s\n-001a0960: 7464 3a3a 6365 7272 2026 6c74 3b26 6c74 td::cerr <<\n-001a0970: 3b20 3c73 7061 6e20 636c 6173 733d 2273 ; &q\n-001a0990: 756f 743b 5573 6167 653a 206d 6169 6e20 uot;Usage: main \n-001a09a0: 7469 636b 6572 205b 6375 7272 656e 6379 ticker [currency\n-001a09b0: 5d26 7175 6f74 3b3c 2f73 7061 6e3e 2026 ]" &\n-001a09c0: 6c74 3b26 6c74 3b20 7374 643a 3a65 6e64 lt;< std::end\n-001a09d0: 6c20 3c2f 6469 763e 0a3c 6469 7620 636c l
    .
    e\n-001a09f0: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-001a0a00: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n-001a0a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-001a0a60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a0a70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a0a80: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001a0a90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001a0ac0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-001a0b20: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . \n-001a0b40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float\n-001a0b60: 3c2f 7370 616e 3e20 713b 203c 2f64 6976 q; ..\n-001a0c40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-001a0c70: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-001a0c80: 6c6c 5f6e 735f 5f67 6574 5175 6f74 6528 ll_ns__getQuote(\n-001a0c90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001a0cc0: 204e 554c 4c2c 204e 554c 4c2c 2061 7267 NULL, NULL, arg\n-001a0cd0: 765b 315d 2c20 7129 2920 3c73 7061 6e20 v[1], q)) \n-001a0cf0: 2f2f 2067 6574 2071 756f 7465 203c 2f73 // get quote
    .
    {\n-001a0d20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a0d90: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault\n-001a0da0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001a0dd0: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n-001a0de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }.
    \n-001a0e30: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    {
    .<\n-001a0e60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a0e70: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-001a0e90: 663c 2f73 7061 6e3e 2028 6172 6763 2026 f (argc &\n-001a0ea0: 6774 3b20 3229 203c 2f64 6976 3e0a 3c64 gt; 2)
    .\n-001a0ec0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n-001a0ee0: 2020 2020 3c73 7061 6e20 636c 6173 733d fl\n-001a0f00: 6f61 743c 2f73 7061 6e3e 2072 3b20 3c2f oat r; .
    soap_set_nam\n-001a0f90: 6573 7061 6365 733c 2f61 3e28 3c61 2063 espaces(soap, rat\n-001a0fd0: 655f 6e61 6d65 7370 6163 6573 293b 203c e_namespaces); <\n-001a0fe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soap_call_ns_\n-001a1030: 5f67 6574 5261 7465 283c 6120 636c 6173 _getRate(\n-001a1060: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n-001a1070: 4e55 4c4c 2c20 3c73 7061 6e20 636c 6173 NULL, "us"\n-001a10a0: 3c2f 7370 616e 3e2c 2061 7267 765b 325d , argv[2]\n-001a10b0: 2c20 7229 2920 3c73 7061 6e20 636c 6173 , r)) // g\n-001a10d0: 6574 2072 6174 6520 696e 2055 5320 646f et rate in US do\n-001a10e0: 6c6c 6172 7320 3c2f 7370 616e 3e3c 2f64 llars .
    soap_print_faul\n-001a1170: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-001a11a0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-001a11b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001a11d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a11e0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n-001a1210: 2020 2020 2020 7120 2a3d 2072 3b20 3c73 q *= r; // convert t\n-001a1240: 6865 2071 756f 7465 203c 2f73 7061 6e3e he quote \n-001a1250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } <\n-001a1270: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    std:\n-001a1290: 3a63 6f75 7420 266c 743b 266c 743b 2061 :cout << a\n-001a12a0: 7267 765b 315d 2026 6c74 3b26 6c74 3b20 rgv[1] << \n-001a12b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001a12d0: 743b 3a20 2671 756f 743b 3c2f 7370 616e t;: " << q <\n-001a12f0: 3b26 6c74 3b20 7374 643a 3a65 6e64 6c3b ;< std::endl;\n-001a1300: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    so\n-001a1390: 6170 5f64 6573 7472 6f79 3c2f 613e 283c ap_destroy(<\n-001a13a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a13b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a13c0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-001a13d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a1440: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap);.
    so\n-001a14f0: 6170 5f66 7265 653c 2f61 3e28 3c61 2063 ap_free(soap);.
    return \n-001a1570: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
    .
    }.

    Co\n-001a15b0: 6d70 696c 6520 616e 6420 6c69 6e6b 2074 mpile and link t\n-001a15c0: 6869 7320 6170 706c 6963 6174 696f 6e20 his application \n-001a15d0: 7769 7468 203c 656d 3e3c 636f 6465 3e73 with s\n-001a15e0: 7464 736f 6170 322e 6f3c 2f63 6f64 653e tdsoap2.o\n-001a15f0: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , envC.o, q\n-001a1620: 756f 7465 5365 7276 6572 5072 6f78 792e uoteServerProxy.\n-001a1630: 6f3c 2f63 6f64 653e 3c2f 656d 3e2c 2061 o, a\n-001a1640: 6e64 203c 656d 3e3c 636f 6465 3e72 6174 nd rat\n-001a1650: 6553 6572 7665 7250 726f 7879 2e6f 3c2f eServerProxy.o.

    .\n-001a1670: 3c70 3e49 6e73 7465 6164 206f 6620 7468

    Instead of th\n-001a1680: 6520 6765 6e65 7261 7465 6420 3c63 6f64 e generated soap_call_webm\n-001a16a0: 6574 686f 643c 2f63 6f64 653e 2073 7475 ethod stu\n-001a16b0: 6220 6675 6e63 7469 6f6e 7320 796f 7520 b functions you \n-001a16c0: 6361 6e20 616c 736f 2075 7365 203c 623e can also use \n-001a16d0: 3c63 6f64 653e 736f 6170 6370 7032 202d soapcpp2 -\n-001a16e0: 6a3c 2f63 6f64 653e 3c2f 623e 206f 7074 j opt\n-001a16f0: 696f 6e20 3c62 3e3c 636f 6465 3e2d 6a3c ion -j<\n-001a1700: 2f63 6f64 653e 3c2f 623e 206f 7220 6f70 /code> or op\n-001a1710: 7469 6f6e 203c 623e 3c63 6f64 653e 2d69 tion -i\n-001a1720: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2067 to g\n-001a1730: 656e 6572 6174 6520 432b 2b20 7072 6f78 enerate C++ prox\n-001a1740: 7920 636c 6173 7365 732e 3c2f 703e 0a3c y classes.

    .<\n-001a1750: 703e 546f 2063 6f6d 7069 6c65 2073 6572 p>To compile ser\n-001a1760: 7665 7220 6973 2076 6572 7920 7369 6d69 ver is very simi\n-001a1770: 6c61 722e 2046 6f72 2065 7861 6d70 6c65 lar. For example\n-001a1780: 2c20 6173 7375 6d65 2074 6861 7420 7765 , assume that we\n-001a1790: 206e 6565 6420 746f 2069 6d70 6c65 6d65 need to impleme\n-001a17a0: 6e74 2061 2063 616c 6375 6c61 746f 7220 nt a calculator \n-001a17b0: 7365 7276 6963 6520 616e 6420 7765 2077 service and we w\n-001a17c0: 616e 7420 746f 2063 7265 6174 6520 6120 ant to create a \n-001a17d0: 6c69 6272 6172 7920 666f 7220 6974 2e3c library for it.<\n-001a17e0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    namespace calc {
    .\n-001a1840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    //gsoap ns ser\n-001a1890: 7669 6365 206e 616d 653a 2043 616c 6320 vice name: Calc \n-001a18a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a18c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001a18e0: 2073 6572 7669 6365 2073 7479 6c65 3a20 service style: \n-001a18f0: 7270 6320 3c2f 7370 616e 3e3c 2f64 6976 rpc .
    //gsoa\n-001a1930: 7020 6e73 2073 6572 7669 6365 2065 6e63 p ns service enc\n-001a1940: 6f64 696e 673a 2065 6e63 6f64 6564 203c oding: encoded <\n-001a1950: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001a1970: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001a1980: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-001a1990: 7365 7276 6963 6520 6c6f 6361 7469 6f6e service location\n-001a19a0: 3a20 6874 7470 3a2f 2f77 7777 2e63 732e : http://www.cs.\n-001a19b0: 6673 752e 6564 752f 7e65 6e67 656c 656e fsu.edu/~engelen\n-001a19c0: 2f63 616c 632e 6367 6920 3c2f 7370 616e /calc.cgi
    .
    \n-001a1a00: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem\n-001a1a10: 6120 6e61 6d65 7370 6163 653a 2075 726e a namespace: urn\n-001a1a20: 3a63 616c 6320 3c2f 7370 616e 3e3c 2f64 :calc .
    \n-001a1a60: 696e 743c 2f73 7061 6e3e 206e 735f 5f61 int ns__a\n-001a1a70: 6464 283c 7370 616e 2063 6c61 7373 3d22 dd(dou\n-001a1a90: 626c 653c 2f73 7061 6e3e 2061 2c20 3c73 ble a, double b, double\n-001a1af0: 2026 616d 703b 7265 7375 6c74 293b 203c &result); <\n-001a1b00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n-001a1b40: 5f73 7562 283c 7370 616e 2063 6c61 7373 _sub(d\n-001a1b60: 6f75 626c 653c 2f73 7061 6e3e 2061 2c20 ouble a, \n-001a1b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a1b90: 3c2f 7370 616e 3e20 622c 203c 7370 616e b, double &result);\n-001a1bd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int n\n-001a1c10: 735f 5f6d 756c 283c 7370 616e 2063 6c61 s__mul(double a\n-001a1c40: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub\n-001a1c60: 6c65 3c2f 7370 616e 3e20 622c 203c 7370 le b, double &result\n-001a1ca0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    int\n-001a1ce0: 206e 735f 5f64 6976 283c 7370 616e 2063 ns__div(double\n-001a1d10: 2061 2c20 3c73 7061 6e20 636c 6173 733d a, do\n-001a1d30: 7562 6c65 3c2f 7370 616e 3e20 622c 203c uble b, <\n-001a1d40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a1d50: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n-001a1d60: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu\n-001a1d70: 6c74 293b 203c 2f64 6976 3e0a 3c64 6976 lt);
    . <\n-001a1d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } \n-001a1dc0: 2f2f 206e 616d 6573 7061 6365 2063 616c // namespace cal\n-001a1dd0: 633c 2f73 7061 6e3e 3c2f 6469 763e 0a3c c
    .<\n-001a1de0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    We gene\n-001a1e00: 7261 7465 2063 6f64 653a 203c 2f70 3e3c rate code:

    <\n-001a1e10: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-001a1e20: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n-001a1e30: 6a20 2d6e 2063 616c 632e 680a 3c2f 7072 j -n calc.h.

    Here we us\n-001a1e50: 6564 206f 7074 696f 6e20 3c62 3e3c 636f ed option -j\n-001a1e70: 2074 6f20 6765 6e65 7261 7465 2061 2043 to generate a C\n-001a1e80: 2b2b 2073 6572 7669 6365 2063 6c61 7373 ++ service class\n-001a1e90: 203c 656d 3e3c 636f 6465 3e63 616c 6343 calcC\n-001a1ea0: 616c 6353 6572 7669 6365 2e68 3c2f 636f alcService.h and calcCalcS\n-001a1ed0: 6572 7669 6365 2e63 7070 3c2f 636f 6465 ervice.cpp. The effe\n-001a1ef0: 6374 206f 6620 7468 6520 3c62 3e3c 636f ct of the -n\n-001a1f10: 206f 7074 696f 6e20 6973 2074 6861 7420 option is that \n-001a1f20: 6974 2063 7265 6174 6573 206c 6f63 616c it creates local\n-001a1f30: 206e 616d 6573 7061 6365 2074 6162 6c65 namespace table\n-001a1f40: 7320 616e 6420 7573 6573 203c 656d 3e3c s and uses <\n-001a1f50: 636f 6465 3e63 616c 633c 2f63 6f64 653e code>calc\n-001a1f60: 3c2f 656d 3e20 746f 2070 7265 6669 7820 to prefix \n-001a1f70: 7468 6520 6765 6e65 7261 7465 6420 6669 the generated fi\n-001a1f80: 6c65 732e 3c2f 703e 0a3c 6469 7620 636c les.

    .
    <\n-001a1fa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a1fb0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n-001a1fd0: 6c75 6465 2026 7175 6f74 3b63 616c 6343 lude "calcC\n-001a1fe0: 616c 6353 6572 7669 6365 2e68 2671 756f alcService.h&quo\n-001a1ff0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001a2000: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n-001a2030: 636c 7564 6520 2671 756f 743b 6361 6c63 clude "calc\n-001a2040: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap"
    .
    .
    \n-001a20a0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-001a20b0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    calc::Calc\n-001a20f0: 2063 616c 633b 203c 2f64 6976 3e0a 3c64 calc;
    .\n-001a2110: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... //
    . \n-001a2150: 6361 6c63 2e73 6572 7665 2829 3b20 3c73 calc.serve(); // calls req\n-001a2180: 7565 7374 2064 6973 7061 7463 6865 7220 uest dispatcher \n-001a2190: 746f 2069 6e76 6f6b 6520 6f6e 6520 6f66 to invoke one of\n-001a21a0: 2074 6865 2066 756e 6374 696f 6e73 2062 the functions b\n-001a21b0: 656c 6f77 203c 2f73 7061 6e3e 3c2f 6469 elow .
    ... //
    \n-001a2200: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    .
    int calc\n-001a2270: 3a3a 4361 6c63 3a3a 6164 6428 3c73 7061 ::Calc::add(double a, double b\n-001a22d0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub\n-001a22f0: 6c65 3c2f 7370 616e 3e20 2661 6d70 3b72 le &r\n-001a2300: 6573 756c 7429 3c2f 6469 763e 0a3c 6469 esult)
    .{\n-001a2320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    resul\n-001a2340: 7420 3d20 6120 2b20 623b 3c2f 6469 763e t = a + b;
    \n-001a2350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-001a2380: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK;.
    }
    .<\n-001a2410: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a2420: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-001a2460: 6361 6c63 3a3a 4361 6c63 3a3a 7375 6228 calc::Calc::sub(\n-001a2470: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a2490: 3c2f 7370 616e 3e20 612c 203c 7370 616e a, double b, \n-001a24e0: 646f 7562 6c65 3c2f 7370 616e 3e20 2661 double &a\n-001a24f0: 6d70 3b72 6573 756c 7429 3c2f 6469 763e mp;result)
    \n-001a2500: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    r\n-001a2530: 6573 756c 7420 3d20 6120 2d20 623b 3c2f esult = a - b;.
    return\n-001a2580: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n-001a25e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    } .
    .<\n-001a2630: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a2640: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int calc::Calc::\n-001a2660: 6d75 6c28 3c73 7061 6e20 636c 6173 733d mul(do\n-001a2680: 7562 6c65 3c2f 7370 616e 3e20 612c 203c uble a, <\n-001a2690: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a26a0: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n-001a26b0: 2f73 7061 6e3e 2062 2c20 3c73 7061 6e20 /span> b, double &result).
    {
    .<\n-001a2710: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a2720: 3e20 2072 6573 756c 7420 3d20 6120 2a20 > result = a * \n-001a2730: 623b 3c2f 6469 763e 0a3c 6469 7620 636c b;
    ..} \n-001a27f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a2810: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001a2840: 3c2f 7370 616e 3e20 6361 6c63 3a3a 4361 calc::Ca\n-001a2850: 6c63 3a3a 6469 7628 3c73 7061 6e20 636c lc::div(double \n-001a2880: 612c 203c 7370 616e 2063 6c61 7373 3d22 a, dou\n-001a28a0: 626c 653c 2f73 7061 6e3e 2062 2c20 3c73 ble b, double &resul\n-001a28e0: 7429 3c2f 6469 763e 0a3c 6469 7620 636c t)
    .
    {.
    result = \n-001a2920: 6120 2f20 623b 3c2f 6469 763e 0a3c 6469 a / b;
    . \n-001a2940: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001a2960: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001a29c0: 505f 4f4b 3c2f 613e 3b3c 2f64 6976 3e0a P_OK;
    .\n-001a29d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .

    We \n-001a3110: 636f 6d70 696c 6520 6974 2061 7320 6120 compile it as a \n-001a3120: 6c69 6272 6172 7920 616e 6420 7765 2075 library and we u\n-001a3130: 7365 206f 7074 696f 6e73 203c 623e 3c63 se options -n and -\n-001a3160: 7071 756f 7465 3c2f 636f 6465 3e3c 2f62 pquote to prefix the \n-001a3180: 6765 6e65 7261 7465 6420 6669 6c65 7320 generated files \n-001a3190: 616e 6420 746f 2072 656e 616d 6520 7468 and to rename th\n-001a31a0: 6520 6e61 6d65 7370 6163 6520 7461 626c e namespace tabl\n-001a31b0: 6520 746f 2061 766f 6964 206c 696e 6b20 e to avoid link \n-001a31c0: 636f 6e66 6c69 6374 733a 203c 2f70 3e3c conflicts:

    <\n-001a31d0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-001a31e0: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n-001a31f0: 6320 2d6e 202d 7071 756f 7465 2071 756f c -n -pquote quo\n-001a3200: 7465 2e68 0a20 6363 202d 6320 7175 6f74 te.h. cc -c quot\n-001a3210: 6543 6c69 656e 744c 6962 2e63 0a3c 2f70 eClientLib.c.

    Third, we\n-001a3230: 2063 7265 6174 6520 7468 6520 4375 7272 create the Curr\n-001a3240: 656e 6379 2045 7863 6861 6e67 6520 5261 ency Exchange Ra\n-001a3250: 7465 2068 6561 6465 7220 6669 6c65 2073 te header file s\n-001a3260: 7065 6369 6669 6361 7469 6f6e 3a3c 2f70 pecification:.

    \n-001a32b0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-001a32c0: 6365 206e 616d 653a 2053 6572 7669 6365 ce name: Service\n-001a32d0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001a32e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a32f0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-001a3310: 7320 7365 7276 6963 6520 7374 796c 653a s service style:\n-001a3320: 2072 7063 203c 2f73 7061 6e3e 3c2f 6469 rpc .
    //gso\n-001a3360: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en\n-001a3370: 636f 6469 6e67 3a20 656e 636f 6465 6420 coding: encoded \n-001a3380: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a33a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001a33c0: 2073 6572 7669 6365 206c 6f63 6174 696f service locatio\n-001a33d0: 6e3a 2068 7474 703a 2f2f 7365 7276 6963 n: http://servic\n-001a33e0: 6573 2e78 6d65 7468 6f64 732e 6e65 742f es.xmethods.net/\n-001a33f0: 736f 6170 203c 2f73 7061 6e3e 3c2f 6469 soap .
    //gso\n-001a3430: 6170 206e 7320 7363 6865 6d61 206e 616d ap ns schema nam\n-001a3440: 6573 7061 6365 3a20 7572 6e3a 786d 6574 espace: urn:xmet\n-001a3450: 686f 6473 2d43 7572 7265 6e63 7945 7863 hods-CurrencyExc\n-001a3460: 6861 6e67 6520 3c2f 7370 616e 3e3c 2f64 hange .
    //gs\n-001a34a0: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n-001a34b0: 6574 686f 642d 6163 7469 6f6e 3a20 6765 ethod-action: ge\n-001a34c0: 7452 6174 6520 2671 756f 743b 2671 756f tRate "&quo\n-001a34d0: 743b 203c 2f73 7061 6e3e 3c2f 6469 763e t;
    \n-001a34e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001a3510: 3c2f 7370 616e 3e20 6e73 5f5f 6765 7452 ns__getR\n-001a3520: 6174 6528 3c73 7061 6e20 636c 6173 733d ate(ch\n-001a3540: 6172 3c2f 7370 616e 3e20 2a63 6f75 6e74 ar *count\n-001a3550: 7279 312c 203c 7370 616e 2063 6c61 7373 ry1, c\n-001a3570: 6861 723c 2f73 7061 6e3e 202a 636f 756e har *coun\n-001a3580: 7472 7932 2c20 3c73 7061 6e20 636c 6173 try2, \n-001a35a0: 666c 6f61 743c 2f73 7061 6e3e 202a 5265 float *Re\n-001a35b0: 7375 6c74 293b 3c2f 6469 763e 0a3c 2f64 sult);
    .

    We compil\n-001a35e0: 6520 6974 2061 7320 6120 6c69 6272 6172 e it as a librar\n-001a35f0: 7920 616e 6420 7765 2075 7365 206f 7074 y and we use opt\n-001a3600: 696f 6e73 203c 623e 3c63 6f64 653e 2d6e ions -n\n-001a3610: 3c2f 636f 6465 3e3c 2f62 3e20 616e 6420 and \n-001a3620: 3c62 3e3c 636f 6465 3e2d 7072 6174 653c -prate<\n-001a3630: 2f63 6f64 653e 3c2f 623e 2074 6f20 7072 /code> to pr\n-001a3640: 6566 6978 2074 6865 2067 656e 6572 6174 efix the generat\n-001a3650: 6564 2066 696c 6573 2061 6e64 2074 6f20 ed files and to \n-001a3660: 7265 6e61 6d65 2074 6865 206e 616d 6573 rename the names\n-001a3670: 7061 6365 2074 6162 6c65 2074 6f20 6176 pace table to av\n-001a3680: 6f69 6420 6c69 6e6b 2063 6f6e 666c 6963 oid link conflic\n-001a3690: 7473 3a20 3c2f 703e 3c70 7265 2063 6c61 ts:

     s\n-001a36b0: 6f61 7063 7070 3220 2d63 202d 6e20 2d70  oapcpp2 -c -n -p\n-001a36c0: 7261 7465 2072 6174 652e 680a 2063 6320  rate rate.h. cc \n-001a36d0: 2d63 2072 6174 6543 6c69 656e 744c 6962  -c rateClientLib\n-001a36e0: 2e63 0a3c 2f70 7265 3e3c 703e 2054 6865  .c.

    The\n-001a36f0: 206d 6169 6e20 7072 6f67 7261 6d20 6973 main program is\n-001a3700: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ\n-001a3750: 6520 2671 756f 743b 7175 6f74 6548 2e68 e "quoteH.h\n-001a3760: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n-001a37b0: 7261 7465 482e 6826 7175 6f74 3b3c 2f73 rateH.h"
    .
    #include\n-001a3800: 2026 7175 6f74 3b71 756f 7465 2e6e 736d "quote.nsm\n-001a3810: 6170 2671 756f 743b 3c2f 7370 616e 3e3c ap"<\n-001a3820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo\n-001a3860: 743b 7261 7465 2e6e 736d 6170 2671 756f t;rate.nsmap&quo\n-001a3870: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001a3880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n-001a38d0: 206d 6169 6e28 3c73 7061 6e20 636c 6173 main(\n-001a38f0: 696e 743c 2f73 7061 6e3e 2061 7267 632c int argc,\n-001a3900: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001a3920: 2f73 7061 6e3e 202a 6172 6776 5b5d 2920 /span> *argv[]) \n-001a3930: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001a3950: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001a3980: 663c 2f73 7061 6e3e 2028 6172 6763 2026 f (argc &\n-001a3990: 6c74 3b3d 2031 2920 3c2f 6469 763e 0a3c lt;= 1)
    .<\n-001a39a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a39b0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n-001a39d0: 2066 7072 696e 7466 2873 7464 6572 722c fprintf(stderr,\n-001a39e0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001a3a00: 6f74 3b55 7361 6765 3a20 6d61 696e 2074 ot;Usage: main t\n-001a3a10: 6963 6b65 7220 5b63 7572 7265 6e63 795d icker [currency]\n-001a3a20: 5c6e 2671 756f 743b 3c2f 7370 616e 3e29 \\n")\n-001a3a30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    e\n-001a3a50: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-001a3a60: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n-001a3a80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-001a3ac0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a3ad0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a3ae0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001a3af0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001a3b20: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-001a3b80: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n-001a3ba0: 2020 3c73 7061 6e20 636c 6173 733d 226b floa\n-001a3bc0: 743c 2f73 7061 6e3e 2071 3b20 3c2f 6469 t q; .\n-001a3ca0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001a3cd0: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n-001a3ce0: 616c 6c5f 6e73 5f5f 6765 7451 756f 7465 all_ns__getQuote\n-001a3cf0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a3d20: 2c20 4e55 4c4c 2c20 4e55 4c4c 2c20 6172 , NULL, NULL, ar\n-001a3d30: 6776 5b31 5d2c 2026 616d 703b 7129 2920 gv[1], &q)) \n-001a3d40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get quo\n-001a3d60: 7465 203c 2f73 7061 6e3e 3c2f 6469 763e te
    \n-001a3d70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-001a3de0: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-001a3df0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a3e00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a3e10: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001a3e20: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-001a3e30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n-001a3e60: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
    \n-001a3e70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n-001a3ea0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n-001a3ec0: 2f73 7061 6e3e 2028 6172 6763 2026 6774 /span> (argc >\n-001a3ed0: 3b20 3229 203c 2f64 6976 3e0a 3c64 6976 ; 2)
    . \n-001a3ef0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-001a3f10: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_se\n-001a3f70: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces\n-001a3f80: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a3fb0: 2c20 7261 7465 5f6e 616d 6573 7061 6365 , rate_namespace\n-001a3fc0: 7329 3b20 3c2f 6469 763e 0a3c 6469 7620 s);
    .
    \n-001a3fe0: 2020 203c 7370 616e 2063 6c61 7373 3d22 flo\n-001a4000: 6174 3c2f 7370 616e 3e20 723b 203c 2f64 at r; .
    if \n-001a4050: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f67 (soap_call_ns__g\n-001a4060: 6574 5261 7465 283c 6120 636c 6173 733d etRate(so\n-001a4090: 6170 3c2f 613e 2c20 4e55 4c4c 2c20 4e55 ap, NULL, NU\n-001a40a0: 4c4c 2c20 3c73 7061 6e20 636c 6173 733d LL, \n-001a40c0: 2671 756f 743b 7573 2671 756f 743b 3c2f "us", argv[2], \n-001a40e0: 2661 6d70 3b72 2929 203c 7370 616e 2063 &r)) /\n-001a4100: 2f20 6765 7420 7261 7465 2069 6e20 5553 / get rate in US\n-001a4110: 2064 6f6c 6c61 7273 203c 2f73 7061 6e3e dollars \n-001a4120: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a4140: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n-001a41a0: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n-001a41d0: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n-001a41e0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-001a4200: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n-001a4220: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-001a4230: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a4240: 3e20 2020 2020 2020 2071 202a 3d20 723b > q *= r;\n-001a4250: 203c 7370 616e 2063 6c61 7373 3d22 636f // conver\n-001a4270: 7420 7468 6520 7175 6f74 6520 3c2f 7370 t the quote
    .
    \n-001a42a0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    p\n-001a42c0: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("%s: %f \\\n-001a42f0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-001a4300: 6172 6776 5b31 5d2c 2071 293b 203c 2f64 argv[1], q); .
    }
    \n-001a4330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-001a43a0: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap);.\n-001a4490: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n-001a4540: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-001a4570: 7475 726e 3c2f 7370 616e 3e20 303b 203c turn 0; <\n-001a4580: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-001a45a0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Compil\n-001a45c0: 6520 616e 6420 6c69 6e6b 2074 6869 7320 e and link this \n-001a45d0: 6170 706c 6963 6174 696f 6e20 7769 7468 application with\n-001a45e0: 203c 656d 3e3c 636f 6465 3e73 7464 736f stdso\n-001a45f0: 6170 322e 6f3c 2f63 6f64 653e 3c2f 656d ap2.o, env\n-001a4610: 432e 6f3c 2f63 6f64 653e 3c2f 656d 3e2c C.o,\n-001a4620: 203c 656d 3e3c 636f 6465 3e71 756f 7465 quote\n-001a4630: 436c 6965 6e74 4c69 622e 6f3c 2f63 6f64 ClientLib.o, and rateClien\n-001a4660: 744c 6962 2e6f 3c2f 636f 6465 3e3c 2f65 tLib.o.

    .

    .... \n-001a4680: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n-001a4690: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n-001a46a0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..How to c\n-001a46e0: 6861 696e 2043 2073 6572 7669 6365 7320 hain C services \n-001a46f0: 746f 2061 6363 6570 7420 6d65 7373 6167 to accept messag\n-001a4700: 6573 206f 6e20 7468 6520 7361 6d65 2070 es on the same p\n-001a4710: 6f72 743c 2f68 333e 0a3c 703e 5768 656e ort

    .

    When\n-001a4720: 2063 6f6d 6269 6e69 6e67 206d 756c 7469 combining multi\n-001a4730: 706c 6520 7365 7276 6963 6573 2069 6e74 ple services int\n-001a4740: 6f20 6f6e 6520 6170 706c 6963 6174 696f o one applicatio\n-001a4750: 6e2c 2079 6f75 2063 616e 2072 756e 2077 n, you can run w\n-001a4760: 7364 6c32 6820 6f6e 206d 756c 7469 706c sdl2h on multipl\n-001a4770: 6520 5753 444c 7320 746f 2067 656e 6572 e WSDLs to gener\n-001a4780: 6174 6520 7468 6520 7369 6e67 6c65 2061 ate the single a\n-001a4790: 6c6c 2d69 6e63 6c75 7369 7665 2073 6572 ll-inclusive ser\n-001a47a0: 7669 6365 2064 6566 696e 6974 696f 6e73 vice definitions\n-001a47b0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-001a47c0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n-001a47d0: 7070 322e 2054 6869 7320 6865 6164 6572 pp2. This header\n-001a47e0: 2066 696c 6520 6973 2074 6865 6e20 7072 file is then pr\n-001a47f0: 6f63 6573 7365 6420 7769 7468 2073 6f61 ocessed with soa\n-001a4800: 7063 7070 3220 746f 2067 656e 6572 6174 pcpp2 to generat\n-001a4810: 6520 736b 656c 6574 6f6e 2066 756e 6374 e skeleton funct\n-001a4820: 696f 6e73 2069 6e20 432e 3c2f 703e 0a3c ions in C.

    .<\n-001a4830: 703e 5768 6174 2069 6620 7765 2067 656e p>What if we gen\n-001a4840: 6572 6174 6520 6d75 6c74 6970 6c65 2073 erate multiple s\n-001a4850: 6572 7669 6365 732c 2065 6163 6820 6672 ervices, each fr\n-001a4860: 6f6d 2061 2057 5344 4c20 7365 7061 7261 om a WSDL separa\n-001a4870: 7465 6c79 2c20 616e 6420 7761 6e74 2074 tely, and want t\n-001a4880: 6f20 6465 706c 6f79 2074 6865 6d20 6f6e o deploy them on\n-001a4890: 2074 6865 2073 616d 6520 706f 7274 3f20 the same port? \n-001a48a0: 5468 6973 2072 6571 7569 7265 7320 6c69 This requires li\n-001a48b0: 7374 656e 696e 6720 746f 2074 6865 2073 stening to the s\n-001a48c0: 616d 6520 706f 7274 2061 6e64 2074 6865 ame port and the\n-001a48d0: 6e20 6368 6169 6e69 6e67 2074 6865 2073 n chaining the s\n-001a48e0: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n-001a48f0: 7320 736f 2074 6861 7420 6561 6368 2073 s so that each s\n-001a4900: 6572 7669 6365 2063 616e 2073 6572 7665 ervice can serve\n-001a4910: 2061 2072 6571 7565 7374 2e3c 2f70 3e0a a request.

    .\n-001a4920: 3c70 3e46 6972 7374 2077 6520 6372 6561

    First we crea\n-001a4930: 7465 2061 203c 656d 3e3c 636f 6465 3e65 te a e\n-001a4940: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h\n-001a4950: 2074 6861 7420 636f 6e74 6169 6e73 2074 that contains t\n-001a4960: 6865 206a 6f69 6e74 2053 4f41 5020 4865 he joint SOAP He\n-001a4970: 6164 6572 2061 6e64 2053 4f41 5020 4661 ader and SOAP Fa\n-001a4980: 756c 7420 6465 6669 6e69 7469 6f6e 732c ult definitions,\n-001a4990: 2066 6f72 2065 7861 6d70 6c65 2062 7920 for example by \n-001a49a0: 636f 7079 2d70 6173 7469 6e67 2074 6865 copy-pasting the\n-001a49b0: 7365 2066 726f 6d20 7468 6520 6f74 6865 se from the othe\n-001a49c0: 7220 6865 6164 6572 2066 696c 6573 2067 r header files g\n-001a49d0: 656e 6572 6174 6564 2062 7920 7773 646c enerated by wsdl\n-001a49e0: 3268 2e20 4f72 2074 6869 7320 6669 6c65 2h. Or this file\n-001a49f0: 2069 7320 656d 7074 7920 6966 206e 6f20 is empty if no \n-001a4a00: 7370 6563 6961 6c69 7a65 6420 534f 4150 specialized SOAP\n-001a4a10: 2048 6561 6465 7273 2061 6e64 2046 6175 Headers and Fau\n-001a4a20: 6c74 7320 6172 6520 7573 6564 2e20 5765 lts are used. We\n-001a4a30: 2063 6f6d 7069 6c65 2069 7420 6173 2066 compile it as f\n-001a4a40: 6f6c 6c6f 7773 3a20 3c2f 703e 3c70 7265 ollows:

    soapcpp2 -c -\n-001a4a70: 7065 6e76 2065 6e76 2e68 0a20 6363 202d penv env.h. cc -\n-001a4a80: 6320 656e 7643 2e63 0a3c 2f70 7265 3e3c c envC.c.
    <\n-001a4a90: 703e 2057 6520 616c 736f 2063 6f6d 7069 p> We also compi\n-001a4aa0: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso\n-001a4ab0: 6170 2f73 7464 736f 6170 322e 633c 2f63 ap/stdsoap2.c withou\n-001a4ad0: 7420 6e61 6d65 7370 6163 6573 3a20 3c2f t namespaces:
     cc -c -\n-001a4b00: 4457 4954 485f 4e4f 4e41 4d45 5350 4143  DWITH_NONAMESPAC\n-001a4b10: 4553 2073 7464 736f 6170 322e 630a 3c2f  ES stdsoap2.c.

    Say for \n-001a4b30: 6578 616d 706c 6520 7468 6174 2077 6520 example that we \n-001a4b40: 6861 7665 2061 2073 6572 7669 6365 2064 have a service d\n-001a4b50: 6566 696e 6974 696f 6e20 696e 203c 656d efinition in quote.h. We c\n-001a4b80: 6f6d 7069 6c65 2069 7420 6173 2061 206c ompile it as a l\n-001a4b90: 6962 7261 7279 2061 6e64 2077 6520 7573 ibrary and we us\n-001a4ba0: 6520 6f70 7469 6f6e 7320 3c62 3e3c 636f e options -n\n-001a4bc0: 2061 6e64 203c 623e 3c63 6f64 653e 2d70 and -p\n-001a4bd0: 7175 6f74 653c 2f63 6f64 653e 3c2f 623e quote\n-001a4be0: 2074 6f20 7072 6566 6978 2074 6865 2067 to prefix the g\n-001a4bf0: 656e 6572 6174 6564 2066 696c 6573 2061 enerated files a\n-001a4c00: 6e64 2074 6f20 7265 6e61 6d65 2074 6865 nd to rename the\n-001a4c10: 206e 616d 6573 7061 6365 2074 6162 6c65 namespace table\n-001a4c20: 2074 6f20 6176 6f69 6420 6c69 6e6b 2063 to avoid link c\n-001a4c30: 6f6e 666c 6963 7473 3a20 3c2f 703e 3c70 onflicts:

    soapcpp2 -c\n-001a4c60: 202d 6e20 2d70 7175 6f74 6520 7175 6f74 -n -pquote quot\n-001a4c70: 652e 680a 2063 6320 2d63 2071 756f 7465 e.h. cc -c quote\n-001a4c80: 436c 6965 6e74 4c69 622e 630a 3c2f 7072 ClientLib.c.

    We do the \n-001a4ca0: 7361 6d65 2066 6f72 2061 2073 6572 7669 same for a servi\n-001a4cb0: 6365 2064 6566 696e 6974 696f 6e20 696e ce definition in\n-001a4cc0: 203c 656d 3e3c 636f 6465 3e72 6174 652e rate.\n-001a4cd0: 683c 2f63 6f64 653e 3c2f 656d 3e3a 203c h: <\n-001a4ce0: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     soapcp\n-001a4d00: 7032 202d 6320 2d6e 202d 7072 6174 6520  p2 -c -n -prate \n-001a4d10: 7261 7465 2e68 0a20 6363 202d 6320 7261  rate.h. cc -c ra\n-001a4d20: 7465 436c 6965 6e74 4c69 622e 630a 3c2f  teClientLib.c.

    To serve\n-001a4d40: 2062 6f74 6820 7468 6520 7175 6f74 6520 both the quote \n-001a4d50: 616e 6420 7261 7465 2073 6572 7669 6365 and rate service\n-001a4d60: 7320 6f6e 2074 6865 2073 616d 6520 706f s on the same po\n-001a4d70: 7274 2c20 7765 2063 6861 696e 2074 6865 rt, we chain the\n-001a4d80: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-001a4d90: 6865 7273 2061 7320 666f 6c6c 6f77 733a hers as follows:\n-001a4da0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n-001a4df0: 2026 7175 6f74 3b71 756f 7465 482e 6826 "quoteH.h&\n-001a4e00: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    \n-001a4e40: 2369 6e63 6c75 6465 2026 7175 6f74 3b72 #include "r\n-001a4e50: 6174 6548 2e68 2671 756f 743b 3c2f 7370 ateH.h"
    .
    #include \n-001a4ea0: 2671 756f 743b 7175 6f74 652e 6e73 6d61 "quote.nsma\n-001a4eb0: 7026 7175 6f74 3b3c 2f73 7061 6e3e 3c2f p".
    #include "\n-001a4f00: 3b72 6174 652e 6e73 6d61 7026 7175 6f74 ;rate.nsmap"\n-001a4f10: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n-001a4f20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a4f30: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    struct <\n-001a4f70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a4f80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a4f90: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001a4fa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001a4fd0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-001a5030: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n-001a5050: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_vali\n-001a50d0: 645f 736f 636b 6574 3c2f 613e 283c 6120 d_socket(soa\n-001a5130: 705f 6269 6e64 3c2f 613e 283c 6120 636c p_bind(soap, NULL\n-001a5170: 2c20 3830 3830 2c20 3130 2929 2920 3c73 , 8080, 10))) // small BAC\n-001a51a0: 4b4c 4f47 2066 6f72 2069 7465 7261 7469 KLOG for iterati\n-001a51b0: 7665 2073 6572 7665 7273 3c2f 7370 616e ve servers
    .
    {.
    \n-001a5210: 7768 696c 653c 2f73 7061 6e3e 2028 3129 while (1)\n-001a5220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    if (\n-001a52d0: 736f 6170 5f76 616c 6964 5f73 6f63 6b65 soap_valid_socke\n-001a52e0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soap_accep\n-001a5340: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-001a5370: 703c 2f61 3e29 2929 3c2f 6469 763e 0a3c p)))
    .<\n-001a5380: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a5390: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n-001a53b0: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n-001a53d0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap_b\n-001a5430: 6567 696e 5f73 6572 7665 3c2f 613e 283c egin_serve(<\n-001a5440: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a5450: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a5460: 6874 6d6c 223e 736f 6170 3c2f 613e 2929 html\">soap))\n-001a5470: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a5490: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a54b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-001a5510: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap, stder\n-001a5550: 7229 3b20 3c2f 6469 763e 0a3c 6469 7620 r);
    .
    \n-001a5570: 2020 2020 203c 7370 616e 2063 6c61 7373 c\n-001a5590: 6f6e 7469 6e75 653c 2f73 7061 6e3e 3b3c ontinue;<\n-001a55a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }<\n-001a55c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_na\n-001a5640: 6d65 7370 6163 6573 3c2f 613e 283c 6120 mespaces(soap, qu\n-001a5680: 6f74 655f 6e61 6d65 7370 6163 6573 293b ote_namespaces);\n-001a5690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001a56b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a56c0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (quote_serve_\n-001a56e0: 7265 7175 6573 7428 3c61 2063 6c61 7373 request(s\n-001a5710: 6f61 703c 2f61 3e29 203d 3d20 3c61 2063 oap) == \n-001a5770: 534f 4150 5f4e 4f5f 4d45 5448 4f44 3c2f SOAP_NO_METHOD)
    .
    \n-001a57a0: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    . \n-001a5890: 2020 2020 2020 203c 7370 616e 2063 6c61 if (rate\n-001a58c0: 5f73 6572 7665 5f72 6571 7565 7374 283c _serve_request(<\n-001a58d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a58e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a58f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2929 html\">soap))\n-001a5900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a5920: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_send_fau\n-001a5980: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so\n-001a59b0: 6170 3c2f 613e 293b 203c 7370 616e 2063 ap); /\n-001a59d0: 2f20 7365 6e64 2066 6175 6c74 2074 6f20 / send fault to \n-001a59e0: 636c 6965 6e74 203c 2f73 7061 6e3e 3c2f client .
    } <\n-001a5a10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else if\n-001a5a70: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n-001a5aa0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->error)\n-001a5b00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a5b20: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a5b40: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_send_faul\n-001a5ba0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-001a5bd0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); //\n-001a5bf0: 2073 656e 6420 6661 756c 7420 746f 2063 send fault to c\n-001a5c00: 6c69 656e 7420 3c2f 7370 616e 3e3c 2f64 lient .
    }.
    }.
    else if (soap->\n-001a5d30: 6572 726e 756d 3c2f 613e 2920 3c73 7061 errnum) // accept fail\n-001a5d60: 6564 2c20 7472 7920 6167 6169 6e20 6166 ed, try again af\n-001a5d70: 7465 7220 3120 7365 636f 6e64 3c2f 7370 ter 1 second
    .
    \n-001a5da0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a5dc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n-001a5e20: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n-001a5e50: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr)\n-001a5e60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-001a5e80: 2073 6c65 6570 2831 293b 3c2f 6469 763e sleep(1);
    \n-001a5e90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-001a5eb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-001a5ee0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    {
    .\n-001a5f10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    fprintf(\n-001a5f30: 7374 6465 7272 2c20 3c73 7061 6e20 636c stderr, "server\n-001a5f60: 2074 696d 6564 206f 7574 5c6e 2671 756f timed out\\n&quo\n-001a5f70: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); .
    break;
    .
    \n-001a5fe0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    soap_destroy<\n-001a6060: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001a6090: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n-001a60b0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_end\n-001a6110: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001a6140: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n-001a6160: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    }.
    soap_\n-001a61f0: 6465 7374 726f 793c 2f61 3e28 3c61 2063 destroy(soap); .
    soap\n-001a62a0: 5f65 6e64 3c2f 613e 283c 6120 636c 6173 _end(\n-001a62d0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); ..<\n-001a6390: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This ch\n-001a63b0: 6169 6e69 6e67 2063 616e 2062 6520 6172 aining can be ar\n-001a63c0: 6269 7472 6172 696c 7920 6465 6570 2e20 bitrarily deep. \n-001a63d0: 5768 656e 2074 6865 2070 7265 7669 6f75 When the previou\n-001a63e0: 7320 7265 7175 6573 7420 6661 696c 7320 s request fails \n-001a63f0: 7769 7468 2061 203c 636f 6465 3e23 534f with a #SO\n-001a6400: 4150 5f4e 4f5f 4d45 5448 4f44 3c2f 636f AP_NO_METHOD then next re\n-001a6420: 7175 6573 7420 6469 7370 6174 6368 6572 quest dispatcher\n-001a6430: 2063 616e 2062 6520 7472 6965 642e 3c2f can be tried..

    The server\n-001a6450: 2073 686f 756c 6420 616c 736f 2064 6566 should also def\n-001a6460: 696e 6520 7468 6520 7365 7276 6963 6520 ine the service \n-001a6470: 6f70 6572 6174 696f 6e73 3a3c 2f70 3e0a operations:

    .\n-001a6480: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int ns_\n-001a64d0: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(\n-001a64f0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001a6530: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a6540: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a6550: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001a6560: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *symbol, <\n-001a6590: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a65a0: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float *Result); \n-001a65c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001a65e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    *Result = .\n-001a6600: 2e2e 203b 203c 2f64 6976 3e0a 3c64 6976 .. ;
    . \n-001a6620: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001a6640: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-001a66a0: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    .\n-001a66b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int ns__\n-001a6720: 6765 7452 6174 6528 3c73 7061 6e20 636c getRate(st\n-001a6740: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, char *country1, <\n-001a67e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a67f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *country2, \n-001a6810: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n-001a6830: 2f73 7061 6e3e 202a 5265 7375 6c74 293b /span> *Result);\n-001a6840: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    *Result = \n-001a6880: 2e2e 2e20 3b20 3c2f 6469 763e 0a3c 6469 ... ;
    . \n-001a68a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001a68c0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001a6920: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n-001a6930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-001a8ab0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

    .

    .How to\n-001a8b10: 2063 7265 6174 6520 444c 4c73 3c2f 6832 create DLLs.

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

    .

    .\n-001a8b80: 4372 6561 7469 6e67 2074 6865 2062 6173 Creating the bas\n-001a8b90: 6520 7374 6473 6f61 7032 2e64 6c6c 3c2f e stdsoap2.dll.

    The engin\n-001a8bb0: 6520 646f 6573 206e 6f74 2064 6566 696e e does not defin\n-001a8bc0: 6520 534f 4150 2048 6561 6465 7220 616e e SOAP Header an\n-001a8bd0: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ\n-001a8be0: 6572 7320 7468 6174 2074 6865 2065 6e67 ers that the eng\n-001a8bf0: 696e 6520 6e65 6564 7320 7768 656e 2069 ine needs when i\n-001a8c00: 6e73 7461 6c6c 6564 2061 7320 6120 6c69 nstalled as a li\n-001a8c10: 6272 6172 792e 2057 6520 7468 6572 6566 brary. We theref\n-001a8c20: 6f72 6520 6164 6420 534f 4150 2048 6561 ore add SOAP Hea\n-001a8c30: 6465 7220 616e 6420 4661 756c 7420 7365 der and Fault se\n-001a8c40: 7269 616c 697a 6572 732c 2077 6869 6368 rializers, which\n-001a8c50: 2061 7265 2063 6f6d 7069 6c65 6420 7365 are compiled se\n-001a8c60: 7061 7261 7465 6c79 2061 7320 666f 6c6c parately as foll\n-001a8c70: 6f77 732e 2046 6972 7374 2c20 6372 6561 ows. First, crea\n-001a8c80: 7465 2061 206e 6577 2068 6561 6465 7220 te a new header \n-001a8c90: 6669 6c65 203c 656d 3e3c 636f 6465 3e65 file e\n-001a8ca0: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h\n-001a8cb0: 2077 6974 6820 7468 6520 534f 4150 2048 with the SOAP H\n-001a8cc0: 6561 6465 7220 3c63 6f64 653e 3c61 2063 eader SOAP_ENV_\n-001a8d30: 5f48 6561 6465 723c 2f61 3e3c 2f63 6f64 _Header and SOAP Faul\n-001a8d50: 7420 3c63 6f64 653e 3c61 2063 6c61 7373 t SOAP_ENV__Fault\n-001a8dc0: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n-001a8dd0: 6374 7572 6573 2c20 696e 636c 7564 696e ctures, includin\n-001a8de0: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g SOAP_EN\n-001a8e50: 565f 5f44 6574 6169 6c3c 2f61 3e3c 2f63 V__Detail if this str\n-001a8e70: 7563 7475 7265 2063 6f6e 7461 696e 7320 ucture contains \n-001a8e80: 6d65 6d62 6572 7320 7468 6174 2061 7265 members that are\n-001a8e90: 2073 6572 6961 6c69 7a65 6420 6173 2066 serialized as f\n-001a8ea0: 6175 6c74 2064 6574 6169 6c73 2e20 596f ault details. Yo\n-001a8eb0: 7520 6361 6e20 6c65 6176 6520 7468 6973 u can leave this\n-001a8ec0: 2068 6561 6465 7220 6669 6c65 2065 6d70 header file emp\n-001a8ed0: 7479 2069 6620 796f 7520 7761 6e74 2074 ty if you want t\n-001a8ee0: 6f20 7573 6520 7468 6520 6465 6661 756c o use the defaul\n-001a8ef0: 7420 534f 4150 2048 6561 6465 7220 616e t SOAP Header an\n-001a8f00: 6420 4661 756c 742e 2048 6f77 6576 6572 d Fault. However\n-001a8f10: 2c20 6966 2053 4f41 5020 4865 6164 6572 , if SOAP Header\n-001a8f20: 7320 6172 6520 7265 7175 6972 6564 2074 s are required t\n-001a8f30: 6865 6e20 796f 7520 6361 6e6e 6f74 206c hen you cannot l\n-001a8f40: 6561 7665 2074 6865 203c 636f 6465 3e3c eave the <\n-001a8f50: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001a8f60: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n-001a8f70: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n-001a8f80: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n-001a8f90: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n-001a8fa0: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n-001a8fb0: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header structure \n-001a8fd0: 656d 7074 792e 2046 6f72 2065 7861 6d70 empty. For examp\n-001a8fe0: 6c65 2c20 7468 6520 5753 2d41 6464 7265 le, the WS-Addre\n-001a8ff0: 7373 696e 6720 616e 6420 5753 2d53 6563 ssing and WS-Sec\n-001a9000: 7572 6974 7920 706c 7567 696e 7320 7265 urity plugins re\n-001a9010: 7175 6972 6520 534f 4150 2048 6561 6465 quire SOAP Heade\n-001a9020: 7273 2077 6869 6368 2063 616e 2062 6520 rs which can be \n-001a9030: 696d 706f 7274 6564 2062 7920 6164 6469 imported by addi\n-001a9040: 6e67 203c 636f 6465 3e23 696d 706f 7274 ng #import\n-001a9050: 2022 7773 6135 2e68 223c 2f63 6f64 653e \"wsa5.h\"\n-001a9060: 2061 6e64 203c 636f 6465 3e23 696d 706f and #impo\n-001a9070: 7274 2022 7773 7365 2e68 223c 2f63 6f64 rt \"wsse.h\", respectively\n-001a9090: 2074 6f20 3c65 6d3e 3c63 6f64 653e 656e to en\n-001a90a0: 762e 683c 2f63 6f64 653e 3c2f 656d 3e2e v.h.\n-001a90b0: 2054 6865 6e20 636f 6d70 696c 6520 7468 Then compile th\n-001a90c0: 6973 2068 6561 6465 7220 6669 6c65 2077 is header file w\n-001a90d0: 6974 683a 203c 2f70 3e3c 7072 6520 636c ith:

     \n-001a90f0: 736f 6170 6370 7032 202d 7065 6e76 2065  soapcpp2 -penv e\n-001a9100: 6e76 2e68 0a3c 2f70 7265 3e3c 703e 2054  nv.h.

    T\n-001a9110: 6865 2067 656e 6572 6174 6564 203c 656d he generated envC.cpp<\n-001a9130: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n-001a9140: 2068 6f6c 6473 2074 6865 2053 4f41 5020 holds the SOAP \n-001a9150: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n-001a9160: 2073 6572 6961 6c69 7a65 7273 2e20 5765 serializers. We\n-001a9170: 2063 616e 2065 6974 6865 7220 6372 6561 can either crea\n-001a9180: 7465 2061 2073 6570 6172 6174 6520 3c65 te a separate envC.dll\n-001a91a0: 3c2f 636f 6465 3e3c 2f65 6d3e 2044 4c4c DLL\n-001a91b0: 2066 6f72 2074 6869 7320 7468 6174 2061 for this that a\n-001a91c0: 6c6c 2063 6c69 656e 7473 2061 6e64 2073 ll clients and s\n-001a91d0: 6572 7669 6365 2061 7070 6c69 6361 7469 ervice applicati\n-001a91e0: 6f6e 7320 7769 6c6c 2075 7365 2c20 6f72 ons will use, or\n-001a91f0: 2063 6f6d 6269 6e65 203c 656d 3e3c 636f combine envC.cpp with the\n-001a9220: 203c 656d 3e3c 636f 6465 3e73 7464 736f stdso\n-001a9230: 6170 322e 646c 6c3c 2f63 6f64 653e 3c2f ap2.dll we create, w\n-001a9250: 6869 6368 2077 6520 7769 6c6c 2065 7870 hich we will exp\n-001a9260: 6c61 696e 2066 7572 7468 6572 2e3c 2f70 lain further..

    The next st\n-001a9280: 6570 2069 7320 746f 2063 7265 6174 6520 ep is to create \n-001a9290: 3c65 6d3e 3c63 6f64 653e 7374 6473 6f61 stdsoa\n-001a92a0: 7032 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 p2.dll which consist\n-001a92c0: 7320 6f66 2074 6865 2066 696c 6520 3c65 s of the file gsoap/st\n-001a92e0: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp and <\n-001a9300: 636f 6465 3e65 6e76 432e 6370 703c 2f63 code>envC.cpp and op\n-001a9320: 7469 6f6e 616c 6c79 2074 6865 2070 6c75 tionally the plu\n-001a9330: 6769 6e73 2079 6f75 2077 616e 7420 746f gins you want to\n-001a9340: 2075 7365 2073 7563 6820 6173 203c 656d use such as wsseapi.c\n-001a9360: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2028 pp (\n-001a9370: 7765 206e 6565 6420 746f 2072 656e 616d we need to renam\n-001a9380: 6520 616c 6c20 3c65 6d3e 3c63 6f64 653e e all \n-001a9390: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .c f\n-001a93a0: 696c 6573 2074 6f20 3c65 6d3e 3c63 6f64 iles to .cpp files to avoi\n-001a93d0: 6420 6973 7375 6573 2077 6974 6820 4d53 d issues with MS\n-001a93e0: 5643 2b2b 292e 2054 6869 7320 444c 4c20 VC++). This DLL \n-001a93f0: 636f 6e74 6169 6e73 2061 6c6c 2063 6f6d contains all com\n-001a9400: 6d6f 6e20 6675 6e63 7469 6f6e 7320 6e65 mon functions ne\n-001a9410: 6564 6564 2066 6f72 2061 6c6c 206f 7468 eded for all oth\n-001a9420: 6572 2063 6c69 656e 7473 2061 6e64 2073 er clients and s\n-001a9430: 6572 7665 7273 2062 6173 6564 206f 6e20 ervers based on \n-001a9440: 6753 4f41 502e 2043 6f6d 7069 6c65 203c gSOAP. Compile <\n-001a9450: 656d 3e3c 636f 6465 3e65 6e76 432e 6370 em>envC.cp\n-001a9460: 703c 2f63 6f64 653e 3c2f 656d 3e20 616e p an\n-001a9470: 6420 3c65 6d3e 3c63 6f64 653e 6773 6f61 d gsoa\n-001a9480: 702f 7374 6473 6f61 7032 2e63 7070 3c2f p/stdsoap2.cpp into \n-001a94a0: 3c65 6d3e 3c63 6f64 653e 7374 6473 6f61 stdsoa\n-001a94b0: 7032 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 p2.dll using the com\n-001a94d0: 7069 6c65 7220 6f70 7469 6f6e 203c 636f piler option /D #WITH_NONAMES\n-001a9500: 5041 4345 533c 2f63 6f64 653e 2061 6e64 PACES and\n-001a9510: 2074 6865 204d 5356 4320 5072 652d 5072 the MSVC Pre-Pr\n-001a9520: 6f63 6573 736f 7220 6465 6669 6e69 7469 ocessor definiti\n-001a9530: 6f6e 7320 3c63 6f64 653e 534f 4150 5f46 ons SOAP_F\n-001a9540: 4d41 4331 3d5f 5f64 6563 6c73 7065 6328 MAC1=__declspec(\n-001a9550: 646c 6c65 7870 6f72 7429 3c2f 636f 6465 dllexport), SOAP_FM\n-001a9570: 4143 333d 5f5f 6465 636c 7370 6563 2864 AC3=__declspec(d\n-001a9580: 6c6c 6578 706f 7274 293c 2f63 6f64 653e llexport)\n-001a9590: 2c20 616e 6420 7468 6520 3c63 6f64 653e , and the \n-001a95a0: 2353 4f41 505f 5354 445f 4558 504f 5254 #SOAP_STD_EXPORT\n-001a95b0: 533c 2f63 6f64 653e 206d 6163 726f 2073 S macro s\n-001a95c0: 6574 2061 7320 7368 6f77 6e20 6265 6c6f et as shown belo\n-001a95d0: 7720 6672 6f6d 2074 6865 204d 5356 4320 w from the MSVC \n-001a95e0: 636f 6d6d 616e 6420 7072 6f6d 7074 3a20 command prompt: \n-001a95f0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

    C:>\n-001a9610: 2063 6c20 2f63 202f 492e 202f 4548 7363   cl /c /I. /EHsc\n-001a9620: 202f 4457 4954 485f 4e4f 4e41 4d45 5350   /DWITH_NONAMESP\n-001a9630: 4143 4553 202f 4453 4f41 505f 464d 4143  ACES /DSOAP_FMAC\n-001a9640: 313d 5f5f 6465 636c 7370 6563 2864 6c6c  1=__declspec(dll\n-001a9650: 6578 706f 7274 2920 2f44 534f 4150 5f46  export) /DSOAP_F\n-001a9660: 4d41 4333 3d5f 5f64 6563 6c73 7065 6328  MAC3=__declspec(\n-001a9670: 646c 6c65 7870 6f72 7429 202f 4453 4f41  dllexport) /DSOA\n-001a9680: 505f 5354 445f 4558 504f 5254 5320 656e  P_STD_EXPORTS en\n-001a9690: 7643 2e63 7070 2073 7464 736f 6170 322e  vC.cpp stdsoap2.\n-001a96a0: 6370 700a 433a 2667 743b 206c 696e 6b20  cpp.C:> link \n-001a96b0: 2f4c 4942 5041 5448 2077 7332 5f33 322e  /LIBPATH ws2_32.\n-001a96c0: 6c69 6220 2f4f 5554 3a6d 7967 736f 6170  lib /OUT:mygsoap\n-001a96d0: 2e64 6c6c 202f 444c 4c20 656e 7643 2e6f  .dll /DLL envC.o\n-001a96e0: 626a 2073 7464 736f 6170 322e 6f62 6a0a  bj stdsoap2.obj.\n-001a96f0: 3c2f 7072 653e 3c70 3e20 4e6f 7465 3a20  

    Note: \n-001a9700: 6173 206f 6620 6753 4f41 5020 322e 382e as of gSOAP 2.8.\n-001a9710: 3330 2061 6e64 206c 6174 6572 2c20 7468 30 and later, th\n-001a9720: 6520 444c 4c20 6578 706f 7274 206d 6163 e DLL export mac\n-001a9730: 726f 7320 7368 6f77 6e20 6865 7265 2061 ros shown here a\n-001a9740: 7265 2061 6c6c 2073 6574 2077 6974 6820 re all set with \n-001a9750: 6f6e 6520 7072 652d 7072 6f63 6573 736f one pre-processo\n-001a9760: 7220 6465 6669 6e69 7469 6f6e 203c 636f r definition #SOAP_STD_EXP\n-001a9780: 4f52 5453 3c2f 636f 6465 3e2e 3c2f 703e ORTS.

    \n-001a9790: 0a3c 703e 416c 7465 726e 6174 6976 656c .

    Alternativel\n-001a97a0: 792c 2079 6f75 2063 616e 2063 6f6d 7069 y, you can compi\n-001a97b0: 6c65 2077 6974 6820 3c63 6f64 653e 2f44 le with /D\n-001a97c0: 3c2f 636f 6465 3e20 3c63 6f64 653e 2357 #W\n-001a97d0: 4954 485f 534f 4150 4445 4653 5f48 3c2f ITH_SOAPDEFS_H and put th\n-001a97f0: 6520 6d61 6372 6f20 6465 6669 6e69 7469 e macro definiti\n-001a9800: 6f6e 7320 696e 203c 656d 3e3c 636f 6465 ons in soapdefs.h. This ex\n-001a9830: 706f 7274 7320 616c 6c20 6675 6e63 7469 ports all functi\n-001a9840: 6f6e 7320 7768 6963 6820 6172 6520 7072 ons which are pr\n-001a9850: 6563 6564 6564 2062 7920 7468 6520 6d61 eceded by the ma\n-001a9860: 6372 6f20 3c63 6f64 653e 2353 4f41 505f cro #SOAP_\n-001a9870: 464d 4143 313c 2f63 6f64 653e 2069 6e20 FMAC1 in \n-001a9880: 7468 6520 3c65 6d3e 3c63 6f64 653e 736f the so\n-001a9890: 6170 6370 7032 2e63 7070 3c2f 636f 6465 apcpp2.cpp source fi\n-001a98b0: 6c65 2061 6e64 206d 6163 726f 203c 636f le and macro #SOAP_FMAC3 in the envC.cpp<\n-001a98f0: 2f63 6f64 653e 3c2f 656d 3e20 736f 7572 /code> sour\n-001a9900: 6365 2066 696c 652e 3c2f 703e 0a3c 703e ce file.

    .

    \n-001a9910: 4669 6e61 6c6c 792c 206e 6f74 6520 7468 Finally, note th\n-001a9920: 6174 2074 6865 2067 534f 4150 2073 6f75 at the gSOAP sou\n-001a9930: 7263 6520 636f 6465 2070 6163 6b61 6765 rce code package\n-001a9940: 2063 6f6e 7461 696e 7320 6120 6c6f 7420 contains a lot \n-001a9950: 6f66 203c 656d 3e3c 636f 6465 3e2e 633c of .c<\n-001a9960: 2f63 6f64 653e 3c2f 656d 3e20 736f 7572 /code> sour\n-001a9970: 6365 2063 6f64 6520 6669 6c65 732e 204d ce code files. M\n-001a9980: 6978 696e 6720 4320 7769 7468 2043 2b2b ixing C with C++\n-001a9990: 2066 696c 6573 2069 7320 6e6f 7420 7265 files is not re\n-001a99a0: 636f 6d6d 656e 6465 6420 7769 7468 2056 commended with V\n-001a99b0: 6973 7561 6c20 5374 7564 696f 2061 6e64 isual Studio and\n-001a99c0: 2077 696c 6c20 6c65 6164 2074 6f20 7275 will lead to ru\n-001a99d0: 6e2d 7469 6d65 2065 7272 6f72 7320 7768 n-time errors wh\n-001a99e0: 656e 2062 7569 6c64 696e 6720 444c 4c73 en building DLLs\n-001a99f0: 2e20 5468 6572 6566 6f72 652c 2061 6c77 . Therefore, alw\n-001a9a00: 6179 7320 7265 6e61 6d65 203c 656d 3e3c ays rename <\n-001a9a10: 636f 6465 3e2e 633c 2f63 6f64 653e 3c2f code>.c source code \n-001a9a30: 6669 6c65 7320 746f 203c 656d 3e3c 636f files to .cpp source code \n-001a9a60: 6669 6c65 7320 7768 656e 2063 7265 6174 files when creat\n-001a9a70: 696e 6720 444c 4c73 2e3c 2f70 3e0a 3c70 ing DLLs.

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

    <\n-001a9ae0: 2f61 3e0a 4372 6561 7469 6e67 2063 6c69 /a>.Creating cli\n-001a9af0: 656e 7420 616e 6420 7365 7276 6572 2044 ent and server D\n-001a9b00: 4c4c 733c 2f68 333e 0a3c 703e 436f 6d70 LLs

    .

    Comp\n-001a9b10: 696c 6520 7468 6520 3c65 6d3e 3c63 6f64 ile the soapClientLib.\n-001a9b30: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n-001a9b40: 616e 6420 3c65 6d3e 3c63 6f64 653e 736f and so\n-001a9b50: 6170 5365 7276 6572 4c69 622e 6370 703c apServerLib.cpp<\n-001a9b60: 2f63 6f64 653e 3c2f 656d 3e20 736f 7572 /code> sour\n-001a9b70: 6365 7320 6173 2044 4c4c 7320 6279 2075 ces as DLLs by u\n-001a9b80: 7369 6e67 2074 6865 204d 5356 4320 5072 sing the MSVC Pr\n-001a9b90: 652d 5072 6f63 6573 736f 7220 6465 6669 e-Processor defi\n-001a9ba0: 6e69 7469 6f6e 7320 3c63 6f64 653e 534f nitions SO\n-001a9bb0: 4150 5f46 4d41 4335 3d5f 5f64 6563 6c73 AP_FMAC5=__decls\n-001a9bc0: 7065 6328 646c 6c65 7870 6f72 7429 3c2f pec(dllexport) and \n-001a9be0: 534f 4150 5f43 4d41 433d 5f5f 6465 636c SOAP_CMAC=__decl\n-001a9bf0: 7370 6563 2864 6c6c 6578 706f 7274 293c spec(dllexport)<\n-001a9c00: 2f63 6f64 653e 2c20 616e 6420 6279 2075 /code>, and by u\n-001a9c10: 7369 6e67 2074 6865 2043 2b2b 2063 6f6d sing the C++ com\n-001a9c20: 7069 6c65 7220 6f70 7469 6f6e 203c 636f piler option /D #WITH_NONAMES\n-001a9c50: 5041 4345 533c 2f63 6f64 653e 2e20 416c PACES. Al\n-001a9c60: 6c20 6f66 2074 6865 7365 206d 6163 726f l of these macro\n-001a9c70: 7320 6172 6520 7365 7420 6173 2061 2073 s are set as a s\n-001a9c80: 686f 7274 6861 6e64 2077 6974 6820 6f6e horthand with on\n-001a9c90: 6520 7072 652d 7072 6f63 6573 736f 7220 e pre-processor \n-001a9ca0: 6465 6669 6e69 7469 6f6e 203c 636f 6465 definition #SOAP_STD_EXPOR\n-001a9cc0: 5453 3c2f 636f 6465 3e20 2872 6571 7569 TS (requi\n-001a9cd0: 7265 7320 6753 4f41 5020 322e 382e 3330 res gSOAP 2.8.30\n-001a9ce0: 206f 7220 6c61 7465 7229 2e3c 2f70 3e0a or later).

    .\n-001a9cf0: 3c70 3e54 6869 7320 444c 4c20 6c69 6e6b

    This DLL link\n-001a9d00: 7320 746f 203c 656d 3e3c 636f 6465 3e73 s to s\n-001a9d10: 7464 736f 6170 322e 646c 6c3c 2f63 6f64 tdsoap2.dll we creat\n-001a9d30: 6564 2069 6e20 5365 6374 696f 6e20 3c61 ed in Section Creating t\n-001a9d70: 6865 2062 6173 6520 7374 6473 6f61 7032 he base stdsoap2\n-001a9d80: 2e64 6c6c 3c2f 613e 2e3c 2f70 3e0a 3c70 .dll.

    .To create multi\n-001a9da0: 706c 6520 444c 4c73 2069 6e20 7468 6520 ple DLLs in the \n-001a9db0: 7361 6d65 2070 726f 6a65 6374 2064 6972 same project dir\n-001a9dc0: 6563 746f 7279 2c20 796f 7520 7368 6f75 ectory, you shou\n-001a9dd0: 6c64 2075 7365 203c 623e 3c63 6f64 653e ld use \n-001a9de0: 736f 6170 6370 7032 202d 7020 6e61 6d65 soapcpp2 -p name\n-001a9df0: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n-001a9e00: 6f6e 203c 623e 3c63 6f64 653e 2d70 206e on -p n\n-001a9e10: 616d 653c 2f63 6f64 653e 3c2f 623e 2074 ame t\n-001a9e20: 6f20 7265 6e61 6d65 2074 6865 2067 656e o rename the gen\n-001a9e30: 6572 6174 6564 203c 656d 3e3c 636f 6465 erated soapClientLib.c\n-001a9e50: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2061 pp a\n-001a9e60: 6e64 203c 656d 3e3c 636f 6465 3e73 6f61 nd soa\n-001a9e70: 7053 6572 7665 724c 6962 2e63 7070 3c2f pServerLib.cpp (and \n-001a9e90: 6173 736f 6369 6174 6564 2920 6669 6c65 associated) file\n-001a9ea0: 732e 2054 6865 203c 623e 3c63 6f64 653e s. The \n-001a9eb0: 2d70 206e 616d 653c 2f63 6f64 653e 3c2f -p name option specif\n-001a9ed0: 6965 7320 6120 3c65 6d3e 3c63 6f64 653e ies a \n-001a9ee0: 6e61 6d65 3c2f 636f 6465 3e3c 2f65 6d3e name\n-001a9ef0: 2070 7265 6669 7820 746f 2072 6570 6c61 prefix to repla\n-001a9f00: 6365 2074 6865 203c 656d 3e3c 636f 6465 ce the soap file name pref\n-001a9f30: 6978 2e20 416e 6f74 6865 7220 7761 7920 ix. Another way \n-001a9f40: 6973 2074 6f20 7573 6520 432b 2b20 6e61 is to use C++ na\n-001a9f50: 6d65 7370 6163 6573 2077 6974 6820 3c62 mespaces with soapcpp2 \n-001a9f70: 2d71 206e 616d 653c 2f63 6f64 653e 3c2f -q name option -q name, if the in\n-001a9fb0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-001a9fc0: 696c 6520 696e 7075 7420 746f 2073 6f61 ile input to soa\n-001a9fd0: 7063 7070 3220 646f 6573 206e 6f74 2061 pcpp2 does not a\n-001a9fe0: 6c72 6561 6479 2064 6563 6c61 7265 2061 lready declare a\n-001a9ff0: 2043 2b2b 206e 616d 6573 7061 6365 2e20 C++ namespace. \n-001aa000: 4120 636c 6561 6e20 7365 7061 7261 7469 A clean separati\n-001aa010: 6f6e 206f 6620 6c69 6272 6172 6965 7320 on of libraries \n-001aa020: 6361 6e20 616c 736f 2062 6520 6163 6869 can also be achi\n-001aa030: 6576 6564 2077 6974 6820 432b 2b20 6e61 eved with C++ na\n-001aa040: 6d65 7370 6163 6573 2c20 7365 6520 5365 mespaces, see Se\n-001aa050: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction How to build\n-001aa090: 2061 2063 6c69 656e 7420 6f72 2073 6572 a client or ser\n-001aa0a0: 7665 7220 696e 2061 2043 2b2b 2063 6f64 ver in a C++ cod\n-001aa0b0: 6520 6e61 6d65 7370 6163 653c 2f61 3e20 e namespace \n-001aa0c0: 2e3c 2f70 3e0a 3c70 3e55 6e6c 6573 7320 .

    .

    Unless \n-001aa0d0: 796f 7520 7573 6520 7468 6520 636c 6965 you use the clie\n-001aa0e0: 6e74 2070 726f 7879 2061 6e64 2073 6572 nt proxy and ser\n-001aa0f0: 7665 7220 6f62 6a65 6374 2063 6c61 7373 ver object class\n-001aa100: 6573 2028 3c65 6d3e 3c63 6f64 653e 736f es (so\n-001aa110: 6170 5859 5a50 726f 7879 2e68 3c2f 636f apXYZProxy.h and soapXYZSe\n-001aa140: 7276 6963 652e 683c 2f63 6f64 653e 3c2f rvice.h), all client\n-001aa160: 2061 6e64 2073 6572 7665 7220 6170 706c and server appl\n-001aa170: 6963 6174 696f 6e73 206d 7573 7420 6578 ications must ex\n-001aa180: 706c 6963 6974 6c79 2073 6574 2074 6865 plicitly set the\n-001aa190: 206e 616d 6573 7061 6365 7320 7661 6c75 namespaces valu\n-001aa1a0: 6520 6f66 2074 6865 203c 636f 6465 3e3c e of the <\n-001aa1b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001aa1c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001aa1d0: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n-001aa1e0: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n-001aa1f0: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n-001aa200: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-001aa210: 7874 2077 6974 683a 3c2f 703e 0a3c 6469 xt with:

    .

    whe\n-001aa370: 7265 2074 6865 203c 636f 6465 3e6e 616d re the nam\n-001aa380: 6573 7061 6365 735b 5d3c 2f63 6f64 653e espaces[]\n-001aa390: 2074 6162 6c65 2073 686f 756c 6420 6265 table should be\n-001aa3a0: 2064 6566 696e 6564 2069 6e20 7468 6520 defined in the \n-001aa3b0: 636c 6965 6e74 2f73 6572 7665 7220 736f client/server so\n-001aa3c0: 7572 6365 2e20 5468 6573 6520 7461 626c urce. These tabl\n-001aa3d0: 6573 2061 7265 2067 656e 6572 6174 6564 es are generated\n-001aa3e0: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the .nsmap<\n-001aa400: 2f65 6d3e 2066 696c 6573 2e20 5468 6520 /em> files. The \n-001aa410: 7461 626c 6573 2061 7265 2072 656e 616d tables are renam\n-001aa420: 6564 2066 6f72 2063 6f6e 7665 6e69 656e ed for convenien\n-001aa430: 6365 2075 7369 6e67 203c 623e 3c63 6f64 ce using soapcpp2 -n option \n-001aa460: 3c62 3e3c 636f 6465 3e2d 6e3c 2f63 6f64 -n, see Sect\n-001aa480: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion soapcpp2 opt\n-001aa4c0: 696f 6e73 3c2f 613e 202e 3c2f 703e 0a3c ions .

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

    .

    .How \n-001aa530: 746f 2062 7569 6c64 206d 6f64 756c 6573 to build modules\n-001aa540: 2061 6e64 206c 6962 7261 7269 6573 2077 and libraries w\n-001aa550: 6974 6820 7468 6520 236d 6f64 756c 6520 ith the #module \n-001aa560: 6469 7265 6374 6976 653c 2f68 323e 0a3c directive

    .<\n-001aa570: 703e 5468 6520 3c63 6f64 653e 236d 6f64 p>The #mod\n-001aa580: 756c 653c 2f63 6f64 653e 2064 6972 6563 ule direc\n-001aa590: 7469 7665 2069 7320 7573 6564 2074 6f20 tive is used to \n-001aa5a0: 6275 696c 6420 6d6f 6475 6c65 7320 7769 build modules wi\n-001aa5b0: 7468 2073 6f61 7063 7070 322e 2041 206c th soapcpp2. A l\n-001aa5c0: 6962 7261 7279 2063 616e 2062 6520 6275 ibrary can be bu\n-001aa5d0: 696c 7420 6672 6f6d 2061 206d 6f64 756c ilt from a modul\n-001aa5e0: 6520 616e 6420 6c69 6e6b 6564 2077 6974 e and linked wit\n-001aa5f0: 6820 6d75 6c74 6970 6c65 2057 6562 2073 h multiple Web s\n-001aa600: 6572 7669 6365 7320 6170 706c 6963 6174 ervices applicat\n-001aa610: 696f 6e73 2e20 5468 6520 6469 7265 6374 ions. The direct\n-001aa620: 6976 6520 7368 6f75 6c64 2061 7070 6561 ive should appea\n-001aa630: 7220 6174 2074 6865 2074 6f70 206f 6620 r at the top of \n-001aa640: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n-001aa650: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n-001aa660: 6170 6370 7032 2061 6e64 2068 6173 2074 apcpp2 and has t\n-001aa670: 6865 2066 6f6c 6c6f 7769 6e67 2066 6f72 he following for\n-001aa680: 6d61 7473 3a3c 2f70 3e0a 3c64 6976 2063 mats:

    .
    \n-001aa6a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #mo\n-001aa6d0: 6475 6c65 2026 7175 6f74 3b6e 616d 6526 dule "name&\n-001aa6e0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .

    an\n-001aa710: 643c 2f70 3e0a 3c64 6976 2063 6c61 7373 d

    .
    #module\n-001aa760: 2026 7175 6f74 3b6e 616d 6526 7175 6f74 "name"\n-001aa770: 3b3c 2f73 7061 6e3e 2026 7175 6f74 3b66 ; "f\n-001aa780: 756c 6c6e 616d 6526 7175 6f74 3b3c 2f64 ullname".

    wh\n-001aa7b0: 6572 6520 7468 6520 3c63 6f64 653e 6e61 ere the na\n-001aa7c0: 6d65 3c2f 636f 6465 3e20 6d75 7374 2062 me must b\n-001aa7d0: 6520 6120 756e 6971 7565 2073 686f 7274 e a unique short\n-001aa7e0: 206e 616d 6520 666f 7220 7468 6520 6d6f name for the mo\n-001aa7f0: 6475 6c65 2e20 5468 6520 6e61 6d65 2069 dule. The name i\n-001aa800: 7320 6361 7365 2069 6e73 656e 7369 7469 s case insensiti\n-001aa810: 7665 2061 6e64 206d 7573 7420 6e6f 7420 ve and must not \n-001aa820: 6578 6365 6564 2034 2063 6861 7261 6374 exceed 4 charact\n-001aa830: 6572 7320 696e 206c 656e 6774 682e 2054 ers in length. T\n-001aa840: 6865 203c 636f 6465 3e66 756c 6c6e 616d he fullnam\n-001aa850: 653c 2f63 6f64 653e 2c20 7768 656e 2070 e, when p\n-001aa860: 7265 7365 6e74 2c20 7265 7072 6573 656e resent, represen\n-001aa870: 7473 2074 6865 2066 756c 6c20 6e61 6d65 ts the full name\n-001aa880: 206f 6620 7468 6520 6d6f 6475 6c65 2061 of the module a\n-001aa890: 6e64 2069 7320 7573 6564 2074 6f20 7072 nd is used to pr\n-001aa8a0: 6566 6978 2074 6865 2066 756e 6374 696f efix the functio\n-001aa8b0: 6e20 6e61 6d65 7320 6f66 2074 6865 2067 n names of the g\n-001aa8c0: 656e 6572 6174 6564 2073 6572 6961 6c69 enerated seriali\n-001aa8d0: 7a65 7273 2072 6570 6c61 6369 6e67 2074 zers replacing t\n-001aa8e0: 6865 2075 7375 616c 203c 636f 6465 3e73 he usual s\n-001aa8f0: 6f61 703c 2f63 6f64 653e 2070 7265 6669 oap prefi\n-001aa900: 782e 2049 6620 6162 7365 6e74 2c20 7468 x. If absent, th\n-001aa910: 6520 7368 6f72 7420 6e61 6d65 2069 7320 e short name is \n-001aa920: 7573 6564 2074 6f20 7072 6566 6978 2074 used to prefix t\n-001aa930: 6865 2066 756e 6374 696f 6e20 6e61 6d65 he function name\n-001aa940: 7320 6f66 2074 6865 2073 6572 6961 6c69 s of the seriali\n-001aa950: 7a65 7273 2e3c 2f70 3e0a 3c70 3e54 6865 zers.

    .

    The\n-001aa960: 2072 6573 7420 6f66 2074 6865 2063 6f6e rest of the con\n-001aa970: 7465 6e74 206f 6620 7468 6520 696e 7465 tent of the inte\n-001aa980: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-001aa990: 6520 696e 636c 7564 6573 2074 7970 6520 e includes type \n-001aa9a0: 6465 636c 6172 6174 696f 6e73 2061 6e64 declarations and\n-001aa9b0: 206f 7074 696f 6e61 6c6c 7920 7468 6520 optionally the \n-001aa9c0: 6465 636c 6172 6174 696f 6e73 206f 6620 declarations of \n-001aa9d0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-001aa9e0: 6e73 2061 6e64 2053 4f41 5020 4865 6164 ns and SOAP Head\n-001aa9f0: 6572 7320 616e 6420 4661 756c 7473 2074 ers and Faults t\n-001aaa00: 6861 7420 6172 6520 756e 6976 6572 7361 hat are universa\n-001aaa10: 6c6c 7920 7573 6564 2062 7920 534f 4150 lly used by SOAP\n-001aaa20: 2073 6572 7669 6365 732c 2077 6865 6e20 services, when \n-001aaa30: 6170 706c 6963 6162 6c65 2e20 5768 656e applicable. When\n-001aaa40: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to\n-001aaa50: 6f6c 2070 726f 6365 7373 6573 2074 6865 ol processes the\n-001aaa60: 2068 6561 6465 7220 6669 6c65 206d 6f64 header file mod\n-001aaa70: 756c 652c 2069 7420 7769 6c6c 2067 656e ule, it will gen\n-001aaa80: 6572 6174 6520 7468 6520 736f 7572 6365 erate the source\n-001aaa90: 2063 6f64 6573 2066 6f72 2061 206c 6962 codes for a lib\n-001aaaa0: 7261 7279 2e20 5468 6520 5765 6220 7365 rary. The Web se\n-001aaab0: 7276 6963 6573 2061 7070 6c69 6361 7469 rvices applicati\n-001aaac0: 6f6e 2074 6861 7420 7573 6573 2074 6865 on that uses the\n-001aaad0: 206c 6962 7261 7279 2073 686f 756c 6420 library should \n-001aaae0: 7573 6520 6120 6865 6164 6572 2066 696c use a header fil\n-001aaaf0: 6520 7468 6174 2069 6d70 6f72 7473 2074 e that imports t\n-001aab00: 6865 206d 6f64 756c 6520 7769 7468 2074 he module with t\n-001aab10: 6865 203c 636f 6465 3e23 696d 706f 7274 he #import\n-001aab20: 3c2f 636f 6465 3e20 6469 7265 6374 6976 directiv\n-001aab30: 652c 2066 6f72 2065 7861 6d70 6c65 3a3c e, for example:<\n-001aab40: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    /* Contents of\n-001aab90: 2066 696c 6520 2671 756f 743b 6d6f 6475 file "modu\n-001aaba0: 6c65 2e68 2671 756f 743b 202a 2f3c 2f73 le.h" */
    .#module\n-001aabf0: 2026 7175 6f74 3b74 6573 7426 7175 6f74 "test"\n-001aac00: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n-001aac10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001aac20: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    // types and ty\n-001aac60: 7065 6465 6673 2062 6563 6f6d 6520 6d6f pedefs become mo\n-001aac70: 6475 6c65 2d73 7065 6369 6669 633c 2f73 dule-specific
    .
    typedef LONG64 x\n-001aad20: 7364 5f5f 6c6f 6e67 3b3c 2f64 6976 3e0a sd__long;
    .\n-001aad30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    char\n-001aad60: 3c2f 7370 616e 3e2a 3b3c 2f64 6976 3e0a *;
    .\n-001aad70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    // a module-sp\n-001aadc0: 6563 6966 6963 2073 7472 7563 743c 2f73 ecific struct
    .
    struct ns__S
    .\n-001aae30: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {

    .
    ..\n-001aae50: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // membe\n-001aae70: 7273 3c2f 7370 616e 3e3c 2f64 6976 3e0a rs
    .\n-001aae80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .and a header fi\n-001ab6c0: 6c65 203c 656d 3e3c 636f 6465 3e65 7861 le exa\n-001ab6d0: 6d70 6c65 2e68 3c2f 636f 6465 3e3c 2f65 mple.h that uses it:\n-001ab6f0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    /* Contents o\n-001ab740: 6620 6669 6c65 2026 7175 6f74 3b65 7861 f file "exa\n-001ab750: 6d70 6c65 2e68 2671 756f 743b 202a 2f3c mple.h" */<\n-001ab760: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001ab780: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001ab790: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor\">#impor\n-001ab7a0: 7420 2671 756f 743b 6d6f 6475 6c65 2e68 t "module.h\n-001ab7b0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    .\n-001ab7f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__webmeth\n-001ab820: 6f64 283c 7370 616e 2063 6c61 7373 3d22 od(const \n-001ab860: 6368 6172 3c2f 7370 616e 3e20 2a63 6f64 char *cod\n-001ab870: 652c 203c 7370 616e 2063 6c61 7373 3d22 e, struct<\n-001ab890: 2f73 7061 6e3e 206e 735f 5f53 202a 7265 /span> ns__S *re\n-001ab8a0: 636f 7264 2c20 3c73 7061 6e20 636c 6173 cord, \n-001ab8c0: 696e 743c 2f73 7061 6e3e 202a 7265 7375 int *resu\n-001ab8d0: 6c74 293b 2020 2020 3c2f 6469 763e 0a3c lt);
    .<\n-001ab8e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The mod\n-001ab900: 756c 6520 6973 2063 6f6d 7069 6c65 6420 ule is compiled \n-001ab910: 6173 2066 6f6c 6c6f 7773 3a20 3c2f 703e as follows:

    \n-001ab920: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    soapcpp2 m\n-001ab940: 6f64 756c 6531 2e68 0a3c 2f70 7265 3e3c  odule1.h.
    <\n-001ab950: 703e 2054 6869 7320 6765 6e65 7261 7465 p> This generate\n-001ab960: 7320 7468 6520 6669 6c65 7320 3c65 6d3e s the files \n-001ab970: 3c63 6f64 653e 7465 7374 5374 7562 2e68 testStub.h\n-001ab980: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , testH.h<\n-001ab9a0: 2f63 6f64 653e 3c2f 656d 3e2c 2061 6e64 /code>
    , and\n-001ab9b0: 203c 656d 3e3c 636f 6465 3e74 6573 7443 testC\n-001ab9c0: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-001ab9d0: 2077 6974 6820 7365 7269 616c 697a 6572 with serializer\n-001ab9e0: 7320 666f 7220 3c63 6f64 653e 7374 7275 s for stru\n-001ab9f0: 6374 206e 735f 5f53 3c2f 636f 6465 3e20 ct ns__S \n-001aba00: 6275 7420 616c 736f 2066 6f72 203c 636f but also for char* \n-001aba20: 616e 6420 3c63 6f64 653e 696e 743c 2f63 and int.

    .

    Run\n-001aba40: 6e69 6e67 2073 6f61 7063 7070 3220 6f6e ning soapcpp2 on\n-001aba50: 203c 656d 3e3c 636f 6465 3e65 7861 6d70 examp\n-001aba60: 6c65 2e68 3c2f 636f 6465 3e3c 2f65 6d3e le.h\n-001aba70: 2069 6d70 6f72 7473 2074 6865 206d 6f64 imports the mod\n-001aba80: 756c 6520 6465 6669 6e69 7469 6f6e 732c ule definitions,\n-001aba90: 2062 7574 2064 6f65 7320 6e6f 7420 6765 but does not ge\n-001abaa0: 6e65 7261 7465 2073 6572 6961 6c69 7a65 nerate serialize\n-001abab0: 7273 2066 6f72 203c 636f 6465 3e73 7472 rs for str\n-001abac0: 7563 7420 6e73 5f5f 533c 2f63 6f64 653e uct ns__S\n-001abad0: 2c20 3c63 6f64 653e 6368 6172 2a3c 2f63 , char* and i\n-001abaf0: 6e74 3c2f 636f 6465 3e20 7369 6e63 6520 nt since \n-001abb00: 7468 6573 6520 6172 6520 6465 6669 6e65 these are define\n-001abb10: 6420 6279 203c 656d 3e3c 636f 6465 3e6d d by m\n-001abb20: 6f64 756c 652e 683c 2f63 6f64 653e 3c2f odule.h:

    s\n-001abb50: 6f61 7063 7070 3220 2d43 4c20 6578 616d  oapcpp2 -CL exam\n-001abb60: 706c 652e 680a 3c2f 7072 653e 3c70 3e20  ple.h.

    \n-001abb70: 416e 2065 7861 6d70 6c65 2063 6c69 656e An example clien\n-001abb80: 7420 6170 706c 6963 6174 696f 6e20 7468 t application th\n-001abb90: 6174 2063 616c 6c73 2074 6865 2063 6c69 at calls the cli\n-001abba0: 656e 7420 7374 7562 2066 756e 6374 696f ent stub functio\n-001abbb0: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n-001abbe0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001abbf0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001abc00: 6465 2026 7175 6f74 3b73 6f61 7048 2e68 de "soapH.h\n-001abc10: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n-001abc60: 6e73 2e6e 736d 6170 2671 756f 743b 3c2f ns.nsmap"
    . <\n-001abc90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai\n-001abcd0: 6e28 293c 2f64 6976 3e0a 3c64 6976 2063 n()
    .
    {.
    st\n-001abd20: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-001abd90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001abda0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001abdb0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001abdc0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001abdd0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001abde0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001abdf0: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
    .
    struct ns__S s;
    \n-001abe40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_defaul\n-001abe60: 745f 6e73 5f5f 5328 3c61 2063 6c61 7373 t_ns__S(s\n-001abe90: 6f61 703c 2f61 3e2c 2026 616d 703b 7329 oap, &s)\n-001abea0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    s.na\n-001abec0: 6d65 203d 203c 6120 636c 6173 733d 2263 me = soap_s\n-001abf20: 7472 6475 703c 2f61 3e28 3c61 2063 6c61 trdup(soap, "nam\n-001abf80: 6526 7175 6f74 3b3c 2f73 7061 6e3e 293b e");\n-001abf90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s.amo\n-001abfb0: 756e 7420 3d20 3132 343b 3c2f 6469 763e unt = 124;
    \n-001abfc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001abff0: 6e74 3c2f 7370 616e 3e20 6e3b 3c2f 6469 nt n;.\n-001ac0e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-001ac150: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-001ac160: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001ac170: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001ac180: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001ac190: 7374 6465 7272 293b 3c2f 6469 763e 0a3c stderr);
    .<\n-001ac1a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ac1b0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els\n-001ac1d0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n-001ac1e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ac1f0: 3e20 2020 2070 7269 6e74 6628 3c73 7061 > printf("OK\n-001ac220: 206e 203d 2025 645c 6e26 7175 6f74 3b3c n = %d\\n"<\n-001ac230: 2f73 7061 6e3e 2c20 6e29 3b3c 2f64 6976 /span>, n);.
    soap_\n-001ac2b0: 6465 7374 726f 793c 2f61 3e28 3c61 2063 destroy(soap);.
    soa\n-001ac360: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap);.\n-001ac450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    vo\n-001acd50: 6964 3c2f 7370 616e 3e2a 2073 6f61 705f id* soap_\n-001acd60: 6c6f 6f6b 7570 5f70 6c75 6769 6e28 3c73 lookup_plugin(struct soap*, const<\n-001acde0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char*);<\n-001ace10: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001ace30: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soap_copy functi\n-001acf00: 6f6e 2072 6574 7572 6e73 2061 206e 6577 on returns a new\n-001acf10: 2064 796e 616d 6963 616c 6c79 2061 6c6c dynamically all\n-001acf20: 6f63 6174 6564 203c 636f 6465 3e3c 6120 ocated soap context\n-001acf90: 2074 6861 7420 6973 2061 2063 6f70 7920 that is a copy \n-001acfa0: 6f66 2061 6e6f 7468 6572 2c20 7375 6368 of another, such\n-001acfb0: 2074 6861 7420 6e6f 2064 6174 6120 6973 that no data is\n-001acfc0: 2073 6861 7265 6420 6265 7477 6565 6e20 shared between \n-001acfd0: 7468 6520 636f 7079 2061 6e64 2074 6865 the copy and the\n-001acfe0: 206f 7269 6769 6e61 6c20 636f 6e74 6578 original contex\n-001acff0: 742e 2054 6865 203c 636f 6465 3e3c 6120 t. The soap_cop\n-001ad0b0: 793c 2f61 3e3c 2f63 6f64 653e 2066 756e y fun\n-001ad0c0: 6374 696f 6e20 696e 766f 6b65 7320 7468 ction invokes th\n-001ad0d0: 6520 636f 7079 2066 756e 6374 696f 6e73 e copy functions\n-001ad0e0: 206f 6620 7468 6520 7265 6769 7374 6572 of the register\n-001ad0f0: 6564 2070 6c75 6769 6e73 2074 6f20 636f ed plugins to co\n-001ad100: 7079 2074 6865 2070 6c75 6769 6e73 2720 py the plugins' \n-001ad110: 6c6f 6361 6c20 6461 7461 2e20 5468 6520 local data. The \n-001ad120: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n-001ad1f0: 6f6e 653c 2f61 3e3c 2f63 6f64 653e 2061 one a\n-001ad200: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap_fr\n-001ad2b0: 6565 3c2f 613e 3c2f 636f 6465 3e20 6675 ee fu\n-001ad2c0: 6e63 7469 6f6e 7320 6465 2d72 6567 6973 nctions de-regis\n-001ad2d0: 7465 7273 2061 6c6c 2070 6c75 6769 6e2e ters all plugin.\n-001ad2e0: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

    .

    The foll\n-001ad2f0: 6f77 2065 7861 6d70 6c65 206f 7665 7272 ow example overr\n-001ad300: 6964 6573 2074 6865 2073 656e 6420 616e ides the send an\n-001ad310: 6420 7265 6365 6976 6520 6361 6c6c 6261 d receive callba\n-001ad320: 636b 7320 746f 2063 6f70 7920 616c 6c20 cks to copy all \n-001ad330: 6d65 7373 6167 6573 2074 6861 7420 6172 messages that ar\n-001ad340: 6520 7365 6e74 2061 6e64 2072 6563 6569 e sent and recei\n-001ad350: 7665 6420 746f 2074 6865 2074 6572 6d69 ved to the termi\n-001ad360: 6e61 6c20 2873 7464 6572 7229 2e3c 2f70 nal (stderr)..

    First, we w\n-001ad380: 7269 7465 2061 2068 6561 6465 7220 6669 rite a header fi\n-001ad390: 6c65 203c 656d 3e3c 636f 6465 3e70 6c75 le plu\n-001ad3a0: 6769 6e2e 683c 2f63 6f64 653e 3c2f 656d gin.h to define the \n-001ad3c0: 6c6f 6361 6c20 706c 7567 696e 2064 6174 local plugin dat\n-001ad3d0: 6120 7374 7275 6374 7572 6528 7329 2061 a structure(s) a\n-001ad3e0: 6e64 2077 6520 6465 6669 6e65 2061 2067 nd we define a g\n-001ad3f0: 6c6f 6261 6c20 6e61 6d65 2074 6f20 6964 lobal name to id\n-001ad400: 656e 7469 6679 2074 6865 2070 6c75 6769 entify the plugi\n-001ad410: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n-001ad440: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001ad450: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001ad460: 6465 2026 7175 6f74 3b3c 6120 636c 6173 de "stdsoap2.h&\n-001ad4a0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #define PLUGIN_\n-001ad4f0: 4944 2026 7175 6f74 3b50 4c55 4749 4e2d ID "PLUGIN-\n-001ad500: 312e 3026 7175 6f74 3b3c 2f73 7061 6e3e 1.0"\n-001ad510: 203c 7370 616e 2063 6c61 7373 3d22 636f // some n\n-001ad530: 616d 6520 746f 2069 6465 6e74 6966 7920 ame to identify \n-001ad540: 706c 7567 696e 203c 2f73 7061 6e3e 3c2f plugin .
    .<\n-001ad570: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ad580: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct plugin_data\n-001ad5b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // local \n-001ad5d0: 706c 7567 696e 2064 6174 6120 3c2f 7370 plugin data
    .
    {.
    int (*fs\n-001ad620: 656e 6429 283c 7370 616e 2063 6c61 7373 end)(struc\n-001ad640: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-001ad670: 736f 6170 3c2f 613e 2a2c 203c 7370 616e soap*, const char*, size_t); <\n-001ad6d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001ad6e0: 656e 7422 3e2f 2f20 746f 2073 6176 6520 ent\">// to save \n-001ad6f0: 616e 6420 7573 6520 7365 6e64 2063 616c and use send cal\n-001ad700: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    size_t (\n-001ad730: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *frecv)(struct \n-001ad7b0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-001ad7e0: 6170 3c2f 613e 2a2c 203c 7370 616e 2063 ap*, char*,\n-001ad810: 2073 697a 655f 7429 3b20 3c73 7061 6e20 size_t); \n-001ad830: 2f2f 2074 6f20 7361 7665 2061 6e64 2075 // to save and u\n-001ad840: 7365 2072 6563 7620 6361 6c6c 6261 636b se recv callback\n-001ad850: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001ad860: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ad870: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
    .
    int plugin(s\n-001ad8d0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001ad940: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ad950: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap_plugin *\n-001ad970: 706c 7567 696e 2c20 3c73 7061 6e20 636c plugin, void *a\n-001ad9a0: 7267 293b 3c2f 6469 763e 0a3c 6469 7620 rg);
    .
    stdsoap2.h\n-001ada10: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    This fi\n-001ada30: 6c65 2064 6566 696e 6573 2074 6865 2063 le defines the c\n-001ada40: 6f6d 6d6f 6e20 6d61 6372 6f73 2c20 7479 ommon macros, ty\n-001ada50: 7065 7320 616e 6420 6675 6e63 7469 6f6e pes and function\n-001ada60: 7320 6f66 2074 6865 2067 534f 4150 2041 s of the gSOAP A\n-001ada70: 5049 2067 726f 7570 6564 2062 7920 6d6f PI grouped by mo\n-001ada80: 6475 6c65 733c 2f64 6976 3e3c 2f64 6976 dules
    .

    Then\n-001adab0: 2c20 7765 2077 7269 7465 2074 6865 2070 , we write the p\n-001adac0: 6c75 6769 6e20 7265 6769 7374 7279 2066 lugin registry f\n-001adad0: 756e 6374 696f 6e20 616e 6420 7468 6520 unction and the \n-001adae0: 6361 6c6c 6261 636b 733a 3c2f 703e 0a3c callbacks:

    .<\n-001adaf0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-001adb00: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #include "\n-001adb40: 3b70 6c75 6769 6e2e 6826 7175 6f74 3b3c ;plugin.h"<\n-001adb50: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-001adb70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001adba0: 7374 6174 6963 3c2f 7370 616e 3e20 3c73 static const\n-001adbd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001adbf0: 2f73 7061 6e3e 2070 6c75 6769 6e5f 6964 /span> plugin_id\n-001adc00: 5b5d 203d 2050 4c55 4749 4e5f 4944 3b20 [] = PLUGIN_ID; \n-001adc10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // the plu\n-001adc30: 6769 6e20 6964 203c 2f73 7061 6e3e 3c2f gin id .
    sta\n-001adc70: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic int \n-001adca0: 706c 7567 696e 5f69 6e69 7428 3c73 7061 plugin_init(struct \n-001adcd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001add00: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001add30: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct plugin_dat\n-001add60: 6120 2a64 6174 6129 3b20 3c2f 6469 763e a *data);
    \n-001add70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    static<\n-001adda0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int plug\n-001addd0: 696e 5f63 6f70 7928 3c73 7061 6e20 636c in_copy(st\n-001addf0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, struct soap_plugin *d\n-001ade90: 7374 2c20 3c73 7061 6e20 636c 6173 733d st, struct\n-001adeb0: 3c2f 7370 616e 3e20 736f 6170 5f70 6c75 soap_plu\n-001adec0: 6769 6e20 2a73 7263 293b 203c 2f64 6976 gin *src); .
    static\n-001adf00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c void pl\n-001adf30: 7567 696e 5f64 656c 6574 6528 3c73 7061 ugin_delete(struct \n-001adf60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001adf90: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001adfc0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi\n-001adff0: 6e20 2a70 293b 203c 2f64 6976 3e0a 3c64 n *p);
    .\n-001ae010: 3c73 7061 6e20 636c 6173 733d 226b 6579 static in\n-001ae050: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_\n-001ae060: 7365 6e64 283c 7370 616e 2063 6c61 7373 send(struc\n-001ae080: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001ae0b0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *bu\n-001ae180: 663c 2f61 3e2c 203c 7370 616e 2063 6c61 f, size_t l\n-001ae1b0: 656e 293b 203c 2f64 6976 3e0a 3c64 6976 en);
    .static size\n-001ae210: 5f74 3c2f 7370 616e 3e20 706c 7567 696e _t plugin\n-001ae220: 5f72 6563 7628 3c73 7061 6e20 636c 6173 _recv(stru\n-001ae240: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, char *buf<\n-001ae320: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, s\n-001ae340: 697a 655f 743c 2f73 7061 6e3e 206c 656e ize_t len\n-001ae350: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    .
    // t\n-001ae3a0: 6865 2072 6567 6973 7472 7920 6675 6e63 he registry func\n-001ae3b0: 7469 6f6e 3a20 3c2f 7370 616e 3e3c 2f64 tion: ..<\n-001ae4f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ae500: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    p-&\n-001ae520: 6774 3b69 6420 3d20 706c 7567 696e 5f69 gt;id = plugin_i\n-001ae530: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
    .
    p-\n-001ae550: 2667 743b 6461 7461 203d 2028 3c73 7061 >data = (void*)malloc(\n-001ae5a0: 7369 7a65 6f66 3c2f 7370 616e 3e28 3c73 sizeof(struct plugin_data));\n-001ae5e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    p-&g\n-001ae600: 743b 6663 6f70 7920 3d20 706c 7567 696e t;fcopy = plugin\n-001ae610: 5f63 6f70 793b 203c 7370 616e 2063 6c61 _copy; /* \n-001ae630: 6f70 7469 6f6e 616c 3a20 7768 656e 2073 optional: when s\n-001ae640: 6574 2074 6865 2070 6c75 6769 6e20 6d75 et the plugin mu\n-001ae650: 7374 2063 6f70 7920 6974 7320 6c6f 6361 st copy its loca\n-001ae660: 6c20 6461 7461 202a 2f3c 2f73 7061 6e3e l data */\n-001ae670: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    p->\n-001ae690: 3b66 6465 6c65 7465 203d 2070 6c75 6769 ;fdelete = plugi\n-001ae6a0: 6e5f 6465 6c65 7465 3b20 3c2f 6469 763e n_delete;
    \n-001ae6b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001ae6e0: 663c 2f73 7061 6e3e 2028 702d 2667 743b f (p->\n-001ae6f0: 6461 7461 2920 3c2f 6469 763e 0a3c 6469 data)
    . \n-001ae710: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n-001ae730: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ae740: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (plugin_init(\n-001ae760: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001ae790: 2028 3c73 7061 6e20 636c 6173 733d 226b (struct plugin_dat\n-001ae7c0: 612a 2970 2d26 6774 3b64 6174 6129 2920 a*)p->data)) \n-001ae7d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    fre\n-001ae810: 6528 702d 2667 743b 6461 7461 293b 203c e(p->data); <\n-001ae820: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001ae830: 656e 7422 3e2f 2f20 6572 726f 723a 2063 ent\">// error: c\n-001ae840: 6f75 6c64 206e 6f74 2069 6e69 7420 3c2f ould not init
    . \n-001ae870: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-001ae890: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-001ae8f0: 534f 4150 5f45 4f4d 3c2f 613e 3b20 3c73 SOAP_EOM; // return er\n-001ae920: 726f 7220 3c2f 7370 616e 3e3c 2f64 6976 ror .
    }
    \n-001ae950: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . \n-001ae980: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001ae9a0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001aea00: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n-001aea10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n-001aea40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-001aea70: 6174 6963 3c2f 7370 616e 3e20 3c73 7061 atic int\n-001aeaa0: 2070 6c75 6769 6e5f 696e 6974 283c 7370 plugin_init(struct\n-001aead0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001aeb00: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, struct<\n-001aeb50: 2f73 7061 6e3e 2070 6c75 6769 6e5f 6461 /span> plugin_da\n-001aeb60: 7461 202a 6461 7461 2920 3c2f 6469 763e ta *data)
    \n-001aeb70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    d\n-001aeba0: 6174 612d 2667 743b 6673 656e 6420 3d20 ata->fsend = \n-001aebb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001aebe0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >fsend\n-001aec40: 3c2f 613e 3b20 3c73 7061 6e20 636c 6173 ; // s\n-001aec60: 6176 6520 6f6c 6420 7265 6376 2063 616c ave old recv cal\n-001aec70: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    data->\n-001aeca0: 3b66 7265 6376 203d 203c 6120 636c 6173 ;frecv = \n-001aecd0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->frecv; <\n-001aed40: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001aed50: 656e 7422 3e2f 2f20 7361 7665 206f 6c64 ent\">// save old\n-001aed60: 2073 656e 6420 6361 6c6c 6261 636b 203c send callback <\n-001aed70: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001aed90: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001aedc0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fsen\n-001aee20: 643c 2f61 3e20 3d20 706c 7567 696e 5f73 d = plugin_s\n-001aee30: 656e 643b 203c 7370 616e 2063 6c61 7373 end; // re\n-001aee50: 706c 6163 6520 7365 6e64 2063 616c 6c62 place send callb\n-001aee60: 6163 6b20 7769 7468 206e 6577 203c 2f73 ack with new
    .
    <\n-001aee90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001aeea0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001aeeb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-001aeec0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;frecv<\n-001aef20: 2f61 3e20 3d20 706c 7567 696e 5f72 6563 /a> = plugin_rec\n-001aef30: 763b 203c 7370 616e 2063 6c61 7373 3d22 v; // repl\n-001aef50: 6163 6520 7265 6376 2063 616c 6c62 6163 ace recv callbac\n-001aef60: 6b20 7769 7468 206e 6577 203c 2f73 7061 k with new
    ..}\n-001af030: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    // cop\n-001af080: 7920 706c 7567 696e 2064 6174 612c 2063 y plugin data, c\n-001af090: 616c 6c65 6420 6279 2073 6f61 705f 636f alled by soap_co\n-001af0a0: 7079 2829 3c2f 7370 616e 3e3c 2f64 6976 py().
    // Thi\n-001af0e0: 7320 6973 2069 6d70 6f72 7461 6e74 3a20 s is important: \n-001af0f0: 7765 206e 6565 6420 6120 6465 6570 2063 we need a deep c\n-001af100: 6f70 7920 746f 2061 766f 6964 2064 6174 opy to avoid dat\n-001af110: 6120 7368 6172 696e 6720 6279 2074 776f a sharing by two\n-001af120: 2063 6f6e 7465 7874 7320 3c2f 7370 616e contexts
    ..
    {.
    \n-001af2e0: 6966 3c2f 7370 616e 3e20 2821 2864 7374 if (!(dst\n-001af2f0: 2d26 6774 3b64 6174 6120 3d20 283c 7370 ->data = (struct\n-001af320: 2070 6c75 6769 6e5f 6461 7461 2a29 6d61 plugin_data*)ma\n-001af330: 6c6c 6f63 283c 7370 616e 2063 6c61 7373 lloc(sizeo\n-001af350: 663c 2f73 7061 6e3e 283c 7370 616e 2063 f(s\n-001af370: 7472 7563 743c 2f73 7061 6e3e 2070 6c75 truct plu\n-001af380: 6769 6e5f 6461 7461 2929 2929 203c 2f64 gin_data)))) ..
    *\n-001af450: 6473 742d 2667 743b 6461 7461 203d 202a dst->data = *\n-001af460: 7372 632d 2667 743b 6461 7461 3b20 3c2f src->data; .
    return\n-001af4b0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n-001af510: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .\n-001af560: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // plugin \n-001af580: 6465 6c65 7469 6f6e 2c20 6361 6c6c 6564 deletion, called\n-001af590: 2062 7920 736f 6170 5f64 6f6e 6528 2920 by soap_done() \n-001af5a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001af5c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 static vo\n-001af600: 6964 3c2f 7370 616e 3e20 706c 7567 696e id plugin\n-001af610: 5f64 656c 6574 6528 3c73 7061 6e20 636c _delete(st\n-001af630: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, struct soap_plugin *p\n-001af6d0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    free(p-&g\n-001af710: 743b 6461 7461 293b 203c 7370 616e 2063 t;data); /\n-001af730: 2f20 6672 6565 2061 6c6c 6f63 6174 6564 / free allocated\n-001af740: 2070 6c75 6769 6e20 6461 7461 203c 2f73 plugin data
    .
    } <\n-001af770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-001af790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // the n\n-001af7c0: 6577 2073 656e 6420 6361 6c6c 6261 636b ew send callback\n-001af7d0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001af7e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001af7f0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static i\n-001af830: 6e74 3c2f 7370 616e 3e20 706c 7567 696e nt plugin\n-001af840: 5f73 656e 6428 3c73 7061 6e20 636c 6173 _send(stru\n-001af860: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, const <\n-001af8f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001af900: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *b\n-001af960: 7566 3c2f 613e 2c20 3c73 7061 6e20 636c uf, size_t \n-001af990: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
    .{<\n-001af9b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001af9e0: 7374 7275 6374 203c 2f73 7061 6e3e 706c struct pl\n-001af9f0: 7567 696e 5f64 6174 6120 2a64 6174 6120 ugin_data *data \n-001afa00: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (struct \n-001afa20: 3c2f 7370 616e 3e70 6c75 6769 6e5f 6461 plugin_da\n-001afa30: 7461 2a29 736f 6170 5f6c 6f6f 6b75 705f ta*)soap_lookup_\n-001afa40: 706c 7567 696e 283c 6120 636c 6173 733d plugin(so\n-001afa70: 6170 3c2f 613e 2c20 706c 7567 696e 5f69 ap, plugin_i\n-001afa80: 6429 3b20 3c73 7061 6e20 636c 6173 733d d); // fet\n-001afaa0: 6368 2070 6c75 6769 6e26 2333 393b 7320 ch plugin's \n-001afab0: 6c6f 6361 6c20 6461 7461 203c 2f73 7061 local data
    .
    fwr\n-001afae0: 6974 6528 6275 662c 206c 656e 2c20 312c ite(buf, len, 1,\n-001afaf0: 2073 7464 6572 7229 3b20 3c73 7061 6e20 stderr); \n-001afb10: 2f2f 2077 7269 7465 206d 6573 7361 6765 // write message\n-001afb20: 2074 6f20 7374 6465 7272 203c 2f73 7061 to stderr
    ..
    } .
    .\n-001afc50: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // the new\n-001afc70: 2072 6563 6569 7665 2063 616c 6c62 6163 receive callbac\n-001afc80: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    .\n-001afc90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    static \n-001afce0: 7369 7a65 5f74 3c2f 7370 616e 3e20 706c size_t pl\n-001afcf0: 7567 696e 5f72 6563 7628 3c73 7061 6e20 ugin_recv(\n-001afd10: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001afd50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001afd60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001afd70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001afd80: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *buf, size_t len)
    .\n-001afde0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct plugin_data *d\n-001afe40: 6174 6120 3d20 283c 7370 616e 2063 6c61 ata = (str\n-001afe60: 7563 7420 3c2f 7370 616e 3e70 6c75 6769 uct plugi\n-001afe70: 6e5f 6461 7461 2a29 736f 6170 5f6c 6f6f n_data*)soap_loo\n-001afe80: 6b75 705f 706c 7567 696e 283c 6120 636c kup_plugin(soap, plug\n-001afec0: 696e 5f69 6429 3b20 3c73 7061 6e20 636c in_id); //\n-001afee0: 2066 6574 6368 2070 6c75 6769 6e26 2333 fetch plugin\n-001afef0: 393b 7320 6c6f 6361 6c20 6461 7461 203c 9;s local data <\n-001aff00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001aff20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n-001aff40: 743c 2f73 7061 6e3e 2072 6573 203d 2064 t res = d\n-001aff50: 6174 612d 2667 743b 6672 6563 7628 3c61 ata->frecv(soap, b\n-001aff90: 7566 2c20 6c65 6e29 3b20 3c73 7061 6e20 uf, len); \n-001affb0: 2f2f 2067 6574 2064 6174 6120 6672 6f6d // get data from\n-001affc0: 206f 6c64 2072 6563 7620 6361 6c6c 6261 old recv callba\n-001affd0: 636b 203c 2f73 7061 6e3e 3c2f 6469 763e ck
    \n-001affe0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fwrite(buf,\n-001b0000: 2072 6573 2c20 312c 2073 7464 6572 7229 res, 1, stderr)\n-001b0010: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    return res;
    \n-001b0060: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    <\n-001b00d0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-001b00e0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">SOAP_E\n-001b0130: 4f4d 3c2f 613e 3c2f 6469 763e 3c64 6976 OM
    \n-001b0150: 2364 6566 696e 6520 534f 4150 5f45 4f4d #define SOAP_EOM\n-001b0160: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    A soap_\n-001b0180: 7374 6174 7573 2065 7272 6f72 2063 6f64 status error cod\n-001b0190: 653a 206f 7574 206f 6620 6d65 6d6f 7279 e: out of memory\n-001b01a0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-001b01c0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-001b01d0: 736f 6170 322e 683a 3233 3731 3c2f 6469 soap2.h:2371
    .
    <\n-001b01f0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001b0200: 3c70 3e49 7420 6973 2074 6865 2072 6573

    It is the res\n-001b0210: 706f 6e73 6962 696c 6974 7920 6f66 2074 ponsibility of t\n-001b0220: 6865 2070 6c75 6769 6e20 746f 2068 616e he plugin to han\n-001b0230: 646c 6520 7265 6769 7374 7279 2028 696e dle registry (in\n-001b0240: 6974 292c 2063 6f70 792c 2061 6e64 2064 it), copy, and d\n-001b0250: 656c 6574 696f 6e20 6f66 2074 6865 2070 eletion of the p\n-001b0260: 6c75 6769 6e20 6461 7461 2061 6e64 2072 lugin data and r\n-001b0270: 6573 6574 2063 616c 6c62 6163 6b73 2e3c eset callbacks.<\n-001b0280: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The fdelete \n-001b02a0: 6361 6c6c 6261 636b 206f 6620 3c63 6f64 callback of struct soap_pl\n-001b02c0: 7567 696e 3c2f 636f 6465 3e20 6d75 7374 ugin must\n-001b02d0: 2062 6520 7365 7420 746f 2064 652d 7265 be set to de-re\n-001b02e0: 6769 7374 6572 2074 6865 2070 6c75 6769 gister the plugi\n-001b02f0: 6e20 616e 6420 6c65 7420 6974 2064 656c n and let it del\n-001b0300: 6574 6520 6974 7320 7265 736f 7572 6365 ete its resource\n-001b0310: 732e 3c2f 703e 0a3c 703e 4120 706c 7567 s.

    .

    A plug\n-001b0320: 696e 2069 7320 636f 7069 6564 2061 6c6f in is copied alo\n-001b0330: 6e67 2077 6974 6820 6974 7320 636f 7272 ng with its corr\n-001b0340: 6573 706f 6e64 696e 6720 3c63 6f64 653e esponding \n-001b0350: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001b03a0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001b03b0: 6578 7420 7769 7468 2074 6865 203c 636f ext with the so\n-001b0470: 6170 5f63 6f70 793c 2f61 3e3c 2f63 6f64 ap_copy call. This fu\n-001b0490: 6e63 7469 6f6e 2063 6f70 6965 7320 6120 nction copies a \n-001b04a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context and th\n-001b0510: 6520 6368 6169 6e20 6f66 2070 6c75 6769 e chain of plugi\n-001b0520: 6e73 2e20 4974 2069 7320 7570 2074 6f20 ns. It is up to \n-001b0530: 7468 6520 706c 7567 696e 2069 6d70 6c65 the plugin imple\n-001b0540: 6d65 6e74 6174 696f 6e20 746f 2073 6861 mentation to sha\n-001b0550: 7265 2074 6865 2070 6c75 6769 6e20 6461 re the plugin da\n-001b0560: 7461 206f 7220 6e6f 7420 6173 2066 6f6c ta or not as fol\n-001b0570: 6c6f 7773 3a3c 2f70 3e0a 3c75 6c3e 0a3c lows:

    .
      .<\n-001b0580: 6c69 3e69 6620 7468 6520 3c63 6f64 653e li>if the \n-001b0590: 6663 6f70 7928 293c 2f63 6f64 653e 2063 fcopy() c\n-001b05a0: 616c 6c62 6163 6b20 6973 2073 6574 2062 allback is set b\n-001b05b0: 7920 7468 6520 706c 7567 696e 2069 6e69 y the plugin ini\n-001b05c0: 7469 616c 697a 6174 696f 6e2c 2074 6869 tialization, thi\n-001b05d0: 7320 6361 6c6c 6261 636b 2077 696c 6c20 s callback will \n-001b05e0: 6265 2063 616c 6c65 6420 746f 2061 6c6c be called to all\n-001b05f0: 6f77 2074 6865 2070 6c75 6769 6e20 746f ow the plugin to\n-001b0600: 2063 6f70 7920 6974 7320 6c6f 6361 6c20 copy its local \n-001b0610: 6461 7461 2075 706f 6e20 6120 3c63 6f64 data upon a soa\n-001b06d0: 705f 636f 7079 3c2f 613e 3c2f 636f 6465 p_copy call. When soap_done\n-001b07c0: 3c2f 613e 3c2f 636f 6465 3e20 6f72 203c or <\n-001b07d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_free is cal\n-001b0890: 6c65 6420 6f6e 2074 6869 7320 3c63 6f64 led on this so\n-001b08f0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n-001b0900: 6e74 6578 7420 636f 7079 2c20 7468 6520 ntext copy, the \n-001b0910: 3c63 6f64 653e 6664 656c 6574 6528 293c fdelete()<\n-001b0920: 2f63 6f64 653e 2063 616c 6c62 6163 6b20 /code> callback \n-001b0930: 6973 2063 616c 6c65 6420 666f 7220 6465 is called for de\n-001b0940: 616c 6c6f 6361 7469 6f6e 2061 6e64 2063 allocation and c\n-001b0950: 6c65 616e 7570 206f 6620 7468 6520 6c6f leanup of the lo\n-001b0960: 6361 6c20 6461 7461 2e3c 2f6c 693e 0a3c cal data..<\n-001b0970: 6c69 3e69 6620 7468 6520 3c63 6f64 653e li>if the \n-001b0980: 6663 6f70 7928 293c 2f63 6f64 653e 2063 fcopy() c\n-001b0990: 616c 6c62 6163 6b20 6973 206e 6f74 2073 allback is not s\n-001b09a0: 6574 2c20 7468 656e 2074 6865 2070 6c75 et, then the plu\n-001b09b0: 6769 6e20 6461 7461 2077 696c 6c20 6265 gin data will be\n-001b09c0: 2073 6861 7265 6420 2869 2e65 2e20 7468 shared (i.e. th\n-001b09d0: 6520 6461 7461 2070 6f69 6e74 6572 2070 e data pointer p\n-001b09e0: 6f69 6e74 7320 746f 2074 6865 2073 616d oints to the sam\n-001b09f0: 6520 6164 6472 6573 7329 2e20 5468 6520 e address). The \n-001b0a00: 3c63 6f64 653e 6664 656c 6574 6528 293c fdelete()<\n-001b0a10: 2f63 6f64 653e 2063 616c 6c62 6163 6b20 /code> callback \n-001b0a20: 7769 6c6c 206e 6f74 2062 6520 6361 6c6c will not be call\n-001b0a30: 6564 2075 706f 6e20 6120 3c63 6f64 653e ed upon a \n-001b0a40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_done on a co\n-001b0b20: 7079 206f 6620 7468 6520 3c63 6f64 653e py of the \n-001b0b30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001b0b80: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001b0b90: 6578 7420 2e20 5468 6520 3c63 6f64 653e ext . The \n-001b0ba0: 6664 656c 6574 6528 293c 2f63 6f64 653e fdelete()\n-001b0bb0: 2063 616c 6c62 6163 6b20 7769 6c6c 2062 callback will b\n-001b0bc0: 6520 6361 6c6c 6564 2066 6f72 2074 6865 e called for the\n-001b0bd0: 206f 7269 6769 6e61 6c20 3c63 6f64 653e original \n-001b0be0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001b0c30: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001b0c40: 6578 7420 7769 7468 2077 6869 6368 2074 ext with which t\n-001b0c50: 6865 2070 6c75 6769 6e20 7761 7320 7265 he plugin was re\n-001b0c60: 6769 7374 6572 6564 2e3c 2f6c 693e 0a3c gistered..<\n-001b0c70: 2f75 6c3e 0a3c 703e 5468 6520 6578 616d /ul>.

      The exam\n-001b0c80: 706c 6520 706c 7567 696e 2073 686f 756c ple plugin shoul\n-001b0c90: 6420 6265 2075 7365 6420 6173 2066 6f6c d be used as fol\n-001b0ca0: 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 2063 lows:

      .
      \n-001b0cc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      struct <\n-001b0cf0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-001b0d20: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001b0d50: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-001b0db0: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .

      T\n-001b0ea0: 6f20 7061 7373 2061 203c 636f 6465 3e76 o pass a v\n-001b0eb0: 6f69 642a 3c2f 636f 6465 3e20 6172 6775 oid* argu\n-001b0ec0: 6d65 6e74 2074 6f20 7468 6520 706c 7567 ment to the plug\n-001b0ed0: 696e 2773 2072 6567 6973 7472 7920 6675 in's registry fu\n-001b0ee0: 6e63 7469 6f6e 2075 7365 3a3c 2f70 3e0a nction use:

      .\n-001b0ef0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      st\n-001b0f30: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-001b0fa0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b0fb0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b0fc0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001b0fd0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001b0fe0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001b0ff0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001b1000: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
      .
      soap_register_p\n-001b1080: 6c75 6769 6e5f 6172 673c 2f61 3e28 3c61 lugin_arg(soap, p\n-001b10c0: 6c75 6769 6e2c 2061 7267 293b 203c 2f64 lugin, arg); .

      Ad\n-001b10f0: 6469 7469 6f6e 616c 2064 6f63 756d 656e ditional documen\n-001b1100: 7461 7469 6f6e 2066 6f72 2074 6865 2067 tation for the g\n-001b1110: 726f 7769 6e67 206e 756d 6265 7220 6f66 rowing number of\n-001b1120: 2067 534f 4150 2070 6c75 6769 6e73 2063 gSOAP plugins c\n-001b1130: 616e 2062 6520 666f 756e 6420 6174 203c an be found at <\n-001b1140: 6120 6872 6566 3d22 6874 7470 733a 2f2f a href=\"https://\n-001b1150: 7777 772e 6765 6e69 7669 612e 636f 6d2f www.genivia.com/\n-001b1160: 646f 6322 3e68 7474 7073 3a2f 2f77 7777 doc\">https://www\n-001b1170: 2e67 656e 6976 6961 2e63 6f6d 2f64 6f63 .genivia.com/doc\n-001b1180: 3c2f 613e 2e20 4120 6e75 6d62 6572 206f . A number o\n-001b1190: 6620 6578 616d 706c 6520 706c 7567 696e f example plugin\n-001b11a0: 7320 6172 6520 696e 636c 7564 6564 2069 s are included i\n-001b11b0: 6e20 7468 6520 6753 4f41 5020 736f 7572 n the gSOAP sour\n-001b11c0: 6365 2063 6f64 6520 7061 636b 6167 6527 ce code package'\n-001b11d0: 7320 3c65 6d3e 3c63 6f64 653e 6773 6f61 s gsoa\n-001b11e0: 702f 706c 7567 696e 3c2f 636f 6465 3e3c p/plugin<\n-001b11f0: 2f65 6d3e 2064 6972 6563 746f 7279 2e20 /em> directory. \n-001b1200: 536f 6d65 206f 6620 7468 6573 6520 706c Some of these pl\n-001b1210: 7567 696e 7320 6172 6520 6469 7363 7573 ugins are discus\n-001b1220: 7365 6420 696e 2074 6865 206e 6578 7420 sed in the next \n-001b1230: 7365 6374 696f 6e73 2e3c 2f70 3e0a 3c70 sections.

      .See also API do\n-001b1250: 6375 6d65 6e74 6174 696f 6e20 4d6f 6475 cumentation Modu\n-001b1260: 6c65 203c 6120 636c 6173 733d 2265 6c22 le Plugins and pl\n-001b12a0: 7567 696e 2072 6567 6973 7472 7920 6675 ugin registry fu\n-001b12b0: 6e63 7469 6f6e 733c 2f61 3e20 2e3c 2f70 nctions ..

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

      .

      .DOM \n-001b1320: 4150 4920 6f76 6572 7669 6577 3c2f 6833 API overview.

      The DOM API\n-001b1340: 2069 7320 6e6f 7420 6120 706c 7567 696e is not a plugin\n-001b1350: 2c20 6275 7420 616e 2065 7874 656e 7369 , but an extensi\n-001b1360: 6f6e 2074 6861 7420 7072 6f76 6964 6573 on that provides\n-001b1370: 2061 2044 4f4d 2041 5049 2061 7320 6120 a DOM API as a \n-001b1380: 7365 7061 7261 7465 2073 6f75 7263 6520 separate source \n-001b1390: 636f 6465 2066 696c 6520 746f 2063 6f6d code file to com\n-001b13a0: 7069 6c65 2061 6e64 206c 696e 6b20 7769 pile and link wi\n-001b13b0: 7468 2067 534f 4150 2061 7070 6c69 6361 th gSOAP applica\n-001b13c0: 7469 6f6e 7320 746f 2065 6e61 626c 6564 tions to enabled\n-001b13d0: 2074 6865 2067 534f 4150 2044 4f4d 2e20 the gSOAP DOM. \n-001b13e0: 584d 4c20 444f 4d20 7072 6f63 6573 7369 XML DOM processi\n-001b13f0: 6e67 2069 7320 6f70 7469 6f6e 616c 2c20 ng is optional, \n-001b1400: 616e 6420 656e 6162 6c65 6420 7769 7468 and enabled with\n-001b1410: 203c 6120 6872 6566 3d22 2377 7364 6c32 ws\n-001b1430: 646c 3268 202d 643c 2f63 6f64 653e 3c2f dl2h -d option -d\n-001b1460: 3c2f 613e 2074 6f20 6765 6e65 7261 7465 to generate\n-001b1470: 2044 4f4d 2073 7472 7563 7475 7265 7320 DOM structures \n-001b1480: 666f 7220 3c65 6d3e 3c63 6f64 653e 7873 for xs\n-001b1490: 643a 616e 7954 7970 653c 2f63 6f64 653e d:anyType\n-001b14a0: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , xsd:any<\n-001b14c0: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and xsd:anyAttri\n-001b14e0: 6275 7465 3c2f 636f 6465 3e3c 2f65 6d3e bute\n-001b14f0: 2073 6368 656d 6120 636f 6d70 6f6e 656e schema componen\n-001b1500: 7473 2c20 7768 6963 6820 6172 6520 656e ts, which are en\n-001b1510: 6162 6c65 6420 7769 7468 203c 636f 6465 abled with #import \"dom.h\"\n-001b1530: 3c2f 636f 6465 3e20 696e 2061 6e20 696e in an in\n-001b1540: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-001b1550: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n-001b1560: 2e20 5468 6973 2069 6d70 6f72 7473 203c . This imports <\n-001b1570: 656d 3e3c 636f 6465 3e67 736f 6170 2f69 em>gsoap/i\n-001b1580: 6d70 6f72 742f 646f 6d2e 683c 2f63 6f64 mport/dom.h. Then co\n-001b15a0: 6d70 696c 6520 3c65 6d3e 3c63 6f64 653e mpile \n-001b15b0: 6773 6f61 702f 646f 6d2e 633c 2f63 6f64 gsoap/dom.c for C or\n-001b15d0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-001b15e0: 2f64 6f6d 2e63 7070 3c2f 636f 6465 3e3c /dom.cpp<\n-001b15f0: 2f65 6d3e 2066 6f72 2043 2b2b 2077 6974 /em> for C++ wit\n-001b1600: 6820 796f 7572 2061 7070 6c69 6361 7469 h your applicati\n-001b1610: 6f6e 2e3c 2f70 3e0a 3c70 3e54 6f20 7573 on.

      .

      To us\n-001b1620: 6520 7468 6520 444f 4d20 4150 4920 7769 e the DOM API wi\n-001b1630: 7468 2057 6562 2073 6572 7669 6365 732c th Web services,\n-001b1640: 2061 6464 203c 636f 6465 3e23 696d 706f add #impo\n-001b1650: 7274 2022 646f 6d2e 6822 3c2f 636f 6465 rt \"dom.h\" to the interfa\n-001b1670: 6365 2068 6561 6465 7220 6669 6c65 206f ce header file o\n-001b1680: 7220 7573 6520 3c61 2068 7265 663d 2223 r use wsdl2h -d option <\n-001b16c0: 623e 3c63 6f64 653e 2d64 3c2f 636f 6465 b>-d:

      .<\n-001b16e0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-001b16f0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      #import "\n-001b1730: 646f 6d2e 6826 7175 6f74 3b3c 2f73 7061 dom.h"
      .

      <\n-001b1750: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001b1760: 3c70 3e54 6869 7320 6465 636c 6172 6573

      This declares\n-001b1770: 203c 636f 6465 3e78 7364 5f5f 616e 7954 xsd__anyT\n-001b1780: 7970 653c 2f63 6f64 653e 2061 6e64 203c ype and <\n-001b1790: 636f 6465 3e78 7364 5f5f 616e 7941 7474 code>xsd__anyAtt\n-001b17a0: 7269 6275 7465 3c2f 636f 6465 3e20 7479 ribute ty\n-001b17b0: 7065 732e 3c2f 703e 0a3c 703e 4120 444f pes.

      .

      A DO\n-001b17c0: 4d20 656c 656d 656e 7420 6e6f 6465 2069 M element node i\n-001b17d0: 7320 7365 7269 616c 697a 6564 2077 6974 s serialized wit\n-001b17e0: 6820 7468 6520 3c63 6f64 653e 7873 645f h the xsd_\n-001b17f0: 5f61 6e79 5479 7065 3c2f 636f 6465 3e20 _anyType \n-001b1800: 7365 7269 616c 697a 6162 6c65 2074 7970 serializable typ\n-001b1810: 652e 2054 6865 2075 6e64 6572 6c79 696e e. The underlyin\n-001b1820: 6720 696d 706c 656d 656e 7461 7469 6f6e g implementation\n-001b1830: 2074 7970 6520 6f66 203c 636f 6465 3e78 type of x\n-001b1840: 7364 5f5f 616e 7954 7970 653c 2f63 6f64 sd__anyType is soap\n-001b1860: 5f64 6f6d 5f65 6c65 6d65 6e74 3c2f 636f _dom_element. One or more\n-001b1880: 2044 4f4d 2061 7474 7269 6275 7465 206e DOM attribute n\n-001b1890: 6f64 6573 2061 7265 2073 6572 6961 6c69 odes are seriali\n-001b18a0: 7a65 6420 7769 7468 2074 6865 203c 636f zed with the xsd__anyAttri\n-001b18c0: 6275 7465 3c2f 636f 6465 3e20 7365 7269 bute seri\n-001b18d0: 616c 697a 6162 6c65 2074 7970 652e 2054 alizable type. T\n-001b18e0: 6865 2075 6e64 6572 6c79 696e 6720 696d he underlying im\n-001b18f0: 706c 656d 656e 7461 7469 6f6e 2074 7970 plementation typ\n-001b1900: 6520 6f66 203c 636f 6465 3e78 7364 5f5f e of xsd__\n-001b1910: 616e 7941 7474 7269 6275 7465 3c2f 636f anyAttribute is soa\n-001b1930: 705f 646f 6d5f 6174 7472 6962 7574 653c p_dom_attribute<\n-001b1940: 2f63 6f64 653e 2c20 7768 6963 6820 6973 /code>, which is\n-001b1950: 2061 206c 696e 6b65 6420 6c69 7374 2e3c a linked list.<\n-001b1960: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      #import &\n-001b19b0: 7175 6f74 3b64 6f6d 2e68 2671 756f 743b quot;dom.h"\n-001b19c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c //\n-001b19e0: 2069 6d70 6f72 7473 2078 7364 5f5f 616e imports xsd__an\n-001b19f0: 7954 7970 6520 6173 2061 2044 4f4d 206e yType as a DOM n\n-001b1a00: 6f64 653c 2f73 7061 6e3e 3c2f 6469 763e ode
      \n-001b1a10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      class \n-001b1a60: 6e73 5f5f 6461 7461 203a 203c 7370 616e ns__data : public x\n-001b1a90: 7364 5f5f 616e 7954 7970 653c 2f64 6976 sd__anyType.
      { publ\n-001b1ad0: 6963 3c2f 7370 616e 3e3a 3c2f 6469 763e ic:
      \n-001b1ae0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      xsd__anyT\n-001b1b00: 7970 652a 2066 6f6f 3b20 2020 2020 2020 ype* foo; \n-001b1b10: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001b1b30: 2f20 5374 6f72 6520 266c 743b 666f 6f26 / Store <foo&\n-001b1b40: 6774 3b20 656c 656d 656e 7420 696e 2044 gt; element in D\n-001b1b50: 4f4d 2073 6f61 705f 646f 6d5f 656c 656d OM soap_dom_elem\n-001b1b60: 656e 743c 2f73 7061 6e3e 3c2f 6469 763e ent
      \n-001b1b70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      xsd__anyT\n-001b1b90: 7970 6520 5f5f 616e 793b 2020 2020 2020 ype __any; \n-001b1ba0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001b1bc0: 2f20 5374 6f72 6520 616e 7920 656c 656d / Store any elem\n-001b1bd0: 656e 7420 636f 6e74 656e 7420 696e 2044 ent content in D\n-001b1be0: 4f4d 2073 6f61 705f 646f 6d5f 656c 656d OM soap_dom_elem\n-001b1bf0: 656e 743c 2f73 7061 6e3e 3c2f 6469 763e ent
      \n-001b1c00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      @ xsd__anyA\n-001b1c20: 7474 7269 6275 7465 205f 5f61 6e79 4174 ttribute __anyAt\n-001b1c30: 7472 6962 7574 653b 203c 7370 616e 2063 tribute; /\n-001b1c50: 2f20 5374 6f72 6520 616e 7941 7474 7269 / Store anyAttri\n-001b1c60: 6275 7465 2063 6f6e 7465 6e74 2069 6e20 bute content in \n-001b1c70: 444f 4d20 736f 6170 5f64 6f6d 5f61 7474 DOM soap_dom_att\n-001b1c80: 7269 6275 7465 206c 696e 6b65 6420 6e6f ribute linked no\n-001b1c90: 6465 2073 7472 7563 7475 7265 3c2f 7370 de structure
      .
      };.

      T\n-001b1ce0: 6f20 6d61 6e69 7075 6c61 7465 2074 6865 o manipulate the\n-001b1cf0: 2044 4f4d 2065 6c65 6d65 6e74 7320 616e DOM elements an\n-001b1d00: 6420 6174 7472 6962 7574 6573 2077 6520 d attributes we \n-001b1d10: 7573 6520 7468 6520 444f 4d20 4150 4920 use the DOM API \n-001b1d20: 6675 6e63 7469 6f6e 7320 646f 6375 6d65 functions docume\n-001b1d30: 6e74 6564 2069 6e20 7468 6520 6753 4f41 nted in the gSOA\n-001b1d40: 5020 3c61 2068 7265 663d 222e 2e2f 2e2e P XML DOM AP\n-001b1d70: 4920 646f 6375 6d65 6e74 6174 696f 6e3c I documentation<\n-001b1d80: 2f61 3e2e 3c2f 703e 0a3c 703e f09f 949d /a>.

      .

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

      .<\n-001b1dc0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.The\n-001b1df0: 206d 6573 7361 6765 206c 6f67 6769 6e67 message logging\n-001b1e00: 2070 6c75 6769 6e3c 2f68 333e 0a3c 703e plugin.

      \n-001b1e10: 5468 6520 6d65 7373 6167 6520 3c63 6f64 The message logging\n-001b1eb0: 3c2f 636f 6465 3e20 706c 7567 696e 2063 plugin c\n-001b1ec0: 616e 2062 6520 7573 6564 2074 6f20 7365 an be used to se\n-001b1ed0: 6c65 6374 6976 656c 7920 6c6f 6720 696e lectively log in\n-001b1ee0: 626f 756e 6420 616e 6420 6f75 7462 6f75 bound and outbou\n-001b1ef0: 6e64 206d 6573 7361 6765 7320 746f 2061 nd messages to a\n-001b1f00: 2066 696c 6520 6f72 2073 7472 6561 6d2e file or stream.\n-001b1f10: 2049 7420 616c 736f 206b 6565 7073 2061 It also keeps a\n-001b1f20: 6363 6573 7320 7374 6174 6973 7469 6373 ccess statistics\n-001b1f30: 2074 6f20 6c6f 6720 7468 6520 746f 7461 to log the tota\n-001b1f40: 6c20 6e75 6d62 6572 206f 6620 6279 7465 l number of byte\n-001b1f50: 7320 7365 6e74 2061 6e64 2072 6563 6569 s sent and recei\n-001b1f60: 7665 642e 3c2f 703e 0a3c 703e 546f 2075 ved.

      .

      To u\n-001b1f70: 7365 2074 6865 2070 6c75 6769 6e2c 2063 se the plugin, c\n-001b1f80: 6f6d 7069 6c65 2061 6e64 206c 696e 6b20 ompile and link \n-001b1f90: 796f 7572 2061 7070 6c69 6361 7469 6f6e your application\n-001b1fa0: 2077 6974 6820 3c65 6d3e 3c63 6f64 653e with \n-001b1fb0: 6c6f 6767 696e 672e 633c 2f63 6f64 653e logging.c\n-001b1fc0: 3c2f 656d 3e20 6c6f 6361 7465 6420 696e located in\n-001b1fd0: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n-001b1fe0: 736f 6170 2f70 6c75 6769 6e3c 2f63 6f64 soap/plugin director\n-001b2000: 7920 6f66 2074 6865 2067 534f 4150 2070 y of the gSOAP p\n-001b2010: 6163 6b61 6765 2e20 546f 2065 6e61 626c ackage. To enabl\n-001b2020: 6520 7468 6520 706c 7567 696e 2069 6e20 e the plugin in \n-001b2030: 796f 7572 2063 6f64 652c 2072 6567 6973 your code, regis\n-001b2040: 7465 7220 7468 6520 706c 7567 696e 2061 ter the plugin a\n-001b2050: 6e64 2073 6574 2074 6865 2073 7472 6561 nd set the strea\n-001b2060: 6d73 2061 7320 666f 6c6c 6f77 733a 3c2f ms as follows:.

      #include &\n-001b20c0: 7175 6f74 3b6c 6f67 6769 6e67 2e68 2671 quot;logging.h&q\n-001b20d0: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; .
      .<\n-001b2110: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b2120: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-001b2190: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-001b21f0: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
      \n-001b2200: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      siz\n-001b2230: 655f 743c 2f73 7061 6e3e 2062 7974 6573 e_t bytes\n-001b2240: 5f69 6e3b 203c 2f64 6976 3e0a 3c64 6976 _in;
      .size_t bytes_out;\n-001b2290: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      if (<\n-001b22d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b22e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b22f0: 705f 5f70 6c75 6769 6e2e 6874 6d6c 2367 p__plugin.html#g\n-001b2300: 6164 3634 3565 3561 3538 6564 3434 3266 ad645e5a58ed442f\n-001b2310: 6534 3735 3364 6363 3233 3338 6338 6264 e4753dcc2338c8bd\n-001b2320: 6222 3e73 6f61 705f 7265 6769 7374 6572 b\">soap_register\n-001b2330: 5f70 6c75 6769 6e3c 2f61 3e28 3c61 2063 _plugin(soap, \n-001b23c0: 6c6f 6767 696e 673c 2f61 3e29 2920 3c2f logging)) .
      ... // failed to \n-001b2410: 7265 6769 7374 6572 203c 2f73 7061 6e3e register \n-001b2420: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      ... //.
      soap_set\n-001b24d0: 5f6c 6f67 6769 6e67 5f69 6e62 6f75 6e64 _logging_inbound\n-001b24e0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001b2510: 3c2f 613e 2c20 7374 646f 7574 293b 203c , stdout); <\n-001b2520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
      ... \n-001b2600: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // process\n-001b2620: 206d 6573 7361 6765 733c 2f73 7061 6e3e messages\n-001b2630: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      soap\n-001b26a0: 5f73 6574 5f6c 6f67 6769 6e67 5f69 6e62 _set_logging_inb\n-001b26b0: 6f75 6e64 3c2f 613e 283c 6120 636c 6173 ound(\n-001b26e0: 736f 6170 3c2f 613e 2c20 4e55 4c4c 293b soap, NULL);\n-001b26f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // disabl\n-001b2710: 6520 6c6f 6767 696e 6720 3c2f 7370 616e e logging
      .
      soa\n-001b2790: 705f 7365 745f 6c6f 6767 696e 675f 6f75 p_set_logging_ou\n-001b27a0: 7462 6f75 6e64 3c2f 613e 283c 6120 636c tbound(soap, NULL\n-001b27e0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // disa\n-001b2800: 626c 6520 6c6f 6767 696e 6720 3c2f 7370 ble logging
      .
      s\n-001b2880: 6f61 705f 6c6f 6767 696e 675f 7374 6174 oap_logging_stat\n-001b2890: 733c 2f61 3e28 3c61 2063 6c61 7373 3d22 s(soa\n-001b28c0: 703c 2f61 3e2c 2026 616d 703b 6279 7465 p, &byte\n-001b28d0: 735f 6f75 742c 2026 616d 703b 6279 7465 s_out, &byte\n-001b28e0: 735f 696e 293b 3c2f 6469 763e 0a3c 6469 s_in);
      ..\n-001b2900: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
      .
      so\n-001b2990: 6170 5f72 6573 6574 5f6c 6f67 6769 6e67 ap_reset_logging\n-001b29a0: 5f73 7461 7473 3c2f 613e 283c 6120 636c _stats(soap);.
      \n-001b2a90: 736f 6170 5f73 6574 5f6c 6f67 6769 6e67 soap_set_logging\n-001b2aa0: 5f6f 7574 626f 756e 643c 2f61 3e3c 2f64 _outbound
      void soap\n-001b2ad0: 5f73 6574 5f6c 6f67 6769 6e67 5f6f 7574 _set_logging_out\n-001b2ae0: 626f 756e 6428 7374 7275 6374 2073 6f61 bound(struct soa\n-001b2af0: 7020 2a73 6f61 702c 2046 494c 4520 2a66 p *soap, FILE *f\n-001b2b00: 6429 3c2f 6469 763e 3c64 6976 2063 6c61 d)
      Speci\n-001b2b20: 6679 206f 7574 626f 756e 6420 6d65 7373 fy outbound mess\n-001b2b30: 6167 6520 6c6f 6767 696e 6720 7769 7468 age logging with\n-001b2b40: 2074 6865 206c 6f67 6769 6e67 2070 6c75 the logging plu\n-001b2b50: 6769 6e2e 3c2f 6469 763e 3c2f 6469 763e gin.
      \n-001b2b60: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
      \n-001b2c30: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      void soap_re\n-001b2c50: 7365 745f 6c6f 6767 696e 675f 7374 6174 set_logging_stat\n-001b2c60: 7328 7374 7275 6374 2073 6f61 7020 2a73 s(struct soap *s\n-001b2c70: 6f61 7029 3c2f 6469 763e 3c64 6976 2063 oap)
      Res\n-001b2c90: 6574 206d 6573 7361 6769 6e67 2073 7461 et messaging sta\n-001b2ca0: 7469 7374 6963 7320 7769 7468 2074 6865 tistics with the\n-001b2cb0: 206c 6f67 6769 6e67 2070 6c75 6769 6e2e logging plugin.\n-001b2cc0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
      .\n-001b2d20: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
      soap_l\n-001b2d80: 6f67 6769 6e67 5f73 7461 7473 3c2f 613e ogging_stats\n-001b2d90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      void s\n-001b2db0: 6f61 705f 6c6f 6767 696e 675f 7374 6174 oap_logging_stat\n-001b2dc0: 7328 7374 7275 6374 2073 6f61 7020 2a73 s(struct soap *s\n-001b2dd0: 6f61 702c 2073 697a 655f 7420 2a73 656e oap, size_t *sen\n-001b2de0: 742c 2073 697a 655f 7420 2a72 6563 7629 t, size_t *recv)\n-001b2df0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      Collect\n-001b2e10: 206d 6573 7361 6769 6e67 2073 7461 7469 messaging stati\n-001b2e20: 7374 6963 7320 7769 7468 2074 6865 206c stics with the l\n-001b2e30: 6f67 6769 6e67 2070 6c75 6769 6e2e 3c2f ogging plugin.
      .
      vo\n-001b2f30: 6964 2073 6f61 705f 7365 745f 6c6f 6767 id soap_set_logg\n-001b2f40: 696e 675f 696e 626f 756e 6428 7374 7275 ing_inbound(stru\n-001b2f50: 6374 2073 6f61 7020 2a73 6f61 702c 2046 ct soap *soap, F\n-001b2f60: 494c 4520 2a66 6429 3c2f 6469 763e 3c64 ILE *fd)
      Specify inbound\n-001b2f90: 206d 6573 7361 6765 206c 6f67 6769 6e67 message logging\n-001b2fa0: 2077 6974 6820 7468 6520 6c6f 6767 696e with the loggin\n-001b2fb0: 6720 706c 7567 696e 2e3c 2f64 6976 3e3c g plugin.
      <\n-001b2fc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      logging
      int logg\n-001b30a0: 696e 6728 7374 7275 6374 2073 6f61 7020 ing(struct soap \n-001b30b0: 2a2c 2073 7472 7563 7420 736f 6170 5f70 *, struct soap_p\n-001b30c0: 6c75 6769 6e20 2a2c 2076 6f69 6420 2a29 lugin *, void *)\n-001b30d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      The log\n-001b30f0: 6769 6e67 2070 6c75 6769 6e20 7265 6769 ging plugin regi\n-001b3100: 7374 7261 7469 6f6e 2066 756e 6374 696f stration functio\n-001b3110: 6e2e 3c2f 6469 763e 3c2f 6469 763e 0a3c n.
      .<\n-001b3120: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      If you \n-001b3140: 7573 6520 3c63 6f64 653e 3c61 2063 6c61 use soap_copy to cop\n-001b3210: 7920 7468 6520 3c63 6f64 653e 3c61 2063 y the soap\n-001b3270: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n-001b3280: 7769 7468 2074 6865 2070 6c75 6769 6e2c with the plugin,\n-001b3290: 2074 6865 2070 6c75 6769 6e27 7320 7374 the plugin's st\n-001b32a0: 6174 6520 7769 6c6c 2062 6520 7368 6172 ate will be shar\n-001b32b0: 6564 2062 7920 7468 6520 636f 7079 2e20 ed by the copy. \n-001b32c0: 5468 6520 706c 7567 696e 2069 7320 7468 The plugin is th\n-001b32d0: 7265 6164 2d73 6166 652c 2062 7574 2064 read-safe, but d\n-001b32e0: 6f65 7320 6e6f 7420 7573 6520 6120 6c6f oes not use a lo\n-001b32f0: 636b 2074 6f20 7072 6f74 6563 7420 7468 ck to protect th\n-001b3300: 6520 696e 7465 726e 616c 2073 7461 7469 e internal stati\n-001b3310: 7374 6963 7320 636f 756e 7465 7273 2074 stics counters t\n-001b3320: 6f20 656e 7375 7265 2074 6865 2073 7065 o ensure the spe\n-001b3330: 6564 206f 6620 6d65 7373 6167 696e 6720 ed of messaging \n-001b3340: 6973 206e 6f74 2063 6f6d 7072 6f6d 6973 is not compromis\n-001b3350: 6564 2c20 6d65 616e 696e 6720 7468 6174 ed, meaning that\n-001b3360: 2079 6f75 2073 686f 756c 6420 6e6f 7420 you should not \n-001b3370: 6675 6c6c 7920 7265 6c79 206f 6e20 7468 fully rely on th\n-001b3380: 6520 7374 6174 6973 7469 6373 2074 6f20 e statistics to \n-001b3390: 6265 2031 3030 2520 6163 6375 7261 7465 be 100% accurate\n-001b33a0: 2066 6f72 206d 756c 7469 2d74 6872 6561 for multi-threa\n-001b33b0: 6465 6420 7365 7276 6963 6573 2e3c 2f70 ded services..

      See also logging.

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

      .

      .RESTful se\n-001b34e0: 7276 6572 2d73 6964 6520 4150 4920 7769 rver-side API wi\n-001b34f0: 7468 2074 6865 2048 5454 5020 4745 5420 th the HTTP GET \n-001b3500: 706c 7567 696e 3c2f 6833 3e0a 3c70 3e53 plugin

      .

      S\n-001b3510: 6572 7665 722d 7369 6465 2075 7365 206f erver-side use o\n-001b3520: 6620 5245 5354 6675 6c20 4854 5450 2047 f RESTful HTTP G\n-001b3530: 4554 206f 7065 7261 7469 6f6e 7320 6973 ET operations is\n-001b3540: 2073 7570 706f 7274 6564 2077 6974 6820 supported with \n-001b3550: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the http_\n-001b35e0: 6765 743c 2f61 3e3c 2f63 6f64 653e 2048 get H\n-001b35f0: 5454 5020 4745 5420 706c 7567 696e 203c TTP GET plugin <\n-001b3600: 656d 3e3c 636f 6465 3e67 736f 6170 2f70 em>gsoap/p\n-001b3610: 6c75 6769 6e2f 6874 7470 6765 742e 633c lugin/httpget.c<\n-001b3620: 2f63 6f64 653e 3c2f 656d 3e2e 3c2f 703e /code>.

      \n-001b3630: 0a3c 703e 5468 6520 4854 5450 2047 4554 .

      The HTTP GET\n-001b3640: 2070 6c75 6769 6e20 616c 6c6f 7773 2079 plugin allows y\n-001b3650: 6f75 7220 7365 7276 6572 2074 6f20 6861 our server to ha\n-001b3660: 6e64 6c65 2052 4553 5466 756c 2048 5454 ndle RESTful HTT\n-001b3670: 5020 4745 5420 7265 7175 6573 7473 2061 P GET requests a\n-001b3680: 6e64 2061 7420 7468 6520 7361 6d65 2074 nd at the same t\n-001b3690: 696d 6520 7374 696c 6c20 7365 7276 6520 ime still serve \n-001b36a0: 534f 4150 2d62 6173 6564 2050 4f53 5420 SOAP-based POST \n-001b36b0: 7265 7175 6573 7473 2e20 5468 6520 706c requests. The pl\n-001b36c0: 7567 696e 2070 726f 7669 6465 7320 7375 ugin provides su\n-001b36d0: 7070 6f72 7420 746f 2063 6c69 656e 7420 pport to client \n-001b36e0: 6170 706c 6963 6174 696f 6e73 2074 6f20 applications to \n-001b36f0: 6973 7375 6520 4854 5450 2047 4554 206f issue HTTP GET o\n-001b3700: 7065 7261 7469 6f6e 7320 746f 2061 2073 perations to a s\n-001b3710: 6572 7665 722e 3c2f 703e 0a3c 703e 4e6f erver.

      .

      No\n-001b3720: 7465 2074 6861 7420 4854 5450 2047 4554 te that HTTP GET\n-001b3730: 2072 6571 7565 7374 7320 6361 6e20 616c requests can al\n-001b3740: 736f 2062 6520 6861 6e64 6c65 6420 6174 so be handled at\n-001b3750: 2074 6865 2073 6572 7665 7220 7369 6465 the server side\n-001b3760: 2077 6974 6820 7468 6520 3c63 6f64 653e with the \n-001b3770: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fget\n-001b3840: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n-001b3850: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Function \n-001b3890: 6361 6c6c 6261 636b 7320 666f 7220 6375 callbacks for cu\n-001b38a0: 7374 6f6d 697a 6564 2049 2f4f 2061 6e64 stomized I/O and\n-001b38b0: 2048 5454 5020 6861 6e64 6c69 6e67 3c2f HTTP handling . However, th\n-001b38d0: 6520 4854 5450 2047 4554 2070 6c75 6769 e HTTP GET plugi\n-001b38e0: 6e20 616c 736f 206b 6565 7073 2073 7461 n also keeps sta\n-001b38f0: 7469 7374 6963 7320 6f6e 2074 6865 206e tistics on the n\n-001b3900: 756d 6265 7220 6f66 2073 7563 6365 7373 umber of success\n-001b3910: 6675 6c20 504f 5354 2061 6e64 2047 4554 ful POST and GET\n-001b3920: 2065 7863 6861 6e67 6573 2061 6e64 2066 exchanges and f\n-001b3930: 6169 6c65 6420 6f70 6572 6174 696f 6e73 ailed operations\n-001b3940: 2028 4854 5450 2066 6175 6c74 732c 2053 (HTTP faults, S\n-001b3950: 4f41 5020 4661 756c 7473 2c20 6574 632e OAP Faults, etc.\n-001b3960: 292e 2049 7420 616c 736f 206b 6565 7073 ). It also keeps\n-001b3970: 2068 6974 2068 6973 746f 6772 616d 7320 hit histograms \n-001b3980: 6163 6375 6d75 6c61 7465 6420 666f 7220 accumulated for \n-001b3990: 7570 2074 6f20 6120 7965 6172 206f 6620 up to a year of \n-001b39a0: 7275 6e6e 696e 6720 7469 6d65 2e3c 2f70 running time..

      To use the \n-001b39c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_get<\n-001b3a50: 2f61 3e3c 2f63 6f64 653e 2070 6c75 6769 /a> plugi\n-001b3a60: 6e2c 2063 6f6d 7069 6c65 2061 6e64 206c n, compile and l\n-001b3a70: 696e 6b20 796f 7572 2061 7070 6c69 6361 ink your applica\n-001b3a80: 7469 6f6e 2077 6974 6820 3c65 6d3e 3c63 tion with httpget.c locate\n-001b3ab0: 6420 696e 2074 6865 203c 656d 3e3c 636f d in the gsoap/plugin<\n-001b3ad0: 2f63 6f64 653e 3c2f 656d 3e20 6469 7265 /code> dire\n-001b3ae0: 6374 6f72 7920 6f66 2074 6865 2067 534f ctory of the gSO\n-001b3af0: 4150 2070 6163 6b61 6765 2e20 546f 2065 AP package. To e\n-001b3b00: 6e61 626c 6520 7468 6520 706c 7567 696e nable the plugin\n-001b3b10: 2069 6e20 796f 7572 2063 6f64 652c 2072 in your code, r\n-001b3b20: 6567 6973 7465 7220 7468 6520 706c 7567 egister the plug\n-001b3b30: 696e 2077 6974 6820 796f 7572 2048 5454 in with your HTT\n-001b3b40: 5020 4745 5420 6861 6e64 6c65 7220 6675 P GET handler fu\n-001b3b50: 6e63 7469 6f6e 2061 7320 666f 6c6c 6f77 nction as follow\n-001b3b60: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

      .
      <\n-001b3b90: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001b3ba0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001b3bb0: 6465 2026 7175 6f74 3b68 7474 7067 6574 de "httpget\n-001b3bc0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n-001b3bd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      .\n-001b3bf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      int<\n-001b3c20: 2f73 7061 6e3e 206d 6169 6e28 293c 2f64 /span> main().
      {
      .\n-001b3c60: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-001b3c80: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>
      soa\n-001b3cb0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001b3ce0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-001b3d40: 6170 5f6e 6577 3c2f 613e 2829 3b3c 2f64 ap_new();.
      if (soap_register_p\n-001b3df0: 6c75 6769 6e5f 6172 673c 2f61 3e28 3c61 lugin_arg(soap, <\n-001b3e30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b3e40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b3e50: 705f 5f69 6f2e 6874 6d6c 2367 6130 6563 p__io.html#ga0ec\n-001b3e60: 6463 3433 6135 3365 3439 3465 6463 3466 dc43a53e494edc4f\n-001b3e70: 3834 6538 6331 3335 3635 3962 6122 3e68 84e8c135659ba\">h\n-001b3e80: 7474 705f 6765 743c 2f61 3e2c 2028 3c73 ttp_get, (void*)my_http_get\n-001b3ec0: 5f68 616e 646c 6572 2929 203c 2f64 6976 _handler)) .
      soap_\n-001b3f40: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-001b3f50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001b3f80: 2073 7464 6572 7229 3b20 3c73 7061 6e20 stderr); \n-001b3fa0: 2f2f 2066 6169 6c65 6420 746f 2072 6567 // failed to reg\n-001b3fb0: 6973 7465 7220 3c2f 7370 616e 3e3c 2f64 ister .
      ... //.
      stru\n-001b4030: 6374 203c 2f73 7061 6e3e 6874 7470 5f67 ct http_g\n-001b4040: 6574 5f64 6174 6120 2a68 7474 7067 6574 et_data *httpget\n-001b4050: 6461 7461 3b20 3c2f 6469 763e 0a3c 6469 data;
      . \n-001b4070: 2068 7474 7067 6574 6461 7461 203d 2028 httpgetdata = (\n-001b4080: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct http_get_dat\n-001b40b0: 612a 2973 6f61 705f 6c6f 6f6b 7570 5f70 a*)soap_lookup_p\n-001b40c0: 6c75 6769 6e28 3c61 2063 6c61 7373 3d22 lugin(soa\n-001b40f0: 703c 2f61 3e2c 2068 7474 705f 6765 745f p, http_get_\n-001b4100: 6964 293b 203c 2f64 6976 3e0a 3c64 6976 id);
      . \n-001b4120: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!httpgetdat\n-001b4150: 6129 203c 2f64 6976 3e0a 3c64 6976 2063 a)
      .
      \n-001b4170: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // if \n-001b4190: 7468 6520 706c 7567 696e 2072 6567 6973 the plugin regis\n-001b41a0: 7465 7265 6420 4f4b 2c20 7468 6572 6520 tered OK, there \n-001b41b0: 6973 2063 6572 7461 696e 6c79 2064 6174 is certainly dat\n-001b41c0: 6120 6275 7420 6361 6e26 2333 393b 7420 a but can't \n-001b41d0: 6875 7274 2074 6f20 6368 6563 6b20 3c2f hurt to check
      . \n-001b4200: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // pro\n-001b4220: 6365 7373 206d 6573 7361 6765 733c 2f73 cess messages
      .
      <\n-001b4250: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b4260: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n-001b4270: 2f73 7061 6e3e 2067 6574 5f6f 6b20 3d20 /span> get_ok = \n-001b4280: 6874 7470 6765 7464 6174 612d 2667 743b httpgetdata->\n-001b4290: 7374 6174 5f67 6574 3b20 3c2f 6469 763e stat_get;
      \n-001b42a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      s\n-001b42d0: 697a 655f 743c 2f73 7061 6e3e 2070 6f73 ize_t pos\n-001b42e0: 745f 6f6b 203d 2068 7474 7067 6574 6461 t_ok = httpgetda\n-001b42f0: 7461 2d26 6774 3b73 7461 745f 706f 7374 ta->stat_post\n-001b4300: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      size_t errors = ht\n-001b4350: 7470 6765 7464 6174 612d 2667 743b 7374 tpgetdata->st\n-001b4360: 6174 5f66 6169 6c3b 203c 2f64 6976 3e0a at_fail;
      .\n-001b4370: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      time_t now =\n-001b4390: 2074 696d 6528 4e55 4c4c 293b 203c 2f64 time(NULL); .
      st\n-001b43d0: 7275 6374 203c 2f73 7061 6e3e 746d 202a ruct tm *\n-001b43e0: 543b 203c 2f64 6976 3e0a 3c64 6976 2063 T;
      .
      T \n-001b4400: 3d20 6c6f 6361 6c74 696d 6528 2661 6d70 = localtime(&\n-001b4410: 3b6e 6f77 293b 203c 2f64 6976 3e0a 3c64 ;now);
      .\n-001b4430: 2020 3c73 7061 6e20 636c 6173 733d 226b size\n-001b4450: 5f74 3c2f 7370 616e 3e20 6869 7473 7468 _t hitsth\n-001b4460: 6973 6d69 6e75 7465 203d 2068 7474 7067 isminute = httpg\n-001b4470: 6574 6461 7461 2d26 6774 3b68 6973 745f etdata->hist_\n-001b4480: 6d69 6e5b 542d 2667 743b 746d 5f6d 696e min[T->tm_min\n-001b4490: 5d3b 203c 2f64 6976 3e0a 3c64 6976 2063 ];
      .
      size_t hitsthisho\n-001b44e0: 7572 203d 2068 7474 7067 6574 6461 7461 ur = httpgetdata\n-001b44f0: 2d26 6774 3b68 6973 745f 686f 7572 5b54 ->hist_hour[T\n-001b4500: 2d26 6774 3b74 6d5f 686f 7572 5d3b 203c ->tm_hour]; <\n-001b4510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      size_t hitstoday = ht\n-001b4560: 7470 6765 7464 6174 612d 2667 743b 6869 tpgetdata->hi\n-001b4570: 7374 5f64 6179 5b54 2d26 6774 3b74 6d5f st_day[T->tm_\n-001b4580: 7964 6179 5d3b 3c2f 6469 763e 0a3c 6469 yday];
      .}\n-001b45a0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      An HTTP GET han\n-001b45d0: 646c 6572 2063 616e 2073 696d 706c 7920 dler can simply \n-001b45e0: 7072 6f64 7563 6520 736f 6d65 2048 544d produce some HTM\n-001b45f0: 4c20 636f 6e74 656e 742c 206f 7220 616e L content, or an\n-001b4600: 7920 6f74 6865 7220 7479 7065 206f 6620 y other type of \n-001b4610: 636f 6e74 656e 7420 6279 2073 656e 6469 content by sendi\n-001b4620: 6e67 2064 6174 6120 7573 696e 6720 3c63 ng data using soap_r\n-001b46e0: 6573 706f 6e73 653c 2f61 3e3c 2f63 6f64 esponse:

      .
      \n-001b4720: 3c73 7061 6e20 636c 6173 733d 226b 6579 int my_http_get\n-001b4750: 5f68 616e 646c 6572 283c 7370 616e 2063 _handler(s\n-001b4770: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap) <\n-001b47e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {
      .\n-001b4800: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap<\n-001b4840: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->http_content = \n-001b48c0: 2671 756f 743b 7465 7874 2f68 746d 6c26 "text/html&\n-001b48d0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
      if (so\n-001b4970: 6170 5f72 6573 706f 6e73 653c 2f61 3e28 ap_response(\n-001b4980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001b49b0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_FILE)<\n-001b4a10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      || so\n-001b4a80: 6170 5f73 656e 643c 2f61 3e28 3c61 2063 ap_send(soap, "&\n-001b4ae0: 6c74 3b68 746d 6c26 6774 3b48 656c 6c6f lt;html>Hello\n-001b4af0: 266c 743b 2f68 746d 6c26 6774 3b26 7175 </html>&qu\n-001b4b00: 6f74 3b3c 2f73 7061 6e3e 293c 2f64 6976 ot;).
      || soap_e\n-001b4b80: 6e64 5f73 656e 643c 2f61 3e28 3c61 2063 nd_send(soap).. \n-001b4cb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001b4cd0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-001b4d30: 5f4f 4b3c 2f61 3e3b 203c 7370 616e 2063 _OK; /\n-001b4d50: 2f20 7265 7475 726e 2053 4f41 505f 4f4b / return SOAP_OK\n-001b4d60: 206f 7220 4854 5450 2065 7272 6f72 2063 or HTTP error c\n-001b4d70: 6f64 652c 2065 2e67 2e20 3430 3420 3c2f ode, e.g. 404
      .}<\n-001b4da0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n-001b4dc0: 4966 2079 6f75 2075 7365 203c 636f 6465 If you use soap\n-001b4e80: 5f63 6f70 793c 2f61 3e3c 2f63 6f64 653e _copy\n-001b4e90: 2074 6f20 636f 7079 2074 6865 203c 636f to copy the s\n-001b4ef0: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n-001b4f00: 6f6e 7465 7874 2077 6974 6820 7468 6520 ontext with the \n-001b4f10: 706c 7567 696e 2c20 7468 6520 706c 7567 plugin, the plug\n-001b4f20: 696e 2773 2064 6174 6120 7769 6c6c 2062 in's data will b\n-001b4f30: 6520 7368 6172 6564 2062 7920 7468 6520 e shared by the \n-001b4f40: 636f 7079 2e20 5468 6572 6566 6f72 652c copy. Therefore,\n-001b4f50: 2074 6865 2073 7461 7469 7374 6963 7320 the statistics \n-001b4f60: 6172 6520 6e6f 7420 3130 3025 2067 7561 are not 100% gua\n-001b4f70: 7261 6e74 6565 6420 746f 2062 6520 6163 ranteed to be ac\n-001b4f80: 6375 7261 7465 2066 6f72 206d 756c 7469 curate for multi\n-001b4f90: 2d74 6872 6561 6465 6420 7365 7276 6963 -threaded servic\n-001b4fa0: 6573 2073 696e 6365 2072 6163 6520 636f es since race co\n-001b4fb0: 6e64 6974 696f 6e73 206f 6e20 7468 6520 nditions on the \n-001b4fc0: 636f 756e 7465 7273 206d 6179 206f 6363 counters may occ\n-001b4fd0: 7572 2e20 4d75 7465 7820 6973 206e 6f74 ur. Mutex is not\n-001b4fe0: 2075 7365 6420 746f 2075 7064 6174 6520 used to update \n-001b4ff0: 7468 6520 636f 756e 7465 7273 2074 6f20 the counters to \n-001b5000: 6176 6f69 6420 696e 7472 6f64 7563 696e avoid introducin\n-001b5010: 6720 6578 7065 6e73 6976 6520 7379 6e63 g expensive sync\n-001b5020: 6872 6f6e 697a 6174 696f 6e20 706f 696e hronization poin\n-001b5030: 7473 2e20 4966 2031 3030 2520 7365 7276 ts. If 100% serv\n-001b5040: 6572 2d73 6964 6520 6163 6375 7261 6379 er-side accuracy\n-001b5050: 2069 7320 7265 7175 6972 6564 2c20 6164 is required, ad\n-001b5060: 6420 6d75 7465 7820 6174 2074 6865 2070 d mutex at the p\n-001b5070: 6f69 6e74 7320 696e 6469 6361 7465 6420 oints indicated \n-001b5080: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the httpget.c code.

      \n-001b50b0: 0a3c 703e 5468 6520 636c 6965 6e74 2d73 .

      The client-s\n-001b50c0: 6964 6520 7573 6520 6f66 2048 5454 5020 ide use of HTTP \n-001b50d0: 4745 5420 6973 2070 726f 7669 6465 6420 GET is provided \n-001b50e0: 6279 2074 6865 203c 636f 6465 3e3c 6120 by the soap_GET operation. \n-001b5180: 546f 2072 6563 6569 7665 2061 2053 4f41 To receive a SOA\n-001b5190: 502f 584d 4c20 2872 6573 706f 6e73 6529 P/XML (response)\n-001b51a0: 206d 6573 7361 6765 203c 656d 3e3c 636f message ns:methodResp\n-001b51c0: 6f6e 7365 3c2f 636f 6465 3e3c 2f65 6d3e onse\n-001b51d0: 2c20 7573 653a 3c2f 703e 0a3c 6469 7620 , use:

      .
      int\n-001b5220: 3c2f 7370 616e 3e20 6d61 696e 2829 3c2f main().
      {
      .<\n-001b5250: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b5260: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n-001b5280: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-001b52b0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-001b52e0: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n-001b5340: 6f61 705f 6e65 773c 2f61 3e28 293b 3c2f oap_new();.
      if (so\n-001b53e0: 6170 5f47 4554 3c2f 613e 283c 6120 636c ap_GET(soap, endpoint, NULL))
      \n-001b5480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      ... // error\n-001b54c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      else\n-001b5500: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_recv_\n-001b5530: 6e73 5f5f 7765 626d 6574 686f 6452 6573 ns__webmethodRes\n-001b5540: 706f 6e73 6528 3c61 2063 6c61 7373 3d22 ponse(soa\n-001b5570: 703c 2f61 3e2c 202e 2e2e 2929 203c 2f64 p, ...)) .
      ... // error
      .
      else
      ..
      To receive any \n-001b59e0: 4854 5450 2042 6f64 7920 6461 7461 2069 HTTP Body data i\n-001b59f0: 6e74 6f20 6120 6275 6666 6572 2c20 7573 nto a buffer, us\n-001b5a00: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

      .
      <\n-001b5a30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b5a40: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
      \n-001b5a60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      {
      .
      \n-001b5b80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      c\n-001b5bb0: 6861 723c 2f73 7061 6e3e 202a 7265 7370 har *resp\n-001b5bc0: 6f6e 7365 203d 204e 554c 4c3b 203c 2f64 onse = NULL; .
      size_t \n-001b5c10: 7265 7370 6f6e 7365 5f6c 656e 3b3c 2f64 response_len;.
      if (soa\n-001b5cb0: 705f 4745 543c 2f61 3e28 3c61 2063 6c61 p_GET(soap, endpoint\n-001b5d40: 2c20 4e55 4c4c 293c 2f64 6976 3e0a 3c64 , NULL)
      .\n-001b5d60: 2020 207c 7c20 2872 6573 706f 6e73 6520 || (response \n-001b5d70: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_http_get_\n-001b5dd0: 626f 6479 3c2f 613e 283c 6120 636c 6173 body(\n-001b5e00: 736f 6170 3c2f 613e 2c20 2661 6d70 3b72 soap, &r\n-001b5e10: 6573 706f 6e73 655f 6c65 6e29 2920 3d3d esponse_len)) ==\n-001b5e20: 204e 554c 4c3c 2f64 6976 3e0a 3c64 6976 NULL
      . \n-001b5e40: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_end_rec\n-001b5ea0: 763c 2f61 3e28 2661 6d70 3b3c 6120 636c v(&soap)).
      ... // error
      .
      else
      .
      .\n-001b5f80: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // use \n-001b5fa0: 7468 6520 7265 7370 6f6e 7365 2073 7472 the response str\n-001b5fb0: 696e 6720 284e 554c 4c20 696e 6469 6361 ing (NULL indica\n-001b5fc0: 7465 7320 6e6f 2062 6f64 7920 6f72 2065 tes no body or e\n-001b5fd0: 7272 6f72 293c 2f73 7061 6e3e 3c2f 6469 rror).
      soap\n-001b6050: 5f64 6573 7472 6f79 3c2f 613e 2826 616d _destroy(&am\n-001b6060: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
      ..<\n-001b6150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b6160: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_don\n-001b61c0: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap);.
      }
      .soap_end_rec\n-001b62d0: 763c 2f61 3e3c 2f64 6976 3e3c 6469 7620 v
      i\n-001b62f0: 6e74 2073 6f61 705f 656e 645f 7265 6376 nt soap_end_recv\n-001b6300: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-001b6310: 6170 293c 2f64 6976 3e3c 6469 7620 636c ap)
      Fina\n-001b6330: 6c69 7a65 2074 6865 2063 6f6e 7465 7874 lize the context\n-001b6340: 2061 6674 6572 2072 6563 6569 7669 6e67 after receiving\n-001b6350: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
      .soap_http_g\n-001b6410: 6574 5f62 6f64 793c 2f61 3e3c 2f64 6976 et_body
      char * soap\n-001b6440: 5f68 7474 705f 6765 745f 626f 6479 2873 _http_get_body(s\n-001b6450: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001b6460: 2c20 7369 7a65 5f74 202a 6c65 6e29 3c2f , size_t *len)
      Get the H\n-001b6490: 5454 5020 626f 6479 206d 6573 7361 6765 TTP body message\n-001b64a0: 2061 7320 6120 7374 7269 6e67 2e3c 2f64 as a string.
      .
      \n-001b64c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

      N\n-001b6da0: 6f74 6520 7468 6174 203c 636f 6465 3e2a ote that *\n-001b6db0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and - can b\n-001b6dd0: 6520 7573 6564 2061 7320 7769 6c64 6361 e used as wildca\n-001b6de0: 7264 7320 746f 206d 6174 6368 2061 6e79 rds to match any\n-001b6df0: 2074 6578 7420 616e 6420 616e 7920 6368 text and any ch\n-001b6e00: 6172 6163 7465 722c 2072 6573 7065 6374 aracter, respect\n-001b6e10: 6976 656c 792e 204d 6564 6961 2074 7970 ively. Media typ\n-001b6e20: 6573 206d 6179 2068 6176 6520 6f70 7469 es may have opti\n-001b6e30: 6f6e 616c 2070 6172 616d 6574 6572 7320 onal parameters \n-001b6e40: 6166 7465 7220 3c63 6f64 653e 3b3c 2f63 after ; such as charset and boun\n-001b6e80: 6461 7279 3c2f 636f 6465 3e2e 2054 6865 dary. The\n-001b6e90: 7365 2070 6172 616d 6574 6572 7320 6361 se parameters ca\n-001b6ea0: 6e20 6265 206d 6174 6368 6564 2062 7920 n be matched by \n-001b6eb0: 7468 6520 6d65 6469 6120 7479 7065 2070 the media type p\n-001b6ec0: 6174 7465 726e 7320 696e 2074 6865 2074 atterns in the t\n-001b6ed0: 6162 6c65 2e20 5061 7474 6572 6e73 2074 able. Patterns t\n-001b6ee0: 6861 7420 6172 6520 6d6f 7265 2073 7065 hat are more spe\n-001b6ef0: 6369 6669 6320 6d75 7374 2070 7265 6365 cific must prece\n-001b6f00: 6465 2070 6174 7465 726e 7320 7468 6174 de patterns that\n-001b6f10: 2061 7265 206c 6573 7320 7370 6563 6966 are less specif\n-001b6f20: 6963 2069 6e20 7468 6520 7461 626c 652e ic in the table.\n-001b6f30: 2046 6f72 2065 7861 6d70 6c65 2c20 3c63 For example, \"text/xml;*c\n-001b6f50: 6861 7273 6574 3d75 7466 2d38 2a22 3c2f harset=utf-8*\" must prece\n-001b6f70: 6465 203c 636f 6465 3e22 7465 7874 2f78 de \"text/x\n-001b6f80: 6d6c 223c 2f63 6f64 653e 2077 6869 6368 ml\" which\n-001b6f90: 206d 7573 7420 7072 6563 6564 6520 3c63 must precede \"text/*\". Note that <\n-001b6fc0: 636f 6465 3e22 7465 7874 2f78 6d6c 223c code>\"text/xml\"<\n-001b6fd0: 2f63 6f64 653e 2061 6c73 6f20 6d61 7463 /code> also matc\n-001b6fe0: 6865 7320 616e 7920 7061 7261 6d65 7465 hes any paramete\n-001b6ff0: 7273 206f 6620 7468 6520 6d65 6469 6120 rs of the media \n-001b7000: 7479 7065 206f 6620 7468 6520 6d65 7373 type of the mess\n-001b7010: 6167 6520 7265 7665 6976 6564 2c20 7375 age reveived, su\n-001b7020: 6368 2061 7320 3c63 6f64 653e 2274 6578 ch as \"tex\n-001b7030: 742f 786d 6c3b 2063 6861 7273 6574 3d75 t/xml; charset=u\n-001b7040: 7466 2d38 223c 2f63 6f64 653e 2028 6f6e tf-8\" (on\n-001b7050: 6c79 2073 696e 6365 2067 534f 4150 2076 ly since gSOAP v\n-001b7060: 6572 7369 6f6e 2032 2e38 2e37 3529 2e3c ersion 2.8.75).<\n-001b7070: 2f70 3e0a 3c70 3e54 6865 2068 616e 646c /p>.

      The handl\n-001b7080: 6572 7320 6172 6520 6675 6e63 7469 6f6e ers are function\n-001b7090: 7320 7468 6174 2077 696c 6c20 6265 2069 s that will be i\n-001b70a0: 6e76 6f6b 6564 2077 6865 6e20 6120 504f nvoked when a PO\n-001b70b0: 5354 6564 2072 6571 7565 7374 206d 6573 STed request mes\n-001b70c0: 7361 6765 206d 6174 6368 696e 6720 6d65 sage matching me\n-001b70d0: 6469 6120 7479 7065 2069 7320 7365 6e74 dia type is sent\n-001b70e0: 2074 6f20 7468 6520 7365 7276 6572 2e3c to the server.<\n-001b70f0: 2f70 3e0a 3c70 3e41 6e20 6578 616d 706c /p>.

      An exampl\n-001b7100: 6520 696d 6167 6520 6861 6e64 6c65 7220 e image handler \n-001b7110: 7468 6174 2063 6865 636b 7320 7468 6520 that checks the \n-001b7120: 7370 6563 6966 6963 2069 6d61 6765 2074 specific image t\n-001b7130: 7970 653a 3c2f 703e 0a3c 6469 7620 636c ype:

      .
      <\n-001b7150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b7160: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int image_hand\n-001b7190: 6c65 7228 3c73 7061 6e20 636c 6173 733d ler(struct\n-001b71b0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-001b71e0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-001b7210: 736f 6170 3c2f 613e 2920 3c2f 6469 763e soap)
      \n-001b7220: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      {
      .
      <\n-001b7250: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b7260: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001b7290: 3c2f 7370 616e 3e20 2a62 7566 3b20 3c2f *buf; .
      size_t\n-001b72e0: 206c 656e 3b20 3c2f 6469 763e 0a3c 6469 len;
      . \n-001b7300: 203c 7370 616e 2063 6c61 7373 3d22 636f // if nec\n-001b7320: 6573 7361 7279 2c20 6368 6563 6b20 7479 essary, check ty\n-001b7330: 7065 2069 6e20 736f 6170 2d26 6774 3b68 pe in soap->h\n-001b7340: 7474 705f 636f 6e74 656e 7420 3c2f 7370 ttp_content
      .
      if (soap->\n-001b7410: 6874 7470 5f63 6f6e 7465 6e74 3c2f 613e http_content\n-001b7420: 2026 616d 703b 2661 6d70 3b20 213c 6120 && !s\n-001b7480: 6f61 705f 7461 675f 636d 703c 2f61 3e28 oap_tag_cmp(\n-001b7490: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001b74c0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >htt\n-001b7510: 705f 636f 6e74 656e 743c 2f61 3e2c 203c p_content, <\n-001b7520: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001b7530: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-001b7540: 3b69 6d61 6765 2f67 6966 2671 756f 743b ;image/gif"\n-001b7550: 3c2f 7370 616e 3e29 203c 2f64 6976 3e0a )
      .\n-001b7560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      \n-001b7590: 7265 7475 726e 3c2f 7370 616e 3e20 3430 return 40\n-001b75a0: 343b 203c 7370 616e 2063 6c61 7373 3d22 4; // HTTP\n-001b75c0: 2065 7272 6f72 2034 3034 203c 2f73 7061 error 404
      .
      if \n-001b75f0: 2828 6275 6620 3d20 3c61 2063 6c61 7373 ((buf = soap_htt\n-001b7650: 705f 6765 745f 626f 6479 3c2f 613e 283c p_get_body(<\n-001b7660: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b7670: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001b7680: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001b7690: 2661 6d70 3b6c 656e 2929 203d 3d20 4e55 &len)) == NU\n-001b76a0: 4c4c 293c 2f64 6976 3e0a 3c64 6976 2063 LL)
      .
      \n-001b76c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001b76e0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-001b7710: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error; \n-001b7770: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      // ... now proc\n-001b77b0: 6573 7320 696d 6167 6520 696e 2062 7566 ess image in buf\n-001b77c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n-001b77d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b77e0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // repl\n-001b7800: 7920 7769 7468 2065 6d70 7479 2048 5454 y with empty HTT\n-001b7810: 5020 3230 3020 4f4b 2072 6573 706f 6e73 P 200 OK respons\n-001b7820: 653a 203c 2f73 7061 6e3e 3c2f 6469 763e e:
      \n-001b7830: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      r\n-001b7860: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soa\n-001b78c0: 705f 7365 6e64 5f65 6d70 7479 5f72 6573 p_send_empty_res\n-001b78d0: 706f 6e73 653c 2f61 3e28 3c61 2063 6c61 ponse(soap, 200);\n-001b7910: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      }.
      soa\n-001b79e0: 705f 7461 675f 636d 703c 2f61 3e3c 2f64 p_tag_cmp
      int soap_\n-001b7a10: 7461 675f 636d 7028 636f 6e73 7420 6368 tag_cmp(const ch\n-001b7a20: 6172 202a 7374 7269 6e67 2c20 636f 6e73 ar *string, cons\n-001b7a30: 7420 6368 6172 202a 7061 7474 6572 6e29 t char *pattern)\n-001b7a40: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      Compare\n-001b7a60: 2073 7472 696e 6720 746f 2061 2070 6174 string to a pat\n-001b7a70: 7465 726e 2e3c 2f64 6976 3e3c 2f64 6976 tern.
      .

      The \n-001b7aa0: 6162 6f76 6520 6578 616d 706c 6520 7265 above example re\n-001b7ab0: 7475 726e 7320 4854 5450 204f 4b2e 2049 turns HTTP OK. I\n-001b7ac0: 6620 636f 6e74 656e 7420 6973 2073 7570 f content is sup\n-001b7ad0: 706f 7365 6420 746f 2062 6520 7265 7475 posed to be retu\n-001b7ae0: 726e 6564 2c20 7468 656e 2075 7365 3a3c rned, then use:<\n-001b7af0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      struct \n-001b7b40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001b7b70: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001b7ba0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n-001b7c00: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
      .\n-001b7c20: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
      .
      soap->\n-001b7c90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 http_co\n-001b7ce0: 6e74 656e 743c 2f61 3e20 3d20 3c73 7061 ntent = "im\n-001b7d10: 6167 652f 6a70 6567 2671 756f 743b 3c2f age/jpeg"; // \n-001b7d40: 6120 6a70 6567 2069 6d61 6765 2074 6f20 a jpeg image to \n-001b7d50: 7265 7475 726e 2062 6163 6b20 3c2f 7370 return back
      ..\n-001b7ef0: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_send_ra\n-001b7f50: 773c 2f61 3e28 3c61 2063 6c61 7373 3d22 w(soa\n-001b7f80: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, \n-001b7fd0: 6275 663c 2f61 3e2c 206c 656e 2920 3c73 buf, len) // send imag\n-001b8000: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
      .\n-001b8010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n-001b80c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b80d0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-001b80f0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn soap_\n-001b8150: 636c 6f73 6573 6f63 6b3c 2f61 3e28 3c61 closesock(soap);<\n-001b8190: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      return \n-001b81d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n-001b8230: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      For client appl\n-001b8260: 6963 6174 696f 6e73 2074 6f20 7573 6520 ications to use \n-001b8270: 4854 5450 2050 4f53 542c 2075 7365 2074 HTTP POST, use t\n-001b8280: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap\n-001b8300: 5f50 4f53 543c 2f61 3e3c 2f63 6f64 653e _POST\n-001b8310: 206f 7065 7261 7469 6f6e 3a3c 2f70 3e0a operation:

      .\n-001b8320: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      st\n-001b8360: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-001b83d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b83e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b83f0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001b8400: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001b8410: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001b8420: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001b8430: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
      .
      ... \n-001b8450: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n-001b8470: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      char *<\n-001b84b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b84c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001b84d0: 6874 6d6c 2361 6364 6131 3733 3666 6261 html#acda1736fba\n-001b84e0: 6163 3037 3236 3132 3236 6265 6665 3136 ac07261226befe16\n-001b84f0: 3561 3536 3831 223e 6275 663c 2f61 3e3b 5a5681\">buf;\n-001b8500: 203c 7370 616e 2063 6c61 7373 3d22 636f // holds \n-001b8520: 7468 6520 4854 5450 2072 6571 7565 7374 the HTTP request\n-001b8530: 2f72 6573 706f 6e73 6520 626f 6479 2064 /response body d\n-001b8540: 6174 6120 3c2f 7370 616e 3e3c 2f64 6976 ata .
      si\n-001b8580: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e3b ze_t len;\n-001b8590: 203c 7370 616e 2063 6c61 7373 3d22 636f // length\n-001b85b0: 206f 6620 6461 7461 203c 2f73 7061 6e3e of data \n-001b85c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      ... // populate b\n-001b8600: 7566 2061 6e64 206c 656e 2077 6974 6820 uf and len with \n-001b8610: 6d65 7373 6167 6520 746f 2073 656e 643c message to send<\n-001b8620: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n-001b8640: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b8650: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_POST(soap, &\n-001b8710: 7175 6f74 3b55 524c 2671 756f 743b 3c2f quot;URL", "SOAP ac\n-001b8750: 7469 6f6e 206f 7220 4e55 4c4c 2671 756f tion or NULL&quo\n-001b8760: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "med\n-001b8790: 6961 2074 7970 6526 7175 6f74 3b3c 2f73 ia type")
      . \n-001b87c0: 7c7c 203c 6120 636c 6173 733d 2263 6f64 || soap_send_raw\n-001b8820: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001b8850: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , b\n-001b88a0: 7566 3c2f 613e 2c20 6c65 6e29 3b20 3c2f uf, len); .
      || soap_\n-001b8920: 656e 645f 7365 6e64 3c2f 613e 283c 6120 end_send(soap)) <\n-001b8960: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      ... // error
      .\n-001b8a80: 0a3c 6469 7620 636c 6173 733d 226c 696e .. |\n-001b8bb0: 7c20 3c61 2063 6c61 7373 3d22 636f 6465 | soap_end_recv<\n-001b8c10: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-001b8c40: 736f 6170 3c2f 613e 2929 203c 2f64 6976 soap)) .
      ... \n-001b8c80: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-001b8c90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      //\n-001b8cc0: 202e 2e2e 2075 7365 2062 7566 5b30 2e2e ... use buf[0..\n-001b8cd0: 6c65 6e2d 315d 203c 2f73 7061 6e3e 3c2f len-1] .int soap_begin\n-001b8fd0: 5f72 6563 7628 7374 7275 6374 2073 6f61 _recv(struct soa\n-001b8fe0: 7020 2a73 6f61 7029 3c2f 6469 763e 3c64 p *soap)
      Initialize the \n-001b9010: 636f 6e74 6578 7420 666f 7220 7265 6365 context for rece\n-001b9020: 6976 696e 672e 3c2f 6469 763e 3c2f 6469 iving.
      .
      int soap_POST(s\n-001b9110: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001b9120: 2c20 636f 6e73 7420 6368 6172 202a 656e , const char *en\n-001b9130: 6470 6f69 6e74 2c20 636f 6e73 7420 6368 dpoint, const ch\n-001b9140: 6172 202a 6163 7469 6f6e 2c20 636f 6e73 ar *action, cons\n-001b9150: 7420 6368 6172 202a 7479 7065 293c 2f64 t char *type)
      HTTP POST \n-001b9180: 636f 6e74 656e 7420 746f 2073 6572 7665 content to serve\n-001b9190: 722e 3c2f 6469 763e 3c2f 6469 763e 0a3c r.
      .<\n-001b91a0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      Similar\n-001b91c0: 6c79 2c20 3c63 6f64 653e 3c61 2063 6c61 ly, soap\n-001b9240: 5f50 5554 3c2f 613e 3c2f 636f 6465 3e2c _PUT,\n-001b9250: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n-001b92d0: 5041 5443 483c 2f61 3e3c 2f63 6f64 653e PATCH\n-001b92e0: 2c20 616e 6420 3c63 6f64 653e 3c61 2063 , and soap_DELETE comman\n-001b9380: 6473 2061 7265 2070 726f 7669 6465 6420 ds are provided \n-001b9390: 666f 7220 5055 542c 2050 4154 4348 2c20 for PUT, PATCH, \n-001b93a0: 616e 6420 4445 4c45 5445 2068 616e 646c and DELETE handl\n-001b93b0: 696e 672e 3c2f 703e 0a3c 703e 546f 2073 ing.

      .

      To s\n-001b93c0: 7570 706f 7274 2048 5454 5020 7069 7065 upport HTTP pipe\n-001b93d0: 6c69 6e69 6e67 2077 6520 7573 6520 7468 lining we use th\n-001b93e0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n-001b9470: 6874 7470 5f70 6970 653c 2f61 3e3c 2f63 http_pipe plugin, whi\n-001b9490: 6368 2063 616e 2062 6520 7573 6564 2061 ch can be used a\n-001b94a0: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid\n-001b94b0: 6520 746f 2065 6e61 626c 6520 4854 5450 e to enable HTTP\n-001b94c0: 2070 6970 656c 696e 696e 6720 6175 746f pipelining auto\n-001b94d0: 6d61 7469 6361 6c6c 792c 2077 6865 6e20 matically, when \n-001b94e0: 7265 6769 7374 6572 6564 2e20 5468 6520 registered. The \n-001b94f0: 706c 7567 696e 2063 616e 2061 6c73 6f20 plugin can also \n-001b9500: 6265 2075 7365 6420 6174 2074 6865 2063 be used at the c\n-001b9510: 6c69 656e 7420 7369 6465 2c20 7468 6f75 lient side, thou\n-001b9520: 6768 2074 6869 7320 6973 206f 6e6c 7920 gh this is only \n-001b9530: 6e65 6365 7373 6172 7920 696e 2073 6365 necessary in sce\n-001b9540: 6e61 7269 6f73 2074 6861 7420 7265 7175 narios that requ\n-001b9550: 6972 6520 7468 6520 636c 6965 6e74 2074 ire the client t\n-001b9560: 6f20 7265 6365 6976 6520 6d75 6c74 6970 o receive multip\n-001b9570: 6c65 206d 6573 7361 6765 7320 7769 7468 le messages with\n-001b9580: 6f75 7420 696e 7465 726d 6974 7465 6e64 out intermittend\n-001b9590: 2073 656e 6473 2c20 692e 652e 206d 756c sends, i.e. mul\n-001b95a0: 7469 706c 6520 7365 6e64 7320 666f 6c6c tiple sends foll\n-001b95b0: 6f77 6564 2062 7920 6d75 6c74 6970 6c65 owed by multiple\n-001b95c0: 2072 6563 6569 7665 7320 6279 2074 6865 receives by the\n-001b95d0: 2073 616d 6520 7468 7265 6164 2075 7369 same thread usi\n-001b95e0: 6e67 2074 6865 2073 616d 6520 3c63 6f64 ng the same so\n-001b9640: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n-001b9650: 6e74 6578 742e 2048 6f77 6576 6572 2c20 ntext. However, \n-001b9660: 636c 6965 6e74 7320 7368 6f75 6c64 2075 clients should u\n-001b9670: 7365 206d 756c 7469 706c 6520 7468 7265 se multiple thre\n-001b9680: 6164 7320 7768 656e 2048 5454 5020 7069 ads when HTTP pi\n-001b9690: 7065 6c69 6e69 6e67 2069 7320 7573 6564 pelining is used\n-001b96a0: 2074 6f20 7072 6576 656e 7420 626c 6f63 to prevent bloc\n-001b96b0: 6b69 6e67 2e20 5365 6520 7468 6520 3c65 king. See the gsoap/sa\n-001b96d0: 6d70 6c65 732f 6173 796e 633c 2f63 6f64 mples/async folder i\n-001b96f0: 6e20 7468 6520 6753 4f41 5020 7061 636b n the gSOAP pack\n-001b9700: 6167 6520 666f 7220 6578 706c 616e 6174 age for explanat\n-001b9710: 696f 6e20 616e 6420 6578 616d 706c 6573 ion and examples\n-001b9720: 2e3c 2f70 3e0a 3c70 3e53 6565 2061 6c73 .

      .

      See als\n-001b9730: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o http_p\n-001b97c0: 6f73 743c 2f61 3e3c 2f63 6f64 653e 2061 ost a\n-001b97d0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd http_pipe.

      .

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

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

      .Th\n-001b98e0: 6520 4854 5450 2064 6967 6573 7420 6175 e HTTP digest au\n-001b98f0: 7468 656e 7469 6361 7469 6f6e 2070 6c75 thentication plu\n-001b9900: 6769 6e3c 2f68 333e 0a3c 703e 5468 6520 gin

      .

      The \n-001b9910: 4854 5450 2064 6967 6573 7420 6175 7468 HTTP digest auth\n-001b9920: 656e 7469 6361 7469 6f6e 2070 6c75 6769 entication plugi\n-001b9930: 6e20 656e 6162 6c65 7320 6120 6d6f 7265 n enables a more\n-001b9940: 2073 6563 7572 6520 6175 7468 656e 7469 secure authenti\n-001b9950: 6361 7469 6f6e 2073 6368 656d 6520 636f cation scheme co\n-001b9960: 6d70 6172 6564 2074 6f20 6261 7369 6320 mpared to basic \n-001b9970: 6175 7468 656e 7469 6361 7469 6f6e 2e20 authentication. \n-001b9980: 4854 5450 2062 6173 6963 2061 7574 6865 HTTP basic authe\n-001b9990: 6e74 6963 6174 696f 6e20 7365 6e64 7320 ntication sends \n-001b99a0: 756e 656e 6372 7970 7465 6420 7573 6572 unencrypted user\n-001b99b0: 6964 7320 616e 6420 7061 7373 776f 7264 ids and password\n-001b99c0: 7320 6f76 6572 2074 6865 206e 6574 2c20 s over the net, \n-001b99d0: 7768 696c 6520 6469 6765 7374 2061 7574 while digest aut\n-001b99e0: 6865 6e74 6963 6174 696f 6e20 646f 6573 hentication does\n-001b99f0: 206e 6f74 2065 7863 6861 6e67 6520 7061 not exchange pa\n-001b9a00: 7373 776f 7264 7320 6275 7420 6578 6368 sswords but exch\n-001b9a10: 616e 6765 7320 6368 6563 6b73 756d 7320 anges checksums \n-001b9a20: 6f66 2070 6173 7377 6f72 6473 2028 616e of passwords (an\n-001b9a30: 6420 6f74 6865 7220 6461 7461 2073 7563 d other data suc\n-001b9a40: 6820 6173 206e 6f6e 6365 7320 746f 2061 h as nonces to a\n-001b9a50: 766f 6964 2072 6570 6c61 7920 6174 7461 void replay atta\n-001b9a60: 636b 7329 2e20 466f 7220 6d6f 7265 2064 cks). For more d\n-001b9a70: 6574 6169 6c73 2c20 706c 6561 7365 2073 etails, please s\n-001b9a80: 6565 2052 4643 2032 3631 372e 3c2f 703e ee RFC 2617.

      \n-001b9a90: 0a3c 703e 5468 6520 4854 5450 2064 6967 .

      The HTTP dig\n-001b9aa0: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n-001b9ab0: 6f6e 2063 616e 2062 6520 7573 6564 206e on can be used n\n-001b9ac0: 6578 7420 746f 2074 6865 2062 7569 6c74 ext to the built\n-001b9ad0: 2d69 6e20 6261 7369 6320 6175 7468 656e -in basic authen\n-001b9ae0: 7469 6361 7469 6f6e 2c20 6f72 2062 6173 tication, or bas\n-001b9af0: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio\n-001b9b00: 6e20 6361 6e20 6265 2072 656a 6563 7465 n can be rejecte\n-001b9b10: 6420 746f 2074 6967 6874 656e 2073 6563 d to tighten sec\n-001b9b20: 7572 6974 792e 2054 6865 2073 6572 7665 urity. The serve\n-001b9b30: 7220 6d75 7374 2068 6176 6520 6120 6461 r must have a da\n-001b9b40: 7461 6261 7365 2077 6974 6820 7573 6572 tabase with user\n-001b9b50: 6964 2773 2061 6e64 2070 6173 7377 6f72 id's and passwor\n-001b9b60: 6473 2028 696e 2070 6c61 696e 2074 6578 ds (in plain tex\n-001b9b70: 7420 666f 726d 292e 2054 6865 2063 6c69 t form). The cli\n-001b9b80: 656e 742c 2077 6865 6e20 6368 616c 6c65 ent, when challe\n-001b9b90: 6e67 6564 2062 7920 7468 6520 7365 7276 nged by the serv\n-001b9ba0: 6572 2c20 6368 6563 6b73 2074 6865 2061 er, checks the a\n-001b9bb0: 7574 6865 6e74 6963 6174 696f 6e20 7265 uthentication re\n-001b9bc0: 616c 6d20 7072 6f76 6964 6564 2062 7920 alm provided by \n-001b9bd0: 7468 6520 7365 7276 6572 2061 6e64 2073 the server and s\n-001b9be0: 6574 7320 7468 6520 7573 6572 6964 2061 ets the userid a\n-001b9bf0: 6e64 2070 6173 7377 6f72 6473 2066 6f72 nd passwords for\n-001b9c00: 2064 6967 6573 7420 6175 7468 656e 7469 digest authenti\n-001b9c10: 6361 7469 6f6e 2e20 5468 6520 636c 6965 cation. The clie\n-001b9c20: 6e74 2061 7070 6c69 6361 7469 6f6e 2063 nt application c\n-001b9c30: 616e 2074 656d 706f 7261 7269 6c79 2073 an temporarily s\n-001b9c40: 746f 7265 2074 6865 2075 7365 7269 6420 tore the userid \n-001b9c50: 616e 6420 7061 7373 776f 7264 2066 6f72 and password for\n-001b9c60: 2061 2073 6571 7565 6e63 6520 6f66 206d a sequence of m\n-001b9c70: 6573 7361 6765 2065 7863 6861 6e67 6573 essage exchanges\n-001b9c80: 2077 6974 6820 7468 6520 7365 7276 6572 with the server\n-001b9c90: 2c20 7768 6963 6820 6973 2066 6173 7465 , which is faste\n-001b9ca0: 7220 7468 616e 2072 6570 6561 7465 6420 r than repeated \n-001b9cb0: 6175 7468 6f72 697a 6174 696f 6e20 6368 authorization ch\n-001b9cc0: 616c 6c65 6e67 6573 2061 6e64 2061 7574 allenges and aut\n-001b9cd0: 6865 6e74 6963 6174 696f 6e20 7265 7370 hentication resp\n-001b9ce0: 6f6e 7365 732e 3c2f 703e 0a3c 703e 4174 onses.

      .

      At\n-001b9cf0: 2074 6865 2063 6c69 656e 7420 7369 6465 the client side\n-001b9d00: 2c20 7468 6520 706c 7567 696e 2069 7320 , the plugin is \n-001b9d10: 7265 6769 7374 6572 6564 2061 6e64 2073 registered and s\n-001b9d20: 6572 7669 6365 2069 6e76 6f63 6174 696f ervice invocatio\n-001b9d30: 6e73 2061 7265 2063 6865 636b 6564 2066 ns are checked f\n-001b9d40: 6f72 2061 7574 686f 7269 7a61 7469 6f6e or authorization\n-001b9d50: 2063 6861 6c6c 656e 6765 7320 2848 5454 challenges (HTT\n-001b9d60: 5020 6572 726f 7220 636f 6465 2034 3031 P error code 401\n-001b9d70: 292e 2057 6865 6e20 7468 6520 7365 7276 ). When the serv\n-001b9d80: 6572 2063 6861 6c6c 656e 6765 7320 7468 er challenges th\n-001b9d90: 6520 636c 6965 6e74 2c20 7468 6520 636c e client, the cl\n-001b9da0: 6965 6e74 2073 686f 756c 6420 7365 7420 ient should set \n-001b9db0: 7468 6520 7573 6572 6964 2061 6e64 2070 the userid and p\n-001b9dc0: 6173 7377 6f72 6420 616e 6420 7265 7472 assword and retr\n-001b9dd0: 7920 7468 6520 696e 766f 6361 7469 6f6e y the invocation\n-001b9de0: 2e20 5468 6520 636c 6965 6e74 2063 616e . The client can\n-001b9df0: 2064 6574 6572 6d69 6e65 2074 6865 2075 determine the u\n-001b9e00: 7365 7269 6420 616e 6420 7061 7373 776f serid and passwo\n-001b9e10: 7264 2062 6173 6564 206f 6e20 7468 6520 rd based on the \n-001b9e20: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r\n-001b9e30: 6561 6c6d 2070 6172 7420 6f66 2074 6865 ealm part of the\n-001b9e40: 2073 6572 7665 7227 7320 6368 616c 6c65 server's challe\n-001b9e50: 6e67 652e 2054 6865 2061 7574 6865 6e74 nge. The authent\n-001b9e60: 6963 6174 696f 6e20 696e 666f 726d 6174 ication informat\n-001b9e70: 696f 6e20 6361 6e20 6265 2074 656d 706f ion can be tempo\n-001b9e80: 7261 7269 6c79 2073 6176 6564 2066 6f72 rarily saved for\n-001b9e90: 206d 756c 7469 706c 6520 696e 766f 6361 multiple invoca\n-001b9ea0: 7469 6f6e 732e 3c2f 703e 0a3c 703e 436c tions.

      .

      Cl\n-001b9eb0: 6965 6e74 2d73 6964 6520 6578 616d 706c ient-side exampl\n-001b9ec0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

      .
      <\n-001b9ef0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001b9f00: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001b9f10: 6465 2026 7175 6f74 3b68 7474 7064 612e de "httpda.\n-001b9f20: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n-001b9f30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      .\n-001b9f50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      int<\n-001b9f80: 2f73 7061 6e3e 206d 6169 6e28 293c 2f64 /span> main().
      {
      .\n-001b9fc0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-001b9fe0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-001ba010: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001ba040: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-001ba0a0: 6170 5f6e 6577 3c2f 613e 2829 3b3c 2f64 ap_new();..
      \n-001ba1b0: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n-001ba1c0: 5245 293b 203c 7370 616e 2063 6c61 7373 RE); // fa\n-001ba1e0: 696c 6564 2074 6f20 7265 6769 7374 6572 iled to register\n-001ba1f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n-001ba200: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ba210: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-001ba230: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n-001ba240: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n-001ba250: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001ba280: 202e 2e2e 2929 203c 2f64 6976 3e0a 3c64 ...))
      .\n-001ba2a0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
      .
      \n-001ba2c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap\n-001ba310: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error == 4\n-001ba370: 3031 2920 3c73 7061 6e20 636c 6173 733d 01) // cha\n-001ba390: 6c6c 656e 6765 3a20 4854 5450 2061 7574 llenge: HTTP aut\n-001ba3a0: 6865 6e74 6963 6174 696f 6e20 7265 7175 hentication requ\n-001ba3b0: 6972 6564 203c 2f73 7061 6e3e 3c2f 6469 ired .
      {
      \n-001ba3e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      if (!s\n-001ba420: 7472 636d 7028 3c61 2063 6c61 7373 3d22 trcmp(soa\n-001ba450: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->authrealm\n-001ba4b0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , authr\n-001ba500: 6561 6c6d 3c2f 613e 2929 203c 7370 616e ealm)) // optionally d\n-001ba530: 6574 6572 6d69 6e65 2061 7574 6865 6e74 etermine authent\n-001ba540: 6963 6174 696f 6e20 7265 616c 6d3c 2f73 ication realm
      .
      \n-001ba570: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
      .
      \n-001ba590: 2020 2020 203c 7370 616e 2063 6c61 7373 struc\n-001ba5b0: 7420 3c2f 7370 616e 3e68 7474 705f 6461 t http_da\n-001ba5c0: 5f69 6e66 6f20 696e 666f 3b20 3c73 7061 _info info; // to store us\n-001ba5f0: 6572 6964 2061 6e64 2070 6173 7377 6420 erid and passwd \n-001ba600: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n-001ba620: 2020 2020 2020 2020 6874 7470 5f64 615f http_da_\n-001ba630: 7361 7665 283c 6120 636c 6173 733d 2263 save(soap\n-001ba660: 3c2f 613e 2c20 2661 6d70 3b69 6e66 6f2c , &info,\n-001ba670: 2061 7574 6872 6561 6c6d 2c20 7573 6572 authrealm, user\n-001ba680: 6964 2c20 7061 7373 7764 293b 203c 7370 id, passwd); // set userid\n-001ba6b0: 2061 6e64 2070 6173 7377 6420 666f 7220 and passwd for \n-001ba6c0: 7468 6973 2072 6561 6c6d 3c2f 7370 616e this realm
      .
      \n-001ba6f0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_call\n-001ba720: 5f6e 735f 5f77 6562 6d65 7468 6f64 283c _ns__webmethod(<\n-001ba730: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001ba740: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001ba750: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001ba760: 2e2e 2e29 2920 3c73 7061 6e20 636c 6173 ...)) // r\n-001ba780: 6574 7279 203c 2f73 7061 6e3e 3c2f 6469 etry .
      {.
      \n-001ba7d0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
      .
      \n-001ba810: 2020 2020 2020 203c 6120 636c 6173 733d soap\n-001ba870: 5f65 6e64 3c2f 613e 283c 6120 636c 6173 _end(\n-001ba8a0: 736f 6170 3c2f 613e 293b 203c 7370 616e soap); // userid and p\n-001ba8d0: 6173 7377 6420 7765 7265 2064 6561 6c6c asswd were deall\n-001ba8e0: 6f63 6174 6564 203c 2f73 7061 6e3e 3c2f ocated .
      \n-001ba910: 2068 7474 705f 6461 5f72 6573 746f 7265 http_da_restore\n-001ba920: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001ba950: 2c20 2661 6d70 3b69 6e66 6f29 3b20 3c73 , &info); // restore u\n-001ba980: 7365 7269 6420 616e 6420 7061 7373 7764 serid and passwd\n-001ba990: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n-001ba9a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ba9b0: 3e20 2020 2020 2020 2020 203c 7370 616e > if (\n-001ba9e0: 2173 6f61 705f 6361 6c6c 5f6e 735f 5f77 !soap_call_ns__w\n-001ba9f0: 6562 6d65 7468 6f64 283c 6120 636c 6173 ebmethod(\n-001baa20: 736f 6170 3c2f 613e 2c20 2e2e 2e29 2920 soap, ...)) \n-001baa30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // another\n-001baa50: 2063 616c 6c20 3c2f 7370 616e 3e3c 2f64 call .
      \n-001baa80: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... //
      . \n-001baac0: 2020 2020 2020 7d3c 2f64 6976 3e0a 3c64 }
      .\n-001baae0: 2020 2020 2020 7d3c 2f64 6976 3e0a 3c64 }
      .\n-001bab00: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
      . \n-001bab20: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
      .
      http\n-001bab40: 5f64 615f 7265 6c65 6173 6528 3c61 2063 _da_release(soap, &am\n-001bab80: 703b 696e 666f 293b 203c 7370 616e 2063 p;info); /\n-001baba0: 2f20 746f 2072 656d 6f76 6520 616c 6c20 / to remove all \n-001babb0: 7573 6572 6964 2061 6e64 2070 6173 7377 userid and passw\n-001babc0: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
      .<\n-001babd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001babe0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des\n-001bac40: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy(\n-001bac70: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
      \n-001bac80: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n-001bad30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bad40: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_fre\n-001bada0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n-001badd0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
      .\n-001badf0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
      .
      <\n-001bae10: 703e 5468 6973 2063 6f64 6520 7375 7070 p>This code supp\n-001bae20: 6f72 7473 2062 6f74 6820 6261 7369 6320 orts both basic \n-001bae30: 616e 6420 6469 6765 7374 2061 7574 6865 and digest authe\n-001bae40: 6e74 6963 6174 696f 6e2e 3c2f 703e 0a3c ntication.

      .<\n-001bae50: 703e 5468 6520 7365 7276 6572 2063 616e p>The server can\n-001bae60: 2063 6861 6c6c 656e 6765 2061 2063 6c69 challenge a cli\n-001bae70: 656e 7420 7573 696e 6720 4854 5450 2063 ent using HTTP c\n-001bae80: 6f64 6520 3430 312e 2057 6974 6820 7468 ode 401. With th\n-001bae90: 6520 706c 7567 696e 2c20 4854 5450 2064 e plugin, HTTP d\n-001baea0: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica\n-001baeb0: 7469 6f6e 2063 6861 6c6c 656e 6765 7320 tion challenges \n-001baec0: 6172 6520 7365 6e64 2e20 5769 7468 6f75 are send. Withou\n-001baed0: 7420 7468 6520 706c 7567 696e 2c20 6261 t the plugin, ba\n-001baee0: 7369 6320 6175 7468 656e 7469 6361 7469 sic authenticati\n-001baef0: 6f6e 2063 6861 6c6c 656e 6765 7320 6172 on challenges ar\n-001baf00: 6520 7365 6e64 2e3c 2f70 3e0a 3c70 3e45 e send.

      .

      E\n-001baf10: 6163 6820 7365 7276 6572 206d 6574 686f ach server metho\n-001baf20: 6420 6361 6e20 696d 706c 656d 656e 7420 d can implement \n-001baf30: 6175 7468 656e 7469 6361 7469 6f6e 2061 authentication a\n-001baf40: 7320 6465 7369 7265 6420 616e 6420 6d61 s desired and ma\n-001baf50: 7920 656e 666f 7263 6520 6469 6765 7374 y enforce digest\n-001baf60: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-001baf70: 6f72 206d 6179 2061 6c73 6f20 6163 6365 or may also acce\n-001baf80: 7074 2062 6173 6963 2061 7574 6865 6e74 pt basic authent\n-001baf90: 6963 6174 696f 6e20 7265 7370 6f6e 7365 ication response\n-001bafa0: 732e 2054 6f20 7665 7269 6679 2064 6967 s. To verify dig\n-001bafb0: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n-001bafc0: 6f6e 2072 6573 706f 6e73 6573 2c20 7468 on responses, th\n-001bafd0: 6520 7365 7276 6572 2073 686f 756c 6420 e server should \n-001bafe0: 636f 6d70 7574 6520 616e 6420 636f 6d70 compute and comp\n-001baff0: 6172 6520 7468 6520 6368 6563 6b73 756d are the checksum\n-001bb000: 7320 7573 696e 6720 7468 6520 706c 7567 s using the plug\n-001bb010: 696e 2773 203c 636f 6465 3e68 7474 705f in's http_\n-001bb020: 6461 5f76 6572 6966 795f 706f 7374 3c2f da_verify_post function f\n-001bb040: 6f72 2048 5454 5020 504f 5354 2072 6571 or HTTP POST req\n-001bb050: 7565 7374 7320 2861 6e64 203c 636f 6465 uests (and http_da_verify_\n-001bb070: 6765 743c 2f63 6f64 653e 2066 6f72 2048 get for H\n-001bb080: 5454 5020 4745 5420 7265 7175 6573 7473 TTP GET requests\n-001bb090: 2077 6974 6820 7468 6520 4854 5450 2047 with the HTTP G\n-001bb0a0: 4554 2070 6c75 6769 6e29 2061 7320 666f ET plugin) as fo\n-001bb0b0: 6c6c 6f77 733a 3c2f 703e 0a3c 6469 7620 llows:

      .
      #i\n-001bb100: 6e63 6c75 6465 2026 7175 6f74 3b68 7474 nclude "htt\n-001bb110: 7064 612e 6826 7175 6f74 3b3c 2f73 7061 pda.h"
      .
      .
      \n-001bb170: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-001bb180: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
      .
      {.
      stru\n-001bb1d0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n-001bb2a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      if \n-001bb2e0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_regist\n-001bb340: 6572 5f70 6c75 6769 6e3c 2f61 3e28 3c61 er_plugin(soap, h\n-001bb380: 7474 705f 6461 2929 203c 2f64 6976 3e0a ttp_da))
      .\n-001bb390: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      exit(EXIT_\n-001bb3b0: 4641 494c 5552 4529 3b20 3c73 7061 6e20 FAILURE); \n-001bb3d0: 2f2f 2066 6169 6c65 6420 746f 2072 6567 // failed to reg\n-001bb3e0: 6973 7465 7220 3c2f 7370 616e 3e3c 2f64 ister .
      ... // use soap_bi\n-001bb430: 6e64 2061 6e64 2073 6f61 705f 6163 6365 nd and soap_acce\n-001bb440: 7074 2069 6e20 6120 286d 756c 7469 2d74 pt in a (multi-t\n-001bb450: 6872 6561 6465 6429 2073 6572 7669 6365 hreaded) service\n-001bb460: 206c 6f6f 703c 2f73 7061 6e3e 3c2f 6469 loop.
      if (soap\n-001bb500: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap)).
      soap\n-001bb5b0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-001bb5c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001bb5f0: 2c20 7374 6465 7272 293b 3c2f 6469 763e , stderr);
      \n-001bb600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      ... /\n-001bb630: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
      .<\n-001bb640: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bb650: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des\n-001bb6b0: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy(\n-001bb6e0: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
      \n-001bb6f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n-001bb7a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bb7b0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_fre\n-001bb810: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n-001bb840: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
      .\n-001bb860: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
      .
      .
      in\n-001bb8b0: 743c 2f73 7061 6e3e 206e 735f 5f77 6562 t ns__web\n-001bb8c0: 6d65 7468 6f64 283c 7370 616e 2063 6c61 method(str\n-001bb8e0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, ...\n-001bb950: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      .
      {.
      if (soap->\n-001bb9e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 userid<\n-001bba30: 2f61 3e20 2661 6d70 3b26 616d 703b 203c /a> && <\n-001bba40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bba50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bba60: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-001bba70: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;pass\n-001bbac0: 7764 3c2f 613e 2920 3c73 7061 6e20 636c wd) //\n-001bbae0: 2063 6c69 656e 7420 7573 6564 2062 6173 client used bas\n-001bbaf0: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio\n-001bbb00: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
      .\n-001bbb10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      . \n-001bbb40: 2020 3c73 7061 6e20 636c 6173 733d 2263 // may d\n-001bbb60: 6563 6964 6520 6e6f 7420 746f 2068 616e ecide not to han\n-001bbb70: 646c 652c 2062 7574 2069 6620 6f6b 2074 dle, but if ok t\n-001bbb80: 6865 6e20 676f 2061 6865 6164 2061 6e64 hen go ahead and\n-001bbb90: 2063 6f6d 7061 7265 2069 6e66 6f3a 203c compare info: <\n-001bbba0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n-001bbbc0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n-001bbbe0: 2f73 7061 6e3e 2028 2173 7472 636d 7028 /span> (!strcmp(\n-001bbbf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001bbc20: 2667 743b 3c61 2063 6c61 7373 3d22 636f >use\n-001bbc70: 7269 643c 2f61 3e2c 203c 6120 636c 6173 rid, userid) &a\n-001bbcd0: 6d70 3b26 616d 703b 2021 7374 7263 6d70 mp;& !strcmp\n-001bbce0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001bbd10: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pa\n-001bbd60: 7373 7764 3c2f 613e 2c20 3c61 2063 6c61 sswd, passwd)) \n-001bbdc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {.
      ...\n-001bbe00: 203c 7370 616e 2063 6c61 7373 3d22 636f // handle\n-001bbe20: 2072 6571 7565 7374 3c2f 7370 616e 3e3c request<\n-001bbe30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n-001bbef0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
      . \n-001bbf10: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
      .
      else if\n-001bbf70: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n-001bbfa0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->authrealm<\n-001bc000: 2f61 3e20 2661 6d70 3b26 616d 703b 203c /a> && <\n-001bc010: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bc020: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bc030: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-001bc040: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;user\n-001bc090: 6964 3c2f 613e 2920 3c73 7061 6e20 636c id) //\n-001bc0b0: 2044 6967 6573 7420 6175 7468 656e 7469 Digest authenti\n-001bc0c0: 6361 7469 6f6e 203c 2f73 7061 6e3e 3c2f cation .
      {
      \n-001bc0f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      \n-001bc150: 7061 7373 7764 3c2f 613e 203d 202e 2e2e passwd = ...\n-001bc160: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // datab\n-001bc180: 6173 6520 6c6f 6f6b 7570 206f 6e20 7573 ase lookup on us\n-001bc190: 6572 6964 2061 6e64 2061 7574 6872 6561 erid and authrea\n-001bc1a0: 6c6d 2074 6f20 6669 6e64 2070 6173 7377 lm to find passw\n-001bc1b0: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
      .\n-001bc1c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      \n-001bc1f0: 6966 3c2f 7370 616e 3e20 2821 7374 7263 if (!strc\n-001bc200: 6d70 283c 6120 636c 6173 733d 2263 6f64 mp(soap->\n-001bc280: 6175 7468 7265 616c 6d3c 2f61 3e2c 203c authrealm, <\n-001bc290: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bc2a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bc2b0: 6874 6d6c 2361 3864 6265 3537 6435 3966 html#a8dbe57d59f\n-001bc2c0: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7\n-001bc2d0: 3933 3962 6664 223e 6175 7468 7265 616c 939bfd\">authreal\n-001bc2e0: 6d3c 2f61 3e29 2026 616d 703b 2661 6d70 m) &&\n-001bc2f0: 3b20 2173 7472 636d 7028 3c61 2063 6c61 ; !strcmp(soap->userid, user\n-001bc3d0: 6964 3c2f 613e 2929 203c 2f64 6976 3e0a id))
      .\n-001bc3e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .\n-001bc410: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-001bc430: 6966 3c2f 7370 616e 3e20 2821 6874 7470 if (!http\n-001bc440: 5f64 615f 7665 7269 6679 5f70 6f73 7428 _da_verify_post(\n-001bc450: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001bc480: 203c 6120 636c 6173 733d 2263 6f64 6522 passwd\n-001bc4d0: 3c2f 613e 2929 203c 2f64 6976 3e0a 3c64 ))
      .\n-001bc4f0: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
      .\n-001bc510: 2020 2020 2020 2020 2e2e 2e20 3c73 7061 ... // handle requ\n-001bc540: 6573 743c 2f73 7061 6e3e 3c2f 6469 763e est
      \n-001bc550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      return SOAP_OK;
      .
      \n-001bc610: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
      . \n-001bc630: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
      .
      }\n-001bc650: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      soap->\n-001bc6a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 authrea\n-001bc6f0: 6c6d 3c2f 613e 203d 203c 6120 636c 6173 lm = authrealm;\n-001bc750: 203c 7370 616e 2063 6c61 7373 3d22 636f // set re\n-001bc770: 616c 6d20 666f 7220 6368 616c 6c65 6e67 alm for challeng\n-001bc780: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
      .\n-001bc790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      re\n-001bc7c0: 7475 726e 3c2f 7370 616e 3e20 3430 313b turn 401;\n-001bc7d0: 203c 7370 616e 2063 6c61 7373 3d22 636f // Not au\n-001bc7f0: 7468 6f72 697a 6564 2c20 6368 616c 6c65 thorized, challe\n-001bc800: 6e67 6520 6469 6765 7374 2061 7574 6865 nge digest authe\n-001bc810: 6e74 6963 6174 696f 6e20 3c2f 7370 616e ntication
      .
      }.

      For \n-001bc860: 6d6f 7265 2064 6574 6169 6c73 2c20 696e more details, in\n-001bc870: 636c 7564 696e 6720 686f 7720 746f 2063 cluding how to c\n-001bc880: 6f6e 6669 6775 7265 2048 5454 5020 4469 onfigure HTTP Di\n-001bc890: 6765 7374 2061 7574 6865 6e74 6963 6174 gest authenticat\n-001bc8a0: 696f 6e20 666f 7220 7072 6f78 6965 732c ion for proxies,\n-001bc8b0: 2073 6565 2074 6865 203c 6120 6872 6566 see the HTTP digest aut\n-001bc8f0: 6865 6e74 6963 6174 696f 6e20 706c 7567 hentication plug\n-001bc900: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta\n-001bc910: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

      .

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

      .\n-001bc950: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

      .T\n-001bc980: 6865 2048 5454 5020 7365 7373 696f 6e73 he HTTP sessions\n-001bc990: 2070 6c75 6769 6e3c 2f68 333e 0a3c 703e plugin

      .

      \n-001bc9a0: 5468 6520 706c 7567 696e 2063 6f64 6520 The plugin code \n-001bc9b0: 6973 206c 6f63 6174 6564 2069 6e20 7468 is located in th\n-001bc9c0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n-001bc9d0: 702f 706c 7567 696e 3c2f 636f 6465 3e3c p/plugin<\n-001bc9e0: 2f65 6d3e 2064 6972 6563 746f 7279 2063 /em> directory c\n-001bc9f0: 6f6e 7461 696e 696e 6720 3c65 6d3e 3c63 ontaining sessions.h and <\n-001bca20: 656d 3e3c 636f 6465 3e73 6573 7369 6f6e em>session\n-001bca30: 732e 633c 2f63 6f64 653e 3c2f 656d 3e2e s.c.\n-001bca40: 3c2f 703e 0a3c 703e 466f 7220 6d6f 7265

      .

      For more\n-001bca50: 2064 6574 6169 6c73 2c20 7365 6520 7468 details, see th\n-001bca60: 6520 3c61 2068 7265 663d 222e 2e2f 2e2e e HTTP \n-001bca90: 7365 7373 696f 6e73 2070 6c75 6769 6e3c sessions plugin<\n-001bcaa0: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n-001bcab0: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

      .

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

      ..The Ap\n-001bcb20: 6163 6865 206d 6f64 756c 6520 706c 7567 ache module plug\n-001bcb30: 696e 3c2f 6833 3e0a 3c70 3e54 6865 2070 in.

      The p\n-001bcb40: 6c75 6769 6e20 636f 6465 2069 7320 6c6f lugin code is lo\n-001bcb50: 6361 7465 6420 696e 2074 6865 203c 656d cated in the gsoap/mod\n-001bcb70: 5f67 736f 6170 2f6d 6f64 5f67 736f 6170 _gsoap/mod_gsoap\n-001bcb80: 2d30 2e39 2f61 7061 6368 655f 3230 3c2f -0.9/apache_20 direc\n-001bcba0: 746f 7279 2e3c 2f70 3e0a 3c70 3e46 6f72 tory.

      .

      For\n-001bcbb0: 206d 6f72 6520 6465 7461 696c 732c 2073 more details, s\n-001bcbc0: 6565 2074 6865 203c 6120 6872 6566 3d22 ee the Ap\n-001bcbf0: 6163 6865 206d 6f64 756c 653c 2f61 3e20 ache module \n-001bcc00: 646f 6375 6d65 6e74 6174 696f 6e2e 3c2f documentation..

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

      .

      \n-001bcc70: 3c2f 613e 0a54 6865 2049 5341 5049 2065 .The ISAPI e\n-001bcc80: 7874 656e 7369 6f6e 2070 6c75 6769 6e3c xtension plugin<\n-001bcc90: 2f68 333e 0a3c 703e 5468 6520 706c 7567 /h3>.

      The plug\n-001bcca0: 696e 2063 6f64 6520 6973 206c 6f63 6174 in code is locat\n-001bccb0: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the gsoap/mod_gs\n-001bccd0: 6f61 702f 6773 6f61 705f 7769 6e2f 6973 oap/gsoap_win/is\n-001bcce0: 6170 693c 2f63 6f64 653e 3c2f 656d 3e20 api \n-001bccf0: 6469 7265 6374 6f72 792e 3c2f 703e 0a3c directory.

      .<\n-001bcd00: 703e 466f 7220 6d6f 7265 2064 6574 6169 p>For more detai\n-001bcd10: 6c73 2c20 7365 6520 7468 6520 3c61 2068 ls, see the ISAPI extensio\n-001bcd50: 6e3c 2f61 3e20 646f 6375 6d65 6e74 6174 n documentat\n-001bcd60: 696f 6e2e 3c2f 703e 0a3c 703e f09f 949d ion.

      .

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

      .<\n-001bcda0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.The CU\n-001bcdd0: 524c 2070 6c75 6769 6e3c 2f68 333e 0a3c RL plugin

      .<\n-001bcde0: 703e 5468 6520 706c 7567 696e 2063 6f64 p>The plugin cod\n-001bcdf0: 6520 6973 206c 6f63 6174 6564 2069 6e20 e is located in \n-001bce00: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n-001bce10: 6f61 702f 706c 7567 696e 3c2f 636f 6465 oap/plugin directory\n-001bce30: 2063 6f6e 7461 696e 696e 6720 3c65 6d3e containing \n-001bce40: 3c63 6f64 653e 6375 726c 6170 692e 683c curlapi.h<\n-001bce50: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-001bce60: 3c65 6d3e 3c63 6f64 653e 6375 726c 6170 curlap\n-001bce70: 692e 633c 2f63 6f64 653e 3c2f 656d 3e2e i.c.\n-001bce80: 3c2f 703e 0a3c 703e 466f 7220 6d6f 7265

      .

      For more\n-001bce90: 2064 6574 6169 6c73 2c20 7365 6520 7468 details, see th\n-001bcea0: 6520 3c61 2068 7265 663d 222e 2e2f 2e2e e CURL plug\n-001bced0: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta\n-001bcee0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

      .

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

      .\n-001bcf20: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

      .Th\n-001bcf50: 6520 5769 6e49 6e65 7420 706c 7567 696e e WinInet plugin\n-001bcf60: 3c2f 6833 3e0a 3c70 3e54 6865 2070 6c75

      .

      The plu\n-001bcf70: 6769 6e20 636f 6465 2069 7320 6c6f 6361 gin code is loca\n-001bcf80: 7465 6420 696e 2074 6865 203c 656d 3e3c ted in the <\n-001bcf90: 636f 6465 3e67 736f 6170 2f6d 6f64 5f67 code>gsoap/mod_g\n-001bcfa0: 736f 6170 2f67 736f 6170 5f77 696e 2f77 soap/gsoap_win/w\n-001bcfb0: 696e 696e 6574 3c2f 636f 6465 3e3c 2f65 ininet directory..

      For more de\n-001bcfe0: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the <\n-001bcff0: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7769 a href=\"../../wi\n-001bd000: 6e69 6e65 742f 6874 6d6c 2f69 6e64 6578 ninet/html/index\n-001bd010: 2e68 746d 6c22 3e57 696e 496e 6574 2070 .html\">WinInet p\n-001bd020: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume\n-001bd030: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

      .

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

      .The\n-001bd0a0: 2057 532d 4164 6472 6573 7369 6e67 2070 WS-Addressing p\n-001bd0b0: 6c75 6769 6e3c 2f68 333e 0a3c 703e 5468 lugin

      .

      Th\n-001bd0c0: 6520 706c 7567 696e 2063 6f64 6520 6973 e plugin code is\n-001bd0d0: 206c 6f63 6174 6564 2069 6e20 7468 6520 located in the \n-001bd0e0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-001bd0f0: 706c 7567 696e 3c2f 636f 6465 3e3c 2f65 plugin directory con\n-001bd110: 7461 696e 696e 6720 3c65 6d3e 3c63 6f64 taining wsaapi.h and <\n-001bd140: 636f 6465 3e77 7361 6170 692e 633c 2f63 code>wsaapi.c (to be\n-001bd160: 2075 7365 6420 696e 2043 2061 6e64 2043 used in C and C\n-001bd170: 2b2b 292e 3c2f 703e 0a3c 703e 546f 2065 ++).

      .

      To e\n-001bd180: 6e61 626c 6520 5753 2d41 6464 7265 7373 nable WS-Address\n-001bd190: 696e 6720 3230 3035 2028 616e 6420 7375 ing 2005 (and su\n-001bd1a0: 7070 6f72 7420 666f 7220 382f 3230 3034 pport for 8/2004\n-001bd1b0: 292c 2074 6865 2073 6572 7669 6365 2064 ), the service d\n-001bd1c0: 6566 696e 6974 696f 6e73 2068 6561 6465 efinitions heade\n-001bd1d0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n-001bd1e0: 7070 3220 7368 6f75 6c64 2069 6e63 6c75 pp2 should inclu\n-001bd1f0: 6465 2074 6865 2066 6f6c 6c6f 7769 6e67 de the following\n-001bd200: 2069 6d70 6f72 7473 3a3c 2f70 3e0a 3c64 imports:

      .
      #import "i\n-001bd260: 6d70 6f72 742f 7773 6135 2e68 2671 756f mport/wsa5.h&quo\n-001bd270: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
      .\n-001bd280: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

      This i\n-001bd2a0: 6d70 6f72 7473 2074 6865 2053 4f41 5020 mports the SOAP \n-001bd2b0: 6865 6164 6572 2065 6c65 6d65 6e74 7320 header elements \n-001bd2c0: 7265 7175 6972 6564 2062 7920 5753 2d41 required by WS-A\n-001bd2d0: 6464 7265 7373 696e 672e 3c2f 703e 0a3c ddressing.

      .<\n-001bd2e0: 703e 466f 7220 6d6f 7265 2064 6574 6169 p>For more detai\n-001bd2f0: 6c73 2c20 7365 6520 7468 6520 3c61 2068 ls, see the \n-001bd320: 5753 2d41 6464 7265 7373 696e 6720 706c WS-Addressing pl\n-001bd330: 7567 696e 3c2f 613e 2064 6f63 756d 656e ugin documen\n-001bd340: 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 tation.

      .

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

      .The\n-001bd3b0: 2057 532d 5265 6c69 6162 6c65 4d65 7373 WS-ReliableMess\n-001bd3c0: 6167 696e 6720 706c 7567 696e 3c2f 6833 aging plugin.

      The plugin \n-001bd3e0: 636f 6465 2069 7320 6c6f 6361 7465 6420 code is located \n-001bd3f0: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/plugin direct\n-001bd420: 6f72 7920 636f 6e74 6169 6e69 6e67 203c ory containing <\n-001bd430: 656d 3e3c 636f 6465 3e77 7372 6d61 7069 em>wsrmapi\n-001bd440: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a\n-001bd450: 6e64 203c 656d 3e3c 636f 6465 3e77 7372 nd wsr\n-001bd460: 6d61 7069 2e63 3c2f 636f 6465 3e3c 2f65 mapi.c (to be used i\n-001bd480: 6e20 4320 616e 6420 432b 2b29 2e3c 2f70 n C and C++)..

      Also needed\n-001bd4a0: 2061 7265 203c 656d 3e3c 636f 6465 3e74 are t\n-001bd4b0: 6872 6561 6473 2e68 3c2f 636f 6465 3e3c hreads.h<\n-001bd4c0: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and threads.c for mul\n-001bd4f0: 7469 2d74 6872 6561 6469 6e67 2061 6e64 ti-threading and\n-001bd500: 206c 6f63 6b69 6e67 2073 7570 706f 7274 locking support\n-001bd510: 2e3c 2f70 3e0a 3c70 3e54 6f20 656e 6162 .

      .

      To enab\n-001bd520: 6c65 2057 532d 5265 6c69 6162 6c65 4d65 le WS-ReliableMe\n-001bd530: 7373 6167 696e 672c 2074 6865 2073 6572 ssaging, the ser\n-001bd540: 7669 6365 2064 6566 696e 6974 696f 6e73 vice definitions\n-001bd550: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n-001bd560: 2073 6f61 7063 7070 3220 7368 6f75 6c64 soapcpp2 should\n-001bd570: 2069 6e63 6c75 6465 2074 6865 2066 6f6c include the fol\n-001bd580: 6c6f 7769 6e67 2069 6d70 6f72 7473 3a3c lowing imports:<\n-001bd590: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      #import &\n-001bd5e0: 7175 6f74 3b69 6d70 6f72 742f 7773 726d quot;import/wsrm\n-001bd5f0: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n-001bd600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      #import &quo\n-001bd640: 743b 696d 706f 7274 2f77 7361 352e 6826 t;import/wsa5.h&\n-001bd650: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.

      Thi\n-001bd680: 7320 696d 706f 7274 7320 7468 6520 534f s imports the SO\n-001bd690: 4150 2068 6561 6465 7220 656c 656d 656e AP header elemen\n-001bd6a0: 7473 2072 6571 7569 7265 6420 6279 2057 ts required by W\n-001bd6b0: 532d 5265 6c69 6162 6c65 4d65 7373 6167 S-ReliableMessag\n-001bd6c0: 696e 672e 3c2f 703e 0a3c 703e 466f 7220 ing.

      .

      For \n-001bd6d0: 6d6f 7265 2064 6574 6169 6c73 2c20 7365 more details, se\n-001bd6e0: 6520 7468 6520 3c61 2068 7265 663d 222e e the WS-R\n-001bd710: 656c 6961 626c 654d 6573 7361 6769 6e67 eliableMessaging\n-001bd720: 2070 6c75 6769 6e3c 2f61 3e20 646f 6375 plugin docu\n-001bd730: 6d65 6e74 6174 696f 6e2e 3c2f 703e 0a3c mentation.

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

      .

      .\n-001bd7a0: 5468 6520 5753 2d53 6563 7572 6974 7920 The WS-Security \n-001bd7b0: 706c 7567 696e 3c2f 6833 3e0a 3c70 3e54 plugin

      .

      T\n-001bd7c0: 6865 2070 6c75 6769 6e20 636f 6465 2069 he plugin code i\n-001bd7d0: 7320 6c6f 6361 7465 6420 696e 2074 6865 s located in the\n-001bd7e0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-001bd7f0: 2f70 6c75 6769 6e3c 2f63 6f64 653e 3c2f /plugin directory co\n-001bd810: 6e74 6169 6e69 6e67 203c 656d 3e3c 636f ntaining wsseapi.h and wsseapi.c\n-001bd850: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 746f (to\n-001bd860: 2062 6520 7573 6564 2069 6e20 4320 616e be used in C an\n-001bd870: 6420 432b 2b29 2e3c 2f70 3e0a 3c70 3e41 d C++).

      .

      A\n-001bd880: 6c73 6f20 6e65 6564 6564 2061 7265 3a20 lso needed are: \n-001bd890: 3c65 6d3e 3c63 6f64 653e 736d 6465 7670 smdevp\n-001bd8a0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a\n-001bd8b0: 6e64 203c 656d 3e3c 636f 6465 3e73 6d64 nd smd\n-001bd8c0: 6576 702e 633c 2f63 6f64 653e 3c2f 656d evp.c for streaming \n-001bd8e0: 584d 4c20 7369 676e 6174 7572 6520 616e XML signature an\n-001bd8f0: 6420 6d65 7373 6167 6520 6469 6765 7374 d message digest\n-001bd900: 2065 6e67 696e 652c 203c 656d 3e3c 636f engine, mecevp.h and \n-001bd930: 3c63 6f64 653e 6d65 6365 7670 2e63 3c2f mecevp.c for t\n-001bd950: 6865 2073 7472 6561 6d69 6e67 2058 4d4c he streaming XML\n-001bd960: 2065 6e63 7279 7074 696f 6e20 656e 6769 encryption engi\n-001bd970: 6e65 2c20 3c65 6d3e 3c63 6f64 653e 7468 ne, th\n-001bd980: 7265 6164 732e 683c 2f63 6f64 653e 3c2f reads.h and threads.c for mult\n-001bd9c0: 692d 7468 7265 6164 696e 6720 616e 6420 i-threading and \n-001bd9d0: 6c6f 636b 696e 6720 7375 7070 6f72 742e locking support.\n-001bd9e0: 3c2f 703e 0a3c 703e 546f 2065 6e61 626c

      .

      To enabl\n-001bd9f0: 6520 5753 2d53 6563 7572 6974 792c 2074 e WS-Security, t\n-001bda00: 6865 2073 6572 7669 6365 2064 6566 696e he service defin\n-001bda10: 6974 696f 6e73 2068 6561 6465 7220 6669 itions header fi\n-001bda20: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 \n-001bda30: 7368 6f75 6c64 2069 6e63 6c75 6465 2074 should include t\n-001bda40: 6865 2066 6f6c 6c6f 7769 6e67 2069 6d70 he following imp\n-001bda50: 6f72 7473 3a3c 2f70 3e0a 3c64 6976 2063 orts:

      .
      \n-001bda70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      #im\n-001bdaa0: 706f 7274 2026 7175 6f74 3b69 6d70 6f72 port "impor\n-001bdab0: 742f 7773 7365 2e68 2671 756f 743b 3c2f t/wsse.h"
      .

      This impor\n-001bdaf0: 7473 2074 6865 2053 4f41 5020 6865 6164 ts the SOAP head\n-001bdb00: 6572 2065 6c65 6d65 6e74 7320 7265 7175 er elements requ\n-001bdb10: 6972 6564 2062 7920 5753 2d53 6563 7572 ired by WS-Secur\n-001bdb20: 6974 792e 3c2f 703e 0a3c 703e 466f 7220 ity.

      .

      For \n-001bdb30: 6d6f 7265 2064 6574 6169 6c73 2c20 7365 more details, se\n-001bdb40: 6520 7468 6520 3c61 2068 7265 663d 222e e the WS-Sec\n-001bdb70: 7572 6974 7920 706c 7567 696e 3c2f 613e urity plugin\n-001bdb80: 2064 6f63 756d 656e 7461 7469 6f6e 2e3c documentation.<\n-001bdb90: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

      .... Back to \n-001bdbb0: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n-001bdbc0: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

      .

      \n-001bdbf0: 3c2f 613e 0a54 6865 2057 532d 4469 7363 .The WS-Disc\n-001bdc00: 6f76 6572 7920 706c 7567 696e 3c2f 6833 overy plugin.

      Basically, \n-001bdc20: 746f 2061 6464 2057 532d 4469 7363 6f76 to add WS-Discov\n-001bdc30: 6572 7920 7375 7070 6f72 7420 7468 6520 ery support the \n-001bdc40: 666f 6c6c 6f77 696e 6720 6576 656e 7420 following event \n-001bdc50: 6861 6e64 6c65 7273 206d 7573 7420 6265 handlers must be\n-001bdc60: 2064 6566 696e 6564 2061 6e64 206c 696e defined and lin\n-001bdc70: 6b65 643a 3c2f 703e 0a3c 6469 7620 636c ked:

      .
      <\n-001bdc90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bdca0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-001bdcc0: 2f73 7061 6e3e 2077 7364 645f 6576 656e /span> wsdd_even\n-001bdcd0: 745f 4865 6c6c 6f28 3c73 7061 6e20 636c t_Hello(st\n-001bdcf0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, .
      unsigned\n-001bdda0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int InstanceId\n-001bddd0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      const char *SequenceId,\n-001bde40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      unsigned in\n-001bdea0: 743c 2f73 7061 6e3e 204d 6573 7361 6765 t Message\n-001bdeb0: 4e75 6d62 6572 2c20 3c2f 6469 763e 0a3c Number,
      .<\n-001bdec0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bded0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001bdf10: 6172 3c2f 7370 616e 3e20 2a4d 6573 7361 ar *Messa\n-001bdf20: 6765 4944 2c20 3c2f 6469 763e 0a3c 6469 geID,
      .<\n-001bdf40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bdf50: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001bdf80: 3c2f 7370 616e 3e20 2a52 656c 6174 6573 *Relates\n-001bdf90: 546f 2c20 3c2f 6469 763e 0a3c 6469 7620 To,

      .
      const \n-001bdfd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *EndpointR\n-001be000: 6566 6572 656e 6365 2c20 3c2f 6469 763e eference,
      \n-001be010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      const \n-001be060: 6368 6172 3c2f 7370 616e 3e20 2a54 7970 char *Typ\n-001be070: 6573 2c20 3c2f 6469 763e 0a3c 6469 7620 es,
      .
      const \n-001be0b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *Scopes, <\n-001be0e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      co\n-001be110: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001be140: 202a 4d61 7463 6842 792c 203c 2f64 6976 *MatchBy, .
      const<\n-001be180: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *XA\n-001be1b0: 6464 7273 2c20 3c2f 6469 763e 0a3c 6469 ddrs,
      .<\n-001be1d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be1e0: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype\">unsigne\n-001be1f0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d int Me\n-001be220: 7461 6461 7461 5665 7273 696f 6e29 3c2f tadataVersion).
      vo\n-001be290: 6964 3c2f 7370 616e 3e20 7773 6464 5f65 id wsdd_e\n-001be2a0: 7665 6e74 5f42 7965 283c 7370 616e 2063 vent_Bye(s\n-001be2c0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001be330: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      unsigned int<\n-001be390: 2f73 7061 6e3e 2049 6e73 7461 6e63 6549 /span> InstanceI\n-001be3a0: 642c 203c 2f64 6976 3e0a 3c64 6976 2063 d,
      .
      const <\n-001be3e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be3f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *SequenceId\n-001be410: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      unsigned i\n-001be470: 6e74 3c2f 7370 616e 3e20 4d65 7373 6167 nt Messag\n-001be480: 654e 756d 6265 722c 203c 2f64 6976 3e0a eNumber,
      .\n-001be490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      const c\n-001be4e0: 6861 723c 2f73 7061 6e3e 202a 4d65 7373 har *Mess\n-001be4f0: 6167 6549 442c 203c 2f64 6976 3e0a 3c64 ageID,
      .\n-001be510: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001be550: 723c 2f73 7061 6e3e 202a 5265 6c61 7465 r *Relate\n-001be560: 7354 6f2c 203c 2f64 6976 3e0a 3c64 6976 sTo,
      .const
      \n-001be5a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001be5c0: 2f73 7061 6e3e 202a 456e 6470 6f69 6e74 /span> *Endpoint\n-001be5d0: 5265 6665 7265 6e63 652c 203c 2f64 6976 Reference, .
      const<\n-001be610: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Ty\n-001be640: 7065 732c 203c 2f64 6976 3e0a 3c64 6976 pes,
      .const
      \n-001be680: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001be6a0: 2f73 7061 6e3e 202a 5363 6f70 6573 2c20 /span> *Scopes, \n-001be6b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      c\n-001be6e0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *MatchBy, .
      const\n-001be750: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *X\n-001be780: 4164 6472 732c 203c 2f64 6976 3e0a 3c64 Addrs,
      .\n-001be7a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n-001be7c0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int M\n-001be7f0: 6574 6164 6174 6156 6572 7369 6f6e 293c etadataVersion)<\n-001be800: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.
      soap_wsdd_m\n-001be850: 6f64 6520 7773 6464 5f65 7665 6e74 5f50 ode wsdd_event_P\n-001be860: 726f 6265 283c 7370 616e 2063 6c61 7373 robe(struc\n-001be880: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001be8b0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, .
      const<\n-001be920: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Me\n-001be950: 7373 6167 6549 442c 203c 2f64 6976 3e0a ssageID,
      .\n-001be960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      const c\n-001be9b0: 6861 723c 2f73 7061 6e3e 202a 5265 706c har *Repl\n-001be9c0: 7954 6f2c 203c 2f64 6976 3e0a 3c64 6976 yTo,
      .const\n-001bea00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001bea20: 2f73 7061 6e3e 202a 5479 7065 732c 203c /span> *Types, <\n-001bea30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      co\n-001bea60: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001bea90: 202a 5363 6f70 6573 2c20 3c2f 6469 763e *Scopes,
      \n-001beaa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      const \n-001beaf0: 6368 6172 3c2f 7370 616e 3e20 2a4d 6174 char *Mat\n-001beb00: 6368 4279 2c20 3c2f 6469 763e 0a3c 6469 chBy,
      .<\n-001beb20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001beb30: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct wsdd__ProbeMa\n-001beb50: 7463 6865 7354 7970 6520 2a50 726f 6265 tchesType *Probe\n-001beb60: 4d61 7463 6865 7329 3c2f 6469 763e 0a3c Matches)
      .<\n-001beb70: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>
      void wsdd_event_P\n-001bebe0: 726f 6265 4d61 7463 6865 7328 3c73 7061 robeMatches(struct \n-001bec10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001bec40: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001bec70: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      unsigned i\n-001becd0: 6e74 3c2f 7370 616e 3e20 496e 7374 616e nt Instan\n-001bece0: 6365 4964 2c20 3c2f 6469 763e 0a3c 6469 ceId,
      .<\n-001bed00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bed10: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001bed40: 3c2f 7370 616e 3e20 2a53 6571 7565 6e63 *Sequenc\n-001bed50: 6549 642c 203c 2f64 6976 3e0a 3c64 6976 eId,
      .unsigned\n-001bed90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Mes\n-001bedc0: 7361 6765 4e75 6d62 6572 2c20 3c2f 6469 sageNumber, .
      const\n-001bee00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *M\n-001bee30: 6573 7361 6765 4944 2c20 3c2f 6469 763e essageID,
      \n-001bee40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      const \n-001bee90: 6368 6172 3c2f 7370 616e 3e20 2a52 656c char *Rel\n-001beea0: 6174 6573 546f 2c20 3c2f 6469 763e 0a3c atesTo,
      .<\n-001beeb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001beec0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct wsdd__Probe\n-001beef0: 4d61 7463 6865 7354 7970 6520 2a50 726f MatchesType *Pro\n-001bef00: 6265 4d61 7463 6865 7329 3c2f 6469 763e beMatches)

      \n-001bef10: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
      \n-001bef50: 736f 6170 5f77 7364 645f 6d6f 6465 2077 soap_wsdd_mode w\n-001bef60: 7364 645f 6576 656e 745f 5265 736f 6c76 sdd_event_Resolv\n-001bef70: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa\n-001befc0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001beff0: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
      .<\n-001bf000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bf010: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001bf050: 6172 3c2f 7370 616e 3e20 2a4d 6573 7361 ar *Messa\n-001bf060: 6765 4944 2c20 3c2f 6469 763e 0a3c 6469 geID,
      .<\n-001bf080: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bf090: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001bf0c0: 3c2f 7370 616e 3e20 2a52 6570 6c79 546f *ReplyTo\n-001bf0d0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      const char *EndpointRef\n-001bf140: 6572 656e 6365 2c20 3c2f 6469 763e 0a3c erence,
      .<\n-001bf150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bf160: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct wsdd__Resol\n-001bf190: 7665 4d61 7463 6865 7354 7970 6520 2a52 veMatchesType *R\n-001bf1a0: 6573 6f6c 7665 4d61 7463 6865 7329 3c2f esolveMatches).
      vo\n-001bf210: 6964 3c2f 7370 616e 3e20 7773 6464 5f65 id wsdd_e\n-001bf220: 7665 6e74 5f52 6573 6f6c 7665 4d61 7463 vent_ResolveMatc\n-001bf230: 6865 7328 3c73 7061 6e20 636c 6173 733d hes(struct\n-001bf250: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-001bf280: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-001bf2b0: 736f 6170 3c2f 613e 2c20 3c2f 6469 763e soap,
      \n-001bf2c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      uns\n-001bf2f0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int InstanceId, .
      con\n-001bf360: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n-001bf390: 2a53 6571 7565 6e63 6549 642c 203c 2f64 *SequenceId, .
      \n-001bf3d0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n-001bf3e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int MessageNumb\n-001bf410: 6572 2c20 3c2f 6469 763e 0a3c 6469 7620 er,
      .
      const \n-001bf450: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *MessageID\n-001bf480: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      const char *RelatesTo, \n-001bf4f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      c\n-001bf520: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *EndpointRefer\n-001bf560: 656e 6365 2c20 3c2f 6469 763e 0a3c 6469 ence,
      .<\n-001bf580: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bf590: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001bf5c0: 3c2f 7370 616e 3e20 2a54 7970 6573 2c20 *Types, \n-001bf5d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      c\n-001bf600: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *Scopes, .
      const<\n-001bf670: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Ma\n-001bf6a0: 7463 6842 792c 203c 2f64 6976 3e0a 3c64 tchBy,
      .\n-001bf6c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001bf700: 723c 2f73 7061 6e3e 202a 5841 6464 7273 r *XAddrs\n-001bf710: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      unsigned i\n-001bf770: 6e74 3c2f 7370 616e 3e20 4d65 7461 6461 nt Metada\n-001bf780: 7461 5665 7273 696f 6e29 3c2f 6469 763e taVersion)
      \n-001bf790: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

      These\n-001bf7b0: 2065 7665 6e74 2068 616e 646c 6572 7320 event handlers \n-001bf7c0: 7769 6c6c 2062 6520 696e 766f 6b65 6420 will be invoked \n-001bf7d0: 7768 656e 2069 6e62 6f75 6e64 2057 532d when inbound WS-\n-001bf7e0: 4469 7363 6f76 6572 7920 6d65 7373 6167 Discovery messag\n-001bf7f0: 6573 2061 7272 6976 6520 7573 696e 673a es arrive using:\n-001bf800: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      if\n-001bf850: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap_valid_\n-001bf8b0: 736f 636b 6574 3c2f 613e 283c 6120 636c socket(soap_\n-001bf910: 6269 6e64 3c2f 613e 283c 6120 636c 6173 bind(\n-001bf940: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n-001bf950: 3c61 2063 6c61 7373 3d22 636f 6465 2220 port, BACKLOG))) .
      ... // error
      .
      <\n-001bfae0: 703e 7768 6963 6820 7769 6c6c 206c 6973 p>which will lis\n-001bfaf0: 7465 6e20 666f 7220 3c63 6f64 653e 7469 ten for ti\n-001bfb00: 6d65 6f75 743c 2f63 6f64 653e 2073 6563 meout sec\n-001bfb10: 6f6e 6473 2074 6f20 696e 626f 756e 6420 onds to inbound \n-001bfb20: 5753 2d44 6973 636f 7665 7279 206d 6573 WS-Discovery mes\n-001bfb30: 7361 6765 7320 6f6e 2061 2070 6f72 7420 sages on a port \n-001bfb40: 616e 6420 6469 7370 6174 6368 6573 2074 and dispatches t\n-001bfb50: 6865 6d20 746f 2074 6865 2065 7665 6e74 hem to the event\n-001bfb60: 2068 616e 646c 6572 732e 2041 206e 6567 handlers. A neg\n-001bfb70: 6174 6976 6520 3c63 6f64 653e 7469 6d65 ative time\n-001bfb80: 6f75 743c 2f63 6f64 653e 2076 616c 7565 out value\n-001bfb90: 2073 7065 6369 6669 6573 2074 6865 2074 specifies the t\n-001bfba0: 696d 656f 7574 2069 6e20 6d69 6372 6f73 imeout in micros\n-001bfbb0: 6563 6f6e 6473 2e3c 2f70 3e0a 3c70 3e46 econds.

      .

      F\n-001bfbc0: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n-001bfbd0: 2073 6565 2074 6865 203c 6120 6872 6566 see the W\n-001bfc00: 532d 4469 7363 6f76 6572 7920 706c 7567 S-Discovery plug\n-001bfc10: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta\n-001bfc20: 7469 6f6e 2e3c 2f70 3e0a 3c68 313e 3c61 tion.

      .

      <\n-001bfc50: 2f61 3e0a 436f 7079 7269 6768 743c 2f68 /a>.Copyright.

      Copyri\n-001bfc70: 6768 7420 2863 2920 3230 3030 2d32 3032 ght (c) 2000-202\n-001bfc80: 302c 2052 6f62 6572 7420 412e 2076 616e 0, Robert A. van\n-001bfc90: 2045 6e67 656c 656e 2c20 4765 6e69 7669 Engelen, Genivi\n-001bfca0: 6120 496e 632e 3c62 7220 202f 3e0a 416c a Inc.
      .Al\n-001bfcb0: 6c20 7269 6768 7473 2072 6573 6572 7665 l rights reserve\n-001bfcc0: 642e 3c2f 656d 3e20 3c2f 703e 0a3c 2f64 d.

      .

      .
      \n-001bfcf0: 3c21 2d2d 2063 6f6e 7465 6e74 7320 2d2d .\n-001bfd30: 0a3c 6164 6472 6573 7320 636c 6173 733d .
      .Copyri\n-001bfd50: 6768 7420 2843 2920 3230 3231 2c20 526f ght (C) 2021, Ro\n-001bfd60: 6265 7274 2076 616e 2045 6e67 656c 656e bert van Engelen\n-001bfd70: 2c20 4765 6e69 7669 6120 496e 632e 2c20 , Genivia Inc., \n-001bfd80: 416c 6c20 5269 6768 7473 2052 6573 6572 All Rights Reser\n-001bfd90: 7665 642e 0a3c 2f61 6464 7265 7373 3e0a ved..
      .\n-001bfda0: 3c61 6464 7265 7373 2063 6c61 7373 3d22
      .\n-001bfdc0: 436f 6e76 6572 7465 6420 6f6e 204d 6f6e Converted on Mon\n-001bfdd0: 204d 6172 2038 2032 3032 3120 3133 3a30 Mar 8 2021 13:0\n-001bfde0: 363a 3233 2062 7920 3c61 2074 6172 6765 6:23 by Doxygen \n-001bfe30: 312e 392e 313c 2f73 6d61 6c6c 3e3c 2f61 1.9.1.
      ..<\n-001bfe80: 2f62 6f64 793e 0a3c 2f68 746d 6c3e 0a /body>..\n+0018f160: 673c 2f61 3e20 6966 206e 6f74 2061 6c72 g if not alr\n+0018f170: 6561 6479 2069 6e73 7461 6c6c 6564 206f eady installed o\n+0018f180: 6e20 796f 7572 2073 7973 7465 6d2e 2043 n your system. C\n+0018f190: 6f6d 7069 6c65 203c 656d 3e3c 636f 6465 ompile gsoap/stdsoap2.\n+0018f1b0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp
      \n+0018f1c0: 286f 7220 3c65 6d3e 3c63 6f64 653e 6773 (or gs\n+0018f1d0: 6f61 702f 7374 6473 6f61 7032 2e63 3c2f oap/stdsoap2.c) and \n+0018f1f0: 616c 6c20 796f 7572 2073 6f75 7263 6573 all your sources\n+0018f200: 2074 6861 7420 696e 636c 7564 6520 3c65 that include gsoap/st\n+0018f220: 6473 6f61 7032 2e68 3c2f 636f 6465 3e3c dsoap2.h<\n+0018f230: 2f65 6d3e 206f 7220 3c65 6d3e 3c63 6f64 /em> or soapH.h\n+0018f250: 3c2f 656d 3e20 7769 7468 2063 6f6d 7069 with compi\n+0018f260: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_GZIP and link yo\n+0018f290: 7572 2063 6f64 6520 7769 7468 2074 6865 ur code with the\n+0018f2a0: 205a 6c69 6220 6c69 6272 6172 792c 2065 Zlib library, e\n+0018f2b0: 2e67 2e20 3c62 3e3c 636f 6465 3e2d 6c7a .g. -lz\n+0018f2c0: 3c2f 636f 6465 3e3c 2f62 3e20 6f6e 2055 on U\n+0018f2d0: 6e69 782f 4c69 6e75 7820 706c 6174 666f nix/Linux platfo\n+0018f2e0: 726d 732e 3c2f 703e 0a3c 703e 5468 6520 rms.

      .

      The \n+0018f2f0: 677a 6970 2063 6f6d 7072 6573 7369 6f6e gzip compression\n+0018f300: 2069 7320 6f72 7468 6f67 6f6e 616c 2074 is orthogonal t\n+0018f310: 6f20 616c 6c20 7472 616e 7370 6f72 7420 o all transport \n+0018f320: 656e 636f 6469 6e67 7320 7375 6368 2061 encodings such a\n+0018f330: 7320 4854 5450 2c20 5353 4c2c 2044 494d s HTTP, SSL, DIM\n+0018f340: 452c 2061 6e64 2063 616e 2062 6520 7573 E, and can be us\n+0018f350: 6564 2077 6974 6820 6f74 6865 7220 7472 ed with other tr\n+0018f360: 616e 7370 6f72 7420 6c61 7965 7273 2e20 ansport layers. \n+0018f370: 596f 7520 6361 6e20 6576 656e 2073 6176 You can even sav\n+0018f380: 6520 616e 6420 6c6f 6164 2063 6f6d 7072 e and load compr\n+0018f390: 6573 7365 6420 584d 4c20 6461 7461 2074 essed XML data t\n+0018f3a0: 6f2f 6672 6f6d 2066 696c 6573 2e3c 2f70 o/from files..

      Two compres\n+0018f3c0: 7369 6f6e 2066 6f72 6d61 7473 2061 7265 sion formats are\n+0018f3d0: 2073 7570 706f 7274 6564 2062 7920 7468 supported by th\n+0018f3e0: 6520 656e 6769 6e65 3a20 6465 666c 6174 e engine: deflat\n+0018f3f0: 6520 616e 6420 677a 6970 2e20 5468 6520 e and gzip. The \n+0018f400: 677a 6970 2066 6f72 6d61 7420 6973 2075 gzip format is u\n+0018f410: 7365 6420 6279 2064 6566 6175 6c74 2e20 sed by default. \n+0018f420: 5468 6520 677a 6970 2066 6f72 6d61 7420 The gzip format \n+0018f430: 6861 7320 7365 7665 7261 6c20 6265 6e65 has several bene\n+0018f440: 6669 7473 206f 7665 7220 6465 666c 6174 fits over deflat\n+0018f450: 652e 2046 6972 7374 6c79 2c20 7468 6520 e. Firstly, the \n+0018f460: 656e 6769 6e65 2061 7574 6f6d 6174 6963 engine automatic\n+0018f470: 616c 6c79 2064 6574 6563 7473 2067 7a69 ally detects gzi\n+0018f480: 7020 636f 6d70 7265 7373 6564 2069 6e62 p compressed inb\n+0018f490: 6f75 6e64 206d 6573 7361 6765 732c 2065 ound messages, e\n+0018f4a0: 7665 6e20 7769 7468 6f75 7420 4854 5450 ven without HTTP\n+0018f4b0: 2068 6561 6465 7273 2c20 6279 2063 6865 headers, by che\n+0018f4c0: 636b 696e 6720 666f 7220 7468 6520 7072 cking for the pr\n+0018f4d0: 6573 656e 6365 206f 6620 6120 677a 6970 esence of a gzip\n+0018f4e0: 2068 6561 6465 7220 696e 2074 6865 206d header in the m\n+0018f4f0: 6573 7361 6765 2063 6f6e 7465 6e74 2e20 essage content. \n+0018f500: 5365 636f 6e64 6c79 2c20 677a 6970 2069 Secondly, gzip i\n+0018f510: 6e63 6c75 6465 7320 6120 4352 4333 3220 ncludes a CRC32 \n+0018f520: 6368 6563 6b73 756d 2074 6f20 656e 7375 checksum to ensu\n+0018f530: 7265 206d 6573 7361 6765 7320 6861 7665 re messages have\n+0018f540: 2062 6565 6e20 636f 7272 6563 746c 7920 been correctly \n+0018f550: 7265 6365 6976 6564 2e20 5468 6972 646c received. Thirdl\n+0018f560: 792c 2067 7a69 7020 636f 6d70 7265 7373 y, gzip compress\n+0018f570: 6564 2063 6f6e 7465 6e74 2063 616e 2062 ed content can b\n+0018f580: 6520 6465 636f 6d70 7265 7373 6564 2077 e decompressed w\n+0018f590: 6974 6820 6f74 6865 7220 636f 6d70 7265 ith other compre\n+0018f5a0: 7373 696f 6e20 736f 6674 7761 7265 2c20 ssion software, \n+0018f5b0: 736f 2079 6f75 2063 616e 2064 6563 6f6d so you can decom\n+0018f5c0: 7072 6573 7320 584d 4c20 6461 7461 2073 press XML data s\n+0018f5d0: 6176 6564 2062 7920 6120 6753 4f41 5020 aved by a gSOAP \n+0018f5e0: 6170 706c 6963 6174 696f 6e20 696e 2067 application in g\n+0018f5f0: 7a69 7020 666f 726d 6174 2e3c 2f70 3e0a zip format.

      .\n+0018f600: 3c70 3e47 7a69 7020 636f 6d70 7265 7373

      Gzip compress\n+0018f610: 696f 6e20 6973 2065 6e61 626c 6564 2062 ion is enabled b\n+0018f620: 7920 636f 6d70 696c 696e 6720 7468 6520 y compiling the \n+0018f630: 736f 7572 6365 7320 7769 7468 2063 6f6d sources with com\n+0018f640: 7069 6c65 2d74 696d 6520 666c 6167 203c pile-time flag <\n+0018f650: 636f 6465 3e23 5749 5448 5f47 5a49 503c code>#WITH_GZIP<\n+0018f660: 2f63 6f64 653e 2e20 546f 2074 7261 6e73 /code>. To trans\n+0018f670: 6d69 7420 677a 6970 2063 6f6d 7072 6573 mit gzip compres\n+0018f680: 7365 6420 534f 4150 2f58 4d4c 2064 6174 sed SOAP/XML dat\n+0018f690: 612c 2073 6574 2074 6865 206f 7574 7075 a, set the outpu\n+0018f6a0: 7420 6d6f 6465 2066 6c61 6773 2074 6f20 t mode flags to \n+0018f6b0: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n+0018f6c0: 5a4c 4942 3c2f 636f 6465 3e2e 2046 6f72 ZLIB. For\n+0018f6d0: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

      .
      soap_\n+0018f760: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); \n+0018f7a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      so\n+0018f810: 6170 5f73 6574 5f6f 6d6f 6465 3c2f 613e ap_set_omode\n+0018f820: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0018f850: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_E\n+0018f8b0: 4e43 5f5a 4c49 423c 2f61 3e29 3b20 3c73 NC_ZLIB); // enable Zl\n+0018f8e0: 6962 2623 3339 3b73 2067 7a69 7020 3c2f ib's gzip
      .if (soap_call_ns_\n+0018f940: 5f6d 794d 6574 686f 6428 2661 6d70 3b3c _myMethod(&<\n+0018f950: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0018f960: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0018f970: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0018f980: 2e2e 2e29 2920 3c2f 6469 763e 0a3c 6469 ...))
      . \n+0018f9a0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+0018f9c0: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
      \n+0018f9d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      els\n+0018fa00: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
      .<\n+0018fa10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0018fa20: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n+0018fa40: 7375 6363 6573 733c 2f73 7061 6e3e 3c2f success.
      soap\n+0018fac0: 5f63 6c72 5f6f 6d6f 6465 3c2f 613e 2826 _clr_omode(&\n+0018fad0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0018fb00: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, SOAP_ENC\n+0018fb60: 5f5a 4c49 423c 2f61 3e29 3b20 3c73 7061 _ZLIB); // disable Zli\n+0018fb90: 6226 2333 393b 7320 677a 6970 203c 2f73 b's gzip
      .<\n+0018fc70: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0018fc80: 6922 3e23 6465 6669 6e65 2053 4f41 505f i\">#define SOAP_\n+0018fc90: 454e 435f 5a4c 4942 3c2f 6469 763e 3c64 ENC_ZLIB
      soap_mode ENC o\n+0018fcc0: 7574 7075 7420 666c 6167 2076 616c 7565 utput flag value\n+0018fcd0: 2074 6f20 636f 6d70 7265 7373 206d 6573 to compress mes\n+0018fce0: 7361 6765 7320 7365 6e74 2c20 7265 7175 sages sent, requ\n+0018fcf0: 6972 6573 207a 6c69 6220 656e 6162 6c65 ires zlib enable\n+0018fd00: 6420 7769 7468 2063 6f6d 7069 6c65 2d74 d with compile-t\n+0018fd10: 696d 6520 666c 2e2e 2e3c 2f64 6976 3e3c ime fl...
      <\n+0018fd20: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+0018fd30: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+0018fd40: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+0018fd50: 3137 3838 3c2f 6469 763e 3c2f 6469 763e 1788
    \n+0018fd60: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    This \n+0018fd80: 7769 6c6c 2073 656e 6420 6120 636f 6d70 will send a comp\n+0018fd90: 7265 7373 6564 2053 4f41 502f 584d 4c20 ressed SOAP/XML \n+0018fda0: 7265 7175 6573 7420 746f 2061 2073 6572 request to a ser\n+0018fdb0: 7669 6365 2c20 7072 6f76 6964 6564 2074 vice, provided t\n+0018fdc0: 6861 7420 5a6c 6962 2069 7320 696e 7374 hat Zlib is inst\n+0018fdd0: 616c 6c65 6420 616e 6420 6c69 6e6b 6564 alled and linked\n+0018fde0: 2077 6974 6820 7468 6520 6170 706c 6963 with the applic\n+0018fdf0: 6174 696f 6e20 616e 6420 7468 6520 636f ation and the co\n+0018fe00: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n+0018fe10: 3c63 6f64 653e 2357 4954 485f 475a 4950 #WITH_GZIP\n+0018fe20: 3c2f 636f 6465 3e20 6f70 7469 6f6e 2077 option w\n+0018fe30: 6173 2075 7365 6420 746f 2063 6f6d 7069 as used to compi\n+0018fe40: 6c65 2074 6865 2073 6f75 7263 6573 2e20 le the sources. \n+0018fe50: 5265 6365 6976 696e 6720 636f 6d70 7265 Receiving compre\n+0018fe60: 7373 6564 2053 4f41 502f 584d 4c20 6f76 ssed SOAP/XML ov\n+0018fe70: 6572 2048 5454 5020 6569 7468 6572 2069 er HTTP either i\n+0018fe80: 6e20 677a 6970 206f 7220 6465 666c 6174 n gzip or deflat\n+0018fe90: 6520 666f 726d 6174 7320 6973 2061 7574 e formats is aut\n+0018fea0: 6f6d 6174 6963 2e20 5468 6520 3c63 6f64 omatic. The #SOAP_ENC_ZLIB\n+0018fec0: 3c2f 636f 6465 3e20 666c 6167 2064 6f65 flag doe\n+0018fed0: 7320 6e6f 7420 6861 7665 2074 6f20 6265 s not have to be\n+0018fee0: 2073 6574 2061 7420 7468 6520 7365 7276 set at the serv\n+0018fef0: 6572 2073 6964 6520 746f 2061 6363 6570 er side to accep\n+0018ff00: 7420 636f 6d70 7265 7373 6564 206d 6573 t compressed mes\n+0018ff10: 7361 6765 732e 2052 6561 6469 6e67 2061 sages. Reading a\n+0018ff20: 6e64 2072 6563 6569 7669 6e67 2067 7a69 nd receiving gzi\n+0018ff30: 7020 636f 6d70 7265 7373 6564 2053 4f41 p compressed SOA\n+0018ff40: 502f 584d 4c20 7769 7468 6f75 7420 4854 P/XML without HT\n+0018ff50: 5450 2068 6561 6465 7273 2028 652e 672e TP headers (e.g.\n+0018ff60: 2077 6974 6820 6f74 6865 7220 7472 616e with other tran\n+0018ff70: 7370 6f72 7420 7072 6f74 6f63 6f6c 7329 sport protocols)\n+0018ff80: 2069 7320 616c 736f 2061 7574 6f6d 6174 is also automat\n+0018ff90: 6963 2e3c 2f70 3e0a 3c70 3e54 6f20 636f ic.

    .

    To co\n+0018ffa0: 6e74 726f 6c20 7468 6520 6c65 7665 6c20 ntrol the level \n+0018ffb0: 6f66 2063 6f6d 7072 6573 7369 6f6e 2066 of compression f\n+0018ffc0: 6f72 206f 7574 626f 756e 6420 6d65 7373 or outbound mess\n+0018ffd0: 6167 6573 2c20 796f 7520 6361 6e20 7365 ages, you can se\n+0018ffe0: 7420 7468 6520 3c63 6f64 653e 3c61 2063 t the \n+001900a0: 736f 6170 3a3a 7a5f 6c65 7665 6c3c 2f61 soap::z_level to a va\n+001900c0: 6c75 6520 6265 7477 6565 6e20 3120 616e lue between 1 an\n+001900d0: 6420 392c 2077 6865 7265 2031 2069 7320 d 9, where 1 is \n+001900e0: 7468 6520 6265 7374 2073 7065 6564 2061 the best speed a\n+001900f0: 6e64 2039 2069 7320 7468 6520 6265 7374 nd 9 is the best\n+00190100: 2063 6f6d 7072 6573 7369 6f6e 2028 6465 compression (de\n+00190110: 6661 756c 7420 6973 2036 292e 2046 6f72 fault is 6). For\n+00190120: 2065 7861 6d70 6c65 3c2f 703e 0a3c 6469 example

    .
    soap_i\n+001901b0: 6e69 743c 2f61 3e28 2661 6d70 3b3c 6120 nit(&soap); <\n+001901f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+00190260: 705f 7365 745f 6f6d 6f64 653c 2f61 3e28 p_set_omode(\n+00190270: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+001902a0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , SOAP_EN\n+00190300: 435f 5a4c 4942 3c2f 613e 293b 203c 2f64 C_ZLIB); .
    soa\n+00190350: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.z\n+001903a0: 5f6c 6576 656c 3c2f 613e 203d 2039 3b20 _level = 9; \n+001903b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // best co\n+001903d0: 6d70 7265 7373 696f 6e20 3c2f 7370 616e mpression
    .To verify and m\n+001905b0: 6f6e 6974 6f72 2063 6f6d 7072 6573 7369 onitor compressi\n+001905c0: 6f6e 2072 6174 6573 2c20 796f 7520 6361 on rates, you ca\n+001905d0: 6e20 7573 6520 7468 6520 7661 6c75 6573 n use the values\n+001905e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::z_rati\n+001906a0: 6f5f 696e 3c2f 613e 3c2f 636f 6465 3e20 o_in \n+001906b0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::z_ratio\n+00190770: 5f6f 7574 3c2f 613e 3c2f 636f 6465 3e2e _out.\n+00190780: 2054 6865 7365 2074 776f 2066 6c6f 6174 These two float\n+00190790: 2076 616c 7565 7320 6c69 6520 6265 7477 values lie betw\n+001907a0: 6565 6e20 302e 3020 616e 6420 312e 3020 een 0.0 and 1.0 \n+001907b0: 616e 6420 6578 7072 6573 7320 7468 6520 and express the \n+001907c0: 7261 7469 6f20 6f66 2074 6865 2063 6f6d ratio of the com\n+001907d0: 7072 6573 7365 6420 6d65 7373 6167 6520 pressed message \n+001907e0: 6c65 6e67 7468 206f 7665 7220 756e 636f length over unco\n+001907f0: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message\n+00190800: 206c 656e 6774 682e 3c2f 703e 0a3c 6469 length.

    .
    i\n+00190850: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n+00190860: 616c 6c5f 6e73 5f5f 6d79 4d65 7468 6f64 all_ns__myMethod\n+00190870: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001908a0: 703c 2f61 3e2c 202e 2e2e 2929 3c2f 6469 p, ...)).
    {
    . \n+001908e0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+00190900: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    \n+00190910: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    else
    .
    {.
    printf("\n+001909c0: 436f 6d70 7265 7373 696f 6e20 7261 7469 Compression rati\n+001909d0: 6f3a 2025 6625 2520 2869 6e29 2025 6625 o: %f%% (in) %f%\n+001909e0: 2520 286f 7574 295c 6e26 7175 6f74 3b3c % (out)\\n"<\n+001909f0: 2f73 7061 6e3e 2c20 3130 302a 3c61 2063 /span>, 100*soap.z_ratio_out\n+00190a80: 3c2f 613e 2c20 3130 302a 3c61 2063 6c61 , 100*soap.z_ratio_in);
    .
    .\n+00190b30: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n+00190b50: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
    \n+00190b60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    float z_ratio_\n+00190c50: 696e 3c2f 6469 763e 3c64 6976 2063 6c61 in
    The c\n+00190c70: 6f6d 7072 6573 7369 6f6e 2072 6174 696f ompression ratio\n+00190c80: 203d 2063 6f6d 7072 6573 7365 642e 7369 = compressed.si\n+00190c90: 7a65 2f75 6e63 6f6d 7072 6573 7365 642e ze/uncompressed.\n+00190ca0: 7369 7a65 206f 6620 7468 6520 636f 6d70 size of the comp\n+00190cb0: 7265 7373 6564 206d 6573 7361 6765 2072 ressed message r\n+00190cc0: 6563 6569 7665 642e 3c2f 6469 763e 3c64 eceived.
    Definition:<\n+00190cf0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n+00190d00: 3730 393c 2f64 6976 3e3c 2f64 6976 3e0a 709
    .\n+00190d10: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::z\n+00190db0: 5f72 6174 696f 5f6f 7574 3c2f 613e 3c2f _ratio_out
    float z_\n+00190de0: 7261 7469 6f5f 6f75 743c 2f64 6976 3e3c ratio_out
    <\n+00190df0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00190e00: 223e 5468 6520 636f 6d70 7265 7373 696f \">The compressio\n+00190e10: 6e20 7261 7469 6f20 3d20 636f 6d70 7265 n ratio = compre\n+00190e20: 7373 6564 2e73 697a 652f 756e 636f 6d70 ssed.size/uncomp\n+00190e30: 7265 7373 6564 2e73 697a 6520 6f66 2074 ressed.size of t\n+00190e40: 6865 2063 6f6d 7072 6573 7365 6420 6d65 he compressed me\n+00190e50: 7373 6167 6520 7365 6e74 2e3c 2f64 6976 ssage sent.
    Definitio\n+00190e80: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00190e90: 683a 3337 3134 3c2f 6469 763e 3c2f 6469 h:3714
    .

    Not\n+00190ec0: 653a 206c 6f77 6572 2072 6174 696f 7320 e: lower ratios \n+00190ed0: 6d65 616e 2068 6967 6865 7220 636f 6d70 mean higher comp\n+00190ee0: 7265 7373 696f 6e20 7261 7465 732e 3c2f ression rates..

    Compressed\n+00190f00: 2074 7261 6e73 6665 7273 2072 6571 7569 transfers requi\n+00190f10: 7265 2062 7566 6665 7269 6e67 2074 6865 re buffering the\n+00190f20: 2065 6e74 6972 6520 6f75 7470 7574 206d entire output m\n+00190f30: 6573 7361 6765 2074 6f20 6465 7465 726d essage to determ\n+00190f40: 696e 6520 4854 5450 206d 6573 7361 6765 ine HTTP message\n+00190f50: 206c 656e 6774 682e 2054 6869 7320 6d65 length. This me\n+00190f60: 616e 7320 7468 6174 2074 6865 203c 636f ans that the #SOAP_IO_STOR\n+00190f80: 453c 2f63 6f64 653e 2066 6c61 6720 6973 E flag is\n+00190f90: 2061 7574 6f6d 6174 6963 616c 6c79 2073 automatically s\n+00190fa0: 6574 2077 6865 6e20 7468 6520 3c63 6f64 et when the #SOAP_ENC_ZLIB\n+00190fc0: 3c2f 636f 6465 3e20 666c 6167 2069 7320 flag is \n+00190fd0: 7365 7420 746f 2073 656e 6420 636f 6d70 set to send comp\n+00190fe0: 7265 7373 6564 206d 6573 7361 6765 732e ressed messages.\n+00190ff0: 2054 6865 2075 7365 206f 6620 4854 5450 The use of HTTP\n+00191000: 2063 6875 6e6b 696e 6720 7369 676e 6966 chunking signif\n+00191010: 6963 616e 746c 7920 7265 6475 6365 7320 icantly reduces \n+00191020: 6d65 6d6f 7279 2075 7361 6765 2061 6e64 memory usage and\n+00191030: 206d 6179 2073 7065 6564 2075 7020 7468 may speed up th\n+00191040: 6520 7472 616e 736d 6973 7369 6f6e 206f e transmission o\n+00191050: 6620 636f 6d70 7265 7373 6564 2053 4f41 f compressed SOA\n+00191060: 502f 584d 4c20 6d65 7373 6167 6573 2e20 P/XML messages. \n+00191070: 5468 6973 2069 7320 6163 636f 6d70 6c69 This is accompli\n+00191080: 7368 6564 2062 7920 7365 7474 696e 6720 shed by setting \n+00191090: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n+001910a0: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e20 IO_CHUNK \n+001910b0: 666c 6167 2077 6974 6820 3c63 6f64 653e flag with \n+001910c0: 2353 4f41 505f 454e 435f 5a4c 4942 3c2f #SOAP_ENC_ZLIB for the ou\n+001910e0: 7470 7574 206d 6f64 652e 2048 6f77 6576 tput mode. Howev\n+001910f0: 6572 2c20 736f 6d65 2057 6562 2073 6572 er, some Web ser\n+00191100: 7665 7273 2064 6f20 6e6f 7420 6163 6365 vers do not acce\n+00191110: 7074 2048 5454 5020 6368 756e 6b65 6420 pt HTTP chunked \n+00191120: 7265 7175 6573 7420 6d65 7373 6167 6573 request messages\n+00191130: 2028 6576 656e 2077 6865 6e20 7468 6579 (even when they\n+00191140: 2072 6574 7572 6e20 4854 5450 2063 6875 return HTTP chu\n+00191150: 6e6b 6564 206d 6573 7361 6765 7321 292e nked messages!).\n+00191160: 2053 7461 6e64 2d61 6c6f 6e65 2067 534f Stand-alone gSO\n+00191170: 4150 2073 6572 7669 6365 7320 616c 7761 AP services alwa\n+00191180: 7973 2061 6363 6570 7420 6368 756e 6b65 ys accept chunke\n+00191190: 6420 7265 7175 6573 7420 6d65 7373 6167 d request messag\n+001911a0: 6573 2e3c 2f70 3e0a 3c70 3e54 6f20 7265 es.

    .

    To re\n+001911b0: 7374 7269 6374 2074 6865 2063 6f6d 7072 strict the compr\n+001911c0: 6573 7369 6f6e 2074 6f20 7468 6520 6465 ession to the de\n+001911d0: 666c 6174 6520 666f 726d 6174 206f 6e6c flate format onl\n+001911e0: 792c 2063 6f6d 7069 6c65 2074 6865 2073 y, compile the s\n+001911f0: 6f75 7263 6573 2077 6974 6820 7468 6520 ources with the \n+00191200: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n+00191210: 6720 3c63 6f64 653e 2357 4954 485f 5a4c g #WITH_ZL\n+00191220: 4942 3c2f 636f 6465 3e2e 2054 6869 7320 IB. This \n+00191230: 6c69 6d69 7473 2063 6f6d 7072 6573 7369 limits compressi\n+00191240: 6f6e 2061 6e64 2064 6563 6f6d 7072 6573 on and decompres\n+00191250: 7369 6f6e 2074 6f20 7468 6520 6465 666c sion to the defl\n+00191260: 6174 6520 666f 726d 6174 2e20 4f6e 6c79 ate format. Only\n+00191270: 2070 6c61 696e 2061 6e64 2064 6566 6c61 plain and defla\n+00191280: 7465 6420 6d65 7373 6167 6573 2063 616e ted messages can\n+00191290: 2062 6520 6578 6368 616e 6765 642c 2067 be exchanged, g\n+001912a0: 7a69 7020 6973 206e 6f74 2073 7570 706f zip is not suppo\n+001912b0: 7274 6564 2077 6974 6820 7468 6973 206f rted with this o\n+001912c0: 7074 696f 6e2e 2052 6563 6569 7669 6e67 ption. Receiving\n+001912d0: 2067 7a69 7020 636f 6d70 7265 7373 6564 gzip compressed\n+001912e0: 2063 6f6e 7465 6e74 2069 7320 6175 746f content is auto\n+001912f0: 6d61 7469 632c 2065 7665 6e20 696e 2074 matic, even in t\n+00191300: 6865 2061 6273 656e 6365 206f 6620 4854 he absence of HT\n+00191310: 5450 2068 6561 6465 7273 2e20 5265 6365 TP headers. Rece\n+00191320: 6976 696e 6720 6465 666c 6174 6520 636f iving deflate co\n+00191330: 6d70 7265 7373 6564 2063 6f6e 7465 6e74 mpressed content\n+00191340: 2069 7320 6e6f 7420 6175 746f 6d61 7469 is not automati\n+00191350: 6320 696e 2074 6865 2061 6273 656e 6365 c in the absence\n+00191360: 206f 6620 4854 5450 2068 6561 6465 7273 of HTTP headers\n+00191370: 2061 6e64 2072 6571 7569 7265 7320 7468 and requires th\n+00191380: 6520 666c 6167 203c 636f 6465 3e23 534f e flag #SO\n+00191390: 4150 5f45 4e43 5f5a 4c49 423c 2f63 6f64 AP_ENC_ZLIB to be set for\n+001913b0: 2074 6865 2069 6e70 7574 206d 6f64 6520 the input mode \n+001913c0: 746f 2064 6563 6f6d 7072 6573 7320 6465 to decompress de\n+001913d0: 666c 6174 6564 2064 6174 612e 3c2f 703e flated data.

    \n+001913e0: 0a3c 646c 2063 6c61 7373 3d22 7365 6374 .
    WarningIt is important\n+00191420: 2074 6861 7420 7468 6520 3c63 6f64 653e that the \n+00191430: 2357 4954 485f 475a 4950 3c2f 636f 6465 #WITH_GZIP and #WIT\n+00191450: 485f 5a4c 4942 3c2f 636f 6465 3e20 6d61 H_ZLIB ma\n+00191460: 6372 6f73 206d 7573 7420 6265 2063 6f6e cros must be con\n+00191470: 7369 7374 656e 746c 7920 6465 6669 6e65 sistently define\n+00191480: 6420 746f 2063 6f6d 7069 6c65 2074 6865 d to compile the\n+00191490: 2073 6f75 7263 6573 2c20 7375 6368 2061 sources, such a\n+001914a0: 7320 3c65 6d3e 3c63 6f64 653e 6773 6f61 s gsoa\n+001914b0: 702f 7374 6473 6f61 7032 2e63 7070 3c2f p/stdsoap2.cpp, \n+001914d0: 3c63 6f64 653e 736f 6170 432e 6370 703c soapC.cpp<\n+001914e0: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, soapClien\n+00191500: 742e 6370 703c 2f63 6f64 653e 3c2f 656d t.cpp, soa\n+00191520: 7053 6572 7665 722e 6370 703c 2f63 6f64 pServer.cpp, and all\n+00191540: 2061 7070 6c69 6361 7469 6f6e 2073 6f75 application sou\n+00191550: 7263 6573 2074 6861 7420 696e 636c 7564 rces that includ\n+00191560: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n+00191570: 702f 7374 6473 6f61 7032 2e68 3c2f 636f p/stdsoap2.h or \n+00191590: 3c63 6f64 653e 736f 6170 482e 683c 2f63 soapH.h. If th\n+001915b0: 6520 6d61 6372 6f73 2061 7265 206e 6f74 e macros are not\n+001915c0: 2063 6f6e 7369 7374 656e 746c 7920 7573 consistently us\n+001915d0: 6564 2c20 7468 6520 6170 706c 6963 6174 ed, the applicat\n+001915e0: 696f 6e20 7769 6c6c 2063 7261 7368 2064 ion will crash d\n+001915f0: 7565 2074 6f20 6120 6d69 736d 6174 6368 ue to a mismatch\n+00191600: 6573 2069 6e20 7468 6520 6465 636c 6172 es in the declar\n+00191610: 6174 696f 6e20 616e 6420 6163 6365 7373 ation and access\n+00191620: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex\n+00191690: 742e 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e t.
    .

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

    .\n+00191700: 436c 6965 6e74 2d73 6964 6520 636f 6f6b Client-side cook\n+00191710: 6965 2073 7570 706f 7274 3c2f 6832 3e0a ie support

    .\n+00191720: 3c70 3e43 6c69 656e 742d 7369 6465 2063

    Client-side c\n+00191730: 6f6f 6b69 6520 7375 7070 6f72 7420 6973 ookie support is\n+00191740: 206f 7074 696f 6e61 6c2e 2054 6f20 656e optional. To en\n+00191750: 6162 6c65 2063 6f6f 6b69 6520 7375 7070 able cookie supp\n+00191760: 6f72 742c 2063 6f6d 7069 6c65 2061 6c6c ort, compile all\n+00191770: 2073 6f75 7263 6573 2077 6974 6820 7468 sources with th\n+00191780: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f\n+00191790: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n+001917a0: 434f 4f4b 4945 533c 2f63 6f64 653e 2c20 COOKIES, \n+001917b0: 666f 7220 6578 616d 706c 653a 203c 2f70 for example:

     c++ -DWI\n+001917e0: 5448 5f43 4f4f 4b49 4553 202d 6f20 6d79  TH_COOKIES -o my\n+001917f0: 636c 6965 6e74 2073 7464 736f 6170 322e  client stdsoap2.\n+00191800: 6370 7020 736f 6170 432e 6370 7020 736f  cpp soapC.cpp so\n+00191810: 6170 436c 6965 6e74 2e63 7070 0a3c 2f70  apClient.cpp.

    or add th\n+00191830: 6520 666f 6c6c 6f77 696e 6720 6c69 6e65 e following line\n+00191840: 2074 6f20 3c65 6d3e 3c63 6f64 653e 7374 to st\n+00191850: 6473 6f61 702e 683c 2f63 6f64 653e 3c2f dsoap.h:

    .
    <\n+00191880: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00191890: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#def\n+001918b0: 696e 6520 5749 5448 5f43 4f4f 4b49 4553 ine WITH_COOKIES\n+001918c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

    Client-s\n+001918f0: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo\n+00191900: 7274 2069 7320 6675 6c6c 7920 6175 746f rt is fully auto\n+00191910: 6d61 7469 632e 2053 6f20 6a75 7374 2063 matic. So just c\n+00191920: 6f6d 7069 6c65 203c 656d 3e3c 636f 6465 ompile gsoap/stdsoap2.\n+00191940: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n+00191950: 7769 7468 2074 6865 2063 6f6d 7069 6c65 with the compile\n+00191960: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_COOKIES to enable \n+00191990: 636f 6f6b 6965 2d62 6173 6564 2073 6573 cookie-based ses\n+001919a0: 7369 6f6e 2063 6f6e 7472 6f6c 2069 6e20 sion control in \n+001919b0: 796f 7572 2063 6c69 656e 742e 3c2f 703e your client.

    \n+001919c0: 0a3c 703e 4120 636f 6f6b 6965 2073 746f .

    A cookie sto\n+001919d0: 7265 2077 6974 6820 636f 6f6b 6965 7320 re with cookies \n+001919e0: 6973 206b 6570 7420 616e 6420 7265 7475 is kept and retu\n+001919f0: 726e 6564 2074 6f20 7468 6520 6170 7072 rned to the appr\n+00191a00: 6f70 7269 6174 6520 7365 7276 6572 7320 opriate servers \n+00191a10: 7768 656e 2074 6865 2063 6c69 656e 7420 when the client \n+00191a20: 636f 6e6e 6563 7473 2074 6f20 7468 6573 connects to thes\n+00191a30: 6520 7365 7276 6572 732e 2043 6f6f 6b69 e servers. Cooki\n+00191a40: 6573 2061 7265 206e 6f74 2061 7574 6f6d es are not autom\n+00191a50: 6174 6963 616c 6c79 2073 6176 6564 2074 atically saved t\n+00191a60: 6f20 6120 6669 6c65 2062 7920 6120 636c o a file by a cl\n+00191a70: 6965 6e74 2e20 416e 2065 7861 6d70 6c65 ient. An example\n+00191a80: 2063 6f6f 6b69 6520 6669 6c65 206d 616e cookie file man\n+00191a90: 6167 6572 2069 7320 696e 636c 7564 6564 ager is included\n+00191aa0: 2061 7320 616e 2065 7874 7261 7320 696e as an extras in\n+00191ab0: 2074 6865 2067 534f 4150 2070 6163 6b61 the gSOAP packa\n+00191ac0: 6765 2e20 596f 7520 6361 6e20 7265 6d6f ge. You can remo\n+00191ad0: 7665 2061 6c6c 2063 6f6f 6b69 6573 2066 ve all cookies f\n+00191ae0: 726f 6d20 6120 3c63 6f64 653e 3c61 2063 rom a soap\n+00191b40: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+00191b50: 6279 2063 616c 6c69 6e67 203c 636f 6465 by calling soap_free_cooki\n+00191b70: 6573 2873 6f61 7029 3c2f 636f 6465 3e2c es(soap),\n+00191b80: 2077 6869 6368 2061 6c73 6f20 6861 7070 which also happ\n+00191b90: 656e 7320 7768 656e 2079 6f75 2063 616c ens when you cal\n+00191ba0: 6c20 3c63 6f64 653e 736f 6170 5f64 6f6e l soap_don\n+00191bb0: 6528 736f 6170 293c 2f63 6f64 653e 2e3c e(soap).<\n+00191bc0: 2f70 3e0a 3c70 3e54 6f20 6176 6f69 6420 /p>.

    To avoid \n+00191bd0: 2263 6f6f 6b69 6520 7374 6f72 6d73 2220 \"cookie storms\" \n+00191be0: 6361 7573 6564 2062 7920 6d61 6c69 6369 caused by malici\n+00191bf0: 6f75 7320 7365 7276 6572 7320 7468 6174 ous servers that\n+00191c00: 2072 6574 7572 6e20 616e 2075 6e72 6561 return an unrea\n+00191c10: 736f 6e61 626c 6520 616d 6f75 6e74 206f sonable amount o\n+00191c20: 6620 636f 6f6b 6965 732c 2067 534f 4150 f cookies, gSOAP\n+00191c30: 2063 6c69 656e 7473 2f73 6572 7665 7273 clients/servers\n+00191c40: 2061 7265 206c 696d 6974 6564 2074 6f20 are limited to \n+00191c50: 6120 636f 6f6b 6965 2073 746f 7265 2073 a cookie store s\n+00191c60: 697a 6520 6f66 203c 636f 6465 3e3c 6120 ize of soap::cooki\n+00191d30: 655f 6d61 783c 2f61 3e3c 2f63 6f64 653e e_max\n+00191d40: 2074 6861 7420 7468 6520 7573 6572 2063 that the user c\n+00191d50: 616e 2063 6861 6e67 652c 2066 6f72 2065 an change, for e\n+00191d60: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

    .
    struct\n+00191db0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+00191de0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00191e10: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n+00191e70: 736f 6170 5f6e 6577 3c2f 613e 2829 3b20 soap_new(); \n+00191e80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .\n+00191f30: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n+00191fd0: 636f 6f6b 6965 5f6d 6178 3c2f 613e 3c2f cookie_max
    int cook\n+00192000: 6965 5f6d 6178 3c2f 6469 763e 3c64 6976 ie_max
    U\n+00192020: 7365 722d 6465 6669 6e61 626c 6520 6d61 ser-definable ma\n+00192030: 7869 6d75 6d20 6e75 6d62 6572 206f 6620 ximum number of \n+00192040: 6163 7469 7665 2063 6f6f 6b69 6573 2061 active cookies a\n+00192050: 6c6c 6f77 6564 2074 6f20 6265 2073 6574 llowed to be set\n+00192060: 2077 6974 6820 736f 6170 5f73 6574 5f63 with soap_set_c\n+00192070: 6f6f 6b69 6520 6265 666f 7265 2063 6f6f ookie before coo\n+00192080: 6b69 6520 2e2e 2e3c 2f64 6976 3e3c 6469 kie ...
    \n+001920a0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:29\n+001920c0: 3733 3c2f 6469 763e 3c2f 6469 763e 0a3c 73
    .<\n+001920d0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The coo\n+001920f0: 6b69 6520 7374 6f72 6520 6973 2061 206c kie store is a l\n+00192100: 696e 6b65 6420 6c69 7374 206f 6620 3c63 inked list of soap_\n+00192160: 636f 6f6b 6965 3c2f 613e 3c2f 636f 6465 cookie structures poi\n+00192180: 6e74 6564 2074 6f20 6279 203c 636f 6465 nted to by so\n+00192210: 6170 3a3a 636f 6f6b 6965 733c 2f61 3e3c ap::cookies<\n+00192220: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e53 /code>.

    .

    S\n+00192230: 696e 6365 2074 6865 2063 6f6f 6b69 6520 ince the cookie \n+00192240: 7374 6f72 6520 6973 206c 696e 6b65 6420 store is linked \n+00192250: 746f 2074 6865 2063 7572 7265 6e74 203c to the current <\n+00192260: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+001922c0: 2063 6f6e 7465 7874 2c20 616e 6420 6561 context, and ea\n+001922d0: 6368 2074 6872 6561 6420 6d75 7374 2075 ch thread must u\n+001922e0: 7365 2069 7473 206f 776e 2063 6f6e 7465 se its own conte\n+001922f0: 7874 2c20 6561 6368 2074 6872 6561 6420 xt, each thread \n+00192300: 616c 736f 2068 6173 2069 7473 206f 776e also has its own\n+00192310: 2063 6f6f 6b69 6520 7374 6f72 652e 3c2f cookie store..

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

    .

    .Server-sid\n+00192390: 6520 636f 6f6b 6965 2073 7570 706f 7274 e cookie support\n+001923a0: 3c2f 6832 3e0a 3c70 3e54 6869 7320 6665

    .

    This fe\n+001923b0: 6174 7572 6520 6973 206e 6f74 2072 6563 ature is not rec\n+001923c0: 6f6d 6d65 6e64 6564 2074 6f20 696d 706c ommended to impl\n+001923d0: 656d 656e 7420 7374 6174 6520 696e 2073 ement state in s\n+001923e0: 7461 6e64 2d61 6c6f 6e65 2073 6572 7665 tand-alone serve\n+001923f0: 7273 2e20 436f 6f6b 6965 7320 6d61 7920 rs. Cookies may \n+00192400: 7265 7175 6972 6520 6120 6661 6972 2061 require a fair a\n+00192410: 6d6f 756e 7420 6f66 2070 726f 6365 7373 mount of process\n+00192420: 696e 6720 6f76 6572 6865 6164 2061 6e64 ing overhead and\n+00192430: 2061 7265 206e 6f74 2069 6e20 6661 6374 are not in fact\n+00192440: 206e 6565 6465 6420 746f 2069 6d70 6c65 needed to imple\n+00192450: 6d65 6e74 2073 7461 7465 6675 6c20 7365 ment stateful se\n+00192460: 7276 6963 6573 2c20 7768 6963 6820 6973 rvices, which is\n+00192470: 2074 7970 6963 616c 6c79 2070 6572 666f typically perfo\n+00192480: 726d 6564 2077 6974 6820 7365 7373 696f rmed with sessio\n+00192490: 6e20 4944 7320 696e 2058 4d4c 2f4a 534f n IDs in XML/JSO\n+001924a0: 4e20 6d65 7373 6167 6573 206f 7220 6279 N messages or by\n+001924b0: 2070 6173 7369 6e67 2074 6865 2073 6573 passing the ses\n+001924c0: 7369 6f6e 2049 4473 2076 6961 2074 6865 sion IDs via the\n+001924d0: 2055 524c 2e3c 2f70 3e0a 3c70 3e53 6572 URL.

    .

    Ser\n+001924e0: 7665 722d 7369 6465 2063 6f6f 6b69 6520 ver-side cookie \n+001924f0: 7375 7070 6f72 7420 6973 206f 7074 696f support is optio\n+00192500: 6e61 6c2e 2054 6f20 656e 6162 6c65 2063 nal. To enable c\n+00192510: 6f6f 6b69 6520 7375 7070 6f72 742c 2063 ookie support, c\n+00192520: 6f6d 7069 6c65 2061 6c6c 2073 6f75 7263 ompile all sourc\n+00192530: 6573 2077 6974 6820 636f 6d70 696c 652d es with compile-\n+00192540: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n+00192550: 2357 4954 485f 434f 4f4b 4945 533c 2f63 #WITH_COOKIES:

    \n+00192580: 2063 2b2b 202d 4457 4954 485f 434f 4f4b   c++ -DWITH_COOK\n+00192590: 4945 5320 2d6f 206d 7973 6572 7665 7220  IES -o myserver \n+001925a0: 2e2e 2e0a 3c2f 7072 653e 3c70 3e20 5365  ....

    Se\n+001925b0: 6520 4150 4920 646f 6375 6d65 6e74 6174 e API documentat\n+001925c0: 696f 6e20 4d6f 6475 6c65 203c 6120 636c ion Module HTTP \n+00192600: 636f 6f6b 6965 2066 756e 6374 696f 6e73 cookie functions\n+00192610: 3c2f 613e 2066 6f72 2074 6865 2063 6f6f for the coo\n+00192620: 6b69 6520 4150 4920 6675 6e63 7469 6f6e kie API function\n+00192630: 732e 2053 6565 2074 6865 203c 6120 6872 s. See the HTTP session\n+00192670: 7320 706c 7567 696e 3c2f 613e 2066 6f72 s plugin for\n+00192680: 2048 5454 5020 7365 7373 696f 6e20 6d61 HTTP session ma\n+00192690: 6e61 6765 6d65 6e74 2077 6974 6820 636f nagement with co\n+001926a0: 6f6b 6965 7320 7468 6174 2069 7320 7265 okies that is re\n+001926b0: 7175 6972 6564 2066 6f72 2073 6572 7665 quired for serve\n+001926c0: 722d 7369 6465 2073 6573 7369 6f6e 2063 r-side session c\n+001926d0: 6f6e 7472 6f6c 2e20 5468 6520 3c63 6f64 ontrol. The #WITH_COOKIES<\n+001926f0: 2f63 6f64 653e 2066 6c61 6720 6973 2075 /code> flag is u\n+00192700: 7365 6c65 7373 2077 6974 686f 7574 2073 seless without s\n+00192710: 6572 7665 722d 7369 6465 2073 6573 7369 erver-side sessi\n+00192720: 6f6e 206d 616e 6167 656d 656e 7420 616e on management an\n+00192730: 6420 636f 6e74 726f 6c2e 3c2f 703e 0a3c d control.

    .<\n+00192740: 703e 4865 7265 2069 7320 616e 206f 7665 p>Here is an ove\n+00192750: 7276 6965 7720 6f66 2074 6865 2063 6f6f rview of the coo\n+00192760: 6b69 6520 4150 4920 6675 6e63 7469 6f6e kie API function\n+00192770: 733a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s:

    .
    .

    The fol\n+00195230: 6c6f 7769 6e67 2076 6172 6961 626c 6573 lowing variables\n+00195240: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex\n+001952b0: 7420 6172 6520 7573 6564 2074 6f20 6465 t are used to de\n+001952c0: 6669 6e65 2074 6865 2063 7572 7265 6e74 fine the current\n+001952d0: 2064 6f6d 6169 6e20 616e 6420 7061 7468 domain and path\n+001952e0: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c :

    .
      .
    • <\n+001952f0: 636f 6465 3e63 6f6e 7374 2063 6861 7220 code>const char \n+00195300: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::cookie\n+001953b0: 5f64 6f6d 6169 6e3c 2f61 3e3c 2f63 6f64 _domain should be set\n+001953d0: 2074 6f20 7468 6520 646f 6d61 696e 2028 to the domain (\n+001953e0: 686f 7374 2920 6f66 2074 6865 2073 6572 host) of the ser\n+001953f0: 7669 6365 3c2f 6c69 3e0a 3c6c 693e 3c63 vice
    • .
    • const char *\n+00195410: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::cookie_pa\n+001954c0: 7468 3c2f 613e 3c2f 636f 6465 3e20 6d61 th ma\n+001954d0: 7920 6265 2073 6574 2074 6f20 7468 6520 y be set to the \n+001954e0: 6465 6661 756c 7420 7061 7468 2074 6f20 default path to \n+001954f0: 7468 6520 7365 7276 6963 653c 2f6c 693e the service
    • \n+00195500: 0a3c 6c69 3e3c 636f 6465 3e69 6e74 203c .
    • int <\n+00195510: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00195520: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00195530: 6d6c 2361 3434 6264 3766 6338 6261 3038 ml#a44bd7fc8ba08\n+00195540: 6231 6465 6332 6630 3832 3939 6437 6637 b1dec2f08299d7f7\n+00195550: 3233 6464 2220 7469 746c 653d 2255 7365 23dd\" title=\"Use\n+00195560: 722d 6465 6669 6e61 626c 6520 6d61 7869 r-definable maxi\n+00195570: 6d75 6d20 6e75 6d62 6572 206f 6620 6163 mum number of ac\n+00195580: 7469 7665 2063 6f6f 6b69 6573 2061 6c6c tive cookies all\n+00195590: 6f77 6564 2074 6f20 6265 2073 6574 2077 owed to be set w\n+001955a0: 6974 6820 736f 6170 5f73 6574 5f63 6f6f ith soap_set_coo\n+001955b0: 6b69 6520 6265 666f 7265 2063 6f6f 6b69 kie before cooki\n+001955c0: 6520 2e2e 2e22 3e73 6f61 703a 3a63 6f6f e ...\">soap::coo\n+001955d0: 6b69 655f 6d61 783c 2f61 3e3c 2f63 6f64 kie_max maximum cooki\n+001955f0: 6520 6461 7461 6261 7365 2073 697a 6520 e database size \n+00195600: 2864 6566 6175 6c74 3d33 3229 3c2f 6c69 (default=32).
    .

    The <\n+00195620: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::cooki\n+001956d0: 655f 7061 7468 3c2f 613e 3c2f 636f 6465 e_path value is used \n+001956f0: 746f 2066 696c 7465 7220 636f 6f6b 6965 to filter cookie\n+00195700: 7320 696e 7465 6e64 6564 2066 6f72 2074 s intended for t\n+00195710: 6869 7320 7365 7276 6963 6520 6163 636f his service acco\n+00195720: 7264 696e 6720 746f 2074 6865 2070 6174 rding to the pat\n+00195730: 6820 7072 6566 6978 2072 756c 6573 206f h prefix rules o\n+00195740: 7574 6c69 6e65 6420 696e 2052 4643 3231 utlined in RFC21\n+00195750: 3039 2e3c 2f70 3e0a 3c70 3e54 6865 2066 09.

    .

    The f\n+00195760: 6f6c 6c6f 7769 6e67 2065 7861 6d70 6c65 ollowing example\n+00195770: 2073 6572 7665 7220 6164 6f70 7473 2063 server adopts c\n+00195780: 6f6f 6b69 6573 2066 6f72 2073 6573 7369 ookies for sessi\n+00195790: 6f6e 2063 6f6e 7472 6f6c 3a3c 2f70 3e0a on control:

    .\n+001957a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int mai\n+001957f0: 6e28 2920 3c2f 6469 763e 0a3c 6469 7620 n()
    .
    {.
    s\n+00195840: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    int m,\n+001958f0: 2073 3b20 3c2f 6469 763e 0a3c 6469 7620 s;
    .
    <\n+00195910: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00195920: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00195930: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00195940: 6761 3865 3033 3465 3161 3764 3630 3933 ga8e034e1a7d6093\n+00195950: 6561 6464 6331 3162 3634 3731 3739 3635 eaddc11b64717965\n+00195960: 3763 223e 736f 6170 5f69 6e69 743c 2f61 7c\">soap_init(&so\n+001959a0: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
    .\n+001959b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n+001959f0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.coo\n+00195a40: 6b69 655f 646f 6d61 696e 3c2f 613e 203d kie_domain =\n+00195a50: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00195a70: 6f74 3b2e 2e2e 2671 756f 743b 3c2f 7370 ot;...";
    . \n+00195aa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+00195ad0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 cookie_\n+00195b20: 7061 7468 3c2f 613e 203d 203c 7370 616e path = "/&q\n+00195b50: 756f 743b 3c2f 7370 616e 3e3b 203c 7370 uot;; // the path w\n+00195b80: 6869 6368 2069 7320 7573 6564 2074 6f20 hich is used to \n+00195b90: 6669 6c74 6572 2f73 6574 2063 6f6f 6b69 filter/set cooki\n+00195ba0: 6573 2077 6974 6820 7468 6973 2064 6573 es with this des\n+00195bb0: 7469 6e61 7469 6f6e 203c 2f73 7061 6e3e tination \n+00195bc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+00195c00: 6172 6763 2026 6c74 3b20 3229 203c 2f64 argc < 2) .
    {
    .\n+00195c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_\n+00195ca0: 6765 7465 6e76 5f63 6f6f 6b69 6573 3c2f getenv_cookies(&s\n+00195ce0: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); \n+00195d00: 2f2f 2043 4749 2061 7070 3a20 6772 6162 // CGI app: grab\n+00195d10: 2063 6f6f 6b69 6573 2066 726f 6d20 2623 cookies from &#\n+00195d20: 3339 3b48 5454 505f 434f 4f4b 4945 2623 39;HTTP_COOKIE&#\n+00195d30: 3339 3b20 656e 7620 7661 7220 3c2f 7370 39; env var
    .
    \n+00195d60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+00195db0: 736f 6170 5f73 6572 7665 3c2f 613e 2826 soap_serve(&\n+00195dc0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00195df0: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n+00195e10: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    else
    .
    {\n+00195e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ..
    \n+00196050: 6578 6974 2845 5849 545f 4641 494c 5552 exit(EXIT_FAILUR\n+00196060: 4529 3b20 3c2f 6469 763e 0a3c 6469 7620 E);
    .
    \n+00196080: 203c 7370 616e 2063 6c61 7373 3d22 6b65 for (int i = \n+001960d0: 313b 203b 2069 2b2b 2920 3c2f 6469 763e 1; ; i++)
    \n+001960e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n+00196100: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00196110: 3e20 2020 2020 2073 203d 203c 6120 636c > s = soap_\n+00196170: 6163 6365 7074 3c2f 613e 2826 616d 703b accept(&\n+00196180: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001961b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n+001961d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!soap_va\n+00196250: 6c69 645f 736f 636b 6574 3c2f 613e 2873 lid_socket(s\n+00196260: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n+00196280: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n+00196290: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .<\n+001962a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001962b0: 3e20 2020 2020 203c 6120 636c 6173 733d > soap_serv\n+00196310: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap); .
    soap_end(&a\n+001963d0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    ..
    \n+00196560: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    } \n+00196580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return 0;
    .}\n+001965e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ..
    {.
    con\n+00196720: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00196750: 2a63 6f6f 6b69 655f 7661 6c75 6520 3d20 *cookie_value = \n+00196760: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_cookie\n+001967c0: 5f76 616c 7565 3c2f 613e 283c 6120 636c _value(soap, "co\n+00196820: 6f6b 6965 5f6e 616d 6526 7175 6f74 3b3c okie_name"<\n+00196830: 2f73 7061 6e3e 2c20 4e55 4c4c 2c20 4e55 /span>, NULL, NU\n+00196840: 4c4c 293b 3c2f 6469 763e 0a3c 6469 7620 LL);
    .
    <\n+00196860: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00196870: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!cookie_valu\n+00196890: 6529 2020 2020 2020 2020 2020 2020 2020 e) \n+001968a0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // cooki\n+001968c0: 6520 7265 7475 726e 6564 2062 7920 636c e returned by cl\n+001968d0: 6965 6e74 3f20 3c2f 7370 616e 3e3c 2f64 ient? .
    cookie\n+00196900: 5f76 616c 7565 203d 203c 7370 616e 2063 _value = "initi\n+00196930: 616c 5f76 616c 7565 2671 756f 743b 3c2f al_value"; // \n+00196960: 6e6f 3a20 7365 7420 696e 6974 6961 6c20 no: set initial \n+00196970: 636f 6f6b 6965 2076 616c 7565 203c 2f73 cookie value
    .
    <\n+001969a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001969b0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n+001969e0: 2020 2e2e 2e20 2020 2020 2020 2020 2020 ... \n+001969f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00196a00: 2020 3c73 7061 6e20 636c 6173 733d 2263 // yes: \n+00196a20: 6d6f 6469 6679 2074 6865 2063 6f6f 6b69 modify the cooki\n+00196a30: 6520 7661 6c75 6520 746f 2072 6566 6c65 e value to refle\n+00196a40: 6374 2074 6865 206e 6577 2073 7461 7465 ct the new state\n+00196a50: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00196a70: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_set_\n+00196ad0: 636f 6f6b 6965 3c2f 613e 283c 6120 636c cookie(soap, "co\n+00196b30: 6f6b 6965 5f6e 616d 6526 7175 6f74 3b3c okie_name"<\n+00196b40: 2f73 7061 6e3e 2c20 636f 6f6b 6965 5f76 /span>, cookie_v\n+00196b50: 616c 7565 2c20 4e55 4c4c 2c20 4e55 4c4c alue, NULL, NULL\n+00196b60: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_set_cook\n+00196be0: 6965 5f65 7870 6972 653c 2f61 3e28 3c61 ie_expire(soap, <\n+00196c20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00196c30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00196c40: 3b63 6f6f 6b69 655f 6e61 6d65 2671 756f ;cookie_name&quo\n+00196c50: 743b 3c2f 7370 616e 3e2c 2036 302c 204e t;, 60, N\n+00196c60: 554c 4c2c 204e 554c 4c29 3b20 3c73 7061 ULL, NULL); // cookie expi\n+00196c90: 7265 7320 696e 2036 3020 7365 636f 6e64 res in 60 second\n+00196ca0: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
    .\n+00196cb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+00196ce0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+00196d40: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .
    co\n+00196e50: 6e73 7420 6368 6172 202a 2073 6f61 705f nst char * soap_\n+00196e60: 636f 6f6b 6965 5f76 616c 7565 2873 7472 cookie_value(str\n+00196e70: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00196e80: 636f 6e73 7420 6368 6172 202a 6e61 6d65 const char *name\n+00196e90: 2c20 636f 6e73 7420 6368 6172 202a 646f , const char *do\n+00196ea0: 6d61 696e 2c20 636f 6e73 7420 6368 6172 main, const char\n+00196eb0: 202a 7061 7468 293c 2f64 6976 3e3c 6469 *path)
    \n+00196ed0: 4765 7420 636f 6f6b 6965 2076 616c 7565 Get cookie value\n+00196ee0: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .\n+00197080: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    <\n+00197150: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00197160: 6922 3e69 6e74 2073 6f61 705f 6765 7465 i\">int soap_gete\n+00197170: 6e76 5f63 6f6f 6b69 6573 2873 7472 7563 nv_cookies(struc\n+00197180: 7420 736f 6170 202a 736f 6170 293c 2f64 t soap *soap)
    Get cookie\n+001971b0: 7320 6672 6f6d 2074 6865 2048 5454 505f s from the HTTP_\n+001971c0: 434f 4f4b 4945 2065 6e76 6972 6f6e 6d65 COOKIE environme\n+001971d0: 6e74 2076 6172 6961 626c 652e 3c2f 6469 nt variable.
    .
    soap_f\n+001972a0: 7265 655f 636f 6f6b 6965 733c 2f61 3e3c ree_cookies<\n+001972b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void so\n+001972d0: 6170 5f66 7265 655f 636f 6f6b 6965 7328 ap_free_cookies(\n+001972e0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+001972f0: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
    Free \n+00197310: 636f 6f6b 6965 732e 3c2f 6469 763e 3c2f cookies.
    .
    soap_set_c\n+001973e0: 6f6f 6b69 655f 6578 7069 7265 3c2f 613e ookie_expire\n+001973f0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n+00197410: 6170 5f73 6574 5f63 6f6f 6b69 655f 6578 ap_set_cookie_ex\n+00197420: 7069 7265 2873 7472 7563 7420 736f 6170 pire(struct soap\n+00197430: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+00197440: 6172 202a 6e61 6d65 2c20 6c6f 6e67 206d ar *name, long m\n+00197450: 6178 6167 652c 2063 6f6e 7374 2063 6861 axage, const cha\n+00197460: 7220 2a64 6f6d 6169 6e2c 2063 6f6e 7374 r *domain, const\n+00197470: 2063 6861 7220 2a70 6174 6829 3c2f 6469 char *path)
    Set cookie \n+001974a0: 6578 7069 7261 7469 6f6e 2e3c 2f64 6976 expiration.
    .
    const char * c\n+00197590: 6f6f 6b69 655f 646f 6d61 696e 3c2f 6469 ookie_domain
    User-defina\n+001975c0: 626c 6520 7374 7269 6e67 2074 6861 7420 ble string that \n+001975d0: 7370 6563 6966 6965 7320 7468 6520 4854 specifies the HT\n+001975e0: 5450 2063 6f6f 6b69 6520 646f 6d61 696e TP cookie domain\n+001975f0: 206f 6620 7468 6520 7275 6e6e 696e 6720 of the running \n+00197600: 7365 7276 6572 2e3c 2f64 6976 3e3c 6469 server.
    \n+00197620: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:29\n+00197640: 3639 3c2f 6469 763e 3c2f 6469 763e 0a3c 69
    .<\n+00197650: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00197660: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+00197670: 6874 6d6c 5f61 6664 6439 3163 6531 3138 html_afdd91ce118\n+00197680: 3966 6564 6433 3265 6266 6135 3164 6436 9fedd32ebfa51dd6\n+00197690: 6564 3333 6562 223e 3c64 6976 2063 6c61 ed33eb\">
    soap::co\n+001976f0: 6f6b 6965 5f70 6174 683c 2f61 3e3c 2f64 okie_path
    const cha\n+00197720: 7220 2a20 636f 6f6b 6965 5f70 6174 683c r * cookie_path<\n+00197730: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n+00197750: 696e 6162 6c65 2073 7472 696e 6720 7468 inable string th\n+00197760: 6174 2073 7065 6369 6669 6573 2074 6865 at specifies the\n+00197770: 2048 5454 5020 636f 6f6b 6965 2070 6174 HTTP cookie pat\n+00197780: 6820 6f66 2074 6865 2072 756e 6e69 6e67 h of the running\n+00197790: 2073 6572 7665 722e 3c2f 6469 763e 3c64 server.
    Definition:<\n+001977c0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2\n+001977d0: 3937 313c 2f64 6976 3e3c 2f64 6976 3e0a 971
    .\n+001977e0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

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

    ..Connec\n+00197860: 7469 6e67 2063 6c69 656e 7473 2074 6872 ting clients thr\n+00197870: 6f75 6768 2070 726f 7879 2073 6572 7665 ough proxy serve\n+00197880: 7273 3c2f 6832 3e0a 3c70 3e57 6865 6e20 rs.

    When \n+00197890: 6120 636c 6965 6e74 206e 6565 6473 2074 a client needs t\n+001978a0: 6f20 636f 6e6e 6563 7420 746f 2061 2057 o connect to a W\n+001978b0: 6562 2053 6572 7669 6365 2074 6872 6f75 eb Service throu\n+001978c0: 6768 2061 2070 726f 7879 2073 6572 7665 gh a proxy serve\n+001978d0: 722c 2073 6574 2074 6865 203c 636f 6465 r, set the soap\n+00197990: 3a3a 7072 6f78 795f 686f 7374 3c2f 613e ::proxy_host\n+001979a0: 3c2f 636f 6465 3e20 7374 7269 6e67 2061 string a\n+001979b0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::proxy_por\n+00197a80: 743c 2f61 3e3c 2f63 6f64 653e 2069 6e74 t int\n+00197a90: 6567 6572 2061 7474 7269 6275 7465 7320 eger attributes \n+00197aa0: 6f66 2074 6865 2063 7572 7265 6e74 203c of the current <\n+00197ab0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+00197b10: 2063 6f6e 7465 7874 2074 6f20 7468 6520 context to the \n+00197b20: 7072 6f78 7927 7320 686f 7374 206e 616d proxy's host nam\n+00197b30: 6520 616e 6420 706f 7274 2c20 7265 7370 e and port, resp\n+00197b40: 6563 7469 7665 6c79 2e20 466f 7220 6578 ectively. For ex\n+00197b50: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    .<\n+00197c10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00197c20: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_init<\n+00197c80: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+00197cb0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soap<\n+00197d00: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.pro\n+00197d50: 7879 5f68 6f73 743c 2f61 3e20 3d20 3c73 xy_host = "\n+00197d80: 7072 6f78 7968 6f73 746e 616d 6526 7175 proxyhostname&qu\n+00197d90: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; ..if (soap_call_ns_\n+00197e90: 5f77 6562 6d65 7468 6f64 2826 616d 703b _webmethod(&\n+00197ea0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00197ed0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00197ef0: 6f74 3b68 7474 703a 2f2f 686f 7374 3a70 ot;http://host:p\n+00197f00: 6f72 742f 7061 7468 2671 756f 743b 3c2f ort/path", "action&\n+00197f40: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2e2e quot;, ..\n+00197f50: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
    .
    <\n+00197f70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00197f80: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00197f90: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n+00197fa0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n+00197fb0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n+00197fc0: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n+00197fd0: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n+00198010: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    .<\n+00198030: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00198040: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n+00198070: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // suc\n+00198090: 6365 7373 3c2f 7370 616e 3e3c 2f64 6976 cess.

    The \n+001980c0: 636f 6e74 6578 7420 6174 7472 6962 7574 context attribut\n+001980d0: 6573 203c 636f 6465 3e3c 6120 636c 6173 es soap::proxy_\n+00198190: 686f 7374 3c2f 613e 3c2f 636f 6465 3e20 host \n+001981a0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::proxy_po\n+00198270: 7274 3c2f 613e 3c2f 636f 6465 3e20 6b65 rt ke\n+00198280: 6570 2074 6865 6972 2076 616c 7565 7320 ep their values \n+00198290: 7468 726f 7567 6820 6120 7365 7175 656e through a sequen\n+001982a0: 6365 206f 6620 7365 7276 6963 6520 6f70 ce of service op\n+001982b0: 6572 6174 696f 6e20 6361 6c6c 732c 2073 eration calls, s\n+001982c0: 6f20 7468 6579 206f 6e6c 7920 6e65 6564 o they only need\n+001982d0: 2074 6f20 6265 2073 6574 206f 6e63 652e to be set once.\n+001982e0: 3c2f 703e 0a3c 703e 5768 656e 2058 2d46

    .

    When X-F\n+001982f0: 6f72 7761 7264 6564 2d46 6f72 2068 6561 orwarded-For hea\n+00198300: 6465 7273 2061 7265 2072 6574 7572 6e65 ders are returne\n+00198310: 6420 6279 2074 6865 2070 726f 7879 2c20 d by the proxy, \n+00198320: 7468 6520 6865 6164 6572 2063 616e 2062 the header can b\n+00198330: 6520 6163 6365 7373 6564 2069 6e20 7468 e accessed in th\n+00198340: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e s\n+001983d0: 6f61 703a 3a70 726f 7879 5f66 726f 6d3c oap::proxy_from<\n+001983e0: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n+001983f0: 672e 3c2f 703e 0a3c 703e 5365 6520 616c g.

    .

    See al\n+00198400: 736f 2053 6563 7469 6f6e 7320 3c61 2063 so Sections \n+00198440: 4854 5450 2070 726f 7879 2062 6173 6963 HTTP proxy basic\n+00198450: 2061 7574 6865 6e74 6963 6174 696f 6e3c authentication<\n+00198460: 2f61 3e20 616e 6420 3c61 2063 6c61 7373 /a> and \n+001984a0: 4854 5450 2070 726f 7879 204e 544c 4d20 HTTP proxy NTLM \n+001984b0: 6175 7468 656e 7469 6361 7469 6f6e 3c2f authentication.

    .

    .... \n+001984d0: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+001984e0: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+001984f0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..\n+00198530: 4269 6e64 2062 6566 6f72 6520 636f 6e6e Bind before conn\n+00198540: 6563 7420 616e 6420 7365 7474 696e 6720 ect and setting \n+00198550: 7468 6520 636c 6965 6e74 2069 6e74 6572 the client inter\n+00198560: 6661 6365 2061 6464 7265 7373 3c2f 6832 face address.

    To bind the\n+00198580: 2063 6c69 656e 7420 746f 2061 2070 6f72 client to a por\n+00198590: 7420 6265 666f 7265 2063 6f6e 6e65 6374 t before connect\n+001985a0: 2c20 7365 7420 7468 6520 3c63 6f64 653e , set the \n+001985b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::cli\n+00198660: 656e 745f 706f 7274 3c2f 613e 3c2f 636f ent_port to a non-neg\n+00198680: 6174 6976 6520 706f 7274 206e 756d 6265 ative port numbe\n+00198690: 723a 3c2f 703e 0a3c 6469 7620 636c 6173 r:

    .
    <\n+001986c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001986d0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+00198740: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+001987a0: 6e65 773c 2f61 3e28 293b 203c 2f64 6976 new(); .
    soap<\n+001987f0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->client_port\n+00198850: 203d 202e 2e2e 3b20 3c73 7061 6e20 636c = ...; //\n+00198870: 206e 6f6e 2d6e 6567 6174 6976 6520 706f non-negative po\n+00198880: 7274 206e 756d 6265 7220 3c2f 7370 616e rt number
    .
    if (s\n+001988d0: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n+001988e0: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n+00198910: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "http:/\n+00198940: 2f68 6f73 743a 706f 7274 2f70 6174 6826 /host:port/path&\n+00198950: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+00198980: 6163 7469 6f6e 2671 756f 743b 3c2f 7370 action", ...)) .
    ... \n+001989d0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n+001989e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else .
    ... // success
    .
    <\n+00198b20: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00198b30: 6922 3e69 6e74 2063 6c69 656e 745f 706f i\">int client_po\n+00198b40: 7274 3c2f 6469 763e 3c64 6976 2063 6c61 rt
    User-\n+00198b60: 6465 6669 6e61 626c 6520 636c 6965 6e74 definable client\n+00198b70: 2070 6f72 7420 746f 2062 696e 6420 746f port to bind to\n+00198b80: 2062 6566 6f72 6520 636f 6e6e 6563 7469 before connecti\n+00198b90: 6e67 2074 6f20 6120 7365 7276 6572 2c20 ng to a server, \n+00198ba0: 7768 656e 206e 6f6e 2d6e 6567 6174 6976 when non-negativ\n+00198bb0: 652e 3c2f 6469 763e 3c64 6976 2063 6c61 e.
    De\n+00198bd0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00198be0: 6473 6f61 7032 2e68 3a33 3639 303c 2f64 dsoap2.h:3690
    .
    \n+00198c00: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    T\n+001992a0: 6869 7320 636c 6965 6e74 2069 6e74 6572 his client inter\n+001992b0: 6661 6365 2061 6464 7265 7373 2073 7472 face address str\n+001992c0: 696e 6720 6973 2075 7365 6420 6f6e 6c79 ing is used only\n+001992d0: 206f 6e63 6520 616e 6420 7265 7365 7420 once and reset \n+001992e0: 746f 204e 554c 4c20 2864 6973 6162 6c65 to NULL (disable\n+001992f0: 6429 2e20 5365 7420 6974 2061 6761 696e d). Set it again\n+00199300: 2066 6f72 2074 6865 206e 6578 7420 6361 for the next ca\n+00199310: 6c6c 2e20 5468 6973 2066 6561 7475 7265 ll. This feature\n+00199320: 2069 7320 6e6f 7420 6176 6169 6c61 626c is not availabl\n+00199330: 6520 7768 656e 2063 6f6d 7069 6c69 6e67 e when compiling\n+00199340: 2074 6865 2063 6f64 6520 6f6e 2077 696e the code on win\n+00199350: 646f 7773 2e3c 2f70 3e0a 3c70 3ef0 9f94 dows.

    .

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

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

    .FastCGI<\n+001993c0: 2f68 323e 0a3c 703e 546f 2065 6e61 626c /h2>.

    To enabl\n+001993d0: 6520 4661 7374 4347 4920 7375 7070 6f72 e FastCGI suppor\n+001993e0: 742c 2069 6e73 7461 6c6c 2046 6173 7443 t, install FastC\n+001993f0: 4749 2061 6e64 2063 6f6d 7069 6c65 2061 GI and compile a\n+00199400: 6c6c 2073 6f61 7063 7070 322d 6765 6e65 ll soapcpp2-gene\n+00199410: 7261 7465 6420 736f 7572 6365 2063 6f64 rated source cod\n+00199420: 6520 6669 6c65 7320 616e 6420 796f 7572 e files and your\n+00199430: 2061 7070 6c69 6361 7469 6f6e 2073 6f75 application sou\n+00199440: 7263 6573 2077 6974 6820 7468 6520 636f rces with the co\n+00199450: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n+00199460: 3c63 6f64 653e 2357 4954 485f 4641 5354 #WITH_FAST\n+00199470: 4347 493c 2f63 6f64 653e 206f 7220 6164 CGI or ad\n+00199480: 643a 3c2f 703e 0a3c 6469 7620 636c 6173 d:

    .
    <\n+001994b0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001994c0: 726f 6365 7373 6f72 223e 2364 6566 696e rocessor\">#defin\n+001994d0: 6520 5749 5448 5f46 4153 5443 4749 3c2f e WITH_FASTCGI
    .

    to gsoap/stdsoap\n+00199520: 322e 683c 2f63 6f64 653e 3c2f 656d 3e20 2.h \n+00199530: 616e 6420 7265 636f 6d70 696c 6520 7468 and recompile th\n+00199540: 6520 7072 6f6a 6563 7420 636f 6465 2e3c e project code.<\n+00199550: 2f70 3e0a 3c64 6c20 636c 6173 733d 2273 /p>.

    \n+00199570: 3c64 743e 5761 726e 696e 673c 2f64 743e
    Warning
    \n+00199580: 3c64 643e 446f 206e 6f74 206c 696e 6b20
    Do not link \n+00199590: 6167 6169 6e73 7420 7468 6520 3c65 6d3e against the \n+001995a0: 3c63 6f64 653e 6773 6f61 702f 6c69 6267 gsoap/libg\n+001995b0: 736f 6170 2a3c 2f63 6f64 653e 3c2f 656d soap* libraries as t\n+001995d0: 6865 7365 2061 7265 206e 6f74 2073 7569 hese are not sui\n+001995e0: 7461 626c 6520 666f 7220 4661 7374 4347 table for FastCG\n+001995f0: 492e 2043 6f6d 7069 6c65 203c 656d 3e3c I. Compile <\n+00199600: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n+00199610: 6170 322e 633c 2f63 6f64 653e 3c2f 656d ap2.c (or \n+00199630: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c\n+00199640: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2920 pp) \n+00199650: 696e 7374 6561 642e 3c2f 6464 3e3c 2f64 instead.
    .

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

    .

    .Ho\n+001996c0: 7720 746f 206d 696e 696d 697a 6520 6170 w to minimize ap\n+001996d0: 706c 6963 6174 696f 6e20 6d65 6d6f 7279 plication memory\n+001996e0: 2066 6f6f 7470 7269 6e74 3c2f 6832 3e0a footprint

    .\n+001996f0: 3c70 3e54 6f20 636f 6d70 696c 6520 6753

    To compile gS\n+00199700: 4f41 5020 6170 706c 6963 6174 696f 6e73 OAP applications\n+00199710: 2069 6e74 656e 6465 6420 666f 7220 736d intended for sm\n+00199720: 616c 6c20 6d65 6d6f 7279 2064 6576 6963 all memory devic\n+00199730: 6573 2c20 796f 7520 6d61 7920 7761 6e74 es, you may want\n+00199740: 2074 6f20 7265 6d6f 7665 2061 6c6c 206e to remove all n\n+00199750: 6f6e 2d65 7373 656e 7469 616c 2066 6561 on-essential fea\n+00199760: 7475 7265 7320 7468 6174 2063 6f6e 7375 tures that consu\n+00199770: 6d65 2070 7265 6369 6f75 7320 636f 6465 me precious code\n+00199780: 2061 6e64 2064 6174 6120 7370 6163 652e and data space.\n+00199790: 2054 6f20 646f 2074 6869 732c 2063 6f6d To do this, com\n+001997a0: 7069 6c65 2074 6865 2073 6f75 7263 6520 pile the source \n+001997b0: 636f 6465 2066 696c 6573 2077 6974 6820 code files with \n+001997c0: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time\n+001997d0: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT\n+001997e0: 485f 4c45 414e 3c2f 636f 6465 3e20 2869 H_LEAN (i\n+001997f0: 2e65 2e20 3c63 6f64 653e 2364 6566 696e .e. #defin\n+00199800: 6520 5749 5448 5f4c 4541 4e3c 2f63 6f64 e WITH_LEAN) to remove ma\n+00199820: 6e79 206e 6f6e 2d65 7373 656e 7469 616c ny non-essential\n+00199830: 2066 6561 7475 7265 732e 2054 6865 2066 features. The f\n+00199840: 6561 7475 7265 7320 7468 6174 2077 696c eatures that wil\n+00199850: 6c20 6265 2064 6973 6162 6c65 6420 6172 l be disabled ar\n+00199860: 653a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e e:

    ..

    Us\n+0019a1a0: 6520 7468 6520 636f 6d70 696c 652d 7469 e the compile-ti\n+0019a1b0: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W\n+0019a1c0: 4954 485f 4c45 414e 4552 3c2f 636f 6465 ITH_LEANER to make the ex\n+0019a1e0: 6563 7574 6162 6c65 2065 7665 6e20 736d ecutable even sm\n+0019a1f0: 616c 6c65 7220 6279 2072 656d 6f76 696e aller by removin\n+0019a200: 6720 4449 4d45 2061 6e64 204d 494d 4520 g DIME and MIME \n+0019a210: 6174 7461 6368 6d65 6e74 2068 616e 646c attachment handl\n+0019a220: 696e 672c 203c 636f 6465 3e23 4c4f 4e47 ing, #LONG\n+0019a230: 3634 3c2f 636f 6465 3e20 2836 3420 6269 64 (64 bi\n+0019a240: 7429 2073 6572 6961 6c69 7a61 7469 6f6e t) serialization\n+0019a250: 2c20 3c63 6f64 653e 7763 6861 725f 742a , wchar_t*\n+0019a260: 3c2f 636f 6465 3e20 7365 7269 616c 697a serializ\n+0019a270: 6174 696f 6e2c 2061 6e64 2073 7570 706f ation, and suppo\n+0019a280: 7274 2066 6f72 2058 4d4c 2044 4f4d 206f rt for XML DOM o\n+0019a290: 7065 7261 7469 6f6e 732e 204e 6f74 6520 perations. Note \n+0019a2a0: 7468 6174 2044 494d 452f 4d49 4d45 2061 that DIME/MIME a\n+0019a2b0: 7474 6163 686d 656e 7473 2061 7265 206e ttachments are n\n+0019a2c0: 6f74 2065 7373 656e 7469 616c 2074 6f20 ot essential to \n+0019a2d0: 6163 6869 6576 6520 534f 4150 2f58 4d4c achieve SOAP/XML\n+0019a2e0: 2069 6e74 6572 6f70 6572 6162 696c 6974 interoperabilit\n+0019a2f0: 792e 2044 494d 4520 6174 7461 6368 6d65 y. DIME attachme\n+0019a300: 6e74 7320 6172 6520 6120 636f 6e76 656e nts are a conven\n+0019a310: 6965 6e74 2077 6179 2074 6f20 6578 6368 ient way to exch\n+0019a320: 616e 6765 206e 6f6e 2d74 6578 742d 6261 ange non-text-ba\n+0019a330: 7365 6420 2869 2e65 2e20 6269 6e61 7279 sed (i.e. binary\n+0019a340: 2920 636f 6e74 656e 742c 2062 7574 2061 ) content, but a\n+0019a350: 7265 206e 6f74 2072 6571 7569 7265 6420 re not required \n+0019a360: 666f 7220 6261 7369 6320 534f 4150 2f58 for basic SOAP/X\n+0019a370: 4d4c 2069 6e74 6572 6f70 6572 6162 696c ML interoperabil\n+0019a380: 6974 792e 2041 7474 6163 686d 656e 7420 ity. Attachment \n+0019a390: 7265 7175 6972 656d 656e 7473 2061 7265 requirements are\n+0019a3a0: 2070 7265 6469 6374 6162 6c65 2e20 5468 predictable. Th\n+0019a3b0: 6174 2069 732c 2061 7070 6c69 6361 7469 at is, applicati\n+0019a3c0: 6f6e 7320 776f 6e27 7420 7375 6464 656e ons won't sudden\n+0019a3d0: 6c79 2064 6563 6964 6520 746f 2075 7365 ly decide to use\n+0019a3e0: 2044 494d 4520 6f72 204d 494d 4520 696e DIME or MIME in\n+0019a3f0: 7374 6561 6420 6f66 2058 4d4c 2074 6f20 stead of XML to \n+0019a400: 6578 6368 616e 6765 2063 6f6e 7465 6e74 exchange content\n+0019a410: 2e3c 2f70 3e0a 3c70 3e49 7420 6973 2073 .

    .

    It is s\n+0019a420: 6166 6520 746f 2074 7279 2074 6f20 636f afe to try to co\n+0019a430: 6d70 696c 6520 796f 7572 2061 7070 6c69 mpile your appli\n+0019a440: 6361 7469 6f6e 2077 6974 6820 7468 6520 cation with the \n+0019a450: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n+0019a460: 6720 3c63 6f64 653e 2357 4954 485f 4c45 g #WITH_LE\n+0019a470: 414e 3c2f 636f 6465 3e2c 2070 726f 7669 AN, provi\n+0019a480: 6465 6420 7468 6174 2079 6f75 7220 6170 ded that your ap\n+0019a490: 706c 6963 6174 696f 6e20 646f 6573 206e plication does n\n+0019a4a0: 6f74 2072 656c 7920 6f6e 2049 2f4f 2074 ot rely on I/O t\n+0019a4b0: 696d 656f 7574 732e 2057 6865 6e20 6e6f imeouts. When no\n+0019a4c0: 206c 696e 6b61 6765 2065 7272 6f72 206f linkage error o\n+0019a4d0: 6363 7572 7320 696e 2074 6865 2063 6f6d ccurs in the com\n+0019a4e0: 7069 6c61 7469 6f6e 2070 726f 6365 7373 pilation process\n+0019a4f0: 2c20 6974 2069 7320 7361 6665 2074 6f20 , it is safe to \n+0019a500: 6173 7375 6d65 2074 6861 7420 796f 7572 assume that your\n+0019a510: 2061 7070 6c69 6361 7469 6f6e 2077 696c application wil\n+0019a520: 6c20 7275 6e20 6a75 7374 2066 696e 652e l run just fine.\n+0019a530: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+0019a570: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0019a580: 2069 643d 226e 6f69 6f22 3e3c 2f61 3e0a id=\"noio\">.\n+0019a590: 486f 7720 746f 2072 656d 6f76 6520 7468 How to remove th\n+0019a5a0: 6520 4253 4420 736f 636b 6574 206c 6962 e BSD socket lib\n+0019a5b0: 7261 7279 2072 6571 7569 7265 6d65 6e74 rary requirement\n+0019a5c0: 3c2f 6832 3e0a 3c70 3e54 6865 203c 656d

    .

    The gsoap/std\n+0019a5e0: 736f 6170 322e 633c 2f63 6f64 653e 3c2f soap2.c and gsoap/stdsoap2\n+0019a610: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+0019a620: 206c 6962 7261 7269 6573 2073 686f 756c libraries shoul\n+0019a630: 6420 6265 206c 696e 6b65 6420 7769 7468 d be linked with\n+0019a640: 2061 2042 5344 2073 6f63 6b65 7420 6c69 a BSD socket li\n+0019a650: 6272 6172 7920 696e 2074 6865 2070 726f brary in the pro\n+0019a660: 6a65 6374 2062 7569 6c64 2e20 546f 2072 ject build. To r\n+0019a670: 656d 6f76 6520 7468 6520 6e65 6564 2074 emove the need t\n+0019a680: 6f20 6c69 6e6b 2061 2073 6f63 6b65 7420 o link a socket \n+0019a690: 6c69 6272 6172 792c 2079 6f75 2063 616e library, you can\n+0019a6a0: 2063 6f6d 7069 6c65 203c 656d 3e3c 636f compile gsoap/stdsoap\n+0019a6c0: 322e 633c 2f63 6f64 653e 3c2f 656d 3e20 2.c \n+0019a6d0: 2866 6f72 2043 2920 616e 6420 3c65 6d3e (for C) and \n+0019a6e0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n+0019a6f0: 6f61 7032 2e63 7070 3c2f 636f 6465 3e3c oap2.cpp<\n+0019a700: 2f65 6d3e 2028 666f 7220 432b 2b29 2077 /em> (for C++) w\n+0019a710: 6974 6820 7468 6520 7468 6520 636f 6d70 ith the the comp\n+0019a720: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_NOIO macro set \n+0019a750: 2869 2e65 2e20 3c63 6f64 653e 2364 6566 (i.e. #def\n+0019a760: 696e 6520 5749 5448 5f4e 4f49 4f3c 2f63 ine WITH_NOIO). This remo\n+0019a780: 7665 7320 7468 6520 6465 7065 6e64 656e ves the dependen\n+0019a790: 6379 206f 6e20 7468 6520 4253 4420 736f cy on the BSD so\n+0019a7a0: 636b 6574 2041 5049 2c20 494f 2073 7472 cket API, IO str\n+0019a7b0: 6561 6d73 2c20 3c63 6f64 653e 4649 4c45 eams, FILE\n+0019a7c0: 3c2f 636f 6465 3e20 7479 7065 2c20 616e type, an\n+0019a7d0: 6420 3c63 6f64 653e 6572 726e 6f3c 2f63 d errno.

    .

    You\n+0019a7f0: 2073 686f 756c 6420 6465 6669 6e65 2063 should define c\n+0019a800: 616c 6c62 6163 6b73 2074 6f20 7265 706c allbacks to repl\n+0019a810: 6163 6520 7468 6520 6d69 7373 696e 6720 ace the missing \n+0019a820: 736f 636b 6574 2073 7461 636b 2e20 546f socket stack. To\n+0019a830: 2064 6f20 736f 2c20 6164 6420 746f 2079 do so, add to y\n+0019a840: 6f75 7220 636f 6465 2074 6865 2066 6f6c our code the fol\n+0019a850: 6c6f 7769 6e67 2064 6566 696e 6974 696f lowing definitio\n+0019a860: 6e73 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ns:

    ..soap_init\n+0019a990: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0019a9c0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);

    .<\n+0019a9d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019a9e0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* fsend \n+0019aa00: 6973 2075 7365 6420 746f 2074 7261 6e73 is used to trans\n+0019aa10: 6d69 7420 6461 7461 2069 6e20 626c 6f63 mit data in bloc\n+0019aa20: 6b73 202a 2f3c 2f73 7061 6e3e 203c 2f64 ks */ ..
    /* frecv is use\n+0019ab20: 6420 746f 2072 6563 6569 7665 2064 6174 d to receive dat\n+0019ab30: 6120 696e 2062 6c6f 636b 7320 2a2f 3c2f a in blocks */
    .<\n+0019ab60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0019ab70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0019ab80: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0019ab90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0019aba0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0019abb0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+0019abc0: 6c23 6761 3063 3231 3863 6435 3535 3230 l#ga0c218cd55520\n+0019abd0: 3435 3734 3563 6336 3430 3939 3865 3235 45745cc640998e25\n+0019abe0: 6564 3732 223e 6672 6563 763c 2f61 3e20 ed72\">frecv \n+0019abf0: 3d20 6d79 5f72 6563 763b 203c 2f64 6976 = my_recv; .
    /* fop\n+0019ac30: 656e 2069 7320 7573 6564 2074 6f20 636f en is used to co\n+0019ac40: 6e6e 6563 7420 2a2f 3c2f 7370 616e 3e20 nnect */ \n+0019ac50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0019ac90: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n+0019acf0: 666f 7065 6e3c 2f61 3e20 3d20 6d79 5f74 fopen = my_t\n+0019ad00: 6370 5f63 6f6e 6e65 6374 3b20 3c2f 6469 cp_connect; .
    /* fc\n+0019ad40: 6c6f 7365 2069 7320 7573 6564 2074 6f20 lose is used to \n+0019ad50: 6469 7363 6f6e 6e65 6374 202a 2f3c 2f73 disconnect */
    .soap.fclose \n+0019ae10: 3d20 6d79 5f74 6370 5f64 6973 636f 6e6e = my_tcp_disconn\n+0019ae20: 6563 743b 203c 2f64 6976 3e0a 3c64 6976 ect;
    ./* fclosesoc\n+0019ae60: 6b65 7420 6973 2075 7365 6420 6f6e 6c79 ket is used only\n+0019ae70: 2074 6f20 636c 6f73 6520 7468 6520 6d61 to close the ma\n+0019ae80: 7374 6572 2073 6f63 6b65 7420 696e 2061 ster socket in a\n+0019ae90: 2073 6572 7665 7220 7570 6f6e 2073 6f61 server upon soa\n+0019aea0: 705f 646f 6e65 2829 202a 2f3c 2f73 7061 p_done() */
    .\n+0019af80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* fshu\n+0019afb0: 7464 6f77 6e73 6f63 6b65 7420 6973 2075 tdownsocket is u\n+0019afc0: 7365 6420 6166 7465 7220 636f 6d70 6c65 sed after comple\n+0019afd0: 7469 6e67 2061 2073 656e 6420 6f70 6572 ting a send oper\n+0019afe0: 6174 696f 6e20 746f 2073 656e 6420 5443 ation to send TC\n+0019aff0: 5020 4649 4e20 2a2f 3c2f 7370 616e 3e20 P FIN */ \n+0019b000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0019b040: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n+0019b0a0: 6673 6875 7464 6f77 6e73 6f63 6b65 743c fshutdownsocket<\n+0019b0b0: 2f61 3e20 3d20 6d79 5f74 6370 5f73 6875 /a> = my_tcp_shu\n+0019b0c0: 7464 6f77 6e73 6f63 6b65 743b 203c 2f64 tdownsocket; .
    /* s\n+0019b100: 6574 7469 6e67 2066 706f 6c6c 2069 7320 etting fpoll is \n+0019b110: 6f70 7469 6f6e 616c 2c20 6c65 6176 6520 optional, leave \n+0019b120: 6974 204e 554c 4c20 746f 206f 6d69 7420 it NULL to omit \n+0019b130: 706f 6c6c 696e 6720 7468 6520 7365 7276 polling the serv\n+0019b140: 6572 202a 2f3c 2f73 7061 6e3e 203c 2f64 er */ ..
    /* faccept is u\n+0019b240: 7365 6420 6f6e 6c79 2062 7920 6120 7365 sed only by a se\n+0019b250: 7276 6572 2061 7070 6c69 6361 7469 6f6e rver application\n+0019b260: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ ..
    s\n+0019b3e0: 6f61 703a 3a66 706f 6c6c 3c2f 613e 3c2f oap::fpoll
    int(* fp\n+0019b410: 6f6c 6c29 2873 7472 7563 7420 736f 6170 oll)(struct soap\n+0019b420: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    \n+0019b440: 4361 6c6c 6261 636b 2074 6861 7420 626c Callback that bl\n+0019b450: 6f63 6b73 2075 6e74 696c 2061 6374 6976 ocks until activ\n+0019b460: 6974 7920 6973 2064 6574 6563 7465 6420 ity is detected \n+0019b470: 6f6e 2074 6865 2073 6f61 703a 3a73 6f63 on the soap::soc\n+0019b480: 6b65 7420 6f72 2073 6f61 703a 3a6d 6173 ket or soap::mas\n+0019b490: 7465 7220 736f 636b 6574 2c2e 2e2e 3c2f ter socket,...
    Defini\n+0019b4c0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+0019b4d0: 7032 2e68 3a34 3539 343c 2f64 6976 3e3c p2.h:4594
    <\n+0019b4e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n+0019b770: 696e 7428 2a20 6673 6875 7464 6f77 6e73 int(* fshutdowns\n+0019b780: 6f63 6b65 7429 2873 7472 7563 7420 736f ocket)(struct so\n+0019b790: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S\n+0019b7a0: 4f43 4b45 5420 736f 636b 2c20 696e 7420 OCKET sock, int \n+0019b7b0: 686f 7729 3c2f 6469 763e 3c64 6976 2063 how)
    Cal\n+0019b7d0: 6c62 6163 6b20 7468 6174 2073 6875 7473 lback that shuts\n+0019b7e0: 2064 6f77 6e20 6120 6769 7665 6e20 736f down a given so\n+0019b7f0: 636b 6574 2e3c 2f64 6976 3e3c 6469 7620 cket.
    Definition:\n+0019b820: 2073 7464 736f 6170 322e 683a 3435 3833 stdsoap2.h:4583\n+0019b830: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .<\n+0019b980: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0019b990: 223e 4361 6c6c 6261 636b 2074 6861 7420 \">Callback that \n+0019b9a0: 7761 6974 7320 666f 7220 616e 6420 6163 waits for and ac\n+0019b9b0: 6365 7074 7320 6120 736f 636b 6574 2063 cepts a socket c\n+0019b9c0: 6f6e 6e65 6374 696f 6e20 7265 7175 6573 onnection reques\n+0019b9d0: 7465 6420 6279 2061 2063 6c69 656e 742e ted by a client.\n+0019b9e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    .
    <\n+0019ba40: 703e 5468 6573 6520 6675 6e63 7469 6f6e p>These function\n+0019ba50: 7320 7368 6f75 6c64 2070 726f 7669 6465 s should provide\n+0019ba60: 2061 206d 696e 696d 616c 2069 6e70 7574 a minimal input\n+0019ba70: 2f6f 7574 7075 7420 7374 6163 6b20 283c /output stack (<\n+0019ba80: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>so\n+0019bb20: 6170 3a3a 6672 6563 763c 2f61 3e3c 2f63 ap::frecv and <\n+0019bb40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019bb50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0019bb60: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0019bb70: 6761 6664 3532 6238 3036 3535 6534 6631 gafd52b80655e4f1\n+0019bb80: 3032 3165 6464 3663 3535 6238 6466 6564 021edd6c55b8dfed\n+0019bb90: 6666 2220 7469 746c 653d 2243 616c 6c62 ff\" title=\"Callb\n+0019bba0: 6163 6b20 7468 6174 2073 656e 6473 2074 ack that sends t\n+0019bbb0: 6865 2067 6976 656e 2062 7974 6573 206f he given bytes o\n+0019bbc0: 6620 6461 7461 2e22 3e73 6f61 703a 3a66 f data.\">soap::f\n+0019bbd0: 7365 6e64 3c2f 613e 3c2f 636f 6465 3e29 send)\n+0019bbe0: 2074 6f20 7265 6164 2f77 7269 7465 2058 to read/write X\n+0019bbf0: 4d4c 2061 6e64 2073 6f63 6b65 742d 6c69 ML and socket-li\n+0019bc00: 6b65 2073 7461 636b 2028 7468 6520 6f74 ke stack (the ot\n+0019bc10: 6865 7220 6675 6e63 7469 6f6e 7329 2077 her functions) w\n+0019bc20: 6865 6e20 6465 7665 6c6f 7069 6e67 2063 hen developing c\n+0019bc30: 6c69 656e 7420 616e 6420 7365 7276 6572 lient and server\n+0019bc40: 2061 7070 6c69 6361 7469 6f6e 732e 3c2f applications..

    See Sectio\n+0019bc60: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Funct\n+0019bc90: 696f 6e20 6361 6c6c 6261 636b 7320 666f ion callbacks fo\n+0019bca0: 7220 6375 7374 6f6d 697a 6564 2049 2f4f r customized I/O\n+0019bcb0: 2061 6e64 2048 5454 5020 6861 6e64 6c69 and HTTP handli\n+0019bcc0: 6e67 3c2f 613e 2066 6f72 206d 6f72 6520 ng for more \n+0019bcd0: 6465 7461 696c 7320 6f6e 2074 6865 2075 details on the u\n+0019bce0: 7365 206f 6620 7468 6573 6520 6361 6c6c se of these call\n+0019bcf0: 6261 636b 732e 2041 6c6c 2063 616c 6c62 backs. All callb\n+0019bd00: 6163 6b20 6675 6e63 7469 6f6e 2070 6f69 ack function poi\n+0019bd10: 6e74 6572 7320 7368 6f75 6c64 2062 6520 nters should be \n+0019bd20: 6e6f 6e2d 4e55 4c4c 2c20 6578 6365 7074 non-NULL, except\n+0019bd30: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fpoll.

    .<\n+0019be10: 703e 596f 7520 6361 6e6e 6f74 2075 7365 p>You cannot use\n+0019be20: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n+0019beb0: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault and soap_print_faul\n+0019bf80: 745f 6c6f 6361 7469 6f6e 3c2f 613e 3c2f t_location to print e\n+0019bfa0: 7272 6f72 2064 6961 676e 6f73 7469 6373 rror diagnostics\n+0019bfb0: 2e20 496e 7374 6561 642c 2074 6865 2076 . Instead, the v\n+0019bfc0: 616c 7565 206f 6620 3c63 6f64 653e 3c61 alue of soap::error<\n+0019c080: 2f61 3e3c 2f63 6f64 653e 2c20 7768 6963 /a>, whic\n+0019c090: 6820 636f 6e74 6169 6e73 2074 6865 2067 h contains the g\n+0019c0a0: 534f 4150 2065 7272 6f72 2063 6f64 652c SOAP error code,\n+0019c0b0: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n+0019c0c0: 6465 7465 726d 696e 6520 7468 6520 6361 determine the ca\n+0019c0d0: 7573 6520 6f66 2061 2066 6175 6c74 2e3c use of a fault.<\n+0019c0e0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to \n+0019c100: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n+0019c110: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

    .

    .How to combine\n+0019c150: 206d 756c 7469 706c 6520 636c 6965 6e74 multiple client\n+0019c160: 2061 6e64 2073 6572 7665 7220 696d 706c and server impl\n+0019c170: 656d 656e 7461 7469 6f6e 7320 696e 746f ementations into\n+0019c180: 206f 6e65 2065 7865 6375 7461 626c 653c one executable<\n+0019c190: 2f68 323e 0a3c 703e 5468 6520 7773 646c /h2>.

    The wsdl\n+0019c1a0: 3268 2074 6f6f 6c20 6361 6e20 6265 2075 2h tool can be u\n+0019c1b0: 7365 6420 746f 2069 6d70 6f72 7420 6d75 sed to import mu\n+0019c1c0: 6c74 6970 6c65 2057 5344 4c73 2061 6e64 ltiple WSDLs and\n+0019c1d0: 2073 6368 656d 6173 2061 7420 6f6e 6365 schemas at once\n+0019c1e0: 2e20 5468 6520 7365 7276 6963 6520 6465 . The service de\n+0019c1f0: 6669 6e69 7469 6f6e 7320 6172 6520 636f finitions are co\n+0019c200: 6d62 696e 6564 2069 6e20 6f6e 6520 6865 mbined in one he\n+0019c210: 6164 6572 2066 696c 6520 746f 2062 6520 ader file to be \n+0019c220: 7061 7273 6564 2062 7920 736f 6170 6370 parsed by soapcp\n+0019c230: 7032 2e20 4974 2069 7320 696d 706f 7274 p2. It is import\n+0019c240: 616e 7420 746f 2061 7373 6967 6e20 6e61 ant to assign na\n+0019c250: 6d65 7370 6163 6520 7072 6566 6978 6573 mespace prefixes\n+0019c260: 2074 6f20 6e61 6d65 7370 6163 6520 5552 to namespace UR\n+0019c270: 4973 2075 7369 6e67 2074 6865 203c 656d Is using the typemap.d\n+0019c290: 6174 3c2f 636f 6465 3e3c 2f65 6d3e 2066 at f\n+0019c2a0: 696c 652e 204f 7468 6572 7769 7365 2c20 ile. Otherwise, \n+0019c2b0: 7773 646c 3268 2077 696c 6c20 6173 7369 wsdl2h will assi\n+0019c2c0: 676e 206e 616d 6573 7061 6365 2070 7265 gn namespace pre\n+0019c2d0: 6669 7865 7320 3c63 6f64 653e 6e73 313c fixes ns1<\n+0019c2e0: 2f63 6f64 653e 2c20 3c63 6f64 653e 6e73 /code>, ns\n+0019c2f0: 323c 2f63 6f64 653e 2c20 616e 6420 736f 2, and so\n+0019c300: 206f 6e20 746f 2074 6865 2073 6572 7669 on to the servi\n+0019c310: 6365 206f 7065 7261 7469 6f6e 7320 616e ce operations an\n+0019c320: 6420 7363 6865 6d61 2074 7970 6573 2e20 d schema types. \n+0019c330: 5468 7573 2c20 616e 7920 6368 616e 6765 Thus, any change\n+0019c340: 2074 6f20 6120 5753 444c 206f 7220 7363 to a WSDL or sc\n+0019c350: 6865 6d61 206d 6179 2072 6573 756c 7420 hema may result \n+0019c360: 696e 2061 206e 6577 2070 7265 6669 7820 in a new prefix \n+0019c370: 6173 7369 676e 6d65 6e74 2e20 466f 7220 assignment. For \n+0019c380: 6d6f 7265 2064 6574 6169 6c73 2c20 706c more details, pl\n+0019c390: 6561 7365 2073 6565 2053 6563 7469 6f6e ease see Section\n+0019c3a0: 203c 6120 636c 6173 733d 2265 6c22 2068 Customi\n+0019c3d0: 7a69 6e67 2058 4d4c 2064 6174 6120 6269 zing XML data bi\n+0019c3e0: 6e64 696e 6773 2077 6974 6820 7468 6520 ndings with the \n+0019c3f0: 7479 7065 6d61 702e 6461 7420 6669 6c65 typemap.dat file\n+0019c400: 3c2f 613e 202e 3c2f 703e 0a3c 703e 416e .

    .

    An\n+0019c410: 6f74 6865 7220 6170 7072 6f61 6368 2074 other approach t\n+0019c420: 6f20 636f 6d62 696e 6520 6d75 6c74 6970 o combine multip\n+0019c430: 6c65 2063 6c69 656e 7420 616e 6420 7365 le client and se\n+0019c440: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n+0019c450: 6e73 2069 6e74 6f20 6f6e 6520 6578 6563 ns into one exec\n+0019c460: 7574 6162 6c65 2069 7320 6279 2075 7369 utable is by usi\n+0019c470: 6e67 2043 2b2b 206e 616d 6573 7061 6365 ng C++ namespace\n+0019c480: 7320 746f 2073 7472 7563 7475 7261 6c6c s to structurall\n+0019c490: 7920 7365 7061 7261 7465 2074 6865 2064 y separate the d\n+0019c4a0: 6566 696e 6974 696f 6e73 2e20 5468 6973 efinitions. This\n+0019c4b0: 2069 7320 6175 746f 6d61 7465 6420 7769 is automated wi\n+0019c4c0: 7468 203c 6120 6872 6566 3d22 2377 7364 th \n+0019c4e0: 7773 646c 3268 202d 7120 6e61 6d65 3c2f wsdl2h -q name option\n+0019c500: 203c 623e 3c63 6f64 653e 2d71 206e 616d -q nam\n+0019c510: 653c 2f63 6f64 653e 3c2f 623e 3c2f 613e e\n+0019c520: 2e20 4f72 2062 7920 6372 6561 7469 6e67 . Or by creating\n+0019c530: 206c 6962 7261 7269 6573 2069 6e20 4320 libraries in C \n+0019c540: 666f 7220 7468 6520 636c 6965 6e74 2f73 for the client/s\n+0019c550: 6572 7665 7220 6f62 6a65 6374 7320 6173 erver objects as\n+0019c560: 2065 7870 6c61 696e 6564 2069 6e20 7375 explained in su\n+0019c570: 6273 6571 7565 6e74 2073 6563 7469 6f6e bsequent section\n+0019c580: 733c 2f70 3e0a 3c70 3e42 6f74 6820 6170 s

    .

    Both ap\n+0019c590: 7072 6f61 6368 6573 2061 7265 2064 656d proaches are dem\n+0019c5a0: 6f6e 7374 7261 7465 6420 6279 2065 7861 onstrated by exa\n+0019c5b0: 6d70 6c65 7320 696e 2074 6865 2067 534f mples in the gSO\n+0019c5c0: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p\n+0019c5d0: 6163 6b61 6765 2c20 7468 6520 3c65 6d3e ackage, the \n+0019c5e0: 3c63 6f64 653e 6773 6f61 702f 7361 6d70 gsoap/samp\n+0019c5f0: 6c65 732f 6c69 6e6b 3c2f 636f 6465 3e3c les/link<\n+0019c600: 2f65 6d3e 2028 4320 6f6e 6c79 2920 616e /em> (C only) an\n+0019c610: 6420 3c65 6d3e 3c63 6f64 653e 6773 6f61 d gsoa\n+0019c620: 702f 7361 6d70 6c65 732f 6c69 6e6b 2b2b p/samples/link++\n+0019c630: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 432b (C+\n+0019c640: 2b20 7769 7468 2043 2b2b 206e 616d 6573 + with C++ names\n+0019c650: 7061 6365 7329 2065 7861 6d70 6c65 732e paces) examples.\n+0019c660: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+0019c6a0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0019c6b0: 2069 643d 2263 6f64 656e 616d 6573 7061 id=\"codenamespa\n+0019c6c0: 6365 223e 3c2f 613e 0a48 6f77 2074 6f20 ce\">.How to \n+0019c6d0: 6275 696c 6420 6120 636c 6965 6e74 206f build a client o\n+0019c6e0: 7220 7365 7276 6572 2069 6e20 6120 432b r server in a C+\n+0019c6f0: 2b20 636f 6465 206e 616d 6573 7061 6365 + code namespace\n+0019c700: 3c2f 6832 3e0a 3c70 3e59 6f75 2063 616e

    .

    You can\n+0019c710: 2075 7365 2061 2043 2b2b 2063 6f64 6520 use a C++ code \n+0019c720: 6e61 6d65 7370 6163 6520 6f66 2079 6f75 namespace of you\n+0019c730: 7220 6368 6f69 6365 2069 6e20 796f 7572 r choice in your\n+0019c740: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+0019c750: 7220 6669 6c65 2074 6f20 6275 696c 6420 r file to build \n+0019c760: 6120 636c 6965 6e74 206f 7220 7365 7276 a client or serv\n+0019c770: 6572 2069 6e20 7468 6174 2043 2b2b 206e er in that C++ n\n+0019c780: 616d 6573 7061 6365 2e20 496e 2074 6869 amespace. In thi\n+0019c790: 7320 7761 792c 2079 6f75 2063 616e 2063 s way, you can c\n+0019c7a0: 7265 6174 6520 6d75 6c74 6970 6c65 2063 reate multiple c\n+0019c7b0: 6c69 656e 7473 2061 6e64 2073 6572 7665 lients and serve\n+0019c7c0: 7273 2074 6861 7420 6361 6e20 6265 2063 rs that can be c\n+0019c7d0: 6f6d 6269 6e65 6420 616e 6420 6c69 6e6b ombined and link\n+0019c7e0: 6564 2074 6f67 6574 6865 7220 7769 7468 ed together with\n+0019c7f0: 6f75 7420 636f 6e66 6c69 6374 732c 2077 out conflicts, w\n+0019c800: 6869 6368 2069 7320 6578 706c 6169 6e65 hich is explaine\n+0019c810: 6420 696e 206d 6f72 6520 6465 7461 696c d in more detail\n+0019c820: 2069 6e20 7468 6520 6e65 7874 2073 6563 in the next sec\n+0019c830: 7469 6f6e 2028 7768 6963 6820 616c 736f tion (which also\n+0019c840: 2073 686f 7773 2061 6e20 6578 616d 706c shows an exampl\n+0019c850: 6520 636f 6d62 696e 696e 6720 7477 6f20 e combining two \n+0019c860: 636c 6965 6e74 206c 6962 7261 7269 6573 client libraries\n+0019c870: 2064 6566 696e 6564 2069 6e20 7477 6f20 defined in two \n+0019c880: 432b 2b20 636f 6465 206e 616d 6573 7061 C++ code namespa\n+0019c890: 6365 7329 2e3c 2f70 3e0a 3c70 3e55 7365 ces).

    .

    Use\n+0019c8a0: 203c 6120 6872 6566 3d22 2377 7364 6c32 ws\n+0019c8c0: 646c 3268 202d 7120 6e61 6d65 3c2f 636f dl2h -q name option <\n+0019c8e0: 623e 3c63 6f64 653e 2d71 206e 616d 653c b>-q name<\n+0019c8f0: 2f63 6f64 653e 3c2f 623e 3c2f 613e 2074 /code> t\n+0019c900: 6f20 6765 6e65 7261 7465 2064 6566 696e o generate defin\n+0019c910: 6974 696f 6e73 2069 6e20 7468 6520 432b itions in the C+\n+0019c920: 2b20 3c63 6f64 653e 6e61 6d65 3c2f 636f + name namespace. T\n+0019c940: 6869 7320 6f70 7469 6f6e 2063 616e 2061 his option can a\n+0019c950: 6c73 6f20 6265 2075 7365 6420 696e 2063 lso be used in c\n+0019c960: 6f6d 6269 6e61 7469 6f6e 2077 6974 6820 ombination with \n+0019c970: 432b 2b20 7072 6f78 7920 616e 6420 7365 C++ proxy and se\n+0019c980: 7276 6572 206f 626a 6563 7420 6765 6e65 rver object gene\n+0019c990: 7261 7469 6f6e 2c20 7573 696e 6720 3c62 ration, using soapcpp2 \n+0019c9b0: 2d6a 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -j op\n+0019c9c0: 7469 6f6e 203c 623e 3c63 6f64 653e 2d6a tion -j\n+0019c9d0: 3c2f 636f 6465 3e3c 2f62 3e20 6f72 206f or o\n+0019c9e0: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n+0019c9f0: 693c 2f63 6f64 653e 3c2f 623e 292e 3c2f i)..

    At most on\n+0019ca10: 6520 6e61 6d65 7370 6163 6520 6361 6e20 e namespace can \n+0019ca20: 6265 2064 6566 696e 6564 2066 6f72 2074 be defined for t\n+0019ca30: 6865 2065 6e74 6972 6520 696e 7465 7266 he entire interf\n+0019ca40: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n+0019ca50: 666f 7220 736f 6170 6370 7032 2e20 5468 for soapcpp2. Th\n+0019ca60: 6520 432b 2b20 6e61 6d65 7370 6163 6520 e C++ namespace \n+0019ca70: 6d75 7374 2063 6f6d 706c 6574 656c 7920 must completely \n+0019ca80: 656e 6361 7073 756c 6174 6520 7468 6520 encapsulate the \n+0019ca90: 656e 7469 7265 2063 6f6e 7465 6e74 7320 entire contents \n+0019caa0: 6f66 2074 6865 2068 6561 6465 7220 6669 of the header fi\n+0019cab0: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

    .
    \n+0019cae0: 3c73 7061 6e20 636c 6173 733d 226b 6579 namespace \n+0019cb00: 3c2f 7370 616e 3e4e 616d 6573 7061 6365 Namespace\n+0019cb10: 4e61 6d65 207b 3c2f 6469 763e 0a3c 6469 Name {
    . \n+0019cb30: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... inter\n+0019cb50: 6661 6365 203c 2f73 7061 6e3e 6865 6164 face head\n+0019cb60: 6572 2066 696c 6520 636f 6e74 656e 7473 er file contents\n+0019cb70: 202e 2e2e 203c 2f64 6976 3e0a 3c64 6976 ...

    .}<\n+0019cb90: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+0019cbb0: 5768 656e 2063 6f6d 7069 6c69 6e67 2074 When compiling t\n+0019cbc0: 6869 7320 696e 7465 7266 6163 6520 6865 his interface he\n+0019cbd0: 6164 6572 2066 696c 6520 7769 7468 2074 ader file with t\n+0019cbe0: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool\n+0019cbf0: 2c20 616c 6c20 7479 7065 2064 6566 696e , all type defin\n+0019cc00: 6974 696f 6e73 2c20 7468 6520 7365 7269 itions, the seri\n+0019cc10: 616c 697a 6572 7320 666f 7220 7468 6573 alizers for thes\n+0019cc20: 6520 7479 7065 732c 2061 6e64 2074 6865 e types, and the\n+0019cc30: 2073 7475 6220 616e 6420 736b 656c 6574 stub and skelet\n+0019cc40: 6f6e 2066 756e 6374 696f 6e73 2077 696c on functions wil\n+0019cc50: 6c20 6265 2070 6c61 6365 6420 696e 2074 l be placed in t\n+0019cc60: 6869 7320 6e61 6d65 7370 6163 652e 2054 his namespace. T\n+0019cc70: 6865 2058 4d4c 206e 616d 6573 7061 6365 he XML namespace\n+0019cc80: 206d 6170 7069 6e67 2074 6162 6c65 2028 mapping table (\n+0019cc90: 7361 7665 6420 696e 2061 203c 656d 3e3c saved in a <\n+0019cca0: 636f 6465 3e2e 6e73 6d61 703c 2f63 6f64 code>.nsmap file) wi\n+0019ccc0: 6c6c 206e 6f74 2062 6520 706c 6163 6564 ll not be placed\n+0019ccd0: 2069 6e20 7468 6520 636f 6465 206e 616d in the code nam\n+0019cce0: 6573 7061 6365 2074 6f20 616c 6c6f 7720 espace to allow \n+0019ccf0: 6974 2074 6f20 6265 206c 696e 6b65 6420 it to be linked \n+0019cd00: 6173 2061 2067 6c6f 6261 6c20 6f62 6a65 as a global obje\n+0019cd10: 6374 2e20 596f 7520 6361 6e20 7573 6520 ct. You can use \n+0019cd20: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp\n+0019cd30: 3220 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 2 -n \n+0019cd40: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+0019cd50: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 746f -n to\n+0019cd60: 2063 7265 6174 6520 6c6f 6361 6c20 584d create local XM\n+0019cd70: 4c20 6e61 6d65 7370 6163 6520 7461 626c L namespace tabl\n+0019cd80: 6573 2c20 7365 6520 5365 6374 696f 6e20 es, see Section \n+0019cd90: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+0019cdc0: 736f 6170 6370 7032 206f 7074 696f 6e73 soapcpp2 options\n+0019cdd0: 3c2f 613e 2028 6275 7420 7265 6d65 6d62 (but rememb\n+0019cde0: 6572 2074 6861 7420 796f 7520 6578 706c er that you expl\n+0019cdf0: 6963 6974 6c79 206e 6565 6420 746f 2069 icitly need to i\n+0019ce00: 6e69 7469 616c 697a 6520 7468 6520 6e61 nitialize the na\n+0019ce10: 6d65 7370 6163 6573 2074 6f20 706f 696e mespaces to poin\n+0019ce20: 7420 746f 2061 2074 6162 6c65 2061 7420 t to a table at \n+0019ce30: 7275 6e20 7469 6d65 2075 7369 6e67 203c run time using <\n+0019ce40: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_set_na\n+0019cf10: 6d65 7370 6163 6573 3c2f 613e 3c2f 636f mespaces). The genera\n+0019cf30: 7465 6420 6669 6c65 7320 6172 6520 7072 ted files are pr\n+0019cf40: 6566 6978 6564 2077 6974 6820 7468 6520 efixed with the \n+0019cf50: 636f 6465 206e 616d 6573 7061 6365 206e code namespace n\n+0019cf60: 616d 6520 696e 7374 6561 6420 6f66 2074 ame instead of t\n+0019cf70: 6865 2075 7375 616c 203c 656d 3e3c 636f he usual soap file name pr\n+0019cfa0: 6566 6978 2074 6f20 656e 6162 6c65 206d efix to enable m\n+0019cfb0: 756c 7469 706c 6520 636c 6965 6e74 2f73 ultiple client/s\n+0019cfc0: 6572 7665 7220 636f 6465 7320 746f 2062 erver codes to b\n+0019cfd0: 6520 6275 696c 6420 696e 2074 6865 2073 e build in the s\n+0019cfe0: 616d 6520 7072 6f6a 6563 7420 6469 7265 ame project dire\n+0019cff0: 6374 6f72 792e 3c2f 703e 0a3c 703e 4265 ctory.

    .

    Be\n+0019d000: 6361 7573 6520 7468 6520 534f 4150 2048 cause the SOAP H\n+0019d010: 6561 6465 7220 616e 6420 4661 756c 7420 eader and Fault \n+0019d020: 7365 7269 616c 697a 6572 7320 7769 6c6c serializers will\n+0019d030: 2061 6c73 6f20 6265 2070 6c61 6365 6420 also be placed \n+0019d040: 696e 2074 6865 206e 616d 6573 7061 6365 in the namespace\n+0019d050: 2c20 7468 6579 2063 616e 6e6f 7420 6265 , they cannot be\n+0019d060: 2063 616c 6c65 6420 6672 6f6d 2074 6865 called from the\n+0019d070: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+0019d080: 2f73 7464 736f 6170 322e 6370 703c 2f63 /stdsoap2.cpp run ti\n+0019d0a0: 6d65 206c 6962 7261 7279 2063 6f64 6520 me library code \n+0019d0b0: 616e 6420 6172 6520 7468 6572 6566 6f72 and are therefor\n+0019d0c0: 6520 7265 6e64 6572 6564 2075 6e75 7361 e rendered unusa\n+0019d0d0: 626c 652e 2054 6865 7265 666f 7265 2c20 ble. Therefore, \n+0019d0e0: 7468 6573 6520 7365 7269 616c 697a 6572 these serializer\n+0019d0f0: 7320 6172 6520 6e6f 7420 636f 6d70 696c s are not compil\n+0019d100: 6564 2061 7420 616c 6c20 2865 6e66 6f72 ed at all (enfor\n+0019d110: 6365 6420 7769 7468 203c 636f 6465 3e23 ced with #\n+0019d120: 6465 6669 6e65 2057 4954 485f 4e4f 474c define WITH_NOGL\n+0019d130: 4f42 414c 3c2f 636f 6465 3e29 2e20 546f OBAL). To\n+0019d140: 2061 6464 2053 4f41 5020 4865 6164 6572 add SOAP Header\n+0019d150: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria\n+0019d160: 6c69 7a65 7273 2c20 796f 7520 6d75 7374 lizers, you must\n+0019d170: 2063 6f6d 7069 6c65 2074 6865 6d20 7365 compile them se\n+0019d180: 7061 7261 7465 6c79 2061 7320 666f 6c6c parately as foll\n+0019d190: 6f77 732e 2046 6972 7374 2c20 6372 6561 ows. First, crea\n+0019d1a0: 7465 2061 206e 6577 2068 6561 6465 7220 te a new header \n+0019d1b0: 6669 6c65 203c 656d 3e3c 636f 6465 3e65 file e\n+0019d1c0: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h\n+0019d1d0: 2077 6974 6820 7468 6520 534f 4150 2048 with the SOAP H\n+0019d1e0: 6561 6465 7220 3c63 6f64 653e 3c61 2063 eader SOAP_ENV_\n+0019d250: 5f48 6561 6465 723c 2f61 3e3c 2f63 6f64 _Header and SOAP Faul\n+0019d270: 7420 3c63 6f64 653e 3c61 2063 6c61 7373 t SOAP_ENV__Fault\n+0019d2e0: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n+0019d2f0: 6374 7572 6573 2c20 696e 636c 7564 696e ctures, includin\n+0019d300: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g SOAP_EN\n+0019d370: 565f 5f44 6574 6169 6c3c 2f61 3e3c 2f63 V__Detail if this str\n+0019d390: 7563 7475 7265 2063 6f6e 7461 696e 7320 ucture contains \n+0019d3a0: 6d65 6d62 6572 7320 7468 6174 2061 7265 members that are\n+0019d3b0: 2073 6572 6961 6c69 7a65 6420 6173 2066 serialized as f\n+0019d3c0: 6175 6c74 2064 6574 6169 6c73 2e20 596f ault details. Yo\n+0019d3d0: 7520 6361 6e20 6c65 6176 6520 7468 6973 u can leave this\n+0019d3e0: 2068 6561 6465 7220 6669 6c65 2065 6d70 header file emp\n+0019d3f0: 7479 2069 6620 796f 7520 7761 6e74 2074 ty if you want t\n+0019d400: 6f20 7573 6520 7468 6520 6465 6661 756c o use the defaul\n+0019d410: 7420 534f 4150 2048 6561 6465 7220 616e t SOAP Header an\n+0019d420: 6420 4661 756c 742e 2048 6f77 6576 6572 d Fault. However\n+0019d430: 2c20 6966 2053 4f41 5020 4865 6164 6572 , if SOAP Header\n+0019d440: 7320 6172 6520 7265 7175 6972 6564 2074 s are required t\n+0019d450: 6865 6e20 796f 7520 6361 6e6e 6f74 206c hen you cannot l\n+0019d460: 6561 7665 2074 6865 203c 636f 6465 3e3c eave the <\n+0019d470: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019d480: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+0019d490: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n+0019d4a0: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n+0019d4b0: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n+0019d4c0: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n+0019d4d0: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header structure \n+0019d4f0: 656d 7074 792e 2046 6f72 2065 7861 6d70 empty. For examp\n+0019d500: 6c65 2c20 7468 6520 5753 2d41 6464 7265 le, the WS-Addre\n+0019d510: 7373 696e 6720 616e 6420 5753 2d53 6563 ssing and WS-Sec\n+0019d520: 7572 6974 7920 706c 7567 696e 7320 7265 urity plugins re\n+0019d530: 7175 6972 6520 534f 4150 2048 6561 6465 quire SOAP Heade\n+0019d540: 7273 2077 6869 6368 2063 616e 2062 6520 rs which can be \n+0019d550: 696d 706f 7274 6564 2062 7920 6164 6469 imported by addi\n+0019d560: 6e67 203c 636f 6465 3e23 696d 706f 7274 ng #import\n+0019d570: 2022 7773 6135 2e68 223c 2f63 6f64 653e \"wsa5.h\"\n+0019d580: 2061 6e64 203c 636f 6465 3e23 696d 706f and #impo\n+0019d590: 7274 2022 7773 7365 2e68 223c 2f63 6f64 rt \"wsse.h\", respectively\n+0019d5b0: 2074 6f20 3c65 6d3e 3c63 6f64 653e 656e to en\n+0019d5c0: 762e 683c 2f63 6f64 653e 3c2f 656d 3e2e v.h.\n+0019d5d0: 2054 6865 6e20 636f 6d70 696c 6520 7468 Then compile th\n+0019d5e0: 6973 2068 6561 6465 7220 6669 6c65 2077 is header file w\n+0019d5f0: 6974 683a 203c 2f70 3e3c 7072 6520 636c ith:

     \n+0019d610: 736f 6170 6370 7032 202d 7065 6e76 2065  soapcpp2 -penv e\n+0019d620: 6e76 2e68 0a3c 2f70 7265 3e3c 703e 2054  nv.h.

    T\n+0019d630: 6865 2067 656e 6572 6174 6564 203c 656d he generated envC.cpp<\n+0019d650: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+0019d660: 2068 6f6c 6473 2074 6865 2053 4f41 5020 holds the SOAP \n+0019d670: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n+0019d680: 2073 6572 6961 6c69 7a65 7273 2061 6e64 serializers and\n+0019d690: 2079 6f75 2063 616e 206c 696e 6b20 7468 you can link th\n+0019d6a0: 6973 2066 696c 6520 7769 7468 2079 6f75 is file with you\n+0019d6b0: 7220 636c 6965 6e74 2061 6e64 2073 6572 r client and ser\n+0019d6c0: 7665 7220 6170 706c 6963 6174 696f 6e73 ver applications\n+0019d6d0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n+0019d710: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .How to create\n+0019d740: 2063 6c69 656e 742f 7365 7276 6572 206c client/server l\n+0019d750: 6962 7261 7269 6573 3c2f 6832 3e0a 3c70 ibraries

    .The soapcpp2 to\n+0019d770: 6f6c 2070 726f 6475 6365 7320 3c65 6d3e ol produces \n+0019d780: 3c63 6f64 653e 736f 6170 436c 6965 6e74 soapClient\n+0019d790: 4c69 622e 6370 703c 2f63 6f64 653e 3c2f Lib.cpp and soapServerLib.\n+0019d7c0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp
    \n+0019d7d0: 736f 7572 6365 2063 6f64 6520 6669 6c65 source code file\n+0019d7e0: 7320 7468 6174 2061 7265 2073 7065 6369 s that are speci\n+0019d7f0: 6669 6361 6c6c 7920 696e 7465 6e64 6564 fically intended\n+0019d800: 2066 6f72 2062 7569 6c64 696e 6720 7374 for building st\n+0019d810: 6174 6963 206f 7220 6479 6e61 6d69 6320 atic or dynamic \n+0019d820: 636c 6965 6e74 2061 6e64 2073 6572 7665 client and serve\n+0019d830: 7220 6c69 6272 6172 6965 7320 696e 2043 r libraries in C\n+0019d840: 206f 7220 432b 2b2e 2054 6865 7365 2066 or C++. These f\n+0019d850: 696c 6573 2065 7870 6f72 7420 7468 6520 iles export the \n+0019d860: 7374 7562 2061 6e64 2073 6b65 6c65 746f stub and skeleto\n+0019d870: 6e20 6675 6e63 7469 6f6e 732c 2062 7574 n functions, but\n+0019d880: 206b 6565 7020 616c 6c20 7365 7269 616c keep all serial\n+0019d890: 697a 6174 696f 6e20 636f 6465 2073 7461 ization code sta\n+0019d8a0: 7469 632c 2074 6875 7320 6869 6464 656e tic, thus hidden\n+0019d8b0: 2074 6f20 6176 6f69 6420 6c69 6e6b 2073 to avoid link s\n+0019d8c0: 796d 626f 6c20 636f 6e66 6c69 6374 7320 ymbol conflicts \n+0019d8d0: 7768 656e 2063 6f6d 6269 6e69 6e67 206d when combining m\n+0019d8e0: 756c 7469 706c 6520 636c 6965 6e74 7320 ultiple clients \n+0019d8f0: 616e 6420 7365 7276 6963 6573 2069 6e74 and services int\n+0019d900: 6f20 6f6e 6520 6578 6563 7574 6162 6c65 o one executable\n+0019d910: 2e20 4e6f 7465 2074 6861 7420 6974 2069 . Note that it i\n+0019d920: 7320 6661 7220 7369 6d70 6c65 7220 746f s far simpler to\n+0019d930: 2075 7365 2074 6865 2077 7364 6c32 6820 use the wsdl2h \n+0019d940: 746f 6f6c 206f 6e20 6d75 6c74 6970 6c65 tool on multiple\n+0019d950: 2057 5344 4c20 6669 6c65 7320 746f 2067 WSDL files to g\n+0019d960: 656e 6572 6174 6520 6120 6865 6164 6572 enerate a header\n+0019d970: 2066 696c 6520 7468 6174 2063 6f6d 6269 file that combi\n+0019d980: 6e65 7320 616c 6c20 7365 7276 6963 6520 nes all service \n+0019d990: 6465 6669 6e69 7469 6f6e 732e 2048 6f77 definitions. How\n+0019d9a0: 6576 6572 2c20 7468 6520 6170 7072 6f61 ever, the approa\n+0019d9b0: 6368 2070 7265 7365 6e74 6564 2069 6e20 ch presented in \n+0019d9c0: 7468 6973 2073 6563 7469 6f6e 2069 7320 this section is \n+0019d9d0: 7573 6566 756c 2077 6865 6e20 6372 6561 useful when crea\n+0019d9e0: 7469 6e67 2028 6479 6e61 6d69 6329 206c ting (dynamic) l\n+0019d9f0: 6962 7261 7269 6573 2066 6f72 2063 6c69 ibraries for cli\n+0019da00: 656e 7420 616e 6420 7365 7276 6572 206f ent and server o\n+0019da10: 626a 6563 7473 2c20 7375 6368 2061 7320 bjects, such as \n+0019da20: 444c 4c73 2061 7320 6465 7363 7269 6265 DLLs as describe\n+0019da30: 6420 696e 2053 6563 7469 6f6e 203c 6120 d in Section How to create D\n+0019da70: 4c4c 733c 2f61 3e20 2e3c 2f70 3e0a 3c64 LLs .

    .
    Note<\n+0019daa0: 2f64 743e 3c64 643e 4f6e 6520 6d61 6a6f /dt>
    One majo\n+0019dab0: 7220 6469 7361 6476 616e 7461 6765 206f r disadvantage o\n+0019dac0: 6620 7468 6520 6170 7072 6f61 6368 2070 f the approach p\n+0019dad0: 7265 7365 6e74 6564 2068 6572 6520 6973 resented here is\n+0019dae0: 2074 6861 7420 7468 6520 7365 7269 616c that the serial\n+0019daf0: 697a 6572 2066 756e 6374 696f 6e73 2061 izer functions a\n+0019db00: 7265 206e 6f20 6c6f 6e67 6572 2061 6363 re no longer acc\n+0019db10: 6573 7369 626c 6520 696e 2074 6865 2075 essible in the u\n+0019db20: 7365 7227 7320 736f 7572 6365 2063 6f64 ser's source cod\n+0019db30: 652c 2062 6563 6175 7365 2073 6572 6961 e, because seria\n+0019db40: 6c69 7a65 7273 2077 696c 6c20 6265 2063 lizers will be c\n+0019db50: 6f6e 7665 7274 6564 2074 6f20 7374 6174 onverted to stat\n+0019db60: 6963 2066 756e 6374 696f 6e73 2028 746f ic functions (to\n+0019db70: 2062 6520 7573 6564 2062 7920 7468 6520 be used by the \n+0019db80: 6765 6e65 7261 7465 6420 7374 7562 2061 generated stub a\n+0019db90: 6e64 2073 6b65 6c65 746f 6e20 6675 6e63 nd skeleton func\n+0019dba0: 7469 6f6e 7320 6f6e 6c79 292e 2046 6f72 tions only). For\n+0019dbb0: 2065 7861 6d70 6c65 2c20 6675 6e63 7469 example, functi\n+0019dbc0: 6f6e 7320 7375 6368 2061 7320 3c63 6f64 ons such as soap_new_T, soap_\n+0019dbf0: 6465 6661 756c 745f 543c 2f63 6f64 653e default_T\n+0019dc00: 2c20 3c63 6f64 653e 736f 6170 5f77 7269 , soap_wri\n+0019dc10: 7465 5f54 3c2f 636f 6465 3e2c 203c 636f te_T, soap_read_T, soa\n+0019dc40: 705f 7075 745f 543c 2f63 6f64 653e 2c20 p_put_T, \n+0019dc50: 616e 6420 3c63 6f64 653e 736f 6170 5f67 and soap_g\n+0019dc60: 6574 5f54 3c2f 636f 6465 3e20 6361 6e6e et_T cann\n+0019dc70: 6f74 2062 6520 7573 6564 2061 6e79 206c ot be used any l\n+0019dc80: 6f6e 6765 722e 3c2f 6464 3e3c 2f64 6c3e onger.
    \n+0019dc90: 0a3c 703e 5573 696e 6720 432b 2b20 6e61 .

    Using C++ na\n+0019dca0: 6d65 7370 6163 6573 2069 7320 6120 6265 mespaces is a be\n+0019dcb0: 7474 6572 2061 6c74 6572 6e61 7469 7665 tter alternative\n+0019dcc0: 2077 6865 6e20 6275 696c 6469 6e67 2061 when building a\n+0019dcd0: 7070 6c69 6361 7469 6f6e 7320 696e 2043 pplications in C\n+0019dce0: 2b2b 2074 6861 7420 636f 6d62 696e 6520 ++ that combine \n+0019dcf0: 6d75 6c74 6970 6c65 2063 6c69 656e 7473 multiple clients\n+0019dd00: 2061 6e64 2073 6572 7669 6365 732e 2054 and services. T\n+0019dd10: 6f20 6275 696c 6420 6d75 6c74 6970 6c65 o build multiple\n+0019dd20: 206c 6962 7261 7269 6573 2c20 796f 7520 libraries, you \n+0019dd30: 6361 6e20 6465 6669 6e65 2061 2043 2b2b can define a C++\n+0019dd40: 206e 616d 6573 7061 6365 2069 6e20 796f namespace in yo\n+0019dd50: 7572 2068 6561 6465 7220 6669 6c65 2077 ur header file w\n+0019dd60: 6974 6820 3c62 3e3c 636f 6465 3e73 6f61 ith soa\n+0019dd70: 7063 7070 3220 2d71 6e61 6d65 3c2f 636f pcpp2 -qname option <\n+0019dd90: 623e 3c63 6f64 653e 2d71 6e61 6d65 3c2f b>-qname, see S\n+0019ddb0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection How to buil\n+0019ddf0: 6420 6120 636c 6965 6e74 206f 7220 7365 d a client or se\n+0019de00: 7276 6572 2069 6e20 6120 432b 2b20 636f rver in a C++ co\n+0019de10: 6465 206e 616d 6573 7061 6365 3c2f 613e de namespace\n+0019de20: 2066 6f72 2064 6574 6169 6c73 2e3c 2f70 for details..

    For C, you \n+0019de40: 6361 6e20 7573 6520 3c62 3e3c 636f 6465 can use soapcpp2 -c -p \n+0019de60: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name \n+0019de70: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+0019de80: 2d70 206e 616d 653c 2f63 6f64 653e 3c2f -p name to rename the\n+0019dea0: 2067 656e 6572 6174 6564 203c 656d 3e3c generated <\n+0019deb0: 636f 6465 3e73 6f61 7043 6c69 656e 744c code>soapClientL\n+0019dec0: 6962 2e63 3c2f 636f 6465 3e3c 2f65 6d3e ib.c\n+0019ded0: 2061 6e64 203c 656d 3e3c 636f 6465 3e73 and s\n+0019dee0: 6f61 7053 6572 7665 724c 6962 2e63 3c2f oapServerLib.c (and \n+0019df00: 6173 736f 6369 6174 6564 2920 6669 6c65 associated) file\n+0019df10: 732e 2054 6865 203c 623e 3c63 6f64 653e s. The \n+0019df20: 2d70 206e 616d 653c 2f63 6f64 653e 3c2f -p name option specif\n+0019df40: 6965 7320 7468 6520 6669 6c65 203c 656d ies the file name prefix t\n+0019df70: 6f20 7265 706c 6163 6520 7468 6520 3c65 o replace the soap file na\n+0019dfa0: 6d65 2070 7265 6669 782e 3c2f 703e 0a3c me prefix.

    .<\n+0019dfb0: 703e 5468 6520 656e 6769 6e65 2064 6f65 p>The engine doe\n+0019dfc0: 7320 6e6f 7420 6465 6669 6e65 2053 4f41 s not define SOA\n+0019dfd0: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n+0019dfe0: 6c74 2073 6572 6961 6c69 7a65 7273 2074 lt serializers t\n+0019dff0: 6861 7420 7468 6520 656e 6769 6e65 206e hat the engine n\n+0019e000: 6565 6473 2e20 5765 2074 6865 7265 666f eeds. We therefo\n+0019e010: 7265 2061 6464 2053 4f41 5020 4865 6164 re add SOAP Head\n+0019e020: 6572 2061 6e64 2046 6175 6c74 2073 6572 er and Fault ser\n+0019e030: 6961 6c69 7a65 7273 2c20 7768 6963 6820 ializers, which \n+0019e040: 6172 6520 636f 6d70 696c 6564 2073 6570 are compiled sep\n+0019e050: 6172 6174 656c 7920 6173 2066 6f6c 6c6f arately as follo\n+0019e060: 7773 2e20 4669 7273 742c 2063 7265 6174 ws. First, creat\n+0019e070: 6520 6120 6e65 7720 6865 6164 6572 2066 e a new header f\n+0019e080: 696c 6520 3c65 6d3e 3c63 6f64 653e 656e ile en\n+0019e090: 762e 683c 2f63 6f64 653e 3c2f 656d 3e20 v.h \n+0019e0a0: 7769 7468 2074 6865 2053 4f41 5020 4865 with the SOAP He\n+0019e0b0: 6164 6572 203c 636f 6465 3e3c 6120 636c ader SOAP_ENV__\n+0019e120: 4865 6164 6572 3c2f 613e 3c2f 636f 6465 Header and SOAP Fault\n+0019e140: 203c 636f 6465 3e3c 6120 636c 6173 733d \n+0019e1a0: 534f 4150 5f45 4e56 5f5f 4661 756c 743c SOAP_ENV__Fault<\n+0019e1b0: 2f61 3e3c 2f63 6f64 653e 2073 7472 7563 /a> struc\n+0019e1c0: 7475 7265 732c 2069 6e63 6c75 6469 6e67 tures, including\n+0019e1d0: 203c 636f 6465 3e3c 6120 636c 6173 733d SOAP_ENV\n+0019e240: 5f5f 4465 7461 696c 3c2f 613e 3c2f 636f __Detail if this stru\n+0019e260: 6374 7572 6520 636f 6e74 6169 6e73 206d cture contains m\n+0019e270: 656d 6265 7273 2074 6861 7420 6172 6520 embers that are \n+0019e280: 7365 7269 616c 697a 6564 2061 7320 6661 serialized as fa\n+0019e290: 756c 7420 6465 7461 696c 732e 2059 6f75 ult details. You\n+0019e2a0: 2063 616e 206c 6561 7665 2074 6869 7320 can leave this \n+0019e2b0: 6865 6164 6572 2066 696c 6520 656d 7074 header file empt\n+0019e2c0: 7920 6966 2079 6f75 2077 616e 7420 746f y if you want to\n+0019e2d0: 2075 7365 2074 6865 2064 6566 6175 6c74 use the default\n+0019e2e0: 2053 4f41 5020 4865 6164 6572 2061 6e64 SOAP Header and\n+0019e2f0: 2046 6175 6c74 2e20 486f 7765 7665 722c Fault. However,\n+0019e300: 2069 6620 534f 4150 2048 6561 6465 7273 if SOAP Headers\n+0019e310: 2061 7265 2072 6571 7569 7265 6420 7468 are required th\n+0019e320: 656e 2079 6f75 2063 616e 6e6f 7420 6c65 en you cannot le\n+0019e330: 6176 6520 7468 6520 3c63 6f64 653e 3c61 ave the SOAP_EN\n+0019e3a0: 565f 5f48 6561 6465 723c 2f61 3e3c 2f63 V__Header structure e\n+0019e3c0: 6d70 7479 2e20 466f 7220 6578 616d 706c mpty. For exampl\n+0019e3d0: 652c 2074 6865 2057 532d 4164 6472 6573 e, the WS-Addres\n+0019e3e0: 7369 6e67 2061 6e64 2057 532d 5365 6375 sing and WS-Secu\n+0019e3f0: 7269 7479 2070 6c75 6769 6e73 2072 6571 rity plugins req\n+0019e400: 7569 7265 2053 4f41 5020 4865 6164 6572 uire SOAP Header\n+0019e410: 7320 7768 6963 6820 6361 6e20 6265 2069 s which can be i\n+0019e420: 6d70 6f72 7465 6420 6279 2061 6464 696e mported by addin\n+0019e430: 6720 3c63 6f64 653e 2369 6d70 6f72 7420 g #import \n+0019e440: 2277 7361 352e 6822 3c2f 636f 6465 3e20 \"wsa5.h\" \n+0019e450: 616e 6420 3c63 6f64 653e 2369 6d70 6f72 and #impor\n+0019e460: 7420 2277 7373 652e 6822 3c2f 636f 6465 t \"wsse.h\", respectively \n+0019e480: 746f 203c 656d 3e3c 636f 6465 3e65 6e76 to env\n+0019e490: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 .h. \n+0019e4a0: 5468 656e 2063 6f6d 7069 6c65 2074 6869 Then compile thi\n+0019e4b0: 7320 6865 6164 6572 2066 696c 6520 7769 s header file wi\n+0019e4c0: 7468 3a20 3c2f 703e 3c70 7265 2063 6c61 th:

     s\n+0019e4e0: 6f61 7063 7070 3220 2d70 656e 7620 656e  oapcpp2 -penv en\n+0019e4f0: 762e 680a 3c2f 7072 653e 3c70 3e20 5468  v.h.

    Th\n+0019e500: 6520 6765 6e65 7261 7465 6420 3c65 6d3e e generated \n+0019e510: 3c63 6f64 653e 656e 7643 2e63 7070 3c2f envC.cpp file \n+0019e530: 686f 6c64 7320 7468 6520 534f 4150 2048 holds the SOAP H\n+0019e540: 6561 6465 7220 616e 6420 4661 756c 7420 eader and Fault \n+0019e550: 7365 7269 616c 697a 6572 7320 616e 6420 serializers and \n+0019e560: 796f 7520 6361 6e20 6372 6561 7465 2061 you can create a\n+0019e570: 2028 6479 6e61 6d69 6329 206c 6962 7261 (dynamic) libra\n+0019e580: 7279 2066 6f72 2069 7420 746f 206c 696e ry for it to lin\n+0019e590: 6b20 6974 2077 6974 6820 796f 7572 2063 k it with your c\n+0019e5a0: 6c69 656e 7420 616e 6420 7365 7276 6572 lient and server\n+0019e5b0: 2061 7070 6c69 6361 7469 6f6e 732e 3c2f applications..

    You should\n+0019e5d0: 2074 6865 6e20 636f 6d70 696c 6520 7468 then compile th\n+0019e5e0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n+0019e5f0: 702f 7374 6473 6f61 7032 2e63 7070 3c2f p/stdsoap2.cpp libra\n+0019e610: 7279 2077 6974 6820 7468 6520 636f 6d70 ry with the comp\n+0019e620: 696c 652d 7469 6d65 203c 636f 6465 3e23 ile-time #\n+0019e630: 5749 5448 5f4e 4f4e 414d 4553 5041 4345 WITH_NONAMESPACE\n+0019e640: 533c 2f63 6f64 653e 2066 6c61 673a 203c S flag: <\n+0019e650: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     c++ -D\n+0019e670: 5749 5448 5f4e 4f4e 414d 4553 5041 4345  WITH_NONAMESPACE\n+0019e680: 5320 2d63 2073 7464 736f 6170 322e 6370  S -c stdsoap2.cp\n+0019e690: 700a 3c2f 7072 653e 3c70 3e20 5468 6973  p.

    This\n+0019e6a0: 206f 6d69 7473 2074 6865 2072 6566 6572 omits the refer\n+0019e6b0: 656e 6365 2074 6f20 7468 6520 676c 6f62 ence to the glob\n+0019e6c0: 616c 206e 616d 6573 7061 6365 7320 7461 al namespaces ta\n+0019e6d0: 626c 652c 2077 6869 6368 2069 7320 6e6f ble, which is no\n+0019e6e0: 7768 6572 6520 746f 2062 6520 6465 6669 where to be defi\n+0019e6f0: 6e65 6420 7369 6e63 6520 7765 2077 696c ned since we wil\n+0019e700: 6c20 7573 6520 584d 4c20 6e61 6d65 7370 l use XML namesp\n+0019e710: 6163 6573 2066 6f72 2065 6163 6820 636c aces for each cl\n+0019e720: 6965 6e74 2f73 6572 7669 6365 2073 6570 ient/service sep\n+0019e730: 6172 6174 656c 792e 2054 6865 7265 666f arately. Therefo\n+0019e740: 7265 2c20 796f 7520 6d75 7374 2065 7870 re, you must exp\n+0019e750: 6c69 6369 746c 7920 7365 7420 7468 6520 licitly set the \n+0019e760: 6e61 6d65 7370 6163 6573 2076 616c 7565 namespaces value\n+0019e770: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex\n+0019e7e0: 7420 696e 2079 6f75 7220 636f 6465 2065 t in your code e\n+0019e7f0: 7665 7279 2074 696d 6520 6166 7465 7220 very time after \n+0019e800: 696e 6974 6961 6c69 7a61 7469 6f6e 206f initialization o\n+0019e810: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap\n+0019e870: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+0019e880: 7769 7468 2074 6865 203c 636f 6465 3e3c with the <\n+0019e890: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019e8a0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0019e8b0: 5f6e 616d 6573 7061 6365 2e68 746d 6c23 _namespace.html#\n+0019e8c0: 6761 3565 6339 3133 6163 6363 3730 3563 ga5ec913accc705c\n+0019e8d0: 6361 3332 3936 6162 3735 6261 6539 3535 ca3296ab75bae955\n+0019e8e0: 6135 2220 7469 746c 653d 2241 6374 6976 a5\" title=\"Activ\n+0019e8f0: 6174 6573 2061 6e20 584d 4c20 6e61 6d65 ates an XML name\n+0019e900: 7370 6163 6520 7461 626c 6520 746f 2067 space table to g\n+0019e910: 656e 6572 6174 6520 616e 6420 7265 736f enerate and reso\n+0019e920: 6c76 6520 786d 6c6e 7320 6e61 6d65 7370 lve xmlns namesp\n+0019e930: 6163 6520 7072 6566 6978 6573 2069 6e20 ace prefixes in \n+0019e940: 584d 4c20 6d65 7373 6167 6573 2e22 3e73 XML messages.\">s\n+0019e950: 6f61 705f 7365 745f 6e61 6d65 7370 6163 oap_set_namespac\n+0019e960: 6573 2873 7472 7563 7420 736f 6170 2a2c es(struct soap*,\n+0019e970: 2063 6f6e 7374 2073 7472 7563 7420 4e61 const struct Na\n+0019e980: 6d65 7370 6163 652a 293c 2f61 3e3c 2f63 mespace*) function..

    For exampl\n+0019e9b0: 652c 2073 7570 706f 7365 2077 6520 6861 e, suppose we ha\n+0019e9c0: 7665 2074 776f 2063 6c69 656e 7473 2064 ve two clients d\n+0019e9d0: 6566 696e 6564 2069 6e20 6865 6164 6572 efined in header\n+0019e9e0: 2066 696c 6573 203c 656d 3e3c 636f 6465 files client1.h and <\n+0019ea10: 636f 6465 3e63 6c69 656e 7432 2e68 3c2f code>client2.h. We f\n+0019ea30: 6972 7374 2067 656e 6572 6174 6520 7468 irst generate th\n+0019ea40: 6520 3c65 6d3e 3c63 6f64 653e 656e 7648 e envH\n+0019ea50: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .h f\n+0019ea60: 696c 6520 666f 7220 7468 6520 534f 4150 ile for the SOAP\n+0019ea70: 2048 6561 6465 7220 616e 6420 4661 756c Header and Faul\n+0019ea80: 7420 6465 6669 6e69 7469 6f6e 733a 203c t definitions: <\n+0019ea90: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     soapcp\n+0019eab0: 7032 202d 6320 2d70 656e 7620 656e 762e  p2 -c -penv env.\n+0019eac0: 680a 3c2f 7072 653e 3c70 3e20 5468 656e  h.

    Then\n+0019ead0: 2077 6520 6765 6e65 7261 7465 2074 6865 we generate the\n+0019eae0: 2063 6f64 6520 666f 7220 636c 6965 6e74 code for client\n+0019eaf0: 3120 616e 6420 636c 6965 6e74 323a 203c 1 and client2: <\n+0019eb00: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     soapcp\n+0019eb20: 7032 202d 6320 2d6e 202d 706d 7943 6c69  p2 -c -n -pmyCli\n+0019eb30: 656e 7431 2063 6c69 656e 7431 2e68 0a20  ent1 client1.h. \n+0019eb40: 736f 6170 6370 7032 202d 6320 2d6e 202d  soapcpp2 -c -n -\n+0019eb50: 706d 7943 6c69 656e 7432 2063 6c69 656e  pmyClient2 clien\n+0019eb60: 7432 2e68 0a3c 2f70 7265 3e3c 703e 2054  t2.h.

    T\n+0019eb70: 6869 7320 6765 6e65 7261 7465 7320 3c65 his generates myClient\n+0019eb90: 3143 6c69 656e 744c 6962 2e63 3c2f 636f 1ClientLib.c and myClient2\n+0019ebc0: 436c 6965 6e74 4c69 622e 633c 2f63 6f64 ClientLib.c (among s\n+0019ebe0: 6576 6572 616c 206f 7468 6572 2066 696c everal other fil\n+0019ebf0: 6573 292e 2054 6865 7365 2074 776f 2066 es). These two f\n+0019ec00: 696c 6573 2073 686f 756c 6420 6265 2063 iles should be c\n+0019ec10: 6f6d 7069 6c65 6420 616e 6420 6c69 6e6b ompiled and link\n+0019ec20: 6564 2077 6974 6820 796f 7572 2061 7070 ed with your app\n+0019ec30: 6c69 6361 7469 6f6e 2e20 5468 6520 736f lication. The so\n+0019ec40: 7572 6365 2063 6f64 6520 6f66 2079 6f75 urce code of you\n+0019ec50: 7220 6170 706c 6963 6174 696f 6e20 7368 r application sh\n+0019ec60: 6f75 6c64 2069 6e63 6c75 6465 2074 6865 ould include the\n+0019ec70: 2067 656e 6572 6174 6564 203c 656d 3e3c generated <\n+0019ec80: 636f 6465 3e65 6e76 482e 683c 2f63 6f64 code>envH.h, myClient1H.h<\n+0019ecb0: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, myClient2\n+0019ecd0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .h f\n+0019ece0: 696c 6573 2061 6e64 203c 656d 3e3c 636f iles and myClient1.nsm\n+0019ed00: 6170 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 ap, \n+0019ed10: 3c65 6d3e 3c63 6f64 653e 6d79 436c 6965 myClie\n+0019ed20: 6e74 322e 6e73 6d61 703c 2f63 6f64 653e nt2.nsmap\n+0019ed30: 3c2f 656d 3e20 6669 6c65 733a 3c2f 703e files:

    \n+0019ed40: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #include &qu\n+0019ed90: 6f74 3b6d 7943 6c69 656e 7431 482e 6826 ot;myClient1H.h&\n+0019eda0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; // include cl\n+0019edd0: 6965 6e74 2031 2073 7475 6273 203c 2f73 ient 1 stubs
    .
    #include\n+0019ee20: 2026 7175 6f74 3b6d 7943 6c69 656e 7432 "myClient2\n+0019ee30: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h"\n+0019ee40: 203c 7370 616e 2063 6c61 7373 3d22 636f // includ\n+0019ee60: 6520 636c 6965 6e74 2032 2073 7475 6273 e client 2 stubs\n+0019ee70: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0019ee80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019ee90: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+0019eeb0: 6c75 6465 2026 7175 6f74 3b65 6e76 482e lude "envH.\n+0019eec0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n+0019eed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    #\n+0019ef40: 696e 636c 7564 6520 2671 756f 743b 6d79 include "my\n+0019ef50: 436c 6965 6e74 3148 2e6e 736d 6170 2671 Client1H.nsmap&q\n+0019ef60: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; // include cli\n+0019ef90: 656e 7420 3120 6e73 6d61 7020 3c2f 7370 ent 1 nsmap
    .
    #include \n+0019efe0: 2671 756f 743b 6d79 436c 6965 6e74 3248 "myClient2H\n+0019eff0: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap" // inc\n+0019f020: 6c75 6465 2063 6c69 656e 7420 3220 6e73 lude client 2 ns\n+0019f030: 6d61 7020 3c2f 7370 616e 3e3c 2f64 6976 map .
    .struct soap *soap = soap_n\n+0019f150: 6577 3c2f 613e 2829 3b3c 2f64 6976 3e0a ew();
    .\n+0019f160: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_se\n+0019f1d0: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces\n+0019f1e0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0019f210: 2c20 6d79 436c 6965 6e74 315f 6e61 6d65 , myClient1_name\n+0019f220: 7370 6163 6573 293b 203c 2f64 6976 3e0a spaces);
    .\n+0019f230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // m\n+0019f260: 616b 6520 436c 6965 6e74 2031 2069 6e76 ake Client 1 inv\n+0019f270: 6f63 6174 696f 6e73 3c2f 7370 616e 3e3c ocations<\n+0019f280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.<\n+0019f400: 703e 4974 2069 7320 696d 706f 7274 616e p>It is importan\n+0019f410: 7420 746f 2075 7365 203c 623e 3c63 6f64 t to use soapcpp2 -n option \n+0019f440: 3c62 3e3c 636f 6465 3e2d 6e3c 2f63 6f64 -n, see Sect\n+0019f460: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion soapcpp2 opt\n+0019f4a0: 696f 6e73 3c2f 613e 2c20 746f 2072 656e ions, to ren\n+0019f4b0: 616d 6520 7468 6520 6e61 6d65 7370 6163 ame the namespac\n+0019f4c0: 6520 7461 626c 6573 2073 6f20 7765 2063 e tables so we c\n+0019f4d0: 616e 2069 6e63 6c75 6465 2074 6865 6d20 an include them \n+0019f4e0: 616c 6c20 7769 7468 6f75 7420 7275 6e6e all without runn\n+0019f4f0: 696e 6720 696e 746f 2072 6564 6566 696e ing into redefin\n+0019f500: 6974 696f 6e73 2e3c 2f70 3e0a 3c64 6c20 itions.

    .
    Note
    Link confl\n+0019f540: 6963 7473 206d 6179 2073 7469 6c6c 206f icts may still o\n+0019f550: 6363 7572 2069 6e20 7468 6520 756e 6c69 ccur in the unli\n+0019f560: 6b65 6c79 2073 6974 7561 7469 6f6e 2074 kely situation t\n+0019f570: 6861 7420 6964 656e 7469 6361 6c20 7365 hat identical se\n+0019f580: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n+0019f590: 6e61 6d65 7320 6172 6520 6465 6669 6e65 names are define\n+0019f5a0: 6420 696e 2074 776f 206f 7220 6d6f 7265 d in two or more\n+0019f5b0: 2073 7475 6220 6f72 2073 6b65 6c65 746f stub or skeleto\n+0019f5c0: 6e20 6675 6e63 7469 6f6e 7320 7768 656e n functions when\n+0019f5d0: 2074 6865 7365 206d 6574 686f 6473 2073 these methods s\n+0019f5e0: 6861 7265 2074 6865 2073 616d 6520 584d hare the same XM\n+0019f5f0: 4c20 6e61 6d65 7370 6163 6520 7072 6566 L namespace pref\n+0019f600: 6978 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 ix.
    ..... Back to table \n+0019f630: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n+0019f640: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    .C+\n+0019f670: 2b20 6578 616d 706c 6573 3c2f 6833 3e0a + examples

    .\n+0019f680: 3c70 3e41 7320 616e 2065 7861 6d70 6c65

    As an example\n+0019f690: 2077 6520 7769 6c6c 2062 7569 6c64 2061 we will build a\n+0019f6a0: 2044 656c 6179 6564 2053 746f 636b 2051 Delayed Stock Q\n+0019f6b0: 756f 7465 2063 6c69 656e 7420 6c69 6272 uote client libr\n+0019f6c0: 6172 7920 616e 6420 6120 4375 7272 656e ary and a Curren\n+0019f6d0: 6379 2045 7863 6861 6e67 6520 5261 7465 cy Exchange Rate\n+0019f6e0: 2063 6c69 656e 7420 6c69 6272 6172 792e client library.\n+0019f6f0: 3c2f 703e 0a3c 703e 4669 7273 742c 2077

    .

    First, w\n+0019f700: 6520 6372 6561 7465 2061 6e20 656d 7074 e create an empt\n+0019f710: 7920 6865 6164 6572 2066 696c 6520 3c65 y header file env.h, which\n+0019f740: 206d 6179 2062 6520 656d 7074 7920 6f72 may be empty or\n+0019f750: 2073 686f 756c 6420 636f 6e74 6169 6e20 should contain \n+0019f760: 534f 4150 2048 6561 6465 7220 616e 6420 SOAP Header and \n+0019f770: 4661 756c 7420 6465 6669 6e69 7469 6f6e Fault definition\n+0019f780: 7320 6173 2065 7870 6c61 696e 6564 2069 s as explained i\n+0019f790: 6e20 5365 6374 696f 6e20 3c61 2063 6c61 n Section How to create c\n+0019f7d0: 6c69 656e 742f 7365 7276 6572 206c 6962 lient/server lib\n+0019f7e0: 7261 7269 6573 3c2f 613e 2c20 616e 6420 raries, and \n+0019f7f0: 636f 6d70 696c 6520 6974 2061 7320 666f compile it as fo\n+0019f800: 6c6c 6f77 733a 203c 2f70 3e3c 7072 6520 llows:

     soapcpp2 -penv\n+0019f830: 2065 6e76 2e68 0a20 632b 2b20 2d63 2065   env.h. c++ -c e\n+0019f840: 6e76 432e 6370 700a 3c2f 7072 653e 3c70  nvC.cpp.
    We also compil\n+0019f860: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n+0019f870: 702f 7374 6473 6f61 7032 2e63 7070 3c2f p/stdsoap2.cpp witho\n+0019f890: 7574 206e 616d 6573 7061 6365 733a 203c ut namespaces: <\n+0019f8a0: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>
     c++ -c\n+0019f8c0: 202d 4457 4954 485f 4e4f 4e41 4d45 5350   -DWITH_NONAMESP\n+0019f8d0: 4143 4553 2073 7464 736f 6170 322e 6370  ACES stdsoap2.cp\n+0019f8e0: 700a 3c2f 7072 653e 3c70 3e20 4966 2079  p.

    If y\n+0019f8f0: 6f75 2064 6f20 6e6f 7420 7573 6520 3c63 ou do not use #WITH_NONAME\n+0019f910: 5350 4143 4553 3c2f 636f 6465 3e20 7468 SPACES th\n+0019f920: 656e 2079 6f75 2077 696c 6c20 6765 7420 en you will get \n+0019f930: 616e 2075 6e72 6573 6f6c 7665 6420 6c69 an unresolved li\n+0019f940: 6e6b 2065 7272 6f72 2066 6f72 2074 6865 nk error for the\n+0019f950: 2067 6c6f 6261 6c20 3c63 6f64 653e 6e61 global na\n+0019f960: 6d65 7370 6163 6573 3c2f 636f 6465 3e20 mespaces \n+0019f970: 7461 626c 652e 2059 6f75 2063 616e 2064 table. You can d\n+0019f980: 6566 696e 6520 6120 6475 6d6d 7920 7461 efine a dummy ta\n+0019f990: 626c 6520 746f 2061 766f 6964 2068 6176 ble to avoid hav\n+0019f9a0: 696e 6720 746f 2072 6563 6f6d 7069 6c65 ing to recompile\n+0019f9b0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+0019f9c0: 2f73 7464 736f 6170 322e 6370 703c 2f63 /stdsoap2.cpp.

    .<\n+0019f9e0: 703e 5365 636f 6e64 2c20 7765 2063 7265 p>Second, we cre\n+0019f9f0: 6174 6520 7468 6520 4465 6c61 7965 6420 ate the Delayed \n+0019fa00: 5374 6f63 6b20 5175 6f74 6520 6865 6164 Stock Quote head\n+0019fa10: 6572 2066 696c 6520 7370 6563 6966 6963 er file specific\n+0019fa20: 6174 696f 6e2c 2077 6869 6368 206d 6179 ation, which may\n+0019fa30: 2062 6520 6f62 7461 696e 6564 2075 7369 be obtained usi\n+0019fa40: 6e67 2074 6865 2057 5344 4c20 696d 706f ng the WSDL impo\n+0019fa50: 7274 6572 2e20 4966 2079 6f75 2077 616e rter. If you wan\n+0019fa60: 7420 746f 2075 7365 2043 2b2b 206e 616d t to use C++ nam\n+0019fa70: 6573 7061 6365 7320 7468 656e 2079 6f75 espaces then you\n+0019fa80: 206e 6565 6420 746f 206d 616e 7561 6c6c need to manuall\n+0019fa90: 7920 6164 6420 7468 6520 3c63 6f64 653e y add the \n+0019faa0: 6e61 6d65 7370 6163 653c 2f63 6f64 653e namespace\n+0019fab0: 2064 6563 6c61 7261 7469 6f6e 2074 6f20 declaration to \n+0019fac0: 7468 6520 6765 6e65 7261 7465 6420 6865 the generated he\n+0019fad0: 6164 6572 2066 696c 653a 3c2f 703e 0a3c ader file:

    .<\n+0019fae0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0019faf0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    nam\n+0019fb20: 6573 7061 6365 203c 2f73 7061 6e3e 7175 espace qu\n+0019fb30: 6f74 6520 7b3c 2f64 6976 3e0a 3c64 6976 ote {
    . <\n+0019fb50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+0019fb80: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+0019fb90: 206e 616d 653a 2053 6572 7669 6365 203c name: Service <\n+0019fba0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0019fbc0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0019fbd0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+0019fbe0: 7365 7276 6963 6520 7374 796c 653a 2072 service style: r\n+0019fbf0: 7063 203c 2f73 7061 6e3e 3c2f 6469 763e pc
    \n+0019fc00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+0019fc30: 206e 7320 7365 7276 6963 6520 656e 636f ns service enco\n+0019fc40: 6469 6e67 3a20 656e 636f 6465 6420 3c2f ding: encoded
    .//gsoap ns s\n+0019fc90: 6572 7669 6365 206c 6f63 6174 696f 6e3a ervice location:\n+0019fca0: 2068 7474 703a 2f2f 7365 7276 6963 6573 http://services\n+0019fcb0: 2e78 6d65 7468 6f64 732e 6e65 742f 736f .xmethods.net/so\n+0019fcc0: 6170 203c 2f73 7061 6e3e 3c2f 6469 763e ap
    \n+0019fcd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+0019fd00: 206e 7320 7363 6865 6d61 206e 616d 6573 ns schema names\n+0019fd10: 7061 6365 3a20 7572 6e3a 786d 6574 686f pace: urn:xmetho\n+0019fd20: 6473 2d64 656c 6179 6564 2d71 756f 7465 ds-delayed-quote\n+0019fd30: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
    .\n+0019fd40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+0019fd70: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n+0019fd80: 642d 6163 7469 6f6e 3a20 6765 7451 756f d-action: getQuo\n+0019fd90: 7465 2026 7175 6f74 3b26 7175 6f74 3b20 te "" \n+0019fda0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0019fdc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__getQuot\n+0019fdf0: 6528 3c73 7061 6e20 636c 6173 733d 226b e(char\n+0019fe10: 3c2f 7370 616e 3e20 2a73 796d 626f 6c2c *symbol,\n+0019fe20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float\n+0019fe40: 3c2f 7370 616e 3e20 2661 6d70 3b52 6573 &Res\n+0019fe50: 756c 7429 3b20 3c2f 6469 763e 0a3c 6469 ult);
    . \n+0019fe70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } // namespace qu\n+0019feb0: 6f74 653c 2f73 7061 6e3e 3c2f 6469 763e ote
    \n+0019fec0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    We th\n+0019fee0: 656e 2063 6f6d 7069 6c65 2069 7420 6173 en compile it as\n+0019fef0: 2061 206c 6962 7261 7279 2061 6e64 2077 a library and w\n+0019ff00: 6520 7573 6520 6f70 7469 6f6e 203c 623e e use option \n+0019ff10: 3c63 6f64 653e 2d6e 3c2f 636f 6465 3e3c -n<\n+0019ff20: 2f62 3e20 746f 2070 7265 6669 7820 7468 /b> to prefix th\n+0019ff30: 6520 6765 6e65 7261 7465 6420 6669 6c65 e generated file\n+0019ff40: 7320 616e 6420 746f 2072 656e 616d 6520 s and to rename \n+0019ff50: 7468 6520 6e61 6d65 7370 6163 6520 7461 the namespace ta\n+0019ff60: 626c 6520 746f 2061 766f 6964 206c 696e ble to avoid lin\n+0019ff70: 6b20 636f 6e66 6c69 6374 7320 6c61 7465 k conflicts late\n+0019ff80: 723a 203c 2f70 3e3c 7072 6520 636c 6173 r:

     so\n+0019ffa0: 6170 6370 7032 202d 6e20 7175 6f74 652e  apcpp2 -n quote.\n+0019ffb0: 680a 2063 2b2b 202d 6320 7175 6f74 6543  h. c++ -c quoteC\n+0019ffc0: 6c69 656e 744c 6962 2e63 7070 0a3c 2f70  lientLib.cpp.

    If you do\n+0019ffe0: 6e27 7420 7761 6e74 2074 6f20 7573 6520 n't want to use \n+0019fff0: 6120 432b 2b20 636f 6465 206e 616d 6573 a C++ code names\n+001a0000: 7061 6365 2c20 796f 7520 7368 6f75 6c64 pace, you should\n+001a0010: 2063 6f6d 7069 6c65 203c 656d 3e3c 636f compile quote.h \"as is\" w\n+001a0040: 6974 6820 6f70 7469 6f6e 203c 623e 3c63 ith option -pquote:

    soapcpp2 -n -\n+001a0090: 7071 756f 7465 2071 756f 7465 2e68 0a20 pquote quote.h. \n+001a00a0: 632b 2b20 2d63 2071 756f 7465 436c 6965 c++ -c quoteClie\n+001a00b0: 6e74 4c69 622e 6370 700a 3c2f 7072 653e ntLib.cpp.
    \n+001a00c0: 3c70 3e20 5468 6972 642c 2077 6520 6372

    Third, we cr\n+001a00d0: 6561 7465 2074 6865 2043 7572 7265 6e63 eate the Currenc\n+001a00e0: 7920 4578 6368 616e 6765 2052 6174 6520 y Exchange Rate \n+001a00f0: 6865 6164 6572 2066 696c 6520 7370 6563 header file spec\n+001a0100: 6966 6963 6174 696f 6e3a 3c2f 703e 0a3c ification:

    .<\n+001a0110: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001a0120: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    nam\n+001a0150: 6573 7061 6365 203c 2f73 7061 6e3e 7261 espace ra\n+001a0160: 7465 207b 3c2f 6469 763e 0a3c 6469 7620 te {
    .
    .
    //g\n+001a01b0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+001a01c0: 6e61 6d65 3a20 5365 7276 6963 6520 3c2f name: Service
    .//gsoap ns s\n+001a0210: 6572 7669 6365 2073 7479 6c65 3a20 7270 ervice style: rp\n+001a0220: 6320 3c2f 7370 616e 3e3c 2f64 6976 3e0a c
    .\n+001a0230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+001a0260: 6e73 2073 6572 7669 6365 2065 6e63 6f64 ns service encod\n+001a0270: 696e 673a 2065 6e63 6f64 6564 203c 2f73 ing: encoded
    .
    //gsoap ns se\n+001a02c0: 7276 6963 6520 6c6f 6361 7469 6f6e 3a20 rvice location: \n+001a02d0: 6874 7470 3a2f 2f73 6572 7669 6365 732e http://services.\n+001a02e0: 786d 6574 686f 6473 2e6e 6574 2f73 6f61 xmethods.net/soa\n+001a02f0: 7020 3c2f 7370 616e 3e3c 2f64 6976 3e0a p
    .\n+001a0300: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+001a0330: 6e73 2073 6368 656d 6120 6e61 6d65 7370 ns schema namesp\n+001a0340: 6163 653a 2075 726e 3a78 6d65 7468 6f64 ace: urn:xmethod\n+001a0350: 732d 4375 7272 656e 6379 4578 6368 616e s-CurrencyExchan\n+001a0360: 6765 203c 2f73 7061 6e3e 3c2f 6469 763e ge
    \n+001a0370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+001a03a0: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+001a03b0: 6f64 2d61 6374 696f 6e3a 2067 6574 5261 od-action: getRa\n+001a03c0: 7465 2026 7175 6f74 3b26 7175 6f74 3b20 te "" \n+001a03d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001a03f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__getRate\n+001a0420: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n+001a0440: 2f73 7061 6e3e 202a 636f 756e 7472 7931 /span> *country1\n+001a0450: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n+001a0470: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country\n+001a0480: 322c 203c 7370 616e 2063 6c61 7373 3d22 2, flo\n+001a04a0: 6174 3c2f 7370 616e 3e20 2661 6d70 3b52 at &R\n+001a04b0: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .<\n+001a04c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a04d0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    } // namespace \n+001a0510: 7261 7465 3c2f 7370 616e 3e3c 2f64 6976 rate.

    Simi\n+001a0540: 6c61 7220 746f 2074 6865 2051 756f 7465 lar to the Quote\n+001a0550: 2065 7861 6d70 6c65 2061 626f 7665 2c20 example above, \n+001a0560: 7765 2067 656e 6572 6174 6520 736f 7572 we generate sour\n+001a0570: 6365 2063 6f64 6520 7573 696e 6720 6f70 ce code using op\n+001a0580: 7469 6f6e 203c 623e 3c63 6f64 653e 2d6e tion -n\n+001a0590: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2070 to p\n+001a05a0: 7265 6669 7820 7468 6520 6765 6e65 7261 refix the genera\n+001a05b0: 7465 6420 6669 6c65 7320 616e 6420 746f ted files and to\n+001a05c0: 2072 656e 616d 6520 7468 6520 6e61 6d65 rename the name\n+001a05d0: 7370 6163 6520 7461 626c 6520 746f 2061 space table to a\n+001a05e0: 766f 6964 206c 696e 6b20 636f 6e66 6c69 void link confli\n+001a05f0: 6374 733a 203c 2f70 3e3c 7072 6520 636c cts:

     \n+001a0610: 736f 6170 6370 7032 202d 6e20 7261 7465  soapcpp2 -n rate\n+001a0620: 2e68 0a3c 2f70 7265 3e3c 703e 2046 6f75  .h.

    Fou\n+001a0630: 7274 682c 2077 6520 7573 6520 7468 6520 rth, we use the \n+001a0640: 6765 6e65 7261 7465 6420 736f 7572 6365 generated source\n+001a0650: 2063 6f64 6520 6c69 6272 6172 6965 7320 code libraries \n+001a0660: 7769 7468 2074 6865 206d 6169 6e20 7072 with the main pr\n+001a0670: 6f67 7261 6d2e 3c2f 703e 0a3c 6469 7620 ogram.

    .
    #i\n+001a06c0: 6e63 6c75 6465 2026 7175 6f74 3b71 756f nclude "quo\n+001a06d0: 7465 482e 682e 6826 7175 6f74 3b3c 2f73 teH.h.h"
    .
    #include\n+001a0720: 2026 7175 6f74 3b72 6174 6548 2e68 2e68 "rateH.h.h\n+001a0730: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n+001a0780: 7175 6f74 652e 6e73 6d61 7026 7175 6f74 quote.nsmap"\n+001a0790: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001a07a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a07b0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+001a07d0: 6c75 6465 2026 7175 6f74 3b72 6174 652e lude "rate.\n+001a07e0: 6e73 6d61 7026 7175 6f74 3b3c 2f73 7061 nsmap"
    .
    .
    i\n+001a0840: 6e74 3c2f 7370 616e 3e20 6d61 696e 283c nt main(<\n+001a0850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a0860: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int argc, char \n+001a08a0: 2a61 7267 765b 5d29 203c 2f64 6976 3e0a *argv[])
    .\n+001a08b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (argc <= 1)\n+001a0910: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    std::c\n+001a0950: 6572 7220 266c 743b 266c 743b 203c 7370 err << "U\n+001a0980: 7361 6765 3a20 6d61 696e 2074 6963 6b65 sage: main ticke\n+001a0990: 7220 5b63 7572 7265 6e63 795d 2671 756f r [currency]&quo\n+001a09a0: 743b 3c2f 7370 616e 3e20 266c 743b 266c t; <&l\n+001a09b0: 743b 2073 7464 3a3a 656e 646c 203c 2f64 t; std::endl .
    exit(E\n+001a09e0: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    } .
    stru\n+001a0a40: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n+001a0b10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    float q;
    . \n+001a0b70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_set\n+001a0bd0: 5f6e 616d 6573 7061 6365 733c 2f61 3e28 _namespaces(\n+001a0be0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a0c10: 2071 756f 7465 5f6e 616d 6573 7061 6365 quote_namespace\n+001a0c20: 7329 3b20 3c2f 6469 763e 0a3c 6469 7620 s);
    .
    <\n+001a0c40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a0c50: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n+001a0c70: 5f5f 6765 7451 756f 7465 283c 6120 636c __getQuote(soap, NULL\n+001a0cb0: 2c20 4e55 4c4c 2c20 6172 6776 5b31 5d2c , NULL, argv[1],\n+001a0cc0: 2071 2929 203c 7370 616e 2063 6c61 7373 q)) // ge\n+001a0ce0: 7420 7175 6f74 6520 3c2f 7370 616e 3e3c t quote <\n+001a0cf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    soap_\n+001a0d80: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n+001a0d90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a0dc0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n+001a0dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . \n+001a0e00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+001a0e20: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n+001a0e40: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+001a0e60: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (argc > 2\n+001a0e90: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {\n+001a0eb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+001a0ed0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a0ee0: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float r;
    .\n+001a0f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n+001a0fd0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n+001a10e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a10f0: 3e20 2020 2020 2020 203c 6120 636c 6173 > soap\n+001a1150: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+001a1160: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a1190: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    else \n+001a11e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a1200: 2071 202a 3d20 723b 203c 7370 616e 2063 q *= r; /\n+001a1220: 2f20 636f 6e76 6572 7420 7468 6520 7175 / convert the qu\n+001a1230: 6f74 6520 3c2f 7370 616e 3e3c 2f64 6976 ote .
    }
    \n+001a1260: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    std::cout\n+001a1280: 2026 6c74 3b26 6c74 3b20 6172 6776 5b31 << argv[1\n+001a1290: 5d20 266c 743b 266c 743b 203c 7370 616e ] << ": &\n+001a12c0: 7175 6f74 3b3c 2f73 7061 6e3e 2026 6c74 quot; <\n+001a12d0: 3b26 6c74 3b20 7120 266c 743b 266c 743b ;< q <<\n+001a12e0: 2073 7464 3a3a 656e 646c 3b20 3c2f 6469 std::endl; .
    }
    .\n+001a1310: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_de\n+001a1380: 7374 726f 793c 2f61 3e28 3c61 2063 6c61 stroy(soap);..\n+001a1470: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n+001a1520: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a1530: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+001a1550: 7572 6e3c 2f73 7061 6e3e 2030 3b20 3c2f urn 0; .
    }
    .<\n+001a1580: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Compile\n+001a15a0: 2061 6e64 206c 696e 6b20 7468 6973 2061 and link this a\n+001a15b0: 7070 6c69 6361 7469 6f6e 2077 6974 6820 pplication with \n+001a15c0: 3c65 6d3e 3c63 6f64 653e 7374 6473 6f61 stdsoa\n+001a15d0: 7032 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e p2.o\n+001a15e0: 2c20 3c65 6d3e 3c63 6f64 653e 656e 7643 , envC\n+001a15f0: 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .o, \n+001a1600: 3c65 6d3e 3c63 6f64 653e 7175 6f74 6553 quoteS\n+001a1610: 6572 7665 7250 726f 7879 2e6f 3c2f 636f erverProxy.o, and rateServ\n+001a1640: 6572 5072 6f78 792e 6f3c 2f63 6f64 653e erProxy.o\n+001a1650: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e 496e .

    .

    In\n+001a1660: 7374 6561 6420 6f66 2074 6865 2067 656e stead of the gen\n+001a1670: 6572 6174 6564 203c 636f 6465 3e73 6f61 erated soa\n+001a1680: 705f 6361 6c6c 5f77 6562 6d65 7468 6f64 p_call_webmethod\n+001a1690: 3c2f 636f 6465 3e20 7374 7562 2066 756e stub fun\n+001a16a0: 6374 696f 6e73 2079 6f75 2063 616e 2061 ctions you can a\n+001a16b0: 6c73 6f20 7573 6520 3c62 3e3c 636f 6465 lso use soapcpp2 -j option <\n+001a16e0: 623e 3c63 6f64 653e 2d6a 3c2f 636f 6465 b>-j or option \n+001a1700: 3c62 3e3c 636f 6465 3e2d 693c 2f63 6f64 -i to genera\n+001a1720: 7465 2043 2b2b 2070 726f 7879 2063 6c61 te C++ proxy cla\n+001a1730: 7373 6573 2e3c 2f70 3e0a 3c70 3e54 6f20 sses.

    .

    To \n+001a1740: 636f 6d70 696c 6520 7365 7276 6572 2069 compile server i\n+001a1750: 7320 7665 7279 2073 696d 696c 6172 2e20 s very similar. \n+001a1760: 466f 7220 6578 616d 706c 652c 2061 7373 For example, ass\n+001a1770: 756d 6520 7468 6174 2077 6520 6e65 6564 ume that we need\n+001a1780: 2074 6f20 696d 706c 656d 656e 7420 6120 to implement a \n+001a1790: 6361 6c63 756c 6174 6f72 2073 6572 7669 calculator servi\n+001a17a0: 6365 2061 6e64 2077 6520 7761 6e74 2074 ce and we want t\n+001a17b0: 6f20 6372 6561 7465 2061 206c 6962 7261 o create a libra\n+001a17c0: 7279 2066 6f72 2069 742e 3c2f 703e 0a3c ry for it.

    .<\n+001a17d0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001a17e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    nam\n+001a1810: 6573 7061 6365 203c 2f73 7061 6e3e 6361 espace ca\n+001a1820: 6c63 207b 3c2f 6469 763e 0a3c 6469 7620 lc {
    .
    .
    //g\n+001a1870: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+001a1880: 6e61 6d65 3a20 4361 6c63 203c 2f73 7061 name: Calc
    .
    //gsoap ns serv\n+001a18d0: 6963 6520 7374 796c 653a 2072 7063 203c ice style: rpc <\n+001a18e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001a1900: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a1910: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+001a1920: 7365 7276 6963 6520 656e 636f 6469 6e67 service encoding\n+001a1930: 3a20 656e 636f 6465 6420 3c2f 7370 616e : encoded
    .
    \n+001a1970: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+001a1980: 6365 206c 6f63 6174 696f 6e3a 2068 7474 ce location: htt\n+001a1990: 703a 2f2f 7777 772e 6373 2e66 7375 2e65 p://www.cs.fsu.e\n+001a19a0: 6475 2f7e 656e 6765 6c65 6e2f 6361 6c63 du/~engelen/calc\n+001a19b0: 2e63 6769 203c 2f73 7061 6e3e 3c2f 6469 .cgi .
    //gso\n+001a19f0: 6170 206e 7320 7363 6865 6d61 206e 616d ap ns schema nam\n+001a1a00: 6573 7061 6365 3a20 7572 6e3a 6361 6c63 espace: urn:calc\n+001a1a10: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001a1a20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a1a30: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__add(double a, double\n+001a1ab0: 2062 2c20 3c73 7061 6e20 636c 6173 733d b, do\n+001a1ad0: 7562 6c65 3c2f 7370 616e 3e20 2661 6d70 uble &\n+001a1ae0: 3b72 6573 756c 7429 3b20 3c2f 6469 763e ;result);
    \n+001a1af0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n+001a1b20: 3c2f 7370 616e 3e20 6e73 5f5f 7375 6228 ns__sub(\n+001a1b30: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n+001a1b50: 3c2f 7370 616e 3e20 612c 203c 7370 616e a, double b, \n+001a1ba0: 646f 7562 6c65 3c2f 7370 616e 3e20 2661 double &a\n+001a1bb0: 6d70 3b72 6573 756c 7429 3b20 3c2f 6469 mp;result); .
    i\n+001a1bf0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6d75 nt ns__mu\n+001a1c00: 6c28 3c73 7061 6e20 636c 6173 733d 226b l(doub\n+001a1c20: 6c65 3c2f 7370 616e 3e20 612c 203c 7370 le a, double b, double \n+001a1c80: 2661 6d70 3b72 6573 756c 7429 3b20 3c2f &result); .
    int ns__\n+001a1cd0: 6469 7628 3c73 7061 6e20 636c 6173 733d div(do\n+001a1cf0: 7562 6c65 3c2f 7370 616e 3e20 612c 203c uble a, <\n+001a1d00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a1d10: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n+001a1d20: 2f73 7061 6e3e 2062 2c20 3c73 7061 6e20 /span> b, double &result); \n+001a1d60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a1d80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    } // na\n+001a1db0: 6d65 7370 6163 6520 6361 6c63 3c2f 7370 mespace calc
    .
    \n+001a1dd0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    \n+001a29f0: 5468 6520 6578 616d 706c 6520 6162 6f76 The example abov\n+001a2a00: 6520 7365 7276 6573 2072 6571 7565 7374 e serves request\n+001a2a10: 7320 6f76 6572 2073 7464 696e 2f6f 7574 s over stdin/out\n+001a2a20: 2e20 5573 6520 7468 6520 6269 6e64 2061 . Use the bind a\n+001a2a30: 6e64 2061 6363 6570 7420 6361 6c6c 7320 nd accept calls \n+001a2a40: 746f 2063 7265 6174 6520 6120 7374 616e to create a stan\n+001a2a50: 642d 616c 6f6e 6520 7365 7276 6572 2074 d-alone server t\n+001a2a60: 6f20 7365 7276 6963 6520 696e 626f 756e o service inboun\n+001a2a70: 6420 7265 7175 6573 7473 206f 7665 7220 d requests over \n+001a2a80: 736f 636b 6574 732c 2073 6565 2053 6563 sockets, see Sec\n+001a2a90: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion How to create a\n+001a2ad0: 2073 7461 6e64 2d61 6c6f 6e65 2073 6572 stand-alone ser\n+001a2ae0: 7665 723c 2f61 3e20 2e3c 2f70 3e0a 3c70 ver .

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

    .C \n+001a2b50: 6578 616d 706c 6573 3c2f 6833 3e0a 3c70 examples

    .This is the sam\n+001a2b70: 6520 6578 616d 706c 6520 6173 2061 626f e example as abo\n+001a2b80: 7665 2c20 6275 7420 7468 6520 636c 6965 ve, but the clie\n+001a2b90: 6e74 7320 6172 6520 6275 696c 6420 696e nts are build in\n+001a2ba0: 2043 2e3c 2f70 3e0a 3c70 3e57 6520 6372 C.

    .

    We cr\n+001a2bb0: 6561 7465 2061 203c 656d 3e3c 636f 6465 eate a env.h that contains\n+001a2be0: 2074 6865 206a 6f69 6e74 2053 4f41 5020 the joint SOAP \n+001a2bf0: 4865 6164 6572 2061 6e64 2053 4f41 5020 Header and SOAP \n+001a2c00: 4661 756c 7420 6465 6669 6e69 7469 6f6e Fault definition\n+001a2c10: 732e 2059 6f75 206d 6179 2068 6176 6520 s. You may have \n+001a2c20: 746f 2063 6f70 792d 7061 7374 6520 7468 to copy-paste th\n+001a2c30: 6573 6520 6672 6f6d 2074 6865 206f 7468 ese from the oth\n+001a2c40: 6572 2068 6561 6465 7220 6669 6c65 732e er header files.\n+001a2c50: 2054 6865 6e2c 2063 6f6d 7069 6c65 2069 Then, compile i\n+001a2c60: 7420 6173 2066 6f6c 6c6f 7773 3a20 3c2f t as follows:

     soapcpp\n+001a2c90: 3220 2d63 202d 7065 6e76 2065 6e76 2e68  2 -c -penv env.h\n+001a2ca0: 0a20 6363 202d 6320 656e 7643 2e63 0a3c  . cc -c envC.c.<\n+001a2cb0: 2f70 7265 3e3c 703e 2057 6520 616c 736f  /pre>

    We also\n+001a2cc0: 2063 6f6d 7069 6c65 203c 656d 3e3c 636f compile gsoap/stdsoap\n+001a2ce0: 322e 633c 2f63 6f64 653e 3c2f 656d 3e20 2.c \n+001a2cf0: 7769 7468 6f75 7420 6e61 6d65 7370 6163 without namespac\n+001a2d00: 6573 3a20 3c2f 703e 3c70 7265 2063 6c61 es:

     c\n+001a2d20: 6320 2d63 202d 4457 4954 485f 4e4f 4e41  c -c -DWITH_NONA\n+001a2d30: 4d45 5350 4143 4553 2073 7464 736f 6170  MESPACES stdsoap\n+001a2d40: 322e 630a 3c2f 7072 653e 3c70 3e20 5365  2.c.

    Se\n+001a2d50: 636f 6e64 2c20 7765 2063 7265 6174 6520 cond, we create \n+001a2d60: 7468 6520 4465 6c61 7965 6420 5374 6f63 the Delayed Stoc\n+001a2d70: 6b20 5175 6f74 6520 6865 6164 6572 2066 k Quote header f\n+001a2d80: 696c 6520 7370 6563 6966 6963 6174 696f ile specificatio\n+001a2d90: 6e2c 2077 6869 6368 206d 6179 2062 6520 n, which may be \n+001a2da0: 6f62 7461 696e 6564 2075 7369 6e67 2074 obtained using t\n+001a2db0: 6865 2057 5344 4c20 696d 706f 7274 6572 he WSDL importer\n+001a2dc0: 2e3c 2f70 3e0a 3c64 6976 2063 6c61 7373 .

    .
    //gsoap ns s\n+001a2e10: 6572 7669 6365 206e 616d 653a 2053 6572 ervice name: Ser\n+001a2e20: 7669 6365 203c 2f73 7061 6e3e 3c2f 6469 vice .
    //gso\n+001a2e60: 6170 206e 7320 7365 7276 6963 6520 7374 ap ns service st\n+001a2e70: 796c 653a 2072 7063 203c 2f73 7061 6e3e yle: rpc \n+001a2e80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001a2eb0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+001a2ec0: 6520 656e 636f 6469 6e67 3a20 656e 636f e encoding: enco\n+001a2ed0: 6465 6420 3c2f 7370 616e 3e3c 2f64 6976 ded .
    //gsoa\n+001a2f10: 7020 6e73 2073 6572 7669 6365 206c 6f63 p ns service loc\n+001a2f20: 6174 696f 6e3a 2068 7474 703a 2f2f 7365 ation: http://se\n+001a2f30: 7276 6963 6573 2e78 6d65 7468 6f64 732e rvices.xmethods.\n+001a2f40: 6e65 742f 736f 6170 203c 2f73 7061 6e3e net/soap \n+001a2f50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001a2f80: 2f67 736f 6170 206e 7320 7363 6865 6d61 /gsoap ns schema\n+001a2f90: 206e 616d 6573 7061 6365 3a20 7572 6e3a namespace: urn:\n+001a2fa0: 786d 6574 686f 6473 2d64 656c 6179 6564 xmethods-delayed\n+001a2fb0: 2d71 756f 7465 7320 3c2f 7370 616e 3e3c -quotes <\n+001a2fc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+001a2ff0: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+001a3000: 206d 6574 686f 642d 6163 7469 6f6e 3a20 method-action: \n+001a3010: 6765 7451 756f 7465 2026 7175 6f74 3b26 getQuote "&\n+001a3020: 7175 6f74 3b20 3c2f 7370 616e 3e3c 2f64 quot; .
    \n+001a3060: 696e 743c 2f73 7061 6e3e 206e 735f 5f67 int ns__g\n+001a3070: 6574 5175 6f74 6528 3c73 7061 6e20 636c etQuote(char *s\n+001a30a0: 796d 626f 6c2c 203c 7370 616e 2063 6c61 ymbol, float *R\n+001a30d0: 6573 756c 7429 3b3c 2f64 6976 3e0a 3c2f esult);
    .

    We compi\n+001a3100: 6c65 2069 7420 6173 2061 206c 6962 7261 le it as a libra\n+001a3110: 7279 2061 6e64 2077 6520 7573 6520 6f70 ry and we use op\n+001a3120: 7469 6f6e 7320 3c62 3e3c 636f 6465 3e2d tions -\n+001a3130: 6e3c 2f63 6f64 653e 3c2f 623e 2061 6e64 n and\n+001a3140: 203c 623e 3c63 6f64 653e 2d70 7175 6f74 -pquot\n+001a3150: 653c 2f63 6f64 653e 3c2f 623e 2074 6f20 e to \n+001a3160: 7072 6566 6978 2074 6865 2067 656e 6572 prefix the gener\n+001a3170: 6174 6564 2066 696c 6573 2061 6e64 2074 ated files and t\n+001a3180: 6f20 7265 6e61 6d65 2074 6865 206e 616d o rename the nam\n+001a3190: 6573 7061 6365 2074 6162 6c65 2074 6f20 espace table to \n+001a31a0: 6176 6f69 6420 6c69 6e6b 2063 6f6e 666c avoid link confl\n+001a31b0: 6963 7473 3a20 3c2f 703e 3c70 7265 2063 icts:

    \n+001a31d0: 2073 6f61 7063 7070 3220 2d63 202d 6e20   soapcpp2 -c -n \n+001a31e0: 2d70 7175 6f74 6520 7175 6f74 652e 680a  -pquote quote.h.\n+001a31f0: 2063 6320 2d63 2071 756f 7465 436c 6965   cc -c quoteClie\n+001a3200: 6e74 4c69 622e 630a 3c2f 7072 653e 3c70  ntLib.c.
    Third, we crea\n+001a3220: 7465 2074 6865 2043 7572 7265 6e63 7920 te the Currency \n+001a3230: 4578 6368 616e 6765 2052 6174 6520 6865 Exchange Rate he\n+001a3240: 6164 6572 2066 696c 6520 7370 6563 6966 ader file specif\n+001a3250: 6963 6174 696f 6e3a 3c2f 703e 0a3c 6469 ication:

    .
    //gso\n+001a32a0: 6170 206e 7320 7365 7276 6963 6520 6e61 ap ns service na\n+001a32b0: 6d65 3a20 5365 7276 6963 6520 3c2f 7370 me: Service
    .
    //gsoap ns ser\n+001a3300: 7669 6365 2073 7479 6c65 3a20 7270 6320 vice style: rpc \n+001a3310: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001a3330: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+001a3350: 2073 6572 7669 6365 2065 6e63 6f64 696e service encodin\n+001a3360: 673a 2065 6e63 6f64 6564 203c 2f73 7061 g: encoded
    .
    //gsoap ns serv\n+001a33b0: 6963 6520 6c6f 6361 7469 6f6e 3a20 6874 ice location: ht\n+001a33c0: 7470 3a2f 2f73 6572 7669 6365 732e 786d tp://services.xm\n+001a33d0: 6574 686f 6473 2e6e 6574 2f73 6f61 7020 ethods.net/soap \n+001a33e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001a3400: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+001a3420: 2073 6368 656d 6120 6e61 6d65 7370 6163 schema namespac\n+001a3430: 653a 2075 726e 3a78 6d65 7468 6f64 732d e: urn:xmethods-\n+001a3440: 4375 7272 656e 6379 4578 6368 616e 6765 CurrencyExchange\n+001a3450: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001a3460: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a3470: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+001a3490: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n+001a34a0: 2d61 6374 696f 6e3a 2067 6574 5261 7465 -action: getRate\n+001a34b0: 2026 7175 6f74 3b26 7175 6f74 3b20 3c2f ""
    .int ns__getRate(<\n+001a3510: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a3520: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *country1, \n+001a3540: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *country2,\n+001a3570: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float\n+001a3590: 3c2f 7370 616e 3e20 2a52 6573 756c 7429 *Result)\n+001a35a0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+001a35c0: 703e 5765 2063 6f6d 7069 6c65 2069 7420 p>We compile it \n+001a35d0: 6173 2061 206c 6962 7261 7279 2061 6e64 as a library and\n+001a35e0: 2077 6520 7573 6520 6f70 7469 6f6e 7320 we use options \n+001a35f0: 3c62 3e3c 636f 6465 3e2d 6e3c 2f63 6f64 -n and -prate to prefix \n+001a3630: 7468 6520 6765 6e65 7261 7465 6420 6669 the generated fi\n+001a3640: 6c65 7320 616e 6420 746f 2072 656e 616d les and to renam\n+001a3650: 6520 7468 6520 6e61 6d65 7370 6163 6520 e the namespace \n+001a3660: 7461 626c 6520 746f 2061 766f 6964 206c table to avoid l\n+001a3670: 696e 6b20 636f 6e66 6c69 6374 733a 203c ink conflicts: <\n+001a3680: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>
     soapcp\n+001a36a0: 7032 202d 6320 2d6e 202d 7072 6174 6520  p2 -c -n -prate \n+001a36b0: 7261 7465 2e68 0a20 6363 202d 6320 7261  rate.h. cc -c ra\n+001a36c0: 7465 436c 6965 6e74 4c69 622e 630a 3c2f  teClientLib.c.

    The main\n+001a36e0: 2070 726f 6772 616d 2069 733a 3c2f 703e program is:

    \n+001a36f0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #include &qu\n+001a3740: 6f74 3b71 756f 7465 482e 6826 7175 6f74 ot;quoteH.h"\n+001a3750: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001a3760: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a3770: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+001a3790: 6c75 6465 2026 7175 6f74 3b72 6174 6548 lude "rateH\n+001a37a0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n+001a37b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo\n+001a37f0: 743b 7175 6f74 652e 6e73 6d61 7026 7175 t;quote.nsmap&qu\n+001a3800: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n+001a3810: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n+001a3840: 6e63 6c75 6465 2026 7175 6f74 3b72 6174 nclude "rat\n+001a3850: 652e 6e73 6d61 7026 7175 6f74 3b3c 2f73 e.nsmap"
    .
    .
    int main\n+001a38c0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int argc, char *argv[]) .
    {
    . \n+001a3950: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (argc <= \n+001a3980: 3129 203c 2f64 6976 3e0a 3c64 6976 2063 1)
    .
    {<\n+001a39a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fpri\n+001a39c0: 6e74 6628 7374 6465 7272 2c20 3c73 7061 ntf(stderr, "Us\n+001a39f0: 6167 653a 206d 6169 6e20 7469 636b 6572 age: main ticker\n+001a3a00: 205b 6375 7272 656e 6379 5d5c 6e26 7175 [currency]\\n&qu\n+001a3a10: 6f74 3b3c 2f73 7061 6e3e 293b 203c 2f64 ot;); .
    exit(E\n+001a3a40: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    } .
    stru\n+001a3aa0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n+001a3b70: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    float q;
    .\n+001a3bd0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_se\n+001a3c30: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces\n+001a3c40: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a3c70: 2c20 7175 6f74 655f 6e61 6d65 7370 6163 , quote_namespac\n+001a3c80: 6573 293b 203c 2f64 6976 3e0a 3c64 6976 es);
    . \n+001a3ca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n+001a3cd0: 735f 5f67 6574 5175 6f74 6528 3c61 2063 s__getQuote(soap, NUL\n+001a3d10: 4c2c 204e 554c 4c2c 2061 7267 765b 315d L, NULL, argv[1]\n+001a3d20: 2c20 2661 6d70 3b71 2929 203c 7370 616e , &q)) // get quote
    . \n+001a3d70: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n+001a3dd0: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap, stder\n+001a3e10: 7229 3b20 3c2f 6469 763e 0a3c 6469 7620 r);
    .
    <\n+001a3e30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a3e40: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n+001a3e70: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if (argc > 2) \n+001a3ec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap_set_nam\n+001a3f60: 6573 7061 6365 733c 2f61 3e28 3c61 2063 espaces(soap, rat\n+001a3fa0: 655f 6e61 6d65 7370 6163 6573 293b 203c e_namespaces); <\n+001a3fb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    float r;
    .<\n+001a4000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a4010: 3e20 2020 2020 203c 7370 616e 2063 6c61 > if (soap\n+001a4040: 5f63 616c 6c5f 6e73 5f5f 6765 7452 6174 _call_ns__getRat\n+001a4050: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap, NULL, NULL, <\n+001a4090: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001a40a0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001a40b0: 3b75 7326 7175 6f74 3b3c 2f73 7061 6e3e ;us"\n+001a40c0: 2c20 6172 6776 5b32 5d2c 2026 616d 703b , argv[2], &\n+001a40d0: 7229 2920 3c73 7061 6e20 636c 6173 733d r)) // get\n+001a40f0: 2072 6174 6520 696e 2055 5320 646f 6c6c rate in US doll\n+001a4100: 6172 7320 3c2f 7370 616e 3e3c 2f64 6976 ars .. \n+001a4490: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
    .
    <\n+001a4540: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a4550: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001a4560: 2f73 7061 6e3e 2030 3b20 3c2f 6469 763e /span> 0;
    \n+001a4570: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    \n+001a6950: 486f 7765 7665 722c 2074 6865 2077 6869 However, the whi\n+001a6960: 6c65 206c 6f6f 7020 6974 6572 6174 6573 le loop iterates\n+001a6970: 2066 6f72 2065 6163 6820 6e65 7720 636f for each new co\n+001a6980: 6e6e 6563 7469 6f6e 2074 6861 7420 6973 nnection that is\n+001a6990: 2065 7374 6162 6c69 7368 6564 2077 6974 established wit\n+001a69a0: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap_accept\n+001a6a30: 3c2f 636f 6465 3e20 616e 6420 646f 6573 and does\n+001a6a40: 206e 6f74 2061 6c6c 6f77 2066 6f72 2048 not allow for H\n+001a6a50: 5454 5020 6b65 6570 2d61 6c69 7665 2063 TTP keep-alive c\n+001a6a60: 6f6e 6e65 6374 696f 6e73 2074 6f20 7065 onnections to pe\n+001a6a70: 7273 6973 742e 2046 6f72 206f 7572 2066 rsist. For our f\n+001a6a80: 696e 616c 2069 6d70 726f 7665 6d65 6e74 inal improvement\n+001a6a90: 2077 6520 7761 6e74 2074 6f20 7375 7070 we want to supp\n+001a6aa0: 6f72 7420 4854 5450 206b 6565 702d 616c ort HTTP keep-al\n+001a6ab0: 6976 6520 636f 6e6e 6563 7469 6f6e 7320 ive connections \n+001a6ac0: 7468 6174 2072 6571 7569 7265 206c 6f6f that require loo\n+001a6ad0: 7069 6e67 206f 7665 7220 7468 6520 7365 ping over the se\n+001a6ae0: 7276 6963 6520 6469 7370 6174 6368 6573 rvice dispatches\n+001a6af0: 2075 6e74 696c 2074 6865 2063 6f6e 6e65 until the conne\n+001a6b00: 6374 696f 6e20 636c 6f73 6573 206f 6e20 ction closes on \n+001a6b10: 6569 7468 6572 2065 6e64 2c20 6166 7465 either end, afte\n+001a6b20: 7220 7768 6963 6820 7765 2072 6573 756d r which we resum\n+001a6b30: 6520 7468 6520 6f75 7465 7220 6c6f 6f70 e the outer loop\n+001a6b40: 2e20 5468 6520 7265 7375 6c74 696e 6720 . The resulting \n+001a6b50: 636f 6465 2069 7320 7665 7279 2063 6c6f code is very clo\n+001a6b60: 7365 2074 6f20 7468 6520 736f 6170 6370 se to the soapcp\n+001a6b70: 7032 2d67 656e 6572 6174 6564 203c 636f p2-generated soap_serve\n+001a6c00: 3c2f 636f 6465 3e20 636f 6465 2061 6e64 code and\n+001a6c10: 2074 6865 203c 636f 6465 3e73 6572 7665 the serve\n+001a6c20: 3c2f 636f 6465 3e20 7365 7276 6963 6520 service \n+001a6c30: 636c 6173 7320 6d65 7468 6f64 732c 2077 class methods, w\n+001a6c40: 6974 6820 7468 6520 6164 6469 7469 6f6e ith the addition\n+001a6c50: 206f 6620 7468 6520 6368 6169 6e20 6f66 of the chain of\n+001a6c60: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n+001a6c70: 6865 7320 696e 2074 6865 206c 6f6f 7020 hes in the loop \n+001a6c80: 626f 6479 3a3c 2f70 3e0a 3c64 6976 2063 body:

    .
    \n+001a6ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+001a6cd0: 636c 7564 6520 2671 756f 743b 7175 6f74 clude "quot\n+001a6ce0: 6548 2e68 2671 756f 743b 3c2f 7370 616e eH.h"
    .
    #include &q\n+001a6d30: 756f 743b 7261 7465 482e 6826 7175 6f74 uot;rateH.h"\n+001a6d40: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001a6d50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a6d60: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+001a6d80: 6c75 6465 2026 7175 6f74 3b71 756f 7465 lude "quote\n+001a6d90: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap"
    .
    #include \n+001a6de0: 2671 756f 743b 7261 7465 2e6e 736d 6170 "rate.nsmap\n+001a6df0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    .\n+001a6e30: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001a6e80: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001a6eb0: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n+001a6f10: 5f6e 6577 3c2f 613e 2829 3b20 3c2f 6469 _new(); .
    i\n+001a6f50: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap\n+001a6fb0: 5f76 616c 6964 5f73 6f63 6b65 743c 2f61 _valid_socket(soap_bind(\n+001a7020: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a7050: 204e 554c 4c2c 2038 3038 302c 2031 3029 NULL, 8080, 10)\n+001a7060: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) // smal\n+001a7080: 6c20 4241 434b 4c4f 4720 666f 7220 6974 l BACKLOG for it\n+001a7090: 6572 6174 6976 6520 7365 7276 6572 733c erative servers<\n+001a70a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .{\n+001a70c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    while (1)
    . \n+001a7120: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if (soap_valid_\n+001a71c0: 736f 636b 6574 3c2f 613e 283c 6120 636c socket(soap_\n+001a7220: 6163 6365 7074 3c2f 613e 283c 6120 636c accept(soap))).
    {.
    soap->keep_aliv\n+001a7320: 653c 2f61 3e20 3d20 3c61 2063 6c61 7373 e = s\n+001a7350: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->max_keep_al\n+001a73b0: 6976 653c 2f61 3e20 2b20 313b 203c 7370 ive + 1; // max keep-a\n+001a73e0: 6c69 7665 2069 7465 7261 7469 6f6e 733c live iterations<\n+001a73f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a7410: 2020 2020 203c 7370 616e 2063 6c61 7373 d\n+001a7430: 6f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c o
    .<\n+001a7440: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a7450: 3e20 2020 2020 207b 3c2f 6469 763e 0a3c > {
    .<\n+001a7460: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a7470: 3e20 2020 2020 2020 203c 7370 616e 2063 > if ((<\n+001a74a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a74b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a74c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001a74d0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;keep\n+001a7520: 5f61 6c69 7665 3c2f 613e 2026 6774 3b20 _alive > \n+001a7530: 3029 2026 616d 703b 2661 6d70 3b20 283c 0) && (<\n+001a7540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a7550: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a7560: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001a7570: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;max_\n+001a75c0: 6b65 6570 5f61 6c69 7665 3c2f 613e 2026 keep_alive &\n+001a75d0: 6774 3b20 3029 293c 2f64 6976 3e0a 3c64 gt; 0))
    .\n+001a75f0: 2020 2020 2020 2020 2020 3c61 2063 6c61 soap->keep_aliv\n+001a7680: 653c 2f61 3e2d 2d3b 3c2f 6469 763e 0a3c e--;
    .<\n+001a7690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a76a0: 3e20 2020 2020 2020 203c 7370 616e 2063 > if (so\n+001a7720: 6170 5f62 6567 696e 5f73 6572 7665 3c2f ap_begin_serve(soap))
    .
    \n+001a7780: 2020 2020 207b 3c2f 6469 763e 0a3c 6469 {
    . \n+001a77a0: 2020 2020 2020 2020 203c 7370 616e 2063 if (soap
    -&g\n+001a7800: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error\n+001a7850: 3c2f 613e 2026 6774 3b3d 203c 6120 636c >= S\n+001a78b0: 4f41 505f 5354 4f50 3c2f 613e 2920 3c73 OAP_STOP) // if a plug\n+001a78e0: 696e 2068 6173 2073 6572 7665 6420 7468 in has served th\n+001a78f0: 6520 7265 7175 6573 743c 2f73 7061 6e3e e request\n+001a7900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a7920: 2020 2020 203c 7370 616e 2063 6c61 7373 c\n+001a7940: 6f6e 7469 6e75 653c 2f73 7061 6e3e 3b20 ontinue; \n+001a7950: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001a7960: 2020 3c73 7061 6e20 636c 6173 733d 2263 // then \n+001a7980: 636f 6e74 696e 7565 2077 6974 6820 7468 continue with th\n+001a7990: 6520 6e65 7874 2072 6571 7565 7374 3c2f e next request
    . \n+001a79c0: 2020 2020 2020 2020 3c73 7061 6e20 636c break; \n+001a79f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001a7a00: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n+001a7a20: 616e 2065 7272 6f72 206f 6363 7572 7265 an error occurre\n+001a7a30: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
    .<\n+001a7a40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a7a50: 3e20 2020 2020 2020 207d 3c2f 6469 763e > }
    \n+001a7a60: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+001a7d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if \n+001a7d60: 2872 6174 655f 7365 7276 655f 7265 7175 (rate_serve_requ\n+001a7d70: 6573 7428 3c61 2063 6c61 7373 3d22 636f est(soap<\n+001a7da0: 2f61 3e29 293c 2f64 6976 3e0a 3c64 6976 /a>))
    . \n+001a7dc0: 2020 2020 2020 2020 2020 3c61 2063 6c61 soap_s\n+001a7e20: 656e 645f 6661 756c 743c 2f61 3e28 3c61 end_fault(soap); \n+001a7e60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // send fa\n+001a7e80: 756c 7420 746f 2063 6c69 656e 7420 3c2f ult to client
    . \n+001a7eb0: 2020 2020 2020 7d20 3c2f 6469 763e 0a3c }
    .<\n+001a7ec0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a7ed0: 3e20 2020 2020 2020 203c 7370 616e 2063 > else <\n+001a7f00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a7f10: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n+001a7f50: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error) .
    {.
    \n+001a7ff0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send_fault\n+001a8050: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a8080: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n+001a80a0: 7365 6e64 2066 6175 6c74 2074 6f20 636c send fault to cl\n+001a80b0: 6965 6e74 203c 2f73 7061 6e3e 3c2f 6469 ient .
    }.
    <\n+001a8100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a8110: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a8120: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001a8130: 6761 6637 6430 3137 3631 3631 6539 6465 gaf7d0176161e9de\n+001a8140: 6633 3639 3831 6532 3466 6161 3139 3133 f36981e24faa1913\n+001a8150: 6439 223e 736f 6170 5f64 6573 7472 6f79 d9\">soap_destroy\n+001a8160: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a8190: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+001a81b0: 2020 2020 2020 2020 3c61 2063 6c61 7373 soa\n+001a8210: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); .
    } while (soap\n+001a82c0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->keep_alive\n+001a8320: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    }\n+001a8340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else if<\n+001a83a0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n+001a83d0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->errnum)\n+001a8430: 203c 7370 616e 2063 6c61 7373 3d22 636f // accept\n+001a8450: 2066 6169 6c65 642c 2074 7279 2061 6761 failed, try aga\n+001a8460: 696e 2061 6674 6572 2031 2073 6563 6f6e in after 1 secon\n+001a8470: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
    .<\n+001a8480: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a8490: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n+001a84b0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri\n+001a8510: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st\n+001a8550: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
    .\n+001a8570: 2020 2020 2020 736c 6565 7028 3129 3b3c sleep(1);<\n+001a8580: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    else\n+001a85e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    fpr\n+001a8620: 696e 7466 2873 7464 6572 722c 203c 7370 intf(stderr, "s\n+001a8650: 6572 7665 7220 7469 6d65 6420 6f75 745c erver timed out\\\n+001a8660: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 293b n");\n+001a8670: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001a8690: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n+001a86b0: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n+001a86c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a86d0: 3e20 2020 207d 3c2f 6469 763e 0a3c 6469 > }
    . \n+001a86f0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_des\n+001a8750: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy(\n+001a8780: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soa\n+001a8800: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); .
    }
    .<\n+001a8860: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a8870: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    \n+001a88e0: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy\n+001a88f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a8920: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_end(soap); \n+001a89d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .

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

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

    \n+001a8af0: 3c2f 613e 0a48 6f77 2074 6f20 6372 6561 .How to crea\n+001a8b00: 7465 2044 4c4c 733c 2f68 323e 0a3c 703e te DLLs

    .

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

    .Creat\n+001a8b70: 696e 6720 7468 6520 6261 7365 2073 7464 ing the base std\n+001a8b80: 736f 6170 322e 646c 6c3c 2f68 333e 0a3c soap2.dll

    .<\n+001a8b90: 703e 5468 6520 656e 6769 6e65 2064 6f65 p>The engine doe\n+001a8ba0: 7320 6e6f 7420 6465 6669 6e65 2053 4f41 s not define SOA\n+001a8bb0: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n+001a8bc0: 6c74 2073 6572 6961 6c69 7a65 7273 2074 lt serializers t\n+001a8bd0: 6861 7420 7468 6520 656e 6769 6e65 206e hat the engine n\n+001a8be0: 6565 6473 2077 6865 6e20 696e 7374 616c eeds when instal\n+001a8bf0: 6c65 6420 6173 2061 206c 6962 7261 7279 led as a library\n+001a8c00: 2e20 5765 2074 6865 7265 666f 7265 2061 . We therefore a\n+001a8c10: 6464 2053 4f41 5020 4865 6164 6572 2061 dd SOAP Header a\n+001a8c20: 6e64 2046 6175 6c74 2073 6572 6961 6c69 nd Fault seriali\n+001a8c30: 7a65 7273 2c20 7768 6963 6820 6172 6520 zers, which are \n+001a8c40: 636f 6d70 696c 6564 2073 6570 6172 6174 compiled separat\n+001a8c50: 656c 7920 6173 2066 6f6c 6c6f 7773 2e20 ely as follows. \n+001a8c60: 4669 7273 742c 2063 7265 6174 6520 6120 First, create a \n+001a8c70: 6e65 7720 6865 6164 6572 2066 696c 6520 new header file \n+001a8c80: 3c65 6d3e 3c63 6f64 653e 656e 762e 683c env.h<\n+001a8c90: 2f63 6f64 653e 3c2f 656d 3e20 7769 7468 /code> with\n+001a8ca0: 2074 6865 2053 4f41 5020 4865 6164 6572 the SOAP Header\n+001a8cb0: 203c 636f 6465 3e3c 6120 636c 6173 733d SOAP_ENV__Head\n+001a8d20: 6572 3c2f 613e 3c2f 636f 6465 3e20 616e er an\n+001a8d30: 6420 534f 4150 2046 6175 6c74 203c 636f d SOAP Fault SOAP\n+001a8da0: 5f45 4e56 5f5f 4661 756c 743c 2f61 3e3c _ENV__Fault<\n+001a8db0: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure\n+001a8dc0: 732c 2069 6e63 6c75 6469 6e67 203c 636f s, including SOAP_ENV__De\n+001a8e40: 7461 696c 3c2f 613e 3c2f 636f 6465 3e20 tail \n+001a8e50: 6966 2074 6869 7320 7374 7275 6374 7572 if this structur\n+001a8e60: 6520 636f 6e74 6169 6e73 206d 656d 6265 e contains membe\n+001a8e70: 7273 2074 6861 7420 6172 6520 7365 7269 rs that are seri\n+001a8e80: 616c 697a 6564 2061 7320 6661 756c 7420 alized as fault \n+001a8e90: 6465 7461 696c 732e 2059 6f75 2063 616e details. You can\n+001a8ea0: 206c 6561 7665 2074 6869 7320 6865 6164 leave this head\n+001a8eb0: 6572 2066 696c 6520 656d 7074 7920 6966 er file empty if\n+001a8ec0: 2079 6f75 2077 616e 7420 746f 2075 7365 you want to use\n+001a8ed0: 2074 6865 2064 6566 6175 6c74 2053 4f41 the default SOA\n+001a8ee0: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n+001a8ef0: 6c74 2e20 486f 7765 7665 722c 2069 6620 lt. However, if \n+001a8f00: 534f 4150 2048 6561 6465 7273 2061 7265 SOAP Headers are\n+001a8f10: 2072 6571 7569 7265 6420 7468 656e 2079 required then y\n+001a8f20: 6f75 2063 616e 6e6f 7420 6c65 6176 6520 ou cannot leave \n+001a8f30: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the SOAP_ENV__H\n+001a8fa0: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader\n+001a8fb0: 2073 7472 7563 7475 7265 2065 6d70 7479 structure empty\n+001a8fc0: 2e20 466f 7220 6578 616d 706c 652c 2074 . For example, t\n+001a8fd0: 6865 2057 532d 4164 6472 6573 7369 6e67 he WS-Addressing\n+001a8fe0: 2061 6e64 2057 532d 5365 6375 7269 7479 and WS-Security\n+001a8ff0: 2070 6c75 6769 6e73 2072 6571 7569 7265 plugins require\n+001a9000: 2053 4f41 5020 4865 6164 6572 7320 7768 SOAP Headers wh\n+001a9010: 6963 6820 6361 6e20 6265 2069 6d70 6f72 ich can be impor\n+001a9020: 7465 6420 6279 2061 6464 696e 6720 3c63 ted by adding #import \"wsa\n+001a9040: 352e 6822 3c2f 636f 6465 3e20 616e 6420 5.h\"
    and \n+001a9050: 3c63 6f64 653e 2369 6d70 6f72 7420 2277 #import \"w\n+001a9060: 7373 652e 6822 3c2f 636f 6465 3e2c 2072 sse.h\", r\n+001a9070: 6573 7065 6374 6976 656c 7920 746f 203c espectively to <\n+001a9080: 656d 3e3c 636f 6465 3e65 6e76 2e68 3c2f em>env.h
    . Then\n+001a90a0: 2063 6f6d 7069 6c65 2074 6869 7320 6865 compile this he\n+001a90b0: 6164 6572 2066 696c 6520 7769 7468 3a20 ader file with: \n+001a90c0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     soapc\n+001a90e0: 7070 3220 2d70 656e 7620 656e 762e 680a  pp2 -penv env.h.\n+001a90f0: 3c2f 7072 653e 3c70 3e20 5468 6520 6765  

    The ge\n+001a9100: 6e65 7261 7465 6420 3c65 6d3e 3c63 6f64 nerated envC.cpp file hold\n+001a9130: 7320 7468 6520 534f 4150 2048 6561 6465 s the SOAP Heade\n+001a9140: 7220 616e 6420 4661 756c 7420 7365 7269 r and Fault seri\n+001a9150: 616c 697a 6572 732e 2057 6520 6361 6e20 alizers. We can \n+001a9160: 6569 7468 6572 2063 7265 6174 6520 6120 either create a \n+001a9170: 7365 7061 7261 7465 203c 656d 3e3c 636f separate envC.dll DLL for \n+001a91a0: 7468 6973 2074 6861 7420 616c 6c20 636c this that all cl\n+001a91b0: 6965 6e74 7320 616e 6420 7365 7276 6963 ients and servic\n+001a91c0: 6520 6170 706c 6963 6174 696f 6e73 2077 e applications w\n+001a91d0: 696c 6c20 7573 652c 206f 7220 636f 6d62 ill use, or comb\n+001a91e0: 696e 6520 3c65 6d3e 3c63 6f64 653e 656e ine en\n+001a91f0: 7643 2e63 7070 3c2f 636f 6465 3e3c 2f65 vC.cpp with the \n+001a9210: 3c63 6f64 653e 7374 6473 6f61 7032 2e64 stdsoap2.d\n+001a9220: 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e 2077 ll w\n+001a9230: 6520 6372 6561 7465 2c20 7768 6963 6820 e create, which \n+001a9240: 7765 2077 696c 6c20 6578 706c 6169 6e20 we will explain \n+001a9250: 6675 7274 6865 722e 3c2f 703e 0a3c 703e further.

    .

    \n+001a9260: 5468 6520 6e65 7874 2073 7465 7020 6973 The next step is\n+001a9270: 2074 6f20 6372 6561 7465 203c 656d 3e3c to create <\n+001a9280: 636f 6465 3e73 7464 736f 6170 322e 646c code>stdsoap2.dl\n+001a9290: 6c3c 2f63 6f64 653e 3c2f 656d 3e20 7768 l wh\n+001a92a0: 6963 6820 636f 6e73 6973 7473 206f 6620 ich consists of \n+001a92b0: 7468 6520 6669 6c65 203c 656d 3e3c 636f the file gsoap/stdsoap\n+001a92d0: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp and \n+001a92f0: 656e 7643 2e63 7070 3c2f 636f 6465 3e3c envC.cpp<\n+001a9300: 2f65 6d3e 2061 6e64 206f 7074 696f 6e61 /em> and optiona\n+001a9310: 6c6c 7920 7468 6520 706c 7567 696e 7320 lly the plugins \n+001a9320: 796f 7520 7761 6e74 2074 6f20 7573 6520 you want to use \n+001a9330: 7375 6368 2061 7320 3c65 6d3e 3c63 6f64 such as wsseapi.cpp (we ne\n+001a9360: 6564 2074 6f20 7265 6e61 6d65 2061 6c6c ed to rename all\n+001a9370: 203c 656d 3e3c 636f 6465 3e2e 633c 2f63 .c files \n+001a9390: 746f 203c 656d 3e3c 636f 6465 3e2e 6370 to .cp\n+001a93a0: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi\n+001a93b0: 6c65 7320 746f 2061 766f 6964 2069 7373 les to avoid iss\n+001a93c0: 7565 7320 7769 7468 204d 5356 432b 2b29 ues with MSVC++)\n+001a93d0: 2e20 5468 6973 2044 4c4c 2063 6f6e 7461 . This DLL conta\n+001a93e0: 696e 7320 616c 6c20 636f 6d6d 6f6e 2066 ins all common f\n+001a93f0: 756e 6374 696f 6e73 206e 6565 6465 6420 unctions needed \n+001a9400: 666f 7220 616c 6c20 6f74 6865 7220 636c for all other cl\n+001a9410: 6965 6e74 7320 616e 6420 7365 7276 6572 ients and server\n+001a9420: 7320 6261 7365 6420 6f6e 2067 534f 4150 s based on gSOAP\n+001a9430: 2e20 436f 6d70 696c 6520 3c65 6d3e 3c63 . Compile envC.cpp and gsoap/std\n+001a9470: 736f 6170 322e 6370 703c 2f63 6f64 653e soap2.cpp\n+001a9480: 3c2f 656d 3e20 696e 746f 203c 656d 3e3c into <\n+001a9490: 636f 6465 3e73 7464 736f 6170 322e 646c code>stdsoap2.dl\n+001a94a0: 6c3c 2f63 6f64 653e 3c2f 656d 3e20 7573 l us\n+001a94b0: 696e 6720 7468 6520 636f 6d70 696c 6572 ing the compiler\n+001a94c0: 206f 7074 696f 6e20 3c63 6f64 653e 2f44 option /D\n+001a94d0: 3c2f 636f 6465 3e20 3c63 6f64 653e 2357 #W\n+001a94e0: 4954 485f 4e4f 4e41 4d45 5350 4143 4553 ITH_NONAMESPACES\n+001a94f0: 3c2f 636f 6465 3e20 616e 6420 7468 6520 and the \n+001a9500: 4d53 5643 2050 7265 2d50 726f 6365 7373 MSVC Pre-Process\n+001a9510: 6f72 2064 6566 696e 6974 696f 6e73 203c or definitions <\n+001a9520: 636f 6465 3e53 4f41 505f 464d 4143 313d code>SOAP_FMAC1=\n+001a9530: 5f5f 6465 636c 7370 6563 2864 6c6c 6578 __declspec(dllex\n+001a9540: 706f 7274 293c 2f63 6f64 653e 2c20 3c63 port), SOAP_FMAC3=_\n+001a9560: 5f64 6563 6c73 7065 6328 646c 6c65 7870 _declspec(dllexp\n+001a9570: 6f72 7429 3c2f 636f 6465 3e2c 2061 6e64 ort), and\n+001a9580: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n+001a9590: 5f53 5444 5f45 5850 4f52 5453 3c2f 636f _STD_EXPORTS macro set as\n+001a95b0: 2073 686f 776e 2062 656c 6f77 2066 726f shown below fro\n+001a95c0: 6d20 7468 6520 4d53 5643 2063 6f6d 6d61 m the MSVC comma\n+001a95d0: 6e64 2070 726f 6d70 743a 203c 2f70 3e3c nd prompt:

    <\n+001a95e0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+001a95f0: 656e 7422 3e43 3a26 6774 3b20 636c 202f ent\">C:> cl /\n+001a9600: 6320 2f49 2e20 2f45 4873 6320 2f44 5749 c /I. /EHsc /DWI\n+001a9610: 5448 5f4e 4f4e 414d 4553 5041 4345 5320 TH_NONAMESPACES \n+001a9620: 2f44 534f 4150 5f46 4d41 4331 3d5f 5f64 /DSOAP_FMAC1=__d\n+001a9630: 6563 6c73 7065 6328 646c 6c65 7870 6f72 eclspec(dllexpor\n+001a9640: 7429 202f 4453 4f41 505f 464d 4143 333d t) /DSOAP_FMAC3=\n+001a9650: 5f5f 6465 636c 7370 6563 2864 6c6c 6578 __declspec(dllex\n+001a9660: 706f 7274 2920 2f44 534f 4150 5f53 5444 port) /DSOAP_STD\n+001a9670: 5f45 5850 4f52 5453 2065 6e76 432e 6370 _EXPORTS envC.cp\n+001a9680: 7020 7374 6473 6f61 7032 2e63 7070 0a43 p stdsoap2.cpp.C\n+001a9690: 3a26 6774 3b20 6c69 6e6b 202f 4c49 4250 :> link /LIBP\n+001a96a0: 4154 4820 7773 325f 3332 2e6c 6962 202f ATH ws2_32.lib /\n+001a96b0: 4f55 543a 6d79 6773 6f61 702e 646c 6c20 OUT:mygsoap.dll \n+001a96c0: 2f44 4c4c 2065 6e76 432e 6f62 6a20 7374 /DLL envC.obj st\n+001a96d0: 6473 6f61 7032 2e6f 626a 0a3c 2f70 7265 dsoap2.obj.

    Note: as of\n+001a96f0: 2067 534f 4150 2032 2e38 2e33 3020 616e gSOAP 2.8.30 an\n+001a9700: 6420 6c61 7465 722c 2074 6865 2044 4c4c d later, the DLL\n+001a9710: 2065 7870 6f72 7420 6d61 6372 6f73 2073 export macros s\n+001a9720: 686f 776e 2068 6572 6520 6172 6520 616c hown here are al\n+001a9730: 6c20 7365 7420 7769 7468 206f 6e65 2070 l set with one p\n+001a9740: 7265 2d70 726f 6365 7373 6f72 2064 6566 re-processor def\n+001a9750: 696e 6974 696f 6e20 3c63 6f64 653e 2353 inition #S\n+001a9760: 4f41 505f 5354 445f 4558 504f 5254 533c OAP_STD_EXPORTS<\n+001a9770: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e41 /code>.

    .

    A\n+001a9780: 6c74 6572 6e61 7469 7665 6c79 2c20 796f lternatively, yo\n+001a9790: 7520 6361 6e20 636f 6d70 696c 6520 7769 u can compile wi\n+001a97a0: 7468 203c 636f 6465 3e2f 443c 2f63 6f64 th /D #WITH_S\n+001a97c0: 4f41 5044 4546 535f 483c 2f63 6f64 653e OAPDEFS_H\n+001a97d0: 2061 6e64 2070 7574 2074 6865 206d 6163 and put the mac\n+001a97e0: 726f 2064 6566 696e 6974 696f 6e73 2069 ro definitions i\n+001a97f0: 6e20 3c65 6d3e 3c63 6f64 653e 736f 6170 n soap\n+001a9800: 6465 6673 2e68 3c2f 636f 6465 3e3c 2f65 defs.h. This exports\n+001a9820: 2061 6c6c 2066 756e 6374 696f 6e73 2077 all functions w\n+001a9830: 6869 6368 2061 7265 2070 7265 6365 6465 hich are precede\n+001a9840: 6420 6279 2074 6865 206d 6163 726f 203c d by the macro <\n+001a9850: 636f 6465 3e23 534f 4150 5f46 4d41 4331 code>#SOAP_FMAC1\n+001a9860: 3c2f 636f 6465 3e20 696e 2074 6865 203c in the <\n+001a9870: 656d 3e3c 636f 6465 3e73 6f61 7063 7070 em>soapcpp\n+001a9880: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp source file an\n+001a98a0: 6420 6d61 6372 6f20 3c63 6f64 653e 2353 d macro #S\n+001a98b0: 4f41 505f 464d 4143 333c 2f63 6f64 653e OAP_FMAC3\n+001a98c0: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the envC.cpp source fi\n+001a98f0: 6c65 2e3c 2f70 3e0a 3c70 3e46 696e 616c le.

    .

    Final\n+001a9900: 6c79 2c20 6e6f 7465 2074 6861 7420 7468 ly, note that th\n+001a9910: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c\n+001a9920: 6f64 6520 7061 636b 6167 6520 636f 6e74 ode package cont\n+001a9930: 6169 6e73 2061 206c 6f74 206f 6620 3c65 ains a lot of .c source co\n+001a9960: 6465 2066 696c 6573 2e20 4d69 7869 6e67 de files. Mixing\n+001a9970: 2043 2077 6974 6820 432b 2b20 6669 6c65 C with C++ file\n+001a9980: 7320 6973 206e 6f74 2072 6563 6f6d 6d65 s is not recomme\n+001a9990: 6e64 6564 2077 6974 6820 5669 7375 616c nded with Visual\n+001a99a0: 2053 7475 6469 6f20 616e 6420 7769 6c6c Studio and will\n+001a99b0: 206c 6561 6420 746f 2072 756e 2d74 696d lead to run-tim\n+001a99c0: 6520 6572 726f 7273 2077 6865 6e20 6275 e errors when bu\n+001a99d0: 696c 6469 6e67 2044 4c4c 732e 2054 6865 ilding DLLs. The\n+001a99e0: 7265 666f 7265 2c20 616c 7761 7973 2072 refore, always r\n+001a99f0: 656e 616d 6520 3c65 6d3e 3c63 6f64 653e ename \n+001a9a00: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2073 .c s\n+001a9a10: 6f75 7263 6520 636f 6465 2066 696c 6573 ource code files\n+001a9a20: 2074 6f20 3c65 6d3e 3c63 6f64 653e 2e63 to .c\n+001a9a30: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2073 pp s\n+001a9a40: 6f75 7263 6520 636f 6465 2066 696c 6573 ource code files\n+001a9a50: 2077 6865 6e20 6372 6561 7469 6e67 2044 when creating D\n+001a9a60: 4c4c 732e 3c2f 703e 0a3c 703e f09f 949d LLs.

    .

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

    .<\n+001a9aa0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.C\n+001a9ad0: 7265 6174 696e 6720 636c 6965 6e74 2061 reating client a\n+001a9ae0: 6e64 2073 6572 7665 7220 444c 4c73 3c2f nd server DLLs.

    Compile t\n+001a9b00: 6865 203c 656d 3e3c 636f 6465 3e73 6f61 he soa\n+001a9b10: 7043 6c69 656e 744c 6962 2e63 7070 3c2f pClientLib.cpp and <\n+001a9b30: 656d 3e3c 636f 6465 3e73 6f61 7053 6572 em>soapSer\n+001a9b40: 7665 724c 6962 2e63 7070 3c2f 636f 6465 verLib.cpp sources a\n+001a9b60: 7320 444c 4c73 2062 7920 7573 696e 6720 s DLLs by using \n+001a9b70: 7468 6520 4d53 5643 2050 7265 2d50 726f the MSVC Pre-Pro\n+001a9b80: 6365 7373 6f72 2064 6566 696e 6974 696f cessor definitio\n+001a9b90: 6e73 203c 636f 6465 3e53 4f41 505f 464d ns SOAP_FM\n+001a9ba0: 4143 353d 5f5f 6465 636c 7370 6563 2864 AC5=__declspec(d\n+001a9bb0: 6c6c 6578 706f 7274 293c 2f63 6f64 653e llexport)\n+001a9bc0: 2061 6e64 203c 636f 6465 3e53 4f41 505f and SOAP_\n+001a9bd0: 434d 4143 3d5f 5f64 6563 6c73 7065 6328 CMAC=__declspec(\n+001a9be0: 646c 6c65 7870 6f72 7429 3c2f 636f 6465 dllexport), and by using \n+001a9c00: 7468 6520 432b 2b20 636f 6d70 696c 6572 the C++ compiler\n+001a9c10: 206f 7074 696f 6e20 3c63 6f64 653e 2f44 option /D\n+001a9c20: 3c2f 636f 6465 3e20 3c63 6f64 653e 2357 #W\n+001a9c30: 4954 485f 4e4f 4e41 4d45 5350 4143 4553 ITH_NONAMESPACES\n+001a9c40: 3c2f 636f 6465 3e2e 2041 6c6c 206f 6620 . All of \n+001a9c50: 7468 6573 6520 6d61 6372 6f73 2061 7265 these macros are\n+001a9c60: 2073 6574 2061 7320 6120 7368 6f72 7468 set as a shorth\n+001a9c70: 616e 6420 7769 7468 206f 6e65 2070 7265 and with one pre\n+001a9c80: 2d70 726f 6365 7373 6f72 2064 6566 696e -processor defin\n+001a9c90: 6974 696f 6e20 3c63 6f64 653e 2353 4f41 ition #SOA\n+001a9ca0: 505f 5354 445f 4558 504f 5254 533c 2f63 P_STD_EXPORTS (requires g\n+001a9cc0: 534f 4150 2032 2e38 2e33 3020 6f72 206c SOAP 2.8.30 or l\n+001a9cd0: 6174 6572 292e 3c2f 703e 0a3c 703e 5468 ater).

    .

    Th\n+001a9ce0: 6973 2044 4c4c 206c 696e 6b73 2074 6f20 is DLL links to \n+001a9cf0: 3c65 6d3e 3c63 6f64 653e 7374 6473 6f61 stdsoa\n+001a9d00: 7032 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 p2.dll we created in\n+001a9d20: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Creating the ba\n+001a9d60: 7365 2073 7464 736f 6170 322e 646c 6c3c se stdsoap2.dll<\n+001a9d70: 2f61 3e2e 3c2f 703e 0a3c 703e 546f 2063 /a>.

    .

    To c\n+001a9d80: 7265 6174 6520 6d75 6c74 6970 6c65 2044 reate multiple D\n+001a9d90: 4c4c 7320 696e 2074 6865 2073 616d 6520 LLs in the same \n+001a9da0: 7072 6f6a 6563 7420 6469 7265 6374 6f72 project director\n+001a9db0: 792c 2079 6f75 2073 686f 756c 6420 7573 y, you should us\n+001a9dc0: 6520 3c62 3e3c 636f 6465 3e73 6f61 7063 e soapc\n+001a9dd0: 7070 3220 2d70 206e 616d 653c 2f63 6f64 pp2 -p name option -p name to ren\n+001a9e10: 616d 6520 7468 6520 6765 6e65 7261 7465 ame the generate\n+001a9e20: 6420 3c65 6d3e 3c63 6f64 653e 736f 6170 d soap\n+001a9e30: 436c 6965 6e74 4c69 622e 6370 703c 2f63 ClientLib.cpp and soapServ\n+001a9e60: 6572 4c69 622e 6370 703c 2f63 6f64 653e erLib.cpp\n+001a9e70: 3c2f 656d 3e20 2861 6e64 2061 7373 6f63 (and assoc\n+001a9e80: 6961 7465 6429 2066 696c 6573 2e20 5468 iated) files. Th\n+001a9e90: 6520 3c62 3e3c 636f 6465 3e2d 7020 6e61 e -p na\n+001a9ea0: 6d65 3c2f 636f 6465 3e3c 2f62 3e20 6f70 me op\n+001a9eb0: 7469 6f6e 2073 7065 6369 6669 6573 2061 tion specifies a\n+001a9ec0: 203c 656d 3e3c 636f 6465 3e6e 616d 653c name<\n+001a9ed0: 2f63 6f64 653e 3c2f 656d 3e20 7072 6566 /code> pref\n+001a9ee0: 6978 2074 6f20 7265 706c 6163 6520 7468 ix to replace th\n+001a9ef0: 6520 3c65 6d3e 3c63 6f64 653e 736f 6170 e soap\n+001a9f00: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+001a9f10: 6520 6e61 6d65 2070 7265 6669 782e 2041 e name prefix. A\n+001a9f20: 6e6f 7468 6572 2077 6179 2069 7320 746f nother way is to\n+001a9f30: 2075 7365 2043 2b2b 206e 616d 6573 7061 use C++ namespa\n+001a9f40: 6365 7320 7769 7468 203c 623e 3c63 6f64 ces with soapcpp2 -q na\n+001a9f60: 6d65 3c2f 636f 6465 3e3c 2f62 3e20 6f70 me op\n+001a9f70: 7469 6f6e 203c 623e 3c63 6f64 653e 2d71 tion -q\n+001a9f80: 206e 616d 653c 2f63 6f64 653e 3c2f 623e name\n+001a9f90: 2c20 6966 2074 6865 2069 6e74 6572 6661 , if the interfa\n+001a9fa0: 6365 2068 6561 6465 7220 6669 6c65 2069 ce header file i\n+001a9fb0: 6e70 7574 2074 6f20 736f 6170 6370 7032 nput to soapcpp2\n+001a9fc0: 2064 6f65 7320 6e6f 7420 616c 7265 6164 does not alread\n+001a9fd0: 7920 6465 636c 6172 6520 6120 432b 2b20 y declare a C++ \n+001a9fe0: 6e61 6d65 7370 6163 652e 2041 2063 6c65 namespace. A cle\n+001a9ff0: 616e 2073 6570 6172 6174 696f 6e20 6f66 an separation of\n+001aa000: 206c 6962 7261 7269 6573 2063 616e 2061 libraries can a\n+001aa010: 6c73 6f20 6265 2061 6368 6965 7665 6420 lso be achieved \n+001aa020: 7769 7468 2043 2b2b 206e 616d 6573 7061 with C++ namespa\n+001aa030: 6365 732c 2073 6565 2053 6563 7469 6f6e ces, see Section\n+001aa040: 203c 6120 636c 6173 733d 2265 6c22 2068 H\n+001aa070: 6f77 2074 6f20 6275 696c 6420 6120 636c ow to build a cl\n+001aa080: 6965 6e74 206f 7220 7365 7276 6572 2069 ient or server i\n+001aa090: 6e20 6120 432b 2b20 636f 6465 206e 616d n a C++ code nam\n+001aa0a0: 6573 7061 6365 3c2f 613e 202e 3c2f 703e espace .

    \n+001aa0b0: 0a3c 703e 556e 6c65 7373 2079 6f75 2075 .

    Unless you u\n+001aa0c0: 7365 2074 6865 2063 6c69 656e 7420 7072 se the client pr\n+001aa0d0: 6f78 7920 616e 6420 7365 7276 6572 206f oxy and server o\n+001aa0e0: 626a 6563 7420 636c 6173 7365 7320 283c bject classes (<\n+001aa0f0: 656d 3e3c 636f 6465 3e73 6f61 7058 595a em>soapXYZ\n+001aa100: 5072 6f78 792e 683c 2f63 6f64 653e 3c2f Proxy.h and soapXYZService\n+001aa130: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 292c .h),\n+001aa140: 2061 6c6c 2063 6c69 656e 7420 616e 6420 all client and \n+001aa150: 7365 7276 6572 2061 7070 6c69 6361 7469 server applicati\n+001aa160: 6f6e 7320 6d75 7374 2065 7870 6c69 6369 ons must explici\n+001aa170: 746c 7920 7365 7420 7468 6520 6e61 6d65 tly set the name\n+001aa180: 7370 6163 6573 2076 616c 7565 206f 6620 spaces value of \n+001aa190: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context wi\n+001aa200: 7468 3a3c 2f70 3e0a 3c64 6976 2063 6c61 th:

    .
    \n+001aa230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_\n+001aa290: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(<\n+001aa2a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001aa2b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001aa2c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001aa2d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 namespace\n+001aa330: 733c 2f61 3e29 3b3c 2f64 6976 3e0a 3c2f s);
    .

    where th\n+001aa360: 6520 3c63 6f64 653e 6e61 6d65 7370 6163 e namespac\n+001aa370: 6573 5b5d 3c2f 636f 6465 3e20 7461 626c es[] tabl\n+001aa380: 6520 7368 6f75 6c64 2062 6520 6465 6669 e should be defi\n+001aa390: 6e65 6420 696e 2074 6865 2063 6c69 656e ned in the clien\n+001aa3a0: 742f 7365 7276 6572 2073 6f75 7263 652e t/server source.\n+001aa3b0: 2054 6865 7365 2074 6162 6c65 7320 6172 These tables ar\n+001aa3c0: 6520 6765 6e65 7261 7465 6420 696e 2074 e generated in t\n+001aa3d0: 6865 203c 656d 3e3c 636f 6465 3e2e 6e73 he .ns\n+001aa3e0: 6d61 703c 2f63 6f64 653e 3c2f 656d 3e20 map \n+001aa3f0: 6669 6c65 732e 2054 6865 2074 6162 6c65 files. The table\n+001aa400: 7320 6172 6520 7265 6e61 6d65 6420 666f s are renamed fo\n+001aa410: 7220 636f 6e76 656e 6965 6e63 6520 7573 r convenience us\n+001aa420: 696e 6720 3c62 3e3c 636f 6465 3e73 6f61 ing soa\n+001aa430: 7063 7070 3220 2d6e 3c2f 636f 6465 3e3c pcpp2 -n<\n+001aa440: 2f62 3e20 6f70 7469 6f6e 203c 623e 3c63 /b> option -n, see Section <\n+001aa470: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001aa480: 663d 2269 6e64 6578 2e68 746d 6c23 736f f=\"index.html#so\n+001aa490: 6170 6370 7032 6f70 7469 6f6e 7322 3e73 apcpp2options\">s\n+001aa4a0: 6f61 7063 7070 3220 6f70 7469 6f6e 733c oapcpp2 options<\n+001aa4b0: 2f61 3e20 2e3c 2f70 3e0a 3c70 3ef0 9f94 /a> .

    .

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

    .\n+001aa4f0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .How to bu\n+001aa520: 696c 6420 6d6f 6475 6c65 7320 616e 6420 ild modules and \n+001aa530: 6c69 6272 6172 6965 7320 7769 7468 2074 libraries with t\n+001aa540: 6865 2023 6d6f 6475 6c65 2064 6972 6563 he #module direc\n+001aa550: 7469 7665 3c2f 6832 3e0a 3c70 3e54 6865 tive

    .

    The\n+001aa560: 203c 636f 6465 3e23 6d6f 6475 6c65 3c2f #module directive \n+001aa580: 6973 2075 7365 6420 746f 2062 7569 6c64 is used to build\n+001aa590: 206d 6f64 756c 6573 2077 6974 6820 736f modules with so\n+001aa5a0: 6170 6370 7032 2e20 4120 6c69 6272 6172 apcpp2. A librar\n+001aa5b0: 7920 6361 6e20 6265 2062 7569 6c74 2066 y can be built f\n+001aa5c0: 726f 6d20 6120 6d6f 6475 6c65 2061 6e64 rom a module and\n+001aa5d0: 206c 696e 6b65 6420 7769 7468 206d 756c linked with mul\n+001aa5e0: 7469 706c 6520 5765 6220 7365 7276 6963 tiple Web servic\n+001aa5f0: 6573 2061 7070 6c69 6361 7469 6f6e 732e es applications.\n+001aa600: 2054 6865 2064 6972 6563 7469 7665 2073 The directive s\n+001aa610: 686f 756c 6420 6170 7065 6172 2061 7420 hould appear at \n+001aa620: 7468 6520 746f 7020 6f66 2074 6865 2069 the top of the i\n+001aa630: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+001aa640: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n+001aa650: 3220 616e 6420 6861 7320 7468 6520 666f 2 and has the fo\n+001aa660: 6c6c 6f77 696e 6720 666f 726d 6174 733a llowing formats:\n+001aa670: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #module \n+001aa6c0: 2671 756f 743b 6e61 6d65 2671 756f 743b "name"\n+001aa6d0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+001aa6e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    and

    \n+001aa700: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #module &quo\n+001aa750: 743b 6e61 6d65 2671 756f 743b 3c2f 7370 t;name" "fullna\n+001aa770: 6d65 2671 756f 743b 3c2f 6469 763e 0a3c me"
    .<\n+001aa780: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    where t\n+001aa7a0: 6865 203c 636f 6465 3e6e 616d 653c 2f63 he name must be a u\n+001aa7c0: 6e69 7175 6520 7368 6f72 7420 6e61 6d65 nique short name\n+001aa7d0: 2066 6f72 2074 6865 206d 6f64 756c 652e for the module.\n+001aa7e0: 2054 6865 206e 616d 6520 6973 2063 6173 The name is cas\n+001aa7f0: 6520 696e 7365 6e73 6974 6976 6520 616e e insensitive an\n+001aa800: 6420 6d75 7374 206e 6f74 2065 7863 6565 d must not excee\n+001aa810: 6420 3420 6368 6172 6163 7465 7273 2069 d 4 characters i\n+001aa820: 6e20 6c65 6e67 7468 2e20 5468 6520 3c63 n length. The fullname, when presen\n+001aa850: 742c 2072 6570 7265 7365 6e74 7320 7468 t, represents th\n+001aa860: 6520 6675 6c6c 206e 616d 6520 6f66 2074 e full name of t\n+001aa870: 6865 206d 6f64 756c 6520 616e 6420 6973 he module and is\n+001aa880: 2075 7365 6420 746f 2070 7265 6669 7820 used to prefix \n+001aa890: 7468 6520 6675 6e63 7469 6f6e 206e 616d the function nam\n+001aa8a0: 6573 206f 6620 7468 6520 6765 6e65 7261 es of the genera\n+001aa8b0: 7465 6420 7365 7269 616c 697a 6572 7320 ted serializers \n+001aa8c0: 7265 706c 6163 696e 6720 7468 6520 7573 replacing the us\n+001aa8d0: 7561 6c20 3c63 6f64 653e 736f 6170 3c2f ual soap prefix. If\n+001aa8f0: 2061 6273 656e 742c 2074 6865 2073 686f absent, the sho\n+001aa900: 7274 206e 616d 6520 6973 2075 7365 6420 rt name is used \n+001aa910: 746f 2070 7265 6669 7820 7468 6520 6675 to prefix the fu\n+001aa920: 6e63 7469 6f6e 206e 616d 6573 206f 6620 nction names of \n+001aa930: 7468 6520 7365 7269 616c 697a 6572 732e the serializers.\n+001aa940: 3c2f 703e 0a3c 703e 5468 6520 7265 7374

    .

    The rest\n+001aa950: 206f 6620 7468 6520 636f 6e74 656e 7420 of the content \n+001aa960: 6f66 2074 6865 2069 6e74 6572 6661 6365 of the interface\n+001aa970: 2068 6561 6465 7220 6669 6c65 2069 6e63 header file inc\n+001aa980: 6c75 6465 7320 7479 7065 2064 6563 6c61 ludes type decla\n+001aa990: 7261 7469 6f6e 7320 616e 6420 6f70 7469 rations and opti\n+001aa9a0: 6f6e 616c 6c79 2074 6865 2064 6563 6c61 onally the decla\n+001aa9b0: 7261 7469 6f6e 7320 6f66 2073 6572 7669 rations of servi\n+001aa9c0: 6365 206f 7065 7261 7469 6f6e 7320 616e ce operations an\n+001aa9d0: 6420 534f 4150 2048 6561 6465 7273 2061 d SOAP Headers a\n+001aa9e0: 6e64 2046 6175 6c74 7320 7468 6174 2061 nd Faults that a\n+001aa9f0: 7265 2075 6e69 7665 7273 616c 6c79 2075 re universally u\n+001aaa00: 7365 6420 6279 2053 4f41 5020 7365 7276 sed by SOAP serv\n+001aaa10: 6963 6573 2c20 7768 656e 2061 7070 6c69 ices, when appli\n+001aaa20: 6361 626c 652e 2057 6865 6e20 7468 6520 cable. When the \n+001aaa30: 736f 6170 6370 7032 2074 6f6f 6c20 7072 soapcpp2 tool pr\n+001aaa40: 6f63 6573 7365 7320 7468 6520 6865 6164 ocesses the head\n+001aaa50: 6572 2066 696c 6520 6d6f 6475 6c65 2c20 er file module, \n+001aaa60: 6974 2077 696c 6c20 6765 6e65 7261 7465 it will generate\n+001aaa70: 2074 6865 2073 6f75 7263 6520 636f 6465 the source code\n+001aaa80: 7320 666f 7220 6120 6c69 6272 6172 792e s for a library.\n+001aaa90: 2054 6865 2057 6562 2073 6572 7669 6365 The Web service\n+001aaaa0: 7320 6170 706c 6963 6174 696f 6e20 7468 s application th\n+001aaab0: 6174 2075 7365 7320 7468 6520 6c69 6272 at uses the libr\n+001aaac0: 6172 7920 7368 6f75 6c64 2075 7365 2061 ary should use a\n+001aaad0: 2068 6561 6465 7220 6669 6c65 2074 6861 header file tha\n+001aaae0: 7420 696d 706f 7274 7320 7468 6520 6d6f t imports the mo\n+001aaaf0: 6475 6c65 2077 6974 6820 7468 6520 3c63 dule with the #import directive, fo\n+001aab20: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

    .<\n+001aab30: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001aab40: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    /* \n+001aab70: 436f 6e74 656e 7473 206f 6620 6669 6c65 Contents of file\n+001aab80: 2026 7175 6f74 3b6d 6f64 756c 652e 6826 "module.h&\n+001aab90: 7175 6f74 3b20 2a2f 3c2f 7370 616e 3e20 quot; */ \n+001aaba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #module &quo\n+001aabe0: 743b 7465 7374 2671 756f 743b 3c2f 7370 t;test"
    .
    .
    // t\n+001aac40: 7970 6573 2061 6e64 2074 7970 6564 6566 ypes and typedef\n+001aac50: 7320 6265 636f 6d65 206d 6f64 756c 652d s become module-\n+001aac60: 7370 6563 6966 6963 3c2f 7370 616e 3e3c specific<\n+001aac70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ty\n+001aaca0: 7065 6465 663c 2f73 7061 6e3e 203c 6120 pedef L\n+001aad00: 4f4e 4736 343c 2f61 3e20 7873 645f 5f6c ONG64 xsd__l\n+001aad10: 6f6e 673b 3c2f 6469 763e 0a3c 6469 7620 ong;
    .
    char*;
    .
    .
    // \n+001aada0: 6120 6d6f 6475 6c65 2d73 7065 6369 6669 a module-specifi\n+001aadb0: 6320 7374 7275 6374 3c2f 7370 616e 3e3c c struct<\n+001aadc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+001aadf0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n+001aae00: 5320 3c2f 6469 763e 0a3c 6469 7620 636c S
    .
    {.
    ... // members
    .
    };<\n+001aae80: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+001aaea0: 5468 6520 3c65 6d3e 3c63 6f64 653e 6d6f The mo\n+001aaeb0: 6475 6c65 2e68 3c2f 636f 6465 3e3c 2f65 dule.h data binding \n+001aaed0: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n+001aaee0: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp\n+001aaef0: 7032 2064 6563 6c61 7265 7320 6d6f 6475 p2 declares modu\n+001aaf00: 6c65 2d73 7065 6369 6669 6320 7365 7269 le-specific seri\n+001aaf10: 616c 697a 6162 6c65 2074 7970 6573 203c alizable types <\n+001aaf20: 636f 6465 3e4c 4f4e 4736 343c 2f63 6f64 code>LONG64, xsd__l\n+001aaf40: 6f6e 673c 2f63 6f64 653e 2c20 3c63 6f64 ong, char*, \n+001aaf60: 616e 6420 6120 3c63 6f64 653e 7374 7275 and a stru\n+001aaf70: 6374 206e 735f 5f53 3c2f 636f 6465 3e2e ct ns__S.\n+001aaf80: 2054 6865 206d 6f64 756c 6520 6e61 6d65 The module name\n+001aaf90: 2069 7320 2274 6573 7422 2c20 736f 2074 is \"test\", so t\n+001aafa0: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool\n+001aafb0: 2070 726f 6475 6365 7320 6120 3c65 6d3e produces a \n+001aafc0: 3c63 6f64 653e 7465 7374 432e 6370 703c testC.cpp<\n+001aafd0: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+001aafe0: 2077 6974 6820 7468 6520 584d 4c20 7365 with the XML se\n+001aaff0: 7269 616c 697a 6572 7320 666f 7220 7468 rializers for th\n+001ab000: 6573 6520 7479 7065 732e 2054 6865 203c ese types. The <\n+001ab010: 656d 3e3c 636f 6465 3e74 6573 7443 2e63 em>testC.c\n+001ab020: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2064 pp d\n+001ab030: 6174 6120 6269 6e64 696e 6720 696d 706c ata binding impl\n+001ab040: 656d 656e 7461 7469 6f6e 2073 6f75 7263 ementation sourc\n+001ab050: 6520 636f 6465 2063 616e 2062 6520 7365 e code can be se\n+001ab060: 7061 7261 7465 6c79 2063 6f6d 7069 6c65 parately compile\n+001ab070: 6420 616e 6420 6c69 6e6b 6564 2077 6974 d and linked wit\n+001ab080: 6820 616e 2061 7070 6c69 6361 7469 6f6e h an application\n+001ab090: 2e20 4966 2073 6572 7669 6365 206f 7065 . If service ope\n+001ab0a0: 7261 7469 6f6e 7320 6172 6520 6465 636c rations are decl\n+001ab0b0: 6172 6564 2069 6e20 7468 6520 696e 7465 ared in the inte\n+001ab0c0: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+001ab0d0: 6520 6173 2066 756e 6374 696f 6e20 7072 e as function pr\n+001ab0e0: 6f74 6f74 7970 6573 2c20 7765 2061 6c73 ototypes, we als\n+001ab0f0: 6f20 6765 7420 3c65 6d3e 3c63 6f64 653e o get \n+001ab100: 7465 7374 436c 6965 6e74 2e63 7070 3c2f testClient.cpp clien\n+001ab120: 7420 7374 7562 2066 756e 6374 696f 6e73 t stub functions\n+001ab130: 2061 6e64 203c 656d 3e3c 636f 6465 3e74 and t\n+001ab140: 6573 7453 6572 7665 722e 6370 703c 2f63 estServer.cpp server\n+001ab160: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi\n+001ab170: 6f6e 732e 3c2f 703e 0a3c 703e 5468 6572 ons.

    .

    Ther\n+001ab180: 6520 6172 6520 736f 6d65 206c 696d 6974 e are some limit\n+001ab190: 6174 696f 6e73 2066 6f72 206d 6f64 756c ations for modul\n+001ab1a0: 6520 696d 706f 7274 733a 3c2f 703e 0a3c e imports:

    .<\n+001ab1b0: 756c 3e0a 3c6c 693e 4120 6d6f 6475 6c65 ul>.
  • A module\n+001ab1c0: 206d 7573 7420 6265 2069 6d70 6f72 7465 must be importe\n+001ab1d0: 6420 696e 746f 2061 6e6f 7468 6572 2069 d into another i\n+001ab1e0: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+001ab1f0: 746f 2075 7365 2074 6865 206d 6f64 756c to use the modul\n+001ab200: 6527 7320 7479 7065 2064 6566 696e 6974 e's type definit\n+001ab210: 696f 6e73 2e3c 2f6c 693e 0a3c 6c69 3e57 ions.
  • .
  • W\n+001ab220: 6865 6e20 6d75 6c74 6970 6c65 206d 6f64 hen multiple mod\n+001ab230: 756c 6573 2061 7265 2069 6d70 6f72 7465 ules are importe\n+001ab240: 642c 2074 6865 2074 7970 6573 2074 6861 d, the types tha\n+001ab250: 7420 7468 6579 2064 6563 6c61 7265 206d t they declare m\n+001ab260: 7573 7420 6265 2064 6563 6c61 7265 6420 ust be declared \n+001ab270: 696e 206f 6e65 206d 6f64 756c 6520 6f6e in one module on\n+001ab280: 6c79 2074 6f20 6176 6f69 6420 6e61 6d65 ly to avoid name\n+001ab290: 2063 6c61 7368 6573 2061 6e64 206c 696e clashes and lin\n+001ab2a0: 6b20 6572 726f 7273 2e20 596f 7520 6361 k errors. You ca\n+001ab2b0: 6e6e 6f74 2063 7265 6174 6520 7477 6f20 nnot create two \n+001ab2c0: 6d6f 6475 6c65 7320 7468 6174 2064 6563 modules that dec\n+001ab2d0: 6c61 7265 206f 7220 7573 6520 7468 6520 lare or use the \n+001ab2e0: 7361 6d65 2074 7970 6520 616e 6420 696d same type and im\n+001ab2f0: 706f 7274 2074 6865 7365 206d 6f64 756c port these modul\n+001ab300: 6573 2073 6570 6172 6174 656c 7920 696e es separately in\n+001ab310: 746f 2061 6e6f 7468 6572 2068 6561 6465 to another heade\n+001ab320: 7220 6669 6c65 2e20 5768 656e 2075 7369 r file. When usi\n+001ab330: 6e67 206d 6f64 756c 6573 2c20 636f 6e73 ng modules, cons\n+001ab340: 6964 6572 2063 7265 6174 696e 6720 6120 ider creating a \n+001ab350: 6d6f 6475 6c65 2068 6965 7261 7263 6879 module hierarchy\n+001ab360: 2073 7563 6820 7468 6174 2074 7970 6573 such that types\n+001ab370: 2061 7265 2064 6563 6c61 7265 6420 6f6e are declared on\n+001ab380: 6c79 206f 6e63 6520 616e 6420 6279 206f ly once and by o\n+001ab390: 6e6c 7920 6f6e 6520 6d6f 6475 6c65 2077 nly one module w\n+001ab3a0: 6865 6e20 7468 6573 6520 6d6f 6475 6c65 hen these module\n+001ab3b0: 7320 6d75 7374 2062 6520 6c69 6e6b 6564 s must be linked\n+001ab3c0: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
  • ..

    \n+001ab3d0: 5769 7468 206d 6f64 756c 6573 2c20 7468 With modules, th\n+001ab3e0: 6520 736f 7572 6365 2063 6f64 6520 7365 e source code se\n+001ab3f0: 7269 616c 697a 6572 7320 666f 7220 7468 rializers for th\n+001ab400: 6520 7479 7065 7320 6465 6669 6e65 6420 e types defined \n+001ab410: 696e 2074 6865 206d 6f64 756c 6573 2061 in the modules a\n+001ab420: 7265 2067 656e 6572 6174 6564 2077 6974 re generated wit\n+001ab430: 6820 736f 6170 6370 7032 2073 6570 6172 h soapcpp2 separ\n+001ab440: 6174 656c 792e 2046 6f72 2065 7861 6d70 ately. For examp\n+001ab450: 6c65 2c20 6173 7375 6d65 2074 6861 7420 le, assume that \n+001ab460: 7765 2068 6176 6520 6120 6d6f 6475 6c65 we have a module\n+001ab470: 203c 656d 3e3c 636f 6465 3e6d 6f64 756c modul\n+001ab480: 652e 683c 2f63 6f64 653e 3c2f 656d 3e3a e.h:\n+001ab490: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    /* Contents o\n+001ab4e0: 6620 6669 6c65 2026 7175 6f74 3b6d 6f64 f file "mod\n+001ab4f0: 756c 652e 6826 7175 6f74 3b20 2a2f 3c2f ule.h" */
    .#module\n+001ab540: 2026 7175 6f74 3b74 6573 7426 7175 6f74 "test"\n+001ab550: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001ab560: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ab570: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    struct n\n+001ab5b0: 735f 5f53 3c2f 6469 763e 0a3c 6469 7620 s__S
    .
    {.
    char\n+001ab610: 202a 6e61 6d65 3b3c 2f64 6976 3e0a 3c64 *name;
    .\n+001ab630: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+001ab650: 743c 2f73 7061 6e3e 2061 6d6f 756e 743b t amount;\n+001ab660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };.

    and \n+001ab6a0: 6120 6865 6164 6572 2066 696c 6520 3c65 a header file example.\n+001ab6c0: 683c 2f63 6f64 653e 3c2f 656d 3e20 7468 h th\n+001ab6d0: 6174 2075 7365 7320 6974 3a3c 2f70 3e0a at uses it:

    .\n+001ab6e0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    /*\n+001ab720: 2043 6f6e 7465 6e74 7320 6f66 2066 696c Contents of fil\n+001ab730: 6520 2671 756f 743b 6578 616d 706c 652e e "example.\n+001ab740: 6826 7175 6f74 3b20 2a2f 3c2f 7370 616e h" */
    .
    #import &qu\n+001ab790: 6f74 3b6d 6f64 756c 652e 6826 7175 6f74 ot;module.h"\n+001ab7a0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001ab7b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ab7c0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n+001ab800: 6e73 5f5f 7765 626d 6574 686f 6428 3c73 ns__webmethod(const\n+001ab830: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001ab850: 2f73 7061 6e3e 202a 636f 6465 2c20 3c73 /span> *code, struct ns__S *record,\n+001ab890: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int *result); \n+001ab8c0: 2020 203c 2f64 6976 3e0a 3c2f 6469 763e
    .
    \n+001ab8d0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    \n+001ac470: 5765 2063 6f6d 7069 6c65 2074 6869 7320 We compile this \n+001ac480: 6578 616d 706c 6520 6173 2066 6f6c 6c6f example as follo\n+001ac490: 7773 3a20 3c2f 703e 3c70 7265 2063 6c61 ws:

    c+\n+001ac4b0: 2b20 2d6f 2065 7861 6d70 6c65 2065 7861  + -o example exa\n+001ac4c0: 6d70 6c65 2e63 7070 2074 6573 7443 2e63  mple.cpp testC.c\n+001ac4d0: 7070 2073 6f61 7043 2e63 7070 2073 6f61  pp soapC.cpp soa\n+001ac4e0: 7043 6c69 656e 742e 6370 7020 7374 6473  pClient.cpp stds\n+001ac4f0: 6f61 7032 2e63 7070 0a3c 2f70 7265 3e3c  oap2.cpp.
    <\n+001ac500: 703e 204d 6f64 756c 6573 206d 6179 2068 p> Modules may h\n+001ac510: 656c 7020 746f 2064 6566 696e 6520 6120 elp to define a \n+001ac520: 6d6f 6475 6c61 7220 6869 6572 6172 6368 modular hierarch\n+001ac530: 7920 6f66 206c 6962 7261 7269 6573 2077 y of libraries w\n+001ac540: 6974 6820 7265 7573 6162 6c65 2073 6572 ith reusable ser\n+001ac550: 6961 6c69 7a61 626c 6520 7479 7065 732e ializable types.\n+001ac560: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+001ac5a0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001ac5b0: 2069 643d 2270 6c75 6769 6e73 223e 3c2f id=\"plugins\">.Plugins, modu\n+001ac5d0: 6c65 732c 2061 6e64 2065 7874 656e 7369 les, and extensi\n+001ac5e0: 6f6e 733c 2f68 323e 0a3c 703e 506c 7567 ons

    .

    Plug\n+001ac5f0: 696e 7320 6f66 6665 7220 6120 636f 6e76 ins offer a conv\n+001ac600: 656e 6965 6e74 2065 7874 656e 7369 6f6e enient extension\n+001ac610: 206d 6563 6861 6e69 736d 2066 6f72 2074 mechanism for t\n+001ac620: 6865 2067 534f 4150 2074 6f6f 6c6b 6974 he gSOAP toolkit\n+001ac630: 2062 7920 6578 7465 6e64 696e 6720 7468 by extending th\n+001ac640: 6520 6361 7061 6269 6c69 7469 6573 206f e capabilities o\n+001ac650: 6620 6974 7320 656e 6769 6e65 2e20 5768 f its engine. Wh\n+001ac660: 656e 2074 6865 2070 6c75 6769 6e20 7265 en the plugin re\n+001ac670: 6769 7374 6572 7320 7769 7468 2074 6865 gisters with the\n+001ac680: 2067 534f 4150 2065 6e67 696e 652c 2069 gSOAP engine, i\n+001ac690: 7420 6861 7320 6675 6c6c 2061 6363 6573 t has full acces\n+001ac6a0: 7320 746f 2074 6865 2072 756e 2d74 696d s to the run-tim\n+001ac6b0: 6520 7365 7474 696e 6773 2061 6e64 2074 e settings and t\n+001ac6c0: 6865 2065 6e67 696e 6527 7320 6675 6e63 he engine's func\n+001ac6d0: 7469 6f6e 2063 616c 6c62 6163 6b73 2e20 tion callbacks. \n+001ac6e0: 5570 6f6e 2072 6567 6973 7472 792c 2074 Upon registry, t\n+001ac6f0: 6865 2070 6c75 6769 6e27 7320 6c6f 6361 he plugin's loca\n+001ac700: 6c20 6461 7461 2069 7320 6173 736f 6369 l data is associ\n+001ac710: 6174 6564 2077 6974 6820 7468 6520 3c63 ated with the \n+001ac770: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+001ac780: 636f 6e74 6578 742e 2042 7920 6f76 6572 context. By over\n+001ac790: 7269 6469 6e67 2074 6865 2063 616c 6c62 riding the callb\n+001ac7a0: 6163 6b73 2077 6974 6820 7468 6520 706c acks with the pl\n+001ac7b0: 7567 696e 2773 2063 616c 6c62 6163 6b73 ugin's callbacks\n+001ac7c0: 2c20 7468 6520 706c 7567 696e 2065 7874 , the plugin ext\n+001ac7d0: 656e 6473 206f 7220 6d6f 6469 6669 6573 ends or modifies\n+001ac7e0: 2074 6865 2065 6e67 696e 6527 7320 6361 the engine's ca\n+001ac7f0: 7061 6269 6c69 7469 6573 2e20 5468 6520 pabilities. The \n+001ac800: 6c6f 6361 6c20 706c 7567 696e 2064 6174 local plugin dat\n+001ac810: 6120 6361 6e20 6265 2061 6363 6573 7365 a can be accesse\n+001ac820: 6420 7468 726f 7567 6820 6120 6c6f 6f6b d through a look\n+001ac830: 7570 2066 756e 6374 696f 6e2c 2075 7375 up function, usu\n+001ac840: 616c 6c79 2069 6e76 6f6b 6564 2077 6974 ally invoked wit\n+001ac850: 6869 6e20 6120 6361 6c6c 6261 636b 2066 hin a callback f\n+001ac860: 756e 6374 696f 6e20 746f 2061 6363 6573 unction to acces\n+001ac870: 7320 7468 6520 706c 7567 696e 2064 6174 s the plugin dat\n+001ac880: 612e 2054 6865 2072 6567 6973 7472 7920 a. The registry \n+001ac890: 616e 6420 6c6f 6f6b 7570 2066 756e 6374 and lookup funct\n+001ac8a0: 696f 6e73 2061 7265 3a3c 2f70 3e0a 3c64 ions are:

    .
    \n+001ac8f0: 696e 743c 2f73 7061 6e3e 203c 6120 636c int s\n+001ac950: 6f61 705f 7265 6769 7374 6572 5f70 6c75 oap_register_plu\n+001ac960: 6769 6e5f 6172 673c 2f61 3e28 3c73 7061 gin_arg(struct \n+001ac990: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001ac9c0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001ac9f0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , int<\n+001aca10: 2f73 7061 6e3e 2028 2a66 6372 6561 7465 /span> (*fcreate\n+001aca20: 2928 3c73 7061 6e20 636c 6173 733d 226b )(struct soa\n+001aca70: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001acaa0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, st\n+001acac0: 7275 6374 3c2f 7370 616e 3e20 736f 6170 ruct soap\n+001acad0: 5f70 6c75 6769 6e20 2a70 2c20 3c73 7061 _plugin *p, void *arg), void *\n+001acb30: 6172 6729 3c2f 6469 763e 0a3c 6469 7620 arg)
    .
    <\n+001acb90: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+001acba0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_r\n+001acbf0: 6567 6973 7465 725f 706c 7567 696e 5f61 egister_plugin_a\n+001acc00: 7267 3c2f 613e 3c2f 6469 763e 3c64 6976 rg
    \n+001acc20: 696e 7420 736f 6170 5f72 6567 6973 7465 int soap_registe\n+001acc30: 725f 706c 7567 696e 5f61 7267 2873 7472 r_plugin_arg(str\n+001acc40: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+001acc50: 696e 7428 2a66 6372 6561 7465 2928 7374 int(*fcreate)(st\n+001acc60: 7275 6374 2073 6f61 7020 2a2c 2073 7472 ruct soap *, str\n+001acc70: 7563 7420 736f 6170 5f70 6c75 6769 6e20 uct soap_plugin \n+001acc80: 2a2c 2076 6f69 6420 2a29 2c20 766f 6964 *, void *), void\n+001acc90: 202a 6172 6729 3c2f 6469 763e 3c64 6976 *arg)
    R\n+001accb0: 6567 6973 7465 7220 6120 706c 7567 696e egister a plugin\n+001accc0: 2077 6974 6820 616e 2061 7267 756d 656e with an argumen\n+001accd0: 742e 3c2f 6469 763e 3c2f 6469 763e 0a3c t.
    .<\n+001acce0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>
    <\n+001acd20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001acd30: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void* soap_looku\n+001acd50: 705f 706c 7567 696e 283c 7370 616e 2063 p_plugin(s\n+001acd70: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap*, <\n+001acdb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001acdc0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001acdf0: 3c2f 7370 616e 3e2a 293b 3c2f 6469 763e *);
    \n+001ace00: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The <\n+001ace20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+001aced0: 736f 6170 5f63 6f70 793c 2f61 3e3c 2f63 soap_copy function re\n+001acef0: 7475 726e 7320 6120 6e65 7720 6479 6e61 turns a new dyna\n+001acf00: 6d69 6361 6c6c 7920 616c 6c6f 6361 7465 mically allocate\n+001acf10: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap context that\n+001acf80: 2069 7320 6120 636f 7079 206f 6620 616e is a copy of an\n+001acf90: 6f74 6865 722c 2073 7563 6820 7468 6174 other, such that\n+001acfa0: 206e 6f20 6461 7461 2069 7320 7368 6172 no data is shar\n+001acfb0: 6564 2062 6574 7765 656e 2074 6865 2063 ed between the c\n+001acfc0: 6f70 7920 616e 6420 7468 6520 6f72 6967 opy and the orig\n+001acfd0: 696e 616c 2063 6f6e 7465 7874 2e20 5468 inal context. Th\n+001acfe0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap_copy\n+001ad0a0: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n+001ad0b0: 2069 6e76 6f6b 6573 2074 6865 2063 6f70 invokes the cop\n+001ad0c0: 7920 6675 6e63 7469 6f6e 7320 6f66 2074 y functions of t\n+001ad0d0: 6865 2072 6567 6973 7465 7265 6420 706c he registered pl\n+001ad0e0: 7567 696e 7320 746f 2063 6f70 7920 7468 ugins to copy th\n+001ad0f0: 6520 706c 7567 696e 7327 206c 6f63 616c e plugins' local\n+001ad100: 2064 6174 612e 2054 6865 203c 636f 6465 data. The soap_done and soap_free functio\n+001ad2b0: 6e73 2064 652d 7265 6769 7374 6572 7320 ns de-registers \n+001ad2c0: 616c 6c20 706c 7567 696e 2e3c 2f70 3e0a all plugin.

    .\n+001ad2d0: 3c70 3e54 6865 2066 6f6c 6c6f 7720 6578

    The follow ex\n+001ad2e0: 616d 706c 6520 6f76 6572 7269 6465 7320 ample overrides \n+001ad2f0: 7468 6520 7365 6e64 2061 6e64 2072 6563 the send and rec\n+001ad300: 6569 7665 2063 616c 6c62 6163 6b73 2074 eive callbacks t\n+001ad310: 6f20 636f 7079 2061 6c6c 206d 6573 7361 o copy all messa\n+001ad320: 6765 7320 7468 6174 2061 7265 2073 656e ges that are sen\n+001ad330: 7420 616e 6420 7265 6365 6976 6564 2074 t and received t\n+001ad340: 6f20 7468 6520 7465 726d 696e 616c 2028 o the terminal (\n+001ad350: 7374 6465 7272 292e 3c2f 703e 0a3c 703e stderr).

    .

    \n+001ad360: 4669 7273 742c 2077 6520 7772 6974 6520 First, we write \n+001ad370: 6120 6865 6164 6572 2066 696c 6520 3c65 a header file plugin.h\n+001ad390: 3c2f 636f 6465 3e3c 2f65 6d3e 2074 6f20 to \n+001ad3a0: 6465 6669 6e65 2074 6865 206c 6f63 616c define the local\n+001ad3b0: 2070 6c75 6769 6e20 6461 7461 2073 7472 plugin data str\n+001ad3c0: 7563 7475 7265 2873 2920 616e 6420 7765 ucture(s) and we\n+001ad3d0: 2064 6566 696e 6520 6120 676c 6f62 616c define a global\n+001ad3e0: 206e 616d 6520 746f 2069 6465 6e74 6966 name to identif\n+001ad3f0: 7920 7468 6520 706c 7567 696e 3a3c 2f70 y the plugin:.

    .<\n+001ad4a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ad4b0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#def\n+001ad4d0: 696e 6520 504c 5547 494e 5f49 4420 2671 ine PLUGIN_ID &q\n+001ad4e0: 756f 743b 504c 5547 494e 2d31 2e30 2671 uot;PLUGIN-1.0&q\n+001ad4f0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; // some name t\n+001ad520: 6f20 6964 656e 7469 6679 2070 6c75 6769 o identify plugi\n+001ad530: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n+001ad540: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    struct \n+001ad590: 706c 7567 696e 5f64 6174 6120 3c73 7061 plugin_data // local plugi\n+001ad5c0: 6e20 6461 7461 203c 2f73 7061 6e3e 3c2f n data .
    {
    .<\n+001ad5f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ad600: 3e20 2069 6e74 2028 2a66 7365 6e64 2928 > int (*fsend)(\n+001ad610: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001ad660: 2f61 3e2a 2c20 3c73 7061 6e20 636c 6173 /a>*, cons\n+001ad680: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char*,\n+001ad6b0: 2073 697a 655f 7429 3b20 3c73 7061 6e20 size_t); \n+001ad6d0: 2f2f 2074 6f20 7361 7665 2061 6e64 2075 // to save and u\n+001ad6e0: 7365 2073 656e 6420 6361 6c6c 6261 636b se send callback\n+001ad6f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001ad700: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ad710: 3e20 2073 697a 655f 7420 282a 3c61 2063 > size_t (*frecv)(struct soap*, ch\n+001ad7f0: 6172 3c2f 7370 616e 3e2a 2c20 7369 7a65 ar*, size\n+001ad800: 5f74 293b 203c 7370 616e 2063 6c61 7373 _t); // to\n+001ad820: 2073 6176 6520 616e 6420 7573 6520 7265 save and use re\n+001ad830: 6376 2063 616c 6c62 6163 6b20 3c2f 7370 cv callback
    .
    }; <\n+001ad860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int plu\n+001ad8a0: 6769 6e28 3c73 7061 6e20 636c 6173 733d gin(struct\n+001ad8c0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001ad8f0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001ad920: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n+001ad940: 7374 7275 6374 3c2f 7370 616e 3e20 736f struct so\n+001ad950: 6170 5f70 6c75 6769 6e20 2a70 6c75 6769 ap_plugin *plugi\n+001ad960: 6e2c 203c 7370 616e 2063 6c61 7373 3d22 n, voi\n+001ad980: 643c 2f73 7061 6e3e 202a 6172 6729 3b3c d *arg);<\n+001ad990: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    std\n+001ad9f0: 736f 6170 322e 683c 2f61 3e3c 2f64 6976 soap2.h
    This file de\n+001ada20: 6669 6e65 7320 7468 6520 636f 6d6d 6f6e fines the common\n+001ada30: 206d 6163 726f 732c 2074 7970 6573 2061 macros, types a\n+001ada40: 6e64 2066 756e 6374 696f 6e73 206f 6620 nd functions of \n+001ada50: 7468 6520 6753 4f41 5020 4150 4920 6772 the gSOAP API gr\n+001ada60: 6f75 7065 6420 6279 206d 6f64 756c 6573 ouped by modules\n+001ada70: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    Then, we \n+001adaa0: 7772 6974 6520 7468 6520 706c 7567 696e write the plugin\n+001adab0: 2072 6567 6973 7472 7920 6675 6e63 7469 registry functi\n+001adac0: 6f6e 2061 6e64 2074 6865 2063 616c 6c62 on and the callb\n+001adad0: 6163 6b73 3a3c 2f70 3e0a 3c64 6976 2063 acks:

    .
    \n+001adaf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+001adb20: 636c 7564 6520 2671 756f 743b 706c 7567 clude "plug\n+001adb30: 696e 2e68 2671 756f 743b 3c2f 7370 616e in.h"
    .
    .
    stati\n+001adb90: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c c\n+001adbb0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char plugin_id[] = \n+001adbf0: 504c 5547 494e 5f49 443b 203c 7370 616e PLUGIN_ID; // the plugin i\n+001adc20: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n+001adc30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    static \n+001adc80: 696e 743c 2f73 7061 6e3e 2070 6c75 6769 int plugi\n+001adc90: 6e5f 696e 6974 283c 7370 616e 2063 6c61 n_init(str\n+001adcb0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, struct\n+001add40: 2070 6c75 6769 6e5f 6461 7461 202a 6461 plugin_data *da\n+001add50: 7461 293b 203c 2f64 6976 3e0a 3c64 6976 ta);
    .static int<\n+001addb0: 2f73 7061 6e3e 2070 6c75 6769 6e5f 636f /span> plugin_co\n+001addc0: 7079 283c 7370 616e 2063 6c61 7373 3d22 py(struct<\n+001adde0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001ade10: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001ade40: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, s\n+001ade60: 7472 7563 743c 2f73 7061 6e3e 2073 6f61 truct soa\n+001ade70: 705f 706c 7567 696e 202a 6473 742c 203c p_plugin *dst, <\n+001ade80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ade90: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap_plugin *\n+001adeb0: 7372 6329 3b20 3c2f 6469 763e 0a3c 6469 src);
    .<\n+001aded0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001adee0: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord\">static voi\n+001adf10: 643c 2f73 7061 6e3e 2070 6c75 6769 6e5f d plugin_\n+001adf20: 6465 6c65 7465 283c 7370 616e 2063 6c61 delete(str\n+001adf40: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, struct\n+001adfd0: 2073 6f61 705f 706c 7567 696e 202a 7029 soap_plugin *p)\n+001adfe0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    static <\n+001ae020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ae030: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int plugin_send(\n+001ae050: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001ae0a0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001ae0d0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , cons\n+001ae0f0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001ae120: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf\n+001ae170: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size\n+001ae190: 5f74 3c2f 7370 616e 3e20 6c65 6e29 3b20 _t len); \n+001ae1a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+001ae1d0: 7461 7469 633c 2f73 7061 6e3e 203c 7370 tatic size_t plugin_recv\n+001ae210: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001ae260: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001ae290: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, char *buf, \n+001ae310: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+001ae330: 3c2f 7370 616e 3e20 6c65 6e29 3b20 3c2f len); .
    .<\n+001ae360: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ae370: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// the re\n+001ae390: 6769 7374 7279 2066 756e 6374 696f 6e3a gistry function:\n+001ae3a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001ae3b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ae3c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int plugin(struct\n+001ae410: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001ae440: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, struct<\n+001ae490: 2f73 7061 6e3e 2073 6f61 705f 706c 7567 /span> soap_plug\n+001ae4a0: 696e 202a 702c 203c 7370 616e 2063 6c61 in *p, void *ar\n+001ae4d0: 6729 203c 2f64 6976 3e0a 3c64 6976 2063 g)
    .
    {.
    p->id\n+001ae510: 203d 2070 6c75 6769 6e5f 6964 3b20 3c2f = plugin_id; .
    p->d\n+001ae540: 6174 6120 3d20 283c 7370 616e 2063 6c61 ata = (void*)ma\n+001ae570: 6c6c 6f63 283c 7370 616e 2063 6c61 7373 lloc(sizeo\n+001ae590: 663c 2f73 7061 6e3e 283c 7370 616e 2063 f(s\n+001ae5b0: 7472 7563 743c 2f73 7061 6e3e 2070 6c75 truct plu\n+001ae5c0: 6769 6e5f 6461 7461 2929 3b20 3c2f 6469 gin_data)); .
    p->fco\n+001ae5f0: 7079 203d 2070 6c75 6769 6e5f 636f 7079 py = plugin_copy\n+001ae600: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; /* optio\n+001ae620: 6e61 6c3a 2077 6865 6e20 7365 7420 7468 nal: when set th\n+001ae630: 6520 706c 7567 696e 206d 7573 7420 636f e plugin must co\n+001ae640: 7079 2069 7473 206c 6f63 616c 2064 6174 py its local dat\n+001ae650: 6120 2a2f 3c2f 7370 616e 3e3c 2f64 6976 a */.
    p->fdel\n+001ae680: 6574 6520 3d20 706c 7567 696e 5f64 656c ete = plugin_del\n+001ae690: 6574 653b 203c 2f64 6976 3e0a 3c64 6976 ete;
    . \n+001ae6b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (p->data)\n+001ae6e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    if (p\n+001ae740: 6c75 6769 6e5f 696e 6974 283c 6120 636c lugin_init(soap, (struct\n+001ae7a0: 2070 6c75 6769 6e5f 6461 7461 2a29 702d plugin_data*)p-\n+001ae7b0: 2667 743b 6461 7461 2929 203c 2f64 6976 >data)) .
    {
    .\n+001ae7e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    free(p-&\n+001ae800: 6774 3b64 6174 6129 3b20 3c73 7061 6e20 gt;data); \n+001ae820: 2f2f 2065 7272 6f72 3a20 636f 756c 6420 // error: could \n+001ae830: 6e6f 7420 696e 6974 203c 2f73 7061 6e3e not init \n+001ae840: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+001ae860: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ae870: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001ae880: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n+001ae8e0: 454f 4d3c 2f61 3e3b 203c 7370 616e 2063 EOM; /\n+001ae900: 2f20 7265 7475 726e 2065 7272 6f72 203c / return error <\n+001ae910: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001ae930: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    . \n+001ae950: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    ..} \n+001aea10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001aea30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .{<\n+001aeb70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    data-&\n+001aeb90: 6774 3b66 7365 6e64 203d 203c 6120 636c gt;fsend = soap-><\n+001aebd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001aebe0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001aebf0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+001aec00: 6c23 6761 6664 3532 6238 3036 3535 6534 l#gafd52b80655e4\n+001aec10: 6631 3032 3165 6464 3663 3535 6238 6466 f1021edd6c55b8df\n+001aec20: 6564 6666 223e 6673 656e 643c 2f61 3e3b edff\">fsend;\n+001aec30: 203c 7370 616e 2063 6c61 7373 3d22 636f // save o\n+001aec50: 6c64 2072 6563 7620 6361 6c6c 6261 636b ld recv callback\n+001aec60: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001aec70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001aec80: 3e20 2064 6174 612d 2667 743b 6672 6563 > data->frec\n+001aec90: 7620 3d20 3c61 2063 6c61 7373 3d22 636f v = soap<\n+001aecc0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->f\n+001aed20: 7265 6376 3c2f 613e 3b20 3c73 7061 6e20 recv; \n+001aed40: 2f2f 2073 6176 6520 6f6c 6420 7365 6e64 // save old send\n+001aed50: 2063 616c 6c62 6163 6b20 3c2f 7370 616e callback
    .
    soap->\n+001aedb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fsend\n+001aee10: 203d 2070 6c75 6769 6e5f 7365 6e64 3b20 = plugin_send; \n+001aee20: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // replace\n+001aee40: 2073 656e 6420 6361 6c6c 6261 636b 2077 send callback w\n+001aee50: 6974 6820 6e65 7720 3c2f 7370 616e 3e3c ith new <\n+001aee60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->frecv =\n+001aef10: 2070 6c75 6769 6e5f 7265 6376 3b20 3c73 plugin_recv; // replace r\n+001aef40: 6563 7620 6361 6c6c 6261 636b 2077 6974 ecv callback wit\n+001aef50: 6820 6e65 7720 3c2f 7370 616e 3e3c 2f64 h new .
    return \n+001aefa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n+001af000: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .<\n+001af050: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001af060: 656e 7422 3e2f 2f20 636f 7079 2070 6c75 ent\">// copy plu\n+001af070: 6769 6e20 6461 7461 2c20 6361 6c6c 6564 gin data, called\n+001af080: 2062 7920 736f 6170 5f63 6f70 7928 293c by soap_copy()<\n+001af090: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001af0b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001af0c0: 656e 7422 3e2f 2f20 5468 6973 2069 7320 ent\">// This is \n+001af0d0: 696d 706f 7274 616e 743a 2077 6520 6e65 important: we ne\n+001af0e0: 6564 2061 2064 6565 7020 636f 7079 2074 ed a deep copy t\n+001af0f0: 6f20 6176 6f69 6420 6461 7461 2073 6861 o avoid data sha\n+001af100: 7269 6e67 2062 7920 7477 6f20 636f 6e74 ring by two cont\n+001af110: 6578 7473 203c 2f73 7061 6e3e 3c2f 6469 exts .
    stati\n+001af150: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c int pl\n+001af180: 7567 696e 5f63 6f70 7928 3c73 7061 6e20 ugin_copy(\n+001af1a0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+001af1e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001af1f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001af200: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001af210: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap_plugin \n+001af240: 2a64 7374 2c20 3c73 7061 6e20 636c 6173 *dst, stru\n+001af260: 6374 3c2f 7370 616e 3e20 736f 6170 5f70 ct soap_p\n+001af270: 6c75 6769 6e20 2a73 7263 2920 3c2f 6469 lugin *src) .
    {
    . \n+001af2b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!(dst->\n+001af2e0: 6461 7461 203d 2028 3c73 7061 6e20 636c data = (st\n+001af300: 7275 6374 3c2f 7370 616e 3e20 706c 7567 ruct plug\n+001af310: 696e 5f64 6174 612a 296d 616c 6c6f 6328 in_data*)malloc(\n+001af320: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(struct\n+001af360: 3c2f 7370 616e 3e20 706c 7567 696e 5f64 plugin_d\n+001af370: 6174 6129 2929 2920 3c2f 6469 763e 0a3c ata))))
    .<\n+001af380: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001af390: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n+001af3b0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_EOM; <\n+001af420: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    *dst-&\n+001af440: 6774 3b64 6174 6120 3d20 2a73 7263 2d26 gt;data = *src-&\n+001af450: 6774 3b64 6174 613b 203c 2f64 6976 3e0a gt;data;
    .\n+001af460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+001af490: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+001af4f0: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .<\n+001af520: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001af530: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    // plugin delet\n+001af570: 696f 6e2c 2063 616c 6c65 6420 6279 2073 ion, called by s\n+001af580: 6f61 705f 646f 6e65 2829 203c 2f73 7061 oap_done()
    .
    static <\n+001af5d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001af5e0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void plugin_dele\n+001af600: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(struct<\n+001af620: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001af650: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001af680: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, s\n+001af6a0: 7472 7563 743c 2f73 7061 6e3e 2073 6f61 truct soa\n+001af6b0: 705f 706c 7567 696e 202a 7029 203c 2f64 p_plugin *p) .
    {
    .\n+001af6f0: 2020 6672 6565 2870 2d26 6774 3b64 6174 free(p->dat\n+001af700: 6129 3b20 3c73 7061 6e20 636c 6173 733d a); // fre\n+001af720: 6520 616c 6c6f 6361 7465 6420 706c 7567 e allocated plug\n+001af730: 696e 2064 6174 6120 3c2f 7370 616e 3e3c in data <\n+001af740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+001af760: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    // the new se\n+001af7b0: 6e64 2063 616c 6c62 6163 6b20 3c2f 7370 nd callback
    .
    static \n+001af800: 3c73 7061 6e20 636c 6173 733d 226b 6579 int plugin_send\n+001af830: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001af880: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001af8b0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, con\n+001af8d0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001af900: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *buf, siz\n+001af970: 655f 743c 2f73 7061 6e3e 206c 656e 2920 e_t len) \n+001af980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+001af9a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n+001af9d0: 7420 3c2f 7370 616e 3e70 6c75 6769 6e5f t plugin_\n+001af9e0: 6461 7461 202a 6461 7461 203d 2028 3c73 data *data = (struct plugin_data*)s\n+001afa20: 6f61 705f 6c6f 6f6b 7570 5f70 6c75 6769 oap_lookup_plugi\n+001afa30: 6e28 3c61 2063 6c61 7373 3d22 636f 6465 n(soap, plugin_id); <\n+001afa70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001afa80: 656e 7422 3e2f 2f20 6665 7463 6820 706c ent\">// fetch pl\n+001afa90: 7567 696e 2623 3339 3b73 206c 6f63 616c ugin's local\n+001afaa0: 2064 6174 6120 3c2f 7370 616e 3e3c 2f64 data .
    fwrite(b\n+001afad0: 7566 2c20 6c65 6e2c 2031 2c20 7374 6465 uf, len, 1, stde\n+001afae0: 7272 293b 203c 7370 616e 2063 6c61 7373 rr); // wr\n+001afb00: 6974 6520 6d65 7373 6167 6520 746f 2073 ite message to s\n+001afb10: 7464 6572 7220 3c2f 7370 616e 3e3c 2f64 tderr .
    return \n+001afb60: 6461 7461 2d26 6774 3b66 7365 6e64 283c data->fsend(<\n+001afb70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001afb80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001afb90: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001afba0: 6275 662c 206c 656e 293b 203c 7370 616e buf, len); // pass data on\n+001afbd0: 2074 6f20 6f6c 6420 7365 6e64 2063 616c to old send cal\n+001afbe0: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    }
    .<\n+001afc10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001afc20: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    // the new rece\n+001afc60: 6976 6520 6361 6c6c 6261 636b 203c 2f73 ive callback
    .
    static\n+001afcb0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n+001afcd0: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_\n+001afce0: 7265 6376 283c 7370 616e 2063 6c61 7373 recv(struc\n+001afd00: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+001afd30: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, char\n+001afd90: 202a 6275 662c 203c 7370 616e 2063 6c61 *buf, size_t l\n+001afdc0: 656e 2920 3c2f 6469 763e 0a3c 6469 7620 en)
    .
    {.
    s\n+001afe10: 7472 7563 7420 3c2f 7370 616e 3e70 6c75 truct plu\n+001afe20: 6769 6e5f 6461 7461 202a 6461 7461 203d gin_data *data =\n+001afe30: 2028 3c73 7061 6e20 636c 6173 733d 226b (struct <\n+001afe50: 2f73 7061 6e3e 706c 7567 696e 5f64 6174 /span>plugin_dat\n+001afe60: 612a 2973 6f61 705f 6c6f 6f6b 7570 5f70 a*)soap_lookup_p\n+001afe70: 6c75 6769 6e28 3c61 2063 6c61 7373 3d22 lugin(soa\n+001afea0: 703c 2f61 3e2c 2070 6c75 6769 6e5f 6964 p, plugin_id\n+001afeb0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // fetc\n+001afed0: 6820 706c 7567 696e 2623 3339 3b73 206c h plugin's l\n+001afee0: 6f63 616c 2064 6174 6120 3c2f 7370 616e ocal data
    .
    size_t res = data-&\n+001aff40: 6774 3b66 7265 6376 283c 6120 636c 6173 gt;frecv(\n+001aff70: 736f 6170 3c2f 613e 2c20 6275 662c 206c soap, buf, l\n+001aff80: 656e 293b 203c 7370 616e 2063 6c61 7373 en); // ge\n+001affa0: 7420 6461 7461 2066 726f 6d20 6f6c 6420 t data from old \n+001affb0: 7265 6376 2063 616c 6c62 6163 6b20 3c2f recv callback
    . \n+001affe0: 6677 7269 7465 2862 7566 2c20 7265 732c fwrite(buf, res,\n+001afff0: 2031 2c20 7374 6465 7272 293b 203c 2f64 1, stderr); .
    return \n+001b0040: 7265 733b 203c 2f64 6976 3e0a 3c64 6976 res;
    .}<\n+001b0060: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP_EOM
    #defi\n+001b0140: 6e65 2053 4f41 505f 454f 4d3c 2f64 6976 ne SOAP_EOM
    A soap_statu\n+001b0170: 7320 6572 726f 7220 636f 6465 3a20 6f75 s error code: ou\n+001b0180: 7420 6f66 206d 656d 6f72 792e 3c2f 6469 t of memory.
    Definiti\n+001b01b0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+001b01c0: 2e68 3a32 3337 313c 2f64 6976 3e3c 2f64 .h:2371
    .

    It\n+001b01f0: 2069 7320 7468 6520 7265 7370 6f6e 7369 is the responsi\n+001b0200: 6269 6c69 7479 206f 6620 7468 6520 706c bility of the pl\n+001b0210: 7567 696e 2074 6f20 6861 6e64 6c65 2072 ugin to handle r\n+001b0220: 6567 6973 7472 7920 2869 6e69 7429 2c20 egistry (init), \n+001b0230: 636f 7079 2c20 616e 6420 6465 6c65 7469 copy, and deleti\n+001b0240: 6f6e 206f 6620 7468 6520 706c 7567 696e on of the plugin\n+001b0250: 2064 6174 6120 616e 6420 7265 7365 7420 data and reset \n+001b0260: 6361 6c6c 6261 636b 732e 3c2f 703e 0a3c callbacks.

    .<\n+001b0270: 703e 5468 6520 3c63 6f64 653e 6664 656c p>The fdel\n+001b0280: 6574 653c 2f63 6f64 653e 2063 616c 6c62 ete callb\n+001b0290: 6163 6b20 6f66 203c 636f 6465 3e73 7472 ack of str\n+001b02a0: 7563 7420 736f 6170 5f70 6c75 6769 6e3c uct soap_plugin<\n+001b02b0: 2f63 6f64 653e 206d 7573 7420 6265 2073 /code> must be s\n+001b02c0: 6574 2074 6f20 6465 2d72 6567 6973 7465 et to de-registe\n+001b02d0: 7220 7468 6520 706c 7567 696e 2061 6e64 r the plugin and\n+001b02e0: 206c 6574 2069 7420 6465 6c65 7465 2069 let it delete i\n+001b02f0: 7473 2072 6573 6f75 7263 6573 2e3c 2f70 ts resources..

    A plugin is\n+001b0310: 2063 6f70 6965 6420 616c 6f6e 6720 7769 copied along wi\n+001b0320: 7468 2069 7473 2063 6f72 7265 7370 6f6e th its correspon\n+001b0330: 6469 6e67 203c 636f 6465 3e3c 6120 636c ding soap<\n+001b0390: 2f63 6f64 653e 2063 6f6e 7465 7874 2077 /code> context w\n+001b03a0: 6974 6820 7468 6520 3c63 6f64 653e 3c61 ith the soap_co\n+001b0460: 7079 3c2f 613e 3c2f 636f 6465 3e20 6361 py ca\n+001b0470: 6c6c 2e20 5468 6973 2066 756e 6374 696f ll. This functio\n+001b0480: 6e20 636f 7069 6573 2061 203c 636f 6465 n copies a soa\n+001b04e0: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n+001b04f0: 7465 7874 2061 6e64 2074 6865 2063 6861 text and the cha\n+001b0500: 696e 206f 6620 706c 7567 696e 732e 2049 in of plugins. I\n+001b0510: 7420 6973 2075 7020 746f 2074 6865 2070 t is up to the p\n+001b0520: 6c75 6769 6e20 696d 706c 656d 656e 7461 lugin implementa\n+001b0530: 7469 6f6e 2074 6f20 7368 6172 6520 7468 tion to share th\n+001b0540: 6520 706c 7567 696e 2064 6174 6120 6f72 e plugin data or\n+001b0550: 206e 6f74 2061 7320 666f 6c6c 6f77 733a not as follows:\n+001b0560: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 6966

    ..\n+001b0c60: 3c70 3e54 6865 2065 7861 6d70 6c65 2070

    The example p\n+001b0c70: 6c75 6769 6e20 7368 6f75 6c64 2062 6520 lugin should be \n+001b0c80: 7573 6564 2061 7320 666f 6c6c 6f77 733a used as follows:\n+001b0c90: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n+001b0d10: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+001b0da0: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    .\n+001b0db0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_regis\n+001b0e20: 7465 725f 706c 7567 696e 3c2f 613e 283c ter_plugin(<\n+001b0e30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b0e40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b0e50: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001b0e60: 706c 7567 696e 293b 203c 2f64 6976 3e0a plugin);
    .\n+001b0e70: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    To pas\n+001b0e90: 7320 6120 3c63 6f64 653e 766f 6964 2a3c s a void*<\n+001b0ea0: 2f63 6f64 653e 2061 7267 756d 656e 7420 /code> argument \n+001b0eb0: 746f 2074 6865 2070 6c75 6769 6e27 7320 to the plugin's \n+001b0ec0: 7265 6769 7374 7279 2066 756e 6374 696f registry functio\n+001b0ed0: 6e20 7573 653a 3c2f 703e 0a3c 6469 7620 n use:

    .
    struct \n+001b0f20: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+001b0f50: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001b0f80: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n+001b0fe0: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); <\n+001b0ff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..<\n+001b10c0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Additio\n+001b10e0: 6e61 6c20 646f 6375 6d65 6e74 6174 696f nal documentatio\n+001b10f0: 6e20 666f 7220 7468 6520 6772 6f77 696e n for the growin\n+001b1100: 6720 6e75 6d62 6572 206f 6620 6753 4f41 g number of gSOA\n+001b1110: 5020 706c 7567 696e 7320 6361 6e20 6265 P plugins can be\n+001b1120: 2066 6f75 6e64 2061 7420 3c61 2068 7265 found at \n+001b1150: 6874 7470 733a 2f2f 7777 772e 6765 6e69 https://www.geni\n+001b1160: 7669 612e 636f 6d2f 646f 633c 2f61 3e2e via.com/doc.\n+001b1170: 2041 206e 756d 6265 7220 6f66 2065 7861 A number of exa\n+001b1180: 6d70 6c65 2070 6c75 6769 6e73 2061 7265 mple plugins are\n+001b1190: 2069 6e63 6c75 6465 6420 696e 2074 6865 included in the\n+001b11a0: 2067 534f 4150 2073 6f75 7263 6520 636f gSOAP source co\n+001b11b0: 6465 2070 6163 6b61 6765 2773 203c 656d de package's gsoap/plu\n+001b11d0: 6769 6e3c 2f63 6f64 653e 3c2f 656d 3e20 gin \n+001b11e0: 6469 7265 6374 6f72 792e 2053 6f6d 6520 directory. Some \n+001b11f0: 6f66 2074 6865 7365 2070 6c75 6769 6e73 of these plugins\n+001b1200: 2061 7265 2064 6973 6375 7373 6564 2069 are discussed i\n+001b1210: 6e20 7468 6520 6e65 7874 2073 6563 7469 n the next secti\n+001b1220: 6f6e 732e 3c2f 703e 0a3c 703e 5365 6520 ons.

    .

    See \n+001b1230: 616c 736f 2041 5049 2064 6f63 756d 656e also API documen\n+001b1240: 7461 7469 6f6e 204d 6f64 756c 6520 3c61 tation Module Plu\n+001b1280: 6769 6e73 2061 6e64 2070 6c75 6769 6e20 gins and plugin \n+001b1290: 7265 6769 7374 7279 2066 756e 6374 696f registry functio\n+001b12a0: 6e73 3c2f 613e 202e 3c2f 703e 0a3c 703e ns .

    .

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

    .DOM API o\n+001b1310: 7665 7276 6965 773c 2f68 333e 0a3c 703e verview

    .

    \n+001b1320: 5468 6520 444f 4d20 4150 4920 6973 206e The DOM API is n\n+001b1330: 6f74 2061 2070 6c75 6769 6e2c 2062 7574 ot a plugin, but\n+001b1340: 2061 6e20 6578 7465 6e73 696f 6e20 7468 an extension th\n+001b1350: 6174 2070 726f 7669 6465 7320 6120 444f at provides a DO\n+001b1360: 4d20 4150 4920 6173 2061 2073 6570 6172 M API as a separ\n+001b1370: 6174 6520 736f 7572 6365 2063 6f64 6520 ate source code \n+001b1380: 6669 6c65 2074 6f20 636f 6d70 696c 6520 file to compile \n+001b1390: 616e 6420 6c69 6e6b 2077 6974 6820 6753 and link with gS\n+001b13a0: 4f41 5020 6170 706c 6963 6174 696f 6e73 OAP applications\n+001b13b0: 2074 6f20 656e 6162 6c65 6420 7468 6520 to enabled the \n+001b13c0: 6753 4f41 5020 444f 4d2e 2058 4d4c 2044 gSOAP DOM. XML D\n+001b13d0: 4f4d 2070 726f 6365 7373 696e 6720 6973 OM processing is\n+001b13e0: 206f 7074 696f 6e61 6c2c 2061 6e64 2065 optional, and e\n+001b13f0: 6e61 626c 6564 2077 6974 6820 3c61 2068 nabled with \n+001b1410: 3c62 3e3c 636f 6465 3e77 7364 6c32 6820 wsdl2h \n+001b1420: 2d64 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -d op\n+001b1430: 7469 6f6e 203c 623e 3c63 6f64 653e 2d64 tion -d\n+001b1440: 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 3e20 \n+001b1450: 746f 2067 656e 6572 6174 6520 444f 4d20 to generate DOM \n+001b1460: 7374 7275 6374 7572 6573 2066 6f72 203c structures for <\n+001b1470: 656d 3e3c 636f 6465 3e78 7364 3a61 6e79 em>xsd:any\n+001b1480: 5479 7065 3c2f 636f 6465 3e3c 2f65 6d3e Type\n+001b1490: 2c20 3c65 6d3e 3c63 6f64 653e 7873 643a , xsd:\n+001b14a0: 616e 793c 2f63 6f64 653e 3c2f 656d 3e2c any,\n+001b14b0: 2061 6e64 203c 656d 3e3c 636f 6465 3e78 and x\n+001b14c0: 7364 3a61 6e79 4174 7472 6962 7574 653c sd:anyAttribute<\n+001b14d0: 2f63 6f64 653e 3c2f 656d 3e20 7363 6865 /code> sche\n+001b14e0: 6d61 2063 6f6d 706f 6e65 6e74 732c 2077 ma components, w\n+001b14f0: 6869 6368 2061 7265 2065 6e61 626c 6564 hich are enabled\n+001b1500: 2077 6974 6820 3c63 6f64 653e 2369 6d70 with #imp\n+001b1510: 6f72 7420 2264 6f6d 2e68 223c 2f63 6f64 ort \"dom.h\" in an interfa\n+001b1530: 6365 2068 6561 6465 7220 6669 6c65 2066 ce header file f\n+001b1540: 6f72 2073 6f61 7063 7070 322e 2054 6869 or soapcpp2. Thi\n+001b1550: 7320 696d 706f 7274 7320 3c65 6d3e 3c63 s imports gsoap/import\n+001b1570: 2f64 6f6d 2e68 3c2f 636f 6465 3e3c 2f65 /dom.h. Then compile\n+001b1590: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+001b15a0: 2f64 6f6d 2e63 3c2f 636f 6465 3e3c 2f65 /dom.c for C or \n+001b15c0: 3c63 6f64 653e 6773 6f61 702f 646f 6d2e gsoap/dom.\n+001b15d0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n+001b15e0: 666f 7220 432b 2b20 7769 7468 2079 6f75 for C++ with you\n+001b15f0: 7220 6170 706c 6963 6174 696f 6e2e 3c2f r application..

    To use the\n+001b1610: 2044 4f4d 2041 5049 2077 6974 6820 5765 DOM API with We\n+001b1620: 6220 7365 7276 6963 6573 2c20 6164 6420 b services, add \n+001b1630: 3c63 6f64 653e 2369 6d70 6f72 7420 2264 #import \"d\n+001b1640: 6f6d 2e68 223c 2f63 6f64 653e 2074 6f20 om.h\" to \n+001b1650: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n+001b1660: 6164 6572 2066 696c 6520 6f72 2075 7365 ader file or use\n+001b1670: 203c 6120 6872 6566 3d22 2377 7364 6c32 ws\n+001b1690: 646c 3268 202d 643c 2f63 6f64 653e 3c2f dl2h -d option -d\n+001b16c0: 3c2f 613e 3a3c 2f70 3e0a 3c64 6976 2063 :

    .
    \n+001b16e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #im\n+001b1710: 706f 7274 2026 7175 6f74 3b64 6f6d 2e68 port "dom.h\n+001b1720: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".

    Th\n+001b1750: 6973 2064 6563 6c61 7265 7320 3c63 6f64 is declares xsd__anyType and \n+001b1780: 7873 645f 5f61 6e79 4174 7472 6962 7574 xsd__anyAttribut\n+001b1790: 653c 2f63 6f64 653e 2074 7970 6573 2e3c e types.<\n+001b17a0: 2f70 3e0a 3c70 3e41 2044 4f4d 2065 6c65 /p>.

    A DOM ele\n+001b17b0: 6d65 6e74 206e 6f64 6520 6973 2073 6572 ment node is ser\n+001b17c0: 6961 6c69 7a65 6420 7769 7468 2074 6865 ialized with the\n+001b17d0: 203c 636f 6465 3e78 7364 5f5f 616e 7954 xsd__anyT\n+001b17e0: 7970 653c 2f63 6f64 653e 2073 6572 6961 ype seria\n+001b17f0: 6c69 7a61 626c 6520 7479 7065 2e20 5468 lizable type. Th\n+001b1800: 6520 756e 6465 726c 7969 6e67 2069 6d70 e underlying imp\n+001b1810: 6c65 6d65 6e74 6174 696f 6e20 7479 7065 lementation type\n+001b1820: 206f 6620 3c63 6f64 653e 7873 645f 5f61 of xsd__a\n+001b1830: 6e79 5479 7065 3c2f 636f 6465 3e20 6973 nyType is\n+001b1840: 203c 636f 6465 3e73 6f61 705f 646f 6d5f soap_dom_\n+001b1850: 656c 656d 656e 743c 2f63 6f64 653e 2e20 element. \n+001b1860: 4f6e 6520 6f72 206d 6f72 6520 444f 4d20 One or more DOM \n+001b1870: 6174 7472 6962 7574 6520 6e6f 6465 7320 attribute nodes \n+001b1880: 6172 6520 7365 7269 616c 697a 6564 2077 are serialized w\n+001b1890: 6974 6820 7468 6520 3c63 6f64 653e 7873 ith the xs\n+001b18a0: 645f 5f61 6e79 4174 7472 6962 7574 653c d__anyAttribute<\n+001b18b0: 2f63 6f64 653e 2073 6572 6961 6c69 7a61 /code> serializa\n+001b18c0: 626c 6520 7479 7065 2e20 5468 6520 756e ble type. The un\n+001b18d0: 6465 726c 7969 6e67 2069 6d70 6c65 6d65 derlying impleme\n+001b18e0: 6e74 6174 696f 6e20 7479 7065 206f 6620 ntation type of \n+001b18f0: 3c63 6f64 653e 7873 645f 5f61 6e79 4174 xsd__anyAt\n+001b1900: 7472 6962 7574 653c 2f63 6f64 653e 2069 tribute i\n+001b1910: 7320 3c63 6f64 653e 736f 6170 5f64 6f6d s soap_dom\n+001b1920: 5f61 7474 7269 6275 7465 3c2f 636f 6465 _attribute, which is a li\n+001b1940: 6e6b 6564 206c 6973 742e 3c2f 703e 0a3c nked list.

    .<\n+001b1950: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001b1960: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #import "\n+001b19a0: 646f 6d2e 6826 7175 6f74 3b3c 2f73 7061 dom.h" // impo\n+001b19d0: 7274 7320 7873 645f 5f61 6e79 5479 7065 rts xsd__anyType\n+001b19e0: 2061 7320 6120 444f 4d20 6e6f 6465 3c2f as a DOM node
    . <\n+001b1a10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    cl\n+001b1a40: 6173 7320 3c2f 7370 616e 3e6e 735f 5f64 ass ns__d\n+001b1a50: 6174 6120 3a20 3c73 7061 6e20 636c 6173 ata : publ\n+001b1a70: 6963 3c2f 7370 616e 3e20 7873 645f 5f61 ic xsd__a\n+001b1a80: 6e79 5479 7065 3c2f 6469 763e 0a3c 6469 nyType
    .{\n+001b1aa0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public:
    . \n+001b1ae0: 2020 7873 645f 5f61 6e79 5479 7065 2a20 xsd__anyType* \n+001b1af0: 666f 6f3b 2020 2020 2020 2020 2020 2020 foo; \n+001b1b00: 2020 2020 3c73 7061 6e20 636c 6173 733d // Sto\n+001b1b20: 7265 2026 6c74 3b66 6f6f 2667 743b 2065 re <foo> e\n+001b1b30: 6c65 6d65 6e74 2069 6e20 444f 4d20 736f lement in DOM so\n+001b1b40: 6170 5f64 6f6d 5f65 6c65 6d65 6e74 3c2f ap_dom_element
    . \n+001b1b70: 2020 7873 645f 5f61 6e79 5479 7065 205f xsd__anyType _\n+001b1b80: 5f61 6e79 3b20 2020 2020 2020 2020 2020 _any; \n+001b1b90: 2020 2020 3c73 7061 6e20 636c 6173 733d // Sto\n+001b1bb0: 7265 2061 6e79 2065 6c65 6d65 6e74 2063 re any element c\n+001b1bc0: 6f6e 7465 6e74 2069 6e20 444f 4d20 736f ontent in DOM so\n+001b1bd0: 6170 5f64 6f6d 5f65 6c65 6d65 6e74 3c2f ap_dom_element
    . \n+001b1c00: 4020 7873 645f 5f61 6e79 4174 7472 6962 @ xsd__anyAttrib\n+001b1c10: 7574 6520 5f5f 616e 7941 7474 7269 6275 ute __anyAttribu\n+001b1c20: 7465 3b20 3c73 7061 6e20 636c 6173 733d te; // Sto\n+001b1c40: 7265 2061 6e79 4174 7472 6962 7574 6520 re anyAttribute \n+001b1c50: 636f 6e74 656e 7420 696e 2044 4f4d 2073 content in DOM s\n+001b1c60: 6f61 705f 646f 6d5f 6174 7472 6962 7574 oap_dom_attribut\n+001b1c70: 6520 6c69 6e6b 6564 206e 6f64 6520 7374 e linked node st\n+001b1c80: 7275 6374 7572 653c 2f73 7061 6e3e 3c2f ructure.
    };
    .\n+001b1cb0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    To man\n+001b1cd0: 6970 756c 6174 6520 7468 6520 444f 4d20 ipulate the DOM \n+001b1ce0: 656c 656d 656e 7473 2061 6e64 2061 7474 elements and att\n+001b1cf0: 7269 6275 7465 7320 7765 2075 7365 2074 ributes we use t\n+001b1d00: 6865 2044 4f4d 2041 5049 2066 756e 6374 he DOM API funct\n+001b1d10: 696f 6e73 2064 6f63 756d 656e 7465 6420 ions documented \n+001b1d20: 696e 2074 6865 2067 534f 4150 203c 6120 in the gSOAP XML DOM API doc\n+001b1d60: 756d 656e 7461 7469 6f6e 3c2f 613e 2e3c umentation.<\n+001b1d70: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .The mess\n+001b1de0: 6167 6520 6c6f 6767 696e 6720 706c 7567 age logging plug\n+001b1df0: 696e 3c2f 6833 3e0a 3c70 3e54 6865 206d in

    .

    The m\n+001b1e00: 6573 7361 6765 203c 636f 6465 3e3c 6120 essage \n+001b1e90: 6c6f 6767 696e 673c 2f61 3e3c 2f63 6f64 logging plugin can be\n+001b1eb0: 2075 7365 6420 746f 2073 656c 6563 7469 used to selecti\n+001b1ec0: 7665 6c79 206c 6f67 2069 6e62 6f75 6e64 vely log inbound\n+001b1ed0: 2061 6e64 206f 7574 626f 756e 6420 6d65 and outbound me\n+001b1ee0: 7373 6167 6573 2074 6f20 6120 6669 6c65 ssages to a file\n+001b1ef0: 206f 7220 7374 7265 616d 2e20 4974 2061 or stream. It a\n+001b1f00: 6c73 6f20 6b65 6570 7320 6163 6365 7373 lso keeps access\n+001b1f10: 2073 7461 7469 7374 6963 7320 746f 206c statistics to l\n+001b1f20: 6f67 2074 6865 2074 6f74 616c 206e 756d og the total num\n+001b1f30: 6265 7220 6f66 2062 7974 6573 2073 656e ber of bytes sen\n+001b1f40: 7420 616e 6420 7265 6365 6976 6564 2e3c t and received.<\n+001b1f50: 2f70 3e0a 3c70 3e54 6f20 7573 6520 7468 /p>.

    To use th\n+001b1f60: 6520 706c 7567 696e 2c20 636f 6d70 696c e plugin, compil\n+001b1f70: 6520 616e 6420 6c69 6e6b 2079 6f75 7220 e and link your \n+001b1f80: 6170 706c 6963 6174 696f 6e20 7769 7468 application with\n+001b1f90: 203c 656d 3e3c 636f 6465 3e6c 6f67 6769 loggi\n+001b1fa0: 6e67 2e63 3c2f 636f 6465 3e3c 2f65 6d3e ng.c\n+001b1fb0: 206c 6f63 6174 6564 2069 6e20 7468 6520 located in the \n+001b1fc0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+001b1fd0: 706c 7567 696e 3c2f 636f 6465 3e3c 2f65 plugin directory of \n+001b1ff0: 7468 6520 6753 4f41 5020 7061 636b 6167 the gSOAP packag\n+001b2000: 652e 2054 6f20 656e 6162 6c65 2074 6865 e. To enable the\n+001b2010: 2070 6c75 6769 6e20 696e 2079 6f75 7220 plugin in your \n+001b2020: 636f 6465 2c20 7265 6769 7374 6572 2074 code, register t\n+001b2030: 6865 2070 6c75 6769 6e20 616e 6420 7365 he plugin and se\n+001b2040: 7420 7468 6520 7374 7265 616d 7320 6173 t the streams as\n+001b2050: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 follows:

    .
    #include "\n+001b20b0: 6c6f 6767 696e 672e 6826 7175 6f74 3b3c logging.h"<\n+001b20c0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n+001b20e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001b2110: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+001b2150: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b2160: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b2170: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+001b2180: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    .size_t bytes_in; \n+001b2230: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t\n+001b2270: 2062 7974 6573 5f6f 7574 3b20 3c2f 6469 bytes_out; ..\n+001b23c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n+001b23f0: 2066 6169 6c65 6420 746f 2072 6567 6973 failed to regis\n+001b2400: 7465 7220 3c2f 7370 616e 3e3c 2f64 6976 ter .
    ... //\n+001b2440: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001b2460: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_logg\n+001b24c0: 696e 675f 696e 626f 756e 643c 2f61 3e28 ing_inbound(\n+001b24d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001b2500: 2073 7464 6f75 7429 3b20 3c2f 6469 763e stdout);
    \n+001b2510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_set_l\n+001b2580: 6f67 6769 6e67 5f6f 7574 626f 756e 643c ogging_outbound<\n+001b2590: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001b25c0: 2f61 3e2c 2073 7464 6f75 7429 3b20 3c2f /a>, stdout); .
    ... // process mess\n+001b2610: 6167 6573 3c2f 7370 616e 3e3c 2f64 6976 ages.
    soap_set_\n+001b2690: 6c6f 6767 696e 675f 696e 626f 756e 643c logging_inbound<\n+001b26a0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001b26d0: 2f61 3e2c 204e 554c 4c29 3b20 3c73 7061 /a>, NULL); // disable log\n+001b2700: 6769 6e67 203c 2f73 7061 6e3e 3c2f 6469 ging .
    soap_set\n+001b2780: 5f6c 6f67 6769 6e67 5f6f 7574 626f 756e _logging_outboun\n+001b2790: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa\n+001b27c0: 703c 2f61 3e2c 204e 554c 4c29 3b20 3c73 p, NULL); // disable l\n+001b27f0: 6f67 6769 6e67 203c 2f73 7061 6e3e 3c2f ogging .
    soap_l\n+001b2870: 6f67 6769 6e67 5f73 7461 7473 3c2f 613e ogging_stats\n+001b2880: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b28b0: 2c20 2661 6d70 3b62 7974 6573 5f6f 7574 , &bytes_out\n+001b28c0: 2c20 2661 6d70 3b62 7974 6573 5f69 6e29 , &bytes_in)\n+001b28d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    ... //..void soap_set_\n+001b2ac0: 6c6f 6767 696e 675f 6f75 7462 6f75 6e64 logging_outbound\n+001b2ad0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+001b2ae0: 6170 2c20 4649 4c45 202a 6664 293c 2f64 ap, FILE *fd)
    Specify ou\n+001b2b10: 7462 6f75 6e64 206d 6573 7361 6765 206c tbound message l\n+001b2b20: 6f67 6769 6e67 2077 6974 6820 7468 6520 ogging with the \n+001b2b30: 6c6f 6767 696e 6720 706c 7567 696e 2e3c logging plugin.<\n+001b2b40: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .<\n+001b2ba0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+001b2bb0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_re\n+001b2c00: 7365 745f 6c6f 6767 696e 675f 7374 6174 set_logging_stat\n+001b2c10: 733c 2f61 3e3c 2f64 6976 3e3c 6469 7620 s
    v\n+001b2c30: 6f69 6420 736f 6170 5f72 6573 6574 5f6c oid soap_reset_l\n+001b2c40: 6f67 6769 6e67 5f73 7461 7473 2873 7472 ogging_stats(str\n+001b2c50: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+001b2c60: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Reset me\n+001b2c80: 7373 6167 696e 6720 7374 6174 6973 7469 ssaging statisti\n+001b2c90: 6373 2077 6974 6820 7468 6520 6c6f 6767 cs with the logg\n+001b2ca0: 696e 6720 706c 7567 696e 2e3c 2f64 6976 ing plugin.
    .
    <\n+001b2d20: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+001b2d30: 726f 7570 5f5f 6465 6275 672e 6874 6d6c roup__debug.html\n+001b2d40: 2367 6136 3238 6266 6334 6237 6136 6261 #ga628bfc4b7a6ba\n+001b2d50: 3462 6566 3233 6265 6134 3738 3765 6635 4bef23bea4787ef5\n+001b2d60: 6635 6422 3e73 6f61 705f 6c6f 6767 696e f5d\">soap_loggin\n+001b2d70: 675f 7374 6174 733c 2f61 3e3c 2f64 6976 g_stats
    void soap_l\n+001b2da0: 6f67 6769 6e67 5f73 7461 7473 2873 7472 ogging_stats(str\n+001b2db0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+001b2dc0: 7369 7a65 5f74 202a 7365 6e74 2c20 7369 size_t *sent, si\n+001b2dd0: 7a65 5f74 202a 7265 6376 293c 2f64 6976 ze_t *recv)
    Collect mess\n+001b2e00: 6167 696e 6720 7374 6174 6973 7469 6373 aging statistics\n+001b2e10: 2077 6974 6820 7468 6520 6c6f 6767 696e with the loggin\n+001b2e20: 6720 706c 7567 696e 2e3c 2f64 6976 3e3c g plugin.
    <\n+001b2e30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_logg\n+001b2ef0: 696e 675f 696e 626f 756e 643c 2f61 3e3c ing_inbound<\n+001b2f00: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void so\n+001b2f20: 6170 5f73 6574 5f6c 6f67 6769 6e67 5f69 ap_set_logging_i\n+001b2f30: 6e62 6f75 6e64 2873 7472 7563 7420 736f nbound(struct so\n+001b2f40: 6170 202a 736f 6170 2c20 4649 4c45 202a ap *soap, FILE *\n+001b2f50: 6664 293c 2f64 6976 3e3c 6469 7620 636c fd)
    Spec\n+001b2f70: 6966 7920 696e 626f 756e 6420 6d65 7373 ify inbound mess\n+001b2f80: 6167 6520 6c6f 6767 696e 6720 7769 7468 age logging with\n+001b2f90: 2074 6865 206c 6f67 6769 6e67 2070 6c75 the logging plu\n+001b2fa0: 6769 6e2e 3c2f 6469 763e 3c2f 6469 763e gin.
    \n+001b2fb0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    <\n+001b3070: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+001b3080: 6922 3e69 6e74 206c 6f67 6769 6e67 2873 i\">int logging(s\n+001b3090: 7472 7563 7420 736f 6170 202a 2c20 7374 truct soap *, st\n+001b30a0: 7275 6374 2073 6f61 705f 706c 7567 696e ruct soap_plugin\n+001b30b0: 202a 2c20 766f 6964 202a 293c 2f64 6976 *, void *)
    The logging \n+001b30e0: 706c 7567 696e 2072 6567 6973 7472 6174 plugin registrat\n+001b30f0: 696f 6e20 6675 6e63 7469 6f6e 2e3c 2f64 ion function.
    .
    \n+001b3110: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    An H\n+001b45b0: 5454 5020 4745 5420 6861 6e64 6c65 7220 TTP GET handler \n+001b45c0: 6361 6e20 7369 6d70 6c79 2070 726f 6475 can simply produ\n+001b45d0: 6365 2073 6f6d 6520 4854 4d4c 2063 6f6e ce some HTML con\n+001b45e0: 7465 6e74 2c20 6f72 2061 6e79 206f 7468 tent, or any oth\n+001b45f0: 6572 2074 7970 6520 6f66 2063 6f6e 7465 er type of conte\n+001b4600: 6e74 2062 7920 7365 6e64 696e 6720 6461 nt by sending da\n+001b4610: 7461 2075 7369 6e67 203c 636f 6465 3e3c ta using <\n+001b4620: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001b4630: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001b4640: 5f69 6f2e 6874 6d6c 2367 6130 3339 3065 _io.html#ga0390e\n+001b4650: 3538 6264 3261 3365 6265 3666 6533 6134 58bd2a3ebe6fe3a4\n+001b4660: 3664 6530 3533 3461 3631 3422 2074 6974 6de0534a614\" tit\n+001b4670: 6c65 3d22 496e 6974 6961 6c69 7a65 2074 le=\"Initialize t\n+001b4680: 6865 2063 6f6e 7465 7874 2066 6f72 2073 he context for s\n+001b4690: 6572 7665 722d 7369 6465 2073 656e 6469 erver-side sendi\n+001b46a0: 6e67 2061 6e64 2073 656e 6420 6120 4854 ng and send a HT\n+001b46b0: 5450 2072 6573 706f 6e73 6520 6865 6164 TP response head\n+001b46c0: 6572 2e22 3e73 6f61 705f 7265 7370 6f6e er.\">soap_respon\n+001b46d0: 7365 3c2f 613e 3c2f 636f 6465 3e3a 3c2f se:.

    int \n+001b4730: 6d79 5f68 7474 705f 6765 745f 6861 6e64 my_http_get_hand\n+001b4740: 6c65 7228 3c73 7061 6e20 636c 6173 733d ler(struct\n+001b4760: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001b4790: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001b47c0: 736f 6170 3c2f 613e 2920 3c2f 6469 763e soap)
    \n+001b47d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+001b4800: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b4810: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b4820: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001b4830: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;http\n+001b4880: 5f63 6f6e 7465 6e74 3c2f 613e 203d 203c _content = <\n+001b4890: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001b48a0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001b48b0: 3b74 6578 742f 6874 6d6c 2671 756f 743b ;text/html"\n+001b48c0: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n+001b48d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n+001b4a00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    || soap_se\n+001b4a70: 6e64 3c2f 613e 283c 6120 636c 6173 733d nd(so\n+001b4aa0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "<ht\n+001b4ad0: 6d6c 2667 743b 4865 6c6c 6f26 6c74 3b2f ml>Hello</\n+001b4ae0: 6874 6d6c 2667 743b 2671 756f 743b 3c2f html>")
    . \n+001b4b10: 2020 7c7c 203c 6120 636c 6173 733d 2263 || soap_end_se\n+001b4b70: 6e64 3c2f 613e 283c 6120 636c 6173 733d nd(so\n+001b4ba0: 6170 3c2f 613e 293c 2f64 6976 3e0a 3c64 ap)
    .\n+001b4bc0: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n+001b4be0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn soap\n+001b4c40: 5f63 6c6f 7365 736f 636b 3c2f 613e 283c _closesock(<\n+001b4c50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b4c60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b4c70: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001b4c80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    }
    \n+001b4d90: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    If yo\n+001b4db0: 7520 7573 6520 3c63 6f64 653e 3c61 2063 u use soap_copy\n+001b4e70: 3c2f 613e 3c2f 636f 6465 3e20 746f 2063 to c\n+001b4e80: 6f70 7920 7468 6520 3c63 6f64 653e 3c61 opy the soap contex\n+001b4ef0: 7420 7769 7468 2074 6865 2070 6c75 6769 t with the plugi\n+001b4f00: 6e2c 2074 6865 2070 6c75 6769 6e27 7320 n, the plugin's \n+001b4f10: 6461 7461 2077 696c 6c20 6265 2073 6861 data will be sha\n+001b4f20: 7265 6420 6279 2074 6865 2063 6f70 792e red by the copy.\n+001b4f30: 2054 6865 7265 666f 7265 2c20 7468 6520 Therefore, the \n+001b4f40: 7374 6174 6973 7469 6373 2061 7265 206e statistics are n\n+001b4f50: 6f74 2031 3030 2520 6775 6172 616e 7465 ot 100% guarante\n+001b4f60: 6564 2074 6f20 6265 2061 6363 7572 6174 ed to be accurat\n+001b4f70: 6520 666f 7220 6d75 6c74 692d 7468 7265 e for multi-thre\n+001b4f80: 6164 6564 2073 6572 7669 6365 7320 7369 aded services si\n+001b4f90: 6e63 6520 7261 6365 2063 6f6e 6469 7469 nce race conditi\n+001b4fa0: 6f6e 7320 6f6e 2074 6865 2063 6f75 6e74 ons on the count\n+001b4fb0: 6572 7320 6d61 7920 6f63 6375 722e 204d ers may occur. M\n+001b4fc0: 7574 6578 2069 7320 6e6f 7420 7573 6564 utex is not used\n+001b4fd0: 2074 6f20 7570 6461 7465 2074 6865 2063 to update the c\n+001b4fe0: 6f75 6e74 6572 7320 746f 2061 766f 6964 ounters to avoid\n+001b4ff0: 2069 6e74 726f 6475 6369 6e67 2065 7870 introducing exp\n+001b5000: 656e 7369 7665 2073 796e 6368 726f 6e69 ensive synchroni\n+001b5010: 7a61 7469 6f6e 2070 6f69 6e74 732e 2049 zation points. I\n+001b5020: 6620 3130 3025 2073 6572 7665 722d 7369 f 100% server-si\n+001b5030: 6465 2061 6363 7572 6163 7920 6973 2072 de accuracy is r\n+001b5040: 6571 7569 7265 642c 2061 6464 206d 7574 equired, add mut\n+001b5050: 6578 2061 7420 7468 6520 706f 696e 7473 ex at the points\n+001b5060: 2069 6e64 6963 6174 6564 2069 6e20 7468 indicated in th\n+001b5070: 6520 3c65 6d3e 3c63 6f64 653e 6874 7470 e http\n+001b5080: 6765 742e 633c 2f63 6f64 653e 3c2f 656d get.c code.

    .

    T\n+001b50a0: 6865 2063 6c69 656e 742d 7369 6465 2075 he client-side u\n+001b50b0: 7365 206f 6620 4854 5450 2047 4554 2069 se of HTTP GET i\n+001b50c0: 7320 7072 6f76 6964 6564 2062 7920 7468 s provided by th\n+001b50d0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap\n+001b5150: 5f47 4554 3c2f 613e 3c2f 636f 6465 3e20 _GET \n+001b5160: 6f70 6572 6174 696f 6e2e 2054 6f20 7265 operation. To re\n+001b5170: 6365 6976 6520 6120 534f 4150 2f58 4d4c ceive a SOAP/XML\n+001b5180: 2028 7265 7370 6f6e 7365 2920 6d65 7373 (response) mess\n+001b5190: 6167 6520 3c65 6d3e 3c63 6f64 653e 6e73 age ns\n+001b51a0: 3a6d 6574 686f 6452 6573 706f 6e73 653c :methodResponse<\n+001b51b0: 2f63 6f64 653e 3c2f 656d 3e2c 2075 7365 /code>, use\n+001b51c0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int main()
    .\n+001b5220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    ..\n+001b5340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n+001b5370: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_GE\n+001b53d0: 543c 2f61 3e28 3c61 2063 6c61 7373 3d22 T(soa\n+001b5400: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, \n+001b5450: 656e 6470 6f69 6e74 3c2f 613e 2c20 4e55 endpoint, NU\n+001b5460: 4c4c 2929 203c 2f64 6976 3e0a 3c64 6976 LL))
    . \n+001b5480: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n+001b54a0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    \n+001b54e0: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else if \n+001b5510: 2873 6f61 705f 7265 6376 5f6e 735f 5f77 (soap_recv_ns__w\n+001b5520: 6562 6d65 7468 6f64 5265 7370 6f6e 7365 ebmethodResponse\n+001b5530: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b5560: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))
    .<\n+001b5570: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b5580: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n+001b55a0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else <\n+001b55f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n+001b5610: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // success\n+001b5630: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001b5650: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n+001b56b0: 793c 2f61 3e28 3c61 2063 6c61 7373 3d22 y(soa\n+001b56e0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n+001b56f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b5700: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_end(soap);
    .soap_done\n+001b5810: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b5840: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n+001b58f0: 736f 6170 5f47 4554 3c2f 613e 3c2f 6469 soap_GET
    int soap_G\n+001b5920: 4554 2873 7472 7563 7420 736f 6170 202a ET(struct soap *\n+001b5930: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+001b5940: 202a 656e 6470 6f69 6e74 2c20 636f 6e73 *endpoint, cons\n+001b5950: 7420 6368 6172 202a 6163 7469 6f6e 293c t char *action)<\n+001b5960: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    HTTP GET\n+001b5980: 2063 6f6e 7465 6e74 2066 726f 6d20 7365 content from se\n+001b5990: 7276 6572 2e3c 2f64 6976 3e3c 2f64 6976 rver.
    .

    To r\n+001b59c0: 6563 6569 7665 2061 6e79 2048 5454 5020 eceive any HTTP \n+001b59d0: 426f 6479 2064 6174 6120 696e 746f 2061 Body data into a\n+001b59e0: 2062 7566 6665 722c 2075 7365 3a3c 2f70 buffer, use:.

    int m\n+001b5a40: 6169 6e28 293c 2f64 6976 3e0a 3c64 6976 ain()
    .{<\n+001b5a60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+001b5a90: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+001b5ad0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b5ae0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b5af0: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+001b5b00: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    . \n+001b5b80: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *response \n+001b5bb0: 3d20 4e55 4c4c 3b20 3c2f 6469 763e 0a3c = NULL;
    .<\n+001b5bc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b5bd0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz\n+001b5bf0: 655f 743c 2f73 7061 6e3e 2072 6573 706f e_t respo\n+001b5c00: 6e73 655f 6c65 6e3b 3c2f 6469 763e 0a3c nse_len;
    .<\n+001b5c10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b5c20: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+001b5c40: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_GET\n+001b5ca0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001b5cd0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , e\n+001b5d20: 6e64 706f 696e 743c 2f61 3e2c 204e 554c ndpoint, NUL\n+001b5d30: 4c29 3c2f 6469 763e 0a3c 6469 7620 636c L)
    ...\n+001b5ee0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+001b5f00: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    else.
    ... // use the r\n+001b5f90: 6573 706f 6e73 6520 7374 7269 6e67 2028 esponse string (\n+001b5fa0: 4e55 4c4c 2069 6e64 6963 6174 6573 206e NULL indicates n\n+001b5fb0: 6f20 626f 6479 206f 7220 6572 726f 7229 o body or error)\n+001b5fc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001b5fe0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n+001b6040: 726f 793c 2f61 3e28 2661 6d70 3b3c 6120 roy(&soap); <\n+001b6080: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+001b60f0: 6f61 705f 656e 643c 2f61 3e28 2661 6d70 oap_end(&\n+001b6100: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+001b6130: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_done\n+001b61b0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001b61e0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n+001b6200: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    s\n+001b62b0: 6f61 705f 656e 645f 7265 6376 3c2f 613e oap_end_recv\n+001b62c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n+001b62e0: 6170 5f65 6e64 5f72 6563 7628 7374 7275 ap_end_recv(stru\n+001b62f0: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)
    Finalize \n+001b6320: 7468 6520 636f 6e74 6578 7420 6166 7465 the context afte\n+001b6330: 7220 7265 6365 6976 696e 672e 3c2f 6469 r receiving.
    .
    \n+001b6420: 6368 6172 202a 2073 6f61 705f 6874 7470 char * soap_http\n+001b6430: 5f67 6574 5f62 6f64 7928 7374 7275 6374 _get_body(struct\n+001b6440: 2073 6f61 7020 2a73 6f61 702c 2073 697a soap *soap, siz\n+001b6450: 655f 7420 2a6c 656e 293c 2f64 6976 3e3c e_t *len)
    <\n+001b6460: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001b6470: 223e 4765 7420 7468 6520 4854 5450 2062 \">Get the HTTP b\n+001b6480: 6f64 7920 6d65 7373 6167 6520 6173 2061 ody message as a\n+001b6490: 2073 7472 696e 672e 3c2f 6469 763e 3c2f string.
    .

    S\n+001b64c0: 6565 2061 6c73 6f20 3c63 6f64 653e 3c61 ee also h\n+001b6550: 7474 705f 6765 743c 2f61 3e3c 2f63 6f64 ttp_get.

    .

    .... \n+001b6570: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+001b6580: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+001b6590: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    .\n+001b65d0: 0a52 4553 5466 756c 2073 6572 7665 722d .RESTful server-\n+001b65e0: 7369 6465 2041 5049 2077 6974 6820 7468 side API with th\n+001b65f0: 6520 4854 5450 2050 4f53 5420 706c 7567 e HTTP POST plug\n+001b6600: 696e 3c2f 6833 3e0a 3c70 3e53 6572 7665 in.

    Serve\n+001b6610: 722d 7369 6465 2075 7365 206f 6620 5245 r-side use of RE\n+001b6620: 5354 6675 6c20 4854 5450 2050 4f53 542c STful HTTP POST,\n+001b6630: 2050 5554 2c20 5041 5443 482c 2061 6e64 PUT, PATCH, and\n+001b6640: 2044 454c 4554 4520 6f70 6572 6174 696f DELETE operatio\n+001b6650: 6e73 2061 7265 2073 7570 706f 7274 6564 ns are supported\n+001b6660: 2077 6974 6820 7468 6520 3c63 6f64 653e with the \n+001b6670: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_post<\n+001b6700: 2f63 6f64 653e 2048 5454 5020 504f 5354 /code> HTTP POST\n+001b6710: 2070 6c75 6769 6e20 3c65 6d3e 3c63 6f64 plugin gsoap/plugin/h\n+001b6730: 7474 7070 6f73 742e 633c 2f63 6f64 653e ttppost.c\n+001b6740: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e 5468 .

    .

    Th\n+001b6750: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_p\n+001b67e0: 6f73 743c 2f61 3e3c 2f63 6f64 653e 2048 ost H\n+001b67f0: 5454 5020 504f 5354 2070 6c75 6769 6e20 TTP POST plugin \n+001b6800: 616c 6c6f 7773 2079 6f75 7220 7365 7276 allows your serv\n+001b6810: 6572 2074 6f20 6861 6e64 6c65 2052 4553 er to handle RES\n+001b6820: 5466 756c 2048 5454 5020 504f 5354 2072 Tful HTTP POST r\n+001b6830: 6571 7565 7374 7320 616e 6420 6174 2074 equests and at t\n+001b6840: 6865 2073 616d 6520 7469 6d65 2073 7469 he same time sti\n+001b6850: 6c6c 2073 6572 7665 2053 4f41 502d 6261 ll serve SOAP-ba\n+001b6860: 7365 6420 504f 5354 2072 6571 7565 7374 sed POST request\n+001b6870: 732e 2054 6865 2070 6c75 6769 6e20 616c s. The plugin al\n+001b6880: 736f 2070 726f 7669 6465 7320 7375 7070 so provides supp\n+001b6890: 6f72 7420 666f 7220 636c 6965 6e74 2061 ort for client a\n+001b68a0: 7070 6c69 6361 7469 6f6e 7320 746f 2069 pplications to i\n+001b68b0: 7373 7565 2048 5454 5020 504f 5354 206f ssue HTTP POST o\n+001b68c0: 7065 7261 7469 6f6e 7320 746f 2061 2073 perations to a s\n+001b68d0: 6572 7665 722e 3c2f 703e 0a3c 703e 546f erver.

    .

    To\n+001b68e0: 2073 696d 706c 6966 7920 7468 6520 7365 simplify the se\n+001b68f0: 7276 6572 2d73 6964 6520 6861 6e64 6c69 rver-side handli\n+001b6900: 6e67 206f 6620 504f 5354 2072 6571 7565 ng of POST reque\n+001b6910: 7374 732c 2068 616e 646c 6572 7320 6361 sts, handlers ca\n+001b6920: 6e20 6265 2061 7373 6f63 6961 7465 6420 n be associated \n+001b6930: 7769 7468 206d 6564 6961 2074 7970 6573 with media types\n+001b6940: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    struct http_post_hand\n+001b69a0: 6c65 7273 206d 795f 6861 6e64 6c65 7273 lers my_handlers\n+001b69b0: 5b5d 203d 203c 2f64 6976 3e0a 3c64 6976 [] =
    .{<\n+001b69d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "im\n+001b6a10: 6167 652f 6a70 6726 7175 6f74 3b3c 2f73 age/jpg", jpeg_handl\n+001b6a30: 6572 207d 2c20 3c2f 6469 763e 0a3c 6469 er },
    . \n+001b6a50: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n+001b6a70: 7175 6f74 3b69 6d61 6765 2f2a 2671 756f quot;image/*&quo\n+001b6a80: 743b 3c2f 7370 616e 3e2c 2020 2069 6d61 t;, ima\n+001b6a90: 6765 5f68 616e 646c 6572 207d 2c20 3c2f ge_handler }, .
    { "tex\n+001b6ae0: 742f 6874 6d6c 2671 756f 743b 3c2f 7370 t/html", html_handle\n+001b6b00: 7220 7d2c 203c 2f64 6976 3e0a 3c64 6976 r },
    . \n+001b6b20: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n+001b6b40: 756f 743b 7465 7874 2f2a 2671 756f 743b uot;text/*"\n+001b6b50: 3c2f 7370 616e 3e2c 2020 2020 7465 7874 , text\n+001b6b60: 5f68 616e 646c 6572 207d 2c20 3c2f 6469 _handler }, .
    { "POST&\n+001b6bb0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n+001b6bc0: 2020 2067 656e 6572 6963 5f50 4f53 545f generic_POST_\n+001b6bd0: 6861 6e64 6c65 7220 7d2c 203c 2f64 6976 handler }, .
    { "PUT&qu\n+001b6c20: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+001b6c30: 2020 6765 6e65 7269 635f 5055 545f 6861 generic_PUT_ha\n+001b6c40: 6e64 6c65 7220 7d2c 203c 2f64 6976 3e0a ndler },
    .\n+001b6c50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "PATCH&qu\n+001b6c90: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+001b6ca0: 6765 6e65 7269 635f 5041 5443 485f 6861 generic_PATCH_ha\n+001b6cb0: 6e64 6c65 7220 7d2c 203c 2f64 6976 3e0a ndler },
    .\n+001b6cc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "DELETE&q\n+001b6d00: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n+001b6d10: 6765 6e65 7269 635f 4445 4c45 5445 5f68 generic_DELETE_h\n+001b6d20: 616e 646c 6572 207d 2c20 3c2f 6469 763e andler },
    \n+001b6d30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { NULL } .
    };
    .\n+001b6d70: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Note t\n+001b6d90: 6861 7420 3c63 6f64 653e 2a3c 2f63 6f64 hat * and - can be use\n+001b6dc0: 6420 6173 2077 696c 6463 6172 6473 2074 d as wildcards t\n+001b6dd0: 6f20 6d61 7463 6820 616e 7920 7465 7874 o match any text\n+001b6de0: 2061 6e64 2061 6e79 2063 6861 7261 6374 and any charact\n+001b6df0: 6572 2c20 7265 7370 6563 7469 7665 6c79 er, respectively\n+001b6e00: 2e20 4d65 6469 6120 7479 7065 7320 6d61 . Media types ma\n+001b6e10: 7920 6861 7665 206f 7074 696f 6e61 6c20 y have optional \n+001b6e20: 7061 7261 6d65 7465 7273 2061 6674 6572 parameters after\n+001b6e30: 203c 636f 6465 3e3b 3c2f 636f 6465 3e20 ; \n+001b6e40: 7375 6368 2061 7320 3c63 6f64 653e 6368 such as ch\n+001b6e50: 6172 7365 743c 2f63 6f64 653e 2061 6e64 arset and\n+001b6e60: 203c 636f 6465 3e62 6f75 6e64 6172 793c boundary<\n+001b6e70: 2f63 6f64 653e 2e20 5468 6573 6520 7061 /code>. These pa\n+001b6e80: 7261 6d65 7465 7273 2063 616e 2062 6520 rameters can be \n+001b6e90: 6d61 7463 6865 6420 6279 2074 6865 206d matched by the m\n+001b6ea0: 6564 6961 2074 7970 6520 7061 7474 6572 edia type patter\n+001b6eb0: 6e73 2069 6e20 7468 6520 7461 626c 652e ns in the table.\n+001b6ec0: 2050 6174 7465 726e 7320 7468 6174 2061 Patterns that a\n+001b6ed0: 7265 206d 6f72 6520 7370 6563 6966 6963 re more specific\n+001b6ee0: 206d 7573 7420 7072 6563 6564 6520 7061 must precede pa\n+001b6ef0: 7474 6572 6e73 2074 6861 7420 6172 6520 tterns that are \n+001b6f00: 6c65 7373 2073 7065 6369 6669 6320 696e less specific in\n+001b6f10: 2074 6865 2074 6162 6c65 2e20 466f 7220 the table. For \n+001b6f20: 6578 616d 706c 652c 203c 636f 6465 3e22 example, \"\n+001b6f30: 7465 7874 2f78 6d6c 3b2a 6368 6172 7365 text/xml;*charse\n+001b6f40: 743d 7574 662d 382a 223c 2f63 6f64 653e t=utf-8*\"\n+001b6f50: 206d 7573 7420 7072 6563 6564 6520 3c63 must precede \"text/xml\" which must\n+001b6f80: 2070 7265 6365 6465 203c 636f 6465 3e22 precede \"\n+001b6f90: 7465 7874 2f2a 223c 2f63 6f64 653e 2e20 text/*\". \n+001b6fa0: 4e6f 7465 2074 6861 7420 3c63 6f64 653e Note that \n+001b6fb0: 2274 6578 742f 786d 6c22 3c2f 636f 6465 \"text/xml\" also matches a\n+001b6fd0: 6e79 2070 6172 616d 6574 6572 7320 6f66 ny parameters of\n+001b6fe0: 2074 6865 206d 6564 6961 2074 7970 6520 the media type \n+001b6ff0: 6f66 2074 6865 206d 6573 7361 6765 2072 of the message r\n+001b7000: 6576 6569 7665 642c 2073 7563 6820 6173 eveived, such as\n+001b7010: 203c 636f 6465 3e22 7465 7874 2f78 6d6c \"text/xml\n+001b7020: 3b20 6368 6172 7365 743d 7574 662d 3822 ; charset=utf-8\"\n+001b7030: 3c2f 636f 6465 3e20 286f 6e6c 7920 7369 (only si\n+001b7040: 6e63 6520 6753 4f41 5020 7665 7273 696f nce gSOAP versio\n+001b7050: 6e20 322e 382e 3735 292e 3c2f 703e 0a3c n 2.8.75).

    .<\n+001b7060: 703e 5468 6520 6861 6e64 6c65 7273 2061 p>The handlers a\n+001b7070: 7265 2066 756e 6374 696f 6e73 2074 6861 re functions tha\n+001b7080: 7420 7769 6c6c 2062 6520 696e 766f 6b65 t will be invoke\n+001b7090: 6420 7768 656e 2061 2050 4f53 5465 6420 d when a POSTed \n+001b70a0: 7265 7175 6573 7420 6d65 7373 6167 6520 request message \n+001b70b0: 6d61 7463 6869 6e67 206d 6564 6961 2074 matching media t\n+001b70c0: 7970 6520 6973 2073 656e 7420 746f 2074 ype is sent to t\n+001b70d0: 6865 2073 6572 7665 722e 3c2f 703e 0a3c he server.

    .<\n+001b70e0: 703e 416e 2065 7861 6d70 6c65 2069 6d61 p>An example ima\n+001b70f0: 6765 2068 616e 646c 6572 2074 6861 7420 ge handler that \n+001b7100: 6368 6563 6b73 2074 6865 2073 7065 6369 checks the speci\n+001b7110: 6669 6320 696d 6167 6520 7479 7065 3a3c fic image type:<\n+001b7120: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    int\n+001b7170: 2069 6d61 6765 5f68 616e 646c 6572 283c image_handler(<\n+001b7180: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b7190: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001b7200: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    .{<\n+001b7220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+001b7250: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *buf;
    .\n+001b7290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    si\n+001b72c0: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e3b ze_t len;\n+001b72d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    // if necessar\n+001b7310: 792c 2063 6865 636b 2074 7970 6520 696e y, check type in\n+001b7320: 2073 6f61 702d 2667 743b 6874 7470 5f63 soap->http_c\n+001b7330: 6f6e 7465 6e74 203c 2f73 7061 6e3e 3c2f ontent .
    if (soap-&g\n+001b73b0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;http_\n+001b7400: 636f 6e74 656e 743c 2f61 3e20 2661 6d70 content &\n+001b7410: 3b26 616d 703b 2021 3c61 2063 6c61 7373 ;& !soap_t\n+001b7470: 6167 5f63 6d70 3c2f 613e 283c 6120 636c ag_cmp(soap-><\n+001b74b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b74c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b74d0: 6874 6d6c 2361 6535 6539 3837 3333 6134 html#ae5e98733a4\n+001b74e0: 3334 3962 3565 3134 3636 6139 6530 6363 349b5e1466a9e0cc\n+001b74f0: 6332 3263 3131 223e 6874 7470 5f63 6f6e c22c11\">http_con\n+001b7500: 7465 6e74 3c2f 613e 2c20 3c73 7061 6e20 tent, "imag\n+001b7530: 652f 6769 6626 7175 6f74 3b3c 2f73 7061 e/gif")
    .
    \n+001b7560: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+001b7580: 6e3c 2f73 7061 6e3e 2034 3034 3b20 3c73 n 404; // HTTP erro\n+001b75b0: 7220 3430 3420 3c2f 7370 616e 3e3c 2f64 r 404 .
    if ((buf\n+001b75e0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_http_get\n+001b7640: 5f62 6f64 793c 2f61 3e28 3c61 2063 6c61 _body(soap, &\n+001b7680: 6c65 6e29 2920 3d3d 204e 554c 4c29 3c2f len)) == NULL).
    return soap->\n+001b7750: 6572 726f 723c 2f61 3e3b 203c 2f64 6976 error; .
    // .\n+001b7790: 2e2e 206e 6f77 2070 726f 6365 7373 2069 .. now process i\n+001b77a0: 6d61 6765 2069 6e20 6275 6620 3c2f 7370 mage in buf
    .
    // reply wit\n+001b77f0: 6820 656d 7074 7920 4854 5450 2032 3030 h empty HTTP 200\n+001b7800: 204f 4b20 7265 7370 6f6e 7365 3a20 3c2f OK response:
    . \n+001b7830: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001b7850: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soap_sen\n+001b78b0: 645f 656d 7074 795f 7265 7370 6f6e 7365 d_empty_response\n+001b78c0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001b78f0: 3c2f 613e 2c20 3230 3029 3b20 3c2f 6469 , 200); .
    }
    .<\n+001b7970: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+001b7980: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_tag\n+001b79d0: 5f63 6d70 3c2f 613e 3c2f 6469 763e 3c64 _cmp
    int soap_tag_c\n+001b7a00: 6d70 2863 6f6e 7374 2063 6861 7220 2a73 mp(const char *s\n+001b7a10: 7472 696e 672c 2063 6f6e 7374 2063 6861 tring, const cha\n+001b7a20: 7220 2a70 6174 7465 726e 293c 2f64 6976 r *pattern)
    Compare stri\n+001b7a50: 6e67 2074 6f20 6120 7061 7474 6572 6e2e ng to a pattern.\n+001b7a60: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The above\n+001b7a90: 2065 7861 6d70 6c65 2072 6574 7572 6e73 example returns\n+001b7aa0: 2048 5454 5020 4f4b 2e20 4966 2063 6f6e HTTP OK. If con\n+001b7ab0: 7465 6e74 2069 7320 7375 7070 6f73 6564 tent is supposed\n+001b7ac0: 2074 6f20 6265 2072 6574 7572 6e65 642c to be returned,\n+001b7ad0: 2074 6865 6e20 7573 653a 3c2f 703e 0a3c then use:

    .<\n+001b7ae0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001b7af0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+001b7b20: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n+001b7bf0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    ... <\n+001b7c10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001b7c20: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    so\n+001b7c70: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->http_content\n+001b7cd0: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "image/j\n+001b7d00: 7065 6726 7175 6f74 3b3c 2f73 7061 6e3e peg"\n+001b7d10: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // a jpe\n+001b7d30: 6720 696d 6167 6520 746f 2072 6574 7572 g image to retur\n+001b7d40: 6e20 6261 636b 203c 2f73 7061 6e3e 3c2f n back .
    if (soap\n+001b7de0: 5f72 6573 706f 6e73 653c 2f61 3e28 3c61 _response(soap, <\n+001b7e20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b7e30: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b7e40: 705f 5f69 6f2e 6874 6d6c 2367 6130 3562 p__io.html#ga05b\n+001b7e50: 6539 3933 3433 6635 3536 6665 3730 3934 e99343f556fe7094\n+001b7e60: 3031 3435 6538 3734 6364 6239 3922 3e53 0145e874cdb99\">S\n+001b7e70: 4f41 505f 4649 4c45 3c2f 613e 2929 203c OAP_FILE)) <\n+001b7e80: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001b7e90: 656e 7422 3e2f 2f20 534f 4150 5f46 494c ent\">// SOAP_FIL\n+001b7ea0: 4520 7365 7473 2063 7573 746f 6d20 6874 E sets custom ht\n+001b7eb0: 7470 2063 6f6e 7465 6e74 203c 2f73 7061 tp content
    .
    || <\n+001b7ee0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b7ef0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b7f00: 705f 5f69 6f2e 6874 6d6c 2367 6162 3362 p__io.html#gab3b\n+001b7f10: 3162 6136 3331 6130 6334 3764 3637 6665 1ba631a0c47d67fe\n+001b7f20: 3331 3437 3439 3832 6264 6538 3622 3e73 31474982bde86\">s\n+001b7f30: 6f61 705f 7365 6e64 5f72 6177 3c2f 613e oap_send_raw\n+001b7f40: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b7f70: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , buf, len) /\n+001b7fe0: 2f20 7365 6e64 2069 6d61 6765 203c 2f73 / send image
    ..\n+001b8180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ret\n+001b81b0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n+001b8210: 4f41 505f 4f4b 3c2f 613e 3b3c 2f64 6976 OAP_OK;.

    For \n+001b8240: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati\n+001b8250: 6f6e 7320 746f 2075 7365 2048 5454 5020 ons to use HTTP \n+001b8260: 504f 5354 2c20 7573 6520 7468 6520 3c63 POST, use the soap_POST\n+001b82f0: 3c2f 613e 3c2f 636f 6465 3e20 6f70 6572 oper\n+001b8300: 6174 696f 6e3a 3c2f 703e 0a3c 6469 7620 ation:

    .
    struct \n+001b8350: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+001b8380: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001b83b0: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n+001b8410: 6f61 705f 6e65 773c 2f61 3e28 293b 3c2f oap_new();.
    ... //
    \n+001b8460: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    cha\n+001b8490: 723c 2f73 7061 6e3e 202a 3c61 2063 6c61 r *buf; // holds the H\n+001b8510: 5454 5020 7265 7175 6573 742f 7265 7370 TTP request/resp\n+001b8520: 6f6e 7365 2062 6f64 7920 6461 7461 203c onse body data <\n+001b8530: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001b8550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b8560: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+001b8570: 2f73 7061 6e3e 206c 656e 3b20 3c73 7061 /span> len; // length of d\n+001b85a0: 6174 6120 3c2f 7370 616e 3e3c 2f64 6976 ata .
    ... //\n+001b85e0: 2070 6f70 756c 6174 6520 6275 6620 616e populate buf an\n+001b85f0: 6420 6c65 6e20 7769 7468 206d 6573 7361 d len with messa\n+001b8600: 6765 2074 6f20 7365 6e64 3c2f 7370 616e ge to send
    .
    if (<\n+001b8650: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b8660: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b8670: 705f 5f69 6f2e 6874 6d6c 2367 6166 3530 p__io.html#gaf50\n+001b8680: 3232 3436 3631 3363 6236 6434 6561 3132 2246613cb6d4ea12\n+001b8690: 3039 3635 3036 3564 3863 3062 3222 3e73 0965065d8c0b2\">s\n+001b86a0: 6f61 705f 504f 5354 3c2f 613e 283c 6120 oap_POST(soap, "\n+001b8700: 5552 4c26 7175 6f74 3b3c 2f73 7061 6e3e URL"\n+001b8710: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+001b8730: 756f 743b 534f 4150 2061 6374 696f 6e20 uot;SOAP action \n+001b8740: 6f72 204e 554c 4c26 7175 6f74 3b3c 2f73 or NULL", "media ty\n+001b8780: 7065 2671 756f 743b 3c2f 7370 616e 3e29 pe")\n+001b8790: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    || so\n+001b8800: 6170 5f73 656e 645f 7261 773c 2f61 3e28 ap_send_raw(\n+001b8810: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001b8840: 203c 6120 636c 6173 733d 2263 6f64 6522 buf, len);
    .\n+001b88a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n+001b8950: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... //\n+001b8980: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    \n+001b89c0: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap_\n+001b8a20: 6265 6769 6e5f 7265 6376 3c2f 613e 2826 begin_recv(&\n+001b8a30: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+001b8a60: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    . |\n+001b8a80: 7c20 283c 6120 636c 6173 733d 2263 6f64 | (buf<\n+001b8ad0: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_http_\n+001b8b30: 6765 745f 626f 6479 3c2f 613e 283c 6120 get_body(soap, &a\n+001b8b70: 6d70 3b6c 656e 2929 203d 3d20 4e55 4c4c mp;len)) == NULL\n+001b8b80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .. \n+001b8c50: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+001b8c70: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    \n+001b8c80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // ... \n+001b8cb0: 7573 6520 6275 665b 302e 2e6c 656e 2d31 use buf[0..len-1\n+001b8cc0: 5d20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ]
    .\n+001b8cd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .\n+001b8d80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .soap_free\n+001b8ea0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b8ed0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    ..soap_POST
    HTTP POST conte\n+001b9170: 6e74 2074 6f20 7365 7276 6572 2e3c 2f64 nt to server.
    .
    \n+001b9190: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Thi\n+001bae00: 7320 636f 6465 2073 7570 706f 7274 7320 s code supports \n+001bae10: 626f 7468 2062 6173 6963 2061 6e64 2064 both basic and d\n+001bae20: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica\n+001bae30: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 6865 tion.

    .

    The\n+001bae40: 2073 6572 7665 7220 6361 6e20 6368 616c server can chal\n+001bae50: 6c65 6e67 6520 6120 636c 6965 6e74 2075 lenge a client u\n+001bae60: 7369 6e67 2048 5454 5020 636f 6465 2034 sing HTTP code 4\n+001bae70: 3031 2e20 5769 7468 2074 6865 2070 6c75 01. With the plu\n+001bae80: 6769 6e2c 2048 5454 5020 6469 6765 7374 gin, HTTP digest\n+001bae90: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001baea0: 6368 616c 6c65 6e67 6573 2061 7265 2073 challenges are s\n+001baeb0: 656e 642e 2057 6974 686f 7574 2074 6865 end. Without the\n+001baec0: 2070 6c75 6769 6e2c 2062 6173 6963 2061 plugin, basic a\n+001baed0: 7574 6865 6e74 6963 6174 696f 6e20 6368 uthentication ch\n+001baee0: 616c 6c65 6e67 6573 2061 7265 2073 656e allenges are sen\n+001baef0: 642e 3c2f 703e 0a3c 703e 4561 6368 2073 d.

    .

    Each s\n+001baf00: 6572 7665 7220 6d65 7468 6f64 2063 616e erver method can\n+001baf10: 2069 6d70 6c65 6d65 6e74 2061 7574 6865 implement authe\n+001baf20: 6e74 6963 6174 696f 6e20 6173 2064 6573 ntication as des\n+001baf30: 6972 6564 2061 6e64 206d 6179 2065 6e66 ired and may enf\n+001baf40: 6f72 6365 2064 6967 6573 7420 6175 7468 orce digest auth\n+001baf50: 656e 7469 6361 7469 6f6e 206f 7220 6d61 entication or ma\n+001baf60: 7920 616c 736f 2061 6363 6570 7420 6261 y also accept ba\n+001baf70: 7369 6320 6175 7468 656e 7469 6361 7469 sic authenticati\n+001baf80: 6f6e 2072 6573 706f 6e73 6573 2e20 546f on responses. To\n+001baf90: 2076 6572 6966 7920 6469 6765 7374 2061 verify digest a\n+001bafa0: 7574 6865 6e74 6963 6174 696f 6e20 7265 uthentication re\n+001bafb0: 7370 6f6e 7365 732c 2074 6865 2073 6572 sponses, the ser\n+001bafc0: 7665 7220 7368 6f75 6c64 2063 6f6d 7075 ver should compu\n+001bafd0: 7465 2061 6e64 2063 6f6d 7061 7265 2074 te and compare t\n+001bafe0: 6865 2063 6865 636b 7375 6d73 2075 7369 he checksums usi\n+001baff0: 6e67 2074 6865 2070 6c75 6769 6e27 7320 ng the plugin's \n+001bb000: 3c63 6f64 653e 6874 7470 5f64 615f 7665 http_da_ve\n+001bb010: 7269 6679 5f70 6f73 743c 2f63 6f64 653e rify_post\n+001bb020: 2066 756e 6374 696f 6e20 666f 7220 4854 function for HT\n+001bb030: 5450 2050 4f53 5420 7265 7175 6573 7473 TP POST requests\n+001bb040: 2028 616e 6420 3c63 6f64 653e 6874 7470 (and http\n+001bb050: 5f64 615f 7665 7269 6679 5f67 6574 3c2f _da_verify_get for HTTP G\n+001bb070: 4554 2072 6571 7565 7374 7320 7769 7468 ET requests with\n+001bb080: 2074 6865 2048 5454 5020 4745 5420 706c the HTTP GET pl\n+001bb090: 7567 696e 2920 6173 2066 6f6c 6c6f 7773 ugin) as follows\n+001bb0a0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ\n+001bb0f0: 6520 2671 756f 743b 6874 7470 6461 2e68 e "httpda.h\n+001bb100: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    .<\n+001bb130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bb140: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main().
    {
    . \n+001bb1a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct
    soap\n+001bb1f0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001bb220: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+001bb280: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();..
    \n+001bb390: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n+001bb3a0: 5245 293b 203c 7370 616e 2063 6c61 7373 RE); // fa\n+001bb3c0: 696c 6564 2074 6f20 7265 6769 7374 6572 iled to register\n+001bb3d0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+001bb3e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bb3f0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n+001bb410: 7573 6520 736f 6170 5f62 696e 6420 616e use soap_bind an\n+001bb420: 6420 736f 6170 5f61 6363 6570 7420 696e d soap_accept in\n+001bb430: 2061 2028 6d75 6c74 692d 7468 7265 6164 a (multi-thread\n+001bb440: 6564 2920 7365 7276 6963 6520 6c6f 6f70 ed) service loop\n+001bb450: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001bb470: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_serv\n+001bb4f0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n+001bb520: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
    .\n+001bb540: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n+001bb5a0: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std\n+001bb5e0: 6572 7229 3b3c 2f64 6976 3e0a 3c64 6976 err);
    . \n+001bb600: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    soap_destroy<\n+001bb6a0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001bb6d0: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    . \n+001bb6f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    soap_free\n+001bb800: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001bb830: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    }.
    .<\n+001bb880: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bb890: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__webmetho\n+001bb8b0: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa\n+001bb900: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001bb930: 6170 3c2f 613e 2c20 2e2e 2e29 203c 2f64 ap, ...) .
    {
    .\n+001bb970: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so\n+001bb9c0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->userid &\n+001bba20: 616d 703b 2661 6d70 3b20 3c61 2063 6c61 amp;& soap->passwd) // clie\n+001bbad0: 6e74 2075 7365 6420 6261 7369 6320 6175 nt used basic au\n+001bbae0: 7468 656e 7469 6361 7469 6f6e 203c 2f73 thentication
    .
    {\n+001bbb10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    // may decide\n+001bbb50: 206e 6f74 2074 6f20 6861 6e64 6c65 2c20 not to handle, \n+001bbb60: 6275 7420 6966 206f 6b20 7468 656e 2067 but if ok then g\n+001bbb70: 6f20 6168 6561 6420 616e 6420 636f 6d70 o ahead and comp\n+001bbb80: 6172 6520 696e 666f 3a20 3c2f 7370 616e are info:
    .
    if (!strcmp(soap-><\n+001bbc10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bbc20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001bbc30: 6874 6d6c 2361 3265 6465 3032 3039 3564 html#a2ede02095d\n+001bbc40: 3938 3934 3266 3463 3232 3066 6431 3762 98942f4c220fd17b\n+001bbc50: 3439 3537 3033 223e 7573 6572 6964 3c2f 495703\">userid, use\n+001bbcb0: 7269 643c 2f61 3e29 2026 616d 703b 2661 rid) &&a\n+001bbcc0: 6d70 3b20 2173 7472 636d 7028 3c61 2063 mp; !strcmp(soap->\n+001bbd00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 passwd<\n+001bbd50: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, pa\n+001bbda0: 7373 7764 3c2f 613e 2929 203c 2f64 6976 sswd)) .
    {
    .\n+001bbdd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // handle requ\n+001bbe10: 6573 743c 2f73 7061 6e3e 3c2f 6469 763e est
    \n+001bbe20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return\n+001bbe60: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n+001bbec0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }\n+001bbee0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    else <\n+001bbf40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bbf50: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n+001bbf90: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->authrealm &\n+001bbff0: 616d 703b 2661 6d70 3b20 3c61 2063 6c61 amp;& soap->userid) // Dige\n+001bc0a0: 7374 2061 7574 6865 6e74 6963 6174 696f st authenticatio\n+001bc0b0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n+001bc0c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+001bc0f0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 passw\n+001bc140: 643c 2f61 3e20 3d20 2e2e 2e3b 203c 7370 d = ...; // database l\n+001bc170: 6f6f 6b75 7020 6f6e 2075 7365 7269 6420 ookup on userid \n+001bc180: 616e 6420 6175 7468 7265 616c 6d20 746f and authrealm to\n+001bc190: 2066 696e 6420 7061 7373 7764 203c 2f73 find passwd
    .
    \n+001bc1c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!strcmp(soap-&g\n+001bc220: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;authr\n+001bc270: 6561 6c6d 3c2f 613e 2c20 3c61 2063 6c61 ealm, authrealm\n+001bc2d0: 2920 2661 6d70 3b26 616d 703b 2021 7374 ) && !st\n+001bc2e0: 7263 6d70 283c 6120 636c 6173 733d 2263 rcmp(soap\n+001bc310: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->userid, userid))
    .
    \n+001bc3e0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n+001bc400: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!http_da_v\n+001bc430: 6572 6966 795f 706f 7374 283c 6120 636c erify_post(soap, passwd)\n+001bc4c0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    \n+001bc4e0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n+001bc500: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+001bc520: 6861 6e64 6c65 2072 6571 7565 7374 3c2f handle request
    . \n+001bc550: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+001bc570: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; <\n+001bc5e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } \n+001bc600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } <\n+001bc620: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } ..
    <\n+001bc790: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bc7a0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001bc7b0: 2f73 7061 6e3e 2034 3031 3b20 3c73 7061 /span> 401; // Not authori\n+001bc7e0: 7a65 642c 2063 6861 6c6c 656e 6765 2064 zed, challenge d\n+001bc7f0: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica\n+001bc800: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    }
    .

    For more \n+001bc850: 6465 7461 696c 732c 2069 6e63 6c75 6469 details, includi\n+001bc860: 6e67 2068 6f77 2074 6f20 636f 6e66 6967 ng how to config\n+001bc870: 7572 6520 4854 5450 2044 6967 6573 7420 ure HTTP Digest \n+001bc880: 6175 7468 656e 7469 6361 7469 6f6e 2066 authentication f\n+001bc890: 6f72 2070 726f 7869 6573 2c20 7365 6520 or proxies, see \n+001bc8a0: 7468 6520 3c61 2068 7265 663d 222e 2e2f the HTTP\n+001bc8d0: 2064 6967 6573 7420 6175 7468 656e 7469 digest authenti\n+001bc8e0: 6361 7469 6f6e 2070 6c75 6769 6e3c 2f61 cation plugin documentation.\n+001bc900: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+001bc920: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+001bc930: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+001bc940: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001bc950: 2069 643d 2273 6573 7369 6f6e 7370 6c75 id=\"sessionsplu\n+001bc960: 6769 6e22 3e3c 2f61 3e0a 5468 6520 4854 gin\">.The HT\n+001bc970: 5450 2073 6573 7369 6f6e 7320 706c 7567 TP sessions plug\n+001bc980: 696e 3c2f 6833 3e0a 3c70 3e54 6865 2070 in

    .

    The p\n+001bc990: 6c75 6769 6e20 636f 6465 2069 7320 6c6f lugin code is lo\n+001bc9a0: 6361 7465 6420 696e 2074 6865 203c 656d cated in the gsoap/plu\n+001bc9c0: 6769 6e3c 2f63 6f64 653e 3c2f 656d 3e20 gin \n+001bc9d0: 6469 7265 6374 6f72 7920 636f 6e74 6169 directory contai\n+001bc9e0: 6e69 6e67 203c 656d 3e3c 636f 6465 3e73 ning s\n+001bc9f0: 6573 7369 6f6e 732e 683c 2f63 6f64 653e essions.h\n+001bca00: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and sessions.c.

    .\n+001bca30: 3c70 3e46 6f72 206d 6f72 6520 6465 7461

    For more deta\n+001bca40: 696c 732c 2073 6565 2074 6865 203c 6120 ils, see the HTTP sessi\n+001bca80: 6f6e 7320 706c 7567 696e 3c2f 613e 2064 ons plugin d\n+001bca90: 6f63 756d 656e 7461 7469 6f6e 2e3c 2f70 ocumentation..

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

    .

    \n+001bcb00: 3c2f 613e 0a54 6865 2041 7061 6368 6520 .The Apache \n+001bcb10: 6d6f 6475 6c65 2070 6c75 6769 6e3c 2f68 module plugin.

    The plugin\n+001bcb30: 2063 6f64 6520 6973 206c 6f63 6174 6564 code is located\n+001bcb40: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/mod_gsoa\n+001bcb60: 702f 6d6f 645f 6773 6f61 702d 302e 392f p/mod_gsoap-0.9/\n+001bcb70: 6170 6163 6865 5f32 303c 2f63 6f64 653e apache_20\n+001bcb80: 3c2f 656d 3e20 6469 7265 6374 6f72 792e directory.\n+001bcb90: 3c2f 703e 0a3c 703e 466f 7220 6d6f 7265

    .

    For more\n+001bcba0: 2064 6574 6169 6c73 2c20 7365 6520 7468 details, see th\n+001bcbb0: 6520 3c61 2068 7265 663d 222e 2e2f 2e2e e Apache \n+001bcbe0: 6d6f 6475 6c65 3c2f 613e 2064 6f63 756d module docum\n+001bcbf0: 656e 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 entation.

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

    .\n+001bcc60: 5468 6520 4953 4150 4920 6578 7465 6e73 The ISAPI extens\n+001bcc70: 696f 6e20 706c 7567 696e 3c2f 6833 3e0a ion plugin

    .\n+001bcc80: 3c70 3e54 6865 2070 6c75 6769 6e20 636f

    The plugin co\n+001bcc90: 6465 2069 7320 6c6f 6361 7465 6420 696e de is located in\n+001bcca0: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n+001bccb0: 736f 6170 2f6d 6f64 5f67 736f 6170 2f67 soap/mod_gsoap/g\n+001bccc0: 736f 6170 5f77 696e 2f69 7361 7069 3c2f soap_win/isapi direc\n+001bcce0: 746f 7279 2e3c 2f70 3e0a 3c70 3e46 6f72 tory.

    .

    For\n+001bccf0: 206d 6f72 6520 6465 7461 696c 732c 2073 more details, s\n+001bcd00: 6565 2074 6865 203c 6120 6872 6566 3d22 ee the ISA\n+001bcd30: 5049 2065 7874 656e 7369 6f6e 3c2f 613e PI extension\n+001bcd40: 2064 6f63 756d 656e 7461 7469 6f6e 2e3c documentation.<\n+001bcd50: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    \n+001bcdb0: 3c2f 613e 0a54 6865 2043 5552 4c20 706c .The CURL pl\n+001bcdc0: 7567 696e 3c2f 6833 3e0a 3c70 3e54 6865 ugin

    .

    The\n+001bcdd0: 2070 6c75 6769 6e20 636f 6465 2069 7320 plugin code is \n+001bcde0: 6c6f 6361 7465 6420 696e 2074 6865 203c located in the <\n+001bcdf0: 656d 3e3c 636f 6465 3e67 736f 6170 2f70 em>gsoap/p\n+001bce00: 6c75 6769 6e3c 2f63 6f64 653e 3c2f 656d lugin directory cont\n+001bce20: 6169 6e69 6e67 203c 656d 3e3c 636f 6465 aining curlapi.h and <\n+001bce50: 636f 6465 3e63 7572 6c61 7069 2e63 3c2f code>curlapi.c.

    .\n+001bce70: 3c70 3e46 6f72 206d 6f72 6520 6465 7461

    For more deta\n+001bce80: 696c 732c 2073 6565 2074 6865 203c 6120 ils, see the CURL plugin documentation.\n+001bced0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+001bcef0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+001bcf00: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+001bcf10: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001bcf20: 2069 643d 2277 696e 696e 6574 706c 7567 id=\"wininetplug\n+001bcf30: 696e 223e 3c2f 613e 0a54 6865 2057 696e in\">.The Win\n+001bcf40: 496e 6574 2070 6c75 6769 6e3c 2f68 333e Inet plugin

    \n+001bcf50: 0a3c 703e 5468 6520 706c 7567 696e 2063 .

    The plugin c\n+001bcf60: 6f64 6520 6973 206c 6f63 6174 6564 2069 ode is located i\n+001bcf70: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n+001bcf80: 6773 6f61 702f 6d6f 645f 6773 6f61 702f gsoap/mod_gsoap/\n+001bcf90: 6773 6f61 705f 7769 6e2f 7769 6e69 6e65 gsoap_win/winine\n+001bcfa0: 743c 2f63 6f64 653e 3c2f 656d 3e20 6469 t di\n+001bcfb0: 7265 6374 6f72 792e 3c2f 703e 0a3c 703e rectory.

    .

    \n+001bcfc0: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details\n+001bcfd0: 2c20 7365 6520 7468 6520 3c61 2068 7265 , see the WinInet plugin\n+001bd010: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n+001bd020: 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 on.

    .

    .... \n+001bd030: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+001bd040: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+001bd050: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..The WS-A\n+001bd090: 6464 7265 7373 696e 6720 706c 7567 696e ddressing plugin\n+001bd0a0: 3c2f 6833 3e0a 3c70 3e54 6865 2070 6c75

    .

    The plu\n+001bd0b0: 6769 6e20 636f 6465 2069 7320 6c6f 6361 gin code is loca\n+001bd0c0: 7465 6420 696e 2074 6865 203c 656d 3e3c ted in the <\n+001bd0d0: 636f 6465 3e67 736f 6170 2f70 6c75 6769 code>gsoap/plugi\n+001bd0e0: 6e3c 2f63 6f64 653e 3c2f 656d 3e20 6469 n di\n+001bd0f0: 7265 6374 6f72 7920 636f 6e74 6169 6e69 rectory containi\n+001bd100: 6e67 203c 656d 3e3c 636f 6465 3e77 7361 ng wsa\n+001bd110: 6170 692e 683c 2f63 6f64 653e 3c2f 656d api.h and \n+001bd130: 7773 6161 7069 2e63 3c2f 636f 6465 3e3c wsaapi.c<\n+001bd140: 2f65 6d3e 2028 746f 2062 6520 7573 6564 /em> (to be used\n+001bd150: 2069 6e20 4320 616e 6420 432b 2b29 2e3c in C and C++).<\n+001bd160: 2f70 3e0a 3c70 3e54 6f20 656e 6162 6c65 /p>.

    To enable\n+001bd170: 2057 532d 4164 6472 6573 7369 6e67 2032 WS-Addressing 2\n+001bd180: 3030 3520 2861 6e64 2073 7570 706f 7274 005 (and support\n+001bd190: 2066 6f72 2038 2f32 3030 3429 2c20 7468 for 8/2004), th\n+001bd1a0: 6520 7365 7276 6963 6520 6465 6669 6e69 e service defini\n+001bd1b0: 7469 6f6e 7320 6865 6164 6572 2066 696c tions header fil\n+001bd1c0: 6520 666f 7220 736f 6170 6370 7032 2073 e for soapcpp2 s\n+001bd1d0: 686f 756c 6420 696e 636c 7564 6520 7468 hould include th\n+001bd1e0: 6520 666f 6c6c 6f77 696e 6720 696d 706f e following impo\n+001bd1f0: 7274 733a 3c2f 703e 0a3c 6469 7620 636c rts:

    .
    <\n+001bd210: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bd220: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp\n+001bd240: 6f72 7420 2671 756f 743b 696d 706f 7274 ort "import\n+001bd250: 2f77 7361 352e 6826 7175 6f74 3b3c 2f73 /wsa5.h"
    .

    This imp\n+001bd670: 6f72 7473 2074 6865 2053 4f41 5020 6865 orts the SOAP he\n+001bd680: 6164 6572 2065 6c65 6d65 6e74 7320 7265 ader elements re\n+001bd690: 7175 6972 6564 2062 7920 5753 2d52 656c quired by WS-Rel\n+001bd6a0: 6961 626c 654d 6573 7361 6769 6e67 2e3c iableMessaging.<\n+001bd6b0: 2f70 3e0a 3c70 3e46 6f72 206d 6f72 6520 /p>.

    For more \n+001bd6c0: 6465 7461 696c 732c 2073 6565 2074 6865 details, see the\n+001bd6d0: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f WS-Reliab\n+001bd700: 6c65 4d65 7373 6167 696e 6720 706c 7567 leMessaging plug\n+001bd710: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta\n+001bd720: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

    .

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

    .\n+001bd760: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .The W\n+001bd790: 532d 5365 6375 7269 7479 2070 6c75 6769 S-Security plugi\n+001bd7a0: 6e3c 2f68 333e 0a3c 703e 5468 6520 706c n

    .

    The pl\n+001bd7b0: 7567 696e 2063 6f64 6520 6973 206c 6f63 ugin code is loc\n+001bd7c0: 6174 6564 2069 6e20 7468 6520 3c65 6d3e ated in the \n+001bd7d0: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug\n+001bd7e0: 696e 3c2f 636f 6465 3e3c 2f65 6d3e 2064 in d\n+001bd7f0: 6972 6563 746f 7279 2063 6f6e 7461 696e irectory contain\n+001bd800: 696e 6720 3c65 6d3e 3c63 6f64 653e 7773 ing ws\n+001bd810: 7365 6170 692e 683c 2f63 6f64 653e 3c2f seapi.h and wsseapi.c (to be u\n+001bd850: 7365 6420 696e 2043 2061 6e64 2043 2b2b sed in C and C++\n+001bd860: 292e 3c2f 703e 0a3c 703e 416c 736f 206e ).

    .

    Also n\n+001bd870: 6565 6465 6420 6172 653a 203c 656d 3e3c eeded are: <\n+001bd880: 636f 6465 3e73 6d64 6576 702e 683c 2f63 code>smdevp.h and smdevp.c\n+001bd8b0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 6f72 for\n+001bd8c0: 2073 7472 6561 6d69 6e67 2058 4d4c 2073 streaming XML s\n+001bd8d0: 6967 6e61 7475 7265 2061 6e64 206d 6573 ignature and mes\n+001bd8e0: 7361 6765 2064 6967 6573 7420 656e 6769 sage digest engi\n+001bd8f0: 6e65 2c20 3c65 6d3e 3c63 6f64 653e 6d65 ne, me\n+001bd900: 6365 7670 2e68 3c2f 636f 6465 3e3c 2f65 cevp.h and mecevp.c\n+001bd930: 3c2f 656d 3e20 666f 7220 7468 6520 7374 for the st\n+001bd940: 7265 616d 696e 6720 584d 4c20 656e 6372 reaming XML encr\n+001bd950: 7970 7469 6f6e 2065 6e67 696e 652c 203c yption engine, <\n+001bd960: 656d 3e3c 636f 6465 3e74 6872 6561 6473 em>threads\n+001bd970: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a\n+001bd980: 6e64 203c 656d 3e3c 636f 6465 3e74 6872 nd thr\n+001bd990: 6561 6473 2e63 3c2f 636f 6465 3e3c 2f65 eads.c for multi-thr\n+001bd9b0: 6561 6469 6e67 2061 6e64 206c 6f63 6b69 eading and locki\n+001bd9c0: 6e67 2073 7570 706f 7274 2e3c 2f70 3e0a ng support.

    .\n+001bd9d0: 3c70 3e54 6f20 656e 6162 6c65 2057 532d

    To enable WS-\n+001bd9e0: 5365 6375 7269 7479 2c20 7468 6520 7365 Security, the se\n+001bd9f0: 7276 6963 6520 6465 6669 6e69 7469 6f6e rvice definition\n+001bda00: 7320 6865 6164 6572 2066 696c 6520 666f s header file fo\n+001bda10: 7220 736f 6170 6370 7032 2073 686f 756c r soapcpp2 shoul\n+001bda20: 6420 696e 636c 7564 6520 7468 6520 666f d include the fo\n+001bda30: 6c6c 6f77 696e 6720 696d 706f 7274 733a llowing imports:\n+001bda40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #import \n+001bda90: 2671 756f 743b 696d 706f 7274 2f77 7373 "import/wss\n+001bdaa0: 652e 6826 7175 6f74 3b3c 2f73 7061 6e3e e.h"\n+001bdab0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    This imports th\n+001bdae0: 6520 534f 4150 2068 6561 6465 7220 656c e SOAP header el\n+001bdaf0: 656d 656e 7473 2072 6571 7569 7265 6420 ements required \n+001bdb00: 6279 2057 532d 5365 6375 7269 7479 2e3c by WS-Security.<\n+001bdb10: 2f70 3e0a 3c70 3e46 6f72 206d 6f72 6520 /p>.

    For more \n+001bdb20: 6465 7461 696c 732c 2073 6565 2074 6865 details, see the\n+001bdb30: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f WS-Security\n+001bdb60: 2070 6c75 6769 6e3c 2f61 3e20 646f 6375 plugin docu\n+001bdb70: 6d65 6e74 6174 696f 6e2e 3c2f 703e 0a3c mentation.

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

    .

    .\n+001bdbe0: 5468 6520 5753 2d44 6973 636f 7665 7279 The WS-Discovery\n+001bdbf0: 2070 6c75 6769 6e3c 2f68 333e 0a3c 703e plugin

    .

    \n+001bdc00: 4261 7369 6361 6c6c 792c 2074 6f20 6164 Basically, to ad\n+001bdc10: 6420 5753 2d44 6973 636f 7665 7279 2073 d WS-Discovery s\n+001bdc20: 7570 706f 7274 2074 6865 2066 6f6c 6c6f upport the follo\n+001bdc30: 7769 6e67 2065 7665 6e74 2068 616e 646c wing event handl\n+001bdc40: 6572 7320 6d75 7374 2062 6520 6465 6669 ers must be defi\n+001bdc50: 6e65 6420 616e 6420 6c69 6e6b 6564 3a3c ned and linked:<\n+001bdc60: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    void wsdd_event_Hel\n+001bdcc0: 6c6f 283c 7370 616e 2063 6c61 7373 3d22 lo(struct<\n+001bdce0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001bdd10: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001bdd40: 6f61 703c 2f61 3e2c 203c 2f64 6976 3e0a oap,
    .\n+001bdd50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    unsi\n+001bdd80: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int\n+001bddb0: 2049 6e73 7461 6e63 6549 642c 203c 2f64 InstanceId, .
    cons\n+001bddf0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bde20: 5365 7175 656e 6365 4964 2c20 3c2f 6469 SequenceId, .
    u\n+001bde60: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned <\n+001bde70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bde80: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int MessageNumbe\n+001bdea0: 722c 203c 2f64 6976 3e0a 3c64 6976 2063 r,
    .
    const <\n+001bdee0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bdef0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *MessageID,\n+001bdf10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001bdf40: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *RelatesTo, <\n+001bdf80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001bdfb0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bdfe0: 202a 456e 6470 6f69 6e74 5265 6665 7265 *EndpointRefere\n+001bdff0: 6e63 652c 203c 2f64 6976 3e0a 3c64 6976 nce,
    .const\n+001be030: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001be050: 2f73 7061 6e3e 202a 5479 7065 732c 203c /span> *Types, <\n+001be060: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001be090: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001be0c0: 202a 5363 6f70 6573 2c20 3c2f 6469 763e *Scopes,
    \n+001be0d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n+001be120: 6368 6172 3c2f 7370 616e 3e20 2a4d 6174 char *Mat\n+001be130: 6368 4279 2c20 3c2f 6469 763e 0a3c 6469 chBy,
    .<\n+001be150: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be160: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001be190: 3c2f 7370 616e 3e20 2a58 4164 6472 732c *XAddrs,\n+001be1a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    unsigned in\n+001be200: 743c 2f73 7061 6e3e 204d 6574 6164 6174 t Metadat\n+001be210: 6156 6572 7369 6f6e 293c 2f64 6976 3e0a aVersion)
    .\n+001be220: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    <\n+001be260: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be270: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void wsdd_event_\n+001be290: 4279 6528 3c73 7061 6e20 636c 6173 733d Bye(struct\n+001be2b0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001be2e0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001be310: 736f 6170 3c2f 613e 2c20 3c2f 6469 763e soap,
    \n+001be320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    uns\n+001be350: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int InstanceId, .
    con\n+001be3c0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001be3f0: 2a53 6571 7565 6e63 6549 642c 203c 2f64 *SequenceId, .
    \n+001be430: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n+001be440: 3c73 7061 6e20 636c 6173 733d 226b 6579 int MessageNumb\n+001be470: 6572 2c20 3c2f 6469 763e 0a3c 6469 7620 er,
    .
    const \n+001be4b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *MessageID\n+001be4e0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *RelatesTo, \n+001be550: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n+001be580: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *EndpointRefer\n+001be5c0: 656e 6365 2c20 3c2f 6469 763e 0a3c 6469 ence,
    .<\n+001be5e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be5f0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001be620: 3c2f 7370 616e 3e20 2a54 7970 6573 2c20 *Types, \n+001be630: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n+001be660: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *Scopes, .
    const<\n+001be6d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Ma\n+001be700: 7463 6842 792c 203c 2f64 6976 3e0a 3c64 tchBy,
    .\n+001be720: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001be760: 723c 2f73 7061 6e3e 202a 5841 6464 7273 r *XAddrs\n+001be770: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    unsigned i\n+001be7d0: 6e74 3c2f 7370 616e 3e20 4d65 7461 6461 nt Metada\n+001be7e0: 7461 5665 7273 696f 6e29 3c2f 6469 763e taVersion)
    \n+001be7f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
    \n+001be830: 736f 6170 5f77 7364 645f 6d6f 6465 2077 soap_wsdd_mode w\n+001be840: 7364 645f 6576 656e 745f 5072 6f62 6528 sdd_event_Probe(\n+001be850: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001be8a0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001be8d0: 3c2f 613e 2c20 3c2f 6469 763e 0a3c 6469 ,
    .<\n+001be8f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be900: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001be930: 3c2f 7370 616e 3e20 2a4d 6573 7361 6765 *Message\n+001be940: 4944 2c20 3c2f 6469 763e 0a3c 6469 7620 ID,
    .
    const \n+001be980: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *ReplyTo, \n+001be9b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n+001be9e0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *Types,
    \n+001bea20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n+001bea70: 6368 6172 3c2f 7370 616e 3e20 2a53 636f char *Sco\n+001bea80: 7065 732c 203c 2f64 6976 3e0a 3c64 6976 pes,
    .const\n+001beac0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001beae0: 2f73 7061 6e3e 202a 4d61 7463 6842 792c /span> *MatchBy,\n+001beaf0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001beb20: 7374 7275 6374 3c2f 7370 616e 3e20 7773 struct ws\n+001beb30: 6464 5f5f 5072 6f62 654d 6174 6368 6573 dd__ProbeMatches\n+001beb40: 5479 7065 202a 5072 6f62 654d 6174 6368 Type *ProbeMatch\n+001beb50: 6573 293c 2f64 6976 3e0a 3c2f 6469 763e es)
    .
    \n+001beb60: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d
    soap_\n+001bef40: 7773 6464 5f6d 6f64 6520 7773 6464 5f65 wsdd_mode wsdd_e\n+001bef50: 7665 6e74 5f52 6573 6f6c 7665 283c 7370 vent_Resolve(struct\n+001bef80: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001befb0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap,
    .
    const <\n+001bf020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bf030: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *MessageID,\n+001bf050: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001bf080: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *ReplyTo, .
    cons\n+001bf0f0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bf120: 456e 6470 6f69 6e74 5265 6665 7265 6e63 EndpointReferenc\n+001bf130: 652c 203c 2f64 6976 3e0a 3c64 6976 2063 e,
    .
    struct \n+001bf170: 7773 6464 5f5f 5265 736f 6c76 654d 6174 wsdd__ResolveMat\n+001bf180: 6368 6573 5479 7065 202a 5265 736f 6c76 chesType *Resolv\n+001bf190: 654d 6174 6368 6573 293c 2f64 6976 3e0a eMatches)
    .\n+001bf1a0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    .unsigned\n+001bf2e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Ins\n+001bf310: 7461 6e63 6549 642c 203c 2f64 6976 3e0a tanceId,
    .\n+001bf320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001bf370: 6861 723c 2f73 7061 6e3e 202a 5365 7175 har *Sequ\n+001bf380: 656e 6365 4964 2c20 3c2f 6469 763e 0a3c enceId,
    .<\n+001bf390: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bf3a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >unsig\n+001bf3c0: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned int \n+001bf3f0: 4d65 7373 6167 654e 756d 6265 722c 203c MessageNumber, <\n+001bf400: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001bf430: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bf460: 202a 4d65 7373 6167 6549 442c 203c 2f64 *MessageID, .
    cons\n+001bf4a0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bf4d0: 5265 6c61 7465 7354 6f2c 203c 2f64 6976 RelatesTo, .
    const<\n+001bf510: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *En\n+001bf540: 6470 6f69 6e74 5265 6665 7265 6e63 652c dpointReference,\n+001bf550: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001bf580: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *Types, .
    const<\n+001bf5f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Sc\n+001bf620: 6f70 6573 2c20 3c2f 6469 763e 0a3c 6469 opes,
    .<\n+001bf640: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bf650: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001bf680: 3c2f 7370 616e 3e20 2a4d 6174 6368 4279 *MatchBy\n+001bf690: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *XAddrs, .
    \n+001bf730: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n+001bf740: 3c73 7061 6e20 636c 6173 733d 226b 6579 int MetadataVer\n+001bf770: 7369 6f6e 293c 2f64 6976 3e0a 3c2f 6469 sion)
    .

    These even\n+001bf7a0: 7420 6861 6e64 6c65 7273 2077 696c 6c20 t handlers will \n+001bf7b0: 6265 2069 6e76 6f6b 6564 2077 6865 6e20 be invoked when \n+001bf7c0: 696e 626f 756e 6420 5753 2d44 6973 636f inbound WS-Disco\n+001bf7d0: 7665 7279 206d 6573 7361 6765 7320 6172 very messages ar\n+001bf7e0: 7269 7665 2075 7369 6e67 3a3c 2f70 3e0a rive using:

    .\n+001bf7f0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .\n+001bf9a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n+001bf9d0: 2065 7272 6f72 203c 2f73 7061 6e3e 3c2f error .
    if (soap\n+001bfa20: 5f77 7364 645f 6c69 7374 656e 283c 6120 _wsdd_listen(soap, ti\n+001bfa60: 6d65 6f75 7429 2920 3c2f 6469 763e 0a3c meout))
    .<\n+001bfa70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bfa80: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n+001bfaa0: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.

    whi\n+001bfad0: 6368 2077 696c 6c20 6c69 7374 656e 2066 ch will listen f\n+001bfae0: 6f72 203c 636f 6465 3e74 696d 656f 7574 or timeout\n+001bfaf0: 3c2f 636f 6465 3e20 7365 636f 6e64 7320 seconds \n+001bfb00: 746f 2069 6e62 6f75 6e64 2057 532d 4469 to inbound WS-Di\n+001bfb10: 7363 6f76 6572 7920 6d65 7373 6167 6573 scovery messages\n+001bfb20: 206f 6e20 6120 706f 7274 2061 6e64 2064 on a port and d\n+001bfb30: 6973 7061 7463 6865 7320 7468 656d 2074 ispatches them t\n+001bfb40: 6f20 7468 6520 6576 656e 7420 6861 6e64 o the event hand\n+001bfb50: 6c65 7273 2e20 4120 6e65 6761 7469 7665 lers. A negative\n+001bfb60: 203c 636f 6465 3e74 696d 656f 7574 3c2f timeout value spec\n+001bfb80: 6966 6965 7320 7468 6520 7469 6d65 6f75 ifies the timeou\n+001bfb90: 7420 696e 206d 6963 726f 7365 636f 6e64 t in microsecond\n+001bfba0: 732e 3c2f 703e 0a3c 703e 466f 7220 6d6f s.

    .

    For mo\n+001bfbb0: 7265 2064 6574 6169 6c73 2c20 7365 6520 re details, see \n+001bfbc0: 7468 6520 3c61 2068 7265 663d 222e 2e2f the WS-Dis\n+001bfbf0: 636f 7665 7279 2070 6c75 6769 6e3c 2f61 covery plugin documentation.\n+001bfc10: 3c2f 703e 0a3c 6831 3e3c 6120 636c 6173

    .

    .C\n+001bfc40: 6f70 7972 6967 6874 3c2f 6831 3e0a 3c70 opyright

    .Copyright (\n+001bfc60: 6329 2032 3030 302d 3230 3230 2c20 526f c) 2000-2020, Ro\n+001bfc70: 6265 7274 2041 2e20 7661 6e20 456e 6765 bert A. van Enge\n+001bfc80: 6c65 6e2c 2047 656e 6976 6961 2049 6e63 len, Genivia Inc\n+001bfc90: 2e3c 6272 2020 2f3e 0a41 6c6c 2072 6967 .
    .All rig\n+001bfca0: 6874 7320 7265 7365 7276 6564 2e3c 2f65 hts reserved.

    .
    .
    ..
    ..Copyright (\n+001bfd40: 4329 2032 3032 312c 2052 6f62 6572 7420 C) 2021, Robert \n+001bfd50: 7661 6e20 456e 6765 6c65 6e2c 2047 656e van Engelen, Gen\n+001bfd60: 6976 6961 2049 6e63 2e2c 2041 6c6c 2052 ivia Inc., All R\n+001bfd70: 6967 6874 7320 5265 7365 7276 6564 2e0a ights Reserved..\n+001bfd80: 3c2f 6164 6472 6573 733e 0a3c 6164 6472 ..Conve\n+001bfdb0: 7274 6564 206f 6e20 4d6f 6e20 4d61 7220 rted on Mon Mar \n+001bfdc0: 3820 3230 3231 2031 333a 3036 3a32 3320 8 2021 13:06:23 \n+001bfdd0: 6279 203c 6120 7461 7267 6574 3d22 5f62 by D\n+001bfe10: 6f78 7967 656e 3c2f 613e 2031 2e39 2e31 oxygen 1.9.1\n+001bfe20: 3c2f 736d 616c 6c3e 3c2f 6164 6472 6573 .
    .
    ...\n"}]}]}]}]}